@fdm-monster/client-next 0.0.18 → 0.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc-auto-import.json +3 -1
- package/.yarn/install-state.gz +0 -0
- package/.yarn/releases/yarn-4.9.1.cjs +948 -0
- package/.yarnrc.yml +1 -1
- package/RELEASE_NOTES.MD +17 -0
- package/dist/assets/index-CXYoPsmd.js +93 -0
- package/dist/assets/index-CXYoPsmd.js.map +1 -0
- package/dist/assets/index-DEBy2iV3.css +5 -0
- package/dist/index.html +2 -2
- package/package.json +2 -2
- package/tsconfig.json +1 -1
- package/.yarn/releases/yarn-4.7.0.cjs +0 -935
- package/dist/assets/index-C1eI61Be.css +0 -5
- package/dist/assets/index-DxmHK0SK.js +0 -90
- package/dist/assets/index-DxmHK0SK.js.map +0 -1
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
var RD=Object.defineProperty;var AS=e=>{throw TypeError(e)};var ID=(e,t,n)=>t in e?RD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ve=(e,t,n)=>ID(e,typeof t!="symbol"?t+"":t,n),Nm=(e,t,n)=>t.has(e)||AS("Cannot "+n);var j=(e,t,n)=>(Nm(e,t,"read from private field"),n?n.call(e):t.get(e)),je=(e,t,n)=>t.has(e)?AS("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Oe=(e,t,n,r)=>(Nm(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),tt=(e,t,n)=>(Nm(e,t,"access private method"),n);var Kd=(e,t,n,r)=>({set _(s){Oe(e,t,s,n)},get _(){return j(e,t,r)}});try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="47fde1b8-8a73-4b95-9ece-ab49a1a2f2cb",e._sentryDebugIdIdentifier="sentry-dbid-47fde1b8-8a73-4b95-9ece-ab49a1a2f2cb")}catch{}{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"2cedd6694a1987fb640288d12ff583c52d16f2e8"}}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();/**
|
|
2
|
-
* @vue/shared v3.5.13
|
|
3
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
-
* @license MIT
|
|
5
|
-
**//*! #__NO_SIDE_EFFECTS__ */function ub(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Ft={},$l=[],ai=()=>{},AD=()=>!1,wp=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),cb=e=>e.startsWith("onUpdate:"),mn=Object.assign,db=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},OD=Object.prototype.hasOwnProperty,Ct=(e,t)=>OD.call(e,t),qe=Array.isArray,Fl=e=>Sp(e)==="[object Map]",LE=e=>Sp(e)==="[object Set]",Ye=e=>typeof e=="function",sn=e=>typeof e=="string",Ki=e=>typeof e=="symbol",Kt=e=>e!==null&&typeof e=="object",NE=e=>(Kt(e)||Ye(e))&&Ye(e.then)&&Ye(e.catch),BE=Object.prototype.toString,Sp=e=>BE.call(e),MD=e=>Sp(e).slice(8,-1),VE=e=>Sp(e)==="[object Object]",fb=e=>sn(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Sc=ub(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),_p=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},DD=/-(\w)/g,Rr=_p(e=>e.replace(DD,(t,n)=>n?n.toUpperCase():"")),$D=/\B([A-Z])/g,zo=_p(e=>e.replace($D,"-$1").toLowerCase()),fi=_p(e=>e.charAt(0).toUpperCase()+e.slice(1)),Bm=_p(e=>e?`on${fi(e)}`:""),Po=(e,t)=>!Object.is(e,t),Hf=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},UE=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},ov=e=>{const t=parseFloat(e);return isNaN(t)?e:t},FD=e=>{const t=sn(e)?Number(e):NaN;return isNaN(t)?e:t};let OS;const kp=()=>OS||(OS=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function os(e){if(qe(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],s=sn(r)?VD(r):os(r);if(s)for(const i in s)t[i]=s[i]}return t}else if(sn(e)||Kt(e))return e}const LD=/;(?![^(]*\))/g,ND=/:([^]+)/,BD=/\/\*[^]*?\*\//g;function VD(e){const t={};return e.replace(BD,"").split(LD).forEach(n=>{if(n){const r=n.split(ND);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Ho(e){let t="";if(sn(e))t=e;else if(qe(e))for(let n=0;n<e.length;n++){const r=Ho(e[n]);r&&(t+=r+" ")}else if(Kt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function av(e){if(!e)return null;let{class:t,style:n}=e;return t&&!sn(t)&&(e.class=Ho(t)),n&&(e.style=os(n)),e}const UD="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",zD=ub(UD);function zE(e){return!!e||e===""}const HE=e=>!!(e&&e.__v_isRef===!0),re=e=>sn(e)?e:e==null?"":qe(e)||Kt(e)&&(e.toString===BE||!Ye(e.toString))?HE(e)?re(e.value):JSON.stringify(e,jE,2):String(e),jE=(e,t)=>HE(t)?jE(e,t.value):Fl(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],i)=>(n[Vm(r,i)+" =>"]=s,n),{})}:LE(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Vm(n))}:Ki(t)?Vm(t):Kt(t)&&!qe(t)&&!VE(t)?String(t):t,Vm=(e,t="")=>{var n;return Ki(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
|
|
6
|
-
* @vue/reactivity v3.5.13
|
|
7
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
8
|
-
* @license MIT
|
|
9
|
-
**/let ur;class qE{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=ur,!t&&ur&&(this.index=(ur.scopes||(ur.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;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=ur;try{return ur=this,t()}finally{ur=n}}}on(){ur=this}off(){ur=this.parent}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function wd(e){return new qE(e)}function xp(){return ur}function Sn(e,t=!1){ur&&ur.cleanups.push(e)}let Ht;const Um=new WeakSet;class WE{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,ur&&ur.active&&ur.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Um.has(this)&&(Um.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||KE(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,MS(this),YE(this);const t=Ht,n=Ts;Ht=this,Ts=!0;try{return this.fn()}finally{XE(this),Ht=t,Ts=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)mb(t);this.deps=this.depsTail=void 0,MS(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Um.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){lv(this)&&this.run()}get dirty(){return lv(this)}}let GE=0,_c,kc;function KE(e,t=!1){if(e.flags|=8,t){e.next=kc,kc=e;return}e.next=_c,_c=e}function hb(){GE++}function pb(){if(--GE>0)return;if(kc){let t=kc;for(kc=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;_c;){let t=_c;for(_c=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function YE(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function XE(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),mb(r),HD(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function lv(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(QE(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function QE(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Uc))return;e.globalVersion=Uc;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!lv(e)){e.flags&=-3;return}const n=Ht,r=Ts;Ht=e,Ts=!0;try{YE(e);const s=e.fn(e._value);(t.version===0||Po(s,e._value))&&(e._value=s,t.version++)}catch(s){throw t.version++,s}finally{Ht=n,Ts=r,XE(e),e.flags&=-3}}function mb(e,t=!1){const{dep:n,prevSub:r,nextSub:s}=e;if(r&&(r.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)mb(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function HD(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ts=!0;const JE=[];function jo(){JE.push(Ts),Ts=!1}function qo(){const e=JE.pop();Ts=e===void 0?!0:e}function MS(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ht;Ht=void 0;try{t()}finally{Ht=n}}}let Uc=0;class jD{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 gb{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(!Ht||!Ts||Ht===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ht)n=this.activeLink=new jD(Ht,this),Ht.deps?(n.prevDep=Ht.depsTail,Ht.depsTail.nextDep=n,Ht.depsTail=n):Ht.deps=Ht.depsTail=n,ZE(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=Ht.depsTail,n.nextDep=void 0,Ht.depsTail.nextDep=n,Ht.depsTail=n,Ht.deps===n&&(Ht.deps=r)}return n}trigger(t){this.version++,Uc++,this.notify(t)}notify(t){hb();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{pb()}}}function ZE(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)ZE(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const wh=new WeakMap,Ta=Symbol(""),uv=Symbol(""),zc=Symbol("");function Gn(e,t,n){if(Ts&&Ht){let r=wh.get(e);r||wh.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new gb),s.map=r,s.key=n),s.track()}}function Oi(e,t,n,r,s,i){const o=wh.get(e);if(!o){Uc++;return}const a=l=>{l&&l.trigger()};if(hb(),t==="clear")o.forEach(a);else{const l=qe(e),u=l&&fb(n);if(l&&n==="length"){const c=Number(r);o.forEach((d,f)=>{(f==="length"||f===zc||!Ki(f)&&f>=c)&&a(d)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),u&&a(o.get(zc)),t){case"add":l?u&&a(o.get("length")):(a(o.get(Ta)),Fl(e)&&a(o.get(uv)));break;case"delete":l||(a(o.get(Ta)),Fl(e)&&a(o.get(uv)));break;case"set":Fl(e)&&a(o.get(Ta));break}}pb()}function qD(e,t){const n=wh.get(e);return n&&n.get(t)}function ll(e){const t=Ne(e);return t===e?t:(Gn(t,"iterate",zc),as(e)?t:t.map(Kn))}function Ep(e){return Gn(e=Ne(e),"iterate",zc),e}const WD={__proto__:null,[Symbol.iterator](){return zm(this,Symbol.iterator,Kn)},concat(...e){return ll(this).concat(...e.map(t=>qe(t)?ll(t):t))},entries(){return zm(this,"entries",e=>(e[1]=Kn(e[1]),e))},every(e,t){return vi(this,"every",e,t,void 0,arguments)},filter(e,t){return vi(this,"filter",e,t,n=>n.map(Kn),arguments)},find(e,t){return vi(this,"find",e,t,Kn,arguments)},findIndex(e,t){return vi(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return vi(this,"findLast",e,t,Kn,arguments)},findLastIndex(e,t){return vi(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return vi(this,"forEach",e,t,void 0,arguments)},includes(...e){return Hm(this,"includes",e)},indexOf(...e){return Hm(this,"indexOf",e)},join(e){return ll(this).join(e)},lastIndexOf(...e){return Hm(this,"lastIndexOf",e)},map(e,t){return vi(this,"map",e,t,void 0,arguments)},pop(){return Ju(this,"pop")},push(...e){return Ju(this,"push",e)},reduce(e,...t){return DS(this,"reduce",e,t)},reduceRight(e,...t){return DS(this,"reduceRight",e,t)},shift(){return Ju(this,"shift")},some(e,t){return vi(this,"some",e,t,void 0,arguments)},splice(...e){return Ju(this,"splice",e)},toReversed(){return ll(this).toReversed()},toSorted(e){return ll(this).toSorted(e)},toSpliced(...e){return ll(this).toSpliced(...e)},unshift(...e){return Ju(this,"unshift",e)},values(){return zm(this,"values",Kn)}};function zm(e,t,n){const r=Ep(e),s=r[t]();return r!==e&&!as(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.value&&(i.value=n(i.value)),i}),s}const GD=Array.prototype;function vi(e,t,n,r,s,i){const o=Ep(e),a=o!==e&&!as(e),l=o[t];if(l!==GD[t]){const d=l.apply(e,i);return a?Kn(d):d}let u=n;o!==e&&(a?u=function(d,f){return n.call(this,Kn(d),f,e)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,e)}));const c=l.call(o,u,r);return a&&s?s(c):c}function DS(e,t,n,r){const s=Ep(e);let i=n;return s!==e&&(as(e)?n.length>3&&(i=function(o,a,l){return n.call(this,o,a,l,e)}):i=function(o,a,l){return n.call(this,o,Kn(a),l,e)}),s[t](i,...r)}function Hm(e,t,n){const r=Ne(e);Gn(r,"iterate",zc);const s=r[t](...n);return(s===-1||s===!1)&&_d(n[0])?(n[0]=Ne(n[0]),r[t](...n)):s}function Ju(e,t,n=[]){jo(),hb();const r=Ne(e)[t].apply(e,n);return pb(),qo(),r}const KD=ub("__proto__,__v_isRef,__isVue"),eC=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ki));function YD(e){Ki(e)||(e=String(e));const t=Ne(this);return Gn(t,"has",e),t.hasOwnProperty(e)}class tC{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(s?i?i$:iC:i?sC:rC).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const o=qe(t);if(!s){let l;if(o&&(l=WD[n]))return l;if(n==="hasOwnProperty")return YD}const a=Reflect.get(t,n,Je(t)?t:r);return(Ki(n)?eC.has(n):KD(n))||(s||Gn(t,"get",n),i)?a:Je(a)?o&&fb(n)?a:a.value:Kt(a)?s?Sd(a):gn(a):a}}class nC extends tC{constructor(t=!1){super(!1,t)}set(t,n,r,s){let i=t[n];if(!this._isShallow){const l=Ba(i);if(!as(r)&&!Ba(r)&&(i=Ne(i),r=Ne(r)),!qe(t)&&Je(i)&&!Je(r))return l?!1:(i.value=r,!0)}const o=qe(t)&&fb(n)?Number(n)<t.length:Ct(t,n),a=Reflect.set(t,n,r,Je(t)?t:s);return t===Ne(s)&&(o?Po(r,i)&&Oi(t,"set",n,r):Oi(t,"add",n,r)),a}deleteProperty(t,n){const r=Ct(t,n);t[n];const s=Reflect.deleteProperty(t,n);return s&&r&&Oi(t,"delete",n,void 0),s}has(t,n){const r=Reflect.has(t,n);return(!Ki(n)||!eC.has(n))&&Gn(t,"has",n),r}ownKeys(t){return Gn(t,"iterate",qe(t)?"length":Ta),Reflect.ownKeys(t)}}class XD extends tC{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const QD=new nC,JD=new XD,ZD=new nC(!0);const cv=e=>e,Yd=e=>Reflect.getPrototypeOf(e);function e$(e,t,n){return function(...r){const s=this.__v_raw,i=Ne(s),o=Fl(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,u=s[e](...r),c=n?cv:t?dv:Kn;return!t&&Gn(i,"iterate",l?uv:Ta),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:a?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function Xd(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function t$(e,t){const n={get(s){const i=this.__v_raw,o=Ne(i),a=Ne(s);e||(Po(s,a)&&Gn(o,"get",s),Gn(o,"get",a));const{has:l}=Yd(o),u=t?cv:e?dv:Kn;if(l.call(o,s))return u(i.get(s));if(l.call(o,a))return u(i.get(a));i!==o&&i.get(s)},get size(){const s=this.__v_raw;return!e&&Gn(Ne(s),"iterate",Ta),Reflect.get(s,"size",s)},has(s){const i=this.__v_raw,o=Ne(i),a=Ne(s);return e||(Po(s,a)&&Gn(o,"has",s),Gn(o,"has",a)),s===a?i.has(s):i.has(s)||i.has(a)},forEach(s,i){const o=this,a=o.__v_raw,l=Ne(a),u=t?cv:e?dv:Kn;return!e&&Gn(l,"iterate",Ta),a.forEach((c,d)=>s.call(i,u(c),u(d),o))}};return mn(n,e?{add:Xd("add"),set:Xd("set"),delete:Xd("delete"),clear:Xd("clear")}:{add(s){!t&&!as(s)&&!Ba(s)&&(s=Ne(s));const i=Ne(this);return Yd(i).has.call(i,s)||(i.add(s),Oi(i,"add",s,s)),this},set(s,i){!t&&!as(i)&&!Ba(i)&&(i=Ne(i));const o=Ne(this),{has:a,get:l}=Yd(o);let u=a.call(o,s);u||(s=Ne(s),u=a.call(o,s));const c=l.call(o,s);return o.set(s,i),u?Po(i,c)&&Oi(o,"set",s,i):Oi(o,"add",s,i),this},delete(s){const i=Ne(this),{has:o,get:a}=Yd(i);let l=o.call(i,s);l||(s=Ne(s),l=o.call(i,s)),a&&a.call(i,s);const u=i.delete(s);return l&&Oi(i,"delete",s,void 0),u},clear(){const s=Ne(this),i=s.size!==0,o=s.clear();return i&&Oi(s,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=e$(s,e,t)}),n}function vb(e,t){const n=t$(e,t);return(r,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(Ct(n,s)&&s in r?n:r,s,i)}const n$={get:vb(!1,!1)},r$={get:vb(!1,!0)},s$={get:vb(!0,!1)};const rC=new WeakMap,sC=new WeakMap,iC=new WeakMap,i$=new WeakMap;function o$(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function a$(e){return e.__v_skip||!Object.isExtensible(e)?0:o$(MD(e))}function gn(e){return Ba(e)?e:yb(e,!1,QD,n$,rC)}function Cp(e){return yb(e,!1,ZD,r$,sC)}function Sd(e){return yb(e,!0,JD,s$,iC)}function yb(e,t,n,r,s){if(!Kt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=s.get(e);if(i)return i;const o=a$(e);if(o===0)return e;const a=new Proxy(e,o===2?r:n);return s.set(e,a),a}function To(e){return Ba(e)?To(e.__v_raw):!!(e&&e.__v_isReactive)}function Ba(e){return!!(e&&e.__v_isReadonly)}function as(e){return!!(e&&e.__v_isShallow)}function _d(e){return e?!!e.__v_raw:!1}function Ne(e){const t=e&&e.__v_raw;return t?Ne(t):e}function Pp(e){return!Ct(e,"__v_skip")&&Object.isExtensible(e)&&UE(e,"__v_skip",!0),e}const Kn=e=>Kt(e)?gn(e):e,dv=e=>Kt(e)?Sd(e):e;function Je(e){return e?e.__v_isRef===!0:!1}function V(e){return oC(e,!1)}function Ae(e){return oC(e,!0)}function oC(e,t){return Je(e)?e:new l$(e,t)}class l${constructor(t,n){this.dep=new gb,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Ne(t),this._value=n?t:Kn(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||as(t)||Ba(t);t=r?t:Ne(t),Po(t,n)&&(this._rawValue=t,this._value=r?t:Kn(t),this.dep.trigger())}}function Z(e){return Je(e)?e.value:e}function Ro(e){return Ye(e)?e():Z(e)}const u$={get:(e,t,n)=>t==="__v_raw"?e:Z(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return Je(s)&&!Je(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function aC(e){return To(e)?e:new Proxy(e,u$)}function Wo(e){const t=qe(e)?new Array(e.length):{};for(const n in e)t[n]=lC(e,n);return t}class c${constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return qD(Ne(this._object),this._key)}}class d${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 Re(e,t,n){return Je(e)?e:Ye(e)?new d$(e):Kt(e)&&arguments.length>1?lC(e,t,n):V(e)}function lC(e,t,n){const r=e[t];return Je(r)?r:new c$(e,t,n)}class f${constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new gb(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Uc-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&Ht!==this)return KE(this,!0),!0}get value(){const t=this.dep.track();return QE(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function h$(e,t,n=!1){let r,s;return Ye(e)?r=e:(r=e.get,s=e.set),new f$(r,s,n)}const Qd={},Sh=new WeakMap;let ca;function p$(e,t=!1,n=ca){if(n){let r=Sh.get(n);r||Sh.set(n,r=[]),r.push(e)}}function m$(e,t,n=Ft){const{immediate:r,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=n,u=P=>s?P:as(P)||s===!1||s===0?Mi(P,1):Mi(P);let c,d,f,p,v=!1,m=!1;if(Je(e)?(d=()=>e.value,v=as(e)):To(e)?(d=()=>u(e),v=!0):qe(e)?(m=!0,v=e.some(P=>To(P)||as(P)),d=()=>e.map(P=>{if(Je(P))return P.value;if(To(P))return u(P);if(Ye(P))return l?l(P,2):P()})):Ye(e)?t?d=l?()=>l(e,2):e:d=()=>{if(f){jo();try{f()}finally{qo()}}const P=ca;ca=c;try{return l?l(e,3,[p]):e(p)}finally{ca=P}}:d=ai,t&&s){const P=d,S=s===!0?1/0:s;d=()=>Mi(P(),S)}const y=xp(),b=()=>{c.stop(),y&&y.active&&db(y.effects,c)};if(i&&t){const P=t;t=(...S)=>{P(...S),b()}}let w=m?new Array(e.length).fill(Qd):Qd;const x=P=>{if(!(!(c.flags&1)||!c.dirty&&!P))if(t){const S=c.run();if(s||v||(m?S.some((C,R)=>Po(C,w[R])):Po(S,w))){f&&f();const C=ca;ca=c;try{const R=[S,w===Qd?void 0:m&&w[0]===Qd?[]:w,p];l?l(t,3,R):t(...R),w=S}finally{ca=C}}}else c.run()};return a&&a(x),c=new WE(d),c.scheduler=o?()=>o(x,!1):x,p=P=>p$(P,!1,c),f=c.onStop=()=>{const P=Sh.get(c);if(P){if(l)l(P,4);else for(const S of P)S();Sh.delete(c)}},t?r?x(!0):w=c.run():o?o(x.bind(null,!0),!0):c.run(),b.pause=c.pause.bind(c),b.resume=c.resume.bind(c),b.stop=b,b}function Mi(e,t=1/0,n){if(t<=0||!Kt(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Je(e))Mi(e.value,t,n);else if(qe(e))for(let r=0;r<e.length;r++)Mi(e[r],t,n);else if(LE(e)||Fl(e))e.forEach(r=>{Mi(r,t,n)});else if(VE(e)){for(const r in e)Mi(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Mi(e[r],t,n)}return e}/**
|
|
10
|
-
* @vue/runtime-core v3.5.13
|
|
11
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
12
|
-
* @license MIT
|
|
13
|
-
**/function kd(e,t,n,r){try{return r?e(...r):e()}catch(s){Tp(s,t,n)}}function Is(e,t,n,r){if(Ye(e)){const s=kd(e,t,n,r);return s&&NE(s)&&s.catch(i=>{Tp(i,t,n)}),s}if(qe(e)){const s=[];for(let i=0;i<e.length;i++)s.push(Is(e[i],t,n,r));return s}}function Tp(e,t,n,r=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Ft;if(t){let a=t.parent;const l=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const c=a.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,l,u)===!1)return}a=a.parent}if(i){jo(),kd(i,null,10,[e,l,u]),qo();return}}g$(e,n,s,r,o)}function g$(e,t,n,r=!0,s=!1){if(s)throw e;console.error(e)}const cr=[];let Xs=-1;const Ll=[];let ao=null,wl=0;const uC=Promise.resolve();let _h=null;function Mt(e){const t=_h||uC;return e?t.then(this?e.bind(this):e):t}function v$(e){let t=Xs+1,n=cr.length;for(;t<n;){const r=t+n>>>1,s=cr[r],i=Hc(s);i<e||i===e&&s.flags&2?t=r+1:n=r}return t}function bb(e){if(!(e.flags&1)){const t=Hc(e),n=cr[cr.length-1];!n||!(e.flags&2)&&t>=Hc(n)?cr.push(e):cr.splice(v$(t),0,e),e.flags|=1,cC()}}function cC(){_h||(_h=uC.then(fC))}function y$(e){qe(e)?Ll.push(...e):ao&&e.id===-1?ao.splice(wl+1,0,e):e.flags&1||(Ll.push(e),e.flags|=1),cC()}function $S(e,t,n=Xs+1){for(;n<cr.length;n++){const r=cr[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;cr.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function dC(e){if(Ll.length){const t=[...new Set(Ll)].sort((n,r)=>Hc(n)-Hc(r));if(Ll.length=0,ao){ao.push(...t);return}for(ao=t,wl=0;wl<ao.length;wl++){const n=ao[wl];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}ao=null,wl=0}}const Hc=e=>e.id==null?e.flags&2?-1:1/0:e.id;function fC(e){try{for(Xs=0;Xs<cr.length;Xs++){const t=cr[Xs];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),kd(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Xs<cr.length;Xs++){const t=cr[Xs];t&&(t.flags&=-2)}Xs=-1,cr.length=0,dC(),_h=null,(cr.length||Ll.length)&&fC()}}let xn=null,hC=null;function kh(e){const t=xn;return xn=e,hC=e&&e.type.__scopeId||null,t}function g(e,t=xn,n){if(!t||e._n)return e;const r=(...s)=>{r._d&&KS(-1);const i=kh(t);let o;try{o=e(...s)}finally{kh(i),r._d&&KS(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function Bt(e,t){if(xn===null)return e;const n=Dp(xn),r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,o,a,l=Ft]=t[s];i&&(Ye(i)&&(i={mounted:i,updated:i}),i.deep&&Mi(o),r.push({dir:i,instance:n,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function ta(e,t,n,r){const s=e.dirs,i=t&&t.dirs;for(let o=0;o<s.length;o++){const a=s[o];i&&(a.oldValue=i[o].value);let l=a.dir[r];l&&(jo(),Is(l,n,8,[e.el,a,e,t]),qo())}}const pC=Symbol("_vte"),mC=e=>e.__isTeleport,xc=e=>e&&(e.disabled||e.disabled===""),FS=e=>e&&(e.defer||e.defer===""),LS=e=>typeof SVGElement<"u"&&e instanceof SVGElement,NS=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,fv=(e,t)=>{const n=e&&e.to;return sn(n)?t?t(n):null:n},gC={name:"Teleport",__isTeleport:!0,process(e,t,n,r,s,i,o,a,l,u){const{mc:c,pc:d,pbc:f,o:{insert:p,querySelector:v,createText:m,createComment:y}}=u,b=xc(t.props);let{shapeFlag:w,children:x,dynamicChildren:P}=t;if(e==null){const S=t.el=m(""),C=t.anchor=m("");p(S,n,r),p(C,n,r);const R=(E,I)=>{w&16&&(s&&s.isCE&&(s.ce._teleportTarget=E),c(x,E,I,s,i,o,a,l))},k=()=>{const E=t.target=fv(t.props,v),I=vC(E,t,m,p);E&&(o!=="svg"&&LS(E)?o="svg":o!=="mathml"&&NS(E)&&(o="mathml"),b||(R(E,I),jf(t,!1)))};b&&(R(n,C),jf(t,!0)),FS(t.props)?lr(()=>{k(),t.el.__isMounted=!0},i):k()}else{if(FS(t.props)&&!e.el.__isMounted){lr(()=>{gC.process(e,t,n,r,s,i,o,a,l,u),delete e.el.__isMounted},i);return}t.el=e.el,t.targetStart=e.targetStart;const S=t.anchor=e.anchor,C=t.target=e.target,R=t.targetAnchor=e.targetAnchor,k=xc(e.props),E=k?n:C,I=k?S:R;if(o==="svg"||LS(C)?o="svg":(o==="mathml"||NS(C))&&(o="mathml"),P?(f(e.dynamicChildren,P,E,s,i,o,a),Pb(e,t,!0)):l||d(e,t,E,I,s,i,o,a,!1),b)k?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Jd(t,n,S,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const A=t.target=fv(t.props,v);A&&Jd(t,A,null,u,0)}else k&&Jd(t,C,R,u,1);jf(t,b)}},remove(e,t,n,{um:r,o:{remove:s}},i){const{shapeFlag:o,children:a,anchor:l,targetStart:u,targetAnchor:c,target:d,props:f}=e;if(d&&(s(u),s(c)),i&&s(l),o&16){const p=i||!xc(f);for(let v=0;v<a.length;v++){const m=a[v];r(m,t,n,p,!!m.dynamicChildren)}}},move:Jd,hydrate:b$};function Jd(e,t,n,{o:{insert:r},m:s},i=2){i===0&&r(e.targetAnchor,t,n);const{el:o,anchor:a,shapeFlag:l,children:u,props:c}=e,d=i===2;if(d&&r(o,t,n),(!d||xc(c))&&l&16)for(let f=0;f<u.length;f++)s(u[f],t,n,2);d&&r(a,t,n)}function b$(e,t,n,r,s,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:u,createText:c}},d){const f=t.target=fv(t.props,l);if(f){const p=xc(t.props),v=f._lpa||f.firstChild;if(t.shapeFlag&16)if(p)t.anchor=d(o(e),t,a(e),n,r,s,i),t.targetStart=v,t.targetAnchor=v&&o(v);else{t.anchor=o(e);let m=v;for(;m;){if(m&&m.nodeType===8){if(m.data==="teleport start anchor")t.targetStart=m;else if(m.data==="teleport anchor"){t.targetAnchor=m,f._lpa=t.targetAnchor&&o(t.targetAnchor);break}}m=o(m)}t.targetAnchor||vC(f,t,c,u),d(v&&o(v),t,f,n,r,s,i)}jf(t,p)}return t.anchor&&o(t.anchor)}const w$=gC;function jf(e,t){const n=e.ctx;if(n&&n.ut){let r,s;for(t?(r=e.el,s=e.anchor):(r=e.targetStart,s=e.targetAnchor);r&&r!==s;)r.nodeType===1&&r.setAttribute("data-v-owner",n.uid),r=r.nextSibling;n.ut()}}function vC(e,t,n,r){const s=t.targetStart=n(""),i=t.targetAnchor=n("");return s[pC]=i,e&&(r(s,e),r(i,e)),i}const lo=Symbol("_leaveCb"),Zd=Symbol("_enterCb");function yC(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return wt(()=>{e.isMounted=!0}),Cn(()=>{e.isUnmounting=!0}),e}const Qr=[Function,Array],bC={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Qr,onEnter:Qr,onAfterEnter:Qr,onEnterCancelled:Qr,onBeforeLeave:Qr,onLeave:Qr,onAfterLeave:Qr,onLeaveCancelled:Qr,onBeforeAppear:Qr,onAppear:Qr,onAfterAppear:Qr,onAppearCancelled:Qr},wC=e=>{const t=e.subTree;return t.component?wC(t.component):t},S$={name:"BaseTransition",props:bC,setup(e,{slots:t}){const n=Ib(),r=yC();return()=>{const s=t.default&&wb(t.default(),!0);if(!s||!s.length)return;const i=SC(s),o=Ne(e),{mode:a}=o;if(r.isLeaving)return jm(i);const l=BS(i);if(!l)return jm(i);let u=jc(l,o,r,n,d=>u=d);l.type!==Yn&&Va(l,u);let c=n.subTree&&BS(n.subTree);if(c&&c.type!==Yn&&!pa(l,c)&&wC(n).type!==Yn){let d=jc(c,o,r,n);if(Va(c,d),a==="out-in"&&l.type!==Yn)return r.isLeaving=!0,d.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},jm(i);a==="in-out"&&l.type!==Yn?d.delayLeave=(f,p,v)=>{const m=_C(r,c);m[String(c.key)]=c,f[lo]=()=>{p(),f[lo]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{v(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function SC(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Yn){t=n;break}}return t}const _$=S$;function _C(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function jc(e,t,n,r,s){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:v,onLeaveCancelled:m,onBeforeAppear:y,onAppear:b,onAfterAppear:w,onAppearCancelled:x}=t,P=String(e.key),S=_C(n,e),C=(E,I)=>{E&&Is(E,r,9,I)},R=(E,I)=>{const A=I[1];C(E,I),qe(E)?E.every(O=>O.length<=1)&&A():E.length<=1&&A()},k={mode:o,persisted:a,beforeEnter(E){let I=l;if(!n.isMounted)if(i)I=y||l;else return;E[lo]&&E[lo](!0);const A=S[P];A&&pa(e,A)&&A.el[lo]&&A.el[lo](),C(I,[E])},enter(E){let I=u,A=c,O=d;if(!n.isMounted)if(i)I=b||u,A=w||c,O=x||d;else return;let L=!1;const M=E[Zd]=z=>{L||(L=!0,z?C(O,[E]):C(A,[E]),k.delayedLeave&&k.delayedLeave(),E[Zd]=void 0)};I?R(I,[E,M]):M()},leave(E,I){const A=String(e.key);if(E[Zd]&&E[Zd](!0),n.isUnmounting)return I();C(f,[E]);let O=!1;const L=E[lo]=M=>{O||(O=!0,I(),M?C(m,[E]):C(v,[E]),E[lo]=void 0,S[A]===e&&delete S[A])};S[A]=e,p?R(p,[E,L]):L()},clone(E){const I=jc(E,t,n,r,s);return s&&s(I),I}};return k}function jm(e){if(Rp(e))return e=Bi(e),e.children=null,e}function BS(e){if(!Rp(e))return mC(e.type)&&e.children?SC(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Ye(n.default))return n.default()}}function Va(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Va(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 wb(e,t=!1,n){let r=[],s=0;for(let i=0;i<e.length;i++){let o=e[i];const a=n==null?o.key:String(n)+String(o.key!=null?o.key:i);o.type===Pe?(o.patchFlag&128&&s++,r=r.concat(wb(o.children,t,a))):(t||o.type!==Yn)&&r.push(a!=null?Bi(o,{key:a}):o)}if(s>1)for(let i=0;i<r.length;i++)r[i].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function $e(e,t){return Ye(e)?mn({name:e.name},t,{setup:e}):e}function kC(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function xh(e,t,n,r,s=!1){if(qe(e)){e.forEach((v,m)=>xh(v,t&&(qe(t)?t[m]:t),n,r,s));return}if(Nl(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&xh(e,t,n,r.component.subTree);return}const i=r.shapeFlag&4?Dp(r.component):r.el,o=s?null:i,{i:a,r:l}=e,u=t&&t.r,c=a.refs===Ft?a.refs={}:a.refs,d=a.setupState,f=Ne(d),p=d===Ft?()=>!1:v=>Ct(f,v);if(u!=null&&u!==l&&(sn(u)?(c[u]=null,p(u)&&(d[u]=null)):Je(u)&&(u.value=null)),Ye(l))kd(l,a,12,[o,c]);else{const v=sn(l),m=Je(l);if(v||m){const y=()=>{if(e.f){const b=v?p(l)?d[l]:c[l]:l.value;s?qe(b)&&db(b,i):qe(b)?b.includes(i)||b.push(i):v?(c[l]=[i],p(l)&&(d[l]=c[l])):(l.value=[i],e.k&&(c[e.k]=l.value))}else v?(c[l]=o,p(l)&&(d[l]=o)):m&&(l.value=o,e.k&&(c[e.k]=o))};o?(y.id=-1,lr(y,n)):y()}}}kp().requestIdleCallback;kp().cancelIdleCallback;const Nl=e=>!!e.type.__asyncLoader,Rp=e=>e.type.__isKeepAlive;function xC(e,t){EC(e,"a",t)}function Sb(e,t){EC(e,"da",t)}function EC(e,t,n=In){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Ip(t,r,n),n){let s=n.parent;for(;s&&s.parent;)Rp(s.parent.vnode)&&k$(r,t,n,s),s=s.parent}}function k$(e,t,n,r){const s=Ip(t,e,r,!0);Ap(()=>{db(r[t],s)},n)}function Ip(e,t,n=In,r=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{jo();const a=Ed(n),l=Is(t,n,e,o);return a(),qo(),l});return r?s.unshift(i):s.push(i),i}}const Yi=e=>(t,n=In)=>{(!Wc||e==="sp")&&Ip(e,(...r)=>t(...r),n)},ku=Yi("bm"),wt=Yi("m"),CC=Yi("bu"),_b=Yi("u"),Cn=Yi("bum"),Ap=Yi("um"),x$=Yi("sp"),E$=Yi("rtg"),C$=Yi("rtc");function P$(e,t=In){Ip("ec",e,t)}const kb="components",T$="directives";function An(e,t){return xb(kb,e,!0,t)||e}const R$=Symbol.for("v-ndc");function I$(e){return sn(e)&&xb(kb,e,!1)||e}function hr(e){return xb(T$,e)}function xb(e,t,n=!0,r=!1){const s=xn||In;if(s){const i=s.type;if(e===kb){const a=pF(i,!1);if(a&&(a===t||a===Rr(t)||a===fi(Rr(t))))return i}const o=VS(s[e]||i[e],t)||VS(s.appContext[e],t);return!o&&r?i:o}}function VS(e,t){return e&&(e[t]||e[Rr(t)]||e[fi(Rr(t))])}function Wt(e,t,n,r){let s;const i=n,o=qe(e);if(o||sn(e)){const a=o&&To(e);let l=!1;a&&(l=!as(e),e=Ep(e)),s=new Array(e.length);for(let u=0,c=e.length;u<c;u++)s[u]=t(l?Kn(e[u]):e[u],u,void 0,i)}else if(typeof e=="number"){s=new Array(e);for(let a=0;a<e;a++)s[a]=t(a+1,a,void 0,i)}else if(Kt(e))if(e[Symbol.iterator])s=Array.from(e,(a,l)=>t(a,l,void 0,i));else{const a=Object.keys(e);s=new Array(a.length);for(let l=0,u=a.length;l<u;l++){const c=a[l];s[l]=t(e[c],c,l,i)}}else s=[];return s}function PC(e,t){for(let n=0;n<t.length;n++){const r=t[n];if(qe(r))for(let s=0;s<r.length;s++)e[r[s].name]=r[s].fn;else r&&(e[r.name]=r.key?(...s)=>{const i=r.fn(...s);return i&&(i.key=r.key),i}:r.fn)}return e}function Op(e,t,n={},r,s){if(xn.ce||xn.parent&&Nl(xn.parent)&&xn.parent.ce)return D(),te(Pe,null,[h("slot",n,r&&r())],64);let i=e[t];i&&i._c&&(i._d=!1),D();const o=i&&TC(i(n)),a=n.key||o&&o.key,l=te(Pe,{key:(a&&!Ki(a)?a:`_${t}`)+(!o&&r?"_fb":"")},o||(r?r():[]),o&&e._===1?64:-2);return l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),i&&i._c&&(i._d=!0),l}function TC(e){return e.some(t=>ru(t)?!(t.type===Yn||t.type===Pe&&!TC(t.children)):!0)?e:null}const hv=e=>e?GC(e)?Dp(e):hv(e.parent):null,Ec=mn(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=>hv(e.parent),$root:e=>hv(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Eb(e),$forceUpdate:e=>e.f||(e.f=()=>{bb(e.update)}),$nextTick:e=>e.n||(e.n=Mt.bind(e.proxy)),$watch:e=>Q$.bind(e)}),qm=(e,t)=>e!==Ft&&!e.__isScriptSetup&&Ct(e,t),A$={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:i,accessCache:o,type:a,appContext:l}=e;let u;if(t[0]!=="$"){const p=o[t];if(p!==void 0)switch(p){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(qm(r,t))return o[t]=1,r[t];if(s!==Ft&&Ct(s,t))return o[t]=2,s[t];if((u=e.propsOptions[0])&&Ct(u,t))return o[t]=3,i[t];if(n!==Ft&&Ct(n,t))return o[t]=4,n[t];pv&&(o[t]=0)}}const c=Ec[t];let d,f;if(c)return t==="$attrs"&&Gn(e.attrs,"get",""),c(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==Ft&&Ct(n,t))return o[t]=4,n[t];if(f=l.config.globalProperties,Ct(f,t))return f[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:i}=e;return qm(s,t)?(s[t]=n,!0):r!==Ft&&Ct(r,t)?(r[t]=n,!0):Ct(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,propsOptions:i}},o){let a;return!!n[o]||e!==Ft&&Ct(e,o)||qm(t,o)||(a=i[0])&&Ct(a,o)||Ct(r,o)||Ct(Ec,o)||Ct(s.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ct(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function US(e){return qe(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let pv=!0;function O$(e){const t=Eb(e),n=e.proxy,r=e.ctx;pv=!1,t.beforeCreate&&zS(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:p,updated:v,activated:m,deactivated:y,beforeDestroy:b,beforeUnmount:w,destroyed:x,unmounted:P,render:S,renderTracked:C,renderTriggered:R,errorCaptured:k,serverPrefetch:E,expose:I,inheritAttrs:A,components:O,directives:L,filters:M}=t;if(u&&M$(u,r,null),o)for(const G in o){const W=o[G];Ye(W)&&(r[G]=W.bind(n))}if(s){const G=s.call(n,n);Kt(G)&&(e.data=gn(G))}if(pv=!0,i)for(const G in i){const W=i[G],Y=Ye(W)?W.bind(n,n):Ye(W.get)?W.get.bind(n,n):ai,X=!Ye(W)&&Ye(W.set)?W.set.bind(n):ai,J=T({get:Y,set:X});Object.defineProperty(r,G,{enumerable:!0,configurable:!0,get:()=>J.value,set:N=>J.value=N})}if(a)for(const G in a)RC(a[G],r,n,G);if(l){const G=Ye(l)?l.call(n):l;Reflect.ownKeys(G).forEach(W=>{Gt(W,G[W])})}c&&zS(c,e,"c");function H(G,W){qe(W)?W.forEach(Y=>G(Y.bind(n))):W&&G(W.bind(n))}if(H(ku,d),H(wt,f),H(CC,p),H(_b,v),H(xC,m),H(Sb,y),H(P$,k),H(C$,C),H(E$,R),H(Cn,w),H(Ap,P),H(x$,E),qe(I))if(I.length){const G=e.exposed||(e.exposed={});I.forEach(W=>{Object.defineProperty(G,W,{get:()=>n[W],set:Y=>n[W]=Y})})}else e.exposed||(e.exposed={});S&&e.render===ai&&(e.render=S),A!=null&&(e.inheritAttrs=A),O&&(e.components=O),L&&(e.directives=L),E&&kC(e)}function M$(e,t,n=ai){qe(e)&&(e=mv(e));for(const r in e){const s=e[r];let i;Kt(s)?"default"in s?i=Xe(s.from||r,s.default,!0):i=Xe(s.from||r):i=Xe(s),Je(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[r]=i}}function zS(e,t,n){Is(qe(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function RC(e,t,n,r){let s=r.includes(".")?zC(n,r):()=>n[r];if(sn(e)){const i=t[e];Ye(i)&&ke(s,i)}else if(Ye(e))ke(s,e.bind(n));else if(Kt(e))if(qe(e))e.forEach(i=>RC(i,t,n,r));else{const i=Ye(e.handler)?e.handler.bind(n):t[e.handler];Ye(i)&&ke(s,i,e)}}function Eb(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,a=i.get(t);let l;return a?l=a:!s.length&&!n&&!r?l=t:(l={},s.length&&s.forEach(u=>Eh(l,u,o,!0)),Eh(l,t,o)),Kt(t)&&i.set(t,l),l}function Eh(e,t,n,r=!1){const{mixins:s,extends:i}=t;i&&Eh(e,i,n,!0),s&&s.forEach(o=>Eh(e,o,n,!0));for(const o in t)if(!(r&&o==="expose")){const a=D$[o]||n&&n[o];e[o]=a?a(e[o],t[o]):t[o]}return e}const D$={data:HS,props:jS,emits:jS,methods:pc,computed:pc,beforeCreate:sr,created:sr,beforeMount:sr,mounted:sr,beforeUpdate:sr,updated:sr,beforeDestroy:sr,beforeUnmount:sr,destroyed:sr,unmounted:sr,activated:sr,deactivated:sr,errorCaptured:sr,serverPrefetch:sr,components:pc,directives:pc,watch:F$,provide:HS,inject:$$};function HS(e,t){return t?e?function(){return mn(Ye(e)?e.call(this,this):e,Ye(t)?t.call(this,this):t)}:t:e}function $$(e,t){return pc(mv(e),mv(t))}function mv(e){if(qe(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function sr(e,t){return e?[...new Set([].concat(e,t))]:t}function pc(e,t){return e?mn(Object.create(null),e,t):t}function jS(e,t){return e?qe(e)&&qe(t)?[...new Set([...e,...t])]:mn(Object.create(null),US(e),US(t??{})):t}function F$(e,t){if(!e)return t;if(!t)return e;const n=mn(Object.create(null),e);for(const r in t)n[r]=sr(e[r],t[r]);return n}function IC(){return{app:null,config:{isNativeTag:AD,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let L$=0;function N$(e,t){return function(r,s=null){Ye(r)||(r=mn({},r)),s!=null&&!Kt(s)&&(s=null);const i=IC(),o=new WeakSet,a=[];let l=!1;const u=i.app={_uid:L$++,_component:r,_props:s,_container:null,_context:i,_instance:null,version:YC,get config(){return i.config},set config(c){},use(c,...d){return o.has(c)||(c&&Ye(c.install)?(o.add(c),c.install(u,...d)):Ye(c)&&(o.add(c),c(u,...d))),u},mixin(c){return i.mixins.includes(c)||i.mixins.push(c),u},component(c,d){return d?(i.components[c]=d,u):i.components[c]},directive(c,d){return d?(i.directives[c]=d,u):i.directives[c]},mount(c,d,f){if(!l){const p=u._ceVNode||h(r,s);return p.appContext=i,f===!0?f="svg":f===!1&&(f=void 0),d&&t?t(p,c):e(p,c,f),l=!0,u._container=c,c.__vue_app__=u,Dp(p.component)}},onUnmount(c){a.push(c)},unmount(){l&&(Is(a,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,d){return i.provides[c]=d,u},runWithContext(c){const d=Ra;Ra=u;try{return c()}finally{Ra=d}}};return u}}let Ra=null;function Gt(e,t){if(In){let n=In.provides;const r=In.parent&&In.parent.provides;r===n&&(n=In.provides=Object.create(r)),n[e]=t}}function Xe(e,t,n=!1){const r=In||xn;if(r||Ra){const s=Ra?Ra._context.provides:r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return n&&Ye(t)?t.call(r&&r.proxy):t}}function AC(){return!!(In||xn||Ra)}const OC={},MC=()=>Object.create(OC),DC=e=>Object.getPrototypeOf(e)===OC;function B$(e,t,n,r=!1){const s={},i=MC();e.propsDefaults=Object.create(null),$C(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);n?e.props=r?s:Cp(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function V$(e,t,n,r){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=Ne(s),[l]=e.propsOptions;let u=!1;if((r||o>0)&&!(o&16)){if(o&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(Mp(e.emitsOptions,f))continue;const p=t[f];if(l)if(Ct(i,f))p!==i[f]&&(i[f]=p,u=!0);else{const v=Rr(f);s[v]=gv(l,a,v,p,e,!1)}else p!==i[f]&&(i[f]=p,u=!0)}}}else{$C(e,t,s,i)&&(u=!0);let c;for(const d in a)(!t||!Ct(t,d)&&((c=zo(d))===d||!Ct(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(s[d]=gv(l,a,d,void 0,e,!0)):delete s[d]);if(i!==a)for(const d in i)(!t||!Ct(t,d))&&(delete i[d],u=!0)}u&&Oi(e.attrs,"set","")}function $C(e,t,n,r){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(Sc(l))continue;const u=t[l];let c;s&&Ct(s,c=Rr(l))?!i||!i.includes(c)?n[c]=u:(a||(a={}))[c]=u:Mp(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,o=!0)}if(i){const l=Ne(n),u=a||Ft;for(let c=0;c<i.length;c++){const d=i[c];n[d]=gv(s,l,d,u[d],e,!Ct(u,d))}}return o}function gv(e,t,n,r,s,i){const o=e[n];if(o!=null){const a=Ct(o,"default");if(a&&r===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&Ye(l)){const{propsDefaults:u}=s;if(n in u)r=u[n];else{const c=Ed(s);r=u[n]=l.call(null,t),c()}}else r=l;s.ce&&s.ce._setProp(n,r)}o[0]&&(i&&!a?r=!1:o[1]&&(r===""||r===zo(n))&&(r=!0))}return r}const U$=new WeakMap;function FC(e,t,n=!1){const r=n?U$:t.propsCache,s=r.get(e);if(s)return s;const i=e.props,o={},a=[];let l=!1;if(!Ye(e)){const c=d=>{l=!0;const[f,p]=FC(d,t,!0);mn(o,f),p&&a.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!l)return Kt(e)&&r.set(e,$l),$l;if(qe(i))for(let c=0;c<i.length;c++){const d=Rr(i[c]);qS(d)&&(o[d]=Ft)}else if(i)for(const c in i){const d=Rr(c);if(qS(d)){const f=i[c],p=o[d]=qe(f)||Ye(f)?{type:f}:mn({},f),v=p.type;let m=!1,y=!0;if(qe(v))for(let b=0;b<v.length;++b){const w=v[b],x=Ye(w)&&w.name;if(x==="Boolean"){m=!0;break}else x==="String"&&(y=!1)}else m=Ye(v)&&v.name==="Boolean";p[0]=m,p[1]=y,(m||Ct(p,"default"))&&a.push(d)}}const u=[o,a];return Kt(e)&&r.set(e,u),u}function qS(e){return e[0]!=="$"&&!Sc(e)}const LC=e=>e[0]==="_"||e==="$stable",Cb=e=>qe(e)?e.map(ni):[ni(e)],z$=(e,t,n)=>{if(t._n)return t;const r=g((...s)=>Cb(t(...s)),n);return r._c=!1,r},NC=(e,t,n)=>{const r=e._ctx;for(const s in e){if(LC(s))continue;const i=e[s];if(Ye(i))t[s]=z$(s,i,r);else if(i!=null){const o=Cb(i);t[s]=()=>o}}},BC=(e,t)=>{const n=Cb(t);e.slots.default=()=>n},VC=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},H$=(e,t,n)=>{const r=e.slots=MC();if(e.vnode.shapeFlag&32){const s=t._;s?(VC(r,t,n),n&&UE(r,"_",s,!0)):NC(t,r)}else t&&BC(e,t)},j$=(e,t,n)=>{const{vnode:r,slots:s}=e;let i=!0,o=Ft;if(r.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:VC(s,t,n):(i=!t.$stable,NC(t,s)),o=t}else t&&(BC(e,t),o={default:1});if(i)for(const a in s)!LC(a)&&o[a]==null&&delete s[a]},lr=sF;function q$(e){return W$(e)}function W$(e,t){const n=kp();n.__VUE__=!0;const{insert:r,remove:s,patchProp:i,createElement:o,createText:a,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:p=ai,insertStaticContent:v}=e,m=(F,B,q,fe=null,ae=null,ye=null,Ce=void 0,be=null,Se=!!B.dynamicChildren)=>{if(F===B)return;F&&!pa(F,B)&&(fe=ee(F),N(F,ae,ye,!0),F=null),B.patchFlag===-2&&(Se=!1,B.dynamicChildren=null);const{type:pe,ref:Fe,shapeFlag:Ee}=B;switch(pe){case xd:y(F,B,q,fe);break;case Yn:b(F,B,q,fe);break;case Km:F==null&&w(B,q,fe,Ce);break;case Pe:O(F,B,q,fe,ae,ye,Ce,be,Se);break;default:Ee&1?S(F,B,q,fe,ae,ye,Ce,be,Se):Ee&6?L(F,B,q,fe,ae,ye,Ce,be,Se):(Ee&64||Ee&128)&&pe.process(F,B,q,fe,ae,ye,Ce,be,Se,U)}Fe!=null&&ae&&xh(Fe,F&&F.ref,ye,B||F,!B)},y=(F,B,q,fe)=>{if(F==null)r(B.el=a(B.children),q,fe);else{const ae=B.el=F.el;B.children!==F.children&&u(ae,B.children)}},b=(F,B,q,fe)=>{F==null?r(B.el=l(B.children||""),q,fe):B.el=F.el},w=(F,B,q,fe)=>{[F.el,F.anchor]=v(F.children,B,q,fe,F.el,F.anchor)},x=({el:F,anchor:B},q,fe)=>{let ae;for(;F&&F!==B;)ae=f(F),r(F,q,fe),F=ae;r(B,q,fe)},P=({el:F,anchor:B})=>{let q;for(;F&&F!==B;)q=f(F),s(F),F=q;s(B)},S=(F,B,q,fe,ae,ye,Ce,be,Se)=>{B.type==="svg"?Ce="svg":B.type==="math"&&(Ce="mathml"),F==null?C(B,q,fe,ae,ye,Ce,be,Se):E(F,B,ae,ye,Ce,be,Se)},C=(F,B,q,fe,ae,ye,Ce,be)=>{let Se,pe;const{props:Fe,shapeFlag:Ee,transition:xe,dirs:We}=F;if(Se=F.el=o(F.type,ye,Fe&&Fe.is,Fe),Ee&8?c(Se,F.children):Ee&16&&k(F.children,Se,null,fe,ae,Wm(F,ye),Ce,be),We&&ta(F,null,fe,"created"),R(Se,F,F.scopeId,Ce,fe),Fe){for(const Ut in Fe)Ut!=="value"&&!Sc(Ut)&&i(Se,Ut,null,Fe[Ut],ye,fe);"value"in Fe&&i(Se,"value",null,Fe.value,ye),(pe=Fe.onVnodeBeforeMount)&&zs(pe,fe,F)}We&&ta(F,null,fe,"beforeMount");const pt=G$(ae,xe);pt&&xe.beforeEnter(Se),r(Se,B,q),((pe=Fe&&Fe.onVnodeMounted)||pt||We)&&lr(()=>{pe&&zs(pe,fe,F),pt&&xe.enter(Se),We&&ta(F,null,fe,"mounted")},ae)},R=(F,B,q,fe,ae)=>{if(q&&p(F,q),fe)for(let ye=0;ye<fe.length;ye++)p(F,fe[ye]);if(ae){let ye=ae.subTree;if(B===ye||jC(ye.type)&&(ye.ssContent===B||ye.ssFallback===B)){const Ce=ae.vnode;R(F,Ce,Ce.scopeId,Ce.slotScopeIds,ae.parent)}}},k=(F,B,q,fe,ae,ye,Ce,be,Se=0)=>{for(let pe=Se;pe<F.length;pe++){const Fe=F[pe]=be?uo(F[pe]):ni(F[pe]);m(null,Fe,B,q,fe,ae,ye,Ce,be)}},E=(F,B,q,fe,ae,ye,Ce)=>{const be=B.el=F.el;let{patchFlag:Se,dynamicChildren:pe,dirs:Fe}=B;Se|=F.patchFlag&16;const Ee=F.props||Ft,xe=B.props||Ft;let We;if(q&&na(q,!1),(We=xe.onVnodeBeforeUpdate)&&zs(We,q,B,F),Fe&&ta(B,F,q,"beforeUpdate"),q&&na(q,!0),(Ee.innerHTML&&xe.innerHTML==null||Ee.textContent&&xe.textContent==null)&&c(be,""),pe?I(F.dynamicChildren,pe,be,q,fe,Wm(B,ae),ye):Ce||W(F,B,be,null,q,fe,Wm(B,ae),ye,!1),Se>0){if(Se&16)A(be,Ee,xe,q,ae);else if(Se&2&&Ee.class!==xe.class&&i(be,"class",null,xe.class,ae),Se&4&&i(be,"style",Ee.style,xe.style,ae),Se&8){const pt=B.dynamicProps;for(let Ut=0;Ut<pt.length;Ut++){const Rt=pt[Ut],$r=Ee[Rt],zn=xe[Rt];(zn!==$r||Rt==="value")&&i(be,Rt,$r,zn,ae,q)}}Se&1&&F.children!==B.children&&c(be,B.children)}else!Ce&&pe==null&&A(be,Ee,xe,q,ae);((We=xe.onVnodeUpdated)||Fe)&&lr(()=>{We&&zs(We,q,B,F),Fe&&ta(B,F,q,"updated")},fe)},I=(F,B,q,fe,ae,ye,Ce)=>{for(let be=0;be<B.length;be++){const Se=F[be],pe=B[be],Fe=Se.el&&(Se.type===Pe||!pa(Se,pe)||Se.shapeFlag&70)?d(Se.el):q;m(Se,pe,Fe,null,fe,ae,ye,Ce,!0)}},A=(F,B,q,fe,ae)=>{if(B!==q){if(B!==Ft)for(const ye in B)!Sc(ye)&&!(ye in q)&&i(F,ye,B[ye],null,ae,fe);for(const ye in q){if(Sc(ye))continue;const Ce=q[ye],be=B[ye];Ce!==be&&ye!=="value"&&i(F,ye,be,Ce,ae,fe)}"value"in q&&i(F,"value",B.value,q.value,ae)}},O=(F,B,q,fe,ae,ye,Ce,be,Se)=>{const pe=B.el=F?F.el:a(""),Fe=B.anchor=F?F.anchor:a("");let{patchFlag:Ee,dynamicChildren:xe,slotScopeIds:We}=B;We&&(be=be?be.concat(We):We),F==null?(r(pe,q,fe),r(Fe,q,fe),k(B.children||[],q,Fe,ae,ye,Ce,be,Se)):Ee>0&&Ee&64&&xe&&F.dynamicChildren?(I(F.dynamicChildren,xe,q,ae,ye,Ce,be),(B.key!=null||ae&&B===ae.subTree)&&Pb(F,B,!0)):W(F,B,q,Fe,ae,ye,Ce,be,Se)},L=(F,B,q,fe,ae,ye,Ce,be,Se)=>{B.slotScopeIds=be,F==null?B.shapeFlag&512?ae.ctx.activate(B,q,fe,Ce,Se):M(B,q,fe,ae,ye,Ce,Se):z(F,B,Se)},M=(F,B,q,fe,ae,ye,Ce)=>{const be=F.component=uF(F,fe,ae);if(Rp(F)&&(be.ctx.renderer=U),cF(be,!1,Ce),be.asyncDep){if(ae&&ae.registerDep(be,H,Ce),!F.el){const Se=be.subTree=h(Yn);b(null,Se,B,q)}}else H(be,F,B,q,ae,ye,Ce)},z=(F,B,q)=>{const fe=B.component=F.component;if(nF(F,B,q))if(fe.asyncDep&&!fe.asyncResolved){G(fe,B,q);return}else fe.next=B,fe.update();else B.el=F.el,fe.vnode=B},H=(F,B,q,fe,ae,ye,Ce)=>{const be=()=>{if(F.isMounted){let{next:Ee,bu:xe,u:We,parent:pt,vnode:Ut}=F;{const Fr=UC(F);if(Fr){Ee&&(Ee.el=Ut.el,G(F,Ee,Ce)),Fr.asyncDep.then(()=>{F.isUnmounted||be()});return}}let Rt=Ee,$r;na(F,!1),Ee?(Ee.el=Ut.el,G(F,Ee,Ce)):Ee=Ut,xe&&Hf(xe),($r=Ee.props&&Ee.props.onVnodeBeforeUpdate)&&zs($r,pt,Ee,Ut),na(F,!0);const zn=Gm(F),ys=F.subTree;F.subTree=zn,m(ys,zn,d(ys.el),ee(ys),F,ae,ye),Ee.el=zn.el,Rt===null&&rF(F,zn.el),We&&lr(We,ae),($r=Ee.props&&Ee.props.onVnodeUpdated)&&lr(()=>zs($r,pt,Ee,Ut),ae)}else{let Ee;const{el:xe,props:We}=B,{bm:pt,m:Ut,parent:Rt,root:$r,type:zn}=F,ys=Nl(B);if(na(F,!1),pt&&Hf(pt),!ys&&(Ee=We&&We.onVnodeBeforeMount)&&zs(Ee,Rt,B),na(F,!0),xe&&He){const Fr=()=>{F.subTree=Gm(F),He(xe,F.subTree,F,ae,null)};ys&&zn.__asyncHydrate?zn.__asyncHydrate(xe,F,Fr):Fr()}else{$r.ce&&$r.ce._injectChildStyle(zn);const Fr=F.subTree=Gm(F);m(null,Fr,q,fe,F,ae,ye),B.el=Fr.el}if(Ut&&lr(Ut,ae),!ys&&(Ee=We&&We.onVnodeMounted)){const Fr=B;lr(()=>zs(Ee,Rt,Fr),ae)}(B.shapeFlag&256||Rt&&Nl(Rt.vnode)&&Rt.vnode.shapeFlag&256)&&F.a&&lr(F.a,ae),F.isMounted=!0,B=q=fe=null}};F.scope.on();const Se=F.effect=new WE(be);F.scope.off();const pe=F.update=Se.run.bind(Se),Fe=F.job=Se.runIfDirty.bind(Se);Fe.i=F,Fe.id=F.uid,Se.scheduler=()=>bb(Fe),na(F,!0),pe()},G=(F,B,q)=>{B.component=F;const fe=F.vnode.props;F.vnode=B,F.next=null,V$(F,B.props,fe,q),j$(F,B.children,q),jo(),$S(F),qo()},W=(F,B,q,fe,ae,ye,Ce,be,Se=!1)=>{const pe=F&&F.children,Fe=F?F.shapeFlag:0,Ee=B.children,{patchFlag:xe,shapeFlag:We}=B;if(xe>0){if(xe&128){X(pe,Ee,q,fe,ae,ye,Ce,be,Se);return}else if(xe&256){Y(pe,Ee,q,fe,ae,ye,Ce,be,Se);return}}We&8?(Fe&16&&we(pe,ae,ye),Ee!==pe&&c(q,Ee)):Fe&16?We&16?X(pe,Ee,q,fe,ae,ye,Ce,be,Se):we(pe,ae,ye,!0):(Fe&8&&c(q,""),We&16&&k(Ee,q,fe,ae,ye,Ce,be,Se))},Y=(F,B,q,fe,ae,ye,Ce,be,Se)=>{F=F||$l,B=B||$l;const pe=F.length,Fe=B.length,Ee=Math.min(pe,Fe);let xe;for(xe=0;xe<Ee;xe++){const We=B[xe]=Se?uo(B[xe]):ni(B[xe]);m(F[xe],We,q,null,ae,ye,Ce,be,Se)}pe>Fe?we(F,ae,ye,!0,!1,Ee):k(B,q,fe,ae,ye,Ce,be,Se,Ee)},X=(F,B,q,fe,ae,ye,Ce,be,Se)=>{let pe=0;const Fe=B.length;let Ee=F.length-1,xe=Fe-1;for(;pe<=Ee&&pe<=xe;){const We=F[pe],pt=B[pe]=Se?uo(B[pe]):ni(B[pe]);if(pa(We,pt))m(We,pt,q,null,ae,ye,Ce,be,Se);else break;pe++}for(;pe<=Ee&&pe<=xe;){const We=F[Ee],pt=B[xe]=Se?uo(B[xe]):ni(B[xe]);if(pa(We,pt))m(We,pt,q,null,ae,ye,Ce,be,Se);else break;Ee--,xe--}if(pe>Ee){if(pe<=xe){const We=xe+1,pt=We<Fe?B[We].el:fe;for(;pe<=xe;)m(null,B[pe]=Se?uo(B[pe]):ni(B[pe]),q,pt,ae,ye,Ce,be,Se),pe++}}else if(pe>xe)for(;pe<=Ee;)N(F[pe],ae,ye,!0),pe++;else{const We=pe,pt=pe,Ut=new Map;for(pe=pt;pe<=xe;pe++){const Lr=B[pe]=Se?uo(B[pe]):ni(B[pe]);Lr.key!=null&&Ut.set(Lr.key,pe)}let Rt,$r=0;const zn=xe-pt+1;let ys=!1,Fr=0;const Qu=new Array(zn);for(pe=0;pe<zn;pe++)Qu[pe]=0;for(pe=We;pe<=Ee;pe++){const Lr=F[pe];if($r>=zn){N(Lr,ae,ye,!0);continue}let Us;if(Lr.key!=null)Us=Ut.get(Lr.key);else for(Rt=pt;Rt<=xe;Rt++)if(Qu[Rt-pt]===0&&pa(Lr,B[Rt])){Us=Rt;break}Us===void 0?N(Lr,ae,ye,!0):(Qu[Us-pt]=pe+1,Us>=Fr?Fr=Us:ys=!0,m(Lr,B[Us],q,null,ae,ye,Ce,be,Se),$r++)}const RS=ys?K$(Qu):$l;for(Rt=RS.length-1,pe=zn-1;pe>=0;pe--){const Lr=pt+pe,Us=B[Lr],IS=Lr+1<Fe?B[Lr+1].el:fe;Qu[pe]===0?m(null,Us,q,IS,ae,ye,Ce,be,Se):ys&&(Rt<0||pe!==RS[Rt]?J(Us,q,IS,2):Rt--)}}},J=(F,B,q,fe,ae=null)=>{const{el:ye,type:Ce,transition:be,children:Se,shapeFlag:pe}=F;if(pe&6){J(F.component.subTree,B,q,fe);return}if(pe&128){F.suspense.move(B,q,fe);return}if(pe&64){Ce.move(F,B,q,U);return}if(Ce===Pe){r(ye,B,q);for(let Ee=0;Ee<Se.length;Ee++)J(Se[Ee],B,q,fe);r(F.anchor,B,q);return}if(Ce===Km){x(F,B,q);return}if(fe!==2&&pe&1&&be)if(fe===0)be.beforeEnter(ye),r(ye,B,q),lr(()=>be.enter(ye),ae);else{const{leave:Ee,delayLeave:xe,afterLeave:We}=be,pt=()=>r(ye,B,q),Ut=()=>{Ee(ye,()=>{pt(),We&&We()})};xe?xe(ye,pt,Ut):Ut()}else r(ye,B,q)},N=(F,B,q,fe=!1,ae=!1)=>{const{type:ye,props:Ce,ref:be,children:Se,dynamicChildren:pe,shapeFlag:Fe,patchFlag:Ee,dirs:xe,cacheIndex:We}=F;if(Ee===-2&&(ae=!1),be!=null&&xh(be,null,q,F,!0),We!=null&&(B.renderCache[We]=void 0),Fe&256){B.ctx.deactivate(F);return}const pt=Fe&1&&xe,Ut=!Nl(F);let Rt;if(Ut&&(Rt=Ce&&Ce.onVnodeBeforeUnmount)&&zs(Rt,B,F),Fe&6)oe(F.component,q,fe);else{if(Fe&128){F.suspense.unmount(q,fe);return}pt&&ta(F,null,B,"beforeUnmount"),Fe&64?F.type.remove(F,B,q,U,fe):pe&&!pe.hasOnce&&(ye!==Pe||Ee>0&&Ee&64)?we(pe,B,q,!1,!0):(ye===Pe&&Ee&384||!ae&&Fe&16)&&we(Se,B,q),fe&&K(F)}(Ut&&(Rt=Ce&&Ce.onVnodeUnmounted)||pt)&&lr(()=>{Rt&&zs(Rt,B,F),pt&&ta(F,null,B,"unmounted")},q)},K=F=>{const{type:B,el:q,anchor:fe,transition:ae}=F;if(B===Pe){he(q,fe);return}if(B===Km){P(F);return}const ye=()=>{s(q),ae&&!ae.persisted&&ae.afterLeave&&ae.afterLeave()};if(F.shapeFlag&1&&ae&&!ae.persisted){const{leave:Ce,delayLeave:be}=ae,Se=()=>Ce(q,ye);be?be(F.el,ye,Se):Se()}else ye()},he=(F,B)=>{let q;for(;F!==B;)q=f(F),s(F),F=q;s(B)},oe=(F,B,q)=>{const{bum:fe,scope:ae,job:ye,subTree:Ce,um:be,m:Se,a:pe}=F;WS(Se),WS(pe),fe&&Hf(fe),ae.stop(),ye&&(ye.flags|=8,N(Ce,F,B,q)),be&&lr(be,B),lr(()=>{F.isUnmounted=!0},B),B&&B.pendingBranch&&!B.isUnmounted&&F.asyncDep&&!F.asyncResolved&&F.suspenseId===B.pendingId&&(B.deps--,B.deps===0&&B.resolve())},we=(F,B,q,fe=!1,ae=!1,ye=0)=>{for(let Ce=ye;Ce<F.length;Ce++)N(F[Ce],B,q,fe,ae)},ee=F=>{if(F.shapeFlag&6)return ee(F.component.subTree);if(F.shapeFlag&128)return F.suspense.next();const B=f(F.anchor||F.el),q=B&&B[pC];return q?f(q):B};let de=!1;const ne=(F,B,q)=>{F==null?B._vnode&&N(B._vnode,null,null,!0):m(B._vnode||null,F,B,null,null,null,q),B._vnode=F,de||(de=!0,$S(),dC(),de=!1)},U={p:m,um:N,m:J,r:K,mt:M,mc:k,pc:W,pbc:I,n:ee,o:e};let De,He;return{render:ne,hydrate:De,createApp:N$(ne,De)}}function Wm({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 na({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function G$(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Pb(e,t,n=!1){const r=e.children,s=t.children;if(qe(r)&&qe(s))for(let i=0;i<r.length;i++){const o=r[i];let a=s[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[i]=uo(s[i]),a.el=o.el),!n&&a.patchFlag!==-2&&Pb(o,a)),a.type===xd&&(a.el=o.el)}}function K$(e){const t=e.slice(),n=[0];let r,s,i,o,a;const l=e.length;for(r=0;r<l;r++){const u=e[r];if(u!==0){if(s=n[n.length-1],e[s]<u){t[r]=s,n.push(r);continue}for(i=0,o=n.length-1;i<o;)a=i+o>>1,e[n[a]]<u?i=a+1:o=a;u<e[n[i]]&&(i>0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function UC(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:UC(t)}function WS(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const Y$=Symbol.for("v-scx"),X$=()=>Xe(Y$);function Mn(e,t){return Tb(e,null,t)}function ke(e,t,n){return Tb(e,t,n)}function Tb(e,t,n=Ft){const{immediate:r,deep:s,flush:i,once:o}=n,a=mn({},n),l=t&&r||!t&&i!=="post";let u;if(Wc){if(i==="sync"){const p=X$();u=p.__watcherHandles||(p.__watcherHandles=[])}else if(!l){const p=()=>{};return p.stop=ai,p.resume=ai,p.pause=ai,p}}const c=In;a.call=(p,v,m)=>Is(p,c,v,m);let d=!1;i==="post"?a.scheduler=p=>{lr(p,c&&c.suspense)}:i!=="sync"&&(d=!0,a.scheduler=(p,v)=>{v?p():bb(p)}),a.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const f=m$(e,t,a);return Wc&&(u?u.push(f):l&&f()),f}function Q$(e,t,n){const r=this.proxy,s=sn(e)?e.includes(".")?zC(r,e):()=>r[e]:e.bind(r,r);let i;Ye(t)?i=t:(i=t.handler,n=t);const o=Ed(this),a=Tb(s,i.bind(r),n);return o(),a}function zC(e,t){const n=t.split(".");return()=>{let r=e;for(let s=0;s<n.length&&r;s++)r=r[n[s]];return r}}const J$=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Rr(t)}Modifiers`]||e[`${zo(t)}Modifiers`];function Z$(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Ft;let s=n;const i=t.startsWith("update:"),o=i&&J$(r,t.slice(7));o&&(o.trim&&(s=n.map(c=>sn(c)?c.trim():c)),o.number&&(s=n.map(ov)));let a,l=r[a=Bm(t)]||r[a=Bm(Rr(t))];!l&&i&&(l=r[a=Bm(zo(t))]),l&&Is(l,e,6,s);const u=r[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Is(u,e,6,s)}}function HC(e,t,n=!1){const r=t.emitsCache,s=r.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!Ye(e)){const l=u=>{const c=HC(u,t,!0);c&&(a=!0,mn(o,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(Kt(e)&&r.set(e,null),null):(qe(i)?i.forEach(l=>o[l]=null):mn(o,i),Kt(e)&&r.set(e,o),o)}function Mp(e,t){return!e||!wp(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ct(e,t[0].toLowerCase()+t.slice(1))||Ct(e,zo(t))||Ct(e,t))}function Gm(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[i],slots:o,attrs:a,emit:l,render:u,renderCache:c,props:d,data:f,setupState:p,ctx:v,inheritAttrs:m}=e,y=kh(e);let b,w;try{if(n.shapeFlag&4){const P=s||r,S=P;b=ni(u.call(S,P,c,d,p,f,v)),w=a}else{const P=t;b=ni(P.length>1?P(d,{attrs:a,slots:o,emit:l}):P(d,null)),w=t.props?a:eF(a)}}catch(P){Cc.length=0,Tp(P,e,1),b=h(Yn)}let x=b;if(w&&m!==!1){const P=Object.keys(w),{shapeFlag:S}=x;P.length&&S&7&&(i&&P.some(cb)&&(w=tF(w,i)),x=Bi(x,w,!1,!0))}return n.dirs&&(x=Bi(x,null,!1,!0),x.dirs=x.dirs?x.dirs.concat(n.dirs):n.dirs),n.transition&&Va(x,n.transition),b=x,kh(y),b}const eF=e=>{let t;for(const n in e)(n==="class"||n==="style"||wp(n))&&((t||(t={}))[n]=e[n]);return t},tF=(e,t)=>{const n={};for(const r in e)(!cb(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function nF(e,t,n){const{props:r,children:s,component:i}=e,{props:o,children:a,patchFlag:l}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?GS(r,o,u):!!o;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(o[f]!==r[f]&&!Mp(u,f))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:r===o?!1:r?o?GS(r,o,u):!0:!!o;return!1}function GS(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let s=0;s<r.length;s++){const i=r[s];if(t[i]!==e[i]&&!Mp(n,i))return!0}return!1}function rF({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const jC=e=>e.__isSuspense;function sF(e,t){t&&t.pendingBranch?qe(e)?t.effects.push(...e):t.effects.push(e):y$(e)}const Pe=Symbol.for("v-fgt"),xd=Symbol.for("v-txt"),Yn=Symbol.for("v-cmt"),Km=Symbol.for("v-stc"),Cc=[];let Ur=null;function D(e=!1){Cc.push(Ur=e?null:[])}function iF(){Cc.pop(),Ur=Cc[Cc.length-1]||null}let qc=1;function KS(e,t=!1){qc+=e,e<0&&Ur&&t&&(Ur.hasOnce=!0)}function qC(e){return e.dynamicChildren=qc>0?Ur||$l:null,iF(),qc>0&&Ur&&Ur.push(e),e}function ge(e,t,n,r,s,i){return qC($(e,t,n,r,s,i,!0))}function te(e,t,n,r,s){return qC(h(e,t,n,r,s,!0))}function ru(e){return e?e.__v_isVNode===!0:!1}function pa(e,t){return e.type===t.type&&e.key===t.key}const WC=({key:e})=>e??null,qf=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?sn(e)||Je(e)||Ye(e)?{i:xn,r:e,k:t,f:!!n}:e:null);function $(e,t=null,n=null,r=0,s=null,i=e===Pe?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&WC(t),ref:t&&qf(t),scopeId:hC,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:i,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:xn};return a?(Rb(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=sn(n)?8:16),qc>0&&!o&&Ur&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Ur.push(l),l}const h=oF;function oF(e,t=null,n=null,r=0,s=null,i=!1){if((!e||e===R$)&&(e=Yn),ru(e)){const a=Bi(e,t,!0);return n&&Rb(a,n),qc>0&&!i&&Ur&&(a.shapeFlag&6?Ur[Ur.indexOf(e)]=a:Ur.push(a)),a.patchFlag=-2,a}if(mF(e)&&(e=e.__vccOpts),t){t=Ch(t);let{class:a,style:l}=t;a&&!sn(a)&&(t.class=Ho(a)),Kt(l)&&(_d(l)&&!qe(l)&&(l=mn({},l)),t.style=os(l))}const o=sn(e)?1:jC(e)?128:mC(e)?64:Kt(e)?4:Ye(e)?2:0;return $(e,t,n,r,s,o,i,!0)}function Ch(e){return e?_d(e)||DC(e)?mn({},e):e:null}function Bi(e,t,n=!1,r=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,u=t?me(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&WC(u),ref:t&&t.ref?n&&i?qe(i)?i.concat(qf(t)):[i,qf(t)]:qf(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Pe?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Bi(e.ssContent),ssFallback:e.ssFallback&&Bi(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&Va(c,l.clone(c)),c}function _(e=" ",t=0){return h(xd,null,e,t)}function ue(e="",t=!1){return t?(D(),te(Yn,null,e)):h(Yn,null,e)}function ni(e){return e==null||typeof e=="boolean"?h(Yn):qe(e)?h(Pe,null,e.slice()):ru(e)?uo(e):h(xd,null,String(e))}function uo(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Bi(e)}function Rb(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(qe(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),Rb(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!DC(t)?t._ctx=xn:s===3&&xn&&(xn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ye(t)?(t={default:t,_ctx:xn},n=32):(t=String(t),r&64?(n=16,t=[_(t)]):n=8);e.children=t,e.shapeFlag|=n}function me(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const s in r)if(s==="class")t.class!==r.class&&(t.class=Ho([t.class,r.class]));else if(s==="style")t.style=os([t.style,r.style]);else if(wp(s)){const i=t[s],o=r[s];o&&i!==o&&!(qe(i)&&i.includes(o))&&(t[s]=i?[].concat(i,o):o)}else s!==""&&(t[s]=r[s])}return t}function zs(e,t,n,r=null){Is(e,t,7,[n,r])}const aF=IC();let lF=0;function uF(e,t,n){const r=e.type,s=(t?t.appContext:e.appContext)||aF,i={uid:lF++,vnode:e,type:r,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new qE(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:FC(r,s),emitsOptions:HC(r,s),emit:null,emitted:null,propsDefaults:Ft,inheritAttrs:r.inheritAttrs,ctx:Ft,data:Ft,props:Ft,attrs:Ft,slots:Ft,refs:Ft,setupState:Ft,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=Z$.bind(null,i),e.ce&&e.ce(i),i}let In=null;const Ib=()=>In||xn;let Ph,vv;{const e=kp(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};Ph=t("__VUE_INSTANCE_SETTERS__",n=>In=n),vv=t("__VUE_SSR_SETTERS__",n=>Wc=n)}const Ed=e=>{const t=In;return Ph(e),e.scope.on(),()=>{e.scope.off(),Ph(t)}},YS=()=>{In&&In.scope.off(),Ph(null)};function GC(e){return e.vnode.shapeFlag&4}let Wc=!1;function cF(e,t=!1,n=!1){t&&vv(t);const{props:r,children:s}=e.vnode,i=GC(e);B$(e,r,i,t),H$(e,s,n);const o=i?dF(e,t):void 0;return t&&vv(!1),o}function dF(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,A$);const{setup:r}=n;if(r){jo();const s=e.setupContext=r.length>1?hF(e):null,i=Ed(e),o=kd(r,e,0,[e.props,s]),a=NE(o);if(qo(),i(),(a||e.sp)&&!Nl(e)&&kC(e),a){if(o.then(YS,YS),t)return o.then(l=>{XS(e,l,t)}).catch(l=>{Tp(l,e,0)});e.asyncDep=o}else XS(e,o,t)}else KC(e,t)}function XS(e,t,n){Ye(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Kt(t)&&(e.setupState=aC(t)),KC(e,n)}let QS;function KC(e,t,n){const r=e.type;if(!e.render){if(!t&&QS&&!r.render){const s=r.template||Eb(e).template;if(s){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:l}=r,u=mn(mn({isCustomElement:i,delimiters:a},o),l);r.render=QS(s,u)}}e.render=r.render||ai}{const s=Ed(e);jo();try{O$(e)}finally{qo(),s()}}}const fF={get(e,t){return Gn(e,"get",""),e[t]}};function hF(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,fF),slots:e.slots,emit:e.emit,expose:t}}function Dp(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(aC(Pp(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Ec)return Ec[n](e)},has(t,n){return n in t||n in Ec}})):e.proxy}function pF(e,t=!0){return Ye(e)?e.displayName||e.name:e.name||t&&e.__name}function mF(e){return Ye(e)&&"__vccOpts"in e}const T=(e,t)=>h$(e,t,Wc);function pr(e,t,n){const r=arguments.length;return r===2?Kt(t)&&!qe(t)?ru(t)?h(e,null,[t]):h(e,t):h(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&ru(n)&&(n=[n]),h(e,t,n))}const YC="3.5.13";/**
|
|
14
|
-
* @vue/runtime-dom v3.5.13
|
|
15
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
16
|
-
* @license MIT
|
|
17
|
-
**/let yv;const JS=typeof window<"u"&&window.trustedTypes;if(JS)try{yv=JS.createPolicy("vue",{createHTML:e=>e})}catch{}const XC=yv?e=>yv.createHTML(e):e=>e,gF="http://www.w3.org/2000/svg",vF="http://www.w3.org/1998/Math/MathML",Ci=typeof document<"u"?document:null,ZS=Ci&&Ci.createElement("template"),yF={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?Ci.createElementNS(gF,e):t==="mathml"?Ci.createElementNS(vF,e):n?Ci.createElement(e,{is:n}):Ci.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>Ci.createTextNode(e),createComment:e=>Ci.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ci.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,i){const o=n?n.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{ZS.innerHTML=XC(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=ZS.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},to="transition",Zu="animation",su=Symbol("_vtc"),QC={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},JC=mn({},bC,QC),bF=e=>(e.displayName="Transition",e.props=JC,e),Fo=bF((e,{slots:t})=>pr(_$,ZC(e),t)),ra=(e,t=[])=>{qe(e)?e.forEach(n=>n(...t)):e&&e(...t)},e_=e=>e?qe(e)?e.some(t=>t.length>1):e.length>1:!1;function ZC(e){const t={};for(const O in e)O in QC||(t[O]=e[O]);if(e.css===!1)return t;const{name:n="v",type:r,duration:s,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=i,appearActiveClass:u=o,appearToClass:c=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,v=wF(s),m=v&&v[0],y=v&&v[1],{onBeforeEnter:b,onEnter:w,onEnterCancelled:x,onLeave:P,onLeaveCancelled:S,onBeforeAppear:C=b,onAppear:R=w,onAppearCancelled:k=x}=t,E=(O,L,M,z)=>{O._enterCancelled=z,so(O,L?c:a),so(O,L?u:o),M&&M()},I=(O,L)=>{O._isLeaving=!1,so(O,d),so(O,p),so(O,f),L&&L()},A=O=>(L,M)=>{const z=O?R:w,H=()=>E(L,O,M);ra(z,[L,H]),t_(()=>{so(L,O?l:i),Gs(L,O?c:a),e_(z)||n_(L,r,m,H)})};return mn(t,{onBeforeEnter(O){ra(b,[O]),Gs(O,i),Gs(O,o)},onBeforeAppear(O){ra(C,[O]),Gs(O,l),Gs(O,u)},onEnter:A(!1),onAppear:A(!0),onLeave(O,L){O._isLeaving=!0;const M=()=>I(O,L);Gs(O,d),O._enterCancelled?(Gs(O,f),bv()):(bv(),Gs(O,f)),t_(()=>{O._isLeaving&&(so(O,d),Gs(O,p),e_(P)||n_(O,r,y,M))}),ra(P,[O,M])},onEnterCancelled(O){E(O,!1,void 0,!0),ra(x,[O])},onAppearCancelled(O){E(O,!0,void 0,!0),ra(k,[O])},onLeaveCancelled(O){I(O),ra(S,[O])}})}function wF(e){if(e==null)return null;if(Kt(e))return[Ym(e.enter),Ym(e.leave)];{const t=Ym(e);return[t,t]}}function Ym(e){return FD(e)}function Gs(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[su]||(e[su]=new Set)).add(t)}function so(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[su];n&&(n.delete(t),n.size||(e[su]=void 0))}function t_(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let SF=0;function n_(e,t,n,r){const s=e._endId=++SF,i=()=>{s===e._endId&&r()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:a,propCount:l}=eP(e,t);if(!o)return r();const u=o+"end";let c=0;const d=()=>{e.removeEventListener(u,f),i()},f=p=>{p.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},a+1),e.addEventListener(u,f)}function eP(e,t){const n=window.getComputedStyle(e),r=v=>(n[v]||"").split(", "),s=r(`${to}Delay`),i=r(`${to}Duration`),o=r_(s,i),a=r(`${Zu}Delay`),l=r(`${Zu}Duration`),u=r_(a,l);let c=null,d=0,f=0;t===to?o>0&&(c=to,d=o,f=i.length):t===Zu?u>0&&(c=Zu,d=u,f=l.length):(d=Math.max(o,u),c=d>0?o>u?to:Zu:null,f=c?c===to?i.length:l.length:0);const p=c===to&&/\b(transform|all)(,|$)/.test(r(`${to}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:p}}function r_(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>s_(n)+s_(e[r])))}function s_(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function bv(){return document.body.offsetHeight}function _F(e,t,n){const r=e[su];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Th=Symbol("_vod"),tP=Symbol("_vsh"),Xi={beforeMount(e,{value:t},{transition:n}){e[Th]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):ec(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),ec(e,!0),r.enter(e)):r.leave(e,()=>{ec(e,!1)}):ec(e,t))},beforeUnmount(e,{value:t}){ec(e,t)}};function ec(e,t){e.style.display=t?e[Th]:"none",e[tP]=!t}const kF=Symbol(""),xF=/(^|;)\s*display\s*:/;function EF(e,t,n){const r=e.style,s=sn(n);let i=!1;if(n&&!s){if(t)if(sn(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&Wf(r,a,"")}else for(const o in t)n[o]==null&&Wf(r,o,"");for(const o in n)o==="display"&&(i=!0),Wf(r,o,n[o])}else if(s){if(t!==n){const o=r[kF];o&&(n+=";"+o),r.cssText=n,i=xF.test(n)}}else t&&e.removeAttribute("style");Th in e&&(e[Th]=i?r.display:"",e[tP]&&(r.display="none"))}const i_=/\s*!important$/;function Wf(e,t,n){if(qe(n))n.forEach(r=>Wf(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=CF(e,t);i_.test(n)?e.setProperty(zo(r),n.replace(i_,""),"important"):e[r]=n}}const o_=["Webkit","Moz","ms"],Xm={};function CF(e,t){const n=Xm[t];if(n)return n;let r=Rr(t);if(r!=="filter"&&r in e)return Xm[t]=r;r=fi(r);for(let s=0;s<o_.length;s++){const i=o_[s]+r;if(i in e)return Xm[t]=i}return t}const a_="http://www.w3.org/1999/xlink";function l_(e,t,n,r,s,i=zD(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(a_,t.slice(6,t.length)):e.setAttributeNS(a_,t,n):n==null||i&&!zE(n)?e.removeAttribute(t):e.setAttribute(t,i?"":Ki(n)?String(n):n)}function u_(e,t,n,r,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?XC(n):n);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let o=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=zE(n):n==null&&a==="string"?(n="",o=!0):a==="number"&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(s||t)}function Sl(e,t,n,r){e.addEventListener(t,n,r)}function PF(e,t,n,r){e.removeEventListener(t,n,r)}const c_=Symbol("_vei");function TF(e,t,n,r,s=null){const i=e[c_]||(e[c_]={}),o=i[t];if(r&&o)o.value=r;else{const[a,l]=RF(t);if(r){const u=i[t]=OF(r,s);Sl(e,a,u,l)}else o&&(PF(e,a,o,l),i[t]=void 0)}}const d_=/(?:Once|Passive|Capture)$/;function RF(e){let t;if(d_.test(e)){t={};let r;for(;r=e.match(d_);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):zo(e.slice(2)),t]}let Qm=0;const IF=Promise.resolve(),AF=()=>Qm||(IF.then(()=>Qm=0),Qm=Date.now());function OF(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Is(MF(r,n.value),t,5,[r])};return n.value=e,n.attached=AF(),n}function MF(e,t){if(qe(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const f_=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,DF=(e,t,n,r,s,i)=>{const o=s==="svg";t==="class"?_F(e,r,o):t==="style"?EF(e,n,r):wp(t)?cb(t)||TF(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):$F(e,t,r,o))?(u_(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&l_(e,t,r,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!sn(r))?u_(e,Rr(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),l_(e,t,r,o))};function $F(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&f_(t)&&Ye(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 s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return f_(t)&&sn(n)?!1:t in e}const nP=new WeakMap,rP=new WeakMap,Rh=Symbol("_moveCb"),h_=Symbol("_enterCb"),FF=e=>(delete e.props.mode,e),LF=FF({name:"TransitionGroup",props:mn({},JC,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Ib(),r=yC();let s,i;return _b(()=>{if(!s.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!UF(s[0].el,n.vnode.el,o))return;s.forEach(NF),s.forEach(BF);const a=s.filter(VF);bv(),a.forEach(l=>{const u=l.el,c=u.style;Gs(u,o),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[Rh]=f=>{f&&f.target!==u||(!f||/transform$/.test(f.propertyName))&&(u.removeEventListener("transitionend",d),u[Rh]=null,so(u,o))};u.addEventListener("transitionend",d)})}),()=>{const o=Ne(e),a=ZC(o);let l=o.tag||Pe;if(s=[],i)for(let u=0;u<i.length;u++){const c=i[u];c.el&&c.el instanceof Element&&(s.push(c),Va(c,jc(c,a,r,n)),nP.set(c,c.el.getBoundingClientRect()))}i=t.default?wb(t.default()):[];for(let u=0;u<i.length;u++){const c=i[u];c.key!=null&&Va(c,jc(c,a,r,n))}return h(l,null,i)}}}),Ab=LF;function NF(e){const t=e.el;t[Rh]&&t[Rh](),t[h_]&&t[h_]()}function BF(e){rP.set(e,e.el.getBoundingClientRect())}function VF(e){const t=nP.get(e),n=rP.get(e),r=t.left-n.left,s=t.top-n.top;if(r||s){const i=e.el.style;return i.transform=i.webkitTransform=`translate(${r}px,${s}px)`,i.transitionDuration="0s",e}}function UF(e,t,n){const r=e.cloneNode(),s=e[su];s&&s.forEach(a=>{a.split(/\s+/).forEach(l=>l&&r.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&r.classList.add(a)),r.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(r);const{hasTransform:o}=eP(r);return i.removeChild(r),o}const p_=e=>{const t=e.props["onUpdate:modelValue"]||!1;return qe(t)?n=>Hf(t,n):t};function zF(e){e.target.composing=!0}function m_(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Jm=Symbol("_assign"),HF={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[Jm]=p_(s);const i=r||s.props&&s.props.type==="number";Sl(e,t?"change":"input",o=>{if(o.target.composing)return;let a=e.value;n&&(a=a.trim()),i&&(a=ov(a)),e[Jm](a)}),n&&Sl(e,"change",()=>{e.value=e.value.trim()}),t||(Sl(e,"compositionstart",zF),Sl(e,"compositionend",m_),Sl(e,"change",m_))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:i}},o){if(e[Jm]=p_(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?ov(e.value):e.value,l=t??"";a!==l&&(document.activeElement===e&&e.type!=="range"&&(r&&t===n||s&&e.value.trim()===l)||(e.value=l))}},jF=["ctrl","shift","alt","meta"],qF={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)=>jF.some(n=>e[`${n}Key`]&&!t.includes(n))},Pt=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(s,...i)=>{for(let o=0;o<t.length;o++){const a=qF[t[o]];if(a&&a(s,t))return}return e(s,...i)})},WF={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},wv=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=s=>{if(!("key"in s))return;const i=zo(s.key);if(t.some(o=>o===i||WF[o]===i))return e(s)})},GF=mn({patchProp:DF},yF);let g_;function sP(){return g_||(g_=q$(GF))}const iP=(...e)=>{sP().render(...e)},KF=(...e)=>{const t=sP().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=XF(r);if(!s)return;const i=t._component;!Ye(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=n(s,!1,YF(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t};function YF(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function XF(e){return sn(e)?document.querySelector(e):e}var QF=!1;/*!
|
|
18
|
-
* pinia v2.3.1
|
|
19
|
-
* (c) 2025 Eduardo San Martin Morote
|
|
20
|
-
* @license MIT
|
|
21
|
-
*/let oP;const $p=e=>oP=e,aP=Symbol();function Sv(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Pc;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Pc||(Pc={}));function JF(){const e=wd(!0),t=e.run(()=>V({}));let n=[],r=[];const s=Pp({install(i){$p(s),s._a=i,i.provide(aP,s),i.config.globalProperties.$pinia=s,r.forEach(o=>n.push(o)),r=[]},use(i){return!this._a&&!QF?r.push(i):n.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return s}const lP=()=>{};function v_(e,t,n,r=lP){e.push(t);const s=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),r())};return!n&&xp()&&Sn(s),s}function ul(e,...t){e.slice().forEach(n=>{n(...t)})}const ZF=e=>e(),y_=Symbol(),Zm=Symbol();function _v(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,r)=>e.set(r,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],s=e[n];Sv(s)&&Sv(r)&&e.hasOwnProperty(n)&&!Je(r)&&!To(r)?e[n]=_v(s,r):e[n]=r}return e}const eL=Symbol();function tL(e){return!Sv(e)||!e.hasOwnProperty(eL)}const{assign:io}=Object;function nL(e){return!!(Je(e)&&e.effect)}function rL(e,t,n,r){const{state:s,actions:i,getters:o}=t,a=n.state.value[e];let l;function u(){a||(n.state.value[e]=s?s():{});const c=Wo(n.state.value[e]);return io(c,i,Object.keys(o||{}).reduce((d,f)=>(d[f]=Pp(T(()=>{$p(n);const p=n._s.get(e);return o[f].call(p,p)})),d),{}))}return l=uP(e,u,t,n,r,!0),l}function uP(e,t,n={},r,s,i){let o;const a=io({actions:{}},n),l={deep:!0};let u,c,d=[],f=[],p;const v=r.state.value[e];!i&&!v&&(r.state.value[e]={}),V({});let m;function y(k){let E;u=c=!1,typeof k=="function"?(k(r.state.value[e]),E={type:Pc.patchFunction,storeId:e,events:p}):(_v(r.state.value[e],k),E={type:Pc.patchObject,payload:k,storeId:e,events:p});const I=m=Symbol();Mt().then(()=>{m===I&&(u=!0)}),c=!0,ul(d,E,r.state.value[e])}const b=i?function(){const{state:E}=n,I=E?E():{};this.$patch(A=>{io(A,I)})}:lP;function w(){o.stop(),d=[],f=[],r._s.delete(e)}const x=(k,E="")=>{if(y_ in k)return k[Zm]=E,k;const I=function(){$p(r);const A=Array.from(arguments),O=[],L=[];function M(G){O.push(G)}function z(G){L.push(G)}ul(f,{args:A,name:I[Zm],store:S,after:M,onError:z});let H;try{H=k.apply(this&&this.$id===e?this:S,A)}catch(G){throw ul(L,G),G}return H instanceof Promise?H.then(G=>(ul(O,G),G)).catch(G=>(ul(L,G),Promise.reject(G))):(ul(O,H),H)};return I[y_]=!0,I[Zm]=E,I},P={_p:r,$id:e,$onAction:v_.bind(null,f),$patch:y,$reset:b,$subscribe(k,E={}){const I=v_(d,k,E.detached,()=>A()),A=o.run(()=>ke(()=>r.state.value[e],O=>{(E.flush==="sync"?c:u)&&k({storeId:e,type:Pc.direct,events:p},O)},io({},l,E)));return I},$dispose:w},S=gn(P);r._s.set(e,S);const R=(r._a&&r._a.runWithContext||ZF)(()=>r._e.run(()=>(o=wd()).run(()=>t({action:x}))));for(const k in R){const E=R[k];if(Je(E)&&!nL(E)||To(E))i||(v&&tL(E)&&(Je(E)?E.value=v[k]:_v(E,v[k])),r.state.value[e][k]=E);else if(typeof E=="function"){const I=x(E,k);R[k]=I,a.actions[k]=E}}return io(S,R),io(Ne(S),R),Object.defineProperty(S,"$state",{get:()=>r.state.value[e],set:k=>{y(E=>{io(E,k)})}}),r._p.forEach(k=>{io(S,o.run(()=>k({store:S,app:r._a,pinia:r,options:a})))}),v&&i&&n.hydrate&&n.hydrate(S.$state,v),u=!0,c=!0,S}/*! #__NO_SIDE_EFFECTS__ */function ps(e,t,n){let r,s;const i=typeof t=="function";typeof e=="string"?(r=e,s=i?n:t):(s=e,r=e.id);function o(a,l){const u=AC();return a=a||(u?Xe(aP,null):null),a&&$p(a),a=oP,a._s.has(r)||(i?uP(r,t,s,a):rL(r,s,a)),a._s.get(r)}return o.$id=r,o}const cP=ps("Dialog",{state:()=>({ids:[],dialogsById:{}}),getters:{dialogs(){return this.ids.map(e=>this.dialogsById[e])},getBeforeOpenedCallback(){return e=>{var t;return(t=this.dialogsById[e])==null?void 0:t.beforeOpenedCallback}},getOpenedCallback(){return e=>{var t;return(t=this.dialogsById[e])==null?void 0:t.openedCallback}},getContext(){return e=>{var t;return(t=this.dialogsById[e])==null?void 0:t.context}},getOutput(){return e=>{var t;return(t=this.dialogsById[e])==null?void 0:t.output}},isDialogOpened(){return e=>{var t;return(t=this.dialogsById[e])==null?void 0:t.opened}}},actions:{openDialogWithContext(e,t){let n=this.dialogsById[e];n||(n=this.registerDialogReference(e)),n.opened=!0,n.context=t,this.dialogsById={...this.dialogsById},console.debug(`[Pinia Dialog ${e}] Opened with context`,t)},closeDialog(e,t){let n=this.dialogsById[e];n||(n=this.registerDialogReference(e)),n.opened=!1,delete n.context,n.output=t,this.dialogsById={...this.dialogsById},console.debug(`[Pinia Dialog ${e}] Closed`)},unregisterDialogReference(e){delete this.dialogsById[e],this.ids=this.ids.filter(t=>t!==e)},registerDialogReference(e,t){if(!e)throw new Error("Cannot unregister undefined dialog reference");console.debug(`[Pinia Dialog ${e}] Registered`);const n=this.dialogsById[e];if(n)return console.debug(`[Pinia Dialog ${e}] Already registered dialog, not registering again`),n;const r={id:e,opened:!1,beforeOpenedCallback:t==null?void 0:t.beforeOpenedCallback,openedCallback:t==null?void 0:t.openedCallback};return this.dialogsById[e]=r,this.ids.push(e),r}}});function kv(e){return xp()?(Sn(e),!0):!1}const xv=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const sL=Object.prototype.toString,iL=e=>sL.call(e)==="[object Object]";function eg(e){return Array.isArray(e)?e:[e]}function oL(e,t=1e3,n={}){const{immediate:r=!0,immediateCallback:s=!1}=n;let i=null;const o=Ae(!1);function a(){i&&(clearInterval(i),i=null)}function l(){o.value=!1,a()}function u(){const c=Ro(t);c<=0||(o.value=!0,s&&e(),a(),o.value&&(i=setInterval(e,c)))}if(r&&xv&&u(),Je(t)||typeof t=="function"){const c=ke(t,()=>{o.value&&xv&&u()});kv(c)}return kv(l),{isActive:o,pause:l,resume:u}}function aL(e,t,n){return ke(e,t,{...n,immediate:!0})}const dP=xv?window:void 0;function lL(e){var t;const n=Ro(e);return(t=n==null?void 0:n.$el)!=null?t:n}function uL(...e){const t=[],n=()=>{t.forEach(a=>a()),t.length=0},r=(a,l,u,c)=>(a.addEventListener(l,u,c),()=>a.removeEventListener(l,u,c)),s=T(()=>{const a=eg(Ro(e[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),i=aL(()=>{var a,l;return[(l=(a=s.value)==null?void 0:a.map(u=>lL(u)))!=null?l:[dP].filter(u=>u!=null),eg(Ro(s.value?e[1]:e[0])),eg(Z(s.value?e[2]:e[1])),Ro(s.value?e[3]:e[2])]},([a,l,u,c])=>{if(n(),!(a!=null&&a.length)||!(l!=null&&l.length)||!(u!=null&&u.length))return;const d=iL(c)?{...c}:c;t.push(...a.flatMap(f=>l.flatMap(p=>u.map(v=>r(f,p,v,d)))))},{flush:"post"}),o=()=>{i(),n()};return kv(n),o}function cL(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function dL(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:s=dP,eventName:i="keydown",passive:o=!1,dedupe:a=!1}=r,l=cL(t);return uL(s,i,c=>{c.repeat&&Ro(a)||l(c)&&n(c)},o)}const tc=new Map;function Br(e){const t=xp();function n(a){var l;const u=tc.get(e)||new Set;u.add(a),tc.set(e,u);const c=()=>s(a);return(l=t==null?void 0:t.cleanups)==null||l.push(c),c}function r(a){function l(...u){s(l),a(...u)}return n(l)}function s(a){const l=tc.get(e);l&&(l.delete(a),l.size||i())}function i(){tc.delete(e)}function o(a,l){var u;(u=tc.get(e))==null||u.forEach(c=>c(a,l))}return{on:n,once:r,off:s,emit:o,reset:i}}function tn(e){const t=cP();async function n(r){const s=t.getBeforeOpenedCallback(e);s&&await s(r),t.openDialogWithContext(e,r);const i=t.getOpenedCallback(e);i&&await i(r)}return{dialogId:e,dialogStore:t,openDialog:n,context:()=>t.getContext(e),closeDialog:r=>t.closeDialog(e,r),isDialogOpened:()=>t.isDialogOpened(e),handleAsync:async r=>(await n(r),new Promise(s=>{Mn(()=>{t.isDialogOpened(e)||s(t.getOutput(e))})}))}}const _t=typeof window<"u",Ob=_t&&"IntersectionObserver"in window,fL=_t&&("ontouchstart"in window||window.navigator.maxTouchPoints>0);function b_(e,t,n){hL(e,t),t.set(e,n)}function hL(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function pL(e,t,n){return e.set(fP(e,t),n),n}function sa(e,t){return e.get(fP(e,t))}function fP(e,t,n){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function hP(e,t,n){const r=t.length-1;if(r<0)return e===void 0?n:e;for(let s=0;s<r;s++){if(e==null)return n;e=e[t[s]]}return e==null||e[t[r]]===void 0?n:e[t[r]]}function Rs(e,t){if(e===t)return!0;if(e instanceof Date&&t instanceof Date&&e.getTime()!==t.getTime()||e!==Object(e)||t!==Object(t))return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>Rs(e[r],t[r]))}function Ua(e,t,n){return e==null||!t||typeof t!="string"?n:e[t]!==void 0?e[t]:(t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,""),hP(e,t.split("."),n))}function Xn(e,t,n){if(t===!0)return e===void 0?n:e;if(t==null||typeof t=="boolean")return n;if(e!==Object(e)){if(typeof t!="function")return n;const s=t(e,n);return typeof s>"u"?n:s}if(typeof t=="string")return Ua(e,t,n);if(Array.isArray(t))return hP(e,t,n);if(typeof t!="function")return n;const r=t(e,n);return typeof r>"u"?n:r}function El(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Array.from({length:e},(n,r)=>t+r)}function Le(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"px";if(e==null||e==="")return;const n=Number(e);return isNaN(n)?String(e):isFinite(n)?`${n}${t}`:void 0}function Mb(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function w_(e){let t;return e!==null&&typeof e=="object"&&((t=Object.getPrototypeOf(e))===Object.prototype||t===null)}function Db(e){if(e&&"$el"in e){const t=e.$el;return(t==null?void 0:t.nodeType)===Node.TEXT_NODE?t.nextElementSibling:t}return e}const S_=Object.freeze({enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,del:46,backspace:8,insert:45,pageup:33,pagedown:34,shift:16}),__=Object.freeze({enter:"Enter",tab:"Tab",delete:"Delete",esc:"Escape",space:"Space",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",end:"End",home:"Home",del:"Delete",backspace:"Backspace",insert:"Insert",pageup:"PageUp",pagedown:"PageDown",shift:"Shift"});function pP(e){return Object.keys(e)}function tg(e,t){return t.every(n=>e.hasOwnProperty(n))}function xu(e,t){const n={};for(const r of t)Object.hasOwn(e,r)&&(n[r]=e[r]);return n}function Ev(e,t,n){const r=Object.create(null),s=Object.create(null);for(const i in e)t.some(o=>o instanceof RegExp?o.test(i):o===i)&&!(n!=null&&n.some(o=>o===i))?r[i]=e[i]:s[i]=e[i];return[r,s]}function Ms(e,t){const n={...e};return t.forEach(r=>delete n[r]),n}const mP=/^on[^a-z]/,Fp=e=>mP.test(e),mL=["onAfterscriptexecute","onAnimationcancel","onAnimationend","onAnimationiteration","onAnimationstart","onAuxclick","onBeforeinput","onBeforescriptexecute","onChange","onClick","onCompositionend","onCompositionstart","onCompositionupdate","onContextmenu","onCopy","onCut","onDblclick","onFocusin","onFocusout","onFullscreenchange","onFullscreenerror","onGesturechange","onGestureend","onGesturestart","onGotpointercapture","onInput","onKeydown","onKeypress","onKeyup","onLostpointercapture","onMousedown","onMousemove","onMouseout","onMouseover","onMouseup","onMousewheel","onPaste","onPointercancel","onPointerdown","onPointerenter","onPointerleave","onPointermove","onPointerout","onPointerover","onPointerup","onReset","onSelect","onSubmit","onTouchcancel","onTouchend","onTouchmove","onTouchstart","onTransitioncancel","onTransitionend","onTransitionrun","onTransitionstart","onWheel"];function el(e){const[t,n]=Ev(e,[mP]),r=Ms(t,mL),[s,i]=Ev(n,["class","style","id",/^data-/]);return Object.assign(s,t),Object.assign(i,r),[s,i]}function On(e){return e==null?[]:Array.isArray(e)?e:[e]}function gL(e,t){let n=0;const r=function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];clearTimeout(n),n=setTimeout(()=>e(...i),Z(t))};return r.clear=()=>{clearTimeout(n)},r.immediate=e,r}function Pr(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.max(t,Math.min(n,e))}function k_(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0";return e+n.repeat(Math.max(0,t-e.length))}function x_(e,t){return(arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0").repeat(Math.max(0,t-e.length))+e}function vL(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const n=[];let r=0;for(;r<e.length;)n.push(e.substr(r,t)),r+=t;return n}function E_(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e3;if(e<t)return`${e} B`;const n=t===1024?["Ki","Mi","Gi"]:["k","M","G"];let r=-1;for(;Math.abs(e)>=t&&r<n.length-1;)e/=t,++r;return`${e.toFixed(1)} ${n[r]}B`}function Jn(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r={};for(const s in e)r[s]=e[s];for(const s in t){const i=e[s],o=t[s];if(w_(i)&&w_(o)){r[s]=Jn(i,o,n);continue}if(n&&Array.isArray(i)&&Array.isArray(o)){r[s]=n(i,o);continue}r[s]=o}return r}function gP(e){return e.map(t=>t.type===Pe?gP(t.children):t).flat()}function Ia(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(Ia.cache.has(e))return Ia.cache.get(e);const t=e.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return Ia.cache.set(e,t),t}Ia.cache=new Map;function Cl(e,t){if(!t||typeof t!="object")return[];if(Array.isArray(t))return t.map(n=>Cl(e,n)).flat(1);if(t.suspense)return Cl(e,t.ssContent);if(Array.isArray(t.children))return t.children.map(n=>Cl(e,n)).flat(1);if(t.component){if(Object.getOwnPropertySymbols(t.component.provides).includes(e))return[t.component];if(t.component.subTree)return Cl(e,t.component.subTree).flat(1)}return[]}var ef=new WeakMap,cl=new WeakMap;class yL{constructor(t){b_(this,ef,[]),b_(this,cl,0),this.size=t}push(t){sa(ef,this)[sa(cl,this)]=t,pL(cl,this,(sa(cl,this)+1)%this.size)}values(){return sa(ef,this).slice(sa(cl,this)).concat(sa(ef,this).slice(0,sa(cl,this)))}}function $b(e){const t=gn({}),n=T(e);return Mn(()=>{for(const r in n.value)t[r]=n.value[r]},{flush:"sync"}),Wo(t)}function Ih(e,t){return e.includes(t)}function vP(e){return e[2].toLowerCase()+e.slice(3)}const Nn=()=>[Function,Array];function C_(e,t){return t="on"+fi(t),!!(e[t]||e[`${t}Once`]||e[`${t}Capture`]||e[`${t}OnceCapture`]||e[`${t}CaptureOnce`])}function Lp(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(Array.isArray(e))for(const s of e)s(...n);else typeof e=="function"&&e(...n)}function Gc(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const n=["button","[href]",'input:not([type="hidden"])',"select","textarea","[tabindex]"].map(r=>`${r}${t?':not([tabindex="-1"])':""}:not([disabled])`).join(", ");return[...e.querySelectorAll(n)]}function yP(e,t,n){let r,s=e.indexOf(document.activeElement);const i=t==="next"?1:-1;do s+=i,r=e[s];while((!r||r.offsetParent==null||!((n==null?void 0:n(r))??!0))&&s<e.length&&s>=0);return r}function Tc(e,t){var r,s,i,o;const n=Gc(e);if(!t)(e===document.activeElement||!e.contains(document.activeElement))&&((r=n[0])==null||r.focus());else if(t==="first")(s=n[0])==null||s.focus();else if(t==="last")(i=n.at(-1))==null||i.focus();else if(typeof t=="number")(o=n[t])==null||o.focus();else{const a=yP(n,t);a?a.focus():Tc(e,t==="next"?"first":"last")}}function tf(e){return e==null||typeof e=="string"&&e.trim()===""}function Ah(e,t){if(!(_t&&typeof CSS<"u"&&typeof CSS.supports<"u"&&CSS.supports(`selector(${t})`)))return null;try{return!!e&&e.matches(t)}catch{return null}}function bP(e){return e.some(t=>ru(t)?t.type===Yn?!1:t.type!==Pe||bP(t.children):!0)?e:null}function bL(e,t){if(!_t||e===0)return t(),()=>{};const n=window.setTimeout(t,e);return()=>window.clearTimeout(n)}function wL(e,t){const n=e.clientX,r=e.clientY,s=t.getBoundingClientRect(),i=s.left,o=s.top,a=s.right,l=s.bottom;return n>=i&&n<=a&&r>=o&&r<=l}function Cv(){const e=Ae(),t=n=>{e.value=n};return Object.defineProperty(t,"value",{enumerable:!0,get:()=>e.value,set:n=>e.value=n}),Object.defineProperty(t,"el",{enumerable:!0,get:()=>Db(e.value)}),t}function P_(e){const t=e.key.length===1,n=!e.ctrlKey&&!e.metaKey&&!e.altKey;return t&&n}function wP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="bigint"}const SP=["top","bottom"],SL=["start","end","left","right"];function Pv(e,t){let[n,r]=e.split(" ");return r||(r=Ih(SP,n)?"start":Ih(SL,n)?"top":"center"),{side:Tv(n,t),align:Tv(r,t)}}function Tv(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function ng(e){return{side:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.side],align:e.align}}function rg(e){return{side:e.side,align:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.align]}}function T_(e){return{side:e.align,align:e.side}}function R_(e){return Ih(SP,e.side)?"y":"x"}class Aa{constructor(t){let{x:n,y:r,width:s,height:i}=t;this.x=n,this.y=r,this.width=s,this.height=i}get top(){return this.y}get bottom(){return this.y+this.height}get left(){return this.x}get right(){return this.x+this.width}}function I_(e,t){return{x:{before:Math.max(0,t.left-e.left),after:Math.max(0,e.right-t.right)},y:{before:Math.max(0,t.top-e.top),after:Math.max(0,e.bottom-t.bottom)}}}function _P(e){return Array.isArray(e)?new Aa({x:e[0],y:e[1],width:0,height:0}):e.getBoundingClientRect()}function Fb(e){const t=e.getBoundingClientRect(),n=getComputedStyle(e),r=n.transform;if(r){let s,i,o,a,l;if(r.startsWith("matrix3d("))s=r.slice(9,-1).split(/, /),i=Number(s[0]),o=Number(s[5]),a=Number(s[12]),l=Number(s[13]);else if(r.startsWith("matrix("))s=r.slice(7,-1).split(/, /),i=Number(s[0]),o=Number(s[3]),a=Number(s[4]),l=Number(s[5]);else return new Aa(t);const u=n.transformOrigin,c=t.x-a-(1-i)*parseFloat(u),d=t.y-l-(1-o)*parseFloat(u.slice(u.indexOf(" ")+1)),f=i?t.width/i:e.offsetWidth+1,p=o?t.height/o:e.offsetHeight+1;return new Aa({x:c,y:d,width:f,height:p})}else return new Aa(t)}function Pl(e,t,n){if(typeof e.animate>"u")return{finished:Promise.resolve()};let r;try{r=e.animate(t,n)}catch{return{finished:Promise.resolve()}}return typeof r.finished>"u"&&(r.finished=new Promise(s=>{r.onfinish=()=>{s(r)}})),r}const Gf=new WeakMap;function _L(e,t){Object.keys(t).forEach(n=>{if(Fp(n)){const r=vP(n),s=Gf.get(e);if(t[n]==null)s==null||s.forEach(i=>{const[o,a]=i;o===r&&(e.removeEventListener(r,a),s.delete(i))});else if(!s||![...s].some(i=>i[0]===r&&i[1]===t[n])){e.addEventListener(r,t[n]);const i=s||new Set;i.add([r,t[n]]),Gf.has(e)||Gf.set(e,i)}}else t[n]==null?e.removeAttribute(n):e.setAttribute(n,t[n])})}function kL(e,t){Object.keys(t).forEach(n=>{if(Fp(n)){const r=vP(n),s=Gf.get(e);s==null||s.forEach(i=>{const[o,a]=i;o===r&&(e.removeEventListener(r,a),s.delete(i))})}else e.removeAttribute(n)})}const dl=2.4,A_=.2126729,O_=.7151522,M_=.072175,xL=.55,EL=.58,CL=.57,PL=.62,nf=.03,D_=1.45,TL=5e-4,RL=1.25,IL=1.25,$_=.078,F_=12.82051282051282,rf=.06,L_=.001;function N_(e,t){const n=(e.r/255)**dl,r=(e.g/255)**dl,s=(e.b/255)**dl,i=(t.r/255)**dl,o=(t.g/255)**dl,a=(t.b/255)**dl;let l=n*A_+r*O_+s*M_,u=i*A_+o*O_+a*M_;if(l<=nf&&(l+=(nf-l)**D_),u<=nf&&(u+=(nf-u)**D_),Math.abs(u-l)<TL)return 0;let c;if(u>l){const d=(u**xL-l**EL)*RL;c=d<L_?0:d<$_?d-d*F_*rf:d-rf}else{const d=(u**PL-l**CL)*IL;c=d>-L_?0:d>-$_?d-d*F_*rf:d+rf}return c*100}function AL(e,t){t=Array.isArray(t)?t.slice(0,-1).map(n=>`'${n}'`).join(", ")+` or '${t.at(-1)}'`:`'${t}'`}const Oh=.20689655172413793,OL=e=>e>Oh**3?Math.cbrt(e):e/(3*Oh**2)+4/29,ML=e=>e>Oh?e**3:3*Oh**2*(e-4/29);function kP(e){const t=OL,n=t(e[1]);return[116*n-16,500*(t(e[0]/.95047)-n),200*(n-t(e[2]/1.08883))]}function xP(e){const t=ML,n=(e[0]+16)/116;return[t(n+e[1]/500)*.95047,t(n),t(n-e[2]/200)*1.08883]}const DL=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]],$L=e=>e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055,FL=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],LL=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4;function EP(e){const t=Array(3),n=$L,r=DL;for(let s=0;s<3;++s)t[s]=Math.round(Pr(n(r[s][0]*e[0]+r[s][1]*e[1]+r[s][2]*e[2]))*255);return{r:t[0],g:t[1],b:t[2]}}function Lb(e){let{r:t,g:n,b:r}=e;const s=[0,0,0],i=LL,o=FL;t=i(t/255),n=i(n/255),r=i(r/255);for(let a=0;a<3;++a)s[a]=o[a][0]*t+o[a][1]*n+o[a][2]*r;return s}function Rv(e){return!!e&&/^(#|var\(--|(rgb|hsl)a?\()/.test(e)}function NL(e){return Rv(e)&&!/^((rgb|hsl)a?\()?var\(--/.test(e)}const B_=/^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/,BL={rgb:(e,t,n,r)=>({r:e,g:t,b:n,a:r}),rgba:(e,t,n,r)=>({r:e,g:t,b:n,a:r}),hsl:(e,t,n,r)=>V_({h:e,s:t,l:n,a:r}),hsla:(e,t,n,r)=>V_({h:e,s:t,l:n,a:r}),hsv:(e,t,n,r)=>Kc({h:e,s:t,v:n,a:r}),hsva:(e,t,n,r)=>Kc({h:e,s:t,v:n,a:r})};function si(e){if(typeof e=="number")return{r:(e&16711680)>>16,g:(e&65280)>>8,b:e&255};if(typeof e=="string"&&B_.test(e)){const{groups:t}=e.match(B_),{fn:n,values:r}=t,s=r.split(/,\s*/).map(i=>i.endsWith("%")&&["hsl","hsla","hsv","hsva"].includes(n)?parseFloat(i)/100:parseFloat(i));return BL[n](...s)}else if(typeof e=="string"){let t=e.startsWith("#")?e.slice(1):e;return[3,4].includes(t.length)?t=t.split("").map(n=>n+n).join(""):[6,8].includes(t.length),UL(t)}else if(typeof e=="object"){if(tg(e,["r","g","b"]))return e;if(tg(e,["h","s","l"]))return Kc(CP(e));if(tg(e,["h","s","v"]))return Kc(e)}throw new TypeError(`Invalid color: ${e==null?e:String(e)||e.constructor.name}
|
|
22
|
-
Expected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`)}function Kc(e){const{h:t,s:n,v:r,a:s}=e,i=a=>{const l=(a+t/60)%6;return r-r*n*Math.max(Math.min(l,4-l,1),0)},o=[i(5),i(3),i(1)].map(a=>Math.round(a*255));return{r:o[0],g:o[1],b:o[2],a:s}}function V_(e){return Kc(CP(e))}function CP(e){const{h:t,s:n,l:r,a:s}=e,i=r+n*Math.min(r,1-r),o=i===0?0:2-2*r/i;return{h:t,s:o,v:i,a:s}}function sf(e){const t=Math.round(e).toString(16);return("00".substr(0,2-t.length)+t).toUpperCase()}function VL(e){let{r:t,g:n,b:r,a:s}=e;return`#${[sf(t),sf(n),sf(r),s!==void 0?sf(Math.round(s*255)):""].join("")}`}function UL(e){e=zL(e);let[t,n,r,s]=vL(e,2).map(i=>parseInt(i,16));return s=s===void 0?s:s/255,{r:t,g:n,b:r,a:s}}function zL(e){return e.startsWith("#")&&(e=e.slice(1)),e=e.replace(/([^0-9a-f])/gi,"F"),(e.length===3||e.length===4)&&(e=e.split("").map(t=>t+t).join("")),e.length!==6&&(e=k_(k_(e,6),8,"F")),e}function HL(e,t){const n=kP(Lb(e));return n[0]=n[0]+t*10,EP(xP(n))}function jL(e,t){const n=kP(Lb(e));return n[0]=n[0]-t*10,EP(xP(n))}function qL(e){const t=si(e);return Lb(t)[1]}function PP(e){const t=Math.abs(N_(si(0),si(e)));return Math.abs(N_(si(16777215),si(e)))>Math.min(t,50)?"#fff":"#000"}function ce(e,t){return n=>Object.keys(e).reduce((r,s)=>{const o=typeof e[s]=="object"&&e[s]!=null&&!Array.isArray(e[s])?e[s]:{type:e[s]};return n&&s in n?r[s]={...o,default:n[s]}:r[s]=o,t&&!r[s].source&&(r[s].source=t),r},{})}const Ve=ce({class:[String,Array,Object],style:{type:[String,Array,Object],default:null}},"component");function on(e,t){const n=Ib();if(!n)throw new Error(`[Vuetify] ${e} must be called from inside a setup function`);return n}function hi(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"composables";const t=on(e).type;return Ia((t==null?void 0:t.aliasName)||(t==null?void 0:t.name))}let TP=0,Kf=new WeakMap;function gr(){const e=on("getUid");if(Kf.has(e))return Kf.get(e);{const t=TP++;return Kf.set(e,t),t}}gr.reset=()=>{TP=0,Kf=new WeakMap};function WL(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:on("injectSelf");const{provides:n}=t;if(n&&e in n)return n[e]}const iu=Symbol.for("vuetify:defaults");function GL(e){return V(e)}function Nb(){const e=Xe(iu);if(!e)throw new Error("[Vuetify] Could not find defaults instance");return e}function Ir(e,t){const n=Nb(),r=V(e),s=T(()=>{if(Z(t==null?void 0:t.disabled))return n.value;const o=Z(t==null?void 0:t.scoped),a=Z(t==null?void 0:t.reset),l=Z(t==null?void 0:t.root);if(r.value==null&&!(o||a||l))return n.value;let u=Jn(r.value,{prev:n.value});if(o)return u;if(a||l){const c=Number(a||1/0);for(let d=0;d<=c&&!(!u||!("prev"in u));d++)u=u.prev;return u&&typeof l=="string"&&l in u&&(u=Jn(Jn(u,{prev:u}),u[l])),u}return u.prev?Jn(u.prev,u):u});return Gt(iu,s),s}function KL(e,t){var n,r;return typeof((n=e.props)==null?void 0:n[t])<"u"||typeof((r=e.props)==null?void 0:r[Ia(t)])<"u"}function YL(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Nb();const r=on("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const s=T(()=>{var l;return(l=n.value)==null?void 0:l[e._as??t]}),i=new Proxy(e,{get(l,u){var d,f,p,v,m,y,b;const c=Reflect.get(l,u);return u==="class"||u==="style"?[(d=s.value)==null?void 0:d[u],c].filter(w=>w!=null):typeof u=="string"&&!KL(r.vnode,u)?((f=s.value)==null?void 0:f[u])!==void 0?(p=s.value)==null?void 0:p[u]:((m=(v=n.value)==null?void 0:v.global)==null?void 0:m[u])!==void 0?(b=(y=n.value)==null?void 0:y.global)==null?void 0:b[u]:c:c}}),o=Ae();Mn(()=>{if(s.value){const l=Object.entries(s.value).filter(u=>{let[c]=u;return c.startsWith(c[0].toUpperCase())});o.value=l.length?Object.fromEntries(l):void 0}else o.value=void 0});function a(){const l=WL(iu,r);Gt(iu,T(()=>o.value?Jn((l==null?void 0:l.value)??{},o.value):l==null?void 0:l.value))}return{props:i,provideSubDefaults:a}}function Eu(e){if(e._setup=e._setup??e.setup,!e.name)return e;if(e._setup){e.props=ce(e.props??{},e.name)();const t=Object.keys(e.props).filter(n=>n!=="class"&&n!=="style");e.filterProps=function(r){return xu(r,t)},e.props._as=String,e.setup=function(r,s){const i=Nb();if(!i.value)return e._setup(r,s);const{props:o,provideSubDefaults:a}=YL(r,r._as??e.name,i),l=e._setup(o,s);return a(),l}}return e}function _e(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t=>(e?Eu:$e)(t)}function XL(e,t){return t.props=e,t}function Cu(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"div",n=arguments.length>2?arguments[2]:void 0;return _e()({name:n??fi(Rr(e.replace(/__/g,"-"))),props:{tag:{type:String,default:t},...Ve()},setup(r,s){let{slots:i}=s;return()=>{var o;return pr(r.tag,{class:[e,r.class],style:r.style},(o=i.default)==null?void 0:o.call(i))}}})}function RP(e){if(typeof e.getRootNode!="function"){for(;e.parentNode;)e=e.parentNode;return e!==document?null:document}const t=e.getRootNode();return t!==document&&t.getRootNode({composed:!0})!==document?null:t}const Mh="cubic-bezier(0.4, 0, 0.2, 1)",QL="cubic-bezier(0.0, 0, 0.2, 1)",JL="cubic-bezier(0.4, 0, 1, 1)";function U_(e,t,n){return Object.keys(e).filter(r=>Fp(r)&&r.endsWith(t)).reduce((r,s)=>(r[s.slice(0,-t.length)]=i=>e[s](i,n(i)),r),{})}function IP(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(;e;){if(t?ZL(e):Bb(e))return e;e=e.parentElement}return document.scrollingElement}function Dh(e,t){const n=[];if(t&&e&&!t.contains(e))return n;for(;e&&(Bb(e)&&n.push(e),e!==t);)e=e.parentElement;return n}function Bb(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return t.overflowY==="scroll"||t.overflowY==="auto"&&e.scrollHeight>e.clientHeight}function ZL(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return["scroll","auto"].includes(t.overflowY)}function eN(e){for(;e;){if(window.getComputedStyle(e).position==="fixed")return!0;e=e.offsetParent}return!1}function Ie(e){const t=on("useRender");t.render=e}const ms=ce({border:[Boolean,Number,String]},"border");function Ds(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:hi();return{borderClasses:T(()=>{const r=Je(e)?e.value:e.border,s=[];if(r===!0||r==="")s.push(`${t}--border`);else if(typeof r=="string"||r===0)for(const i of String(r).split(" "))s.push(`border-${i}`);return s})}}const tN=[null,"default","comfortable","compact"],Ar=ce({density:{type:String,default:"default",validator:e=>tN.includes(e)}},"density");function gs(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:hi();return{densityClasses:T(()=>`${t}--density-${e.density}`)}}const vs=ce({elevation:{type:[Number,String],validator(e){const t=parseInt(e);return!isNaN(t)&&t>=0&&t<=24}}},"elevation");function $s(e){return{elevationClasses:T(()=>{const n=Je(e)?e.value:e.elevation,r=[];return n==null||r.push(`elevation-${n}`),r})}}const $n=ce({rounded:{type:[Boolean,Number,String],default:void 0},tile:Boolean},"rounded");function Vn(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:hi();return{roundedClasses:T(()=>{const r=Je(e)?e.value:e.rounded,s=Je(e)?e.value:e.tile,i=[];if(r===!0||r==="")i.push(`${t}--rounded`);else if(typeof r=="string"||r===0)for(const o of String(r).split(" "))i.push(`rounded-${o}`);else(s||r===!1)&&i.push("rounded-0");return i})}}const vt=ce({tag:{type:String,default:"div"}},"tag"),Yc=Symbol.for("vuetify:theme"),$t=ce({theme:String},"theme");function z_(){return{defaultTheme:"light",variations:{colors:[],lighten:0,darken:0},themes:{light:{dark:!1,colors:{background:"#FFFFFF",surface:"#FFFFFF","surface-bright":"#FFFFFF","surface-light":"#EEEEEE","surface-variant":"#424242","on-surface-variant":"#EEEEEE",primary:"#1867C0","primary-darken-1":"#1F5592",secondary:"#48A9A6","secondary-darken-1":"#018786",error:"#B00020",info:"#2196F3",success:"#4CAF50",warning:"#FB8C00"},variables:{"border-color":"#000000","border-opacity":.12,"high-emphasis-opacity":.87,"medium-emphasis-opacity":.6,"disabled-opacity":.38,"idle-opacity":.04,"hover-opacity":.04,"focus-opacity":.12,"selected-opacity":.08,"activated-opacity":.12,"pressed-opacity":.12,"dragged-opacity":.08,"theme-kbd":"#212529","theme-on-kbd":"#FFFFFF","theme-code":"#F5F5F5","theme-on-code":"#000000"}},dark:{dark:!0,colors:{background:"#121212",surface:"#212121","surface-bright":"#ccbfd6","surface-light":"#424242","surface-variant":"#a3a3a3","on-surface-variant":"#424242",primary:"#2196F3","primary-darken-1":"#277CC1",secondary:"#54B6B2","secondary-darken-1":"#48A9A6",error:"#CF6679",info:"#2196F3",success:"#4CAF50",warning:"#FB8C00"},variables:{"border-color":"#FFFFFF","border-opacity":.12,"high-emphasis-opacity":1,"medium-emphasis-opacity":.7,"disabled-opacity":.5,"idle-opacity":.1,"hover-opacity":.04,"focus-opacity":.12,"selected-opacity":.08,"activated-opacity":.12,"pressed-opacity":.16,"dragged-opacity":.08,"theme-kbd":"#212529","theme-on-kbd":"#FFFFFF","theme-code":"#343434","theme-on-code":"#CCCCCC"}}}}}function nN(){var r,s;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:z_();const t=z_();if(!e)return{...t,isDisabled:!0};const n={};for(const[i,o]of Object.entries(e.themes??{})){const a=o.dark||i==="dark"?(r=t.themes)==null?void 0:r.dark:(s=t.themes)==null?void 0:s.light;n[i]=Jn(a,o)}return Jn(t,{...e,themes:n})}function rN(e){const t=nN(e),n=V(t.defaultTheme),r=V(t.themes),s=T(()=>{const c={};for(const[d,f]of Object.entries(r.value)){const p=c[d]={...f,colors:{...f.colors}};if(t.variations)for(const v of t.variations.colors){const m=p.colors[v];if(m)for(const y of["lighten","darken"]){const b=y==="lighten"?HL:jL;for(const w of El(t.variations[y],1))p.colors[`${v}-${y}-${w}`]=VL(b(si(m),w))}}for(const v of Object.keys(p.colors)){if(/^on-[a-z]/.test(v)||p.colors[`on-${v}`])continue;const m=`on-${v}`,y=si(p.colors[v]);p.colors[m]=PP(y)}}return c}),i=T(()=>s.value[n.value]),o=T(()=>{var v;const c=[];(v=i.value)!=null&&v.dark&&ia(c,":root",["color-scheme: dark"]),ia(c,":root",H_(i.value));for(const[m,y]of Object.entries(s.value))ia(c,`.v-theme--${m}`,[`color-scheme: ${y.dark?"dark":"normal"}`,...H_(y)]);const d=[],f=[],p=new Set(Object.values(s.value).flatMap(m=>Object.keys(m.colors)));for(const m of p)/^on-[a-z]/.test(m)?ia(f,`.${m}`,[`color: rgb(var(--v-theme-${m})) !important`]):(ia(d,`.bg-${m}`,[`--v-theme-overlay-multiplier: var(--v-theme-${m}-overlay-multiplier)`,`background-color: rgb(var(--v-theme-${m})) !important`,`color: rgb(var(--v-theme-on-${m})) !important`]),ia(f,`.text-${m}`,[`color: rgb(var(--v-theme-${m})) !important`]),ia(f,`.border-${m}`,[`--v-border-color: var(--v-theme-${m})`]));return c.push(...d,...f),c.map((m,y)=>y===0?m:` ${m}`).join("")});function a(){return{style:[{children:o.value,id:"vuetify-theme-stylesheet",nonce:t.cspNonce||!1}]}}function l(c){if(t.isDisabled)return;const d=c._context.provides.usehead;if(d)if(d.push){const p=d.push(a);_t&&ke(o,()=>{p.patch(a)})}else _t?(d.addHeadObjs(T(a)),Mn(()=>d.updateDOM())):d.addHeadObjs(a());else{let v=function(){if(typeof document<"u"&&!p){const m=document.createElement("style");m.type="text/css",m.id="vuetify-theme-stylesheet",t.cspNonce&&m.setAttribute("nonce",t.cspNonce),p=m,document.head.appendChild(p)}p&&(p.innerHTML=o.value)};var f=v;let p=_t?document.getElementById("vuetify-theme-stylesheet"):null;_t?ke(o,v,{immediate:!0}):v()}}const u=T(()=>t.isDisabled?void 0:`v-theme--${n.value}`);return{install:l,isDisabled:t.isDisabled,name:n,themes:r,current:i,computedThemes:s,themeClasses:u,styles:o,global:{name:n,current:i}}}function Yt(e){on("provideTheme");const t=Xe(Yc,null);if(!t)throw new Error("Could not find Vuetify theme injection");const n=T(()=>e.theme??t.name.value),r=T(()=>t.themes.value[n.value]),s=T(()=>t.isDisabled?void 0:`v-theme--${n.value}`),i={...t,name:n,current:r,themeClasses:s};return Gt(Yc,i),i}function sN(){on("useTheme");const e=Xe(Yc,null);if(!e)throw new Error("Could not find Vuetify theme injection");return e}function ia(e,t,n){e.push(`${t} {
|
|
23
|
-
`,...n.map(r=>` ${r};
|
|
24
|
-
`),`}
|
|
25
|
-
`)}function H_(e){const t=e.dark?2:1,n=e.dark?1:2,r=[];for(const[s,i]of Object.entries(e.colors)){const o=si(i);r.push(`--v-theme-${s}: ${o.r},${o.g},${o.b}`),s.startsWith("on-")||r.push(`--v-theme-${s}-overlay-multiplier: ${qL(i)>.18?t:n}`)}for(const[s,i]of Object.entries(e.variables)){const o=typeof i=="string"&&i.startsWith("#")?si(i):void 0,a=o?`${o.r}, ${o.g}, ${o.b}`:void 0;r.push(`--v-${s}: ${a??i}`)}return r}function Vb(e){return $b(()=>{const t=[],n={};if(e.value.background)if(Rv(e.value.background)){if(n.backgroundColor=e.value.background,!e.value.text&&NL(e.value.background)){const r=si(e.value.background);if(r.a==null||r.a===1){const s=PP(r);n.color=s,n.caretColor=s}}}else t.push(`bg-${e.value.background}`);return e.value.text&&(Rv(e.value.text)?(n.color=e.value.text,n.caretColor=e.value.text):t.push(`text-${e.value.text}`)),{colorClasses:t,colorStyles:n}})}function As(e,t){const n=T(()=>({text:Je(e)?e.value:t?e[t]:null})),{colorClasses:r,colorStyles:s}=Vb(n);return{textColorClasses:r,textColorStyles:s}}function fr(e,t){const n=T(()=>({background:Je(e)?e.value:t?e[t]:null})),{colorClasses:r,colorStyles:s}=Vb(n);return{backgroundColorClasses:r,backgroundColorStyles:s}}const iN=["elevated","flat","tonal","outlined","text","plain"];function Go(e,t){return h(Pe,null,[e&&h("span",{key:"overlay",class:`${t}__overlay`},null),h("span",{key:"underlay",class:`${t}__underlay`},null)])}const Fs=ce({color:String,variant:{type:String,default:"elevated",validator:e=>iN.includes(e)}},"variant");function tl(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:hi();const n=T(()=>{const{variant:i}=Z(e);return`${t}--variant-${i}`}),{colorClasses:r,colorStyles:s}=Vb(T(()=>{const{variant:i,color:o}=Z(e);return{[["elevated","flat"].includes(i)?"background":"text"]:o}}));return{colorClasses:r,colorStyles:s,variantClasses:n}}const AP=ce({baseColor:String,divided:Boolean,...ms(),...Ve(),...Ar(),...vs(),...$n(),...vt(),...$t(),...Fs()},"VBtnGroup"),j_=_e()({name:"VBtnGroup",props:AP(),setup(e,t){let{slots:n}=t;const{themeClasses:r}=Yt(e),{densityClasses:s}=gs(e),{borderClasses:i}=Ds(e),{elevationClasses:o}=$s(e),{roundedClasses:a}=Vn(e);Ir({VBtn:{height:"auto",baseColor:Re(e,"baseColor"),color:Re(e,"color"),density:Re(e,"density"),flat:!0,variant:Re(e,"variant")}}),Ie(()=>h(e.tag,{class:["v-btn-group",{"v-btn-group--divided":e.divided},r.value,i.value,s.value,o.value,a.value,e.class],style:e.style},n))}});function Hr(e,t){let n;function r(){n=wd(),n.run(()=>t.length?t(()=>{n==null||n.stop(),r()}):t())}ke(e,s=>{s&&!n?r():s||(n==null||n.stop(),n=void 0)},{immediate:!0}),Sn(()=>{n==null||n.stop()})}function st(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:d=>d,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:d=>d;const i=on("useProxiedModel"),o=V(e[t]!==void 0?e[t]:n),a=Ia(t),u=T(a!==t?()=>{var d,f,p,v;return e[t],!!(((d=i.vnode.props)!=null&&d.hasOwnProperty(t)||(f=i.vnode.props)!=null&&f.hasOwnProperty(a))&&((p=i.vnode.props)!=null&&p.hasOwnProperty(`onUpdate:${t}`)||(v=i.vnode.props)!=null&&v.hasOwnProperty(`onUpdate:${a}`)))}:()=>{var d,f;return e[t],!!((d=i.vnode.props)!=null&&d.hasOwnProperty(t)&&((f=i.vnode.props)!=null&&f.hasOwnProperty(`onUpdate:${t}`)))});Hr(()=>!u.value,()=>{ke(()=>e[t],d=>{o.value=d})});const c=T({get(){const d=e[t];return r(u.value?d:o.value)},set(d){const f=s(d),p=Ne(u.value?e[t]:o.value);p===f||r(p)===d||(o.value=f,i==null||i.emit(`update:${t}`,f))}});return Object.defineProperty(c,"externalValue",{get:()=>u.value?e[t]:o.value}),c}const Cd=ce({modelValue:{type:null,default:void 0},multiple:Boolean,mandatory:[Boolean,String],max:Number,selectedClass:String,disabled:Boolean},"group"),Pd=ce({value:null,disabled:Boolean,selectedClass:String},"group-item");function Td(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const r=on("useGroupItem");if(!r)throw new Error("[Vuetify] useGroupItem composable must be used inside a component setup function");const s=gr();Gt(Symbol.for(`${t.description}:id`),s);const i=Xe(t,null);if(!i){if(!n)return i;throw new Error(`[Vuetify] Could not find useGroup injection with symbol ${t.description}`)}const o=Re(e,"value"),a=T(()=>!!(i.disabled.value||e.disabled));i.register({id:s,value:o,disabled:a},r),Cn(()=>{i.unregister(s)});const l=T(()=>i.isSelected(s)),u=T(()=>i.items.value[0].id===s),c=T(()=>i.items.value[i.items.value.length-1].id===s),d=T(()=>l.value&&[i.selectedClass.value,e.selectedClass]);return ke(l,f=>{r.emit("group:selected",{value:f})},{flush:"sync"}),{id:s,isSelected:l,isFirst:u,isLast:c,toggle:()=>i.select(s,!l.value),select:f=>i.select(s,f),selectedClass:d,value:o,disabled:a,group:i}}function Pu(e,t){let n=!1;const r=gn([]),s=st(e,"modelValue",[],f=>f==null?[]:OP(r,On(f)),f=>{const p=aN(r,f);return e.multiple?p:p[0]}),i=on("useGroup");function o(f,p){const v=f,m=Symbol.for(`${t.description}:id`),b=Cl(m,i==null?void 0:i.vnode).indexOf(p);Z(v.value)==null&&(v.value=b,v.useIndexAsValue=!0),b>-1?r.splice(b,0,v):r.push(v)}function a(f){if(n)return;l();const p=r.findIndex(v=>v.id===f);r.splice(p,1)}function l(){const f=r.find(p=>!p.disabled);f&&e.mandatory==="force"&&!s.value.length&&(s.value=[f.id])}wt(()=>{l()}),Cn(()=>{n=!0}),_b(()=>{for(let f=0;f<r.length;f++)r[f].useIndexAsValue&&(r[f].value=f)});function u(f,p){const v=r.find(m=>m.id===f);if(!(p&&(v!=null&&v.disabled)))if(e.multiple){const m=s.value.slice(),y=m.findIndex(w=>w===f),b=~y;if(p=p??!b,b&&e.mandatory&&m.length<=1||!b&&e.max!=null&&m.length+1>e.max)return;y<0&&p?m.push(f):y>=0&&!p&&m.splice(y,1),s.value=m}else{const m=s.value.includes(f);if(e.mandatory&&m)return;s.value=p??!m?[f]:[]}}function c(f){if(e.multiple,s.value.length){const p=s.value[0],v=r.findIndex(b=>b.id===p);let m=(v+f)%r.length,y=r[m];for(;y.disabled&&m!==v;)m=(m+f)%r.length,y=r[m];if(y.disabled)return;s.value=[r[m].id]}else{const p=r.find(v=>!v.disabled);p&&(s.value=[p.id])}}const d={register:o,unregister:a,selected:s,select:u,disabled:Re(e,"disabled"),prev:()=>c(r.length-1),next:()=>c(1),isSelected:f=>s.value.includes(f),selectedClass:T(()=>e.selectedClass),items:T(()=>r),getItemIndex:f=>oN(r,f)};return Gt(t,d),d}function oN(e,t){const n=OP(e,[t]);return n.length?e.findIndex(r=>r.id===n[0]):-1}function OP(e,t){const n=[];return t.forEach(r=>{const s=e.find(o=>Rs(r,o.value)),i=e[r];(s==null?void 0:s.value)!=null?n.push(s.id):i!=null&&n.push(i.id)}),n}function aN(e,t){const n=[];return t.forEach(r=>{const s=e.findIndex(i=>i.id===r);if(~s){const i=e[s];n.push(i.value!=null?i.value:s)}}),n}const MP=Symbol.for("vuetify:v-btn-toggle"),lN=ce({...AP(),...Cd()},"VBtnToggle"),DP=_e()({name:"VBtnToggle",props:lN(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{isSelected:r,next:s,prev:i,select:o,selected:a}=Pu(e,MP);return Ie(()=>{const l=j_.filterProps(e);return h(j_,me({class:["v-btn-toggle",e.class]},l,{style:e.style}),{default:()=>{var u;return[(u=n.default)==null?void 0:u.call(n,{isSelected:r,next:s,prev:i,select:o,selected:a})]}})}),{next:s,prev:i,select:o}}}),uN=ce({defaults:Object,disabled:Boolean,reset:[Number,String],root:[Boolean,String],scoped:Boolean},"VDefaultsProvider"),Ot=_e(!1)({name:"VDefaultsProvider",props:uN(),setup(e,t){let{slots:n}=t;const{defaults:r,disabled:s,reset:i,root:o,scoped:a}=Wo(e);return Ir(r,{reset:i,root:o,scoped:a,disabled:s}),()=>{var l;return(l=n.default)==null?void 0:l.call(n)}}}),cN={collapse:"mdi-chevron-up",complete:"mdi-check",cancel:"mdi-close-circle",close:"mdi-close",delete:"mdi-close-circle",clear:"mdi-close-circle",success:"mdi-check-circle",info:"mdi-information",warning:"mdi-alert-circle",error:"mdi-close-circle",prev:"mdi-chevron-left",next:"mdi-chevron-right",checkboxOn:"mdi-checkbox-marked",checkboxOff:"mdi-checkbox-blank-outline",checkboxIndeterminate:"mdi-minus-box",delimiter:"mdi-circle",sortAsc:"mdi-arrow-up",sortDesc:"mdi-arrow-down",expand:"mdi-chevron-down",menu:"mdi-menu",subgroup:"mdi-menu-down",dropdown:"mdi-menu-down",radioOn:"mdi-radiobox-marked",radioOff:"mdi-radiobox-blank",edit:"mdi-pencil",ratingEmpty:"mdi-star-outline",ratingFull:"mdi-star",ratingHalf:"mdi-star-half-full",loading:"mdi-cached",first:"mdi-page-first",last:"mdi-page-last",unfold:"mdi-unfold-more-horizontal",file:"mdi-paperclip",plus:"mdi-plus",minus:"mdi-minus",calendar:"mdi-calendar",treeviewCollapse:"mdi-menu-down",treeviewExpand:"mdi-menu-right",eyeDropper:"mdi-eyedropper",upload:"mdi-cloud-upload"},dN={component:e=>pr(FP,{...e,class:"mdi"})},ze=[String,Function,Object,Array],Iv=Symbol.for("vuetify:icons"),Np=ce({icon:{type:ze},tag:{type:String,required:!0}},"icon"),q_=_e()({name:"VComponentIcon",props:Np(),setup(e,t){let{slots:n}=t;return()=>{const r=e.icon;return h(e.tag,null,{default:()=>{var s;return[e.icon?h(r,null,null):(s=n.default)==null?void 0:s.call(n)]}})}}}),$P=Eu({name:"VSvgIcon",inheritAttrs:!1,props:Np(),setup(e,t){let{attrs:n}=t;return()=>h(e.tag,me(n,{style:null}),{default:()=>[h("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(e.icon)?e.icon.map(r=>Array.isArray(r)?h("path",{d:r[0],"fill-opacity":r[1]},null):h("path",{d:r},null)):h("path",{d:e.icon},null)])]})}}),fN=Eu({name:"VLigatureIcon",props:Np(),setup(e){return()=>h(e.tag,null,{default:()=>[e.icon]})}}),FP=Eu({name:"VClassIcon",props:Np(),setup(e){return()=>h(e.tag,{class:e.icon},null)}});function hN(){return{svg:{component:$P},class:{component:FP}}}function pN(e){const t=hN(),n=(e==null?void 0:e.defaultSet)??"mdi";return n==="mdi"&&!t.mdi&&(t.mdi=dN),Jn({defaultSet:n,sets:t,aliases:{...cN,vuetify:["M8.2241 14.2009L12 21L22 3H14.4459L8.2241 14.2009Z",["M7.26303 12.4733L7.00113 12L2 3H12.5261C12.5261 3 12.5261 3 12.5261 3L7.26303 12.4733Z",.6]],"vuetify-outline":"svg:M7.26 12.47 12.53 3H2L7.26 12.47ZM14.45 3 8.22 14.2 12 21 22 3H14.45ZM18.6 5 12 16.88 10.51 14.2 15.62 5ZM7.26 8.35 5.4 5H9.13L7.26 8.35Z","vuetify-play":["m6.376 13.184-4.11-7.192C1.505 4.66 2.467 3 4.003 3h8.532l-.953 1.576-.006.01-.396.677c-.429.732-.214 1.507.194 2.015.404.503 1.092.878 1.869.806a3.72 3.72 0 0 1 1.005.022c.276.053.434.143.523.237.138.146.38.635-.25 2.09-.893 1.63-1.553 1.722-1.847 1.677-.213-.033-.468-.158-.756-.406a4.95 4.95 0 0 1-.8-.927c-.39-.564-1.04-.84-1.66-.846-.625-.006-1.316.27-1.693.921l-.478.826-.911 1.506Z",["M9.093 11.552c.046-.079.144-.15.32-.148a.53.53 0 0 1 .43.207c.285.414.636.847 1.046 1.2.405.35.914.662 1.516.754 1.334.205 2.502-.698 3.48-2.495l.014-.028.013-.03c.687-1.574.774-2.852-.005-3.675-.37-.391-.861-.586-1.333-.676a5.243 5.243 0 0 0-1.447-.044c-.173.016-.393-.073-.54-.257-.145-.18-.127-.316-.082-.392l.393-.672L14.287 3h5.71c1.536 0 2.499 1.659 1.737 2.992l-7.997 13.996c-.768 1.344-2.706 1.344-3.473 0l-3.037-5.314 1.377-2.278.004-.006.004-.007.481-.831Z",.6]]}},e)}const mN=e=>{const t=Xe(Iv);if(!t)throw new Error("Missing Vuetify Icons provide!");return{iconData:T(()=>{var l;const r=Z(e);if(!r)return{component:q_};let s=r;if(typeof s=="string"&&(s=s.trim(),s.startsWith("$")&&(s=(l=t.aliases)==null?void 0:l[s.slice(1)])),Array.isArray(s))return{component:$P,icon:s};if(typeof s!="string")return{component:q_,icon:s};const i=Object.keys(t.sets).find(u=>typeof s=="string"&&s.startsWith(`${u}:`)),o=i?s.slice(i.length+1):s;return{component:t.sets[i??t.defaultSet].component,icon:o}})}},gN=["x-small","small","default","large","x-large"],Tu=ce({size:{type:[String,Number],default:"default"}},"size");function Rd(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:hi();return $b(()=>{let n,r;return Ih(gN,e.size)?n=`${t}--size-${e.size}`:e.size&&(r={width:Le(e.size),height:Le(e.size)}),{sizeClasses:n,sizeStyles:r}})}const vN=ce({color:String,disabled:Boolean,start:Boolean,end:Boolean,icon:ze,...Ve(),...Tu(),...vt({tag:"i"}),...$t()},"VIcon"),Q=_e()({name:"VIcon",props:vN(),setup(e,t){let{attrs:n,slots:r}=t;const s=V(),{themeClasses:i}=Yt(e),{iconData:o}=mN(T(()=>s.value||e.icon)),{sizeClasses:a}=Rd(e),{textColorClasses:l,textColorStyles:u}=As(Re(e,"color"));return Ie(()=>{var f,p;const c=(f=r.default)==null?void 0:f.call(r);c&&(s.value=(p=gP(c).filter(v=>v.type===xd&&v.children&&typeof v.children=="string")[0])==null?void 0:p.children);const d=!!(n.onClick||n.onClickOnce);return h(o.value.component,{tag:e.tag,icon:o.value.icon,class:["v-icon","notranslate",i.value,a.value,l.value,{"v-icon--clickable":d,"v-icon--disabled":e.disabled,"v-icon--start":e.start,"v-icon--end":e.end},e.class],style:[a.value?void 0:{fontSize:Le(e.size),height:Le(e.size),width:Le(e.size)},u.value,e.style],role:d?"button":void 0,"aria-hidden":!d,tabindex:d?e.disabled?-1:0:void 0},{default:()=>[c]})}),{}}});function LP(e,t){const n=V(),r=Ae(!1);if(Ob){const s=new IntersectionObserver(i=>{r.value=!!i.find(o=>o.isIntersecting)},t);Cn(()=>{s.disconnect()}),ke(n,(i,o)=>{o&&(s.unobserve(o),r.value=!1),i&&s.observe(i)},{flush:"post"})}return{intersectionRef:n,isIntersecting:r}}function za(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"content";const n=Cv(),r=V();if(_t){const s=new ResizeObserver(i=>{e==null||e(i,s),i.length&&(t==="content"?r.value=i[0].contentRect:r.value=i[0].target.getBoundingClientRect())});Cn(()=>{s.disconnect()}),ke(()=>n.el,(i,o)=>{o&&(s.unobserve(o),r.value=void 0),i&&s.observe(i)},{flush:"post"})}return{resizeRef:n,contentRect:Sd(r)}}const yN=ce({bgColor:String,color:String,indeterminate:[Boolean,String],modelValue:{type:[Number,String],default:0},rotate:{type:[Number,String],default:0},width:{type:[Number,String],default:4},...Ve(),...Tu(),...vt({tag:"div"}),...$t()},"VProgressCircular"),ri=_e()({name:"VProgressCircular",props:yN(),setup(e,t){let{slots:n}=t;const r=20,s=2*Math.PI*r,i=V(),{themeClasses:o}=Yt(e),{sizeClasses:a,sizeStyles:l}=Rd(e),{textColorClasses:u,textColorStyles:c}=As(Re(e,"color")),{textColorClasses:d,textColorStyles:f}=As(Re(e,"bgColor")),{intersectionRef:p,isIntersecting:v}=LP(),{resizeRef:m,contentRect:y}=za(),b=T(()=>Math.max(0,Math.min(100,parseFloat(e.modelValue)))),w=T(()=>Number(e.width)),x=T(()=>l.value?Number(e.size):y.value?y.value.width:Math.max(w.value,32)),P=T(()=>r/(1-w.value/x.value)*2),S=T(()=>w.value/x.value*P.value),C=T(()=>Le((100-b.value)/100*s));return Mn(()=>{p.value=i.value,m.value=i.value}),Ie(()=>h(e.tag,{ref:i,class:["v-progress-circular",{"v-progress-circular--indeterminate":!!e.indeterminate,"v-progress-circular--visible":v.value,"v-progress-circular--disable-shrink":e.indeterminate==="disable-shrink"},o.value,a.value,u.value,e.class],style:[l.value,c.value,e.style],role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.indeterminate?void 0:b.value},{default:()=>[h("svg",{style:{transform:`rotate(calc(-90deg + ${Number(e.rotate)}deg))`},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${P.value} ${P.value}`},[h("circle",{class:["v-progress-circular__underlay",d.value],style:f.value,fill:"transparent",cx:"50%",cy:"50%",r,"stroke-width":S.value,"stroke-dasharray":s,"stroke-dashoffset":0},null),h("circle",{class:"v-progress-circular__overlay",fill:"transparent",cx:"50%",cy:"50%",r,"stroke-width":S.value,"stroke-dasharray":s,"stroke-dashoffset":C.value},null)]),n.default&&h("div",{class:"v-progress-circular__content"},[n.default({value:b.value})])]})),{}}}),Or=ce({height:[Number,String],maxHeight:[Number,String],maxWidth:[Number,String],minHeight:[Number,String],minWidth:[Number,String],width:[Number,String]},"dimension");function Mr(e){return{dimensionStyles:T(()=>{const n={},r=Le(e.height),s=Le(e.maxHeight),i=Le(e.maxWidth),o=Le(e.minHeight),a=Le(e.minWidth),l=Le(e.width);return r!=null&&(n.height=r),s!=null&&(n.maxHeight=s),i!=null&&(n.maxWidth=i),o!=null&&(n.minHeight=o),a!=null&&(n.minWidth=a),l!=null&&(n.width=l),n})}}const bN={badge:"Badge",open:"Open",close:"Close",dismiss:"Dismiss",confirmEdit:{ok:"OK",cancel:"Cancel"},dataIterator:{noResultsText:"No matching records found",loadingText:"Loading items..."},dataTable:{itemsPerPageText:"Rows per page:",ariaLabel:{sortDescending:"Sorted descending.",sortAscending:"Sorted ascending.",sortNone:"Not sorted.",activateNone:"Activate to remove sorting.",activateDescending:"Activate to sort descending.",activateAscending:"Activate to sort ascending."},sortBy:"Sort by"},dataFooter:{itemsPerPageText:"Items per page:",itemsPerPageAll:"All",nextPage:"Next page",prevPage:"Previous page",firstPage:"First page",lastPage:"Last page",pageText:"{0}-{1} of {2}"},dateRangeInput:{divider:"to"},datePicker:{itemsSelected:"{0} selected",range:{title:"Select dates",header:"Enter dates"},title:"Select date",header:"Enter date",input:{placeholder:"Enter date"}},noDataText:"No data available",carousel:{prev:"Previous visual",next:"Next visual",ariaLabel:{delimiter:"Carousel slide {0} of {1}"}},calendar:{moreEvents:"{0} more",today:"Today"},input:{clear:"Clear {0}",prependAction:"{0} prepended action",appendAction:"{0} appended action",otp:"Please enter OTP character {0}"},fileInput:{counter:"{0} files",counterSize:"{0} files ({1} in total)"},fileUpload:{title:"Drag and drop files here",divider:"or",browse:"Browse Files"},timePicker:{am:"AM",pm:"PM",title:"Select Time"},pagination:{ariaLabel:{root:"Pagination Navigation",next:"Next page",previous:"Previous page",page:"Go to page {0}",currentPage:"Page {0}, Current page",first:"First page",last:"Last page"}},stepper:{next:"Next",prev:"Previous"},rating:{ariaLabel:{item:"Rating {0} of {1}"}},loading:"Loading...",infiniteScroll:{loadMore:"Load more",empty:"No more"}},W_="$vuetify.",G_=(e,t)=>e.replace(/\{(\d+)\}/g,(n,r)=>String(t[Number(r)])),NP=(e,t,n)=>function(r){for(var s=arguments.length,i=new Array(s>1?s-1:0),o=1;o<s;o++)i[o-1]=arguments[o];if(!r.startsWith(W_))return G_(r,i);const a=r.replace(W_,""),l=e.value&&n.value[e.value],u=t.value&&n.value[t.value];let c=Ua(l,a,null);return c||(`${r}${e.value}`,c=Ua(u,a,null)),c||(c=r),typeof c!="string"&&(c=r),G_(c,i)};function BP(e,t){return(n,r)=>new Intl.NumberFormat([e.value,t.value],r).format(n)}function sg(e,t,n){const r=st(e,t,e[t]??n.value);return r.value=e[t]??n.value,ke(n,s=>{e[t]==null&&(r.value=n.value)}),r}function VP(e){return t=>{const n=sg(t,"locale",e.current),r=sg(t,"fallback",e.fallback),s=sg(t,"messages",e.messages);return{name:"vuetify",current:n,fallback:r,messages:s,t:NP(n,r,s),n:BP(n,r),provide:VP({current:n,fallback:r,messages:s})}}}function wN(e){const t=Ae((e==null?void 0:e.locale)??"en"),n=Ae((e==null?void 0:e.fallback)??"en"),r=V({en:bN,...e==null?void 0:e.messages});return{name:"vuetify",current:t,fallback:n,messages:r,t:NP(t,n,r),n:BP(t,n),provide:VP({current:t,fallback:n,messages:r})}}const $h=Symbol.for("vuetify:locale");function SN(e){return e.name!=null}function _N(e){const t=e!=null&&e.adapter&&SN(e==null?void 0:e.adapter)?e==null?void 0:e.adapter:wN(e),n=xN(t,e);return{...t,...n}}function Kr(){const e=Xe($h);if(!e)throw new Error("[Vuetify] Could not find injected locale instance");return e}function kN(){return{af:!1,ar:!0,bg:!1,ca:!1,ckb:!1,cs:!1,de:!1,el:!1,en:!1,es:!1,et:!1,fa:!0,fi:!1,fr:!1,hr:!1,hu:!1,he:!0,id:!1,it:!1,ja:!1,km:!1,ko:!1,lv:!1,lt:!1,nl:!1,no:!1,pl:!1,pt:!1,ro:!1,ru:!1,sk:!1,sl:!1,srCyrl:!1,srLatn:!1,sv:!1,th:!1,tr:!1,az:!1,uk:!1,vi:!1,zhHans:!1,zhHant:!1}}function xN(e,t){const n=V((t==null?void 0:t.rtl)??kN()),r=T(()=>n.value[e.current.value]??!1);return{isRtl:r,rtl:n,rtlClasses:T(()=>`v-locale--is-${r.value?"rtl":"ltr"}`)}}function Dr(){const e=Xe($h);if(!e)throw new Error("[Vuetify] Could not find injected rtl instance");return{isRtl:e.isRtl,rtlClasses:e.rtlClasses}}const K_={center:"center",top:"bottom",bottom:"top",left:"right",right:"left"},Ko=ce({location:String},"location");function nl(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2?arguments[2]:void 0;const{isRtl:r}=Dr();return{locationStyles:T(()=>{if(!e.location)return{};const{side:i,align:o}=Pv(e.location.split(" ").length>1?e.location:`${e.location} center`,r.value);function a(u){return n?n(u):0}const l={};return i!=="center"&&(t?l[K_[i]]=`calc(100% - ${a(i)}px)`:l[i]=0),o!=="center"?t?l[K_[o]]=`calc(100% - ${a(o)}px)`:l[o]=0:(i==="center"?l.top=l.left="50%":l[{top:"left",bottom:"left",left:"top",right:"top"}[i]]="50%",l.transform={top:"translateX(-50%)",bottom:"translateX(-50%)",left:"translateY(-50%)",right:"translateY(-50%)",center:"translate(-50%, -50%)"}[i]),l})}}const EN=ce({absolute:Boolean,active:{type:Boolean,default:!0},bgColor:String,bgOpacity:[Number,String],bufferValue:{type:[Number,String],default:0},bufferColor:String,bufferOpacity:[Number,String],clickable:Boolean,color:String,height:{type:[Number,String],default:4},indeterminate:Boolean,max:{type:[Number,String],default:100},modelValue:{type:[Number,String],default:0},opacity:[Number,String],reverse:Boolean,stream:Boolean,striped:Boolean,roundedBar:Boolean,...Ve(),...Ko({location:"top"}),...$n(),...vt(),...$t()},"VProgressLinear"),ou=_e()({name:"VProgressLinear",props:EN(),emits:{"update:modelValue":e=>!0},setup(e,t){var A;let{slots:n}=t;const r=st(e,"modelValue"),{isRtl:s,rtlClasses:i}=Dr(),{themeClasses:o}=Yt(e),{locationStyles:a}=nl(e),{textColorClasses:l,textColorStyles:u}=As(e,"color"),{backgroundColorClasses:c,backgroundColorStyles:d}=fr(T(()=>e.bgColor||e.color)),{backgroundColorClasses:f,backgroundColorStyles:p}=fr(T(()=>e.bufferColor||e.bgColor||e.color)),{backgroundColorClasses:v,backgroundColorStyles:m}=fr(e,"color"),{roundedClasses:y}=Vn(e),{intersectionRef:b,isIntersecting:w}=LP(),x=T(()=>parseFloat(e.max)),P=T(()=>parseFloat(e.height)),S=T(()=>Pr(parseFloat(e.bufferValue)/x.value*100,0,100)),C=T(()=>Pr(parseFloat(r.value)/x.value*100,0,100)),R=T(()=>s.value!==e.reverse),k=T(()=>e.indeterminate?"fade-transition":"slide-x-transition"),E=_t&&((A=window.matchMedia)==null?void 0:A.call(window,"(forced-colors: active)").matches);function I(O){if(!b.value)return;const{left:L,right:M,width:z}=b.value.getBoundingClientRect(),H=R.value?z-O.clientX+(M-z):O.clientX-L;r.value=Math.round(H/z*x.value)}return Ie(()=>h(e.tag,{ref:b,class:["v-progress-linear",{"v-progress-linear--absolute":e.absolute,"v-progress-linear--active":e.active&&w.value,"v-progress-linear--reverse":R.value,"v-progress-linear--rounded":e.rounded,"v-progress-linear--rounded-bar":e.roundedBar,"v-progress-linear--striped":e.striped},y.value,o.value,i.value,e.class],style:[{bottom:e.location==="bottom"?0:void 0,top:e.location==="top"?0:void 0,height:e.active?Le(P.value):0,"--v-progress-linear-height":Le(P.value),...e.absolute?a.value:{}},e.style],role:"progressbar","aria-hidden":e.active?"false":"true","aria-valuemin":"0","aria-valuemax":e.max,"aria-valuenow":e.indeterminate?void 0:Math.min(parseFloat(r.value),x.value),onClick:e.clickable&&I},{default:()=>[e.stream&&h("div",{key:"stream",class:["v-progress-linear__stream",l.value],style:{...u.value,[R.value?"left":"right"]:Le(-P.value),borderTop:`${Le(P.value/2)} dotted`,opacity:parseFloat(e.bufferOpacity),top:`calc(50% - ${Le(P.value/4)})`,width:Le(100-S.value,"%"),"--v-progress-linear-stream-to":Le(P.value*(R.value?1:-1))}},null),h("div",{class:["v-progress-linear__background",E?void 0:c.value],style:[d.value,{opacity:parseFloat(e.bgOpacity),width:e.stream?0:void 0}]},null),h("div",{class:["v-progress-linear__buffer",E?void 0:f.value],style:[p.value,{opacity:parseFloat(e.bufferOpacity),width:Le(S.value,"%")}]},null),h(Fo,{name:k.value},{default:()=>[e.indeterminate?h("div",{class:"v-progress-linear__indeterminate"},[["long","short"].map(O=>h("div",{key:O,class:["v-progress-linear__indeterminate",O,E?void 0:v.value],style:m.value},null))]):h("div",{class:["v-progress-linear__determinate",E?void 0:v.value],style:[m.value,{width:Le(C.value,"%")}]},null)]}),n.default&&h("div",{class:"v-progress-linear__content"},[n.default({value:C.value,buffer:S.value})])]})),{}}}),Bp=ce({loading:[Boolean,String]},"loader");function Id(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:hi();return{loaderClasses:T(()=>({[`${t}--loading`]:e.loading}))}}function Vp(e,t){var r;let{slots:n}=t;return h("div",{class:`${e.name}__loader`},[((r=n.default)==null?void 0:r.call(n,{color:e.color,isActive:e.active}))||h(ou,{absolute:e.absolute,active:e.active,color:e.color,height:"2",indeterminate:!0},null)])}const CN=["static","relative","fixed","absolute","sticky"],Ru=ce({position:{type:String,validator:e=>CN.includes(e)}},"position");function Iu(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:hi();return{positionClasses:T(()=>e.position?`${t}--${e.position}`:void 0)}}function PN(){const e=on("useRoute");return T(()=>{var t;return(t=e==null?void 0:e.proxy)==null?void 0:t.$route})}function UP(){var e,t;return(t=(e=on("useRouter"))==null?void 0:e.proxy)==null?void 0:t.$router}function Up(e,t){var d,f;const n=I$("RouterLink"),r=T(()=>!!(e.href||e.to)),s=T(()=>(r==null?void 0:r.value)||C_(t,"click")||C_(e,"click"));if(typeof n=="string"||!("useLink"in n)){const p=Re(e,"href");return{isLink:r,isClickable:s,href:p,linkProps:gn({href:p})}}const i=T(()=>({...e,to:Re(()=>e.to||"")})),o=n.useLink(i.value),a=T(()=>e.to?o:void 0),l=PN(),u=T(()=>{var p,v,m;return a.value?e.exact?l.value?((m=a.value.isExactActive)==null?void 0:m.value)&&Rs(a.value.route.value.query,l.value.query):((v=a.value.isExactActive)==null?void 0:v.value)??!1:((p=a.value.isActive)==null?void 0:p.value)??!1:!1}),c=T(()=>{var p;return e.to?(p=a.value)==null?void 0:p.route.value.href:e.href});return{isLink:r,isClickable:s,isActive:u,route:(d=a.value)==null?void 0:d.route,navigate:(f=a.value)==null?void 0:f.navigate,href:c,linkProps:gn({href:c,"aria-current":T(()=>u.value?"page":void 0)})}}const zp=ce({href:String,replace:Boolean,to:[String,Object],exact:Boolean},"router");let ig=!1;function TN(e,t){let n=!1,r,s;_t&&(e!=null&&e.beforeEach)&&(Mt(()=>{window.addEventListener("popstate",i),r=e.beforeEach((o,a,l)=>{ig?n?t(l):l():setTimeout(()=>n?t(l):l()),ig=!0}),s=e==null?void 0:e.afterEach(()=>{ig=!1})}),Sn(()=>{window.removeEventListener("popstate",i),r==null||r(),s==null||s()}));function i(o){var a;(a=o.state)!=null&&a.replaced||(n=!0,setTimeout(()=>n=!1))}}function RN(e,t){ke(()=>{var n;return(n=e.isActive)==null?void 0:n.value},n=>{e.isLink.value&&n&&t&&Mt(()=>{t(!0)})},{immediate:!0})}const Av=Symbol("rippleStop"),IN=80;function Y_(e,t){e.style.transform=t,e.style.webkitTransform=t}function Ov(e){return e.constructor.name==="TouchEvent"}function zP(e){return e.constructor.name==="KeyboardEvent"}const AN=function(e,t){var d;let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=0,s=0;if(!zP(e)){const f=t.getBoundingClientRect(),p=Ov(e)?e.touches[e.touches.length-1]:e;r=p.clientX-f.left,s=p.clientY-f.top}let i=0,o=.3;(d=t._ripple)!=null&&d.circle?(o=.15,i=t.clientWidth/2,i=n.center?i:i+Math.sqrt((r-i)**2+(s-i)**2)/4):i=Math.sqrt(t.clientWidth**2+t.clientHeight**2)/2;const a=`${(t.clientWidth-i*2)/2}px`,l=`${(t.clientHeight-i*2)/2}px`,u=n.center?a:`${r-i}px`,c=n.center?l:`${s-i}px`;return{radius:i,scale:o,x:u,y:c,centerX:a,centerY:l}},Fh={show(e,t){var p;let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!((p=t==null?void 0:t._ripple)!=null&&p.enabled))return;const r=document.createElement("span"),s=document.createElement("span");r.appendChild(s),r.className="v-ripple__container",n.class&&(r.className+=` ${n.class}`);const{radius:i,scale:o,x:a,y:l,centerX:u,centerY:c}=AN(e,t,n),d=`${i*2}px`;s.className="v-ripple__animation",s.style.width=d,s.style.height=d,t.appendChild(r);const f=window.getComputedStyle(t);f&&f.position==="static"&&(t.style.position="relative",t.dataset.previousPosition="static"),s.classList.add("v-ripple__animation--enter"),s.classList.add("v-ripple__animation--visible"),Y_(s,`translate(${a}, ${l}) scale3d(${o},${o},${o})`),s.dataset.activated=String(performance.now()),requestAnimationFrame(()=>{requestAnimationFrame(()=>{s.classList.remove("v-ripple__animation--enter"),s.classList.add("v-ripple__animation--in"),Y_(s,`translate(${u}, ${c}) scale3d(1,1,1)`)})})},hide(e){var i;if(!((i=e==null?void 0:e._ripple)!=null&&i.enabled))return;const t=e.getElementsByClassName("v-ripple__animation");if(t.length===0)return;const n=t[t.length-1];if(n.dataset.isHiding)return;n.dataset.isHiding="true";const r=performance.now()-Number(n.dataset.activated),s=Math.max(250-r,0);setTimeout(()=>{n.classList.remove("v-ripple__animation--in"),n.classList.add("v-ripple__animation--out"),setTimeout(()=>{var a;e.getElementsByClassName("v-ripple__animation").length===1&&e.dataset.previousPosition&&(e.style.position=e.dataset.previousPosition,delete e.dataset.previousPosition),((a=n.parentNode)==null?void 0:a.parentNode)===e&&e.removeChild(n.parentNode)},300)},s)}};function HP(e){return typeof e>"u"||!!e}function Xc(e){const t={},n=e.currentTarget;if(!(!(n!=null&&n._ripple)||n._ripple.touched||e[Av])){if(e[Av]=!0,Ov(e))n._ripple.touched=!0,n._ripple.isTouch=!0;else if(n._ripple.isTouch)return;if(t.center=n._ripple.centered||zP(e),n._ripple.class&&(t.class=n._ripple.class),Ov(e)){if(n._ripple.showTimerCommit)return;n._ripple.showTimerCommit=()=>{Fh.show(e,n,t)},n._ripple.showTimer=window.setTimeout(()=>{var r;(r=n==null?void 0:n._ripple)!=null&&r.showTimerCommit&&(n._ripple.showTimerCommit(),n._ripple.showTimerCommit=null)},IN)}else Fh.show(e,n,t)}}function X_(e){e[Av]=!0}function Vr(e){const t=e.currentTarget;if(t!=null&&t._ripple){if(window.clearTimeout(t._ripple.showTimer),e.type==="touchend"&&t._ripple.showTimerCommit){t._ripple.showTimerCommit(),t._ripple.showTimerCommit=null,t._ripple.showTimer=window.setTimeout(()=>{Vr(e)});return}window.setTimeout(()=>{t._ripple&&(t._ripple.touched=!1)}),Fh.hide(t)}}function jP(e){const t=e.currentTarget;t!=null&&t._ripple&&(t._ripple.showTimerCommit&&(t._ripple.showTimerCommit=null),window.clearTimeout(t._ripple.showTimer))}let Qc=!1;function qP(e){!Qc&&(e.keyCode===S_.enter||e.keyCode===S_.space)&&(Qc=!0,Xc(e))}function WP(e){Qc=!1,Vr(e)}function GP(e){Qc&&(Qc=!1,Vr(e))}function KP(e,t,n){const{value:r,modifiers:s}=t,i=HP(r);if(i||Fh.hide(e),e._ripple=e._ripple??{},e._ripple.enabled=i,e._ripple.centered=s.center,e._ripple.circle=s.circle,Mb(r)&&r.class&&(e._ripple.class=r.class),i&&!n){if(s.stop){e.addEventListener("touchstart",X_,{passive:!0}),e.addEventListener("mousedown",X_);return}e.addEventListener("touchstart",Xc,{passive:!0}),e.addEventListener("touchend",Vr,{passive:!0}),e.addEventListener("touchmove",jP,{passive:!0}),e.addEventListener("touchcancel",Vr),e.addEventListener("mousedown",Xc),e.addEventListener("mouseup",Vr),e.addEventListener("mouseleave",Vr),e.addEventListener("keydown",qP),e.addEventListener("keyup",WP),e.addEventListener("blur",GP),e.addEventListener("dragstart",Vr,{passive:!0})}else!i&&n&&YP(e)}function YP(e){e.removeEventListener("mousedown",Xc),e.removeEventListener("touchstart",Xc),e.removeEventListener("touchend",Vr),e.removeEventListener("touchmove",jP),e.removeEventListener("touchcancel",Vr),e.removeEventListener("mouseup",Vr),e.removeEventListener("mouseleave",Vr),e.removeEventListener("keydown",qP),e.removeEventListener("keyup",WP),e.removeEventListener("dragstart",Vr),e.removeEventListener("blur",GP)}function ON(e,t){KP(e,t,!1)}function MN(e){delete e._ripple,YP(e)}function DN(e,t){if(t.value===t.oldValue)return;const n=HP(t.oldValue);KP(e,t,n)}const Au={mounted:ON,unmounted:MN,updated:DN},XP=ce({active:{type:Boolean,default:void 0},activeColor:String,baseColor:String,symbol:{type:null,default:MP},flat:Boolean,icon:[Boolean,String,Function,Object],prependIcon:ze,appendIcon:ze,block:Boolean,readonly:Boolean,slim:Boolean,stacked:Boolean,ripple:{type:[Boolean,Object],default:!0},text:{type:[String,Number,Boolean],default:void 0},...ms(),...Ve(),...Ar(),...Or(),...vs(),...Pd(),...Bp(),...Ko(),...Ru(),...$n(),...zp(),...Tu(),...vt({tag:"button"}),...$t(),...Fs({variant:"elevated"})},"VBtn"),se=_e()({name:"VBtn",props:XP(),emits:{"group:selected":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const{themeClasses:s}=Yt(e),{borderClasses:i}=Ds(e),{densityClasses:o}=gs(e),{dimensionStyles:a}=Mr(e),{elevationClasses:l}=$s(e),{loaderClasses:u}=Id(e),{locationStyles:c}=nl(e),{positionClasses:d}=Iu(e),{roundedClasses:f}=Vn(e),{sizeClasses:p,sizeStyles:v}=Rd(e),m=Td(e,e.symbol,!1),y=Up(e,n),b=T(()=>{var A;return e.active!==void 0?e.active:y.isLink.value?(A=y.isActive)==null?void 0:A.value:m==null?void 0:m.isSelected.value}),w=T(()=>b.value?e.activeColor??e.color:e.color),x=T(()=>{var O,L;return{color:(m==null?void 0:m.isSelected.value)&&(!y.isLink.value||((O=y.isActive)==null?void 0:O.value))||!m||((L=y.isActive)==null?void 0:L.value)?w.value??e.baseColor:e.baseColor,variant:e.variant}}),{colorClasses:P,colorStyles:S,variantClasses:C}=tl(x),R=T(()=>(m==null?void 0:m.disabled.value)||e.disabled),k=T(()=>e.variant==="elevated"&&!(e.disabled||e.flat||e.border)),E=T(()=>{if(!(e.value===void 0||typeof e.value=="symbol"))return Object(e.value)===e.value?JSON.stringify(e.value,null,0):e.value});function I(A){var O;R.value||y.isLink.value&&(A.metaKey||A.ctrlKey||A.shiftKey||A.button!==0||n.target==="_blank")||((O=y.navigate)==null||O.call(y,A),m==null||m.toggle())}return RN(y,m==null?void 0:m.select),Ie(()=>{const A=y.isLink.value?"a":e.tag,O=!!(e.prependIcon||r.prepend),L=!!(e.appendIcon||r.append),M=!!(e.icon&&e.icon!==!0);return Bt(h(A,me({type:A==="a"?void 0:"button",class:["v-btn",m==null?void 0:m.selectedClass.value,{"v-btn--active":b.value,"v-btn--block":e.block,"v-btn--disabled":R.value,"v-btn--elevated":k.value,"v-btn--flat":e.flat,"v-btn--icon":!!e.icon,"v-btn--loading":e.loading,"v-btn--readonly":e.readonly,"v-btn--slim":e.slim,"v-btn--stacked":e.stacked},s.value,i.value,P.value,o.value,l.value,u.value,d.value,f.value,p.value,C.value,e.class],style:[S.value,a.value,c.value,v.value,e.style],"aria-busy":e.loading?!0:void 0,disabled:R.value||void 0,tabindex:e.loading||e.readonly?-1:void 0,onClick:I,value:E.value},y.linkProps),{default:()=>{var z;return[Go(!0,"v-btn"),!e.icon&&O&&h("span",{key:"prepend",class:"v-btn__prepend"},[r.prepend?h(Ot,{key:"prepend-defaults",disabled:!e.prependIcon,defaults:{VIcon:{icon:e.prependIcon}}},r.prepend):h(Q,{key:"prepend-icon",icon:e.prependIcon},null)]),h("span",{class:"v-btn__content","data-no-activator":""},[!r.default&&M?h(Q,{key:"content-icon",icon:e.icon},null):h(Ot,{key:"content-defaults",disabled:!M,defaults:{VIcon:{icon:e.icon}}},{default:()=>{var H;return[((H=r.default)==null?void 0:H.call(r))??re(e.text)]}})]),!e.icon&&L&&h("span",{key:"append",class:"v-btn__append"},[r.append?h(Ot,{key:"append-defaults",disabled:!e.appendIcon,defaults:{VIcon:{icon:e.appendIcon}}},r.append):h(Q,{key:"append-icon",icon:e.appendIcon},null)]),!!e.loading&&h("span",{key:"loader",class:"v-btn__loader"},[((z=r.loader)==null?void 0:z.call(r))??h(ri,{color:typeof e.loading=="boolean"?void 0:e.loading,indeterminate:!0,width:"2"},null)])]}}),[[Au,!R.value&&e.ripple,"",{center:!!e.icon}]])}),{group:m}}}),$N=ce({disabled:Boolean,group:Boolean,hideOnLeave:Boolean,leaveAbsolute:Boolean,mode:String,origin:String},"transition");function Yr(e,t,n){return _e()({name:e,props:$N({mode:n,origin:t}),setup(r,s){let{slots:i}=s;const o={onBeforeEnter(a){r.origin&&(a.style.transformOrigin=r.origin)},onLeave(a){if(r.leaveAbsolute){const{offsetTop:l,offsetLeft:u,offsetWidth:c,offsetHeight:d}=a;a._transitionInitialStyles={position:a.style.position,top:a.style.top,left:a.style.left,width:a.style.width,height:a.style.height},a.style.position="absolute",a.style.top=`${l}px`,a.style.left=`${u}px`,a.style.width=`${c}px`,a.style.height=`${d}px`}r.hideOnLeave&&a.style.setProperty("display","none","important")},onAfterLeave(a){if(r.leaveAbsolute&&(a!=null&&a._transitionInitialStyles)){const{position:l,top:u,left:c,width:d,height:f}=a._transitionInitialStyles;delete a._transitionInitialStyles,a.style.position=l||"",a.style.top=u||"",a.style.left=c||"",a.style.width=d||"",a.style.height=f||""}}};return()=>{const a=r.group?Ab:Fo;return pr(a,{name:r.disabled?"":e,css:!r.disabled,...r.group?void 0:{mode:r.mode},...r.disabled?{}:o},i.default)}}})}function QP(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"in-out";return _e()({name:e,props:{mode:{type:String,default:n},disabled:Boolean,group:Boolean},setup(r,s){let{slots:i}=s;const o=r.group?Ab:Fo;return()=>pr(o,{name:r.disabled?"":e,css:!r.disabled,...r.disabled?{}:t},i.default)}})}function JP(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";const n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1)?"width":"height",r=Rr(`offset-${n}`);return{onBeforeEnter(o){o._parent=o.parentNode,o._initialStyle={transition:o.style.transition,overflow:o.style.overflow,[n]:o.style[n]}},onEnter(o){const a=o._initialStyle;if(!a)return;o.style.setProperty("transition","none","important"),o.style.overflow="hidden";const l=`${o[r]}px`;o.style[n]="0",o.offsetHeight,o.style.transition=a.transition,e&&o._parent&&o._parent.classList.add(e),requestAnimationFrame(()=>{o.style[n]=l})},onAfterEnter:i,onEnterCancelled:i,onLeave(o){o._initialStyle={transition:"",overflow:o.style.overflow,[n]:o.style[n]},o.style.overflow="hidden",o.style[n]=`${o[r]}px`,o.offsetHeight,requestAnimationFrame(()=>o.style[n]="0")},onAfterLeave:s,onLeaveCancelled:s};function s(o){e&&o._parent&&o._parent.classList.remove(e),i(o)}function i(o){if(!o._initialStyle)return;const a=o._initialStyle[n];o.style.overflow=o._initialStyle.overflow,a!=null&&(o.style[n]=a),delete o._initialStyle}}const FN=ce({target:[Object,Array]},"v-dialog-transition"),Ub=_e()({name:"VDialogTransition",props:FN(),setup(e,t){let{slots:n}=t;const r={onBeforeEnter(s){s.style.pointerEvents="none",s.style.visibility="hidden"},async onEnter(s,i){var f;await new Promise(p=>requestAnimationFrame(p)),await new Promise(p=>requestAnimationFrame(p)),s.style.visibility="";const{x:o,y:a,sx:l,sy:u,speed:c}=J_(e.target,s),d=Pl(s,[{transform:`translate(${o}px, ${a}px) scale(${l}, ${u})`,opacity:0},{}],{duration:225*c,easing:QL});(f=Q_(s))==null||f.forEach(p=>{Pl(p,[{opacity:0},{opacity:0,offset:.33},{}],{duration:225*2*c,easing:Mh})}),d.finished.then(()=>i())},onAfterEnter(s){s.style.removeProperty("pointer-events")},onBeforeLeave(s){s.style.pointerEvents="none"},async onLeave(s,i){var f;await new Promise(p=>requestAnimationFrame(p));const{x:o,y:a,sx:l,sy:u,speed:c}=J_(e.target,s);Pl(s,[{},{transform:`translate(${o}px, ${a}px) scale(${l}, ${u})`,opacity:0}],{duration:125*c,easing:JL}).finished.then(()=>i()),(f=Q_(s))==null||f.forEach(p=>{Pl(p,[{},{opacity:0,offset:.2},{opacity:0}],{duration:125*2*c,easing:Mh})})},onAfterLeave(s){s.style.removeProperty("pointer-events")}};return()=>e.target?h(Fo,me({name:"dialog-transition"},r,{css:!1}),n):h(Fo,{name:"dialog-transition"},n)}});function Q_(e){var n;const t=(n=e.querySelector(":scope > .v-card, :scope > .v-sheet, :scope > .v-list"))==null?void 0:n.children;return t&&[...t]}function J_(e,t){const n=_P(e),r=Fb(t),[s,i]=getComputedStyle(t).transformOrigin.split(" ").map(b=>parseFloat(b)),[o,a]=getComputedStyle(t).getPropertyValue("--v-overlay-anchor-origin").split(" ");let l=n.left+n.width/2;o==="left"||a==="left"?l-=n.width/2:(o==="right"||a==="right")&&(l+=n.width/2);let u=n.top+n.height/2;o==="top"||a==="top"?u-=n.height/2:(o==="bottom"||a==="bottom")&&(u+=n.height/2);const c=n.width/r.width,d=n.height/r.height,f=Math.max(1,c,d),p=c/f||0,v=d/f||0,m=r.width*r.height/(window.innerWidth*window.innerHeight),y=m>.12?Math.min(1.5,(m-.12)*10+1):1;return{x:l-(s+r.left),y:u-(i+r.top),sx:p,sy:v,speed:y}}Yr("fab-transition","center center","out-in");Yr("dialog-bottom-transition");Yr("dialog-top-transition");const Z_=Yr("fade-transition"),LN=Yr("scale-transition");Yr("scroll-x-transition");Yr("scroll-x-reverse-transition");const NN=Yr("scroll-y-transition");Yr("scroll-y-reverse-transition");Yr("slide-x-transition");Yr("slide-x-reverse-transition");const ZP=Yr("slide-y-transition");Yr("slide-y-reverse-transition");const eT=QP("expand-transition",JP()),tT=QP("expand-x-transition",JP("",!0));function og(e,t){return{x:e.x+t.x,y:e.y+t.y}}function BN(e,t){return{x:e.x-t.x,y:e.y-t.y}}function e0(e,t){if(e.side==="top"||e.side==="bottom"){const{side:n,align:r}=e,s=r==="left"?0:r==="center"?t.width/2:r==="right"?t.width:r,i=n==="top"?0:n==="bottom"?t.height:n;return og({x:s,y:i},t)}else if(e.side==="left"||e.side==="right"){const{side:n,align:r}=e,s=n==="left"?0:n==="right"?t.width:n,i=r==="top"?0:r==="center"?t.height/2:r==="bottom"?t.height:r;return og({x:s,y:i},t)}return og({x:t.width/2,y:t.height/2},t)}const nT={static:zN,connected:jN},VN=ce({locationStrategy:{type:[String,Function],default:"static",validator:e=>typeof e=="function"||e in nT},location:{type:String,default:"bottom"},origin:{type:String,default:"auto"},offset:[Number,String,Array]},"VOverlay-location-strategies");function UN(e,t){const n=V({}),r=V();_t&&Hr(()=>!!(t.isActive.value&&e.locationStrategy),i=>{var o,a;ke(()=>e.locationStrategy,i),Sn(()=>{window.removeEventListener("resize",s),r.value=void 0}),window.addEventListener("resize",s,{passive:!0}),typeof e.locationStrategy=="function"?r.value=(o=e.locationStrategy(t,e,n))==null?void 0:o.updateLocation:r.value=(a=nT[e.locationStrategy](t,e,n))==null?void 0:a.updateLocation});function s(i){var o;(o=r.value)==null||o.call(r,i)}return{contentStyles:n,updateLocation:r}}function zN(){}function HN(e,t){const n=Fb(e);return t?n.x+=parseFloat(e.style.right||0):n.x-=parseFloat(e.style.left||0),n.y-=parseFloat(e.style.top||0),n}function jN(e,t,n){(Array.isArray(e.target.value)||eN(e.target.value))&&Object.assign(n.value,{position:"fixed",top:0,[e.isRtl.value?"right":"left"]:0});const{preferredAnchor:s,preferredOrigin:i}=$b(()=>{const v=Pv(t.location,e.isRtl.value),m=t.origin==="overlap"?v:t.origin==="auto"?ng(v):Pv(t.origin,e.isRtl.value);return v.side===m.side&&v.align===rg(m).align?{preferredAnchor:T_(v),preferredOrigin:T_(m)}:{preferredAnchor:v,preferredOrigin:m}}),[o,a,l,u]=["minWidth","minHeight","maxWidth","maxHeight"].map(v=>T(()=>{const m=parseFloat(t[v]);return isNaN(m)?1/0:m})),c=T(()=>{if(Array.isArray(t.offset))return t.offset;if(typeof t.offset=="string"){const v=t.offset.split(" ").map(parseFloat);return v.length<2&&v.push(0),v}return typeof t.offset=="number"?[t.offset,0]:[0,0]});let d=!1;const f=new ResizeObserver(()=>{d&&p()});ke([e.target,e.contentEl],(v,m)=>{let[y,b]=v,[w,x]=m;w&&!Array.isArray(w)&&f.unobserve(w),y&&!Array.isArray(y)&&f.observe(y),x&&f.unobserve(x),b&&f.observe(b)},{immediate:!0}),Sn(()=>{f.disconnect()});function p(){if(d=!1,requestAnimationFrame(()=>d=!0),!e.target.value||!e.contentEl.value)return;const v=_P(e.target.value),m=HN(e.contentEl.value,e.isRtl.value),y=Dh(e.contentEl.value),b=12;y.length||(y.push(document.documentElement),e.contentEl.value.style.top&&e.contentEl.value.style.left||(m.x-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-x")||0),m.y-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-y")||0)));const w=y.reduce((A,O)=>{const L=O.getBoundingClientRect(),M=new Aa({x:O===document.documentElement?0:L.x,y:O===document.documentElement?0:L.y,width:O.clientWidth,height:O.clientHeight});return A?new Aa({x:Math.max(A.left,M.left),y:Math.max(A.top,M.top),width:Math.min(A.right,M.right)-Math.max(A.left,M.left),height:Math.min(A.bottom,M.bottom)-Math.max(A.top,M.top)}):M},void 0);w.x+=b,w.y+=b,w.width-=b*2,w.height-=b*2;let x={anchor:s.value,origin:i.value};function P(A){const O=new Aa(m),L=e0(A.anchor,v),M=e0(A.origin,O);let{x:z,y:H}=BN(L,M);switch(A.anchor.side){case"top":H-=c.value[0];break;case"bottom":H+=c.value[0];break;case"left":z-=c.value[0];break;case"right":z+=c.value[0];break}switch(A.anchor.align){case"top":H-=c.value[1];break;case"bottom":H+=c.value[1];break;case"left":z-=c.value[1];break;case"right":z+=c.value[1];break}return O.x+=z,O.y+=H,O.width=Math.min(O.width,l.value),O.height=Math.min(O.height,u.value),{overflows:I_(O,w),x:z,y:H}}let S=0,C=0;const R={x:0,y:0},k={x:!1,y:!1};let E=-1;for(;!(E++>10);){const{x:A,y:O,overflows:L}=P(x);S+=A,C+=O,m.x+=A,m.y+=O;{const M=R_(x.anchor),z=L.x.before||L.x.after,H=L.y.before||L.y.after;let G=!1;if(["x","y"].forEach(W=>{if(W==="x"&&z&&!k.x||W==="y"&&H&&!k.y){const Y={anchor:{...x.anchor},origin:{...x.origin}},X=W==="x"?M==="y"?rg:ng:M==="y"?ng:rg;Y.anchor=X(Y.anchor),Y.origin=X(Y.origin);const{overflows:J}=P(Y);(J[W].before<=L[W].before&&J[W].after<=L[W].after||J[W].before+J[W].after<(L[W].before+L[W].after)/2)&&(x=Y,G=k[W]=!0)}}),G)continue}L.x.before&&(S+=L.x.before,m.x+=L.x.before),L.x.after&&(S-=L.x.after,m.x-=L.x.after),L.y.before&&(C+=L.y.before,m.y+=L.y.before),L.y.after&&(C-=L.y.after,m.y-=L.y.after);{const M=I_(m,w);R.x=w.width-M.x.before-M.x.after,R.y=w.height-M.y.before-M.y.after,S+=M.x.before,m.x+=M.x.before,C+=M.y.before,m.y+=M.y.before}break}const I=R_(x.anchor);return Object.assign(n.value,{"--v-overlay-anchor-origin":`${x.anchor.side} ${x.anchor.align}`,transformOrigin:`${x.origin.side} ${x.origin.align}`,top:Le(ag(C)),left:e.isRtl.value?void 0:Le(ag(S)),right:e.isRtl.value?Le(ag(-S)):void 0,minWidth:Le(I==="y"?Math.min(o.value,v.width):o.value),maxWidth:Le(t0(Pr(R.x,o.value===1/0?0:o.value,l.value))),maxHeight:Le(t0(Pr(R.y,a.value===1/0?0:a.value,u.value)))}),{available:R,contentBox:m}}return ke(()=>[s.value,i.value,t.offset,t.minWidth,t.minHeight,t.maxWidth,t.maxHeight],()=>p()),Mt(()=>{const v=p();if(!v)return;const{available:m,contentBox:y}=v;y.height>m.y&&requestAnimationFrame(()=>{p(),requestAnimationFrame(()=>{p()})})}),{updateLocation:p}}function ag(e){return Math.round(e*devicePixelRatio)/devicePixelRatio}function t0(e){return Math.ceil(e*devicePixelRatio)/devicePixelRatio}let Mv=!0;const Lh=[];function qN(e){!Mv||Lh.length?(Lh.push(e),Dv()):(Mv=!1,e(),Dv())}let n0=-1;function Dv(){cancelAnimationFrame(n0),n0=requestAnimationFrame(()=>{const e=Lh.shift();e&&e(),Lh.length?Dv():Mv=!0})}const Yf={none:null,close:KN,block:YN,reposition:XN},WN=ce({scrollStrategy:{type:[String,Function],default:"block",validator:e=>typeof e=="function"||e in Yf}},"VOverlay-scroll-strategies");function GN(e,t){if(!_t)return;let n;Mn(async()=>{n==null||n.stop(),t.isActive.value&&e.scrollStrategy&&(n=wd(),await new Promise(r=>setTimeout(r)),n.active&&n.run(()=>{var r;typeof e.scrollStrategy=="function"?e.scrollStrategy(t,e,n):(r=Yf[e.scrollStrategy])==null||r.call(Yf,t,e,n)}))}),Sn(()=>{n==null||n.stop()})}function KN(e){function t(n){e.isActive.value=!1}rT(e.targetEl.value??e.contentEl.value,t)}function YN(e,t){var o;const n=(o=e.root.value)==null?void 0:o.offsetParent,r=[...new Set([...Dh(e.targetEl.value,t.contained?n:void 0),...Dh(e.contentEl.value,t.contained?n:void 0)])].filter(a=>!a.classList.contains("v-overlay-scroll-blocked")),s=window.innerWidth-document.documentElement.offsetWidth,i=(a=>Bb(a)&&a)(n||document.documentElement);i&&e.root.value.classList.add("v-overlay--scroll-blocked"),r.forEach((a,l)=>{a.style.setProperty("--v-body-scroll-x",Le(-a.scrollLeft)),a.style.setProperty("--v-body-scroll-y",Le(-a.scrollTop)),a!==document.documentElement&&a.style.setProperty("--v-scrollbar-offset",Le(s)),a.classList.add("v-overlay-scroll-blocked")}),Sn(()=>{r.forEach((a,l)=>{const u=parseFloat(a.style.getPropertyValue("--v-body-scroll-x")),c=parseFloat(a.style.getPropertyValue("--v-body-scroll-y")),d=a.style.scrollBehavior;a.style.scrollBehavior="auto",a.style.removeProperty("--v-body-scroll-x"),a.style.removeProperty("--v-body-scroll-y"),a.style.removeProperty("--v-scrollbar-offset"),a.classList.remove("v-overlay-scroll-blocked"),a.scrollLeft=-u,a.scrollTop=-c,a.style.scrollBehavior=d}),i&&e.root.value.classList.remove("v-overlay--scroll-blocked")})}function XN(e,t,n){let r=!1,s=-1,i=-1;function o(a){qN(()=>{var c,d;const l=performance.now();(d=(c=e.updateLocation).value)==null||d.call(c,a),r=(performance.now()-l)/(1e3/60)>2})}i=(typeof requestIdleCallback>"u"?a=>a():requestIdleCallback)(()=>{n.run(()=>{rT(e.targetEl.value??e.contentEl.value,a=>{r?(cancelAnimationFrame(s),s=requestAnimationFrame(()=>{s=requestAnimationFrame(()=>{o(a)})})):o(a)})})}),Sn(()=>{typeof cancelIdleCallback<"u"&&cancelIdleCallback(i),cancelAnimationFrame(s)})}function rT(e,t){const n=[document,...Dh(e)];n.forEach(r=>{r.addEventListener("scroll",t,{passive:!0})}),Sn(()=>{n.forEach(r=>{r.removeEventListener("scroll",t)})})}const $v=Symbol.for("vuetify:v-menu"),zb=ce({closeDelay:[Number,String],openDelay:[Number,String]},"delay");function Hb(e,t){let n=()=>{};function r(o){n==null||n();const a=Number(o?e.openDelay:e.closeDelay);return new Promise(l=>{n=bL(a,()=>{t==null||t(o),l(o)})})}function s(){return r(!0)}function i(){return r(!1)}return{clearDelay:n,runOpenDelay:s,runCloseDelay:i}}const QN=ce({target:[String,Object],activator:[String,Object],activatorProps:{type:Object,default:()=>({})},openOnClick:{type:Boolean,default:void 0},openOnHover:Boolean,openOnFocus:{type:Boolean,default:void 0},closeOnContentClick:Boolean,...zb()},"VOverlay-activator");function JN(e,t){let{isActive:n,isTop:r,contentEl:s}=t;const i=on("useActivator"),o=V();let a=!1,l=!1,u=!0;const c=T(()=>e.openOnFocus||e.openOnFocus==null&&e.openOnHover),d=T(()=>e.openOnClick||e.openOnClick==null&&!e.openOnHover&&!c.value),{runOpenDelay:f,runCloseDelay:p}=Hb(e,k=>{k===(e.openOnHover&&a||c.value&&l)&&!(e.openOnHover&&n.value&&!r.value)&&(n.value!==k&&(u=!0),n.value=k)}),v=V(),m={onClick:k=>{k.stopPropagation(),o.value=k.currentTarget||k.target,n.value||(v.value=[k.clientX,k.clientY]),n.value=!n.value},onMouseenter:k=>{var E;(E=k.sourceCapabilities)!=null&&E.firesTouchEvents||(a=!0,o.value=k.currentTarget||k.target,f())},onMouseleave:k=>{a=!1,p()},onFocus:k=>{Ah(k.target,":focus-visible")!==!1&&(l=!0,k.stopPropagation(),o.value=k.currentTarget||k.target,f())},onBlur:k=>{l=!1,k.stopPropagation(),p()}},y=T(()=>{const k={};return d.value&&(k.onClick=m.onClick),e.openOnHover&&(k.onMouseenter=m.onMouseenter,k.onMouseleave=m.onMouseleave),c.value&&(k.onFocus=m.onFocus,k.onBlur=m.onBlur),k}),b=T(()=>{const k={};if(e.openOnHover&&(k.onMouseenter=()=>{a=!0,f()},k.onMouseleave=()=>{a=!1,p()}),c.value&&(k.onFocusin=()=>{l=!0,f()},k.onFocusout=()=>{l=!1,p()}),e.closeOnContentClick){const E=Xe($v,null);k.onClick=()=>{n.value=!1,E==null||E.closeParents()}}return k}),w=T(()=>{const k={};return e.openOnHover&&(k.onMouseenter=()=>{u&&(a=!0,u=!1,f())},k.onMouseleave=()=>{a=!1,p()}),k});ke(r,k=>{var E;k&&(e.openOnHover&&!a&&(!c.value||!l)||c.value&&!l&&(!e.openOnHover||!a))&&!((E=s.value)!=null&&E.contains(document.activeElement))&&(n.value=!1)}),ke(n,k=>{k||setTimeout(()=>{v.value=void 0})},{flush:"post"});const x=Cv();Mn(()=>{x.value&&Mt(()=>{o.value=x.el})});const P=Cv(),S=T(()=>e.target==="cursor"&&v.value?v.value:P.value?P.el:sT(e.target,i)||o.value),C=T(()=>Array.isArray(S.value)?void 0:S.value);let R;return ke(()=>!!e.activator,k=>{k&&_t?(R=wd(),R.run(()=>{ZN(e,i,{activatorEl:o,activatorEvents:y})})):R&&R.stop()},{flush:"post",immediate:!0}),Sn(()=>{R==null||R.stop()}),{activatorEl:o,activatorRef:x,target:S,targetEl:C,targetRef:P,activatorEvents:y,contentEvents:b,scrimEvents:w}}function ZN(e,t,n){let{activatorEl:r,activatorEvents:s}=n;ke(()=>e.activator,(l,u)=>{if(u&&l!==u){const c=a(u);c&&o(c)}l&&Mt(()=>i())},{immediate:!0}),ke(()=>e.activatorProps,()=>{i()}),Sn(()=>{o()});function i(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a(),u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.activatorProps;l&&_L(l,me(s.value,u))}function o(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a(),u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.activatorProps;l&&kL(l,me(s.value,u))}function a(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.activator;const u=sT(l,t);return r.value=(u==null?void 0:u.nodeType)===Node.ELEMENT_NODE?u:void 0,r.value}}function sT(e,t){var r,s;if(!e)return;let n;if(e==="parent"){let i=(s=(r=t==null?void 0:t.proxy)==null?void 0:r.$el)==null?void 0:s.parentNode;for(;i!=null&&i.hasAttribute("data-no-activator");)i=i.parentNode;n=i}else typeof e=="string"?n=document.querySelector(e):"$el"in e?n=e.$el:n=e;return n}const Hp=["sm","md","lg","xl","xxl"],Fv=Symbol.for("vuetify:display"),r0={mobileBreakpoint:"lg",thresholds:{xs:0,sm:600,md:960,lg:1280,xl:1920,xxl:2560}},e2=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:r0;return Jn(r0,e)};function s0(e){return _t&&!e?window.innerWidth:typeof e=="object"&&e.clientWidth||0}function i0(e){return _t&&!e?window.innerHeight:typeof e=="object"&&e.clientHeight||0}function o0(e){const t=_t&&!e?window.navigator.userAgent:"ssr";function n(v){return!!t.match(v)}const r=n(/android/i),s=n(/iphone|ipad|ipod/i),i=n(/cordova/i),o=n(/electron/i),a=n(/chrome/i),l=n(/edge/i),u=n(/firefox/i),c=n(/opera/i),d=n(/win/i),f=n(/mac/i),p=n(/linux/i);return{android:r,ios:s,cordova:i,electron:o,chrome:a,edge:l,firefox:u,opera:c,win:d,mac:f,linux:p,touch:fL,ssr:t==="ssr"}}function t2(e,t){const{thresholds:n,mobileBreakpoint:r}=e2(e),s=Ae(i0(t)),i=Ae(o0(t)),o=gn({}),a=Ae(s0(t));function l(){s.value=i0(),a.value=s0()}function u(){l(),i.value=o0()}return Mn(()=>{const c=a.value<n.sm,d=a.value<n.md&&!c,f=a.value<n.lg&&!(d||c),p=a.value<n.xl&&!(f||d||c),v=a.value<n.xxl&&!(p||f||d||c),m=a.value>=n.xxl,y=c?"xs":d?"sm":f?"md":p?"lg":v?"xl":"xxl",b=typeof r=="number"?r:n[r],w=a.value<b;o.xs=c,o.sm=d,o.md=f,o.lg=p,o.xl=v,o.xxl=m,o.smAndUp=!c,o.mdAndUp=!(c||d),o.lgAndUp=!(c||d||f),o.xlAndUp=!(c||d||f||p),o.smAndDown=!(f||p||v||m),o.mdAndDown=!(p||v||m),o.lgAndDown=!(v||m),o.xlAndDown=!m,o.name=y,o.height=s.value,o.width=a.value,o.mobile=w,o.mobileBreakpoint=r,o.platform=i.value,o.thresholds=n}),_t&&window.addEventListener("resize",l,{passive:!0}),{...Wo(o),update:u,ssr:!!t}}const rl=ce({mobile:{type:Boolean,default:!1},mobileBreakpoint:[Number,String]},"display");function pi(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{mobile:null},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:hi();const n=Xe(Fv);if(!n)throw new Error("Could not find Vuetify display injection");const r=T(()=>e.mobile?!0:typeof e.mobileBreakpoint=="number"?n.width.value<e.mobileBreakpoint:e.mobileBreakpoint?n.width.value<n.thresholds.value[e.mobileBreakpoint]:e.mobile===null?n.mobile.value:!1),s=T(()=>t?{[`${t}--mobile`]:r.value}:{});return{...n,displayClasses:s,mobile:r}}function n2(){if(!_t)return Ae(!1);const{ssr:e}=pi();if(e){const t=Ae(!1);return wt(()=>{t.value=!0}),t}else return Ae(!0)}const iT=ce({eager:Boolean},"lazy");function oT(e,t){const n=Ae(!1),r=T(()=>n.value||e.eager||t.value);ke(t,()=>n.value=!0);function s(){e.eager||(n.value=!1)}return{isBooted:n,hasContent:r,onAfterLeave:s}}function Ou(){const t=on("useScopeId").vnode.scopeId;return{scopeId:t?{[t]:""}:void 0}}const a0=Symbol.for("vuetify:stack"),nc=gn([]);function r2(e,t,n){const r=on("useStack"),s=!n,i=Xe(a0,void 0),o=gn({activeChildren:new Set});Gt(a0,o);const a=Ae(Number(t.value));Hr(e,()=>{var d;const c=(d=nc.at(-1))==null?void 0:d[1];a.value=c?c+10:Number(t.value),s&&nc.push([r.uid,a.value]),i==null||i.activeChildren.add(r.uid),Sn(()=>{if(s){const f=Ne(nc).findIndex(p=>p[0]===r.uid);nc.splice(f,1)}i==null||i.activeChildren.delete(r.uid)})});const l=Ae(!0);s&&Mn(()=>{var d;const c=((d=nc.at(-1))==null?void 0:d[0])===r.uid;setTimeout(()=>l.value=c)});const u=T(()=>!o.activeChildren.size);return{globalTop:Sd(l),localTop:u,stackStyles:T(()=>({zIndex:a.value}))}}function s2(e){return{teleportTarget:T(()=>{const n=e();if(n===!0||!_t)return;const r=n===!1?document.body:typeof n=="string"?document.querySelector(n):n;if(r==null)return;let s=[...r.children].find(i=>i.matches(".v-overlay-container"));return s||(s=document.createElement("div"),s.className="v-overlay-container",r.appendChild(s)),s})}}const Mu=ce({transition:{type:[Boolean,String,Object],default:"fade-transition",validator:e=>e!==!0}},"transition"),ii=(e,t)=>{let{slots:n}=t;const{transition:r,disabled:s,group:i,...o}=e,{component:a=i?Ab:Fo,...l}=typeof r=="object"?r:{};return pr(a,me(typeof r=="string"?{name:s?"":r}:l,typeof r=="string"?{}:Object.fromEntries(Object.entries({disabled:s,group:i}).filter(u=>{let[c,d]=u;return d!==void 0})),o),n)};function i2(){return!0}function aT(e,t,n){if(!e||lT(e,n)===!1)return!1;const r=RP(t);if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&r.host===e.target)return!1;const s=(typeof n.value=="object"&&n.value.include||(()=>[]))();return s.push(t),!s.some(i=>i==null?void 0:i.contains(e.target))}function lT(e,t){return(typeof t.value=="object"&&t.value.closeConditional||i2)(e)}function o2(e,t,n){const r=typeof n.value=="function"?n.value:n.value.handler;e.shadowTarget=e.target,t._clickOutside.lastMousedownWasOutside&&aT(e,t,n)&&setTimeout(()=>{lT(e,n)&&r&&r(e)},0)}function l0(e,t){const n=RP(e);t(document),typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&t(n)}const a2={mounted(e,t){const n=s=>o2(s,e,t),r=s=>{e._clickOutside.lastMousedownWasOutside=aT(s,e,t)};l0(e,s=>{s.addEventListener("click",n,!0),s.addEventListener("mousedown",r,!0)}),e._clickOutside||(e._clickOutside={lastMousedownWasOutside:!1}),e._clickOutside[t.instance.$.uid]={onClick:n,onMousedown:r}},beforeUnmount(e,t){e._clickOutside&&(l0(e,n=>{var i;if(!n||!((i=e._clickOutside)!=null&&i[t.instance.$.uid]))return;const{onClick:r,onMousedown:s}=e._clickOutside[t.instance.$.uid];n.removeEventListener("click",r,!0),n.removeEventListener("mousedown",s,!0)}),delete e._clickOutside[t.instance.$.uid])}};function l2(e){const{modelValue:t,color:n,...r}=e;return h(Fo,{name:"fade-transition",appear:!0},{default:()=>[e.modelValue&&h("div",me({class:["v-overlay__scrim",e.color.backgroundColorClasses.value],style:e.color.backgroundColorStyles.value},r),null)]})}const Ad=ce({absolute:Boolean,attach:[Boolean,String,Object],closeOnBack:{type:Boolean,default:!0},contained:Boolean,contentClass:null,contentProps:null,disabled:Boolean,opacity:[Number,String],noClickAnimation:Boolean,modelValue:Boolean,persistent:Boolean,scrim:{type:[Boolean,String],default:!0},zIndex:{type:[Number,String],default:2e3},...QN(),...Ve(),...Or(),...iT(),...VN(),...WN(),...$t(),...Mu()},"VOverlay"),Vi=_e()({name:"VOverlay",directives:{ClickOutside:a2},inheritAttrs:!1,props:{_disableGlobalStack:Boolean,...Ad()},emits:{"click:outside":e=>!0,"update:modelValue":e=>!0,keydown:e=>!0,afterEnter:()=>!0,afterLeave:()=>!0},setup(e,t){let{slots:n,attrs:r,emit:s}=t;const i=on("VOverlay"),o=V(),a=V(),l=V(),u=st(e,"modelValue"),c=T({get:()=>u.value,set:ee=>{ee&&e.disabled||(u.value=ee)}}),{themeClasses:d}=Yt(e),{rtlClasses:f,isRtl:p}=Dr(),{hasContent:v,onAfterLeave:m}=oT(e,c),y=fr(T(()=>typeof e.scrim=="string"?e.scrim:null)),{globalTop:b,localTop:w,stackStyles:x}=r2(c,Re(e,"zIndex"),e._disableGlobalStack),{activatorEl:P,activatorRef:S,target:C,targetEl:R,targetRef:k,activatorEvents:E,contentEvents:I,scrimEvents:A}=JN(e,{isActive:c,isTop:w,contentEl:l}),{teleportTarget:O}=s2(()=>{var ne,U,De;const ee=e.attach||e.contained;if(ee)return ee;const de=((ne=P==null?void 0:P.value)==null?void 0:ne.getRootNode())||((De=(U=i.proxy)==null?void 0:U.$el)==null?void 0:De.getRootNode());return de instanceof ShadowRoot?de:!1}),{dimensionStyles:L}=Mr(e),M=n2(),{scopeId:z}=Ou();ke(()=>e.disabled,ee=>{ee&&(c.value=!1)});const{contentStyles:H,updateLocation:G}=UN(e,{isRtl:p,contentEl:l,target:C,isActive:c});GN(e,{root:o,contentEl:l,targetEl:R,isActive:c,updateLocation:G});function W(ee){s("click:outside",ee),e.persistent?he():c.value=!1}function Y(ee){return c.value&&b.value&&(!e.scrim||ee.target===a.value||ee instanceof MouseEvent&&ee.shadowTarget===a.value)}_t&&ke(c,ee=>{ee?window.addEventListener("keydown",X):window.removeEventListener("keydown",X)},{immediate:!0}),Cn(()=>{_t&&window.removeEventListener("keydown",X)});function X(ee){var de,ne,U;ee.key==="Escape"&&b.value&&((de=l.value)!=null&&de.contains(document.activeElement)||s("keydown",ee),e.persistent?he():(c.value=!1,(ne=l.value)!=null&&ne.contains(document.activeElement)&&((U=P.value)==null||U.focus())))}function J(ee){ee.key==="Escape"&&!b.value||s("keydown",ee)}const N=UP();Hr(()=>e.closeOnBack,()=>{TN(N,ee=>{b.value&&c.value?(ee(!1),e.persistent?he():c.value=!1):ee()})});const K=V();ke(()=>c.value&&(e.absolute||e.contained)&&O.value==null,ee=>{if(ee){const de=IP(o.value);de&&de!==document.scrollingElement&&(K.value=de.scrollTop)}});function he(){e.noClickAnimation||l.value&&Pl(l.value,[{transformOrigin:"center"},{transform:"scale(1.03)"},{transformOrigin:"center"}],{duration:150,easing:Mh})}function oe(){s("afterEnter")}function we(){m(),s("afterLeave")}return Ie(()=>{var ee;return h(Pe,null,[(ee=n.activator)==null?void 0:ee.call(n,{isActive:c.value,targetRef:k,props:me({ref:S},E.value,e.activatorProps)}),M.value&&v.value&&h(w$,{disabled:!O.value,to:O.value},{default:()=>[h("div",me({class:["v-overlay",{"v-overlay--absolute":e.absolute||e.contained,"v-overlay--active":c.value,"v-overlay--contained":e.contained},d.value,f.value,e.class],style:[x.value,{"--v-overlay-opacity":e.opacity,top:Le(K.value)},e.style],ref:o,onKeydown:J},z,r),[h(l2,me({color:y,modelValue:c.value&&!!e.scrim,ref:a},A.value),null),h(ii,{appear:!0,persisted:!0,transition:e.transition,target:C.value,onAfterEnter:oe,onAfterLeave:we},{default:()=>{var de;return[Bt(h("div",me({ref:l,class:["v-overlay__content",e.contentClass],style:[L.value,H.value]},I.value,e.contentProps),[(de=n.default)==null?void 0:de.call(n,{isActive:c})]),[[Xi,c.value],[hr("click-outside"),{handler:W,closeConditional:Y,include:()=>[P.value]}]])]}})])]})])}),{activatorEl:P,scrimEl:a,target:C,animateClick:he,contentEl:l,globalTop:b,localTop:w,updateLocation:G}}}),lg=Symbol("Forwarded refs");function ug(e,t){let n=e;for(;n;){const r=Reflect.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Qi(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e[lg]=n,new Proxy(e,{get(s,i){if(Reflect.has(s,i))return Reflect.get(s,i);if(!(typeof i=="symbol"||i.startsWith("$")||i.startsWith("__"))){for(const o of n)if(o.value&&Reflect.has(o.value,i)){const a=Reflect.get(o.value,i);return typeof a=="function"?a.bind(o.value):a}}},has(s,i){if(Reflect.has(s,i))return!0;if(typeof i=="symbol"||i.startsWith("$")||i.startsWith("__"))return!1;for(const o of n)if(o.value&&Reflect.has(o.value,i))return!0;return!1},set(s,i,o){if(Reflect.has(s,i))return Reflect.set(s,i,o);if(typeof i=="symbol"||i.startsWith("$")||i.startsWith("__"))return!1;for(const a of n)if(a.value&&Reflect.has(a.value,i))return Reflect.set(a.value,i,o);return!1},getOwnPropertyDescriptor(s,i){var a;const o=Reflect.getOwnPropertyDescriptor(s,i);if(o)return o;if(!(typeof i=="symbol"||i.startsWith("$")||i.startsWith("__"))){for(const l of n){if(!l.value)continue;const u=ug(l.value,i)??("_"in l.value?ug((a=l.value._)==null?void 0:a.setupState,i):void 0);if(u)return u}for(const l of n){const u=l.value&&l.value[lg];if(!u)continue;const c=u.slice();for(;c.length;){const d=c.shift(),f=ug(d.value,i);if(f)return f;const p=d.value&&d.value[lg];p&&c.push(...p)}}}}})}const u2=ce({fullscreen:Boolean,retainFocus:{type:Boolean,default:!0},scrollable:Boolean,...Ad({origin:"center center",scrollStrategy:"block",transition:{component:Ub},zIndex:2400})},"VDialog"),uT=_e()({name:"VDialog",props:u2(),emits:{"update:modelValue":e=>!0,afterEnter:()=>!0,afterLeave:()=>!0},setup(e,t){let{emit:n,slots:r}=t;const s=st(e,"modelValue"),{scopeId:i}=Ou(),o=V();function a(c){var p,v;const d=c.relatedTarget,f=c.target;if(d!==f&&((p=o.value)!=null&&p.contentEl)&&((v=o.value)!=null&&v.globalTop)&&![document,o.value.contentEl].includes(f)&&!o.value.contentEl.contains(f)){const m=Gc(o.value.contentEl);if(!m.length)return;const y=m[0],b=m[m.length-1];d===y?b.focus():y.focus()}}Cn(()=>{document.removeEventListener("focusin",a)}),_t&&ke(()=>s.value&&e.retainFocus,c=>{c?document.addEventListener("focusin",a):document.removeEventListener("focusin",a)},{immediate:!0});function l(){var c;n("afterEnter"),(c=o.value)!=null&&c.contentEl&&!o.value.contentEl.contains(document.activeElement)&&o.value.contentEl.focus({preventScroll:!0})}function u(){n("afterLeave")}return ke(s,async c=>{var d;c||(await Mt(),(d=o.value.activatorEl)==null||d.focus({preventScroll:!0}))}),Ie(()=>{const c=Vi.filterProps(e),d=me({"aria-haspopup":"dialog"},e.activatorProps),f=me({tabindex:-1},e.contentProps);return h(Vi,me({ref:o,class:["v-dialog",{"v-dialog--fullscreen":e.fullscreen,"v-dialog--scrollable":e.scrollable},e.class],style:e.style},c,{modelValue:s.value,"onUpdate:modelValue":p=>s.value=p,"aria-modal":"true",activatorProps:d,contentProps:f,height:e.fullscreen?void 0:e.height,width:e.fullscreen?void 0:e.width,maxHeight:e.fullscreen?void 0:e.maxHeight,maxWidth:e.fullscreen?void 0:e.maxWidth,role:"dialog",onAfterEnter:l,onAfterLeave:u},i),{activator:r.activator,default:function(){for(var p=arguments.length,v=new Array(p),m=0;m<p;m++)v[m]=arguments[m];return h(Ot,{root:"VDialog"},{default:()=>{var y;return[(y=r.default)==null?void 0:y.call(r,...v)]}})}})}),Qi({},o)}}),c2={class:"pa-3 text--primary"},mi=$e({__name:"BaseDialog",props:{id:{type:String,required:!0},maxWidth:{type:String,default:"400px"}},emits:["escape","opened","beforeOpened"],setup(e,{emit:t}){const n=e,r=cP(),s=t,i=tn(n.id);function o(c){return s("opened",c)}function a(c){return s("beforeOpened",c)}wt(async()=>{dL("Escape",c=>{l.value&&(c.preventDefault(),u())}),r.registerDialogReference(n.id,{beforeOpenedCallback:a,openedCallback:o})}),Cn(()=>{r.unregisterDialogReference(n.id)});const l=T(()=>{if(!n.id)return;const c=r.isDialogOpened(n.id);return c&&console.debug(`[BaseDialog ${n.id}] Showing dialog: ${i==null?void 0:i.isDialogOpened()}`),c});function u(){s("escape")}return(c,d)=>(D(),te(uT,{"max-width":e.maxWidth,"retain-focus":!1,"model-value":l.value,persistent:"",onClose:d[1]||(d[1]=f=>u())},{default:g(()=>[Op(c.$slots,"default",{},()=>[$("div",c2,[d[4]||(d[4]=_(" No content defined in dialog. ")),h(se,{onClick:d[0]||(d[0]=f=>Z(i).closeDialog())},{default:g(()=>[h(Q,{class:"mr-3"},{default:g(()=>d[2]||(d[2]=[_("close")])),_:1}),d[3]||(d[3]=_("Close "))]),_:1})])])]),_:3},8,["max-width","model-value"]))}});var nn=(e=>(e.ImportOctoFarmDialog="ImportOctoFarmDialog",e.BatchReprintDialog="BatchReprintDialog",e.YamlImportExport="YamlImportExport",e.AddOrUpdatePrinterDialog="AddOrUpdatePrinterDialog",e.AddOrUpdateFloorDialog="AddOrUpdateFloorDialog",e.PrinterMaintenanceDialog="PrinterMaintenanceDialog",e.AddOrUpdateCameraDialog="AddOrUpdateCameraDialog",e.PrinterControlDialog="PrinterControlDialog",e.CreateUserDialog="CreateUserDialog",e.GridSettingsDialog="GridSettingsDialog",e))(nn||{});function cT(e,t){return function(){return e.apply(t,arguments)}}const{toString:d2}=Object.prototype,{getPrototypeOf:jb}=Object,jp=(e=>t=>{const n=d2.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ls=e=>(e=e.toLowerCase(),t=>jp(t)===e),qp=e=>t=>typeof t===e,{isArray:Du}=Array,Jc=qp("undefined");function f2(e){return e!==null&&!Jc(e)&&e.constructor!==null&&!Jc(e.constructor)&&jr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const dT=Ls("ArrayBuffer");function h2(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&dT(e.buffer),t}const p2=qp("string"),jr=qp("function"),fT=qp("number"),Wp=e=>e!==null&&typeof e=="object",m2=e=>e===!0||e===!1,Xf=e=>{if(jp(e)!=="object")return!1;const t=jb(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},g2=Ls("Date"),v2=Ls("File"),y2=Ls("Blob"),b2=Ls("FileList"),w2=e=>Wp(e)&&jr(e.pipe),S2=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||jr(e.append)&&((t=jp(e))==="formdata"||t==="object"&&jr(e.toString)&&e.toString()==="[object FormData]"))},_2=Ls("URLSearchParams"),[k2,x2,E2,C2]=["ReadableStream","Request","Response","Headers"].map(Ls),P2=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Od(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Du(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let a;for(r=0;r<o;r++)a=i[r],t.call(null,e[a],a,e)}}function hT(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const ma=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,pT=e=>!Jc(e)&&e!==ma;function Lv(){const{caseless:e}=pT(this)&&this||{},t={},n=(r,s)=>{const i=e&&hT(t,s)||s;Xf(t[i])&&Xf(r)?t[i]=Lv(t[i],r):Xf(r)?t[i]=Lv({},r):Du(r)?t[i]=r.slice():t[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&Od(arguments[r],n);return t}const T2=(e,t,n,{allOwnKeys:r}={})=>(Od(t,(s,i)=>{n&&jr(s)?e[i]=cT(s,n):e[i]=s},{allOwnKeys:r}),e),R2=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),I2=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},A2=(e,t,n,r)=>{let s,i,o;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&jb(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},O2=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},M2=e=>{if(!e)return null;if(Du(e))return e;let t=e.length;if(!fT(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},D2=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&jb(Uint8Array)),$2=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},F2=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},L2=Ls("HTMLFormElement"),N2=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),u0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),B2=Ls("RegExp"),mT=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Od(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},V2=e=>{mT(e,(t,n)=>{if(jr(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(jr(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},U2=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return Du(e)?r(e):r(String(e).split(t)),n},z2=()=>{},H2=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function j2(e){return!!(e&&jr(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const q2=e=>{const t=new Array(10),n=(r,s)=>{if(Wp(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const i=Du(r)?[]:{};return Od(r,(o,a)=>{const l=n(o,s+1);!Jc(l)&&(i[a]=l)}),t[s]=void 0,i}}return r};return n(e,0)},W2=Ls("AsyncFunction"),G2=e=>e&&(Wp(e)||jr(e))&&jr(e.then)&&jr(e.catch),gT=((e,t)=>e?setImmediate:t?((n,r)=>(ma.addEventListener("message",({source:s,data:i})=>{s===ma&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),ma.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",jr(ma.postMessage)),K2=typeof queueMicrotask<"u"?queueMicrotask.bind(ma):typeof process<"u"&&process.nextTick||gT,le={isArray:Du,isArrayBuffer:dT,isBuffer:f2,isFormData:S2,isArrayBufferView:h2,isString:p2,isNumber:fT,isBoolean:m2,isObject:Wp,isPlainObject:Xf,isReadableStream:k2,isRequest:x2,isResponse:E2,isHeaders:C2,isUndefined:Jc,isDate:g2,isFile:v2,isBlob:y2,isRegExp:B2,isFunction:jr,isStream:w2,isURLSearchParams:_2,isTypedArray:D2,isFileList:b2,forEach:Od,merge:Lv,extend:T2,trim:P2,stripBOM:R2,inherits:I2,toFlatObject:A2,kindOf:jp,kindOfTest:Ls,endsWith:O2,toArray:M2,forEachEntry:$2,matchAll:F2,isHTMLForm:L2,hasOwnProperty:u0,hasOwnProp:u0,reduceDescriptors:mT,freezeMethods:V2,toObjectSet:U2,toCamelCase:N2,noop:z2,toFiniteNumber:H2,findKey:hT,global:ma,isContextDefined:pT,isSpecCompliantForm:j2,toJSONObject:q2,isAsyncFn:W2,isThenable:G2,setImmediate:gT,asap:K2};function et(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}le.inherits(et,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:le.toJSONObject(this.config),code:this.code,status:this.status}}});const vT=et.prototype,yT={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{yT[e]={value:e}});Object.defineProperties(et,yT);Object.defineProperty(vT,"isAxiosError",{value:!0});et.from=(e,t,n,r,s,i)=>{const o=Object.create(vT);return le.toFlatObject(e,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),et.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const Y2=null;function Nv(e){return le.isPlainObject(e)||le.isArray(e)}function bT(e){return le.endsWith(e,"[]")?e.slice(0,-2):e}function c0(e,t,n){return e?e.concat(t).map(function(s,i){return s=bT(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function X2(e){return le.isArray(e)&&!e.some(Nv)}const Q2=le.toFlatObject(le,{},null,function(t){return/^is[A-Z]/.test(t)});function Gp(e,t,n){if(!le.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=le.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!le.isUndefined(y[m])});const r=n.metaTokens,s=n.visitor||c,i=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&le.isSpecCompliantForm(t);if(!le.isFunction(s))throw new TypeError("visitor must be a function");function u(v){if(v===null)return"";if(le.isDate(v))return v.toISOString();if(!l&&le.isBlob(v))throw new et("Blob is not supported. Use a Buffer instead.");return le.isArrayBuffer(v)||le.isTypedArray(v)?l&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function c(v,m,y){let b=v;if(v&&!y&&typeof v=="object"){if(le.endsWith(m,"{}"))m=r?m:m.slice(0,-2),v=JSON.stringify(v);else if(le.isArray(v)&&X2(v)||(le.isFileList(v)||le.endsWith(m,"[]"))&&(b=le.toArray(v)))return m=bT(m),b.forEach(function(x,P){!(le.isUndefined(x)||x===null)&&t.append(o===!0?c0([m],P,i):o===null?m:m+"[]",u(x))}),!1}return Nv(v)?!0:(t.append(c0(y,m,i),u(v)),!1)}const d=[],f=Object.assign(Q2,{defaultVisitor:c,convertValue:u,isVisitable:Nv});function p(v,m){if(!le.isUndefined(v)){if(d.indexOf(v)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(v),le.forEach(v,function(b,w){(!(le.isUndefined(b)||b===null)&&s.call(t,b,le.isString(w)?w.trim():w,m,f))===!0&&p(b,m?m.concat(w):[w])}),d.pop()}}if(!le.isObject(e))throw new TypeError("data must be an object");return p(e),t}function d0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function qb(e,t){this._pairs=[],e&&Gp(e,this,t)}const wT=qb.prototype;wT.append=function(t,n){this._pairs.push([t,n])};wT.toString=function(t){const n=t?function(r){return t.call(this,r,d0)}:d0;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function J2(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ST(e,t,n){if(!t)return e;const r=n&&n.encode||J2;le.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=le.isURLSearchParams(t)?t.toString():new qb(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class f0{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){le.forEach(this.handlers,function(r){r!==null&&t(r)})}}const _T={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Z2=typeof URLSearchParams<"u"?URLSearchParams:qb,eB=typeof FormData<"u"?FormData:null,tB=typeof Blob<"u"?Blob:null,nB={isBrowser:!0,classes:{URLSearchParams:Z2,FormData:eB,Blob:tB},protocols:["http","https","file","blob","url","data"]},Wb=typeof window<"u"&&typeof document<"u",Bv=typeof navigator=="object"&&navigator||void 0,rB=Wb&&(!Bv||["ReactNative","NativeScript","NS"].indexOf(Bv.product)<0),sB=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",iB=Wb&&window.location.href||"http://localhost",oB=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Wb,hasStandardBrowserEnv:rB,hasStandardBrowserWebWorkerEnv:sB,navigator:Bv,origin:iB},Symbol.toStringTag,{value:"Module"})),Qn={...oB,...nB};function aB(e,t){return Gp(e,new Qn.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return Qn.isNode&&le.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function lB(e){return le.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function uB(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}function kT(e){function t(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=i>=n.length;return o=!o&&le.isArray(s)?s.length:o,l?(le.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!le.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&le.isArray(s[o])&&(s[o]=uB(s[o])),!a)}if(le.isFormData(e)&&le.isFunction(e.entries)){const n={};return le.forEachEntry(e,(r,s)=>{t(lB(r),s,n,0)}),n}return null}function cB(e,t,n){if(le.isString(e))try{return(t||JSON.parse)(e),le.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const Md={transitional:_T,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=le.isObject(t);if(i&&le.isHTMLForm(t)&&(t=new FormData(t)),le.isFormData(t))return s?JSON.stringify(kT(t)):t;if(le.isArrayBuffer(t)||le.isBuffer(t)||le.isStream(t)||le.isFile(t)||le.isBlob(t)||le.isReadableStream(t))return t;if(le.isArrayBufferView(t))return t.buffer;if(le.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return aB(t,this.formSerializer).toString();if((a=le.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Gp(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),cB(t)):t}],transformResponse:[function(t){const n=this.transitional||Md.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(le.isResponse(t)||le.isReadableStream(t))return t;if(t&&le.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?et.from(a,et.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Qn.classes.FormData,Blob:Qn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};le.forEach(["delete","get","head","post","put","patch"],e=>{Md.headers[e]={}});const dB=le.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),fB=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
26
|
-
`).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&dB[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},h0=Symbol("internals");function rc(e){return e&&String(e).trim().toLowerCase()}function Qf(e){return e===!1||e==null?e:le.isArray(e)?e.map(Qf):String(e)}function hB(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const pB=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function cg(e,t,n,r,s){if(le.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!le.isString(t)){if(le.isString(r))return t.indexOf(r)!==-1;if(le.isRegExp(r))return r.test(t)}}function mB(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function gB(e,t){const n=le.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let Tr=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(a,l,u){const c=rc(l);if(!c)throw new Error("header name must be a non-empty string");const d=le.findKey(s,c);(!d||s[d]===void 0||u===!0||u===void 0&&s[d]!==!1)&&(s[d||l]=Qf(a))}const o=(a,l)=>le.forEach(a,(u,c)=>i(u,c,l));if(le.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(le.isString(t)&&(t=t.trim())&&!pB(t))o(fB(t),n);else if(le.isHeaders(t))for(const[a,l]of t.entries())i(l,a,r);else t!=null&&i(n,t,r);return this}get(t,n){if(t=rc(t),t){const r=le.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return hB(s);if(le.isFunction(n))return n.call(this,s,r);if(le.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=rc(t),t){const r=le.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||cg(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=rc(o),o){const a=le.findKey(r,o);a&&(!n||cg(r,r[a],a,n))&&(delete r[a],s=!0)}}return le.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||cg(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return le.forEach(this,(s,i)=>{const o=le.findKey(r,i);if(o){n[o]=Qf(s),delete n[i];return}const a=t?mB(i):String(i).trim();a!==i&&delete n[i],n[a]=Qf(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return le.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&le.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
27
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[h0]=this[h0]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=rc(o);r[a]||(gB(s,o),r[a]=!0)}return le.isArray(t)?t.forEach(i):i(t),this}};Tr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);le.reduceDescriptors(Tr.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});le.freezeMethods(Tr);function dg(e,t){const n=this||Md,r=t||n,s=Tr.from(r.headers);let i=r.data;return le.forEach(e,function(a){i=a.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function xT(e){return!!(e&&e.__CANCEL__)}function $u(e,t,n){et.call(this,e??"canceled",et.ERR_CANCELED,t,n),this.name="CanceledError"}le.inherits($u,et,{__CANCEL__:!0});function ET(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new et("Request failed with status code "+n.status,[et.ERR_BAD_REQUEST,et.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function vB(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function yB(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[i];o||(o=u),n[s]=l,r[s]=u;let d=i,f=0;for(;d!==s;)f+=n[d++],d=d%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),u-o<t)return;const p=c&&u-c;return p?Math.round(f*1e3/p):void 0}}function bB(e,t){let n=0,r=1e3/t,s,i;const o=(u,c=Date.now())=>{n=c,s=null,i&&(clearTimeout(i),i=null),e.apply(null,u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=r?o(u,c):(s=u,i||(i=setTimeout(()=>{i=null,o(s)},r-d)))},()=>s&&o(s)]}const Nh=(e,t,n=3)=>{let r=0;const s=yB(50,250);return bB(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,l=o-r,u=s(l),c=o<=a;r=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-o)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},p0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},m0=e=>(...t)=>le.asap(()=>e(...t)),wB=Qn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Qn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Qn.origin),Qn.navigator&&/(msie|trident)/i.test(Qn.navigator.userAgent)):()=>!0,SB=Qn.hasStandardBrowserEnv?{write(e,t,n,r,s,i){const o=[e+"="+encodeURIComponent(t)];le.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),le.isString(r)&&o.push("path="+r),le.isString(s)&&o.push("domain="+s),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function _B(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function kB(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function CT(e,t,n){let r=!_B(t);return e&&r||n==!1?kB(e,t):t}const g0=e=>e instanceof Tr?{...e}:e;function Ha(e,t){t=t||{};const n={};function r(u,c,d,f){return le.isPlainObject(u)&&le.isPlainObject(c)?le.merge.call({caseless:f},u,c):le.isPlainObject(c)?le.merge({},c):le.isArray(c)?c.slice():c}function s(u,c,d,f){if(le.isUndefined(c)){if(!le.isUndefined(u))return r(void 0,u,d,f)}else return r(u,c,d,f)}function i(u,c){if(!le.isUndefined(c))return r(void 0,c)}function o(u,c){if(le.isUndefined(c)){if(!le.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,d){if(d in t)return r(u,c);if(d in e)return r(void 0,u)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(u,c,d)=>s(g0(u),g0(c),d,!0)};return le.forEach(Object.keys(Object.assign({},e,t)),function(c){const d=l[c]||s,f=d(e[c],t[c],c);le.isUndefined(f)&&d!==a||(n[c]=f)}),n}const PT=e=>{const t=Ha({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=t;t.headers=o=Tr.from(o),t.url=ST(CT(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(le.isFormData(n)){if(Qn.hasStandardBrowserEnv||Qn.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[u,...c]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...c].join("; "))}}if(Qn.hasStandardBrowserEnv&&(r&&le.isFunction(r)&&(r=r(t)),r||r!==!1&&wB(t.url))){const u=s&&i&&SB.read(i);u&&o.set(s,u)}return t},xB=typeof XMLHttpRequest<"u",EB=xB&&function(e){return new Promise(function(n,r){const s=PT(e);let i=s.data;const o=Tr.from(s.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=s,c,d,f,p,v;function m(){p&&p(),v&&v(),s.cancelToken&&s.cancelToken.unsubscribe(c),s.signal&&s.signal.removeEventListener("abort",c)}let y=new XMLHttpRequest;y.open(s.method.toUpperCase(),s.url,!0),y.timeout=s.timeout;function b(){if(!y)return;const x=Tr.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),S={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:x,config:e,request:y};ET(function(R){n(R),m()},function(R){r(R),m()},S),y=null}"onloadend"in y?y.onloadend=b:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(b)},y.onabort=function(){y&&(r(new et("Request aborted",et.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new et("Network Error",et.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let P=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const S=s.transitional||_T;s.timeoutErrorMessage&&(P=s.timeoutErrorMessage),r(new et(P,S.clarifyTimeoutError?et.ETIMEDOUT:et.ECONNABORTED,e,y)),y=null},i===void 0&&o.setContentType(null),"setRequestHeader"in y&&le.forEach(o.toJSON(),function(P,S){y.setRequestHeader(S,P)}),le.isUndefined(s.withCredentials)||(y.withCredentials=!!s.withCredentials),a&&a!=="json"&&(y.responseType=s.responseType),u&&([f,v]=Nh(u,!0),y.addEventListener("progress",f)),l&&y.upload&&([d,p]=Nh(l),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",p)),(s.cancelToken||s.signal)&&(c=x=>{y&&(r(!x||x.type?new $u(null,e,y):x),y.abort(),y=null)},s.cancelToken&&s.cancelToken.subscribe(c),s.signal&&(s.signal.aborted?c():s.signal.addEventListener("abort",c)));const w=vB(s.url);if(w&&Qn.protocols.indexOf(w)===-1){r(new et("Unsupported protocol "+w+":",et.ERR_BAD_REQUEST,e));return}y.send(i||null)})},CB=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const i=function(u){if(!s){s=!0,a();const c=u instanceof Error?u:this.reason;r.abort(c instanceof et?c:new $u(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,i(new et(`timeout ${t} of ms exceeded`,et.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>le.asap(a),l}},PB=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},TB=async function*(e,t){for await(const n of RB(e))yield*PB(n,t)},RB=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},v0=(e,t,n,r)=>{const s=TB(e,t);let i=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await s.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let f=i+=d;n(f)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),s.return()}},{highWaterMark:2})},Kp=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",TT=Kp&&typeof ReadableStream=="function",IB=Kp&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),RT=(e,...t)=>{try{return!!e(...t)}catch{return!1}},AB=TT&&RT(()=>{let e=!1;const t=new Request(Qn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),y0=64*1024,Vv=TT&&RT(()=>le.isReadableStream(new Response("").body)),Bh={stream:Vv&&(e=>e.body)};Kp&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Bh[t]&&(Bh[t]=le.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new et(`Response type '${t}' is not supported`,et.ERR_NOT_SUPPORT,r)})})})(new Response);const OB=async e=>{if(e==null)return 0;if(le.isBlob(e))return e.size;if(le.isSpecCompliantForm(e))return(await new Request(Qn.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(le.isArrayBufferView(e)||le.isArrayBuffer(e))return e.byteLength;if(le.isURLSearchParams(e)&&(e=e+""),le.isString(e))return(await IB(e)).byteLength},MB=async(e,t)=>{const n=le.toFiniteNumber(e.getContentLength());return n??OB(t)},DB=Kp&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:i,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:f}=PT(e);u=u?(u+"").toLowerCase():"text";let p=CB([s,i&&i.toAbortSignal()],o),v;const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(l&&AB&&n!=="get"&&n!=="head"&&(y=await MB(c,r))!==0){let S=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(le.isFormData(r)&&(C=S.headers.get("content-type"))&&c.setContentType(C),S.body){const[R,k]=p0(y,Nh(m0(l)));r=v0(S.body,y0,R,k)}}le.isString(d)||(d=d?"include":"omit");const b="credentials"in Request.prototype;v=new Request(t,{...f,signal:p,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:b?d:void 0});let w=await fetch(v);const x=Vv&&(u==="stream"||u==="response");if(Vv&&(a||x&&m)){const S={};["status","statusText","headers"].forEach(E=>{S[E]=w[E]});const C=le.toFiniteNumber(w.headers.get("content-length")),[R,k]=a&&p0(C,Nh(m0(a),!0))||[];w=new Response(v0(w.body,y0,R,()=>{k&&k(),m&&m()}),S)}u=u||"text";let P=await Bh[le.findKey(Bh,u)||"text"](w,e);return!x&&m&&m(),await new Promise((S,C)=>{ET(S,C,{data:P,headers:Tr.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:v})})}catch(b){throw m&&m(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new et("Network Error",et.ERR_NETWORK,e,v),{cause:b.cause||b}):et.from(b,b&&b.code,e,v)}}),Uv={http:Y2,xhr:EB,fetch:DB};le.forEach(Uv,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const b0=e=>`- ${e}`,$B=e=>le.isFunction(e)||e===null||e===!1,IT={getAdapter:e=>{e=le.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let i=0;i<t;i++){n=e[i];let o;if(r=n,!$B(n)&&(r=Uv[(o=String(n)).toLowerCase()],r===void 0))throw new et(`Unknown adapter '${o}'`);if(r)break;s[o||"#"+i]=r}if(!r){const i=Object.entries(s).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since :
|
|
28
|
-
`+i.map(b0).join(`
|
|
29
|
-
`):" "+b0(i[0]):"as no adapter specified";throw new et("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:Uv};function fg(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $u(null,e)}function w0(e){return fg(e),e.headers=Tr.from(e.headers),e.data=dg.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),IT.getAdapter(e.adapter||Md.adapter)(e).then(function(r){return fg(e),r.data=dg.call(e,e.transformResponse,r),r.headers=Tr.from(r.headers),r},function(r){return xT(r)||(fg(e),r&&r.response&&(r.response.data=dg.call(e,e.transformResponse,r.response),r.response.headers=Tr.from(r.response.headers))),Promise.reject(r)})}const AT="1.8.3",Yp={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Yp[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const S0={};Yp.transitional=function(t,n,r){function s(i,o){return"[Axios v"+AT+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(t===!1)throw new et(s(o," has been removed"+(n?" in "+n:"")),et.ERR_DEPRECATED);return n&&!S0[o]&&(S0[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,a):!0}};Yp.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function FB(e,t,n){if(typeof e!="object")throw new et("options must be an object",et.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const a=e[i],l=a===void 0||o(a,i,e);if(l!==!0)throw new et("option "+i+" must be "+l,et.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new et("Unknown option "+i,et.ERR_BAD_OPTION)}}const Jf={assertOptions:FB,validators:Yp},Hs=Jf.validators;let Oa=class{constructor(t){this.defaults=t,this.interceptors={request:new f0,response:new f0}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
30
|
-
`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ha(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&Jf.assertOptions(r,{silentJSONParsing:Hs.transitional(Hs.boolean),forcedJSONParsing:Hs.transitional(Hs.boolean),clarifyTimeoutError:Hs.transitional(Hs.boolean)},!1),s!=null&&(le.isFunction(s)?n.paramsSerializer={serialize:s}:Jf.assertOptions(s,{encode:Hs.function,serialize:Hs.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Jf.assertOptions(n,{baseUrl:Hs.spelling("baseURL"),withXsrfToken:Hs.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&le.merge(i.common,i[n.method]);i&&le.forEach(["delete","get","head","post","put","patch","common"],v=>{delete i[v]}),n.headers=Tr.concat(o,i);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,d=0,f;if(!l){const v=[w0.bind(this),void 0];for(v.unshift.apply(v,a),v.push.apply(v,u),f=v.length,c=Promise.resolve(n);d<f;)c=c.then(v[d++],v[d++]);return c}f=a.length;let p=n;for(d=0;d<f;){const v=a[d++],m=a[d++];try{p=v(p)}catch(y){m.call(this,y);break}}try{c=w0.call(this,p)}catch(v){return Promise.reject(v)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=Ha(this.defaults,t);const n=CT(t.baseURL,t.url,t.allowAbsoluteUrls);return ST(n,t.params,t.paramsSerializer)}};le.forEach(["delete","get","head","options"],function(t){Oa.prototype[t]=function(n,r){return this.request(Ha(r||{},{method:t,url:n,data:(r||{}).data}))}});le.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,a){return this.request(Ha(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Oa.prototype[t]=n(),Oa.prototype[t+"Form"]=n(!0)});let LB=class OT{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,a){r.reason||(r.reason=new $u(i,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new OT(function(s){t=s}),cancel:t}}};function NB(e){return function(n){return e.apply(null,n)}}function BB(e){return le.isObject(e)&&e.isAxiosError===!0}const zv={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(zv).forEach(([e,t])=>{zv[t]=e});function MT(e){const t=new Oa(e),n=cT(Oa.prototype.request,t);return le.extend(n,Oa.prototype,t,{allOwnKeys:!0}),le.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return MT(Ha(e,s))},n}const fn=MT(Md);fn.Axios=Oa;fn.CanceledError=$u;fn.CancelToken=LB;fn.isCancel=xT;fn.VERSION=AT;fn.toFormData=Gp;fn.AxiosError=et;fn.Cancel=fn.CanceledError;fn.all=function(t){return Promise.all(t)};fn.spread=NB;fn.isAxiosError=BB;fn.mergeConfig=Ha;fn.AxiosHeaders=Tr;fn.formToJSON=e=>kT(le.isHTMLForm(e)?new FormData(e):e);fn.getAdapter=IT.getAdapter;fn.HttpStatusCode=zv;fn.default=fn;const{Axios:Aoe,AxiosError:DT,CanceledError:Ooe,isCancel:Moe,CancelToken:Doe,VERSION:$oe,all:Foe,Cancel:Loe,isAxiosError:Noe,spread:Boe,toFormData:Voe,AxiosHeaders:Uoe,HttpStatusCode:ga,formToJSON:zoe,getAdapter:Hoe,mergeConfig:joe}=fn;class mc extends Error{}mc.prototype.name="InvalidTokenError";function VB(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,n)=>{let r=n.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function UB(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return VB(t)}catch{return atob(t)}}function zB(e,t){if(typeof e!="string")throw new mc("Invalid token specified: must be a string");t||(t={});const n=t.header===!0?0:1,r=e.split(".")[n];if(typeof r!="string")throw new mc(`Invalid token specified: missing part #${n+1}`);let s;try{s=UB(r)}catch(i){throw new mc(`Invalid token specified: invalid base64 for part #${n+1} (${i.message})`)}try{return JSON.parse(s)}catch(i){throw new mc(`Invalid token specified: invalid json for part #${n+1} (${i.message})`)}}function HB(e,t={}){const{onError:n,fallbackValue:r=null}=t,s=(a,l)=>{try{return zB(a,l)}catch(u){return n==null||n(u),r}},i=T(()=>s(Ro(e),{header:!0})),o=T(()=>s(Ro(e)));return{header:i,payload:o}}class da{static async getLoginRequired(){return await(await Wn(!1,!1)).get("/api/auth/login-required")}static async postLogin(t,n){return await(await Wn(!1,!1)).post("/api/auth/login",{username:t,password:n})}static async logout(){return await(await Wn(!0,!1)).post("/api/auth/logout")}static async refreshLogin(t){return await(await Wn(!1,!1)).post("/api/auth/refresh",{refreshToken:t})}static async verifyLogin(){return await(await Wn(!0,!1)).post("/api/auth/verify")}static async registerAccount(t,n){return await(await Wn(!0,!1)).post("/api/auth/register",{username:t,password:n})}}const xr={IncorrectCredentials:"IncorrectCredentials",InvalidOrExpiredRefreshToken:"InvalidOrExpiredRefreshToken",InvalidOrExpiredAuthToken:"InvalidOrExpiredAuthToken",PasswordChangeRequired:"PasswordChangeRequired",LoginRequired:"LoginRequired",AccountNotVerified:"AccountNotVerified"};function Gb(e){switch(e){case xr.IncorrectCredentials:return"Incorrect credentials";case xr.InvalidOrExpiredRefreshToken:return"Invalid or expired refresh token";case xr.InvalidOrExpiredAuthToken:return"Invalid or expired auth token";case xr.PasswordChangeRequired:return"Password change required";case xr.LoginRequired:return"Login required";case xr.AccountNotVerified:return"Account not verified";default:return"Authentication error"}}const us=ps("auth",{state:()=>({isDemoMode:null,token:null,refreshToken:null,loginRequired:null,registration:null,wizardState:null,lastLogoutReason:null}),actions:{async checkAuthenticationRequirements(){return await da.getLoginRequired().then(e=>(this.loginRequired=e.data.loginRequired,this.wizardState=e.data.wizardState,this.registration=e.data.registration,this.isDemoMode=e.data.isDemoMode,{loginRequired:this.loginRequired,wizardState:this.wizardState,registration:this.registration})).catch(e=>{var t;throw console.error("authRequired: failed to check login required",(t=e.response)==null?void 0:t.status),e})},async login(e,t){return this.lastLogoutReason=null,await da.postLogin(e,t).then(n=>(this.setTokens(n.data.token,n.data.refreshToken),n.data)).catch(n=>{var r;throw console.error("login: failed to login",(r=n.response)==null?void 0:r.status),n})},async logout(e=!1,t){if(console.debug(`Logging out (calling server ${e})`),t&&(this.lastLogoutReason=t),e&&this.tokenClaims&&!this.isLoginExpired)try{await da.logout()}catch(n){console.error("Server could not process logout, but local logout was successful",n)}this.setIdToken(void 0),this.setRefreshToken(void 0)},async verifyOrRefreshLoginOnceOrLogout(){var e,t;try{return await da.verifyLogin(),{success:!0}}catch(n){console.error("[AuthStore.verifyOrRefreshLoginOnce]: failed to verify login",n);const r=n;if(!r.response||((e=r.response)==null?void 0:e.status)!==ga.Unauthorized)throw console.error("[AuthStore.verifyOrRefreshLoginOnce]: unknown error",r.status),n;const{reasonCode:s,url:i}=this.extractSpecialReasonCode(n);if(s)return await this.logout(!1,Gb(s)),console.error(`[AuthStore] 401 Unauthorized - emitting 'auth:${s}' with reason ${s}`),Br(`auth:${s}`).emit({url:i,error:r.message,reasonCode:s}),{success:!1,handled:!0};if(!this.hasRefreshToken)return{success:!1,handled:!1};try{await this.refreshLoginToken(),await da.verifyLogin()}catch(o){const a=o;if(((t=a.response)==null?void 0:t.status)===ga.Unauthorized)return await this.logout(!1),console.error("[AuthStore.verifyOrRefreshLoginOnce]: failed to refresh token",a.status),{success:!1,handled:!1};throw o}return{success:!0,handled:!1}}},extractSpecialReasonCode(e){var n,r,s;const t=(r=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:r.reasonCode;return t&&console.error("[AuthStore] 401 Unauthorized - Checking received reason code",t),t&&(t===xr.AccountNotVerified||t===xr.PasswordChangeRequired)?{reasonCode:t,url:(s=e==null?void 0:e.config)==null?void 0:s.url}:{reasonCode:null,url:null}},loadTokens(){this.token=localStorage.getItem("token"),this.refreshToken=localStorage.getItem("refreshToken")},async refreshLoginToken(){if(!this.refreshToken)throw new Error("refreshLoginToken: no refresh token");return await da.refreshLogin(this.refreshToken).then(e=>{var t;return(t=e==null?void 0:e.data)!=null&&t.token&&this.setIdToken(e.data.token),!0}).catch(e=>{var t,n,r;throw((t=e.response)==null?void 0:t.status)==ga.Unauthorized?(this.setTokens(void 0,void 0),console.error("refreshLoginToken: authentication error, failed to refresh tokens",(n=e.response)==null?void 0:n.status)):console.error("refreshLoginToken: unknown error, failed to refresh tokens",(r=e.response)==null?void 0:r.status),e})},setTokens(e,t){this.setIdToken(e),this.setRefreshToken(t)},setIdToken(e){e!=null&&e.length?(localStorage.setItem("token",e),this.token=e):localStorage.removeItem("token")},setRefreshToken(e){e!=null&&e.length?(localStorage.setItem("refreshToken",e),this.refreshToken=e):localStorage.removeItem("refreshToken")}},getters:{hasRefreshToken(){return!!this.refreshToken},isLoginExpired(){const e=this.tokenClaims;return e!=null&&e.exp?e.exp<Date.now()/1e3:!1},hasAuthToken(){return!!this.tokenClaims},tokenClaims(){if(!this.token)return null;const e=HB(this.token,{fallbackValue:null});return e?e.payload.value:null}}}),Ze=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,bt=globalThis,Yo=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ma="9.5.0";function sl(){return Xp(bt),bt}function Xp(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Ma,t[Ma]=t[Ma]||{}}function Qp(e,t,n=bt){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[Ma]=r[Ma]||{};return s[e]||(s[e]=t())}const jB="Sentry Logger ",Hv=["debug","info","warn","error","log","assert","trace"],Vh={};function Ji(e){if(!("console"in bt))return e();const t=bt.console,n={},r=Object.keys(Vh);r.forEach(s=>{const i=Vh[s];n[s]=t[s],t[s]=i});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function qB(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Yo?Hv.forEach(n=>{t[n]=(...r)=>{e&&Ji(()=>{bt.console[n](`${jB}[${n}]:`,...r)})}}):Hv.forEach(n=>{t[n]=()=>{}}),t}const Te=Qp("logger",qB),$T=50,ja="?",_0=/\(error: (.*)\)/,k0=/captureMessage|captureException/;function FT(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,s=0)=>{const i=[],o=n.split(`
|
|
31
|
-
`);for(let a=r;a<o.length;a++){const l=o[a];if(l.length>1024)continue;const u=_0.test(l)?l.replace(_0,"$1"):l;if(!u.match(/\S*Error: /)){for(const c of t){const d=c(u);if(d){i.push(d);break}}if(i.length>=$T+s)break}}return GB(i.slice(s))}}function WB(e){return Array.isArray(e)?FT(...e):e}function GB(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(of(t).function||"")&&t.pop(),t.reverse(),k0.test(of(t).function||"")&&(t.pop(),k0.test(of(t).function||"")&&t.pop()),t.slice(0,$T).map(n=>({...n,filename:n.filename||of(t).filename,function:n.function||ja}))}function of(e){return e[e.length-1]||{}}const hg="<anonymous>";function Ui(e){try{return!e||typeof e!="function"?hg:e.name||hg}catch{return hg}}function x0(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const Zf={},E0={};function Xo(e,t){Zf[e]=Zf[e]||[],Zf[e].push(t)}function Qo(e,t){if(!E0[e]){E0[e]=!0;try{t()}catch(n){Yo&&Te.error(`Error while instrumenting ${e}`,n)}}}function ls(e,t){const n=e&&Zf[e];if(n)for(const r of n)try{r(t)}catch(s){Yo&&Te.error(`Error while triggering instrumentation handler.
|
|
32
|
-
Type: ${e}
|
|
33
|
-
Name: ${Ui(r)}
|
|
34
|
-
Error:`,s)}}let pg=null;function LT(e){const t="error";Xo(t,e),Qo(t,KB)}function KB(){pg=bt.onerror,bt.onerror=function(e,t,n,r,s){return ls("error",{column:r,error:s,line:n,msg:e,url:t}),pg?pg.apply(this,arguments):!1},bt.onerror.__SENTRY_INSTRUMENTED__=!0}let mg=null;function NT(e){const t="unhandledrejection";Xo(t,e),Qo(t,YB)}function YB(){mg=bt.onunhandledrejection,bt.onunhandledrejection=function(e){return ls("unhandledrejection",e),mg?mg.apply(this,arguments):!0},bt.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const BT=Object.prototype.toString;function Kb(e){switch(BT.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return zi(e,Error)}}function Fu(e,t){return BT.call(e)===`[object ${t}]`}function VT(e){return Fu(e,"ErrorEvent")}function C0(e){return Fu(e,"DOMError")}function XB(e){return Fu(e,"DOMException")}function Di(e){return Fu(e,"String")}function Yb(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Xb(e){return e===null||Yb(e)||typeof e!="object"&&typeof e!="function"}function au(e){return Fu(e,"Object")}function Jp(e){return typeof Event<"u"&&zi(e,Event)}function QB(e){return typeof Element<"u"&&zi(e,Element)}function JB(e){return Fu(e,"RegExp")}function Zp(e){return!!(e!=null&&e.then&&typeof e.then=="function")}function ZB(e){return au(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function zi(e,t){try{return e instanceof t}catch{return!1}}function UT(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}const Qb=bt,eV=80;function Hi(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let i=0,o=0;const a=" > ",l=a.length;let u;const c=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||eV;for(;n&&i++<r&&(u=tV(n,c),!(u==="html"||i>1&&o+s.length*l+u.length>=d));)s.push(u),o+=u.length,n=n.parentNode;return s.reverse().join(a)}catch{return"<unknown>"}}function tV(e,t){const n=e,r=[];if(!(n!=null&&n.tagName))return"";if(Qb.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const s=t!=null&&t.length?t.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(s!=null&&s.length)s.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const o=n.className;if(o&&Di(o)){const a=o.split(/\s+/);for(const l of a)r.push(`.${l}`)}}const i=["aria-label","type","name","title","alt"];for(const o of i){const a=n.getAttribute(o);a&&r.push(`[${o}="${a}"]`)}return r.join("")}function Lu(){try{return Qb.document.location.href}catch{return""}}function zT(e){if(!Qb.HTMLElement)return null;let t=e;const n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function Bl(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function P0(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const s=e[r];try{UT(s)?n.push("[VueViewModel]"):n.push(String(s))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function nV(e,t,n=!1){return Di(e)?JB(t)?t.test(e):Di(t)?n?e===t:e.includes(t):!1:!1}function Io(e,t=[],n=!1){return t.some(r=>nV(e,r,n))}function Cr(e,t,n){if(!(t in e))return;const r=e[t],s=n(r);typeof s=="function"&&HT(s,r);try{e[t]=s}catch{Yo&&Te.log(`Failed to replace method "${t}" in object`,e)}}function Gr(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Yo&&Te.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function HT(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Gr(e,"__sentry_original__",t)}catch{}}function Jb(e){return e.__sentry_original__}function jT(e){if(Kb(e))return{message:e.message,name:e.name,stack:e.stack,...R0(e)};if(Jp(e)){const t={type:e.type,target:T0(e.target),currentTarget:T0(e.currentTarget),...R0(e)};return typeof CustomEvent<"u"&&zi(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function T0(e){try{return QB(e)?Hi(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function R0(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function rV(e,t=40){const n=Object.keys(jT(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return Bl(r,t);for(let s=n.length;s>0;s--){const i=n.slice(0,s).join(", ");if(!(i.length>t))return s===n.length?i:Bl(i,t)}return""}function vn(e){return jv(e,new Map)}function jv(e,t){if(sV(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const s of Object.getOwnPropertyNames(e))typeof e[s]<"u"&&(r[s]=jv(e[s],t));return r}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const r=[];return t.set(e,r),e.forEach(s=>{r.push(jv(s,t))}),r}return e}function sV(e){if(!au(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const qT=1e3;function Dd(){return Date.now()/qT}function iV(){const{performance:e}=bt;if(!(e!=null&&e.now))return Dd;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/qT}const er=iV();let gg;function oV(){var c;const{performance:e}=bt;if(!(e!=null&&e.now))return[void 0,"none"];const t=3600*1e3,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,i=s<t,o=(c=e.timing)==null?void 0:c.navigationStart,l=typeof o=="number"?Math.abs(o+n-r):t,u=l<t;return i||u?s<=l?[e.timeOrigin,"timeOrigin"]:[o,"navigationStart"]:[r,"dateNow"]}function Xr(){return gg||(gg=oV()),gg[0]}function aV(){const e=bt;return e.crypto||e.msCrypto}function qr(e=aV()){let t=()=>Math.random()*16;try{if(e!=null&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e!=null&&e.getRandomValues&&(t=()=>{const n=new Uint8Array(1);return e.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(t()&15)>>n/4).toString(16))}function WT(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)==null?void 0:n[0]}function co(e){const{message:t,event_id:n}=e;if(t)return t;const r=WT(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function qv(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],i=s[0]=s[0]||{};i.value||(i.value=t||""),i.type||(i.type="Error")}function lu(e,t){const n=WT(e);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...t},t&&"data"in t){const i={...s==null?void 0:s.data,...t.data};n.mechanism.data=i}}function I0(e){if(lV(e))return!0;try{Gr(e,"__sentry_captured__",!0)}catch{}return!1}function lV(e){try{return e.__sentry_captured__}catch{}}var Pi;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})(Pi||(Pi={}));function ji(e){return new Lo(t=>{t(e)})}function Uh(e){return new Lo((t,n)=>{n(e)})}class Lo{constructor(t){this._state=Pi.PENDING,this._handlers=[],this._runExecutor(t)}then(t,n){return new Lo((r,s)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(o){s(o)}},i=>{if(!n)s(i);else try{r(n(i))}catch(o){s(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new Lo((n,r)=>{let s,i;return this.then(o=>{i=!1,s=o,t&&t()},o=>{i=!0,s=o,t&&t()}).then(()=>{if(i){r(s);return}n(s)})})}_executeHandlers(){if(this._state===Pi.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Pi.RESOLVED&&n[1](this._value),this._state===Pi.REJECTED&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(i,o)=>{if(this._state===Pi.PENDING){if(Zp(o)){o.then(r,s);return}this._state=i,this._value=o,this._executeHandlers()}},r=i=>{n(Pi.RESOLVED,i)},s=i=>{n(Pi.REJECTED,i)};try{t(r,s)}catch(i){s(i)}}}function uV(e){const t=er(),n={sid:qr(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>dV(n)};return e&&uu(n,e),n}function uu(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||er(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:qr()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function cV(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),uu(e,n)}function dV(e){return vn({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}function No(){return qr()}function $d(){return qr().substring(16)}function Fd(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=Fd(r[s],t[s],n-1));return r}const Wv="_sentrySpan";function Zc(e,t){t?Gr(e,Wv,t):delete e[Wv]}function zh(e){return e[Wv]}const fV=100;class ui{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:No(),sampleRand:Math.random()}}clone(){const t=new ui;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,Zc(t,zh(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&uu(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,r=n instanceof ui?n.getScopeData():au(n)?t:void 0,{tags:s,extra:i,user:o,contexts:a,level:l,fingerprint:u=[],propagationContext:c}=r||{};return this._tags={...this._tags,...s},this._extra={...this._extra,...i},this._contexts={...this._contexts,...a},o&&Object.keys(o).length&&(this._user=o),l&&(this._level=l),u.length&&(this._fingerprint=u),c&&(this._propagationContext=c),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,Zc(this,void 0),this._attachments=[],this.setPropagationContext({traceId:No(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){var i;const r=typeof n=="number"?n:fV;if(r<=0)return this;const s={timestamp:Dd(),...t};return this._breadcrumbs.push(s),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),(i=this._client)==null||i.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:zh(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Fd(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=(n==null?void 0:n.event_id)||qr();if(!this._client)return Te.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureMessage(t,n,r){const s=(r==null?void 0:r.event_id)||qr();if(!this._client)return Te.warn("No client configured on scope - will not capture message!"),s;const i=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:s},this),s}captureEvent(t,n){const r=(n==null?void 0:n.event_id)||qr();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(Te.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function hV(){return Qp("defaultCurrentScope",()=>new ui)}function pV(){return Qp("defaultIsolationScope",()=>new ui)}class mV{constructor(t,n){let r;t?r=t:r=new ui;let s;n?s=n:s=new ui,this._stack=[{scope:r}],this._isolationScope=s}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(s){throw this._popScope(),s}return Zp(r)?r.then(s=>(this._popScope(),s),s=>{throw this._popScope(),s}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function cu(){const e=sl(),t=Xp(e);return t.stack=t.stack||new mV(hV(),pV())}function gV(e){return cu().withScope(e)}function vV(e,t){const n=cu();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function A0(e){return cu().withScope(()=>e(cu().getIsolationScope()))}function yV(){return{withIsolationScope:A0,withScope:gV,withSetScope:vV,withSetIsolationScope:(e,t)=>A0(t),getCurrentScope:()=>cu().getScope(),getIsolationScope:()=>cu().getIsolationScope()}}function Nu(e){const t=Xp(e);return t.acs?t.acs:yV()}function Zt(){const e=sl();return Nu(e).getCurrentScope()}function gi(){const e=sl();return Nu(e).getIsolationScope()}function bV(){return Qp("globalScope",()=>new ui)}function Zb(...e){const t=sl(),n=Nu(t);if(e.length===2){const[r,s]=e;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(e[0])}function ct(){return Zt().getClient()}function wV(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=t;return vn({trace_id:n,span_id:s||$d(),parent_span_id:r})}const zr="sentry.source",GT="sentry.sample_rate",qa="sentry.op",ln="sentry.origin",Gv="sentry.idle_span_finish_reason",em="sentry.measurement_unit",tm="sentry.measurement_value",O0="sentry.custom_span_name",ew="sentry.profile_id",Ld="sentry.exclusive_time",SV=0,KT=1,Pn=2;function _V(e){if(e<400&&e>=100)return{code:KT};if(e>=400&&e<500)switch(e){case 401:return{code:Pn,message:"unauthenticated"};case 403:return{code:Pn,message:"permission_denied"};case 404:return{code:Pn,message:"not_found"};case 409:return{code:Pn,message:"already_exists"};case 413:return{code:Pn,message:"failed_precondition"};case 429:return{code:Pn,message:"resource_exhausted"};case 499:return{code:Pn,message:"cancelled"};default:return{code:Pn,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:Pn,message:"unimplemented"};case 503:return{code:Pn,message:"unavailable"};case 504:return{code:Pn,message:"deadline_exceeded"};default:return{code:Pn,message:"internal_error"}}return{code:Pn,message:"unknown_error"}}function YT(e,t){e.setAttribute("http.response.status_code",t);const n=_V(t);n.message!=="unknown_error"&&e.setStatus(n)}const XT="_sentryScope",QT="_sentryIsolationScope";function kV(e,t,n){e&&(Gr(e,QT,n),Gr(e,XT,t))}function Hh(e){return{scope:e[XT],isolationScope:e[QT]}}function Wa(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const tw="sentry-",xV=/^sentry-/,EV=8192;function JT(e){const t=PV(e);if(!t)return;const n=Object.entries(t).reduce((r,[s,i])=>{if(s.match(xV)){const o=s.slice(tw.length);r[o]=i}return r},{});if(Object.keys(n).length>0)return n}function CV(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,s])=>(s&&(n[`${tw}${r}`]=s),n),{});return TV(t)}function PV(e){if(!(!e||!Di(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=M0(n);return Object.entries(r).forEach(([s,i])=>{t[s]=i}),t},{}):M0(e)}function M0(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function TV(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],s)=>{const i=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,o=s===0?i:`${t},${i}`;return o.length>EV?(Yo&&Te.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):o},"")}const ZT=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function RV(e){if(!e)return;const t=e.match(ZT);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function IV(e,t){const n=RV(e),r=JT(t);if(!(n!=null&&n.traceId))return{traceId:No(),sampleRand:Math.random()};const s=AV(n,r);r&&(r.sample_rand=s.toString());const{traceId:i,parentSpanId:o,parentSampled:a}=n;return{traceId:i,parentSpanId:o,sampled:a,dsc:r||{},sampleRand:s}}function eR(e=No(),t=$d(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function AV(e,t){const n=Wa(t==null?void 0:t.sample_rand);if(n!==void 0)return n;const r=Wa(t==null?void 0:t.sample_rate);return r&&(e==null?void 0:e.parentSampled)!==void 0?e.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}const tR=0,nw=1;let D0=!1;function OV(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:i,status:o,origin:a,links:l}=kt(e);return vn({parent_span_id:i,span_id:t,trace_id:n,data:r,op:s,status:o,origin:a,links:l})}function MV(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),s=r?t:kt(e).parent_span_id,i=Hh(e).scope,o=r?(i==null?void 0:i.getPropagationContext().propagationSpanId)||$d():t;return vn({parent_span_id:s,span_id:o,trace_id:n})}function DV(e){const{traceId:t,spanId:n}=e.spanContext(),r=il(e);return eR(t,n,r)}function nR(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...s},attributes:i})=>({span_id:t,trace_id:n,sampled:r===nw,attributes:i,...s}))}function Da(e){return typeof e=="number"?$0(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?$0(e.getTime()):er()}function $0(e){return e>9999999999?e/1e3:e}function kt(e){if(FV(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if($V(e)){const{attributes:r,startTime:s,name:i,endTime:o,parentSpanId:a,status:l,links:u}=e;return vn({span_id:t,trace_id:n,data:r,description:i,parent_span_id:a,start_timestamp:Da(s),timestamp:Da(o)||void 0,status:rR(l),op:r[qa],origin:r[ln],links:nR(u)})}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function $V(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function FV(e){return typeof e.getSpanJSON=="function"}function il(e){const{traceFlags:t}=e.spanContext();return t===nw}function rR(e){if(!(!e||e.code===SV))return e.code===KT?"ok":e.message||"unknown_error"}const $a="_sentryChildSpans",Kv="_sentryRootSpan";function sR(e,t){const n=e[Kv]||e;Gr(t,Kv,n),e[$a]?e[$a].add(t):Gr(e,$a,new Set([t]))}function LV(e,t){e[$a]&&e[$a].delete(t)}function eh(e){const t=new Set;function n(r){if(!t.has(r)&&il(r)){t.add(r);const s=r[$a]?Array.from(r[$a]):[];for(const i of s)n(i)}}return n(e),Array.from(t)}function tr(e){return e[Kv]||e}function Un(){const e=sl(),t=Nu(e);return t.getActiveSpan?t.getActiveSpan():zh(Zt())}function Yv(){D0||(Ji(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),D0=!0)}let F0=!1;function NV(){F0||(F0=!0,LT(Xv),NT(Xv))}function Xv(){const e=Un(),t=e&&tr(e);if(t){const n="internal_error";Ze&&Te.log(`[Tracing] Root span: ${n} -> Global error occurred`),t.setStatus({code:Pn,message:n})}}Xv.tag="sentry_tracingErrorCallback";function qi(e){var n;if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||((n=ct())==null?void 0:n.getOptions());return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}const rw="production",iR="_frozenDsc";function th(e,t){Gr(e,iR,t)}function oR(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s=vn({environment:n.environment||rw,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",s),s}function aR(e,t){const n=t.getPropagationContext();return n.dsc||oR(n.traceId,e)}function Wi(e){var v;const t=ct();if(!t)return{};const n=tr(e),r=kt(n),s=r.data,i=n.spanContext().traceState,o=(i==null?void 0:i.get("sentry.sample_rate"))??s[GT];function a(m){return(typeof o=="number"||typeof o=="string")&&(m.sample_rate=`${o}`),m}const l=n[iR];if(l)return a(l);const u=i==null?void 0:i.get("sentry.dsc"),c=u&&JT(u);if(c)return a(c);const d=oR(e.spanContext().traceId,t),f=s[zr],p=r.description;return f!=="url"&&p&&(d.transaction=p),qi()&&(d.sampled=String(il(n)),d.sample_rand=(i==null?void 0:i.get("sentry.sample_rand"))??((v=Hh(n).scope)==null?void 0:v.getPropagationContext().sampleRand.toString())),a(d),t.emit("createDsc",d,n),d}class Ga{constructor(t={}){this._traceId=t.traceId||No(),this._spanId=t.spanId||$d()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:tR}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function BV(e){if(!Ze)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=kt(e),{spanId:s}=e.spanContext(),i=il(e),o=tr(e),a=o===e,l=`[Tracing] Starting ${i?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${s}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:c,description:d}=kt(o);u.push(`root ID: ${o.spanContext().spanId}`),c&&u.push(`root op: ${c}`),d&&u.push(`root description: ${d}`)}Te.log(`${l}
|
|
35
|
-
${u.join(`
|
|
36
|
-
`)}`)}function VV(e){if(!Ze)return;const{description:t="< unknown name >",op:n="< unknown op >"}=kt(e),{spanId:r}=e.spanContext(),i=tr(e)===e,o=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${t}" with ID ${r}`;Te.log(o)}function UV(e,t,n){if(!qi(e))return[!1];let r,s;typeof e.tracesSampler=="function"?(s=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),r=!0):t.parentSampled!==void 0?s=t.parentSampled:typeof e.tracesSampleRate<"u"&&(s=e.tracesSampleRate,r=!0);const i=Wa(s);if(i===void 0)return Ze&&Te.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(s)} of type ${JSON.stringify(typeof s)}.`),[!1];if(!i)return Ze&&Te.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,i,r];const o=n<i;return o||Ze&&Te.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),[o,i,r]}const zV=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function HV(e){return e==="http"||e==="https"}function nm(e,t=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${o}`}function jV(e){const t=zV.exec(e);if(!t){Ji(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",i="",o="",a=""]=t.slice(1);let l="",u=a;const c=u.split("/");if(c.length>1&&(l=c.slice(0,-1).join("/"),u=c.pop()),u){const d=u.match(/^\d+/);d&&(u=d[0])}return lR({host:i,pass:s,path:l,projectId:u,port:o,protocol:n,publicKey:r})}function lR(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function qV(e){if(!Yo)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(Te.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?HV(r)?t&&isNaN(parseInt(t,10))?(Te.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(Te.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(Te.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function WV(e){const t=typeof e=="string"?jV(e):lR(e);if(!(!t||!qV(t)))return t}function _s(e,t=100,n=1/0){try{return Qv("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function uR(e,t=3,n=100*1024){const r=_s(e,t);return XV(r)>n?uR(e,t-1,n):r}function Qv(e,t,n=1/0,r=1/0,s=QV()){const[i,o]=s;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=GV(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const l=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(l===0)return a.replace("object ","");if(i(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const p=u.toJSON();return Qv("",p,l-1,r,s)}catch{}const c=Array.isArray(t)?[]:{};let d=0;const f=jT(t);for(const p in f){if(!Object.prototype.hasOwnProperty.call(f,p))continue;if(d>=r){c[p]="[MaxProperties ~]";break}const v=f[p];c[p]=Qv(p,v,l-1,r,s),d++}return o(t),c}function GV(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(UT(t))return"[VueViewModel]";if(ZB(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Ui(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=KV(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function KV(e){const t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:"null prototype"}function YV(e){return~-encodeURI(e).split(/%..|./).length}function XV(e){return YV(JSON.stringify(e))}function QV(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function Bu(e,t=[]){return[e,t]}function JV(e,t){const[n,r]=e;return[n,[...r,t]]}function L0(e,t){const n=e[1];for(const r of n){const s=r[0].type;if(t(r,s))return!0}return!1}function Jv(e){const t=Xp(bt);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function ZV(e){const[t,n]=e;let r=JSON.stringify(t);function s(i){typeof r=="string"?r=typeof i=="string"?r+i:[Jv(r),i]:r.push(typeof i=="string"?Jv(i):i)}for(const i of n){const[o,a]=i;if(s(`
|
|
37
|
-
${JSON.stringify(o)}
|
|
38
|
-
`),typeof a=="string"||a instanceof Uint8Array)s(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(_s(a))}s(l)}}return typeof r=="string"?r:eU(r)}function eU(e){const t=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function tU(e){return[{type:"span"},e]}function nU(e){const t=typeof e.data=="string"?Jv(e.data):e.data;return[vn({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const rU={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",otel_log:"log_item"};function N0(e){return rU[e]}function sw(e){if(!(e!=null&&e.sdk))return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function cR(e,t,n,r){var i;const s=(i=e.sdkProcessingMetadata)==null?void 0:i.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:nm(r)},...s&&{trace:vn({...s})}}}function sU(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function iU(e,t,n,r){const s=sw(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:nm(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Bu(i,[o])}function oU(e,t,n,r){const s=sw(n),i=e.type&&e.type!=="replay_event"?e.type:"event";sU(e,n==null?void 0:n.sdk);const o=cR(e,s,r,t);return delete e.sdkProcessingMetadata,Bu(o,[[{type:i},e]])}function aU(e,t){function n(c){return!!c.trace_id&&!!c.public_key}const r=Wi(e[0]),s=t==null?void 0:t.getDsn(),i=t==null?void 0:t.getOptions().tunnel,o={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!i&&s&&{dsn:nm(s)}},a=t==null?void 0:t.getOptions().beforeSendSpan,l=a?c=>{const d=kt(c),f=a(d);return f||(Yv(),d)}:kt,u=[];for(const c of e){const d=l(c);d&&u.push(tU(d))}return Bu(o,u)}function lU(e,t,n,r=Un()){const s=r&&tr(r);s&&(Ze&&Te.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),s.addEvent(e,{[tm]:t,[em]:n}))}function B0(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},s=r[em],i=r[tm];typeof s=="string"&&typeof i=="number"&&(t[n.name]={value:i,unit:s})}),t}const V0=1e3;class iw{constructor(t={}){this._traceId=t.traceId||No(),this._spanId=t.spanId||$d(),this._startTime=t.startTimestamp||er(),this._links=t.links,this._attributes={},this.setAttributes({[ln]:"manual",[qa]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?nw:tR}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=Da(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(zr,"custom"),this}end(t){this._endTime||(this._endTime=Da(t),VV(this),this._onSpanEnded())}getSpanJSON(){return vn({data:this._attributes,description:this._name,op:this._attributes[qa],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:rR(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[ln],profile_id:this._attributes[ew],exclusive_time:this._attributes[Ld],measurements:B0(this._events),is_segment:this._isStandaloneSpan&&tr(this)===this||void 0,segment_id:this._isStandaloneSpan?tr(this).spanContext().spanId:void 0,links:nR(this._links)})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){Ze&&Te.log("[Tracing] Adding an event to span:",t);const s=U0(n)?n:r||er(),i=U0(n)?{}:n||{},o={name:t,time:Da(s),attributes:i};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=ct();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===tr(this)))return;if(this._isStandaloneSpan){this._sampled?cU(aU([this],t)):(Ze&&Te.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(Hh(this).scope||Zt()).captureEvent(r)}_convertSpanToTransaction(){if(!z0(kt(this)))return;this._name||(Ze&&Te.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=Hh(this);if(this._sampled!==!0)return;const s=eh(this).filter(u=>u!==this&&!uU(u)).map(u=>kt(u)).filter(z0),i=this._attributes[zr];delete this._attributes[O0],s.forEach(u=>{delete u.data[O0]});const o={contexts:{trace:OV(this)},spans:s.length>V0?s.sort((u,c)=>u.start_timestamp-c.start_timestamp).slice(0,V0):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,...vn({dynamicSamplingContext:Wi(this)})},...i&&{transaction_info:{source:i}}},a=B0(this._events);return a&&Object.keys(a).length&&(Ze&&Te.log("[Measurements] Adding measurements to transaction event",JSON.stringify(a,void 0,2)),o.measurements=a),o}}function U0(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function z0(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function uU(e){return e instanceof iw&&e.isStandaloneSpan()}function cU(e){const t=ct();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}const dR="__SENTRY_SUPPRESS_TRACING__";function Ka(e){const t=hR();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=fU(e),{forceTransaction:r,parentSpan:s}=e;return(e.scope?o=>Zb(e.scope,o):s!==void 0?o=>fR(s,o):o=>o())(()=>{const o=Zt(),a=pU(o);return e.onlyIfParent&&!a?new Ga:dU({parentSpan:a,spanArguments:n,forceTransaction:r,scope:o})})}function fR(e,t){const n=hR();return n.withActiveSpan?n.withActiveSpan(e,t):Zb(r=>(Zc(r,e||void 0),t(r)))}function dU({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!qi()){const o=new Ga;if(n||!e){const a={sampled:"false",sample_rate:"0",transaction:t.name,...Wi(o)};th(o,a)}return o}const s=gi();let i;if(e&&!n)i=hU(e,r,t),sR(e,i);else if(e){const o=Wi(e),{traceId:a,spanId:l}=e.spanContext(),u=il(e);i=H0({traceId:a,parentSpanId:l,...t},r,u),th(i,o)}else{const{traceId:o,dsc:a,parentSpanId:l,sampled:u}={...s.getPropagationContext(),...r.getPropagationContext()};i=H0({traceId:o,parentSpanId:l,...t},r,u),a&&th(i,a)}return BV(i),kV(i,r,s),i}function fU(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=Da(e.startTime),delete r.startTime,r}return n}function hR(){const e=sl();return Nu(e)}function H0(e,t,n){var f;const r=ct(),s=(r==null?void 0:r.getOptions())||{},{name:i="",attributes:o}=e,a=t.getPropagationContext(),[l,u,c]=t.getScopeData().sdkProcessingMetadata[dR]?[!1]:UV(s,{name:i,parentSampled:n,attributes:o,parentSampleRate:Wa((f=a.dsc)==null?void 0:f.sample_rate)},a.sampleRand),d=new iw({...e,attributes:{[zr]:"custom",[GT]:u!==void 0&&c?u:void 0,...e.attributes},sampled:l});return!l&&r&&(Ze&&Te.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",d),d}function hU(e,t,n){const{spanId:r,traceId:s}=e.spanContext(),i=t.getScopeData().sdkProcessingMetadata[dR]?!1:il(e),o=i?new iw({...n,parentSpanId:r,traceId:s,sampled:i}):new Ga({traceId:s});sR(e,o);const a=ct();return a&&(a.emit("spanStart",o),n.endTimestamp&&a.emit("spanEnd",o)),o}function pU(e){const t=zh(e);if(!t)return;const n=ct();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?tr(t):t}const nh={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},mU="heartbeatFailed",gU="idleTimeout",vU="finalTimeout",yU="externalFinish";function pR(e,t={}){const n=new Map;let r=!1,s,i=yU,o=!t.disableAutoFinish;const a=[],{idleTimeout:l=nh.idleTimeout,finalTimeout:u=nh.finalTimeout,childSpanTimeout:c=nh.childSpanTimeout,beforeSpanEnd:d}=t,f=ct();if(!f||!qi()){const C=new Ga,R={sample_rate:"0",sampled:"false",...Wi(C)};return th(C,R),C}const p=Zt(),v=Un(),m=bU(e);m.end=new Proxy(m.end,{apply(C,R,k){if(d&&d(m),R instanceof Ga)return;const[E,...I]=k,A=E||er(),O=Da(A),L=eh(m).filter(W=>W!==m);if(!L.length)return S(O),Reflect.apply(C,R,[O,...I]);const M=L.map(W=>kt(W).timestamp).filter(W=>!!W),z=M.length?Math.max(...M):void 0,H=kt(m).start_timestamp,G=Math.min(H?H+u/1e3:1/0,Math.max(H||-1/0,Math.min(O,z||1/0)));return S(G),Reflect.apply(C,R,[G,...I])}});function y(){s&&(clearTimeout(s),s=void 0)}function b(C){y(),s=setTimeout(()=>{!r&&n.size===0&&o&&(i=gU,m.end(C))},l)}function w(C){s=setTimeout(()=>{!r&&o&&(i=mU,m.end(C))},c)}function x(C){y(),n.set(C,!0);const R=er();w(R+c/1e3)}function P(C){if(n.has(C)&&n.delete(C),n.size===0){const R=er();b(R+l/1e3)}}function S(C){r=!0,n.clear(),a.forEach(O=>O()),Zc(p,v);const R=kt(m),{start_timestamp:k}=R;if(!k)return;R.data[Gv]||m.setAttribute(Gv,i),Te.log(`[Tracing] Idle span "${R.op}" finished`);const I=eh(m).filter(O=>O!==m);let A=0;I.forEach(O=>{O.isRecording()&&(O.setStatus({code:Pn,message:"cancelled"}),O.end(C),Ze&&Te.log("[Tracing] Cancelling span since span ended early",JSON.stringify(O,void 0,2)));const L=kt(O),{timestamp:M=0,start_timestamp:z=0}=L,H=z<=C,G=(u+l)/1e3,W=M-z<=G;if(Ze){const Y=JSON.stringify(O,void 0,2);H?W||Te.log("[Tracing] Discarding span since it finished after idle span final timeout",Y):Te.log("[Tracing] Discarding span since it happened after idle span was finished",Y)}(!W||!H)&&(LV(m,O),A++)}),A>0&&m.setAttribute("sentry.idle_span_discarded_spans",A)}return a.push(f.on("spanStart",C=>{if(r||C===m||kt(C).timestamp)return;eh(m).includes(C)&&x(C.spanContext().spanId)})),a.push(f.on("spanEnd",C=>{r||P(C.spanContext().spanId)})),a.push(f.on("idleSpanEnableAutoFinish",C=>{C===m&&(o=!0,b(),n.size&&w())})),t.disableAutoFinish||b(),setTimeout(()=>{r||(m.setStatus({code:Pn,message:"deadline_exceeded"}),i=vU,m.end())},u),m}function bU(e){const t=Ka(e);return Zc(Zt(),t),Ze&&Te.log("[Tracing] Started span is an idle span"),t}function Zv(e,t,n,r=0){return new Lo((s,i)=>{const o=e[r];if(t===null||typeof o!="function")s(t);else{const a=o({...t},n);Ze&&o.id&&a===null&&Te.log(`Event processor "${o.id}" dropped event`),Zp(a)?a.then(l=>Zv(e,l,n,r+1).then(s)).then(null,i):Zv(e,a,n,r+1).then(s).then(null,i)}})}let af,j0,lf;function wU(e){const t=bt._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return lf&&n.length===j0||(j0=n.length,lf=n.reduce((r,s)=>{af||(af={});const i=af[s];if(i)r[i[0]]=i[1];else{const o=e(s);for(let a=o.length-1;a>=0;a--){const l=o[a],u=l==null?void 0:l.filename,c=t[s];if(u&&c){r[u]=c,af[s]=[u,c];break}}}return r},{})),lf}function SU(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=t;_U(e,t),r&&EU(e,r),CU(e,n),kU(e,s),xU(e,i)}function q0(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,sdkProcessingMetadata:a,breadcrumbs:l,fingerprint:u,eventProcessors:c,attachments:d,propagationContext:f,transactionName:p,span:v}=t;uf(e,"extra",n),uf(e,"tags",r),uf(e,"user",s),uf(e,"contexts",i),e.sdkProcessingMetadata=Fd(e.sdkProcessingMetadata,a,2),o&&(e.level=o),p&&(e.transactionName=p),v&&(e.span=v),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),c.length&&(e.eventProcessors=[...e.eventProcessors,...c]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...f}}function uf(e,t,n){e[t]=Fd(e[t],n,1)}function _U(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:a}=t,l=vn(n);Object.keys(l).length&&(e.extra={...l,...e.extra});const u=vn(r);Object.keys(u).length&&(e.tags={...u,...e.tags});const c=vn(s);Object.keys(c).length&&(e.user={...c,...e.user});const d=vn(i);Object.keys(d).length&&(e.contexts={...d,...e.contexts}),o&&(e.level=o),a&&e.type!=="transaction"&&(e.transaction=a)}function kU(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function xU(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function EU(e,t){e.contexts={trace:MV(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Wi(t),...e.sdkProcessingMetadata};const n=tr(t),r=kt(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function CU(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}function mR(e,t,n,r,s,i){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,l={...t,event_id:t.event_id||n.event_id||qr(),timestamp:t.timestamp||Dd()},u=n.integrations||e.integrations.map(y=>y.name);PU(l,e),IU(l,u),s&&s.emit("applyFrameMetadata",t),t.type===void 0&&TU(l,e.stackParser);const c=OU(r,n.captureContext);n.mechanism&&lu(l,n.mechanism);const d=s?s.getEventProcessors():[],f=bV().getScopeData();if(i){const y=i.getScopeData();q0(f,y)}if(c){const y=c.getScopeData();q0(f,y)}const p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),SU(l,f);const v=[...d,...f.eventProcessors];return Zv(v,l,n).then(y=>(y&&RU(y),typeof o=="number"&&o>0?AU(y,o,a):y))}function PU(e,t){var l,u;const{environment:n,release:r,dist:s,maxValueLength:i=250}=t;e.environment=e.environment||n||rw,!e.release&&r&&(e.release=r),!e.dist&&s&&(e.dist=s),e.message&&(e.message=Bl(e.message,i));const o=(u=(l=e.exception)==null?void 0:l.values)==null?void 0:u[0];o!=null&&o.value&&(o.value=Bl(o.value,i));const a=e.request;a!=null&&a.url&&(a.url=Bl(a.url,i))}function TU(e,t){var r,s;const n=wU(t);(s=(r=e.exception)==null?void 0:r.values)==null||s.forEach(i=>{var o,a;(a=(o=i.stacktrace)==null?void 0:o.frames)==null||a.forEach(l=>{l.filename&&(l.debug_id=n[l.filename])})})}function RU(e){var r,s;const t={};if((s=(r=e.exception)==null?void 0:r.values)==null||s.forEach(i=>{var o,a;(a=(o=i.stacktrace)==null?void 0:o.frames)==null||a.forEach(l=>{l.debug_id&&(l.abs_path?t[l.abs_path]=l.debug_id:l.filename&&(t[l.filename]=l.debug_id),delete l.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([i,o])=>{n.push({type:"sourcemap",code_file:i,debug_id:o})})}function IU(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function AU(e,t,n){var s,i;if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:_s(o.data,t,n)}}))},...e.user&&{user:_s(e.user,t,n)},...e.contexts&&{contexts:_s(e.contexts,t,n)},...e.extra&&{extra:_s(e.extra,t,n)}};return(s=e.contexts)!=null&&s.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=_s(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:_s(o.data,t,n)}}))),(i=e.contexts)!=null&&i.flags&&r.contexts&&(r.contexts.flags=_s(e.contexts.flags,3,n)),r}function OU(e,t){if(!t)return e;const n=e?e.clone():new ui;return n.update(t),n}function MU(e){if(e)return DU(e)?{captureContext:e}:FU(e)?{captureContext:e}:e}function DU(e){return e instanceof ui||typeof e=="function"}const $U=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function FU(e){return Object.keys(e).some(t=>$U.includes(t))}function li(e,t){return Zt().captureException(e,MU(t))}function gR(e,t){return Zt().captureEvent(e,t)}function LU(e,t){gi().setContext(e,t)}function NU(){const e=ct();return(e==null?void 0:e.getOptions().enabled)!==!1&&!!(e!=null&&e.getTransport())}function BU(e){gi().addEventProcessor(e)}function W0(e){const t=gi(),n=Zt(),{userAgent:r}=bt.navigator||{},s=uV({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),i=t.getSession();return(i==null?void 0:i.status)==="ok"&&uu(i,{status:"exited"}),vR(),t.setSession(s),s}function vR(){const e=gi(),n=Zt().getSession()||e.getSession();n&&cV(n),yR(),e.setSession()}function yR(){const e=gi(),t=ct(),n=e.getSession();n&&t&&t.captureSession(n)}function G0(e=!1){if(e){vR();return}yR()}const VU="7";function UU(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function zU(e){return`${UU(e)}${e.projectId}/envelope/`}function HU(e,t){const n={sentry_version:VU};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function jU(e,t,n){return t||`${zU(e)}?${HU(e,n)}`}const K0=[];function qU(e){const t={};return e.forEach(n=>{const{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function WU(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(s=>{s.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const s=n(t);r=Array.isArray(s)?s:[s]}else r=t;return qU(r)}function GU(e,t){const n={};return t.forEach(r=>{r&&bR(e,r,n)}),n}function Y0(e,t){for(const n of t)n!=null&&n.afterAllSetup&&n.afterAllSetup(e)}function bR(e,t,n){if(n[t.name]){Ze&&Te.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,K0.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),K0.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,i)=>r(s,i,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=Object.assign((i,o)=>r(i,o,e),{id:t.name});e.addEventProcessor(s)}Ze&&Te.log(`Integration installed: ${t.name}`)}function KU(e,t,n){const r=[{type:"client_report"},{timestamp:Dd(),discarded_events:e}];return Bu(t?{dsn:t}:{},[r])}class xs extends Error{constructor(t,n="warn"){super(t),this.message=t,this.logLevel=n}}function wR(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n!=null&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function YU(e){var l;const{trace_id:t,parent_span_id:n,span_id:r,status:s,origin:i,data:o,op:a}=((l=e.contexts)==null?void 0:l.trace)??{};return vn({data:o??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:s,timestamp:e.timestamp,trace_id:t??"",origin:i,profile_id:o==null?void 0:o[ew],exclusive_time:o==null?void 0:o[Ld],measurements:e.measurements,is_segment:!0})}function XU(e){const t={type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[ew]:e.profile_id},...e.exclusive_time&&{[Ld]:e.exclusive_time}}}},measurements:e.measurements};return vn(t)}const X0="Not capturing exception because it's already been captured.",Q0="Discarded session because of missing or non-string release";class QU{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=WV(t.dsn):Ze&&Te.warn("No DSN provided, client will not send events."),this._dsn){const n=jU(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){const s=qr();if(I0(t))return Ze&&Te.log(X0),s;const i={event_id:s,...n};return this._process(this.eventFromException(t,i).then(o=>this._captureEvent(o,i,r))),i.event_id}captureMessage(t,n,r,s){const i={event_id:qr(),...r},o=Yb(t)?t:String(t),a=Xb(t)?this.eventFromMessage(o,n,i):this.eventFromException(t,i);return this._process(a.then(l=>this._captureEvent(l,i,s))),i.event_id}captureEvent(t,n,r){const s=qr();if(n!=null&&n.originalException&&I0(n.originalException))return Ze&&Te.log(X0),s;const i={event_id:s,...n},o=t.sdkProcessingMetadata||{},a=o.capturedSpanScope,l=o.capturedSpanIsolationScope;return this._process(this._captureEvent(t,i,a||r,l)),i.event_id}captureSession(t){this.sendSession(t),uu(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(s=>r&&s))):ji(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];bR(this,t,this._integrations),n||Y0(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=oU(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=JV(r,nU(i));const s=this.sendEnvelope(r);s&&s.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){const{release:n,environment:r=rw}=this._options;if("aggregates"in t){const i=t.attrs||{};if(!i.release&&!n){Ze&&Te.warn(Q0);return}i.release=i.release||n,i.environment=i.environment||r,t.attrs=i}else{if(!t.release&&!n){Ze&&Te.warn(Q0);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const s=iU(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(s)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const s=`${t}:${n}`;Ze&&Te.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const s=r.indexOf(n);s>-1&&r.splice(s,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(s=>s(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(Ze&&Te.error("Error while sending envelope:",n),n)):(Ze&&Te.error("Transport disabled"),ji({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=GU(this,t),Y0(this,t)}_updateSessionFromEvent(t,n){var l;let r=n.level==="fatal",s=!1;const i=(l=n.exception)==null?void 0:l.values;if(i){s=!0;for(const u of i){const c=u.mechanism;if((c==null?void 0:c.handled)===!1){r=!0;break}}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&(uu(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Lo(n=>{let r=0;const s=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=s,t&&r>=t&&(clearInterval(i),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s){const i=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&(o!=null&&o.length)&&(n.integrations=o),this.emit("preprocessEvent",t,n),t.type||s.setLastEventId(t.event_id||n.event_id),mR(i,t,n,r,this,s).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:wV(r),...a.contexts};const l=aR(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:l,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=Zt(),s=gi()){return Ze&&ey(t)&&Te.log(`Captured error event \`${wR(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,s).then(i=>i.event_id,i=>{Ze&&(i instanceof xs&&i.logLevel==="log"?Te.log(i.message):Te.warn(i))})}_processEvent(t,n,r,s){const i=this.getOptions(),{sampleRate:o}=i,a=SR(t),l=ey(t),u=t.type||"error",c=`before send for type \`${u}\``,d=typeof o>"u"?void 0:Wa(o);if(l&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error"),Uh(new xs(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const f=u==="replay_event"?"replay":u;return this._prepareEvent(t,n,r,s).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",f),new xs("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return p;const m=ZU(this,i,p,n);return JU(m,c)}).then(p=>{var y;if(p===null){if(this.recordDroppedEvent("before_send",f),a){const w=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",w)}throw new xs(`${c} returned \`null\`, will not send event.`,"log")}const v=r.getSession()||s.getSession();if(l&&v&&this._updateSessionFromEvent(v,p),a){const b=((y=p.sdkProcessingMetadata)==null?void 0:y.spanCountBeforeProcessing)||0,w=p.spans?p.spans.length:0,x=b-w;x>0&&this.recordDroppedEvent("before_send","span",x)}const m=p.transaction_info;if(a&&m&&p.transaction!==t.transaction){const b="custom";p.transaction_info={...m,source:b}}return this.sendEvent(p,n),p}).then(null,p=>{throw p instanceof xs?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),new xs(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
39
|
-
Reason: ${p}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[s,i]=n.split(":");return{reason:s,category:i,quantity:r}})}_flushOutcomes(){Ze&&Te.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){Ze&&Te.log("No outcomes to send");return}if(!this._dsn){Ze&&Te.log("No dsn provided, will not send outcomes");return}Ze&&Te.log("Sending outcomes:",t);const n=KU(t,this._options.tunnel&&nm(this._dsn));this.sendEnvelope(n)}}function JU(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Zp(e))return e.then(r=>{if(!au(r)&&r!==null)throw new xs(n);return r},r=>{throw new xs(`${t} rejected with ${r}`)});if(!au(e)&&e!==null)throw new xs(n);return e}function ZU(e,t,n,r){const{beforeSend:s,beforeSendTransaction:i,beforeSendSpan:o}=t;let a=n;if(ey(a)&&s)return s(a,r);if(SR(a)){if(o){const l=o(YU(a));if(l?a=Fd(n,XU(l)):Yv(),a.spans){const u=[];for(const c of a.spans){const d=o(c);d?u.push(d):(Yv(),u.push(c))}a.spans=u}}if(i){if(a.spans){const l=a.spans.length;a.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:l}}return i(a,r)}}return a}function ey(e){return e.type===void 0}function SR(e){return e.type==="transaction"}function ez(e,t){t.debug===!0&&(Ze?Te.enable():Ji(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Zt().update(t.initialScope);const r=new e(t);return tz(r),r.init(),r}function tz(e){Zt().setClient(e)}function nz(e){const t=[];function n(){return e===void 0||t.length<e}function r(o){return t.splice(t.indexOf(o),1)[0]||Promise.resolve(void 0)}function s(o){if(!n())return Uh(new xs("Not adding Promise because buffer limit was reached."));const a=o();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function i(o){return new Lo((a,l)=>{let u=t.length;if(!u)return a(!0);const c=setTimeout(()=>{o&&o>0&&a(!1)},o);t.forEach(d=>{ji(d).then(()=>{--u||(clearTimeout(c),a(!0))},l)})})}return{$:t,add:s,drain:i}}const rz=60*1e3;function sz(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?rz:r-t}function iz(e,t){return e[t]||e.all||0}function _R(e,t,n=Date.now()){return iz(e,t)>n}function kR(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},i=n==null?void 0:n["x-sentry-rate-limits"],o=n==null?void 0:n["retry-after"];if(i)for(const a of i.trim().split(",")){const[l,u,,,c]=a.split(":",5),d=parseInt(l,10),f=(isNaN(d)?60:d)*1e3;if(!u)s.all=r+f;else for(const p of u.split(";"))p==="metric_bucket"?(!c||c.split(";").includes("custom"))&&(s[p]=r+f):s[p]=r+f}else o?s.all=r+sz(o,r):t===429&&(s.all=r+60*1e3);return s}const oz=64;function az(e,t,n=nz(e.bufferSize||oz)){let r={};const s=o=>n.drain(o);function i(o){const a=[];if(L0(o,(d,f)=>{const p=N0(f);_R(r,p)?e.recordDroppedEvent("ratelimit_backoff",p):a.push(d)}),a.length===0)return ji({});const l=Bu(o[0],a),u=d=>{L0(l,(f,p)=>{e.recordDroppedEvent(d,N0(p))})},c=()=>t({body:ZV(l)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&Ze&&Te.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=kR(r,d),d),d=>{throw u("network_error"),d});return n.add(c).then(d=>d,d=>{if(d instanceof xs)return Ze&&Te.error("Skipped sending event because buffer is full."),u("queue_overflow"),ji({});throw d})}return{send:i,flush:s}}function lz(e,t){const n=t==null?void 0:t.getDsn(),r=t==null?void 0:t.getOptions().tunnel;return cz(e,n)||uz(e,r)}function uz(e,t){return t?J0(e)===J0(t):!1}function cz(e,t){return t?e.includes(t.host):!1}function J0(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function dz(e){var t;((t=e.user)==null?void 0:t.ip_address)===void 0&&(e.user={...e.user,ip_address:"{{auto}}"})}function fz(e){var t;"aggregates"in e?((t=e.attrs)==null?void 0:t.ip_address)===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function xR(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:Ma})),version:Ma}),e._metadata=s}function ER(e={}){const t=ct();if(!NU()||!t)return{};const n=sl(),r=Nu(n);if(r.getTraceData)return r.getTraceData(e);const s=Zt(),i=e.span||Un(),o=i?DV(i):hz(s),a=i?Wi(i):aR(t,s),l=CV(a);return ZT.test(o)?{"sentry-trace":o,baggage:l}:(Te.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function hz(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return eR(t,r,n)}const pz=100;function Bo(e,t){const n=ct(),r=gi();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=pz}=n.getOptions();if(i<=0)return;const a={timestamp:Dd(),...e},l=s?Ji(()=>s(a,t)):a;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,t),r.addBreadcrumb(l,i))}let Z0;const mz="FunctionToString",e1=new WeakMap,gz=()=>({name:mz,setupOnce(){Z0=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Jb(this),n=e1.has(ct())&&t!==void 0?t:this;return Z0.apply(n,e)}}catch{}},setup(e){e1.set(e,!0)}}),vz=gz,yz=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],bz="EventFilters",wz=(e={})=>({name:bz,processEvent(t,n,r){const s=r.getOptions(),i=kz(e,s);return xz(t,i)?null:t}}),Sz=wz,_z=(e={})=>({...Sz(e),name:"InboundFilters"});function kz(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:yz],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function xz(e,t){return t.ignoreInternal&&Rz(e)?(Ze&&Te.warn(`Event dropped due to being internal Sentry Error.
|
|
40
|
-
Event: ${co(e)}`),!0):Ez(e,t.ignoreErrors)?(Ze&&Te.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
41
|
-
Event: ${co(e)}`),!0):Az(e)?(Ze&&Te.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
42
|
-
Event: ${co(e)}`),!0):Cz(e,t.ignoreTransactions)?(Ze&&Te.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
43
|
-
Event: ${co(e)}`),!0):Pz(e,t.denyUrls)?(Ze&&Te.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
44
|
-
Event: ${co(e)}.
|
|
45
|
-
Url: ${jh(e)}`),!0):Tz(e,t.allowUrls)?!1:(Ze&&Te.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
46
|
-
Event: ${co(e)}.
|
|
47
|
-
Url: ${jh(e)}`),!0)}function Ez(e,t){return e.type||!t||!t.length?!1:wR(e).some(n=>Io(n,t))}function Cz(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?Io(n,t):!1}function Pz(e,t){if(!(t!=null&&t.length))return!1;const n=jh(e);return n?Io(n,t):!1}function Tz(e,t){if(!(t!=null&&t.length))return!0;const n=jh(e);return n?Io(n,t):!0}function Rz(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function Iz(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function jh(e){var t,n;try{const r=[...((t=e.exception)==null?void 0:t.values)??[]].reverse().find(i=>{var o,a,l;return((o=i.mechanism)==null?void 0:o.parent_id)===void 0&&((l=(a=i.stacktrace)==null?void 0:a.frames)==null?void 0:l.length)}),s=(n=r==null?void 0:r.stacktrace)==null?void 0:n.frames;return s?Iz(s):null}catch{return Ze&&Te.error(`Cannot extract url for event ${co(e)}`),null}}function Az(e){var t,n;return e.type||!((n=(t=e.exception)==null?void 0:t.values)!=null&&n.length)?!1:!e.message&&!e.exception.values.some(r=>r.stacktrace||r.type&&r.type!=="Error"||r.value)}function Oz(e,t,n=250,r,s,i,o){var l;if(!((l=i.exception)!=null&&l.values)||!o||!zi(o.originalException,Error))return;const a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;a&&(i.exception.values=Mz(ty(e,t,s,o.originalException,r,i.exception.values,a,0),n))}function ty(e,t,n,r,s,i,o,a){if(i.length>=n+1)return i;let l=[...i];if(zi(r[s],Error)){t1(o,a);const u=e(t,r[s]),c=l.length;n1(u,s,c,a),l=ty(e,t,n,r[s],s,[u,...l],u,c)}return Array.isArray(r.errors)&&r.errors.forEach((u,c)=>{if(zi(u,Error)){t1(o,a);const d=e(t,u),f=l.length;n1(d,`errors[${c}]`,f,a),l=ty(e,t,n,u,s,[d,...l],d,f)}}),l}function t1(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function n1(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Mz(e,t){return e.map(n=>(n.value&&(n.value=Bl(n.value,t)),n))}function Dz(e){const t="console";Xo(t,e),Qo(t,$z)}function $z(){"console"in bt&&Hv.forEach(function(e){e in bt.console&&Cr(bt.console,e,function(t){return Vh[e]=t,function(...n){ls("console",{args:n,level:e});const s=Vh[e];s==null||s.apply(bt.console,n)}})})}function CR(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const Fz="Dedupe",Lz=()=>{let e;return{name:Fz,processEvent(t){if(t.type)return t;try{if(Bz(t,e))return Ze&&Te.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Nz=Lz;function Bz(e,t){return t?!!(Vz(e,t)||Uz(e,t)):!1}function Vz(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!TR(e,t)||!PR(e,t))}function Uz(e,t){const n=r1(t),r=r1(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!TR(e,t)||!PR(e,t))}function PR(e,t){let n=x0(e),r=x0(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const i=r[s],o=n[s];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function TR(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function r1(e){var t;return((t=e.exception)==null?void 0:t.values)&&e.exception.values[0]}function $i(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function RR(e){return e.split(/[?#]/,1)[0]}function zz(e,t,n,r,s="auto.http.browser"){if(!e.fetchData)return;const{method:i,url:o}=e.fetchData,a=qi()&&t(o);if(e.endTimestamp&&a){const p=e.fetchData.__span;if(!p)return;const v=r[p];v&&(qz(v,e),delete r[p]);return}const l=jz(o),u=$i(l||o),c=!!Un(),d=a&&c?Ka({name:`${i} ${RR(o)}`,attributes:{url:o,type:"fetch","http.method":i,"http.url":l,"server.address":u==null?void 0:u.host,[ln]:s,[qa]:"http.client",...(u==null?void 0:u.search)&&{"http.query":u==null?void 0:u.search},...(u==null?void 0:u.hash)&&{"http.fragment":u==null?void 0:u.hash}}}):new Ga;if(e.fetchData.__span=d.spanContext().spanId,r[d.spanContext().spanId]=d,n(e.fetchData.url)){const p=e.args[0],v=e.args[1]||{},m=Hz(p,v,qi()&&c?d:void 0);m&&(e.args[1]=v,v.headers=m)}const f=ct();if(f){const p={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};f.emit("beforeOutgoingRequestSpan",d,p)}return d}function Hz(e,t,n){const r=ER({span:n}),s=r["sentry-trace"],i=r.baggage;if(!s)return;const o=t.headers||(Wz(e)?e.headers:void 0);if(o)if(Gz(o)){const a=new Headers(o);if(a.set("sentry-trace",s),i){const l=a.get("baggage");if(l){const u=cf(l);a.set("baggage",u?`${u},${i}`:i)}else a.set("baggage",i)}return a}else if(Array.isArray(o)){const a=[...o.filter(l=>!(Array.isArray(l)&&l[0]==="sentry-trace")).map(l=>{if(Array.isArray(l)&&l[0]==="baggage"&&typeof l[1]=="string"){const[u,c,...d]=l;return[u,cf(c),...d]}else return l}),["sentry-trace",s]];return i&&a.push(["baggage",i]),a}else{const a="baggage"in o?o.baggage:void 0;let l=[];return Array.isArray(a)?l=a.map(u=>typeof u=="string"?cf(u):u).filter(u=>u===""):a&&l.push(cf(a)),i&&l.push(i),{...o,"sentry-trace":s,baggage:l.length>0?l.join(","):void 0}}else return{...r}}function jz(e){try{return new URL(e).href}catch{return}}function qz(e,t){var n;if(t.response){YT(e,t.response.status);const r=((n=t.response)==null?void 0:n.headers)&&t.response.headers.get("content-length");if(r){const s=parseInt(r);s>0&&e.setAttribute("http.response_content_length",s)}}else t.error&&e.setStatus({code:Pn,message:"internal_error"});e.end()}function cf(e){return e.split(",").filter(t=>!t.split("=")[0].startsWith(tw)).join(",")}function Wz(e){return typeof Request<"u"&&zi(e,Request)}function Gz(e){return typeof Headers<"u"&&zi(e,Headers)}function IR(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const qh=bt;function Kz(){return"history"in qh}function AR(){if(!("fetch"in qh))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function ny(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Yz(){var n;if(typeof EdgeRuntime=="string")return!0;if(!AR())return!1;if(ny(qh.fetch))return!0;let e=!1;const t=qh.document;if(t&&typeof t.createElement=="function")try{const r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),(n=r.contentWindow)!=null&&n.fetch&&(e=ny(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){Yo&&Te.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function OR(e,t){const n="fetch";Xo(n,e),Qo(n,()=>MR(void 0,t))}function Xz(e){const t="fetch-body-resolved";Xo(t,e),Qo(t,()=>MR(Jz))}function MR(e,t=!1){t&&!Yz()||Cr(bt,"fetch",function(n){return function(...r){const s=new Error,{method:i,url:o}=Zz(r),a={args:r,fetchData:{method:i,url:o},startTimestamp:er()*1e3,virtualError:s};return e||ls("fetch",{...a}),n.apply(bt,r).then(async l=>(e?e(l):ls("fetch",{...a,endTimestamp:er()*1e3,response:l}),l),l=>{throw ls("fetch",{...a,endTimestamp:er()*1e3,error:l}),Kb(l)&&l.stack===void 0&&(l.stack=s.stack,Gr(l,"framesToPop",1)),l})}})}async function Qz(e,t){if(e!=null&&e.body){const n=e.body,r=n.getReader(),s=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let i=!0;for(;i;){let o;try{o=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(o),a&&(t(),i=!1)}catch{i=!1}finally{clearTimeout(o)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}function Jz(e){let t;try{t=e.clone()}catch{return}Qz(t,()=>{ls("fetch-body-resolved",{endTimestamp:er()*1e3,response:e})})}function ry(e,t){return!!e&&typeof e=="object"&&!!e[t]}function s1(e){return typeof e=="string"?e:e?ry(e,"url")?e.url:e.toString?e.toString():"":""}function Zz(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:s1(n),method:ry(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:s1(t),method:ry(t,"method")?String(t.method).toUpperCase():"GET"}}function eH(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function tH(){return"npm"}function nH(){return!eH()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function i1(){return typeof window<"u"&&(!nH()||rH())}function rH(){const e=bt.process;return(e==null?void 0:e.type)==="renderer"}const xt=bt;let sy=0;function DR(){return sy>0}function sH(){sy++,setTimeout(()=>{sy--})}function du(e,t={}){function n(s){return typeof s=="function"}if(!n(e))return e;try{const s=e.__sentry_wrapped__;if(s)return typeof s=="function"?s:e;if(Jb(e))return e}catch{return e}const r=function(...s){try{const i=s.map(o=>du(o,t));return e.apply(this,i)}catch(i){throw sH(),Zb(o=>{o.addEventProcessor(a=>(t.mechanism&&(qv(a,void 0),lu(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),li(i)}),i}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}HT(r,e),Gr(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function ow(e,t){const n=aw(e,t),r={type:uH(t),value:cH(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function iH(e,t,n,r){const s=ct(),i=s==null?void 0:s.getOptions().normalizeDepth,o=mH(t),a={__serialized__:uR(t,i)};if(o)return{exception:{values:[ow(e,o)]},extra:a};const l={exception:{values:[{type:Jp(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:hH(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=aw(e,n);u.length&&(l.exception.values[0].stacktrace={frames:u})}return l}function vg(e,t){return{exception:{values:[ow(e,t)]}}}function aw(e,t){const n=t.stacktrace||t.stack||"",r=aH(t),s=lH(t);try{return e(n,r,s)}catch{}return[]}const oH=/Minified React error #\d+;/i;function aH(e){return e&&oH.test(e.message)?1:0}function lH(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function $R(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function uH(e){const t=e==null?void 0:e.name;return!t&&$R(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function cH(e){const t=e==null?void 0:e.message;return $R(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function dH(e,t,n,r){const s=(n==null?void 0:n.syntheticException)||void 0,i=lw(e,t,s,r);return lu(i),i.level="error",n!=null&&n.event_id&&(i.event_id=n.event_id),ji(i)}function fH(e,t,n="info",r,s){const i=(r==null?void 0:r.syntheticException)||void 0,o=iy(e,t,i,s);return o.level=n,r!=null&&r.event_id&&(o.event_id=r.event_id),ji(o)}function lw(e,t,n,r,s){let i;if(VT(t)&&t.error)return vg(e,t.error);if(C0(t)||XB(t)){const o=t;if("stack"in t)i=vg(e,t);else{const a=o.name||(C0(o)?"DOMError":"DOMException"),l=o.message?`${a}: ${o.message}`:a;i=iy(e,l,n,r),qv(i,l)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Kb(t)?vg(e,t):au(t)||Jp(t)?(i=iH(e,t,n,s),lu(i,{synthetic:!0}),i):(i=iy(e,t,n,r),qv(i,`${t}`),lu(i,{synthetic:!0}),i)}function iy(e,t,n,r){const s={};if(r&&n){const i=aw(e,n);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]}),lu(s,{synthetic:!0})}if(Yb(t)){const{__sentry_template_string__:i,__sentry_template_values__:o}=t;return s.logentry={message:i,params:o},s}return s.message=t,s}function hH(e,{isUnhandledRejection:t}){const n=rV(e),r=t?"promise rejection":"exception";return VT(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Jp(e)?`Event \`${pH(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function pH(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function mH(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}class gH extends QU{constructor(t){const n={parentSpanIsAlwaysRootSpan:!0,...t},r=xt.SENTRY_SDK_SOURCE||tH();xR(n,"browser",["browser"],r),super(n),n.sendClientReports&&xt.document&&xt.document.addEventListener("visibilitychange",()=>{xt.document.visibilityState==="hidden"&&this._flushOutcomes()}),this._options.sendDefaultPii&&(this.on("postprocessEvent",dz),this.on("beforeSendSession",fz))}eventFromException(t,n){return dH(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return fH(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,s){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,s)}}const ed=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,vH=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Vu=(e,t,n,r)=>{let s,i;return o=>{t.value>=0&&(o||r)&&(i=t.value-(s||0),(i||s===void 0)&&(s=t.value,t.delta=i,t.rating=vH(t.value,n),e(t)))}},at=bt,yH=()=>`v4-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Nd=(e=!0)=>{var n,r;const t=(r=(n=at.performance)==null?void 0:n.getEntriesByType)==null?void 0:r.call(n,"navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Bd=()=>{const e=Nd();return(e==null?void 0:e.activationStart)||0},Uu=(e,t)=>{var i,o;const n=Nd();let r="navigate";return n&&((i=at.document)!=null&&i.prerendering||Bd()>0?r="prerender":(o=at.document)!=null&&o.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:yH(),navigationType:r}},ol=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(s=>{Promise.resolve().then(()=>{t(s.getEntries())})});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},zu=e=>{const t=n=>{var r;(n.type==="pagehide"||((r=at.document)==null?void 0:r.visibilityState)==="hidden")&&e(n)};at.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},rm=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let Rc=-1;const bH=()=>at.document.visibilityState==="hidden"&&!at.document.prerendering?0:1/0,Wh=e=>{at.document.visibilityState==="hidden"&&Rc>-1&&(Rc=e.type==="visibilitychange"?e.timeStamp:0,SH())},wH=()=>{addEventListener("visibilitychange",Wh,!0),addEventListener("prerenderingchange",Wh,!0)},SH=()=>{removeEventListener("visibilitychange",Wh,!0),removeEventListener("prerenderingchange",Wh,!0)},sm=()=>(at.document&&Rc<0&&(Rc=bH(),wH()),{get firstHiddenTime(){return Rc}}),Vd=e=>{var t;(t=at.document)!=null&&t.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},_H=[1800,3e3],kH=(e,t={})=>{Vd(()=>{const n=sm(),r=Uu("FCP");let s;const o=ol("paint",a=>{a.forEach(l=>{l.name==="first-contentful-paint"&&(o.disconnect(),l.startTime<n.firstHiddenTime&&(r.value=Math.max(l.startTime-Bd(),0),r.entries.push(l),s(!0)))})});o&&(s=Vu(e,r,_H,t.reportAllChanges))})},xH=[.1,.25],EH=(e,t={})=>{kH(rm(()=>{const n=Uu("CLS",0);let r,s=0,i=[];const o=l=>{l.forEach(u=>{if(!u.hadRecentInput){const c=i[0],d=i[i.length-1];s&&c&&d&&u.startTime-d.startTime<1e3&&u.startTime-c.startTime<5e3?(s+=u.value,i.push(u)):(s=u.value,i=[u])}}),s>n.value&&(n.value=s,n.entries=i,r())},a=ol("layout-shift",o);a&&(r=Vu(e,n,xH,t.reportAllChanges),zu(()=>{o(a.takeRecords()),r(!0)}),setTimeout(r,0))}))},CH=[100,300],PH=(e,t={})=>{Vd(()=>{const n=sm(),r=Uu("FID");let s;const i=l=>{l.startTime<n.firstHiddenTime&&(r.value=l.processingStart-l.startTime,r.entries.push(l),s(!0))},o=l=>{l.forEach(i)},a=ol("first-input",o);s=Vu(e,r,CH,t.reportAllChanges),a&&zu(rm(()=>{o(a.takeRecords()),a.disconnect()}))})};let FR=0,yg=1/0,df=0;const TH=e=>{e.forEach(t=>{t.interactionId&&(yg=Math.min(yg,t.interactionId),df=Math.max(df,t.interactionId),FR=df?(df-yg)/7+1:0)})};let oy;const RH=()=>oy?FR:performance.interactionCount||0,IH=()=>{"interactionCount"in performance||oy||(oy=ol("event",TH,{type:"event",buffered:!0,durationThreshold:0}))},Ti=[],bg=new Map,AH=40;let OH=0;const MH=()=>RH()-OH,DH=()=>{const e=Math.min(Ti.length-1,Math.floor(MH()/50));return Ti[e]},wg=10,$H=[],FH=e=>{var r;if($H.forEach(s=>s(e)),!(e.interactionId||e.entryType==="first-input"))return;const t=Ti[Ti.length-1],n=bg.get(e.interactionId);if(n||Ti.length<wg||t&&e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===((r=n.entries[0])==null?void 0:r.startTime)&&n.entries.push(e);else{const s={id:e.interactionId,latency:e.duration,entries:[e]};bg.set(s.id,s),Ti.push(s)}Ti.sort((s,i)=>i.latency-s.latency),Ti.length>wg&&Ti.splice(wg).forEach(s=>bg.delete(s.id))}},LR=e=>{var r;const t=at.requestIdleCallback||at.setTimeout;let n=-1;return e=rm(e),((r=at.document)==null?void 0:r.visibilityState)==="hidden"?e():(n=t(e),zu(e)),n},LH=[200,500],NH=(e,t={})=>{"PerformanceEventTiming"in at&&"interactionId"in PerformanceEventTiming.prototype&&Vd(()=>{IH();const n=Uu("INP");let r;const s=o=>{LR(()=>{o.forEach(FH);const a=DH();a&&a.latency!==n.value&&(n.value=a.latency,n.entries=a.entries,r())})},i=ol("event",s,{durationThreshold:t.durationThreshold!=null?t.durationThreshold:AH});r=Vu(e,n,LH,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),zu(()=>{s(i.takeRecords()),r(!0)}))})},BH=[2500,4e3],o1={},VH=(e,t={})=>{Vd(()=>{const n=sm(),r=Uu("LCP");let s;const i=a=>{t.reportAllChanges||(a=a.slice(-1)),a.forEach(l=>{l.startTime<n.firstHiddenTime&&(r.value=Math.max(l.startTime-Bd(),0),r.entries=[l],s())})},o=ol("largest-contentful-paint",i);if(o){s=Vu(e,r,BH,t.reportAllChanges);const a=rm(()=>{o1[r.id]||(i(o.takeRecords()),o.disconnect(),o1[r.id]=!0,s(!0))});["keydown","click"].forEach(l=>{at.document&&addEventListener(l,()=>LR(a),{once:!0,capture:!0})}),zu(a)}})},UH=[800,1800],ay=e=>{var t,n;(t=at.document)!=null&&t.prerendering?Vd(()=>ay(e)):((n=at.document)==null?void 0:n.readyState)!=="complete"?addEventListener("load",()=>ay(e),!0):setTimeout(e,0)},zH=(e,t={})=>{const n=Uu("TTFB"),r=Vu(e,n,UH,t.reportAllChanges);ay(()=>{const s=Nd();s&&(n.value=Math.max(s.responseStart-Bd(),0),n.entries=[s],r(!0))})},Ic={},Gh={};let NR,BR,VR,UR,zR;function uw(e,t=!1){return Ud("cls",e,jH,NR,t)}function HR(e,t=!1){return Ud("lcp",e,WH,VR,t)}function jR(e){return Ud("fid",e,qH,BR)}function HH(e){return Ud("ttfb",e,GH,UR)}function qR(e){return Ud("inp",e,KH,zR)}function fu(e,t){return WR(e,t),Gh[e]||(YH(e),Gh[e]=!0),GR(e,t)}function Hu(e,t){const n=Ic[e];if(n!=null&&n.length)for(const r of n)try{r(t)}catch(s){ed&&Te.error(`Error while triggering instrumentation handler.
|
|
48
|
-
Type: ${e}
|
|
49
|
-
Name: ${Ui(r)}
|
|
50
|
-
Error:`,s)}}function jH(){return EH(e=>{Hu("cls",{metric:e}),NR=e},{reportAllChanges:!0})}function qH(){return PH(e=>{Hu("fid",{metric:e}),BR=e})}function WH(){return VH(e=>{Hu("lcp",{metric:e}),VR=e},{reportAllChanges:!0})}function GH(){return zH(e=>{Hu("ttfb",{metric:e}),UR=e})}function KH(){return NH(e=>{Hu("inp",{metric:e}),zR=e})}function Ud(e,t,n,r,s=!1){WR(e,t);let i;return Gh[e]||(i=n(),Gh[e]=!0),r&&t({metric:r}),GR(e,t,s?i:void 0)}function YH(e){const t={};e==="event"&&(t.durationThreshold=0),ol(e,n=>{Hu(e,{entries:n})},t)}function WR(e,t){Ic[e]=Ic[e]||[],Ic[e].push(t)}function GR(e,t,n){return()=>{n&&n();const r=Ic[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function XH(e){return"duration"in e}function Sg(e){return typeof e=="number"&&isFinite(e)}function Gi(e,t,n,{...r}){const s=kt(e).start_timestamp;return s&&s>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),fR(e,()=>{const i=Ka({startTime:t,...r});return i&&i.end(n),i})}function KR(e){var y;const t=ct();if(!t)return;const{name:n,transaction:r,attributes:s,startTime:i}=e,{release:o,environment:a,sendDefaultPii:l}=t.getOptions(),u=t.getIntegrationByName("Replay"),c=u==null?void 0:u.getReplayId(),d=Zt(),f=d.getUser(),p=f!==void 0?f.email||f.id||f.ip_address:void 0;let v;try{v=d.getScopeData().contexts.profile.profile_id}catch{}const m={release:o,environment:a,user:p||void 0,profile_id:v||void 0,replay_id:c||void 0,transaction:r,"user_agent.original":(y=at.navigator)==null?void 0:y.userAgent,"client.address":l?"{{auto}}":void 0,...s};return Ka({name:n,attributes:m,startTime:i,experimental:{standalone:!0}})}function cw(){return at.addEventListener&&at.performance}function hn(e){return e/1e3}function YR(e){let t="unknown",n="unknown",r="";for(const s of e){if(s==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(s))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=s}return r===e&&(t=r),{name:t,version:n}}function QH(){let e=0,t,n;if(!ZH())return;let r=!1;function s(){r||(r=!0,n&&JH(e,t,n),i())}const i=uw(({metric:o})=>{const a=o.entries[o.entries.length-1];a&&(e=o.value,t=a)},!0);zu(()=>{s()}),setTimeout(()=>{const o=ct();if(!o)return;const a=o.on("startNavigationSpan",()=>{s(),a==null||a()}),l=Un();if(l){const u=tr(l);kt(u).op==="pageload"&&(n=u.spanContext().spanId)}},0)}function JH(e,t,n){var l;ed&&Te.log(`Sending CLS span (${e})`);const r=hn((Xr()||0)+((t==null?void 0:t.startTime)||0)),s=Zt().getScopeData().transactionName,i=t?Hi((l=t.sources[0])==null?void 0:l.node):"Layout shift",o=vn({[ln]:"auto.http.browser.cls",[qa]:"ui.webvital.cls",[Ld]:(t==null?void 0:t.duration)||0,"sentry.pageload.span_id":n}),a=KR({name:i,transaction:s,attributes:o,startTime:r});a&&(a.addEvent("cls",{[em]:"",[tm]:e}),a.end(r))}function ZH(){try{return PerformanceObserver.supportedEntryTypes.includes("layout-shift")}catch{return!1}}const e3=2147483647;let a1=0,Fn={},wr,Tl;function t3({recordClsStandaloneSpans:e}){const t=cw();if(t&&Xr()){t.mark&&at.performance.mark("sentry-tracing-init");const n=a3(),r=o3(),s=l3(),i=e?QH():i3();return()=>{n(),r(),s(),i==null||i()}}return()=>{}}function n3(){fu("longtask",({entries:e})=>{const t=Un();if(!t)return;const{op:n,start_timestamp:r}=kt(t);for(const s of e){const i=hn(Xr()+s.startTime),o=hn(s.duration);n==="navigation"&&r&&i<r||Gi(t,i,i+o,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[ln]:"auto.ui.browser.metrics"}})}})}function r3(){new PerformanceObserver(t=>{const n=Un();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const s=hn(Xr()+r.startTime),{start_timestamp:i,op:o}=kt(n);if(o==="navigation"&&i&&s<i)continue;const a=hn(r.duration),l={[ln]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:c,invokerType:d,sourceURL:f,sourceFunctionName:p,sourceCharPosition:v}=u;l["browser.script.invoker"]=c,l["browser.script.invoker_type"]=d,f&&(l["code.filepath"]=f),p&&(l["code.function"]=p),v!==-1&&(l["browser.script.source_char_position"]=v),Gi(n,s,s+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:l})}}).observe({type:"long-animation-frame",buffered:!0})}function s3(){fu("event",({entries:e})=>{const t=Un();if(t){for(const n of e)if(n.name==="click"){const r=hn(Xr()+n.startTime),s=hn(n.duration),i={name:Hi(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[ln]:"auto.ui.browser.metrics"}},o=zT(n.target);o&&(i.attributes["ui.component_name"]=o),Gi(t,r,r+s,i)}}})}function i3(){return uw(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Fn.cls={value:e.value,unit:""},Tl=t)},!0)}function o3(){return HR(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Fn.lcp={value:e.value,unit:"millisecond"},wr=t)},!0)}function a3(){return jR(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=hn(Xr()),r=hn(t.startTime);Fn.fid={value:e.value,unit:"millisecond"},Fn["mark.fid"]={value:n+r,unit:"second"}})}function l3(){return HH(({metric:e})=>{e.entries[e.entries.length-1]&&(Fn.ttfb={value:e.value,unit:"millisecond"})})}function u3(e,t){const n=cw(),r=Xr();if(!(n!=null&&n.getEntries)||!r)return;const s=hn(r),i=n.getEntries(),{op:o,start_timestamp:a}=kt(e);if(i.slice(a1).forEach(l=>{const u=hn(l.startTime),c=hn(Math.max(0,l.duration));if(!(o==="navigation"&&a&&s+u<a))switch(l.entryType){case"navigation":{d3(e,l,s);break}case"mark":case"paint":case"measure":{c3(e,l,u,c,s);const d=sm(),f=l.startTime<d.firstHiddenTime;l.name==="first-paint"&&f&&(Fn.fp={value:l.startTime,unit:"millisecond"}),l.name==="first-contentful-paint"&&f&&(Fn.fcp={value:l.startTime,unit:"millisecond"});break}case"resource":{p3(e,l,l.name,u,c,s);break}}}),a1=Math.max(i.length-1,0),m3(e),o==="pageload"){v3(Fn);const l=Fn["mark.fid"];l&&Fn.fid&&(Gi(e,l.value,l.value+hn(Fn.fid.value),{name:"first input delay",op:"ui.action",attributes:{[ln]:"auto.ui.browser.metrics"}}),delete Fn["mark.fid"]),(!("fcp"in Fn)||!t.recordClsOnPageloadSpan)&&delete Fn.cls,Object.entries(Fn).forEach(([u,c])=>{lU(u,c.value,c.unit)}),e.setAttribute("performance.timeOrigin",s),e.setAttribute("performance.activationStart",Bd()),g3(e)}wr=void 0,Tl=void 0,Fn={}}function c3(e,t,n,r,s){const i=Nd(!1),o=hn(i?i.requestStart:0),a=s+Math.max(n,o),l=s+n,u=l+r,c={[ln]:"auto.resource.browser.metrics"};a!==l&&(c["sentry.browser.measure_happened_before_request"]=!0,c["sentry.browser.measure_start_time"]=a),a<=u&&Gi(e,a,u,{name:t.name,op:t.entryType,attributes:c})}function d3(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{ff(e,t,r,n)}),ff(e,t,"secureConnection",n,"TLS/SSL"),ff(e,t,"fetch",n,"cache"),ff(e,t,"domainLookup",n,"DNS"),h3(e,t,n)}function ff(e,t,n,r,s=n){const i=f3(n),o=t[i],a=t[`${n}Start`];!a||!o||Gi(e,r+hn(a),r+hn(o),{op:`browser.${s}`,name:t.name,attributes:{[ln]:"auto.ui.browser.metrics"}})}function f3(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function h3(e,t,n){const r=n+hn(t.requestStart),s=n+hn(t.responseEnd),i=n+hn(t.responseStart);t.responseEnd&&(Gi(e,r,s,{op:"browser.request",name:t.name,attributes:{[ln]:"auto.ui.browser.metrics"}}),Gi(e,i,s,{op:"browser.response",name:t.name,attributes:{[ln]:"auto.ui.browser.metrics"}}))}function p3(e,t,n,r,s,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const o=$i(n),a={[ln]:"auto.resource.browser.metrics"};_g(a,t,"transferSize","http.response_transfer_size"),_g(a,t,"encodedBodySize","http.response_content_length"),_g(a,t,"decodedBodySize","http.decoded_response_content_length");const l=t.deliveryType;l!=null&&(a["http.response_delivery_type"]=l);const u=t.renderBlockingStatus;u&&(a["resource.render_blocking_status"]=u),o.protocol&&(a["url.scheme"]=o.protocol.split(":").pop()),o.host&&(a["server.address"]=o.host),a["url.same_origin"]=n.includes(at.location.origin);const{name:c,version:d}=YR(t.nextHopProtocol);a["network.protocol.name"]=c,a["network.protocol.version"]=d;const f=i+r,p=f+s;Gi(e,f,p,{name:n.replace(at.location.origin,""),op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",attributes:a})}function m3(e){const t=at.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),Sg(n.rtt)&&(Fn["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Sg(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),Sg(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function g3(e){wr&&(wr.element&&e.setAttribute("lcp.element",Hi(wr.element)),wr.id&&e.setAttribute("lcp.id",wr.id),wr.url&&e.setAttribute("lcp.url",wr.url.trim().slice(0,200)),wr.loadTime!=null&&e.setAttribute("lcp.loadTime",wr.loadTime),wr.renderTime!=null&&e.setAttribute("lcp.renderTime",wr.renderTime),e.setAttribute("lcp.size",wr.size)),Tl!=null&&Tl.sources&&Tl.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,Hi(t.node)))}function _g(e,t,n,r){const s=t[n];s!=null&&s<e3&&(e[r]=s)}function v3(e){const t=Nd(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const y3=1e3;let l1,ly,uy;function XR(e){const t="dom";Xo(t,e),Qo(t,b3)}function b3(){if(!at.document)return;const e=ls.bind(null,"dom"),t=u1(e,!0);at.document.addEventListener("click",t,!1),at.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{var i,o;const s=(i=at[n])==null?void 0:i.prototype;(o=s==null?void 0:s.hasOwnProperty)!=null&&o.call(s,"addEventListener")&&(Cr(s,"addEventListener",function(a){return function(l,u,c){if(l==="click"||l=="keypress")try{const d=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},f=d[l]=d[l]||{refCount:0};if(!f.handler){const p=u1(e);f.handler=p,a.call(this,l,p,c)}f.refCount++}catch{}return a.call(this,l,u,c)}}),Cr(s,"removeEventListener",function(a){return function(l,u,c){if(l==="click"||l=="keypress")try{const d=this.__sentry_instrumentation_handlers__||{},f=d[l];f&&(f.refCount--,f.refCount<=0&&(a.call(this,l,f.handler,c),f.handler=void 0,delete d[l]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return a.call(this,l,u,c)}}))})}function w3(e){if(e.type!==ly)return!1;try{if(!e.target||e.target._sentryId!==uy)return!1}catch{}return!0}function S3(e,t){return e!=="keypress"?!1:t!=null&&t.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function u1(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=_3(n);if(S3(n.type,r))return;Gr(n,"_sentryCaptured",!0),r&&!r._sentryId&&Gr(r,"_sentryId",qr());const s=n.type==="keypress"?"input":n.type;w3(n)||(e({event:n,name:s,global:t}),ly=n.type,uy=r?r._sentryId:void 0),clearTimeout(l1),l1=at.setTimeout(()=>{uy=void 0,ly=void 0},y3)}}function _3(e){try{return e.target}catch{return null}}let hf;function im(e){const t="history";Xo(t,e),Qo(t,k3)}function k3(){if(at.addEventListener("popstate",()=>{const t=at.location.href,n=hf;if(hf=t,n===t)return;ls("history",{from:n,to:t})}),!Kz())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const s=hf,i=String(r);if(hf=i,s===i)return t.apply(this,n);ls("history",{from:s,to:i})}return t.apply(this,n)}}Cr(at.history,"pushState",e),Cr(at.history,"replaceState",e)}const rh={};function QR(e){const t=rh[e];if(t)return t;let n=at[e];if(ny(n))return rh[e]=n.bind(at);const r=at.document;if(r&&typeof r.createElement=="function")try{const s=r.createElement("iframe");s.hidden=!0,r.head.appendChild(s);const i=s.contentWindow;i!=null&&i[e]&&(n=i[e]),r.head.removeChild(s)}catch(s){ed&&Te.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,s)}return n&&(rh[e]=n.bind(at))}function c1(e){rh[e]=void 0}function hu(...e){return QR("setTimeout")(...e)}const va="__sentry_xhr_v3__";function JR(e){const t="xhr";Xo(t,e),Qo(t,x3)}function x3(){if(!at.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const s=new Error,i=er()*1e3,o=Di(r[0])?r[0].toUpperCase():void 0,a=E3(r[1]);if(!o||!a)return t.apply(n,r);n[va]={method:o,url:a,request_headers:{}},o==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const l=()=>{const u=n[va];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const c={endTimestamp:er()*1e3,startTimestamp:i,xhr:n,virtualError:s};ls("xhr",c)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,c,d){return l(),u.apply(c,d)}}):n.addEventListener("readystatechange",l),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,c,d){const[f,p]=d,v=c[va];return v&&Di(f)&&Di(p)&&(v.request_headers[f.toLowerCase()]=p),u.apply(c,d)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const s=n[va];if(!s)return t.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const i={startTimestamp:er()*1e3,xhr:n};return ls("xhr",i),t.apply(n,r)}})}function E3(e){if(Di(e))return e;try{return e.toString()}catch{}}function ZR(e){return new URLSearchParams(e).toString()}function eI(e,t=Te){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[ZR(e)];if(!e)return[void 0]}catch(n){return ed&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return ed&&t.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function tI(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}const kg=[],sh=new Map;function C3(){if(cw()&&Xr()){const t=P3();return()=>{t()}}return()=>{}}const d1={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function P3(){return qR(({metric:e})=>{if(e.value==null)return;const t=e.entries.find(v=>v.duration===e.value&&d1[v.name]);if(!t)return;const{interactionId:n}=t,r=d1[t.name],s=hn(Xr()+t.startTime),i=hn(e.value),o=Un(),a=o?tr(o):void 0,u=(n!=null?sh.get(n):void 0)||a,c=u?kt(u).description:Zt().getScopeData().transactionName,d=Hi(t.target),f=vn({[ln]:"auto.http.browser.inp",[qa]:`ui.interaction.${r}`,[Ld]:t.duration}),p=KR({name:d,transaction:c,attributes:f,startTime:s});p&&(p.addEvent("inp",{[em]:"millisecond",[tm]:e.value}),p.end(s+i))})}function T3(){const e=({entries:t})=>{const n=Un(),r=n&&tr(n);t.forEach(s=>{if(!XH(s)||!r)return;const i=s.interactionId;if(i!=null&&!sh.has(i)){if(kg.length>10){const o=kg.shift();sh.delete(o)}kg.push(i),sh.set(i,r)}})};fu("event",e),fu("first-input",e)}function R3(e,t=QR("fetch")){let n=0,r=0;function s(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return c1("fetch"),Uh("No fetch implementation available");try{return t(e.url,a).then(l=>(n-=o,r--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return c1("fetch"),n-=o,r--,Uh(l)}}return az(e,s)}const I3=30,A3=50;function cy(e,t,n,r){const s={filename:e,function:t==="<anonymous>"?ja:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const O3=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,M3=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,D3=/\((\S*)(?::(\d+))(?::(\d+))\)/,$3=e=>{const t=O3.exec(e);if(t){const[,r,s,i]=t;return cy(r,ja,+s,+i)}const n=M3.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const o=D3.exec(n[2]);o&&(n[2]=o[1],n[3]=o[2],n[4]=o[3])}const[s,i]=nI(n[1]||ja,n[2]);return cy(i,s,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},F3=[I3,$3],L3=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,N3=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,B3=e=>{const t=L3.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=N3.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],s=t[1]||ja;return[s,r]=nI(s,r),cy(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},V3=[A3,B3],U3=[F3,V3],z3=FT(...U3),nI=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:ja,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},ci=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,pf=1024,H3="Breadcrumbs",j3=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:H3,setup(n){t.console&&Dz(K3(n)),t.dom&&XR(G3(n,t.dom)),t.xhr&&JR(Y3(n)),t.fetch&&OR(X3(n)),t.history&&im(Q3(n)),t.sentry&&n.on("beforeSendEvent",W3(n))}}},q3=j3;function W3(e){return function(n){ct()===e&&Bo({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:co(n)},{event:n})}}function G3(e,t){return function(r){if(ct()!==e)return;let s,i,o=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>pf&&(ci&&Te.warn(`\`dom.maxStringLength\` cannot exceed ${pf}, but a value of ${a} was configured. Sentry will use ${pf} instead.`),a=pf),typeof o=="string"&&(o=[o]);try{const u=r.event,c=J3(u)?u.target:u;s=Hi(c,{keyAttrs:o,maxStringLength:a}),i=zT(c)}catch{s="<unknown>"}if(s.length===0)return;const l={category:`ui.${r.name}`,message:s};i&&(l.data={"ui.component_name":i}),Bo(l,{event:r.event,name:r.name,global:r.global})}}function K3(e){return function(n){if(ct()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:CR(n.level),message:P0(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${P0(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Bo(r,{input:n.args,level:n.level})}}function Y3(e){return function(n){if(ct()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[va];if(!r||!s||!i)return;const{method:o,url:a,status_code:l,body:u}=i,c={method:o,url:a,status_code:l},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s},f={category:"xhr",data:c,type:"http",level:IR(l)};e.emit("beforeOutgoingRequestBreadcrumb",f,d),Bo(f,d)}}function X3(e){return function(n){if(ct()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){const i=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s},a={category:"fetch",data:i,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,o),Bo(a,o)}else{const i=n.response,o={...n.fetchData,status_code:i==null?void 0:i.status};n.fetchData.request_body_size,n.fetchData.response_body_size,i==null||i.status;const a={input:n.args,response:i,startTimestamp:r,endTimestamp:s},l={category:"fetch",data:o,type:"http",level:IR(o.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",l,a),Bo(l,a)}}}function Q3(e){return function(n){if(ct()!==e)return;let r=n.from,s=n.to;const i=$i(xt.location.href);let o=r?$i(r):void 0;const a=$i(s);o!=null&&o.path||(o=i),i.protocol===a.protocol&&i.host===a.host&&(s=a.relative),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),Bo({category:"navigation",data:{from:r,to:s}})}}function J3(e){return!!e&&!!e.target}const Z3=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],e4="BrowserApiErrors",t4=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:e4,setupOnce(){t.setTimeout&&Cr(xt,"setTimeout",f1),t.setInterval&&Cr(xt,"setInterval",f1),t.requestAnimationFrame&&Cr(xt,"requestAnimationFrame",r4),t.XMLHttpRequest&&"XMLHttpRequest"in xt&&Cr(XMLHttpRequest.prototype,"send",s4);const n=t.eventTarget;n&&(Array.isArray(n)?n:Z3).forEach(i4)}}},n4=t4;function f1(e){return function(...t){const n=t[0];return t[0]=du(n,{mechanism:{data:{function:Ui(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function r4(e){return function(t){return e.apply(this,[du(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Ui(e)},handled:!1,type:"instrument"}})])}}function s4(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&Cr(n,s,function(i){const o={mechanism:{data:{function:s,handler:Ui(i)},handled:!1,type:"instrument"}},a=Jb(i);return a&&(o.mechanism.data.handler=Ui(a)),du(i,o)})}),e.apply(this,t)}}function i4(e){var r,s;const n=(r=xt[e])==null?void 0:r.prototype;(s=n==null?void 0:n.hasOwnProperty)!=null&&s.call(n,"addEventListener")&&(Cr(n,"addEventListener",function(i){return function(o,a,l){try{o4(a)&&(a.handleEvent=du(a.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Ui(a),target:e},handled:!1,type:"instrument"}}))}catch{}return i.apply(this,[o,du(a,{mechanism:{data:{function:"addEventListener",handler:Ui(a),target:e},handled:!1,type:"instrument"}}),l])}}),Cr(n,"removeEventListener",function(i){return function(o,a,l){try{const u=a.__sentry_wrapped__;u&&i.call(this,o,u,l)}catch{}return i.call(this,o,a,l)}}))}function o4(e){return typeof e.handleEvent=="function"}const a4=()=>({name:"BrowserSession",setupOnce(){if(typeof xt.document>"u"){ci&&Te.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}W0({ignoreDuration:!0}),G0(),im(({from:e,to:t})=>{e!==void 0&&e!==t&&(W0({ignoreDuration:!0}),G0())})}}),l4="GlobalHandlers",u4=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:l4,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(d4(n),h1("onerror")),t.onunhandledrejection&&(f4(n),h1("onunhandledrejection"))}}},c4=u4;function d4(e){LT(t=>{const{stackParser:n,attachStacktrace:r}=rI();if(ct()!==e||DR())return;const{msg:s,url:i,line:o,column:a,error:l}=t,u=m4(lw(n,l||s,void 0,r,!1),i,o,a);u.level="error",gR(u,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function f4(e){NT(t=>{const{stackParser:n,attachStacktrace:r}=rI();if(ct()!==e||DR())return;const s=h4(t),i=Xb(s)?p4(s):lw(n,s,void 0,r,!0);i.level="error",gR(i,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function h4(e){if(Xb(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function p4(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function m4(e,t,n,r){const s=e.exception=e.exception||{},i=s.values=s.values||[],o=i[0]=i[0]||{},a=o.stacktrace=o.stacktrace||{},l=a.frames=a.frames||[],u=r,c=n,d=Di(t)&&t.length>0?t:Lu();return l.length===0&&l.push({colno:u,filename:d,function:ja,in_app:!0,lineno:c}),e}function h1(e){ci&&Te.log(`Global Handler attached: ${e}`)}function rI(){const e=ct();return(e==null?void 0:e.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}const g4=()=>({name:"HttpContext",preprocessEvent(e){var o,a;if(!xt.navigator&&!xt.location&&!xt.document)return;const t=((o=e.request)==null?void 0:o.url)||Lu(),{referrer:n}=xt.document||{},{userAgent:r}=xt.navigator||{},s={...(a=e.request)==null?void 0:a.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...e.request,...t&&{url:t},headers:s};e.request=i}}),v4="cause",y4=5,b4="LinkedErrors",w4=(e={})=>{const t=e.limit||y4,n=e.key||v4;return{name:b4,preprocessEvent(r,s,i){const o=i.getOptions();Oz(ow,o.stackParser,o.maxValueLength,n,t,r,s)}}},S4=w4;function sI(e){return[_z(),vz(),n4(),q3(),c4(),S4(),Nz(),g4(),a4()]}function _4(e={}){var n;return{...{defaultIntegrations:sI(),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(n=xt.SENTRY_RELEASE)==null?void 0:n.id,sendClientReports:!0},...k4(e)}}function k4(e){const t={};for(const n of Object.getOwnPropertyNames(e)){const r=n;e[r]!==void 0&&(t[r]=e[r])}return t}function x4(){var l;const e=typeof xt.window<"u"&&xt;if(!e)return!1;const t=e.chrome?"chrome":"browser",n=e[t],r=(l=n==null?void 0:n.runtime)==null?void 0:l.id,s=Lu()||"",i=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],o=!!r&&xt===xt.top&&i.some(u=>s.startsWith(`${u}//`)),a=typeof e.nw<"u";return!!r&&!o&&!a}function E4(e={}){const t=_4(e);if(!t.skipBrowserExtensionCheck&&x4()){ci&&Ji(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}ci&&!AR()&&Te.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill.");const n={...t,stackParser:WB(t.stackParser||z3),integrations:WU(t),transport:t.transport||R3};return ez(gH,n)}const jt=bt,dw="sentryReplaySession",C4="replay_event",fw="Unable to send Replay",P4=3e5,T4=9e5,R4=5e3,I4=5500,A4=6e4,O4=5e3,M4=3,p1=15e4,mf=5e3,D4=3e3,$4=300,hw=2e7,F4=4999,L4=15e3,m1=36e5;var N4=Object.defineProperty,B4=(e,t,n)=>t in e?N4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g1=(e,t,n)=>B4(e,typeof t!="symbol"?t+"":t,n),Tn=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Tn||{});function V4(e){return e.nodeType===e.ELEMENT_NODE}function Ac(e){const t=e==null?void 0:e.host;return(t==null?void 0:t.shadowRoot)===e}function Oc(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function U4(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function z4(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function Kh(e){try{const t=e.rules||e.cssRules;return t?U4(Array.from(t,iI).join("")):null}catch{return null}}function H4(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,s=r[n],i=r.getPropertyPriority(s);t+=`${s}:${r.getPropertyValue(s)}${i?" !important":""};`}return`${e.selectorText} { ${t} }`}function iI(e){let t;if(q4(e))try{t=Kh(e.styleSheet)||z4(e)}catch{}else if(W4(e)){let n=e.cssText;const r=e.selectorText.includes(":"),s=typeof e.style.all=="string"&&e.style.all;if(s&&(n=H4(e)),r&&(n=j4(n)),r||s)return n}return t||e.cssText}function j4(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function q4(e){return"styleSheet"in e}function W4(e){return"selectorText"in e}class oI{constructor(){g1(this,"idNodeMap",new Map),g1(this,"nodeMetaMap",new WeakMap)}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function G4(){return new oI}function om({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function td({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function pu(e){return e.toLowerCase()}function dy(e){return e.toUpperCase()}const v1="__rrweb_original__";function K4(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let s=0;s<e.height;s+=n){const i=t.getImageData,o=v1 in i?i[v1]:i;if(new Uint32Array(o.call(t,r,s,Math.min(n,e.width-r),Math.min(n,e.height-s)).data.buffer).some(l=>l!==0))return!1}return!0}function pw(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?pu(t):null}function Yh(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function aI(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,s=n.pathname.match(r);return(s==null?void 0:s[1])??null}const y1={};function lI(e){const t=y1[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(s)}catch{}return y1[e]=r.bind(window)}function fy(...e){return lI("setTimeout")(...e)}function uI(...e){return lI("clearTimeout")(...e)}function cI(e){try{return e.contentDocument}catch{}}let Y4=1;const X4=new RegExp("[^a-z0-9-_:]"),nd=-2;function mw(){return Y4++}function Q4(e){if(e instanceof HTMLFormElement)return"form";const t=pu(e.tagName);return X4.test(t)?"div":t}function J4(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let fl,b1;const Z4=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,e5=/^(?:[a-z+]+:)?\/\//i,t5=/^www\..*/i,n5=/^(data:)([^,]*),(.*)/i;function Xh(e,t){return(e||"").replace(Z4,(n,r,s,i,o,a)=>{const l=s||o||a,u=r||i||"";if(!l)return n;if(e5.test(l)||t5.test(l))return`url(${u}${l}${u})`;if(n5.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${J4(t)+l}${u})`;const c=t.split("/"),d=l.split("/");c.pop();for(const f of d)f!=="."&&(f===".."?c.pop():c.push(f));return`url(${u}${c.join("/")}${u})`})}const r5=/^[^ \t\n\r\u000c]+/,s5=/^[, \t\n\r\u000c]+/;function i5(e,t){if(t.trim()==="")return t;let n=0;function r(i){let o;const a=i.exec(t.substring(n));return a?(o=a[0],n+=o.length,o):""}const s=[];for(;r(s5),!(n>=t.length);){let i=r(r5);if(i.slice(-1)===",")i=Rl(e,i.substring(0,i.length-1)),s.push(i);else{let o="";i=Rl(e,i);let a=!1;for(;;){const l=t.charAt(n);if(l===""){s.push((i+o).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){n+=1,s.push((i+o).trim());break}else l==="("&&(a=!0);o+=l,n+=1}}}return s.join(", ")}const w1=new WeakMap;function Rl(e,t){return!t||t.trim()===""?t:am(e,t)}function o5(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function am(e,t){let n=w1.get(e);if(n||(n=e.createElement("a"),w1.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function dI(e,t,n,r,s,i){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?Rl(e,r):n==="srcset"?i5(e,r):n==="style"?Xh(r,am(e)):t==="object"&&n==="data"?Rl(e,r):typeof i=="function"?i(n,r,s):r)}function fI(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function hI(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}if(n)return e.matches(n)}catch{}return!1}function a5(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function ya(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:ya(e.parentNode,t,n,r+1)}function Il(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(a5(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function mu(e,t,n,r,s,i){try{const o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName==="INPUT"){const u=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,l=-1;if(i){if(l=ya(o,Il(r,s)),l<0)return!0;a=ya(o,Il(t,n),l>=0?l:1/0)}else{if(a=ya(o,Il(t,n)),a<0)return!1;l=ya(o,Il(r,s),a>=0?a:1/0)}return a>=0?l>=0?a<=l:!0:l>=0?!1:!!i}catch{}return!!i}function l5(e,t,n){const r=e.contentWindow;if(!r)return;let s=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){const a=fy(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{uI(a),s=!0,t()});return}const o="about:blank";if(r.location.href!==o||e.src===o||e.src==="")return fy(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function u5(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;const i=fy(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{uI(i),r=!0,t()})}function c5(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskAttributeFn:l,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:v={},maskTextFn:m,maskInputFn:y,dataURLOptions:b={},inlineImages:w,recordCanvas:x,keepIframeSrcFn:P,newlyAddedElement:S=!1}=t,C=d5(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Tn.Document,childNodes:[],compatMode:e.compatMode}:{type:Tn.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Tn.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:C};case e.ELEMENT_NODE:return h5(e,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:l,maskInputOptions:v,maskInputFn:y,dataURLOptions:b,inlineImages:w,recordCanvas:x,keepIframeSrcFn:P,newlyAddedElement:S,rootId:C,maskAllText:a,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f});case e.TEXT_NODE:return f5(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:m,maskInputOptions:v,maskInputFn:y,rootId:C});case e.CDATA_SECTION_NODE:return{type:Tn.CDATA,textContent:"",rootId:C};case e.COMMENT_NODE:return{type:Tn.Comment,textContent:e.textContent||"",rootId:C};default:return!1}}function d5(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function f5(e,t){var b;const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:o,maskTextFn:a,maskInputOptions:l,maskInputFn:u,rootId:c}=t,d=e.parentNode&&e.parentNode.tagName;let f=e.textContent;const p=d==="STYLE"?!0:void 0,v=d==="SCRIPT"?!0:void 0,m=d==="TEXTAREA"?!0:void 0;if(p&&f){try{e.nextSibling||e.previousSibling||(b=e.parentNode.sheet)!=null&&b.cssRules&&(f=Kh(e.parentNode.sheet))}catch(w){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${w}`,e)}f=Xh(f,am(t.doc))}v&&(f="SCRIPT_PLACEHOLDER");const y=mu(e,r,i,s,o,n);if(!p&&!v&&!m&&f&&y&&(f=a?a(f,e.parentElement):f.replace(/[\S]/g,"*")),m&&f&&(l.textarea||y)&&(f=u?u(f,e.parentNode):f.replace(/[\S]/g,"*")),d==="OPTION"&&f){const w=om({type:null,tagName:d,maskInputOptions:l});f=td({isMasked:mu(e,r,i,s,o,w),element:e,value:f,maskInputFn:u})}return{type:Tn.Text,textContent:f||"",isStyle:p,rootId:c}}function h5(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:i,inlineStylesheet:o,maskInputOptions:a={},maskAttributeFn:l,maskInputFn:u,dataURLOptions:c={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:v=!1,rootId:m,maskTextClass:y,unmaskTextClass:b,maskTextSelector:w,unmaskTextSelector:x}=t,P=hI(e,r,s,i),S=Q4(e);let C={};const R=e.attributes.length;for(let E=0;E<R;E++){const I=e.attributes[E];I.name&&!fI(S,I.name,I.value)&&(C[I.name]=dI(n,S,pu(I.name),I.value,e,l))}if(S==="link"&&o){const E=Array.from(n.styleSheets).find(A=>A.href===e.href);let I=null;E&&(I=Kh(E)),I&&(C.rel=null,C.href=null,C.crossorigin=null,C._cssText=Xh(I,E.href))}if(S==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const E=Kh(e.sheet);E&&(C._cssText=Xh(E,am(n)))}if(S==="input"||S==="textarea"||S==="select"||S==="option"){const E=e,I=pw(E),A=Yh(E,dy(S),I),O=E.checked;if(I!=="submit"&&I!=="button"&&A){const L=mu(E,y,w,b,x,om({type:I,tagName:dy(S),maskInputOptions:a}));C.value=td({isMasked:L,element:E,value:A,maskInputFn:u})}O&&(C.checked=O)}if(S==="option"&&(e.selected&&!a.select?C.selected=!0:delete C.selected),S==="canvas"&&f){if(e.__context==="2d")K4(e)||(C.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){const E=e.toDataURL(c.type,c.quality),I=n.createElement("canvas");I.width=e.width,I.height=e.height;const A=I.toDataURL(c.type,c.quality);E!==A&&(C.rr_dataURL=E)}}if(S==="img"&&d){fl||(fl=n.createElement("canvas"),b1=fl.getContext("2d"));const E=e,I=E.currentSrc||E.getAttribute("src")||"<unknown-src>",A=E.crossOrigin,O=()=>{E.removeEventListener("load",O);try{fl.width=E.naturalWidth,fl.height=E.naturalHeight,b1.drawImage(E,0,0),C.rr_dataURL=fl.toDataURL(c.type,c.quality)}catch(L){if(E.crossOrigin!=="anonymous"){E.crossOrigin="anonymous",E.complete&&E.naturalWidth!==0?O():E.addEventListener("load",O);return}else console.warn(`Cannot inline img src=${I}! Error: ${L}`)}E.crossOrigin==="anonymous"&&(A?C.crossOrigin=A:E.removeAttribute("crossorigin"))};E.complete&&E.naturalWidth!==0?O():E.addEventListener("load",O)}if((S==="audio"||S==="video")&&(C.rr_mediaState=e.paused?"paused":"played",C.rr_mediaCurrentTime=e.currentTime),v||(e.scrollLeft&&(C.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(C.rr_scrollTop=e.scrollTop)),P){const{width:E,height:I}=e.getBoundingClientRect();C={class:C.class,rr_width:`${E}px`,rr_height:`${I}px`}}S==="iframe"&&!p(C.src)&&(!P&&!cI(e)&&(C.rr_src=C.src),delete C.src);let k;try{customElements.get(S)&&(k=!0)}catch{}return{type:Tn.Element,tagName:S,attributes:C,childNodes:[],isSVG:o5(e)||void 0,needBlock:P,rootId:m,isCustom:k}}function zt(e){return e==null?"":e.toLowerCase()}function p5(e,t){if(t.comment&&e.type===Tn.Comment)return!0;if(e.type===Tn.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&aI(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(zt(e.attributes.name).match(/^msapplication-tile(image|color)$/)||zt(e.attributes.name)==="application-name"||zt(e.attributes.rel)==="icon"||zt(e.attributes.rel)==="apple-touch-icon"||zt(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&zt(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(zt(e.attributes.property).match(/^(og|twitter|fb):/)||zt(e.attributes.name).match(/^(og|twitter):/)||zt(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(zt(e.attributes.name)==="robots"||zt(e.attributes.name)==="googlebot"||zt(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(zt(e.attributes.name)==="author"||zt(e.attributes.name)==="generator"||zt(e.attributes.name)==="framework"||zt(e.attributes.name)==="publisher"||zt(e.attributes.name)==="progid"||zt(e.attributes.property).match(/^article:/)||zt(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(zt(e.attributes.name)==="google-site-verification"||zt(e.attributes.name)==="yandex-verification"||zt(e.attributes.name)==="csrf-token"||zt(e.attributes.name)==="p:domain_verify"||zt(e.attributes.name)==="verify-v1"||zt(e.attributes.name)==="verification"||zt(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Al(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:v={},maskAttributeFn:m,maskTextFn:y,maskInputFn:b,slimDOMOptions:w,dataURLOptions:x={},inlineImages:P=!1,recordCanvas:S=!1,onSerialize:C,onIframeLoad:R,iframeLoadTimeout:k=5e3,onStylesheetLoad:E,stylesheetLoadTimeout:I=5e3,keepIframeSrcFn:A=()=>!1,newlyAddedElement:O=!1}=t;let{preserveWhiteSpace:L=!0}=t;const M=c5(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:v,maskAttributeFn:m,maskTextFn:y,maskInputFn:b,dataURLOptions:x,inlineImages:P,recordCanvas:S,keepIframeSrcFn:A,newlyAddedElement:O});if(!M)return console.warn(e,"not serialized"),null;let z;r.hasNode(e)?z=r.getId(e):p5(M,w)||!L&&M.type===Tn.Text&&!M.isStyle&&!M.textContent.replace(/^\s+|\s+$/gm,"").length?z=nd:z=mw();const H=Object.assign(M,{id:z});if(r.add(e,H),z===nd)return null;C&&C(e);let G=!f;if(H.type===Tn.Element){G=G&&!H.needBlock,delete H.needBlock;const W=e.shadowRoot;W&&Oc(W)&&(H.isShadowHost=!0)}if((H.type===Tn.Document||H.type===Tn.Element)&&G){w.headWhitespace&&H.type===Tn.Element&&H.tagName==="head"&&(L=!1);const W={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:f,inlineStylesheet:p,maskInputOptions:v,maskAttributeFn:m,maskTextFn:y,maskInputFn:b,slimDOMOptions:w,dataURLOptions:x,inlineImages:P,recordCanvas:S,preserveWhiteSpace:L,onSerialize:C,onIframeLoad:R,iframeLoadTimeout:k,onStylesheetLoad:E,stylesheetLoadTimeout:I,keepIframeSrcFn:A};for(const Y of Array.from(e.childNodes)){const X=Al(Y,W);X&&H.childNodes.push(X)}if(V4(e)&&e.shadowRoot)for(const Y of Array.from(e.shadowRoot.childNodes)){const X=Al(Y,W);X&&(Oc(e.shadowRoot)&&(X.isShadow=!0),H.childNodes.push(X))}}return e.parentNode&&Ac(e.parentNode)&&Oc(e.parentNode)&&(H.isShadow=!0),H.type===Tn.Element&&H.tagName==="iframe"&&!hI(e,s,i,o)&&l5(e,()=>{const W=cI(e);if(W&&R){const Y=Al(W,{doc:W,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:v,maskAttributeFn:m,maskTextFn:y,maskInputFn:b,slimDOMOptions:w,dataURLOptions:x,inlineImages:P,recordCanvas:S,preserveWhiteSpace:L,onSerialize:C,onIframeLoad:R,iframeLoadTimeout:k,onStylesheetLoad:E,stylesheetLoadTimeout:I,keepIframeSrcFn:A});Y&&R(e,Y)}},k),H.type===Tn.Element&&H.tagName==="link"&&typeof H.attributes.rel=="string"&&(H.attributes.rel==="stylesheet"||H.attributes.rel==="preload"&&typeof H.attributes.href=="string"&&aI(H.attributes.href)==="css")&&u5(e,()=>{if(E){const W=Al(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:v,maskAttributeFn:m,maskTextFn:y,maskInputFn:b,slimDOMOptions:w,dataURLOptions:x,inlineImages:P,recordCanvas:S,preserveWhiteSpace:L,onSerialize:C,onIframeLoad:R,iframeLoadTimeout:k,onStylesheetLoad:E,stylesheetLoadTimeout:I,keepIframeSrcFn:A});W&&E(e,W)}},I),H}function m5(e,t){const{mirror:n=new oI,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:i=null,maskAllText:o=!1,maskTextClass:a="rr-mask",unmaskTextClass:l=null,maskTextSelector:u=null,unmaskTextSelector:c=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:v=!1,maskAttributeFn:m,maskTextFn:y,maskInputFn:b,slimDOM:w=!1,dataURLOptions:x,preserveWhiteSpace:P,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:R,onStylesheetLoad:k,stylesheetLoadTimeout:E,keepIframeSrcFn:I=()=>!1}=t;return Al(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,maskAllText:o,maskTextClass:a,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:c,skipChild:!1,inlineStylesheet:d,maskInputOptions:v===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:v===!1?{}:v,maskAttributeFn:m,maskTextFn:y,maskInputFn:b,slimDOMOptions:w===!0||w==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:w==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:w===!1?{}:w,dataURLOptions:x,inlineImages:f,recordCanvas:p,preserveWhiteSpace:P,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:R,onStylesheetLoad:k,stylesheetLoadTimeout:E,keepIframeSrcFn:I,newlyAddedElement:!1})}function dr(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const _l=`Please stop import mirror directly. Instead of that,\r
|
|
51
|
-
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
52
|
-
or you can use record.mirror to access the mirror instance during recording.`;let S1={map:{},getId(){return console.error(_l),-1},getNode(){return console.error(_l),null},removeNodeFromMap(){console.error(_l)},has(){return console.error(_l),!1},reset(){console.error(_l)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(S1=new Proxy(S1,{get(e,t,n){return t==="map"&&console.error(_l),Reflect.get(e,t,n)}}));function rd(e,t,n={}){let r=null,s=0;return function(...i){const o=Date.now();!s&&n.leading===!1&&(s=o);const a=t-(o-s),l=this;a<=0||a>t?(r&&(_5(r),r=null),s=o,e.apply(l,i)):!r&&n.trailing!==!1&&(r=lm(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(l,i)},a))}}function pI(e,t,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(o){lm(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>pI(e,t,i||{},!0)}function gw(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}let Qh=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Qh=()=>new Date().getTime());function mI(e){var n,r,s,i,o,a;const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:(t==null?void 0:t.documentElement.scrollLeft)||((r=(n=t==null?void 0:t.body)==null?void 0:n.parentElement)==null?void 0:r.scrollLeft)||((s=t==null?void 0:t.body)==null?void 0:s.scrollLeft)||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(t==null?void 0:t.documentElement.scrollTop)||((o=(i=t==null?void 0:t.body)==null?void 0:i.parentElement)==null?void 0:o.scrollTop)||((a=t==null?void 0:t.body)==null?void 0:a.scrollTop)||0}}function gI(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function vI(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function yI(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function Nr(e,t,n,r,s){if(!e)return!1;const i=yI(e);if(!i)return!1;const o=Il(t,n);if(!s){const u=r&&i.matches(r);return o(i)&&!u}const a=ya(i,o);let l=-1;return a<0?!1:(r&&(l=ya(i,Il(null,r))),a>-1&&l<0?!0:a<l)}function g5(e,t){return t.getId(e)!==-1}function xg(e,t){return t.getId(e)===nd}function bI(e,t){if(Ac(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?bI(e.parentNode,t):!0:!0}function hy(e){return!!e.changedTouches}function v5(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function wI(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function SI(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function py(e){return!!(e!=null&&e.shadowRoot)}class y5{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function _I(e){var n,r;let t=null;return((r=(n=e.getRootNode)==null?void 0:n.call(e))==null?void 0:r.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function b5(e){let t=e,n;for(;n=_I(t);)t=n;return t}function w5(e){const t=e.ownerDocument;if(!t)return!1;const n=b5(e);return t.contains(n)}function kI(e){const t=e.ownerDocument;return t?t.contains(e)||w5(e):!1}const _1={};function vw(e){const t=_1[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(s)}catch{}return _1[e]=r.bind(window)}function S5(...e){return vw("requestAnimationFrame")(...e)}function lm(...e){return vw("setTimeout")(...e)}function _5(...e){return vw("clearTimeout")(...e)}var ot=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(ot||{}),Qe=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Qe||{}),ir=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(ir||{}),_i=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(_i||{}),kl=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(kl||{});function yw(e){try{return e.contentDocument}catch{}}function k5(e){try{return e.contentWindow}catch{}}function k1(e){return"__ln"in e}class x5{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=(n==null?void 0:n.next)||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&k1(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&k1(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const x1=(e,t)=>`${e}@${t}`;class E5{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new x5,s=l=>{let u=l,c=nd;for(;c===nd;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},i=l=>{if(!l.parentNode||!kI(l))return;const u=Ac(l.parentNode)?this.mirror.getId(_I(l)):this.mirror.getId(l.parentNode),c=s(l);if(u===-1||c===-1)return r.addNode(l);const d=Al(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:f=>{wI(f,this.mirror)&&!Nr(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(f),SI(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),py(l)&&this.shadowDomManager.addShadowRoot(l.shadowRoot,this.doc)},onIframeLoad:(f,p)=>{Nr(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(f,p),f.contentWindow&&this.canvasManager.addWindow(f.contentWindow),this.shadowDomManager.observeAttachShadow(f))},onStylesheetLoad:(f,p)=>{this.stylesheetManager.attachLinkElement(f,p)}});d&&(t.push({parentId:u,nextId:c,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)E1(this.removes,l,this.mirror)&&!this.movedSet.has(l.parentNode)||i(l);for(const l of this.addedSet)!C1(this.droppedSet,l)&&!E1(this.removes,l,this.mirror)||C1(this.movedSet,l)?i(l):this.droppedSet.add(l);let o=null;for(;r.length;){let l=null;if(o){const u=this.mirror.getId(o.value.parentNode),c=s(o.value);u!==-1&&c!==-1&&(l=o)}if(!l){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const d=this.mirror.getId(c.value.parentNode);if(s(c.value)===-1)continue;if(d!==-1){l=c;break}else{const p=c.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const v=p.parentNode.host;if(this.mirror.getId(v)!==-1){l=c;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}o=l.previous,r.removeNode(l.value),i(l.value)}const a={texts:this.texts.map(l=>({id:this.mirror.getId(l.node),value:l.value})).filter(l=>!n.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{const{attributes:u}=l;if(typeof u.style=="string"){const c=JSON.stringify(l.styleDiff),d=JSON.stringify(l._unchangedStyles);c.length<u.style.length&&(c+d).split("var(").length===u.style.split("var(").length&&(u.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:u}}).filter(l=>!n.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!xg(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Nr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:mu(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,yI(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,s=t.target.getAttribute(r);if(r==="value"){const o=pw(n),a=n.tagName;s=Yh(n,a,o);const l=om({maskInputOptions:this.maskInputOptions,tagName:a,type:o}),u=mu(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,l);s=td({isMasked:u,element:n,value:s,maskInputFn:this.maskInputFn})}if(Nr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||s===t.oldValue)return;let i=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!yw(n))r="rr_src";else return;if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!fI(n.tagName,r)&&(i.attributes[r]=dI(this.doc,pu(n.tagName),pu(r),s,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");t.oldValue&&o.setAttribute("style",t.oldValue);for(const a of Array.from(n.style)){const l=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);l!==o.style.getPropertyValue(a)||u!==o.style.getPropertyPriority(a)?u===""?i.styleDiff[a]=l:i.styleDiff[a]=[l,u]:i._unchangedStyles[a]=[l,u]}for(const a of Array.from(o.style))n.style.getPropertyValue(a)===""&&(i.styleDiff[a]=!1)}break}case"childList":{if(Nr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),s=Ac(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Nr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||xg(n,this.mirror)||!g5(n,this.mirror)||(this.addedSet.has(n)?(my(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||bI(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[x1(r,s)]?my(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:Ac(t.target)&&Oc(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(xg(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[x1(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Nr(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach(r=>this.genAdds(r)),py(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function my(e,t){e.delete(t),t.childNodes.forEach(n=>my(e,n))}function E1(e,t,n){return e.length===0?!1:C5(e,t,n)}function C5(e,t,n){let r=t.parentNode;for(;r;){const s=n.getId(r);if(e.some(i=>i.id===s))return!0;r=r.parentNode}return!1}function C1(e,t){return e.size===0?!1:xI(e,t)}function xI(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:xI(e,n):!1}let Mc;function P5(e){Mc=e}function T5(){Mc=void 0}const mt=e=>Mc?(...n)=>{try{return e(...n)}catch(r){if(Mc&&Mc(r)===!0)return()=>{};throw r}}:e,Ol=[];function zd(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function EI(e,t){var o,a;const n=new E5;Ol.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=(a=(o=window==null?void 0:window.Zone)==null?void 0:o.__symbol__)==null?void 0:a.call(o,"MutationObserver");s&&window[s]&&(r=window[s]);const i=new r(mt(l=>{e.onMutation&&e.onMutation(l)===!1||n.processMutations.bind(n)(l)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function R5({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const s=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],a;const l=rd(mt(d=>{const f=Date.now()-a;e(o.map(p=>(p.timeOffset-=f,p)),d),o=[],a=null}),i),u=mt(rd(mt(d=>{const f=zd(d),{clientX:p,clientY:v}=hy(d)?d.changedTouches[0]:d;a||(a=Qh()),o.push({x:p,y:v,id:r.getId(f),timeOffset:Qh()-a}),l(typeof DragEvent<"u"&&d instanceof DragEvent?Qe.Drag:d instanceof MouseEvent?Qe.MouseMove:Qe.TouchMove)}),s,{trailing:!1})),c=[dr("mousemove",u,n),dr("touchmove",u,n),dr("drag",u,n)];return mt(()=>{c.forEach(d=>d())})}function I5({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,l=[];let u=null;const c=d=>f=>{const p=zd(f);if(Nr(p,r,s,i,!0))return;let v=null,m=d;if("pointerType"in f){switch(f.pointerType){case"mouse":v=_i.Mouse;break;case"touch":v=_i.Touch;break;case"pen":v=_i.Pen;break}v===_i.Touch?ir[d]===ir.MouseDown?m="TouchStart":ir[d]===ir.MouseUp&&(m="TouchEnd"):_i.Pen}else hy(f)&&(v=_i.Touch);v!==null?(u=v,(m.startsWith("Touch")&&v===_i.Touch||m.startsWith("Mouse")&&v===_i.Mouse)&&(v=null)):ir[d]===ir.Click&&(v=u,u=null);const y=hy(f)?f.changedTouches[0]:f;if(!y)return;const b=n.getId(p),{clientX:w,clientY:x}=y;mt(e)({type:ir[m],id:b,x:w,y:x,...v!==null&&{pointerType:v}})};return Object.keys(ir).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let f=pu(d);const p=c(d);if(window.PointerEvent)switch(ir[d]){case ir.MouseDown:case ir.MouseUp:f=f.replace("mouse","pointer");break;case ir.TouchStart:case ir.TouchEnd:return}l.push(dr(f,p,t))}),mt(()=>{l.forEach(d=>d())})}function CI({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){const a=mt(rd(mt(l=>{const u=zd(l);if(!u||Nr(u,r,s,i,!0))return;const c=n.getId(u);if(u===t&&t.defaultView){const d=mI(t.defaultView);e({id:c,x:d.left,y:d.top})}else e({id:c,x:u.scrollLeft,y:u.scrollTop})}),o.scroll||100));return dr("scroll",a,t)}function A5({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const s=mt(rd(mt(()=>{const i=gI(),o=vI();(n!==i||r!==o)&&(e({width:Number(o),height:Number(i)}),n=i,r=o)}),200));return dr("resize",s,t)}const O5=["INPUT","TEXTAREA","SELECT"],P1=new WeakMap;function M5({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,ignoreClass:o,ignoreSelector:a,maskInputOptions:l,maskInputFn:u,sampling:c,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:p,maskTextSelector:v,unmaskTextSelector:m}){function y(R){let k=zd(R);const E=R.isTrusted,I=k&&dy(k.tagName);if(I==="OPTION"&&(k=k.parentElement),!k||!I||O5.indexOf(I)<0||Nr(k,r,s,i,!0))return;const A=k;if(A.classList.contains(o)||a&&A.matches(a))return;const O=pw(k);let L=Yh(A,I,O),M=!1;const z=om({maskInputOptions:l,tagName:I,type:O}),H=mu(k,f,v,p,m,z);(O==="radio"||O==="checkbox")&&(M=k.checked),L=td({isMasked:H,element:k,value:L,maskInputFn:u}),b(k,d?{text:L,isChecked:M,userTriggered:E}:{text:L,isChecked:M});const G=k.name;O==="radio"&&G&&M&&t.querySelectorAll(`input[type="radio"][name="${G}"]`).forEach(W=>{if(W!==k){const Y=td({isMasked:H,element:W,value:Yh(W,I,O),maskInputFn:u});b(W,d?{text:Y,isChecked:!M,userTriggered:!1}:{text:Y,isChecked:!M})}})}function b(R,k){const E=P1.get(R);if(!E||E.text!==k.text||E.isChecked!==k.isChecked){P1.set(R,k);const I=n.getId(R);mt(e)({...k,id:I})}}const x=(c.input==="last"?["change"]:["input","change"]).map(R=>dr(R,mt(y),t)),P=t.defaultView;if(!P)return()=>{x.forEach(R=>R())};const S=P.Object.getOwnPropertyDescriptor(P.HTMLInputElement.prototype,"value"),C=[[P.HTMLInputElement.prototype,"value"],[P.HTMLInputElement.prototype,"checked"],[P.HTMLSelectElement.prototype,"value"],[P.HTMLTextAreaElement.prototype,"value"],[P.HTMLSelectElement.prototype,"selectedIndex"],[P.HTMLOptionElement.prototype,"selected"]];return S&&S.set&&x.push(...C.map(R=>pI(R[0],R[1],{set(){mt(y)({target:this,isTrusted:!1})}},!1,P))),mt(()=>{x.forEach(R=>R())})}function Jh(e){const t=[];function n(r,s){if(gf("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||gf("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||gf("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||gf("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(o)}return s}return n(e,t)}function fo(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function D5({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:mt((c,d,f)=>{const[p,v]=f,{id:m,styleId:y}=fo(d,t,n.styleMirror);return(m&&m!==-1||y&&y!==-1)&&e({id:m,styleId:y,adds:[{rule:p,index:v}]}),c.apply(d,f)})});const i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:mt((c,d,f)=>{const[p]=f,{id:v,styleId:m}=fo(d,t,n.styleMirror);return(v&&v!==-1||m&&m!==-1)&&e({id:v,styleId:m,removes:[{index:p}]}),c.apply(d,f)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:mt((c,d,f)=>{const[p]=f,{id:v,styleId:m}=fo(d,t,n.styleMirror);return(v&&v!==-1||m&&m!==-1)&&e({id:v,styleId:m,replace:p}),c.apply(d,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:mt((c,d,f)=>{const[p]=f,{id:v,styleId:m}=fo(d,t,n.styleMirror);return(v&&v!==-1||m&&m!==-1)&&e({id:v,styleId:m,replaceSync:p}),c.apply(d,f)})}));const l={};vf("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(vf("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),vf("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),vf("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(l).forEach(([c,d])=>{u[c]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(u[c].insertRule,{apply:mt((f,p,v)=>{const[m,y]=v,{id:b,styleId:w}=fo(p.parentStyleSheet,t,n.styleMirror);return(b&&b!==-1||w&&w!==-1)&&e({id:b,styleId:w,adds:[{rule:m,index:[...Jh(p),y||0]}]}),f.apply(p,v)})}),d.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:mt((f,p,v)=>{const[m]=v,{id:y,styleId:b}=fo(p.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||b&&b!==-1)&&e({id:y,styleId:b,removes:[{index:[...Jh(p),m]}]}),f.apply(p,v)})})}),mt(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=i,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([c,d])=>{d.prototype.insertRule=u[c].insertRule,d.prototype.deleteRule=u[c].deleteRule})})}function PI({mirror:e,stylesheetManager:t},n){var o,a,l;let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const s=n.nodeName==="#document"?(o=n.defaultView)==null?void 0:o.Document:(l=(a=n.ownerDocument)==null?void 0:a.defaultView)==null?void 0:l.ShadowRoot,i=s!=null&&s.prototype?Object.getOwnPropertyDescriptor(s==null?void 0:s.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){var u;return(u=i.get)==null?void 0:u.call(this)},set(u){var d;const c=(d=i.set)==null?void 0:d.call(this,u);if(r!==null&&r!==-1)try{t.adoptStyleSheets(u,r)}catch{}return c}}),mt(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function $5({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:mt((a,l,u)=>{var m;const[c,d,f]=u;if(n.has(c))return i.apply(l,[c,d,f]);const{id:p,styleId:v}=fo((m=l.parentRule)==null?void 0:m.parentStyleSheet,t,r.styleMirror);return(p&&p!==-1||v&&v!==-1)&&e({id:p,styleId:v,set:{property:c,value:d,priority:f},index:Jh(l.parentRule)}),a.apply(l,u)})});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:mt((a,l,u)=>{var p;const[c]=u;if(n.has(c))return o.apply(l,[c]);const{id:d,styleId:f}=fo((p=l.parentRule)==null?void 0:p.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,remove:{property:c},index:Jh(l.parentRule)}),a.apply(l,u)})}),mt(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}function F5({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const a=mt(u=>rd(mt(c=>{const d=zd(c);if(!d||Nr(d,t,n,r,!0))return;const{currentTime:f,volume:p,muted:v,playbackRate:m}=d;e({type:u,id:s.getId(d),currentTime:f,volume:p,muted:v,playbackRate:m})}),i.media||500)),l=[dr("play",a(kl.Play),o),dr("pause",a(kl.Pause),o),dr("seeked",a(kl.Seeked),o),dr("volumechange",a(kl.VolumeChange),o),dr("ratechange",a(kl.RateChange),o)];return mt(()=>{l.forEach(u=>u())})}function L5({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,i=n.FontFace;n.FontFace=function(l,u,c){const d=new i(l,u,c);return s.set(d,{family:l,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),d};const o=gw(t.fonts,"add",function(a){return function(l){return lm(mt(()=>{const u=s.get(l);u&&(e(u),s.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{n.FontFace=i}),r.push(o),mt(()=>{r.forEach(a=>a())})}function N5(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=e;let a=!0;const l=mt(()=>{const u=t.getSelection();if(!u||a&&(u!=null&&u.isCollapsed))return;a=u.isCollapsed||!1;const c=[],d=u.rangeCount||0;for(let f=0;f<d;f++){const p=u.getRangeAt(f),{startContainer:v,startOffset:m,endContainer:y,endOffset:b}=p;Nr(v,r,s,i,!0)||Nr(y,r,s,i,!0)||c.push({start:n.getId(v),startOffset:m,end:n.getId(y),endOffset:b})}o({ranges:c})});return l(),dr("selectionchange",l)}function B5({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:gw(n.customElements,"define",function(s){return function(i,o,a){try{t({define:{name:i}})}catch{}return s.apply(this,[i,o,a])}})}function V5(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=EI(e,e.doc));const s=R5(e),i=I5(e),o=CI(e),a=A5(e,{win:n}),l=M5(e),u=F5(e);let c=()=>{},d=()=>{},f=()=>{},p=()=>{};e.recordDOM&&(c=D5(e,{win:n}),d=PI(e,e.doc),f=$5(e,{win:n}),e.collectFonts&&(p=L5(e)));const v=N5(e),m=B5(e),y=[];for(const b of e.plugins)y.push(b.observer(b.callback,n,b.options));return mt(()=>{Ol.forEach(b=>b.reset()),r==null||r.disconnect(),s(),i(),o(),a(),l(),u(),c(),d(),f(),p(),v(),m(),y.forEach(b=>b())})}function gf(e){return typeof window[e]<"u"}function vf(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class gy{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,s){const i=r||this.getIdToRemoteIdMap(t),o=s||this.getRemoteIdToIdMap(t);let a=i.get(n);return a||(a=this.generateIdFn(),i.set(n,a),o.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return n.map(i=>this.getId(t,i,r,s))}getRemoteId(t,n,r){const s=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const i=s.get(n);return i||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(s=>this.getRemoteId(t,s,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}class U5{constructor(){this.crossOriginIframeMirror=new gy(mw),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class z5{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new gy(mw),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new gy(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){var s,i;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((s=t.contentWindow)==null||s.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,t);const r=yw(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const s=this.crossOriginIframeMap.get(t.source);if(!s)return;const i=this.transformCrossOriginEvent(s,n.data.event);i&&this.wrappedEmit(i,n.data.isCheckout)}transformCrossOriginEvent(t,n){var r;switch(n.type){case ot.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const s=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,s),this.patchRootIdOnNode(n.data.node,s),{timestamp:n.timestamp,type:ot.IncrementalSnapshot,data:{source:Qe.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case ot.Meta:case ot.Load:case ot.DomContentLoaded:return!1;case ot.Plugin:return n;case ot.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case ot.IncrementalSnapshot:switch(n.data.source){case Qe.Mutation:return n.data.adds.forEach(s=>{this.replaceIds(s,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,t);const i=this.crossOriginIframeRootIdMap.get(t);i&&this.patchRootIdOnNode(s.node,i)}),n.data.removes.forEach(s=>{this.replaceIds(s,t,["parentId","id"])}),n.data.attributes.forEach(s=>{this.replaceIds(s,t,["id"])}),n.data.texts.forEach(s=>{this.replaceIds(s,t,["id"])}),n;case Qe.Drag:case Qe.TouchMove:case Qe.MouseMove:return n.data.positions.forEach(s=>{this.replaceIds(s,t,["id"])}),n;case Qe.ViewportResize:return!1;case Qe.MediaInteraction:case Qe.MouseInteraction:case Qe.Scroll:case Qe.CanvasMutation:case Qe.Input:return this.replaceIds(n.data,t,["id"]),n;case Qe.StyleSheetRule:case Qe.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case Qe.Font:return n;case Qe.Selection:return n.data.ranges.forEach(s=>{this.replaceIds(s,t,["start","end"])}),n;case Qe.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),(r=n.data.styles)==null||r.forEach(s=>{this.replaceStyleIds(s,t,["styleId"])}),n}}return!1}replace(t,n,r,s){for(const i of s)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=t.getIds(r,n[i]):n[i]=t.getId(r,n[i]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==Tn.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class H5{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class j5{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!Oc(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=EI({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(CI({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),lm(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(PI({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=yw(t),r=k5(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(gw(t.prototype,"attachShadow",function(s){return function(i){const o=s.call(this,i);return this.shadowRoot&&kI(this)&&r.addShadowRoot(this.shadowRoot,n),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}var T1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",q5=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var yf=0;yf<T1.length;yf++)q5[T1.charCodeAt(yf)]=yf;class R1{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class W5{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new y5,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},s=[];for(const i of t){let o;this.styleMirror.has(i)?o=this.styleMirror.getId(i):(o=this.styleMirror.add(i),s.push({styleId:o,rules:Array.from(i.rules||CSSRule,(a,l)=>({rule:iI(a),index:l}))})),r.styleIds.push(o)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class G5{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(s=>s!==n)}add(t,n){this.active||(this.active=!0,S5(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let un,Zh;var CE;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((CE=e.contentWindow)==null?void 0:CE.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const bs=G4();function Fi(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:i=null,unblockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskAllText:u=!1,maskTextClass:c="rr-mask",unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:v=!0,maskAllInputs:m,maskInputOptions:y,slimDOMOptions:b,maskAttributeFn:w,maskInputFn:x,maskTextFn:P,maxCanvasSize:S=null,packFn:C,sampling:R={},dataURLOptions:k={},mousemoveWait:E,recordDOM:I=!0,recordCanvas:A=!1,recordCrossOriginIframes:O=!1,recordAfter:L=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:M=!1,collectFonts:z=!1,inlineImages:H=!1,plugins:G,keepIframeSrcFn:W=()=>!1,ignoreCSSAttributes:Y=new Set([]),errorHandler:X,onMutation:J,getCanvasManager:N}=e;P5(X);const K=O?window.parent===window:!0;let he=!1;if(!K)try{window.parent.document&&(he=!1)}catch{he=!0}if(K&&!t)throw new Error("emit function is required");if(!K&&!he)return()=>{};E!==void 0&&R.mousemove===void 0&&(R.mousemove=E),bs.reset();const oe=m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:y!==void 0?y:{},we=b===!0||b==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:b==="all",headMetaDescKeywords:b==="all"}:b||{};v5();let ee,de=0;const ne=be=>{for(const Se of G||[])Se.eventProcessor&&(be=Se.eventProcessor(be));return C&&!he&&(be=C(be)),be};un=(be,Se)=>{var Fe;const pe=be;if(pe.timestamp=Qh(),(Fe=Ol[0])!=null&&Fe.isFrozen()&&pe.type!==ot.FullSnapshot&&!(pe.type===ot.IncrementalSnapshot&&pe.data.source===Qe.Mutation)&&Ol.forEach(Ee=>Ee.unfreeze()),K)t==null||t(ne(pe),Se);else if(he){const Ee={type:"rrweb",event:ne(pe),origin:window.location.origin,isCheckout:Se};window.parent.postMessage(Ee,"*")}if(pe.type===ot.FullSnapshot)ee=pe,de=0;else if(pe.type===ot.IncrementalSnapshot){if(pe.data.source===Qe.Mutation&&pe.data.isAttachIframe)return;de++;const Ee=r&&de>=r,xe=n&&ee&&pe.timestamp-ee.timestamp>n;(Ee||xe)&&Ce(!0)}};const U=be=>{un({type:ot.IncrementalSnapshot,data:{source:Qe.Mutation,...be}})},De=be=>un({type:ot.IncrementalSnapshot,data:{source:Qe.Scroll,...be}}),He=be=>un({type:ot.IncrementalSnapshot,data:{source:Qe.CanvasMutation,...be}}),F=be=>un({type:ot.IncrementalSnapshot,data:{source:Qe.AdoptedStyleSheet,...be}}),B=new W5({mutationCb:U,adoptedStyleSheetCb:F}),q=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new U5:new z5({mirror:bs,mutationCb:U,stylesheetManager:B,recordCrossOriginIframes:O,wrappedEmit:un});for(const be of G||[])be.getMirror&&be.getMirror({nodeMirror:bs,crossOriginIframeMirror:q.crossOriginIframeMirror,crossOriginIframeStyleMirror:q.crossOriginIframeStyleMirror});const fe=new G5,ae=Y5(N,{mirror:bs,win:window,mutationCb:be=>un({type:ot.IncrementalSnapshot,data:{source:Qe.CanvasMutation,...be}}),recordCanvas:A,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:S,sampling:R.canvas,dataURLOptions:k,errorHandler:X}),ye=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new H5:new j5({mutationCb:U,scrollCb:De,bypassOptions:{onMutation:J,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:v,maskInputOptions:oe,dataURLOptions:k,maskAttributeFn:w,maskTextFn:P,maskInputFn:x,recordCanvas:A,inlineImages:H,sampling:R,slimDOMOptions:we,iframeManager:q,stylesheetManager:B,canvasManager:ae,keepIframeSrcFn:W,processedNodeManager:fe},mirror:bs}),Ce=(be=!1)=>{if(!I)return;un({type:ot.Meta,data:{href:window.location.href,width:vI(),height:gI()}},be),B.reset(),ye.init(),Ol.forEach(pe=>pe.lock());const Se=m5(document,{mirror:bs,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:v,maskAllInputs:oe,maskAttributeFn:w,maskInputFn:x,maskTextFn:P,slimDOM:we,dataURLOptions:k,recordCanvas:A,inlineImages:H,onSerialize:pe=>{wI(pe,bs)&&q.addIframe(pe),SI(pe,bs)&&B.trackLinkElement(pe),py(pe)&&ye.addShadowRoot(pe.shadowRoot,document)},onIframeLoad:(pe,Fe)=>{q.attachIframe(pe,Fe),pe.contentWindow&&ae.addWindow(pe.contentWindow),ye.observeAttachShadow(pe)},onStylesheetLoad:(pe,Fe)=>{B.attachLinkElement(pe,Fe)},keepIframeSrcFn:W});if(!Se)return console.warn("Failed to snapshot the document");un({type:ot.FullSnapshot,data:{node:Se,initialOffset:mI(window)}}),Ol.forEach(pe=>pe.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&B.adoptStyleSheets(document.adoptedStyleSheets,bs.getId(document))};Zh=Ce;try{const be=[],Se=Fe=>{var Ee;return mt(V5)({onMutation:J,mutationCb:U,mousemoveCb:(xe,We)=>un({type:ot.IncrementalSnapshot,data:{source:We,positions:xe}}),mouseInteractionCb:xe=>un({type:ot.IncrementalSnapshot,data:{source:Qe.MouseInteraction,...xe}}),scrollCb:De,viewportResizeCb:xe=>un({type:ot.IncrementalSnapshot,data:{source:Qe.ViewportResize,...xe}}),inputCb:xe=>un({type:ot.IncrementalSnapshot,data:{source:Qe.Input,...xe}}),mediaInteractionCb:xe=>un({type:ot.IncrementalSnapshot,data:{source:Qe.MediaInteraction,...xe}}),styleSheetRuleCb:xe=>un({type:ot.IncrementalSnapshot,data:{source:Qe.StyleSheetRule,...xe}}),styleDeclarationCb:xe=>un({type:ot.IncrementalSnapshot,data:{source:Qe.StyleDeclaration,...xe}}),canvasMutationCb:He,fontCb:xe=>un({type:ot.IncrementalSnapshot,data:{source:Qe.Font,...xe}}),selectionCb:xe=>{un({type:ot.IncrementalSnapshot,data:{source:Qe.Selection,...xe}})},customElementCb:xe=>{un({type:ot.IncrementalSnapshot,data:{source:Qe.CustomElement,...xe}})},blockClass:s,ignoreClass:a,ignoreSelector:l,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:oe,inlineStylesheet:v,sampling:R,recordDOM:I,recordCanvas:A,inlineImages:H,userTriggeredOnInput:M,collectFonts:z,doc:Fe,maskAttributeFn:w,maskInputFn:x,maskTextFn:P,keepIframeSrcFn:W,blockSelector:i,unblockSelector:o,slimDOMOptions:we,dataURLOptions:k,mirror:bs,iframeManager:q,stylesheetManager:B,shadowDomManager:ye,processedNodeManager:fe,canvasManager:ae,ignoreCSSAttributes:Y,plugins:((Ee=G==null?void 0:G.filter(xe=>xe.observer))==null?void 0:Ee.map(xe=>({observer:xe.observer,options:xe.options,callback:We=>un({type:ot.Plugin,data:{plugin:xe.name,payload:We}})})))||[]},{})};q.addLoadListener(Fe=>{try{be.push(Se(Fe.contentDocument))}catch(Ee){console.warn(Ee)}});const pe=()=>{Ce(),be.push(Se(document))};return document.readyState==="interactive"||document.readyState==="complete"?pe():(be.push(dr("DOMContentLoaded",()=>{un({type:ot.DomContentLoaded,data:{}}),L==="DOMContentLoaded"&&pe()})),be.push(dr("load",()=>{un({type:ot.Load,data:{}}),L==="load"&&pe()},window))),()=>{be.forEach(Fe=>Fe()),fe.destroy(),Zh=void 0,T5()}}catch(be){console.warn(be)}}function K5(e){if(!Zh)throw new Error("please take full snapshot after start recording");Zh(e)}Fi.mirror=bs;Fi.takeFullSnapshot=K5;function Y5(e,t){try{return e?e(t):new R1}catch{return console.warn("Unable to initialize CanvasManager"),new R1}}var I1;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(I1||(I1={}));const X5=3,Q5=5;function bw(e){return e>9999999999?e:e*1e3}function Eg(e){return e>9999999999?e/1e3:e}function Hd(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:ot.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:_s(t,10,1e3)}}),t.category==="console")))}const J5="button,a";function TI(e){return e.closest(J5)||e}function RI(e){const t=II(e);return!t||!(t instanceof Element)?t:TI(t)}function II(e){return Z5(e)?e.target:e}function Z5(e){return typeof e=="object"&&!!e&&"target"in e}let ho;function ej(e){return ho||(ho=[],tj()),ho.push(e),()=>{const t=ho?ho.indexOf(e):-1;t>-1&&ho.splice(t,1)}}function tj(){Cr(jt,"open",function(e){return function(...t){if(ho)try{ho.forEach(n=>n())}catch{}return e.apply(jt,t)}})}const nj=new Set([Qe.Mutation,Qe.StyleSheetRule,Qe.StyleDeclaration,Qe.AdoptedStyleSheet,Qe.CanvasMutation,Qe.Selection,Qe.MediaInteraction]);function rj(e,t,n){e.handleClick(t,n)}class sj{constructor(t,n,r=Hd){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=ej(()=>{this._lastMutation=A1()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(oj(n,this._ignoreSelector)||!aj(t))return;const r={timestamp:Eg(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(s=>s.node===r.node&&Math.abs(s.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Eg(t)}registerScroll(t=Date.now()){this._lastScroll=Eg(t)}registerClick(t){const n=TI(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=A1();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const s=this._clicks.indexOf(r);s>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(s,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,s=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!r&&!s,{clickCount:o,clickBreadcrumb:a}=t;if(i){const l=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=l<this._timeout*1e3?"mutation":"timeout",c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:jt.location.href,route:n.getCurrentRoute(),timeAfterClickMs:l,endReason:u,clickCount:o||1}};this._addBreadcrumbEvent(n,c);return}if(o>1){const l={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:jt.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(n,l)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=hu(()=>this._checkClicks(),1e3)}}const ij=["A","BUTTON","INPUT"];function oj(e,t){return!!(!ij.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function aj(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function A1(){return Date.now()/1e3}function lj(e,t){try{if(!uj(t))return;const{source:n}=t.data;if(nj.has(n)&&e.registerMutation(t.timestamp),n===Qe.Scroll&&e.registerScroll(t.timestamp),cj(t)){const{type:r,id:s}=t.data,i=Fi.mirror.getNode(s);i instanceof HTMLElement&&r===ir.Click&&e.registerClick(i)}}catch{}}function uj(e){return e.type===X5}function cj(e){return e.data.source===Qe.MouseInteraction}function oi(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var ww=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(ww||{});const dj=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function fj(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(dj.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const hj=e=>t=>{if(!e.isEnabled())return;const n=pj(t);if(!n)return;const r=t.name==="click",s=r?t.event:void 0;r&&e.clickDetector&&s&&s.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&rj(e.clickDetector,n,RI(t.event)),Hd(e,n)};function AI(e,t){const n=Fi.mirror.getId(e),r=n&&Fi.mirror.getNode(n),s=r&&Fi.mirror.getMeta(r),i=s&&gj(s)?s:null;return{message:t,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map(o=>o.type===ww.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:fj(i.attributes)}}:{}}}function pj(e){const{target:t,message:n}=mj(e);return oi({category:`ui.${e.name}`,...AI(t,n)})}function mj(e){const t=e.name==="click";let n,r=null;try{r=t?RI(e.event):II(e.event),n=Hi(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function gj(e){return e.type===ww.Element}function vj(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=yj(t);n&&Hd(e,n)}function yj(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=e;if(!o||bj(o)||!i)return null;const a=t||r||s,l=i.length===1;if(!a&&l)return null;const u=Hi(o,{maxStringLength:200})||"<unknown>",c=AI(o,u);return oi({category:"ui.keyDown",message:u,data:{...c.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}function bj(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const wj={resource:Ej,paint:kj,navigation:xj};function bf(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function Sj(e){return e.map(_j).filter(Boolean)}function _j(e){const t=wj[e.entryType];return t?t(e):null}function gu(e){return((Xr()||jt.performance.timeOrigin)+e)/1e3}function kj(e){const{duration:t,entryType:n,name:r,startTime:s}=e,i=gu(s);return{type:n,name:r,start:i,end:i+t,data:void 0}}function xj(e){const{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:i,encodedBodySize:o,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,domInteractive:u,loadEventStart:c,loadEventEnd:d,redirectCount:f,startTime:p,transferSize:v,type:m}=e;return s===0?null:{type:`${t}.${m}`,start:gu(p),end:gu(i),name:n,data:{size:v,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,loadEventStart:c,loadEventEnd:d,domComplete:i,redirectCount:f}}}function Ej(e){const{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:i,decodedBodySize:o,encodedBodySize:a,responseStatus:l,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:gu(i),end:gu(s),name:r,data:{size:u,statusCode:l,decodedBodySize:o,encodedBodySize:a}}}function Cj(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.element?[t.element]:void 0;return um(e,"largest-contentful-paint",n)}function Pj(e){return e.sources!==void 0}function Tj(e){const t=[],n=[];for(const r of e.entries)if(Pj(r)){const s=[];for(const i of r.sources)if(i.node){n.push(i.node);const o=Fi.mirror.getId(i.node);o&&s.push(o)}t.push({value:r.value,nodeIds:s.length?s:void 0})}return um(e,"cumulative-layout-shift",n,t)}function Rj(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.target?[t.target]:void 0;return um(e,"first-input-delay",n)}function Ij(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.target?[t.target]:void 0;return um(e,"interaction-to-next-paint",n)}function um(e,t,n,r){const s=e.value,i=e.rating,o=gu(s);return{type:"web-vital",name:t,start:o,end:o,data:{value:s,size:s,rating:i,nodeIds:n?n.map(a=>Fi.mirror.getId(a)):void 0,attributions:r}}}function Aj(e){function t(s){e.performanceEntries.includes(s)||e.performanceEntries.push(s)}function n({entries:s}){s.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(s=>{r.push(fu(s,n))}),r.push(HR(bf(Cj,e)),uw(bf(Tj,e)),jR(bf(Rj,e)),qR(bf(Ij,e))),()=>{r.forEach(s=>s())}}const Ge=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Oj='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort((function(t,n){return p[n.s]-p[t.s]||t.f-n.f}));s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},O=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&j(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(O(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){G.prototype.flush.call(this)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(J)return J.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),s=i.length;return q(i,n),j(i,s-8,r.d()),j(i,s-4,e),i}(P(t))}const R=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function Mj(){const e=new Blob([Oj]);return URL.createObjectURL(e)}const O1=["info","warn","error","log"],ih="[Replay] ";function Cg(e,t="info"){Bo({category:"console",data:{logger:"replay"},level:t,message:`${ih}${e}`},{level:t})}function Dj(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return Ge?(O1.forEach(r=>{n[r]=(...s)=>{Te[r](ih,...s),t&&Cg(s.join(""),CR(r))}}),n.exception=(r,...s)=>{s.length&&n.error&&n.error(...s),Te.error(ih,r),e?li(r):t&&Cg(r,"error")},n.infoTick=(...r)=>{Te.info(ih,...r),t&&setTimeout(()=>Cg(r[0]),0)}):O1.forEach(r=>{n[r]=()=>{}}),n}const Ke=Dj();class Sw extends Error{constructor(){super(`Event buffer exceeded maximum size of ${hw}.`)}}class OI{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>hw)throw new Sw;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?bw(t):null}}class $j{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){Ge&&Ke.info("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((s,i)=>{const o=({data:a})=>{const l=a;if(l.method===t&&l.id===r){if(this._worker.removeEventListener("message",o),!l.success){Ge&&Ke.error("Error in compression worker: ",l.response),i(new Error("Error in compression worker"));return}s(l.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class Fj{constructor(t){this._worker=new $j(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=bw(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>hw?Promise.reject(new Sw):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{Ge&&Ke.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class Lj{constructor(t){this._fallback=new OI,this._compression=new Fj(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){Ge&&Ke.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,s=[];for(const i of t)s.push(this._compression.addEvent(i));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(s),this._fallback.clear()}catch(i){Ge&&Ke.exception(i,"Failed to add events when switching buffers.")}}}function Nj({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=Bj(t);if(n)return n}return Ge&&Ke.info("Using simple buffer"),new OI}function Bj(e){try{const t=e||Vj();if(!t)return;Ge&&Ke.info(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new Lj(n)}catch(t){Ge&&Ke.exception(t,"Failed to create compression worker")}}function Vj(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Mj():""}function _w(){try{return"sessionStorage"in jt&&!!jt.sessionStorage}catch{return!1}}function Uj(e){zj(),e.session=void 0}function zj(){if(_w())try{jt.sessionStorage.removeItem(dw)}catch{}}function MI(e){return e===void 0?!1:Math.random()<e}function DI(e){const t=Date.now(),n=e.id||qr(),r=e.started||t,s=e.lastActivity||t,i=e.segmentId||0,o=e.sampled,a=e.previousSessionId;return{id:n,started:r,lastActivity:s,segmentId:i,sampled:o,previousSessionId:a}}function kw(e){if(_w())try{jt.sessionStorage.setItem(dw,JSON.stringify(e))}catch{}}function Hj(e,t){return MI(e)?"session":t?"buffer":!1}function M1({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=Hj(e,t),i=DI({sampled:s,previousSessionId:r});return n&&kw(i),i}function jj(){if(!_w())return null;try{const e=jt.sessionStorage.getItem(dw);if(!e)return null;const t=JSON.parse(e);return Ge&&Ke.infoTick("Loading existing session"),DI(t)}catch{return null}}function vy(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function $I(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return vy(e.started,t,r)||vy(e.lastActivity,n,r)}function FI(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!$I(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Pg({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const s=r.stickySession&&jj();return s?FI(s,{sessionIdleExpire:e,maxReplayDuration:t})?(Ge&&Ke.infoTick("Session in sessionStorage is expired, creating new one..."),M1(r,{previousSessionId:s.id})):s:(Ge&&Ke.infoTick("Creating new session"),M1(r,{previousSessionId:n}))}function qj(e){return e.type===ot.Custom}function xw(e,t,n){return NI(e,t)?(LI(e,t,n),!0):!1}function Wj(e,t,n){return NI(e,t)?LI(e,t,n):Promise.resolve(null)}async function LI(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const s=e.recordingMode==="buffer";try{n&&s&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const i=e.getOptions(),o=Gj(t,i.beforeAddRecordingEvent);return o?await r.addEvent(o):void 0}catch(i){const o=i&&i instanceof Sw,a=o?"addEventSizeExceeded":"addEvent";if(o&&s)return r.clear(),r.waitForCheckout=!0,null;e.handleException(i),await e.stop({reason:a});const l=ct();l&&l.recordDroppedEvent("internal_sdk_error","replay")}}function NI(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=bw(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(Ge&&Ke.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function Gj(e,t){try{if(typeof t=="function"&&qj(e))return t(e)}catch(n){return Ge&&Ke.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function Ew(e){return!e.type}function yy(e){return e.type==="transaction"}function Kj(e){return e.type==="replay_event"}function D1(e){return e.type==="feedback"}function Yj(e){return(t,n)=>{if(!e.isEnabled()||!Ew(t)&&!yy(t))return;const r=n==null?void 0:n.statusCode;if(!(!r||r<200||r>=300)){if(yy(t)){Xj(e,t);return}Qj(e,t)}}}function Xj(e,t){var r,s;const n=e.getContext();(s=(r=t.contexts)==null?void 0:r.trace)!=null&&s.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function Qj(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||hu(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(s){e.handleException(s)}})}function Jj(e){return t=>{!e.isEnabled()||!Ew(t)||Zj(e,t)}}function Zj(e,t){var r,s,i;const n=(i=(s=(r=t.exception)==null?void 0:r.values)==null?void 0:s[0])==null?void 0:i.value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const o=oi({category:"replay.hydrate-error",data:{url:Lu()}});Hd(e,o)}}function e8(e){const t=ct();t&&t.on("beforeAddBreadcrumb",n=>t8(e,n))}function t8(e,t){if(!e.isEnabled()||!BI(t))return;const n=n8(t);n&&Hd(e,n)}function n8(e){return!BI(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?r8(e):oi(e)}function r8(e){var s;const t=(s=e.data)==null?void 0:s.arguments;if(!Array.isArray(t)||t.length===0)return oi(e);let n=!1;const r=t.map(i=>{if(!i)return i;if(typeof i=="string")return i.length>mf?(n=!0,`${i.slice(0,mf)}…`):i;if(typeof i=="object")try{const o=_s(i,7);return JSON.stringify(o).length>mf?(n=!0,`${JSON.stringify(o,null,2).slice(0,mf)}…`):o}catch{}return i});return oi({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function BI(e){return!!e.category}function s8(e,t){var n;return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!((n=t.originalException)!=null&&n.__rrweb__)}function VI(){const e=Zt().getPropagationContext().dsc;e&&delete e.replay_id;const t=Un();if(t){const n=Wi(t);delete n.replay_id}}function i8(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:ot.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function o8(e,t){return e.recordingMode!=="buffer"||t.message===fw||!t.exception||t.type?!1:MI(e.getOptions().errorSampleRate)}function a8(e){return Object.assign((t,n)=>!e.isEnabled()||e.isPaused()?t:Kj(t)?(delete t.breadcrumbs,t):!Ew(t)&&!yy(t)&&!D1(t)?t:e.checkAndHandleExpiredSession()?D1(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),i8(e,t),t):s8(t,n)&&!e.getOptions()._experiments.captureExceptions?(Ge&&Ke.log("Ignoring error from rrweb internals",t),null):((o8(e,t)||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):(VI(),t),{id:"Replay"})}function cm(e,t){return t.map(({type:n,start:r,end:s,name:i,data:o})=>{const a=e.throttledAddEvent({type:ot.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:i,startTimestamp:r,endTimestamp:s,data:o}}});return typeof a=="string"?Promise.resolve(null):a})}function l8(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function u8(e){return t=>{if(!e.isEnabled())return;const n=l8(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(cm(e,[n]),!1)))}}function c8(e,t){return Ge&&e.getOptions()._experiments.traceInternals?!1:lz(t,ct())}function UI(e,t){e.isEnabled()&&t!==null&&(c8(e,t.name)||e.addUpdate(()=>(cm(e,[t]),!0)))}function dm(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=ZR(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function zI(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function ep(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function HI(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:i,statusCode:o,request:a,response:l}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:vn({method:i,statusCode:o,request:a,response:l})}}function sd(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Ao(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:s,warnings:i}=d8(n);return r.body=s,i!=null&&i.length&&(r._meta={warnings:i}),r}function by(e,t){return Object.entries(e).reduce((n,[r,s])=>{const i=r.toLowerCase();return t.includes(i)&&e[r]&&(n[i]=s),n},{})}function d8(e){if(!e||typeof e!="string")return{body:e};const t=e.length>p1,n=f8(e);if(t){const r=e.slice(0,p1);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function f8(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function tp(e,t){const n=h8(e);return Io(n,t)}function h8(e,t=jt.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(jt.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function p8(e,t,n){try{const r=await g8(e,t,n),s=HI("resource.fetch",r);UI(n.replay,s)}catch(r){Ge&&Ke.exception(r,"Failed to capture fetch breadcrumb")}}function m8(e,t){const{input:n,response:r}=t,s=n?tI(n):void 0,i=dm(s),o=r?zI(r.headers.get("content-length")):void 0;i!==void 0&&(e.data.request_body_size=i),o!==void 0&&(e.data.response_body_size=o)}async function g8(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r}=t,{url:o,method:a,status_code:l=0,request_body_size:u,response_body_size:c}=e.data,d=tp(o,n.networkDetailAllowUrls)&&!tp(o,n.networkDetailDenyUrls),f=d?v8(n,t.input,u):sd(u),p=await y8(d,n,t.response,c);return{startTimestamp:s,endTimestamp:i,url:o,method:a,statusCode:l,request:f,response:p}}function v8({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?S8(n,t):{};if(!e)return Ao(s,r,void 0);const i=tI(n),[o,a]=eI(i,Ke),l=Ao(s,r,o);return a?ep(l,a):l}async function y8(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,s){if(!e&&s!==void 0)return sd(s);const i=r?jI(r.headers,n):{};if(!r||!t&&s!==void 0)return Ao(i,s,void 0);const[o,a]=await w8(r),l=b8(o,{networkCaptureBodies:t,responseBodySize:s,captureDetails:e,headers:i});return a?ep(l,a):l}function b8(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:s}){try{const i=e!=null&&e.length&&n===void 0?dm(e):n;return r?t?Ao(s,i,e):Ao(s,i,void 0):sd(i)}catch(i){return Ge&&Ke.exception(i,"Failed to serialize response body"),Ao(s,n,void 0)}}async function w8(e){const t=_8(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await k8(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(Ge&&Ke.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(Ge&&Ke.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function jI(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function S8(e,t){return e.length===1&&typeof e[0]!="string"?$1(e[0],t):e.length===2?$1(e[1],t):{}}function $1(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?jI(n,t):Array.isArray(n)?{}:by(n,t):{}}function _8(e){try{return e.clone()}catch(t){Ge&&Ke.exception(t,"Failed to clone response body")}}function k8(e){return new Promise((t,n)=>{const r=hu(()=>n(new Error("Timeout while trying to read response body")),500);x8(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function x8(e){return await e.text()}async function E8(e,t,n){try{const r=P8(e,t,n),s=HI("resource.xhr",r);UI(n.replay,s)}catch(r){Ge&&Ke.exception(r,"Failed to capture xhr breadcrumb")}}function C8(e,t){const{xhr:n,input:r}=t;if(!n)return;const s=dm(r),i=n.getResponseHeader("content-length")?zI(n.getResponseHeader("content-length")):A8(n.response,n.responseType);s!==void 0&&(e.data.request_body_size=s),i!==void 0&&(e.data.response_body_size=i)}function P8(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r,input:o,xhr:a}=t,{url:l,method:u,status_code:c=0,request_body_size:d,response_body_size:f}=e.data;if(!l)return null;if(!a||!tp(l,n.networkDetailAllowUrls)||tp(l,n.networkDetailDenyUrls)){const C=sd(d),R=sd(f);return{startTimestamp:s,endTimestamp:i,url:l,method:u,statusCode:c,request:C,response:R}}const p=a[va],v=p?by(p.request_headers,n.networkRequestHeaders):{},m=by(T8(a),n.networkResponseHeaders),[y,b]=n.networkCaptureBodies?eI(o,Ke):[void 0],[w,x]=n.networkCaptureBodies?R8(a):[void 0],P=Ao(v,d,y),S=Ao(m,f,w);return{startTimestamp:s,endTimestamp:i,url:l,method:u,statusCode:c,request:b?ep(P,b):P,response:x?ep(S,x):S}}function T8(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
53
|
-
`).reduce((n,r)=>{const[s,i]=r.split(": ");return i&&(n[s.toLowerCase()]=i),n},{}):{}}function R8(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return I8(e.response,e.responseType)}catch(n){t.push(n)}return Ge&&Ke.warn("Failed to get xhr response body",...t),[void 0]}function I8(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return Ge&&Ke.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Ge&&Ke.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function A8(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return dm(n)}catch{return}}function O8(e){const t=ct();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o};t&&t.on("beforeAddBreadcrumb",(l,u)=>M8(a,l,u))}catch{}}function M8(e,t,n){if(t.data)try{D8(t)&&F8(n)&&(C8(t,n),E8(t,n,e)),$8(t)&&L8(n)&&(m8(t,n),p8(t,n,e))}catch(r){Ge&&Ke.exception(r,"Error when enriching network breadcrumb")}}function D8(e){return e.category==="xhr"}function $8(e){return e.category==="fetch"}function F8(e){return e==null?void 0:e.xhr}function L8(e){return e==null?void 0:e.response}function N8(e,{autoFlushOnFeedback:t}){const n=ct();XR(hj(e)),im(u8(e)),e8(e),O8(e);const r=a8(e);BU(r),n&&(n.on("beforeSendEvent",Jj(e)),n.on("afterSendEvent",Yj(e)),n.on("createDsc",s=>{const i=e.getSessionId();i&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(s.replay_id=i)}),n.on("spanStart",s=>{e.lastActiveSpan=s}),n.on("spanEnd",s=>{e.lastActiveSpan=s}),n.on("beforeSendFeedback",async(s,i)=>{var a;const o=e.getSessionId();i!=null&&i.includeReplay&&e.isEnabled()&&o&&((a=s.contexts)!=null&&a.feedback)&&(s.contexts.feedback.source==="api"&&t&&await e.flush(),s.contexts.feedback.replay_id=o)}),t&&n.on("openFeedbackWidget",async()=>{await e.flush()}))}async function B8(e){try{return Promise.all(cm(e,[V8(jt.performance.memory)]))}catch{return[]}}function V8(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function U8(e,t,n){let r,s,i;const o=n!=null&&n.maxWait?Math.max(n.maxWait,t):0;function a(){return l(),r=e(),r}function l(){s!==void 0&&clearTimeout(s),i!==void 0&&clearTimeout(i),s=i=void 0}function u(){return s!==void 0||i!==void 0?a():r}function c(){return s&&clearTimeout(s),s=hu(a,t),o&&i===void 0&&(i=hu(a,o)),r}return c.cancel=l,c.flush=u,c}const Jr=bt.navigator;function z8(){return/iPhone|iPad|iPod/i.test((Jr==null?void 0:Jr.userAgent)??"")||/Macintosh/i.test((Jr==null?void 0:Jr.userAgent)??"")&&(Jr!=null&&Jr.maxTouchPoints)&&(Jr==null?void 0:Jr.maxTouchPoints)>1?{sampling:{mousemove:!1}}:{}}function H8(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){Ge&&Ke.warn("Received replay event after session expired.");return}const s=r||!t;t=!0,e.clickDetector&&lj(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!xw(e,n,s))return!0;if(!s)return!1;const i=e.session;if(q8(e,s),e.recordingMode==="buffer"&&i&&e.eventBuffer){const o=e.eventBuffer.getEarliestTimestamp();o&&(Ge&&Ke.info(`Updating session start time to earliest event in buffer to ${new Date(o)}`),i.started=o,e.getOptions().stickySession&&kw(i))}return i!=null&&i.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function j8(e){const t=e.getOptions();return{type:ot.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function q8(e,t){!t||!e.session||e.session.segmentId!==0||xw(e,j8(e),!1)}function W8(e,t,n,r){return Bu(cR(e,sw(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function G8({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
|
|
54
|
-
`;if(typeof e=="string")n=`${r}${e}`;else{const i=new TextEncoder().encode(r);n=new Uint8Array(i.length+e.length),n.set(i),n.set(e,i.length)}return n}async function K8({client:e,scope:t,replayId:n,event:r}){const s=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,i={event_id:n,integrations:s};e.emit("preprocessEvent",r,i);const o=await mR(e.getOptions(),r,i,t,e,gi());if(!o)return null;e.emit("postprocessEvent",o,i),o.platform=o.platform||"javascript";const a=e.getSdkMetadata(),{name:l,version:u}=(a==null?void 0:a.sdk)||{};return o.sdk={...o.sdk,name:l||"sentry.javascript.unknown",version:u||"0.0.0"},o}async function Y8({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=G8({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:l,traceIds:u,initialTimestamp:c}=r,d=ct(),f=Zt(),p=d==null?void 0:d.getTransport(),v=d==null?void 0:d.getDsn();if(!d||!p||!v||!i.sampled)return ji({});const m={type:C4,replay_start_timestamp:c/1e3,timestamp:s/1e3,error_ids:l,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:i.sampled},y=await K8({scope:f,client:d,replayId:t,event:m});if(!y)return d.recordDroppedEvent("event_processor","replay"),Ge&&Ke.info("An event processor returned `null`, will not send event."),ji({});delete y.sdkProcessingMetadata;const b=W8(y,o,v,d.getOptions().tunnel);let w;try{w=await p.send(b)}catch(P){const S=new Error(fw);try{S.cause=P}catch{}throw S}if(typeof w.statusCode=="number"&&(w.statusCode<200||w.statusCode>=300))throw new qI(w.statusCode);const x=kR({},w);if(_R(x,"replay"))throw new Cw(x);return w}class qI extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Cw extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function WI(e,t={count:0,interval:O4}){const{recordingData:n,onError:r}=e;if(n.length)try{return await Y8(e),!0}catch(s){if(s instanceof qI||s instanceof Cw)throw s;if(LU("Replays",{_retryCount:t.count}),r&&r(s),t.count>=M4){const i=new Error(`${fw} - max retries exceeded`);try{i.cause=s}catch{}throw i}return t.interval*=++t.count,new Promise((i,o)=>{hu(async()=>{try{await WI(e,t),i(!0)}catch(a){o(a)}},t.interval)})}}const GI="__THROTTLED",X8="__SKIPPED";function Q8(e,t,n){const r=new Map,s=a=>{const l=a-n;r.forEach((u,c)=>{c<l&&r.delete(c)})},i=()=>[...r.values()].reduce((a,l)=>a+l,0);let o=!1;return(...a)=>{const l=Math.floor(Date.now()/1e3);if(s(l),i()>=t){const c=o;return o=!0,c?X8:GI}o=!1;const u=r.get(l)||0;return r.set(l,u+1),e(...a)}}class J8{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:P4,sessionIdleExpire:T4},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=U8(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Q8((o,a)=>Wj(this,o,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),i=r?{threshold:Math.min(D4,r),timeout:r,scrollTimeout:$4,ignoreSelector:s?s.join(","):""}:void 0;if(i&&(this.clickDetector=new sj(this,i)),Ge){const o=t._experiments;Ke.setConfig({captureExceptions:!!o.captureExceptions,traceInternals:!!o.traceInternals})}this._handleVisibilityChange=()=>{jt.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const o=oi({category:"ui.blur"});this._doChangeToBackgroundTasks(o)},this._handleWindowFocus=()=>{const o=oi({category:"ui.focus"});this._doChangeToForegroundTasks(o)},this._handleKeyboardEvent=o=>{vj(this,o)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){Ge&&Ke.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,s=n<=0&&r<=0;if(this._requiresManualStart=s,!s){if(this._initializeSessionForSampling(t),!this.session){Ge&&Ke.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",Ge&&Ke.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){Ge&&Ke.info("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){Ge&&Ke.info("Buffering is in progress, call `flush()` to save the replay");return}Ge&&Ke.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=Pg({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled){Ge&&Ke.info("Buffering is in progress, call `flush()` to save the replay");return}Ge&&Ke.infoTick("Starting replay in buffer mode");const t=Pg({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=Fi({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:A4}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:H8(this),...z8(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){var r;if(this._isEnabled){this._isEnabled=!1;try{Ge&&Ke.info(`Stopping Replay${n?` triggered by ${n}`:""}`),VI(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),(r=this.eventBuffer)==null||r.destroy(),this.eventBuffer=null,Uj(this)}catch(s){this.handleException(s)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Ge&&Ke.info("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),Ge&&Ke.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();Ge&&Ke.info("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode!=="buffer"&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){var t;return(t=this.session)==null?void 0:t.id}checkAndHandleExpiredSession(){if(this._lastActivity&&vy(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${jt.location.pathname}${jt.location.hash}${jt.location.search}`,n=`${jt.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===GI){const s=oi({category:"replay.throttled"});this.addUpdate(()=>!xw(this,{type:Q5,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||Un(),n=t&&tr(t),s=(n&&kt(n).data||{})[zr];if(!(!n||!s||!["route","custom"].includes(s)))return kt(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Nj({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Pg({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return FI(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{jt.document.addEventListener("visibilitychange",this._handleVisibilityChange),jt.addEventListener("blur",this._handleWindowBlur),jt.addEventListener("focus",this._handleWindowFocus),jt.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(N8(this,{autoFlushOnFeedback:this._options._experiments.autoFlushOnFeedback}),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=Aj(this)}_removeListeners(){try{jt.document.removeEventListener("visibilitychange",this._handleVisibilityChange),jt.removeEventListener("blur",this._handleWindowBlur),jt.removeEventListener("focus",this._handleWindowFocus),jt.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||$I(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){Ge&&Ke.info("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:ot.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=Sj(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(cm(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){var n;const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){Ge&&Ke.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!((n=this.eventBuffer)!=null&&n.hasEvents)&&(await B8(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const r=Date.now();if(r-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const s=this._popEventContext(),i=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await WI({replayId:t,recordingData:o,segmentId:i,eventContext:s,session:this.session,timestamp:r,onError:a=>this.handleException(a)})}catch(r){this.handleException(r),this.stop({reason:"sendReplay"});const s=ct();if(s){const i=r instanceof Cw?"ratelimit_backoff":"send_error";s.recordDroppedEvent(i,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){Ge&&Ke.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,s=Date.now()-n;this._debouncedFlush.cancel();const i=s<this._options.minReplayDuration,o=s>this._options.maxReplayDuration+5e3;if(i||o){Ge&&Ke.info(`Session duration (${Math.floor(s/1e3)}s) is too ${i?"short":"long"}, not sending replay.`),i&&this._debouncedFlush();return}const a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&Ge&&Ke.info("Flushing initial segment without checkout.");const l=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,l&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&kw(this.session)}_onMutationHandler(t){const n=t.length,r=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,i=r&&n>r;if(n>s||i){const o=oi({category:"replay.mutations",data:{count:n,limit:i}});this._createCustomBreadcrumb(o)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function sc(e,t){return[...e,...t].join(",")}function Z8({mask:e,unmask:t,block:n,unblock:r,ignore:s}){const i=["base","iframe[srcdoc]:not([src])"],o=sc(e,[".sentry-mask","[data-sentry-mask]"]),a=sc(t,[]);return{maskTextSelector:o,unmaskTextSelector:a,blockSelector:sc(n,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:sc(r,[]),ignoreSelector:sc(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function eq({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:i}){return!r||s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?i:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i}const F1='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',tq=["content-length","content-type","accept"];let L1=!1;const nq=e=>new rq(e);class rq{constructor({flushMinDelay:t=R4,flushMaxDelay:n=I4,minReplayDuration:r=F4,maxReplayDuration:s=m1,stickySession:i=!0,useCompression:o=!0,workerUrl:a,_experiments:l={},maskAllText:u=!0,maskAllInputs:c=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:f=750,mutationLimit:p=1e4,slowClickTimeout:v=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:y=[],networkDetailDenyUrls:b=[],networkCaptureBodies:w=!0,networkRequestHeaders:x=[],networkResponseHeaders:P=[],mask:S=[],maskAttributes:C=["title","placeholder"],unmask:R=[],block:k=[],unblock:E=[],ignore:I=[],maskFn:A,beforeAddRecordingEvent:O,beforeErrorSampling:L,onError:M}={}){this.name="Replay";const z=Z8({mask:S,unmask:R,block:k,unblock:E,ignore:I});if(this._recordingOptions={maskAllInputs:c,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:A,maskInputFn:A,maskAttributeFn:(H,G,W)=>eq({maskAttributes:C,maskAllText:u,privacyOptions:z,key:H,value:G,el:W}),...z,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:H=>{try{H.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!l.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,L4),maxReplayDuration:Math.min(s,m1),stickySession:i,useCompression:o,workerUrl:a,blockAllMedia:d,maskAllInputs:c,maskAllText:u,mutationBreadcrumbLimit:f,mutationLimit:p,slowClickTimeout:v,slowClickIgnoreSelectors:m,networkDetailAllowUrls:y,networkDetailDenyUrls:b,networkCaptureBodies:w,networkRequestHeaders:N1(x),networkResponseHeaders:N1(P),beforeAddRecordingEvent:O,beforeErrorSampling:L,onError:M,_experiments:l},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${F1}`:F1),this._isInitialized&&i1())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return L1}set _isInitialized(t){L1=t}afterAllSetup(t){!i1()||this._replay||(this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){var t;if((t=this._replay)!=null&&t.isEnabled())return this._replay.getSessionId()}getRecordingMode(){var t;if((t=this._replay)!=null&&t.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=sq(this._initialOptions,t);this._replay=new J8({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function sq(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...vn(e)},s=Wa(n.replaysSessionSampleRate),i=Wa(n.replaysOnErrorSampleRate);return s==null&&i==null&&Ji(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),s!=null&&(r.sessionSampleRate=s),i!=null&&(r.errorSampleRate=i),r}function N1(e){return[...tq,...e.map(t=>t.toLowerCase())]}const B1=new WeakMap,Tg=new Map,oh={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function iq(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:s,shouldCreateSpanForRequest:i,enableHTTPTimings:o,tracePropagationTargets:a}={traceFetch:oh.traceFetch,traceXHR:oh.traceXHR,trackFetchStreamPerformance:oh.trackFetchStreamPerformance,...t},l=typeof i=="function"?i:d=>!0,u=d=>lq(d,a),c={};n&&(e.addEventProcessor(d=>(d.type==="transaction"&&d.spans&&d.spans.forEach(f=>{if(f.op==="http.client"){const p=Tg.get(f.span_id);p&&(f.timestamp=p/1e3,Tg.delete(f.span_id))}}),d)),s&&Xz(d=>{if(d.response){const f=B1.get(d.response);f&&d.endTimestamp&&Tg.set(f,d.endTimestamp)}}),OR(d=>{const f=zz(d,l,u,c);if(d.response&&d.fetchData.__span&&B1.set(d.response,d.fetchData.__span),f){const p=KI(d.fetchData.url),v=p?$i(p).host:void 0;f.setAttributes({"http.url":p,"server.address":v})}o&&f&&V1(f)})),r&&JR(d=>{const f=uq(d,l,u,c);o&&f&&V1(f)})}function oq(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function V1(e){const{url:t}=kt(e).data;if(!t||typeof t!="string")return;const n=fu("resource",({entries:r})=>{r.forEach(s=>{oq(s)&&s.name.endsWith(t)&&(aq(s).forEach(o=>e.setAttribute(...o)),setTimeout(n))})})}function js(e=0){return((Xr()||performance.timeOrigin)+e)/1e3}function aq(e){const{name:t,version:n}=YR(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),Xr()?[...r,["http.request.redirect_start",js(e.redirectStart)],["http.request.fetch_start",js(e.fetchStart)],["http.request.domain_lookup_start",js(e.domainLookupStart)],["http.request.domain_lookup_end",js(e.domainLookupEnd)],["http.request.connect_start",js(e.connectStart)],["http.request.secure_connection_start",js(e.secureConnectionStart)],["http.request.connection_end",js(e.connectEnd)],["http.request.request_start",js(e.requestStart)],["http.request.response_start",js(e.responseStart)],["http.request.response_end",js(e.responseEnd)]]:r}function lq(e,t){const n=Lu();if(n){let r,s;try{r=new URL(e,n),s=new URL(n).origin}catch{return!1}const i=r.origin===s;return t?Io(r.toString(),t)||i&&Io(r.pathname,t):i}else{const r=!!e.match(/^\/(?!\/)/);return t?Io(e,t):r}}function uq(e,t,n,r){const s=e.xhr,i=s==null?void 0:s[va];if(!s||s.__sentry_own_request__||!i)return;const{url:o,method:a}=i,l=qi()&&t(o);if(e.endTimestamp&&l){const m=s.__sentry_xhr_span_id__;if(!m)return;const y=r[m];y&&i.status_code!==void 0&&(YT(y,i.status_code),y.end(),delete r[m]);return}const u=KI(o),c=$i(u||o),d=RR(o),f=!!Un(),p=l&&f?Ka({name:`${a} ${d}`,attributes:{url:o,type:"xhr","http.method":a,"http.url":u,"server.address":c==null?void 0:c.host,[ln]:"auto.http.browser",[qa]:"http.client",...(c==null?void 0:c.search)&&{"http.query":c==null?void 0:c.search},...(c==null?void 0:c.hash)&&{"http.fragment":c==null?void 0:c.hash}}}):new Ga;s.__sentry_xhr_span_id__=p.spanContext().spanId,r[s.__sentry_xhr_span_id__]=p,n(o)&&cq(s,qi()&&f?p:void 0);const v=ct();return v&&v.emit("beforeOutgoingRequestSpan",p,e),p}function cq(e,t){const{"sentry-trace":n,baggage:r}=ER({span:t});n&&dq(e,n,r)}function dq(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader("baggage",n)}catch{}}function KI(e){try{return new URL(e,xt.location.origin).href}catch{return}}function fq(){xt.document?xt.document.addEventListener("visibilitychange",()=>{const e=Un();if(!e)return;const t=tr(e);if(xt.document.hidden&&t){const n="cancelled",{op:r,status:s}=kt(t);ci&&Te.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||t.setStatus({code:Pn,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):ci&&Te.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const hq="BrowserTracing",pq={...nh,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,_experiments:{},...oh},U1=(e={})=>{const t=xt.document;NV();const{enableInp:n,enableLongTask:r,enableLongAnimationFrame:s,_experiments:{enableInteractions:i,enableStandaloneClsSpans:o},beforeStartSpan:a,idleTimeout:l,finalTimeout:u,childSpanTimeout:c,markBackgroundSpan:d,traceFetch:f,traceXHR:p,trackFetchStreamPerformance:v,shouldCreateSpanForRequest:m,enableHTTPTimings:y,instrumentPageLoad:b,instrumentNavigation:w}={...pq,...e},x=t3({recordClsStandaloneSpans:o||!1});n&&C3(),s&&bt.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?r3():r&&n3(),i&&s3();const P={name:void 0,source:void 0};function S(C,R){const k=R.op==="pageload",E=a?a(R):R,I=E.attributes||{};R.name!==E.name&&(I[zr]="custom",E.attributes=I),P.name=E.name,P.source=I[zr];const A=pR(E,{idleTimeout:l,finalTimeout:u,childSpanTimeout:c,disableAutoFinish:k,beforeSpanEnd:L=>{x(),u3(L,{recordClsOnPageloadSpan:!o}),H1(C,void 0);const M=Zt(),z=M.getPropagationContext();M.setPropagationContext({...z,traceId:A.spanContext().traceId,sampled:il(A),dsc:Wi(L)})}});H1(C,A);function O(){t&&["interactive","complete"].includes(t.readyState)&&C.emit("idleSpanEnableAutoFinish",A)}k&&t&&(t.addEventListener("readystatechange",()=>{O()}),O())}return{name:hq,afterAllSetup(C){let R=Lu();function k(){const E=fm(C);E&&!kt(E).timestamp&&(ci&&Te.log(`[Tracing] Finishing current active span with op: ${kt(E).op}`),E.end())}if(C.on("startNavigationSpan",E=>{ct()===C&&(k(),gi().setPropagationContext({traceId:No(),sampleRand:Math.random()}),Zt().setPropagationContext({traceId:No(),sampleRand:Math.random()}),S(C,{op:"navigation",...E}))}),C.on("startPageLoadSpan",(E,I={})=>{if(ct()!==C)return;k();const A=I.sentryTrace||z1("sentry-trace"),O=I.baggage||z1("baggage"),L=IV(A,O);Zt().setPropagationContext(L),S(C,{op:"pageload",...E})}),xt.location){if(b){const E=Xr();mq(C,{name:xt.location.pathname,startTime:E?E/1e3:void 0,attributes:{[zr]:"url",[ln]:"auto.pageload.browser"}})}w&&im(({to:E,from:I})=>{if(I===void 0&&(R==null?void 0:R.indexOf(E))!==-1){R=void 0;return}I!==E&&(R=void 0,YI(C,{name:xt.location.pathname,attributes:{[zr]:"url",[ln]:"auto.navigation.browser"}}))})}d&&fq(),i&&gq(C,l,u,c,P),n&&T3(),iq(C,{traceFetch:f,traceXHR:p,trackFetchStreamPerformance:v,tracePropagationTargets:C.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:m,enableHTTPTimings:y})}}};function mq(e,t,n){return e.emit("startPageLoadSpan",t,n),Zt().setTransactionName(t.name),fm(e)}function YI(e,t){return e.emit("startNavigationSpan",t),Zt().setTransactionName(t.name),fm(e)}function z1(e){const t=xt.document,n=t==null?void 0:t.querySelector(`meta[name=${e}]`);return(n==null?void 0:n.getAttribute("content"))||void 0}function gq(e,t,n,r,s){const i=xt.document;let o;const a=()=>{const l="ui.action.click",u=fm(e);if(u){const c=kt(u).op;if(["navigation","pageload"].includes(c)){ci&&Te.warn(`[Tracing] Did not create ${l} span because a pageload or navigation span is in progress.`);return}}if(o&&(o.setAttribute(Gv,"interactionInterrupted"),o.end(),o=void 0),!s.name){ci&&Te.warn(`[Tracing] Did not create ${l} transaction because _latestRouteName is missing.`);return}o=pR({name:s.name,op:l,attributes:{[zr]:s.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};i&&addEventListener("click",a,{once:!1,capture:!0})}const XI="_sentry_idleSpan";function fm(e){return e[XI]}function H1(e,t){Gr(e,XI,t)}const QI=["activate","mount"],JI=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,vq=/(?:^|[-_])(\w)/g,yq=e=>e.replace(vq,t=>t.toUpperCase()).replace(/[-_]/g,""),bq="<Root>",Rg="<Anonymous>",wq=(e,t)=>e.repeat(t),Dc=(e,t)=>{if(!e)return Rg;if(e.$root===e)return bq;if(!e.$options)return Rg;const n=e.$options;let r=n.name||n._componentTag||n.__name;const s=n.__file;if(!r&&s){const i=s.match(/([^/\\]+)\.vue$/);i&&(r=i[1])}return(r?`<${yq(r)}>`:Rg)+(s&&t!==!1?` at ${s}`:"")},Sq=e=>{if(e&&(e._isVue||e.__isVue)&&e.$parent){const t=[];let n=0;for(;e;){if(t.length>0){const s=t[t.length-1];if(s.constructor===e.constructor){n++,e=e.$parent;continue}else n>0&&(t[t.length-1]=[s,n],n=0)}t.push(e),e=e.$parent}return`
|
|
55
|
-
|
|
56
|
-
found in
|
|
57
|
-
|
|
58
|
-
${t.map((s,i)=>`${(i===0?"---> ":wq(" ",5+i*2))+(Array.isArray(s)?`${Dc(s[0])}... (${s[1]} recursive calls)`:Dc(s))}`).join(`
|
|
59
|
-
`)}`}return`
|
|
60
|
-
|
|
61
|
-
(found in ${Dc(e)})`},_q=(e,t)=>{const{errorHandler:n}=e.config;e.config.errorHandler=(r,s,i)=>{var u;const o=Dc(s,!1),a=s?Sq(s):"",l={componentName:o,lifecycleHook:i,trace:a};if(t.attachProps&&s&&((u=s.$options)!=null&&u.propsData?l.propsData=s.$options.propsData:s.$props&&(l.propsData=s.$props)),setTimeout(()=>{li(r,{captureContext:{contexts:{vue:l}},mechanism:{handled:!!n,type:"vue"}})}),typeof n=="function"&&e.config.errorHandler)n.call(e,r,s,i);else throw r}},j1="ui.vue",kq={activate:["activated","deactivated"],create:["beforeCreate","created"],unmount:["beforeUnmount","unmounted"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function xq(e,t,n){e.$_sentryRootSpanTimer&&clearTimeout(e.$_sentryRootSpanTimer),e.$_sentryRootSpanTimer=setTimeout(()=>{var r;(r=e.$root)!=null&&r.$_sentryRootSpan&&(e.$root.$_sentryRootSpan.end(t),e.$root.$_sentryRootSpan=void 0)},n)}function Eq(e,t){function n(s){return s.replace(/^<([^\s]*)>(?: at [^\s]*)?$/,"$1")}return e.some(s=>n(t)===n(s))}const Cq=(e={})=>{const t=(e.hooks||[]).concat(QI).filter((r,s,i)=>i.indexOf(r)===s),n={};for(const r of t){const s=kq[r];if(!s){JI&&Te.warn(`Unknown hook: ${r}`);continue}for(const i of s)n[i]=function(){var u;const o=this.$root===this;o&&(this.$_sentryRootSpan=this.$_sentryRootSpan||Ka({name:"Application Render",op:`${j1}.render`,attributes:{[ln]:"auto.ui.vue"},onlyIfParent:!0}));const a=Dc(this,!1),l=Array.isArray(e.trackComponents)?Eq(e.trackComponents,a):e.trackComponents;if(!(!o&&!l))if(this.$_sentrySpans=this.$_sentrySpans||{},i==s[0]){if(((u=this.$root)==null?void 0:u.$_sentryRootSpan)||Un()){const d=this.$_sentrySpans[r];d&&d.end(),this.$_sentrySpans[r]=Ka({name:`Vue ${a}`,op:`${j1}.${r}`,attributes:{[ln]:"auto.ui.vue"},onlyIfParent:!0})}}else{const c=this.$_sentrySpans[r];if(!c)return;c.end(),xq(this,er(),e.timeout||2e3)}}}return n},Pq=bt,Tq={Vue:Pq.Vue,attachProps:!0,attachErrorHandler:!0,tracingOptions:{hooks:QI,timeout:2e3,trackComponents:!1}},Rq="Vue",Iq=(e={})=>({name:Rq,setup(t){const n={...Tq,...t.getOptions(),...e};if(!n.Vue&&!n.app){Ji(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue specific errors will not be captured. Update your `Sentry.init` call with an appropriate config option: `app` (Application Instance - Vue 3) or `Vue` (Vue Constructor - Vue 2).")});return}n.app?(Array.isArray(n.app)?n.app:[n.app]).forEach(s=>q1(s,n)):n.Vue&&q1(n.Vue,n)}}),q1=(e,t)=>{var n;JI&&((n=e._instance)==null?void 0:n.isMounted)===!0&&Ji(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`.")}),t.attachErrorHandler&&_q(e,t),qi(t)&&e.mixin(Cq(t.tracingOptions))};function Aq(e={}){const t={defaultIntegrations:[...sI(),Iq()],...e};return xR(t,"vue"),E4(t)}function Oq(e,t,n){let r=!0;e.onError(s=>li(s,{mechanism:{handled:!1}})),e.beforeEach((s,i,o)=>{const a=i.name==null&&i.matched.length===0||i.name===void 0&&r;r&&(r=!1);const l={[ln]:"auto.navigation.vue"};for(const d of Object.keys(s.params))l[`params.${d}`]=s.params[d];for(const d of Object.keys(s.query)){const f=s.query[d];f&&(l[`query.${d}`]=f)}let u=s.path,c="url";if(s.name&&t.routeLabel!=="path")u=s.name.toString(),c="custom";else if(s.matched.length>0){const d=s.matched.length-1;u=s.matched[d].path,c="route"}if(Zt().setTransactionName(u),t.instrumentPageLoad&&a){const d=Mq();d&&(kt(d).data[zr]!=="custom"&&(d.updateName(u),d.setAttribute(zr,c)),d.setAttributes({...l,[ln]:"auto.pageload.vue"}))}t.instrumentNavigation&&!a&&(l[zr]=c,l[ln]="auto.navigation.vue",n({name:u,op:"navigation",attributes:l})),o&&o()})}function Mq(){const e=Un(),t=e&&tr(e);if(!t)return;const n=kt(t).op;return n==="navigation"||n==="pageload"?t:void 0}function Dq(e={}){if(!e.router)return U1(e);const t=U1({...e,instrumentNavigation:!1}),{router:n,instrumentNavigation:r=!0,instrumentPageLoad:s=!0,routeLabel:i="name"}=e;return{...t,afterAllSetup(o){t.afterAllSetup(o),Oq(n,{routeLabel:i,instrumentNavigation:r,instrumentPageLoad:s},l=>{YI(o,l)})}}}async function ZI(){return"/"}async function Wn(e=!0,t=!0){const n=fn.create({baseURL:await ZI()});return n.interceptors.request.use(r=>{var s,i;return console.debug(`${(s=r.method)==null?void 0:s.toUpperCase().padEnd(6)} ${(i=r.url)==null?void 0:i.padEnd(25)} WithAuth: ${e==null?void 0:e.toString().padEnd(7)} AutoHandle401: ${t==null?void 0:t.toString().padEnd(7)} BaseURL: ${r.baseURL}`),r}),e&&n.interceptors.request.use(async r=>{const s=us();return s.loadTokens(),s.hasAuthToken&&(r.headers.Authorization=`Bearer ${s.token}`),r},r=>(console.error("Error in axios request interceptor",r),Promise.reject(r))),t&&n.interceptors.response.use(r=>r,async r=>{var d;const{response:s,config:i}=r;if(!s)return console.error("No response was returned by axios",r),Promise.reject({message:`No response was returned by axios - URL ${i==null?void 0:i.url}`,stack:r.stack});if(s.status===ga.FailedDependency)return Promise.reject(r);if(![ga.Unauthorized,ga.Forbidden].includes(s.status))return console.error("Error in axios response interceptor which is not 401 or 403",r),li(r),Promise.reject({message:`${r.message} - URL ${i==null?void 0:i.url}`,stack:r.stack});if(s.status===ga.Forbidden){const f=(d=r==null?void 0:r.response)==null?void 0:d.data;return console.error("[HttpClient] 403 Forbidden",f),Br("auth:permission-denied").emit({roles:f==null?void 0:f.roles,permissions:f==null?void 0:f.permissions,error:f==null?void 0:f.error,url:i==null?void 0:i.url}),Promise.reject(r)}const o=us();o.loadTokens();const{reasonCode:a,url:l}=o.extractSpecialReasonCode(r);if(a)return await o.logout(!1,Gb(a)),console.error(`[AuthStore] 401 Unauthorized - emitting 'auth:${a}' with reason ${a}`),Br(`auth:${a}`).emit({url:l,error:r.message,reasonCode:a}),Promise.reject(r);await o.checkAuthenticationRequirements();const{success:u,handled:c}=await o.verifyOrRefreshLoginOnceOrLogout();if(c)return Promise.reject(r);if(u){if(!(i!=null&&i.url))throw new Error("No URL in axios config, cannot retry");console.debug("Redoing request without interceptors",i==null?void 0:i.url);const f=i;return f.headers||(f.headers={}),f.headers.Authorization=`Bearer ${o.token}`,fn(f)}return console.error("[HttpClient] 401 Unauthorized - emitting 'auth:failure'"),Br("auth:failure").emit({url:i==null?void 0:i.url,error:r.message}),Promise.reject(r)}),n}class vr{static async get(t){return(await(await Wn(!0)).get(t)).data}static async put(t,n){return(await(await Wn(!0)).put(t,n)).data}static async post(t,n){return(await(await Wn(!0)).post(t,n)).data}static async postUpload(t,n,r){return await(await Wn(!0)).post(t,n,r)}static async getDownload(t,n){return await(await Wn(!0)).request({method:"GET",url:t,data:n,responseType:"arraybuffer"})}static async delete(t,n){return(await(await Wn(!0)).request({url:t,method:"delete",data:n})).data}static async patch(t,n){return(await(await Wn(!0)).patch(t,n)).data}}const ie=class ie{};ve(ie,"base","/api"),ve(ie,"firstTimeSetupRoute",`${ie.base}/first-time-setup`),ve(ie,"completeFirstTimeSetupRoute",`${ie.firstTimeSetupRoute}/complete`),ve(ie,"printerRoute",`${ie.base}/printer`),ve(ie,"printerBatchRoute",`${ie.printerRoute}/batch`),ve(ie,"printerTestConnectionRoute",`${ie.printerRoute}/test-connection`),ve(ie,"printerSettingsRoute",`${ie.base}/printer-settings`),ve(ie,"floorRoute",`${ie.base}/floor`),ve(ie,"batchRoute",`${ie.base}/batch`),ve(ie,"batchGetLastPrintedFilesRoute",`${ie.batchRoute}/reprint/list`),ve(ie,"batchReprintFilesRoute",`${ie.batchRoute}/reprint/execute`),ve(ie,"printCompletionRoute",`${ie.base}/print-completion`),ve(ie,"printerFilesRoute",`${ie.base}/printer-files`),ve(ie,"printerFilesPurgeRoute",`${ie.printerFilesRoute}/purge`),ve(ie,"printerGroupRoute",`${ie.base}/printer-group`),ve(ie,"createGroupRoute",`${ie.base}/printer-group`),ve(ie,"deleteGroupRoute",t=>`${ie.base}/printer-group/${t}`),ve(ie,"updateGroupNameRoute",t=>`${ie.base}/printer-group/${t}/name`),ve(ie,"addPrinterToGroupRoute",t=>`${ie.base}/printer-group/${t}/printer`),ve(ie,"deletePrinterFromGroupRoute",ie.addPrinterToGroupRoute),ve(ie,"customGCodeRoute",`${ie.base}/custom-gcode`),ve(ie,"userRoute",`${ie.base}/user`),ve(ie,"rolesRoute",`${ie.base}/user/roles`),ve(ie,"userProfileRoute",`${ie.userRoute}/profile`),ve(ie,"settingsRoute",`${ie.base}/settings`),ve(ie,"settingsSensitiveRoute",`${ie.settingsRoute}/sensitive`),ve(ie,"updateLoginRequiredRoute",`${ie.settingsRoute}/login-required`),ve(ie,"updateRegistrationEnabledRoute",`${ie.settingsRoute}/registration-enabled`),ve(ie,"updateCredentialSettings",`${ie.settingsRoute}/credential`),ve(ie,"serverSettingsRoute",`${ie.settingsRoute}/server`),ve(ie,"fileCleanSettingsRoute",`${ie.settingsRoute}/file-clean`),ve(ie,"updateFrontendSettingsRoute",`${ie.settingsRoute}/frontend`),ve(ie,"updateTimeoutSettingRoute",`${ie.settingsRoute}/timeout`),ve(ie,"serverSentryDiagnosticsSettingRoute",`${ie.settingsRoute}/sentry-diagnostics`),ve(ie,"updateExperimentalMoonrakerSupportRoute",`${ie.settingsRoute}/experimental-moonraker-support`),ve(ie,"updateExperimentalClientSupportRoute",`${ie.settingsRoute}/experimental-client-support`),ve(ie,"serverPrivateRoute",`${ie.base}/server`),ve(ie,"pluginRoute",`${ie.base}/plugin`),ve(ie,"pluginFirmwareUpdateRoute",`${ie.pluginRoute}/firmware-update`),ve(ie,"pluginFirmwareReleasesRoute",`${ie.pluginFirmwareUpdateRoute}/releases`),ve(ie,"getPrinterRoute",t=>`${ie.printerRoute}/${t}`),ve(ie,"postPrinterDisabledReasonRoute",t=>`${ie.printerRoute}/${t}/disabled-reason`),ve(ie,"getPrinterLoginDetailsRoute",t=>`${ie.getPrinterRoute(t)}/login-details`),ve(ie,"restartOctoPrintRoute",t=>`${ie.getPrinterRoute(t)}/restart-octoprint`),ve(ie,"refreshSocketRoute",t=>`${ie.getPrinterRoute(t)}/refresh-socket`),ve(ie,"getPrinterSettingsRoute",t=>`${ie.printerSettingsRoute}/${t}`),ve(ie,"setPrinterSettingsGCodeAnalysisRoute",t=>`${ie.getPrinterSettingsRoute(t)}/gcode-analysis`),ve(ie,"syncPrinterNameSettingRoute",t=>`${ie.getPrinterSettingsRoute(t)}/sync-printername`),ve(ie,"getFloorRoute",t=>`${ie.floorRoute}/${t}`),ve(ie,"setSelectedFloorRoute",t=>`${ie.floorRoute}/selected-floor/${t}`),ve(ie,"addOrRemovePrinterFromFloorRoute",t=>`${ie.getFloorRoute(t)}/printer`),ve(ie,"sendQuickStopM112Route",t=>`${ie.customGCodeRoute}/send-emergency-m112/${t}`),ve(ie,"installFirmwareUpdatePluginRoute",t=>`${ie.pluginFirmwareUpdateRoute}/${t}/install-firmware-update-plugin`),ve(ie,"configurePluginSettingsRoute",t=>`${ie.pluginFirmwareUpdateRoute}/${t}/configure-plugin-settings`),ve(ie,"flashFirmwareRoute",t=>`${ie.pluginFirmwareUpdateRoute}/${t}/flash-firmware`),ve(ie,"updatePrinterFloorNameRoute",t=>`${ie.getFloorRoute(t)}/name`),ve(ie,"updatePrinterFloorNumberRoute",t=>`${ie.getFloorRoute(t)}/floor-number`),ve(ie,"printerFilesClearRoute",t=>`${ie.printerFilesRoute}/${t}/clear`),ve(ie,"printerFilesSelectAndPrintRoute",t=>`${ie.printerFilesRoute}/${t}/select`),ve(ie,"printerFilesUploadRoute",t=>`${ie.printerFilesRoute}/${t}/upload`),ve(ie,"printerFilesCacheRoute",t=>`${ie.printerFilesRoute}/${t}/cache`),ve(ie,"printerEnabledRoute",t=>`${ie.getPrinterRoute(t)}/enabled`),ve(ie,"printerSerialConnectRoute",t=>`${ie.getPrinterRoute(t)}/serial-connect`),ve(ie,"printerJogCommandRoute",t=>`${ie.getPrinterRoute(t)}/jog`),ve(ie,"printerHomeCommandRoute",t=>`${ie.getPrinterRoute(t)}/home`),ve(ie,"printerSerialDisconnectRoute",t=>`${ie.getPrinterRoute(t)}/serial-disconnect`),ve(ie,"printerJobRoute",t=>`${ie.getPrinterRoute(t)}/job`),ve(ie,"printerStopJobRoute",t=>`${ie.printerJobRoute(t)}/stop`),ve(ie,"printerPauseJobRoute",t=>`${ie.printerJobRoute(t)}/pause`),ve(ie,"printerResumeJobRoute",t=>`${ie.printerJobRoute(t)}/resume`),ve(ie,"userChangeUsernameRoute",t=>`${ie.userRoute}/${t}/change-username`),ve(ie,"userChangePasswordRoute",t=>`${ie.userRoute}/${t}/change-password`),ve(ie,"userDeleteRoute",t=>`${ie.userRoute}/${t}`),ve(ie,"userSetVerifiedRoute",t=>`${ie.userRoute}/${t}/set-verified`),ve(ie,"userSetRootUserRoute",t=>`${ie.userRoute}/${t}/set-root-user`),ve(ie,"userSetUserRolesRoute",t=>`${ie.userRoute}/${t}/set-user-roles`);let Me=ie;const $q=Symbol("Progress snackbar message event symbol"),Fq=Symbol("Info snackbar message event symbol"),Lq=Symbol("Error snackbar message event symbol");function Dt(){const{emit:e,on:t}=Br($q),{emit:n,on:r}=Br(Fq),{emit:s,on:i}=Br(Lq);return{openProgressMessage:(o,a,l,u)=>e({key:o,title:a,value:l,completed:u}),openInfoMessage:o=>n(o),info:(o,a,l)=>n({title:o,subtitle:a,timeout:l}),openErrorMessage:o=>s(o),error:(o,a)=>s({title:o,subtitle:a}),onProgressMessage:t,onInfoMessage:r,onErrorMessage:i}}function wy(e,t){if(!e)throw new Error("No data to download");const n=new Blob([e],{type:"text/plain"}),r=document.createElement("a");r.href=URL.createObjectURL(n),r.download=t,r.click(),URL.revokeObjectURL(r.href)}class Li extends vr{static async getFiles(t){const n=`${Me.printerFilesRoute}/${t}`;return await this.get(n)}static async getThumbnail(t){const n=`${Me.printerFilesRoute}/${t}/thumbnail`;return await this.get(n)}static async getFileCache(t){const n=`${Me.printerFilesCacheRoute(t)}`;return await this.get(n)}static async selectAndPrintFile(t,n,r=!0){const s=Me.printerFilesSelectAndPrintRoute(t);return await this.post(s,{filePath:n,print:r})}static async uploadFile(t,n){const r=Me.printerFilesUploadRoute(t.id),s=new FormData;return s.append("files[0]",n),this.postUpload(r,s,{onUploadProgress:i=>{Dt().openProgressMessage("single-file-upload",`Uploading file ${n.name}`,100*i.loaded/i.total,!1)}})}static async clearFiles(t){const n=`${Me.printerFilesClearRoute(t)}`;return this.delete(n)}static async purgeFiles(){const t=`${Me.printerFilesPurgeRoute}`;return this.post(t)}static async deleteFileOrFolder(t,n){const r=`${Me.printerFilesRoute}/${t}?path=${encodeURIComponent(n)}`;return this.delete(r)}static async downloadFile(t,n){const r=`${Me.printerFilesRoute}/${t}/download/${encodeURIComponent(n)}`,s=await this.getDownload(r);wy(s.data,n)}}const Nq=["able","above","absent","absolute","abstract","abundant","academic","acceptable","accepted","accessible","accurate","accused","active","actual","acute","added","additional","adequate","adjacent","administrative","adorable","advanced","adverse","advisory","aesthetic","afraid","afraid","african","aggregate","aggressive","agreeable","agreed","agricultural","alert","alive","alive","alleged","allied","alone","alright","alternative","amateur","amazing","ambitious","american","amused","ancient","ancient","angry","angry","annoyed","annual","anonymous","anxious","anxious","appalling","apparent","applicable","appropriate","arab","arbitrary","architectural","armed","arrogant","artificial","artistic","ashamed","ashamed","asian","asleep","assistant","associated","atomic","attractive","australian","automatic","autonomous","available","average","average","average","awake","aware","awful","awful","awkward","back","bad","bad","bad","balanced","bare","basic","beautiful","beautiful","beautiful","beneficial","better","bewildered","big","big","big","binding","biological","bitter","bitter","bizarre","black","black","blank","blind","blonde","bloody","bloody","blue","blue","blushing","boiling","bold","bored","bored","boring","bottom","brainy","brave","brave","breakable","breezy","brief","brief","bright","bright","bright","brilliant","british","broad","broad","broken","broken","brown","bumpy","burning","busy","busy","calm","calm","canadian","capable","capitalist","careful","careful","casual","catholic","causal","cautious","cautious","central","certain","changing","characteristic","charming","charming","cheap","cheerful","cheerful","chemical","chief","chilly","chinese","chosen","christian","chronic","chubby","circular","civic","civil","civilian","classic","classical","clean","clean","clear","clear","clever","clever","clinical","close","closed","cloudy","clumsy","coastal","cognitive","coherent","cold","cold","collective","colonial","colorful","colossal","coloured","colourful","combative","combined","comfortable","comfortable","coming","commercial","common","communist","compact","comparable","comparative","compatible","competent","competitive","complete","complex","complicated","comprehensive","compulsory","conceptual","concerned","concerned","concrete","condemned","confident","confidential","confused","confused","conscious","conservation","conservative","considerable","consistent","constant","constitutional","contemporary","content","continental","continued","continuing","continuous","controlled","controversial","convenient","conventional","convinced","convincing","cooing","cool","cool","cooperative","corporate","correct","corresponding","costly","courageous","crazy","crazy","crazy","creative","creepy","creepy","criminal","critical","crooked","crooked","crowded","crucial","crude","cruel","cruel","cuddly","cultural","curious","curious","curly","current","curved","cute","daily","damaged","damp","damp","dangerous","dangerous","dark","dark","dead","dead","deaf","deafening","dear","decent","decisive","deep","deep","defeated","defensive","defiant","definite","deliberate","delicate","delicious","delicious","delighted","delightful","delightful","democratic","dependent","depressed","depressed","desirable","desperate","detailed","determined","determined","developed","developing","devoted","different","different","difficult","difficult","digital","diplomatic","direct","dirty","dirty","disabled","disappointed","disastrous","disciplinary","disgusted","distant","distinct","distinct","distinctive","distinguished","disturbed","disturbing","diverse","divine","dizzy","domestic","dominant","double","doubtful","doubtful","drab","dramatic","dreadful","driving","drunk","dry","dry","dual","due","dull","dull","dull","dusty","dutch","dying","dynamic","eager","eager","early","early","eastern","easy","easy","economic","educational","eerie","effective","efficient","elaborate","elated","elderly","eldest","electoral","electric","electrical","electronic","elegant","elegant","eligible","embarrassed","embarrassed","embarrassing","emotional","empirical","empty","empty","enchanting","encouraging","encouraging","endless","energetic","english","enormous","enthusiastic","enthusiastic","entire","entitled","envious","environmental","equal","equivalent","essential","established","estimated","ethical","ethnic","european","eventual","everyday","evident","evil","evil","evolutionary","exact","excellent","exceptional","excess","excessive","excited","excited","exciting","exclusive","existing","exotic","expected","expensive","experienced","experimental","explicit","extended","extensive","external","extra","extraordinary","extreme","exuberant","faint","faint","fair","fair","faithful","faithful","familiar","famous","famous","fancy","fantastic","fantastic","far","fascinating","fashionable","fast","fast","fat","fat","fat","fatal","favourable","favourite","federal","fellow","female","feminist","few","fierce","fierce","filthy","filthy","final","financial","fine","fine","firm","fiscal","fit","fixed","flaky","flat","flat","flexible","fluffy","fluttering","flying","following","fond","foolish","foolish","foreign","formal","formidable","forthcoming","fortunate","forward","fragile","frail","frantic","free","french","frequent","fresh","fresh","friendly","friendly","friendly","frightened","frightened","front","frozen","fucking","full","full-time","fun","functional","fundamental","funny","funny","funny","furious","future","fuzzy","gastric","gay","general","generous","genetic","gentle","gentle","genuine","geographical","german","giant","giant","gigantic","gigantic","given","glad","glamorous","gleaming","global","glorious","glorious","golden","good","good","gorgeous","gothic","governing","graceful","gradual","grand","grateful","greasy","great","great","great","greek","green","green","grey","grieving","grim","gross","grotesque","growing","grubby","grumpy","guilty","handicapped","handsome","handsome","happy","happy","happy","hard","hard","harsh","harsh","head","healthy","healthy","heavy","heavy","helpful","helpful","helpful","helpless","helpless","hidden","high","high","high-pitched","hilarious","hissing","historic","historical","hollow","holy","homeless","homeless","homely","hon","honest","horizontal","horrible","horrible","hostile","hot","hot","huge","huge","human","hungry","hungry","hurt","hushed","husky","icy","ideal","identical","ideological","ill","ill","illegal","imaginative","immediate","immense","immense","imperial","implicit","important","important","impossible","impossible","impressed","impressive","improved","inadequate","inappropriate","inc","inclined","increased","increasing","incredible","independent","indian","indirect","individual","industrial","inevitable","influential","informal","inherent","initial","injured","inland","inner","innocent","innocent","innovative","inquisitive","instant","institutional","insufficient","intact","integral","integrated","intellectual","intelligent","intense","intensive","interested","interesting","interim","interior","intermediate","internal","international","intimate","invisible","involved","iraqi","irish","irrelevant","islamic","isolated","israeli","italian","itchy","japanese","jealous","jewish","jittery","joint","jolly","jolly","joyous","judicial","juicy","junior","just","keen","key","kind","kind","kind","known","korean","labour","large","large","large-scale","late","late","latin","lazy","leading","left","legal","legislative","legitimate","lengthy","lesser","level","lexical","liable","liberal","light","light","light","like","likely","limited","linear","linguistic","liquid","literary","little","little","live","lively","lively","living","local","logical","lonely","lonely","long","long","long","long","long-term","loose","loose","lost","loud","loud","lovely","lovely","low","low","loyal","ltd","lucky","lucky","mad","magenta","magic","magnetic","magnificent","magnificent","main","major","male","mammoth","managerial","managing","manual","many","many","marginal","marine","marked","married","marvellous","marxist","mass","massive","massive","mathematical","mature","maximum","mean","meaningful","mechanical","medical","medieval","melodic","melted","mental","mere","metropolitan","mid","middle","middle-class","mighty","mighty","mild","military","miniature","minimal","minimum","ministerial","minor","miserable","misleading","missing","misty","mixed","moaning","mobile","moderate","modern","modern","modern","modest","molecular","monetary","monthly","moral","motionless","muddy","multiple","mushy","musical","mute","mutual","mysterious","mysterious","naked","narrow","narrow","nasty","nasty","national","native","natural","naughty","naval","near","nearby","neat","necessary","negative","neighbouring","nervous","nervous","net","neutral","new","new","nice","nice","nineteenth-century","noble","noisy","noisy","normal","northern","nosy","notable","novel","nuclear","numerous","numerous","nursing","nutritious","nutty","obedient","objective","obliged","obnoxious","obvious","occasional","occupational","odd","odd","official","ok","okay","old","old","old-fashioned","old-fashioned","olympic","only","open","open","operational","opposite","optimistic","oral","orange","orange","ordinary","ordinary","organic","organisational","original","orthodox","other","outdoor","outer","outrageous","outside","outstanding","outstanding","overall","overseas","overwhelming","painful","pale","palestinian","panicky","parallel","parental","parliamentary","part-time","partial","particular","passing","passive","past","patient","payable","peaceful","peculiar","perfect","perfect","permanent","persistent","personal","petite","philosophical","physical","pink","plain","plain","planned","plastic","pleasant","pleasant","pleased","poised","polish","polite","political","poor","poor","popular","positive","possible","post-war","potential","powerful","powerful","practical","precious","precious","precise","preferred","pregnant","preliminary","premier","prepared","present","presidential","pretty","pretty","previous","prickly","prickly","primary","prime","primitive","principal","printed","prior","private","probable","productive","professional","profitable","profound","progressive","prominent","promising","proper","proposed","prospective","protective","protestant","proud","proud","provincial","psychiatric","psychological","public","puny","pure","purple","purple","purring","puzzled","puzzled","quaint","quaint","qualified","quick","quick","quick","quickest","quiet","quiet","quiet","racial","radical","rainy","rainy","random","rapid","rapid","rare","rare","raspy","rational","ratty","raw","ready","real","real","realistic","rear","reasonable","recent","red","red","reduced","redundant","regional","registered","regular","regulatory","related","relative","relaxed","relevant","reliable","relieved","relieved","religious","reluctant","remaining","remarkable","remote","renewed","representative","repulsive","required","resident","residential","resonant","respectable","respective","responsible","resulting","retail","retired","revolutionary","rich","rich","ridiculous","right","rigid","ripe","rising","rival","roasted","robust","rolling","roman","romantic","rotten","rough","rough","round","round","round","royal","rubber","rude","ruling","running","rural","russian","sacred","sad","sad","safe","salty","satisfactory","satisfied","scared","scary","scary","scattered","scientific","scornful","scottish","scrawny","screeching","secondary","secret","secure","select","selected","selective","selfish","semantic","senior","sensible","sensitive","separate","serious","severe","sexual","shaggy","shaky","shallow","shallow","shared","sharp","sharp","sheer","shiny","shivering","shocked","short","short","short","short","short-term","shrill","shy","shy","sick","significant","silent","silent","silky","silly","silly","silly","similar","simple","single","skilled","skinny","sleepy","slight","slim","slimy","slippery","slow","slow","small","small","smart","smiling","smoggy","smooth","smooth","so-called","social","socialist","soft","soft","soft","solar","sole","solid","solid","sophisticated","sore","sorry","sound","sound","sour","southern","soviet","spanish","spare","sparkling","spatial","special","specific","specified","spectacular","spicy","spiritual","splendid","splendid","spontaneous","sporting","spotless","spotty","square","square","squealing","stable","stale","standard","static","statistical","statutory","steady","steady","steep","steep","sticky","sticky","stiff","still","stingy","stormy","straight","straight","straightforward","strange","strange","strange","strategic","strict","striking","striped","strong","strong","structural","stuck","stupid","stupid","subjective","subsequent","substantial","subtle","successful","successful","successive","sudden","sufficient","suitable","sunny","super","super","superb","superior","supporting","supposed","supreme","sure","surprised","surprising","surrounding","surviving","suspicious","sweet","sweet","swift","swiss","symbolic","sympathetic","systematic","tall","tall","tall","tame","tame","tan","tart","tasteless","tasty","technical","technological","teenage","temporary","tender","tender","tender","tense","terrible","terrible","territorial","testy","then","theoretical","thick","thin","thirsty","thorough","thoughtful","thoughtless","thundering","tight","tight","tiny","tiny","tired","tired","top","tory","total","tough","tough","toxic","traditional","tragic","tremendous","tricky","tropical","troubled","turkish","typical","ugliest","ugly","ugly","ugly","ultimate","unable","unacceptable","unaware","uncertain","unchanged","uncomfortable","unconscious","underground","underlying","unemployed","uneven","unexpected","unfair","unfortunate","unhappy","uniform","uninterested","unique","united","universal","unknown","unlikely","unnecessary","unpleasant","unsightly","unusual","unusual","unwilling","upper","upset","upset","uptight","urban","urgent","used","useful","useless","usual","vague","valid","valuable","variable","varied","various","varying","vast","vast","verbal","vertical","very","victorian","victorious","video-taped","violent","visible","visiting","visual","vital","vivacious","vivid","vocational","voiceless","voluntary","vulnerable","wandering","warm","wasteful","watery","weak","weak","wealthy","weary","wee","weekly","weird","welcome","well","well-known","welsh","western","wet","wet","wet","whispering","white","whole","wicked","wicked","wide","wide","wide-eyed","widespread","wild","wild","willing","wise","witty","wonderful","wonderful","wonderful","wooden","wooden","working","working-class","worldwide","worried","worried","worrying","worthwhile","worthy","written","wrong","wrong","yellow","yellow","young","young","yummy","zany","zany","zealous"],Bq=["aardvark","abacus","abbey","abdomen","abolishment","abroad","abyssinian","accelerant","accelerator","accompanist","accordion","account","accountant","achieve","achiever","acid","acknowledgment","acoustic","acoustics","acrylic","act","action","active","activity","actor","actress","acupuncture","adapter","addiction","addition","address","adjustment","administration","adrenalin","adult","advancement","advantage","advertisement","advertising","advice","affair","affect","afghanistan","africa","aftermath","afternoon","aftershave","aftershock","afterthought","age","agency","agenda","agent","aglet","agreement","air","airbag","airbus","airfare","airforce","airline","airmail","airplane","airport","airship","alarm","alb","albatross","alcohol","alcove","alder","algebra","algeria","alibi","allergist","alley","alligator","alloy","almanac","almond","alpaca","alpenglow","alpenhorn","alpha","alphabet","alternative","altitude","alto","aluminium","aluminum","ambassador","ambulance","amendment","america","amount","amusement","anagram","analgesia","analog","analysis","analyst","anatomy","anesthesiology","anethesiologist","anger","angiosperm","angle","angora","angstrom","anguish","animal","anime","ankle","anklet","annual","anorak","answer","ant","antarctica","anteater","antechamber","antelope","anthony","anthropology","antler","anybody","anything","anywhere","apartment","ape","aperitif","apology","apparatus","apparel","appeal","appendix","apple","applewood","appliance","approval","april","apron","apse","aquarius","aquifer","arch","archaeology","archeology","archer","architect","architecture","arch-rival","area","argentina","argument","aries","arithmetic","arm","armadillo","armament","armchair","armenian","armoire","armor","arm-rest","army","arrival","arrow","art","artichoke","artificer","ascot","ash","ashram","ashtray","asia","asparagus","asphalt","assignment","assistance","associate","association","asterisk","astrakhan","astrolabe","astrologer","astrology","astronomy","atelier","athelete","athlete","atm","atmosphere","atom","atrium","attachment","attack","attempt","attendant","attention","attenuation","attic","attitude","attorney","attraction","audience","auditorium","august","aunt","australia","australian","author","authorisation","authority","authorization","automaton","avalanche","avenue","average","azimuth","babe","babies","baboon","babushka","baby","back","backbone","backdrop","backpack","bacon","bad","badge","badger","bafflement","bag","bagel","bagpipe","bagpipes","bail","bait","bake","baker","bakery","bakeware","balaclava","balalaika","balance","balcony","balinese","ball","balloon","ballpark","bamboo","banana","band","bandana","bandolier","bangladesh","bangle","banjo","bank","bankbook","banker","banquette","baobab","bar","barbara","barbeque","barber","barbiturate","barge","baritone","barium","barn","barometer","barracks","barstool","base","baseball","basement","basin","basis","basket","basketball","bass","bassinet","bassoon","bat","bath","bather","bathhouse","bathrobe","bathroom","bathtub","batter","battery","batting","battle","battleship","bay","bayou","beach","bead","beak","beam","bean","beanie","beanstalk","bear","beard","beast","beat","beautician","beauty","beaver","bed","bedroom","bee","beech","beef","beer","beet","beetle","beggar","beginner","begonia","behavior","beheading","behest","belfry","belgian","belief","believe","bell","belligerency","bellows","belly","belt","bench","bend","beneficiary","benefit","bengal","beret","berry","bestseller","best-seller","betty","beverage","beyond","bibliography","bicycle","bid","bidet","bifocals","big","big-rig","bijou","bike","bikini","bill","billboard","bin","biology","biplane","birch","bird","birdbath","birdcage","birdhouse","bird-watcher","birth","birthday","bit","bite","black","blackberry","blackboard","blackfish","bladder","blade","blame","blank","blanket","blazer","blight","blinker","blister","blizzard","block","blocker","blood","bloodflow","bloom","bloomers","blossom","blouse","blow","blowgun","blowhole","blue","blueberry","boar","board","boat","boat-building","boatload","boatyard","bobcat","body","bog","bolero","bolt","bomb","bomber","bondsman","bone","bongo","bonnet","bonsai","bonus","boogeyman","book","bookcase","bookend","booklet","booster","boot","bootee","bootie","boots","booty","border","bore","bosom","botany","bottle","bottling","bottom","bottom-line","boudoir","bough","boundary","bow","bower","bowl","bowler","bowling","bowtie","box","boxer","boxspring","boy","bra","brace","bracelet","bracket","brain","brake","branch","brand","brandy","brass","brassiere","bratwurst","brazil","bread","breadcrumb","break","breakfast","breakpoint","breast","breastplate","breath","breeze","brian","bribery","brick","bricklaying","bridge","brief","briefs","brilliant","british","broccoli","brochure","broiler","broker","brome","bronchitis","bronco","bronze","brooch","brood","brook","broom","brother","brother-in-law","brow","brown","brush","brushfire","brushing","bubble","bucket","buckle","bud","budget","buffer","buffet","bug","buggy","bugle","building","bulb","bull","bulldozer","bullet","bull-fighter","bumper","bun","bunch","bungalow","bunghole","bunkhouse","burglar","burlesque","burma","burn","burn-out","burst","bus","bush","business","bust","bustle","butane","butcher","butter","button","buy","buyer","buzzard","cabana","cabbage","cabin","cabinet","cable","caboose","cacao","cactus","caddy","cadet","cafe","caftan","cake","calcification","calculation","calculator","calculus","calendar","calf","calico","call","calm","camel","cameo","camera","camp","campaign","campanile","can","canada","canadian","canal","cancel","cancer","candelabra","candidate","candle","candy","cane","cannon","canoe","canon","canopy","canteen","canvas","cap","cape","capital","capitulation","capon","cappelletti","cappuccino","capricorn","captain","caption","car","caravan","carbon","card","cardboard","cardigan","care","cargo","carload","carnation","carol","carotene","carp","carpenter","carpet","carport","carriage","carrier","carrot","carry","cart","cartilage","cartload","cartoon","cartridge","cascade","case","casement","cash","cashier","casino","casserole","cassock","cast","castanet","castanets","castle","cat","catacomb","catamaran","category","caterpillar","cathedral","catsup","cattle","cauliflower","cause","caution","cave","c-clamp","cd","ceiling","celebration","celeriac","celery","celeste","cell","cellar","cello","celsius","cement","cemetery","cenotaph","census","cent","centenarian","center","centimeter","centurion","century","cephalopod","ceramic","cereal","certification","cesspool","chador","chafe","chain","chainstay","chair","chairlift","chairman","chairperson","chairwoman","chaise","chalet","chalice","chalk","champion","chance","chandelier","change","channel","chap","chapel","character","chard","charge","charity","charlatan","charles","charm","chart","chastity","chasuble","chateau","chauffeur","chauvinist","check","checkroom","cheek","cheese","cheetah","chef","chemistry","cheque","cherries","cherry","chess","chest","chick","chicken","chicory","chief","chiffonier","child","childhood","children","chill","chime","chimpanzee","chin","china","chinese","chino","chipmunk","chit-chat","chivalry","chive","chocolate","choice","choker","chop","chopstick","chord","chowder","christmas","christopher","chrome","chromolithograph","chronograph","chronometer","chub","chug","church","churn","cicada","cinema","circle","circulation","circumference","cirrus","citizenship","city","civilisation","clam","clank","clapboard","clarinet","clasp","class","claus","clave","clavicle","clavier","cleaner","cleat","cleavage","clef","cleric","clerk","click","client","cliff","climb","clip","clipper","cloak","cloakroom","clock","clockwork","clogs","cloister","close","closet","cloth","clothes","clothing","cloud","cloudburst","cloudy","clove","clover","club","clutch","coach","coal","coast","coat","cob","cobweb","cockpit","cockroach","cocktail","cocoa","cod","codon","codpiece","coevolution","coffee","coffin","coil","coin","coinsurance","coke","cold","coliseum","collar","collection","college","collision","colloquia","colombia","colon","colonisation","colony","color","colt","column","columnist","comb","combat","combination","comfort","comfortable","comic","comma","command","commercial","commission","committee","communicant","communication","community","company","comparison","competition","competitor","complement","complex","component","comportment","composer","composition","compost","compulsion","computer","comradeship","concert","concrete","condition","condominium","condor","conductor","cone","confectionery","conference","confidence","confirmation","conflict","conga","congo","congressman","congressperson","congresswoman","conifer","connection","consent","consequence","console","consonant","conspirator","constant","constellation","construction","consul","consulate","contact lens","contagion","contest","context","continent","contract","contrail","contrary","contribution","control","convection","convert","convertible","cook","cookie","cooking","coonskin","cope","cop-out","copper","co-producer","copy","copyright","copywriter","cord","corduroy","cork","cormorant","corn","cornerstone","cornet","corral","correspondent","corridor","corsage","cost","costume","cot","cottage","cotton","couch","cougar","cough","council","councilman","councilor","councilperson","councilwoman","counter","counter-force","countess","country","couple","courage","course","court","cousin","covariate","cover","coverall","cow","cowbell","cowboy","crab","crack","cracker","crackers","cradle","craftsman","crash","crate","cravat","craw","crawdad","crayfish","crayon","cream","creative","creator","creature","creche","credenza","credit","creditor","creek","creme brulee","crest","crew","crib","cribbage","cricket","cricketer","crime","criminal","crinoline","criteria","criterion","criticism","crocodile","crocus","croissant","crook","crop","cross","cross-contamination","cross-stitch","crotch","croup","crow","crowd","crown","crude","crush","cry","crystallography","cub","cuban","cuckoo","cucumber","cuff-links","cultivar","cultivator","culture","culvert","cummerbund","cup","cupboard","cupcake","cupola","curio","curl","curler","currency","current","cursor","curtain","curve","cushion","custard","custodian","customer","cut","cuticle","cutlet","cutover","cutting","cyclamen","cycle","cyclone","cylinder","cymbal","cymbals","cynic","cyst","cytoplasm","dad","daffodil","dagger","dahlia","daisy","damage","dame","dance","dancer","danger","daniel","dark","dart","dash","dashboard","database","date","daughter","david","day","daybed","dead","deadline","deal","dealer","dear","death","deathwatch","deborah","debt","debtor","decade","december","decimal","decision","deck","declination","decongestant","decrease","decryption","dedication","deer","defense","deficit","deformation","degree","delete","delivery","demand","demur","den","denim","dentist","deodorant","department","dependent","deployment","deposit","depressive","depth","deputy","derby","derrick","description","desert","design","designer","desire","desk","dessert","destiny","destroyer","destruction","detail","detainment","detective","detention","determination","development","deviance","dew","dhow","diadem","diamond","diaphragm","diarist","dibble","dickey","dictaphone","diction","dictionary","diet","dietician","difference","differential","difficulty","digestion","digger","digital","dilapidation","dill","dime","dimension","dimple","diner","dinghy","dinner","dinosaur","diploma","dipstick","direction","director","dirndl","dirt","disadvantage","disarmament","disaster","disco","disconnection","discount","discovery","discrepancy","discussion","disease","disembodiment","disengagement","disguise","disgust","dish","dishes","dishwasher","disk","display","disposer","distance","distribution","distributor","district","divan","diver","divide","divider","diving","division","dock","doctor","document","doe","dog","dogsled","dogwood","doll","dollar","dolman","dolphin","domain","donald","donkey","donna","door","doorknob","doorpost","dorothy","dory","dot","double","doubling","doubt","doubter","downforce","downgrade","downtown","draft","dragon","dragonfly","dragster","drain","drake","drama","dramaturge","draw","drawbridge","drawer","drawing","dream","dredger","dress","dresser","dressing","drill","drink","drive","driver","driveway","driving","drizzle","dromedary","drop","drug","drum","drummer","drunk","dry","dryer","duck","duckling","dud","duffel","dugout","dulcimer","dumbwaiter","dump truck","dune buggy","dungarees","dungeon","duplexer","dust","dust storm","duster","duty","dwarf","dwelling","dynamo","eagle","ear","eardrum","earmuffs","earplug","earrings","earth","earthquake","earthworm","ease","easel","east","eave","eavesdropper","e-book","ecclesia","eclipse","ecliptic","economics","ecumenist","eddy","edge","edger","editor","editorial","education","edward","eel","effacement","effect","effective","efficacy","efficiency","effort","egg","egghead","eggnog","eggplant","egypt","eight","ejector","elbow","election","electrocardiogram","element","elephant","elevator","elixir","elizabeth","elk","ellipse","elm","elongation","embossing","emergence","emergent","emery","emotion","employ","employee","employer","employment","empowerment","emu","encirclement","encyclopedia","end","endothelium","enemy","energy","engine","engineer","engineering","english","enigma","enquiry","entertainment","entrance","entry","environment","epauliere","epee","ephemera","ephemeris","epoch","eponym","epoxy","equinox","equipment","era","e-reader","error","escape","espadrille","espalier","establishment","estate","estimate","estrogen","estuary","ethernet","ethiopia","euphonium","eurocentrism","europe","evaluator","evening","evening-wear","event","eviction","evidence","evocation","examination","examiner","example","exchange","exclamation","excuse","executor","exhaust","ex-husband","exile","existence","exit","expansion","expansionism","experience","expert","explanation","exposition","extension","extent","extreme","ex-wife","eye","eyeball","eyebrow","eyebrows","eyeglasses","eyelash","eyelashes","eyelid","eyelids","eyeliner","eyestrain","face","facelift","facet","facilities","facsimile","fact","factor","factory","faculty","fahrenheit","fairies","fairy","fall","falling-out","familiar","family","fan","fang","fanlight","fanny","fanny-pack","farm","farmer","fascia","fat","father","father-in-law","fatigues","faucet","fault","fawn","fax","fear","feast","feather","feature","february","fedelini","fedora","feed","feedback","feeling","feet","felony","female","fen","fence","fencing","fender","ferry","ferryboat","fertilizer","few","fiber","fiberglass","fibre","fiction","fiddle","field","fifth","fight","fighter","figurine","file","fill","filly","filth","final","finance","find","fine","finger","fingernail","finisher","fir","fire","fireman","fireplace","firewall","fish","fishbone","fisherman","fishery","fishmonger","fishnet","fisting","fix","fixture","flag","flame","flanker","flare","flash","flat","flatboat","flavor","flax","fleck","fleece","flesh","flight","flintlock","flip-flops","flock","flood","floor","floozie","flower","flu","flugelhorn","fluke","flute","fly","flytrap","foam","fob","focus","fog","fold","folder","fondue","font","food","foot","football","footnote","footrest","foot-rest","footstool","foray","force","forearm","forebear","forecast","forehead","forest","forestry","forgery","fork","form","formal","format","former","fort","fortnight","fortress","forum","foundation","fountain","fowl","fox","foxglove","fragrance","frame","france","fratricide","fraudster","frazzle","freckle","freeplay","freeze","freezer","freight","freighter","french","freon","fresco","friction","friday","fridge","friend","friendship","frigate","fringe","frock","frog","front","frost","frown","fruit","frustration","fuel","fulfillment","full","function","fundraising","funny","fur","furnace","furniture","fusarium","futon","future","gaffer","gaiters","gale","gall-bladder","galleon","gallery","galley","gallon","galoshes","game","gamebird","gamma-ray","gander","gap","garage","garb","garbage","garden","garlic","garment","garter","gas","gasoline","gastropod","gate","gateway","gather","gauge","gauntlet","gazebo","gazelle","gear","gearshift","geese","gelding","gem","gemini","gemsbok","gender","gene","general","genetics","geography","geology","geometry","george","geranium","gerbil","geriatrician","german","germany","geyser","ghana","gherkin","ghost","giant","gigantism","ginseng","giraffe","girdle","girl","git","glad","gladiolus","gland","glass","glasses","glen","glider","gliding","glockenspiel","glove","gloves","glue","glut","goal","goat","gobbler","godmother","goggles","go-kart","gold","goldfish","golf","gondola","gong","good","goodbye","good-bye","goodie","goose","gopher","gore-tex","gorilla","gosling","governance","government","governor","gown","grab-bag","grade","grain","gram","granddaughter","grandfather","grandmom","grandmother","grandson","granny","grape","grapefruit","graph","graphic","grass","grasshopper","grassland","gray","grease","great","great-grandfather","great-grandmother","greece","greek","green","greenhouse","grenade","grey","grief","grill","grip","grit","ground","group","grouper","grouse","growth","guarantee","guatemalan","guest","guestbook","guide","guilty","guitar","guitarist","gum","gumshoes","gun","gutter","guy","gym","gymnast","gynaecology","gyro","hacienda","hacksaw","hackwork","hail","hair","haircut","half","half-brother","half-sister","halibut","hall","hallway","hamaki","hamburger","hammer","hammock","hamster","hand","handball","hand-holding","handicap","handle","handlebar","handmaiden","handsaw","hang","harbor","harbour","hardboard","hardcover","hardening","hardhat","hard-hat","hardware","harm","harmonica","harmony","harp","harpooner","harpsichord","hassock","hat","hatbox","hatchet","hate","haunt","haversack","hawk","hay","head","headlight","headline","headrest","health","hearing","heart","heartache","hearth","hearthside","heart-throb","heartwood","heat","heater","heaven","heavy","hedge","hedgehog","heel","height","heirloom","helen","helicopter","helium","hell","hellcat","helmet","helo","help","hemp","hen","herb","heron","herring","hexagon","heyday","hide","high","highlight","high-rise","highway","hill","himalayan","hip","hippodrome","hippopotamus","historian","history","hit","hive","hobbies","hobbit","hobby","hockey","hoe","hog","hold","hole","holiday","home","homogenate","homonym","honey","honeybee","honoree","hood","hoof","hook","hope","hops","horn","hornet","horse","hose","hosiery","hospice","hospital","host","hostel","hostess","hot","hot-dog","hotel","hour","hourglass","house","houseboat","hovel","hovercraft","howitzer","hub","hubcap","hugger","human","humidity","humor","hunger","hurdler","hurricane","hurry","hurt","husband","hut","hutch","hyacinth","hybridisation","hydrant","hydraulics","hydrofoil","hydrogen","hyena","hygienic","hyphenation","hypochondria","hypothermia","ice","icebreaker","icecream","ice-cream","icicle","icon","idea","ideal","igloo","ikebana","illegal","image","imagination","impact","implement","importance","impress","imprisonment","improvement","impudence","impulse","inbox","incandescence","inch","income","increase","independent","index","india","indigence","indonesia","industry","infancy","inflammation","inflation","information","infusion","inglenook","ingrate","initial","initiative","in-joke","injury","ink","in-laws","inlay","inn","innervation","innocent","input","inquiry","inscription","insect","inside","insolence","inspector","instruction","instrument","instrumentalist","instrumentation","insulation","insurance","insurgence","intelligence","intention","interactive","interest","interferometer","interior","interloper","internal","internet","interpreter","intervenor","interview","interviewer","intestine","intestines","invention","inventor","inventory","invite","invoice","ipad","iran","iraq","iridescence","iris","iron","ironclad","island","israel","issue","italian","italy","jackal","jacket","jaguar","jail","jailhouse","jam","james","january","japan","japanese","jar","jasmine","jason","jaw","jeans","jeep","jeff","jelly","jellyfish","jennifer","jet","jewel","jewelry","jiffy","job","jockey","jodhpurs","joey","jogging","john","join","joke","joseph","jot","journey","judge","judo","juggernaut","juice","july","jumbo","jump","jumper","jumpsuit","june","junior","junk","junker","junket","jury","justice","jute","kale","kamikaze","kangaroo","karate","karen","kayak","kazoo","kendo","kenneth","kenya","ketch","ketchup","kettle","kettledrum","kevin","key","keyboard","keyboarding","keystone","kick","kick-off","kid","kidney","kidneys","kielbasa","kill","kilogram","kilometer","kilt","kimberly","kimono","kind","king","kingfish","kiosk","kiss","kitchen","kite","kitten","kitty","kleenex","klomps","knee","kneejerk","knickers","knife","knife-edge","knight","knitting","knot","knowledge","knuckle","koala","kohlrabi","korean","lab","laborer","lace","lacquerware","ladder","ladybug","lake","lamb","lamp","lan","lanai","land","landform","landmine","language","lantern","lap","laparoscope","lapdog","laptop","larch","larder","lark","laryngitis","lasagna","latency","latex","lathe","latte","laugh","laundry","laura","law","lawn","lawsuit","lawyer","layer","lead","leader","leaf","league","leaker","learning","leash","leather","leaver","lecture","leek","leg","legal","legging","legume","lei","lemon","lemonade","lemur","length","lentil","leo","leopard","leotard","leprosy","let","letter","lettuce","level","lever","leverage","libra","librarian","library","license","lier","life","lift","light","lighting","lightning","lilac","lily","limit","limo","line","linen","liner","link","linseed","lion","lip","lipstick","liquid","liquor","lisa","list","literature","litigation","litter","liver","living","lizard","llama","loaf","loafer","loan","lobotomy","lobster","lock","locker","locket","locomotive","locust","loft","log","loggia","loincloth","look","loss","lot","lotion","lounge","lout","love","low","loyalty","luck","luggage","lumber","lumberman","lunch","luncheonette","lunchroom","lung","lunge","lute","luttuce","lycra","lye","lymphocyte","lynx","lyocell","lyre","lyric","macadamia","macaroni","machine","macrame","macrofauna","maelstrom","maestro","magazine","magic","magician","maid","maiden","mail","mailbox","mailman","maintenance","major","major-league","makeup","malaysia","male","mall","mallet","mambo","mammoth","man","management","manager","mandarin","mandolin","mangrove","manhunt","maniac","manicure","manner","manor","mansard","manservant","mansion","mantel","mantle","mantua","manufacturer","manx","map","maple","maraca","maracas","marble","march","mare","margaret","margin","maria","mariachi","marimba","mark","market","marketing","marksman","marriage","marsh","marshland","marxism","mary","mascara","mask","mass","massage","master","mastication","mastoid","mat","match","material","math","mattock","mattress","maximum","may","maybe","mayonnaise","mayor","meal","meaning","measure","meat","mechanic","medicine","medium","meet","meeting","megalomaniac","melody","member","membership","memory","men","menorah","mention","menu","mercury","mess","message","metal","metallurgist","meteor","meteorology","meter","methane","method","methodology","metro","metronome","mexican","mexico","mezzanine","mice","michael","michelle","microlending","microwave","mid-course","middle","middleman","midi","midline","midnight","midwife","might","migrant","mile","milk","milkshake","millennium","millimeter","millisecond","mime","mimosa","mind","mine","mini","minibus","minion","mini-skirt","minister","minor","minor-league","mint","minute","mirror","miscarriage","miscommunication","misfit","misogyny","misplacement","misreading","missile","mission","mist","mistake","mister","miter","mitten","mix","mixer","mixture","moat","mobile","moccasins","mocha","mode","model","modem","mole","mom","moment","monastery","monasticism","monday","money","monger","monitor","monkey","monocle","monotheism","monsoon","monster","month","mood","moon","moonscape","moonshine","mop","Mormon","morning","morocco","morsel","mortise","mosque","mosquito","most","motel","moth","mother","mother-in-law","motion","motor","motorboat","motorcar","motorcycle","mound","mountain","mouse","mouser","mousse","moustache","mouth","mouton","move","mover","movie","mower","mug","mukluk","mule","multimedia","muscle","musculature","museum","music","music-box","musician","music-making","mustache","mustard","mutt","myanmar","mycoplasma","nail","name","naming","nancy","nanoparticle","napkin","narcissus","nation","naturalisation","nature","neat","neck","necklace","necktie","necromancer","need","needle","negligee","neologism","neon","nepal","nephew","nerve","nest","net","netball","netbook","netsuke","network","neurobiologist","neuropathologist","neuropsychiatry","news","newspaper","newsprint","newsstand","nexus","nic","nicety","niche","nickel","niece","nigeria","night","nightclub","nightgown","nightingale","nightlight","nitrogen","node","noise","nonbeliever","nonconformist","nondisclosure","noodle","normal","norse","north","north america","north korea","norwegian","nose","note","notebook","notice","notify","notoriety","nougat","novel","november","nudge","number","numeracy","numeric","numismatist","nurse","nursery","nurture","nut","nylon","oak","oar","oasis","oatmeal","obi","objective","obligation","oboe","observation","observatory","occasion","occupation","ocean","ocelot","octagon","octave","octavo","octet","october","octopus","odometer","oeuvre","offence","offer","office","official","off-ramp","oil","okra","oldie","olive","omega","omelet","oncology","one","onion","open","opening","opera","operation","ophthalmologist","opinion","opium","opossum","opportunist","opportunity","opposite","option","orange","orangutan","orator","orchard","orchestra","orchid","order","ordinary","ordination","organ","organisation","organization","original","ornament","osmosis","osprey","ostrich","others","otter","ottoman","ounce","outback","outcome","outfit","outhouse","outlay","output","outrigger","outset","outside","oval","ovary","oven","overcharge","overclocking","overcoat","overexertion","overflight","overnighter","overshoot","owl","owner","ox","oxen","oxford","oxygen","oyster","pacemaker","pack","package","packet","pad","paddle","paddock","page","pagoda","pail","pain","paint","painter","painting","paintwork","pair","pajama","pajamas","pakistan","paleontologist","paleontology","palm","pamphlet","pan","pancake","pancreas","panda","panic","pannier","panpipe","pansy","panther","panties","pantry","pants","pantsuit","panty","pantyhose","paper","paperback","parable","parachute","parade","parallelogram","paramedic","parcel","parchment","parent","parentheses","park","parka","parrot","parsnip","part","participant","particle","particular","partner","partridge","party","passage","passbook","passenger","passive","pasta","paste","pastor","pastoralist","pastry","patch","path","patient","patina","patio","patriarch","patricia","patrimony","patriot","patrol","pattern","paul","pavement","pavilion","paw","pawnshop","payee","payment","pea","peace","peach","peacoat","peacock","peak","peanut","pear","pearl","pedal","pedestrian","pediatrician","peen","peer","peer-to-peer","pegboard","pelican","pelt","pen","penalty","pencil","pendant","pendulum","penicillin","pension","pentagon","peony","people","pepper","percentage","perch","perfume","period","periodical","peripheral","permafrost","permission","permit","perp","persian","person","personality","peru","pest","pet","petal","petticoat","pew","pharmacist","pharmacopoeia","phase","pheasant","philippines","philosopher","philosophy","phone","photo","photographer","phrase","physical","physician","pianist","piano","piccolo","pick","pickax","picket","pickle","picture","pie","piece","pier","piety","pig","pigeon","pike","pile","pilgrimage","pillbox","pillow","pilot","pimp","pimple","pin","pinafore","pince-nez","pine","pineapple","pinecone","ping","pink","pinkie","pinstripe","pint","pinto","pinworm","pioneer","pipe","piracy","piranha","pisces","piss","pitch","pitching","pith","pizza","place","plain","plane","planet","plant","plantation","planter","plaster","plasterboard","plastic","plate","platform","platinum","platypus","play","player","playground","playroom","pleasure","pleated","plier","plot","plough","plover","plow","plowman","plume","plunger","plywood","pneumonia","pocket","pocketbook","pocket-watch","poet","poignance","point","poison","poisoning","poland","pole","polenta","police","policeman","policy","polish","politician","pollution","polo","polyester","pompom","poncho","pond","pony","poof","pool","popcorn","poppy","popsicle","population","populist","porch","porcupine","port","porter","portfolio","porthole","position","positive","possibility","postage","postbox","poster","pot","potato","potential","potty","pouch","poultry","pound","pounding","powder","power","precedent","precipitation","preface","prelude","premeditation","premier","preoccupation","preparation","presence","presentation","president","pressroom","pressure","pressurisation","price","pride","priest","priesthood","primary","primate","prince","princess","principal","print","printer","priority","prison","prize","prizefight","probation","problem","procedure","process","processing","produce","producer","product","production","professional","professor","profit","program","project","promotion","prompt","proof-reader","propane","property","prose","prosecution","protest","protocol","prow","pruner","pseudoscience","psychiatrist","psychoanalyst","psychologist","psychology","ptarmigan","publisher","pudding","puddle","puffin","pull","pulley","puma","pump","pumpkin","pumpkinseed","punch","punishment","pupa","pupil","puppy","purchase","puritan","purple","purpose","purse","push","pusher","put","pvc","pyjama","pyramid","quadrant","quail","quality","quart","quarter","quartz","queen","question","quicksand","quiet","quill","quilt","quince","quit","quiver","quotation","rabbi","rabbit","raccoon","race","racer","racing","racist","rack","radar","radiator","radio","radiosonde","radish","raffle","raft","rag","rage","rail","railway","raiment","rain","rainbow","raincoat","rainmaker","rainstorm","raise","rake","ram","rambler","ramie","ranch","random","randomisation","range","rank","raspberry","rat","rate","ratio","raven","ravioli","raw","rawhide","ray","rayon","reactant","reaction","read","reading","reamer","rear","reason","receipt","reception","recess","recliner","recognition","recommendation","record","recorder","recover","recruit","rectangle","red","redesign","rediscovery","reduction","reef","refectory","reflection","refrigerator","refund","refuse","region","register","regret","regular","regulation","reindeer","reinscription","reject","relation","relative","religion","relish","reminder","rent","repair","reparation","repeat","replace","replication","reply","report","representative","reprocessing","request","resale","research","resident","resist","resolution","respect","respite","responsibility","rest","restaurant","result","retailer","rethinking","retina","retouch","return","reveal","revenant","review","revolution","revolve","revolver","reward","rheumatism","rhinoceros","rhyme","rhythm","rice","richard","riddle","ride","rider","ridge","rifle","right","rim","ring","ringworm","ripple","rise","riser","risk","river","riverbed","rivulet","road","roadway","roast","robe","robert","robin","rock","rocker","rocket","rocket-ship","rod","role","roll","roller","romania","romanian","ronald","roof","room","rooster","root","rope","rose","rostrum","rotate","roundabout","route","router","routine","row","rowboat","royal","rub","rubber","rubric","ruckus","ruffle","rugby","rule","run","runaway","runner","russia","russian","rutabaga","ruth","sabre","sack","sad","saddle","safe","safety","sage","sagittarius","sail","sailboat","sailor","salad","salary","sale","salesman","salmon","salon","saloon","salt","samovar","sampan","sample","samurai","sand","sandals","sandbar","sandra","sandwich","santa","sarah","sardine","sari","sarong","sash","satellite","satin","satire","saturday","sauce","saudi arabia","sausage","save","saving","savior","saviour","saw","saxophone","scale","scallion","scanner","scarecrow","scarf","scarification","scene","scent","schedule","scheme","schizophrenic","schnitzel","school","schoolhouse","schooner","science","scimitar","scissors","scooter","score","scorn","scorpio","scorpion","scow","scraper","screamer","screen","screenwriting","screw","screwdriver","screw-up","scrim","scrip","sculpting","sculpture","sea","seagull","seal","seaplane","search","seashore","season","seat","second","secretariat","secretary","section","sectional","sector","secure","security","seed","seeder","segment","select","selection","self","sell","semicircle","semicolon","senator","sense","sentence","sepal","september","septicaemia","series","servant","server","service","session","set","setting","settler","sewer","sex","shack","shade","shadow","shadowbox","shake","shakedown","shaker","shallot","shame","shampoo","shanty","shape","share","shark","sharon","shawl","shearling","shears","sheath","shed","sheep","sheet","shelf","shell","sherry","shield","shift","shin","shine","shingle","ship","shirt","shirtdress","shoat","shock","shoe","shoehorn","shoe-horn","shoelace","shoemaker","shoes","shoestring","shofar","shoot","shootdown","shop","shopper","shopping","shore","shortage","shorts","shortwave","shot","shoulder","shovel","show","shower","show-stopper","shred","shrimp","shrine","siamese","siberian","sibling","sick","side","sideboard","sideburns","sidecar","sidestream","sidewalk","siding","sign","signature","signet","significance","signup","silica","silk","silkworm","sill","silo","silver","simple","sing","singer","single","sink","sister","sister-in-law","sit","sitar","size","skate","skiing","skill","skin","skirt","skulduggery","skull","skullcap","skullduggery","skunk","sky","skylight","skyscraper","skywalk","slapstick","slash","slave","sled","sledge","sleep","sleet","sleuth","slice","slider","slime","slip","slipper","slippers","slope","sloth","smash","smell","smelting","smile","smock","smog","smoke","smuggling","snail","snake","snakebite","sneakers","sneeze","snob","snorer","snow","snowboarding","snowflake","snowman","snowmobiling","snowplow","snowstorm","snowsuit","snuggle","soap","soccer","society","sociology","sock","socks","soda","sofa","softball","softdrink","softening","software","soil","soldier","solid","solitaire","sombrero","somersault","somewhere","son","song","songbird","sonnet","soot","soprano","sorbet","sort","soulmate","sound","soup","source","sourwood","sousaphone","south","south africa","south america","south korea","sow","soy","soybean","space","spacing","spade","spaghetti","spain","spandex","spank","spark","sparrow","spasm","speaker","speakerphone","spear","special","specialist","specific","spectacle","spectacles","spectrograph","speedboat","spend","sphere","sphynx","spider","spike","spinach","spine","spiral","spirit","spiritual","spite","spleen","split","sponge","spoon","sport","spot","spotlight","spray","spread","spring","sprinter","sprout","spruce","spume","spur","spy","square","squash","squatter","squeegee","squid","squirrel","stable","stack","stacking","stadium","staff","stag","stage","stain","stair","staircase","stallion","stamen","stamina","stamp","stance","standoff","star","start","starter","state","statement","station","station-wagon","statistic","statistician","steak","steal","steam","steamroller","steel","steeple","stem","stencil","step","step-aunt","step-brother","stepdaughter","step-daughter","step-father","step-grandfather","step-grandmother","stepmother","step-mother","stepping-stone","steps","step-sister","stepson","step-son","step-uncle","steven","stew","stick","stiletto","still","stinger","stitch","stock","stocking","stockings","stock-in-trade","stole","stomach","stone","stonework","stool","stop","stopsign","stopwatch","store","storey","storm","story","storyboard","story-telling","stove","strait","stranger","strap","straw","strawberry","stream","street","streetcar","stress","stretch","strike","string","strip","structure","struggle","stud","student","studio","study","stuff","stumbling","sturgeon","style","styling","stylus","subcomponent","subconscious","submarine","subroutine","subsidence","substance","suburb","subway","success","suck","sudan","suede","suffocation","sugar","suggestion","suit","suitcase","sultan","summer","sun","sunbeam","sunbonnet","sunday","sundial","sunflower","sunglasses","sunlamp","sunroom","sunshine","supermarket","supply","support","supporter","suppression","surface","surfboard","surgeon","surgery","surname","surprise","susan","sushi","suspect","suspenders","sustainment","SUV","swallow","swamp","swan","swath","sweat","sweater","sweats","sweatshirt","sweatshop","sweatsuit","swedish","sweets","swell","swim","swimming","swimsuit","swing","swiss","switch","switchboard","swivel","sword","swordfish","sycamore","syndicate","synergy","synod","syria","syrup","system","tabby","tabernacle","table","tablecloth","tabletop","tachometer","tackle","tadpole","tail","tailor","tailspin","taiwan","tale","talk","tam","tambour","tambourine","tam-o'-shanter","tandem","tangerine","tank","tanker","tankful","tank-top","tanzania","tap","target","tassel","taste","tatami","tattler","tattoo","taurus","tavern","tax","taxi","taxicab","tea","teacher","teaching","team","tear","technician","technologist","technology","teen","teeth","telephone","telescreen","teletype","television","teller","temp","temper","temperature","temple","tempo","temporariness","temptress","tendency","tenement","tennis","tenor","tent","tepee","term","terracotta","terrapin","territory","test","text","textbook","texture","thailand","thanks","thaw","theater","theism","theme","theoretician","theory","therapist","thermals","thermometer","thigh","thing","thinking","thistle","thomas","thong","thongs","thorn","thought","thread","thrill","throat","throne","thrush","thumb","thunder","thunderbolt","thunderhead","thunderstorm","thursday","tiara","tic","ticket","tie","tiger","tight","tights","tile","till","timbale","time","timeline","timeout","timer","timpani","tin","tinderbox","tinkle","tintype","tip","tire","tissue","titanium","title","toad","toast","toe","toenail","toga","togs","toilet","tom","tomato","tomography","tomorrow","tom-tom","ton","tongue","toot","tooth","toothbrush","toothpaste","toothpick","top","top-hat","topsail","toque","torchiere","toreador","tornado","torso","tortellini","tortoise","tosser","total","tote","touch","tough","tough-guy","tour","tourist","towel","tower","town","townhouse","tow-truck","toy","trachoma","track","tracksuit","tractor","trade","tradition","traditionalism","traffic","trail","trailer","train","trainer","training","tram","tramp","transaction","translation","transmission","transom","transport","trapdoor","trapezium","trapezoid","trash","travel","tray","treatment","tree","trellis","tremor","trench","trial","triangle","tribe","trick","trigonometry","trim","trinket","trip","tripod","trolley","trombone","trooper","trouble","trousers","trout","trove","trowel","truck","truckit","trumpet","trunk","trust","try","t-shirt","tsunami","tub","tuba","tube","tuesday","tugboat","tulip","tummy","tuna","tune","tune-up","tunic","tunnel","turban","turkey","turkish","turn","turnip","turnover","turnstile","turret","turtle","tussle","tutu","tuxedo","tv","twig","twilight","twine","twist","twister","two","typewriter","typhoon","tyvek","uganda","ukraine","ukrainian","ukulele","umbrella","unblinking","uncle","underclothes","underground","underneath","underpants","underpass","undershirt","underwear","underwire","unibody","uniform","union","unit","united kingdom","urn","use","usher","utensil","uzbekistan","vacation","vacuum","vagrant","valance","valley","valuable","value","van","vane","vanity","variation","variety","vase","vast","vault","vaulting","veal","vegetable","vegetarian","vehicle","veil","vein","veldt","vellum","velodrome","velvet","venezuela","venezuelan","venom","veranda","verdict","vermicelli","verse","version","vertigo","verve","vessel","vest","vestment","veterinarian","vibe","vibraphone","vibration","vietnam","view","villa","village","vineyard","vinyl","viola","violet","violin","virginal","virgo","virtue","viscose","vise","vision","visit","visitor","visor","vixen","voice","volcano","volleyball","voyage","vulture","wad","wafer","waffle","waist","waistband","waiter","waitress","walk","walker","walkway","wall","wallaby","wallet","walnut","walrus","wampum","wannabe","war","warden","warlock","warm-up","warning","wash","washbasin","washcloth","washer","washtub","wasp","waste","wastebasket","watch","watchmaker","water","waterbed","waterfall","waterskiing","waterspout","wave","wax","way","weakness","wealth","weapon","weasel","weather","web","wedge","wednesday","weed","weeder","weedkiller","week","weekend","weekender","weight","weird","well","west","western","wet-bar","wetsuit","whale","wharf","wheel","whip","whirlpool","whirlwind","whisker","whiskey","whistle","white","whole","wholesale","wholesaler","whorl","wife","wilderness","will","william","willow","wind","windage","wind-chime","window","windscreen","windshield","wine","wing","wingman","wingtip","winter","wire","wiseguy","wish","wisteria","witch","witch-hunt","withdrawal","witness","wolf","woman","wombat","women","wood","woodland","woodshed","woodwind","wool","woolen","word","work","workbench","worker","workhorse","worklife","workshop","world","worm","worthy","wound","wrap","wraparound","wrecker","wren","wrench","wrestler","wrinkle","wrist","writer","writing","wrong","xylophone","yacht","yak","yam","yard","yarmulke","yarn","yawl","year","yellow","yesterday","yew","yin","yogurt","yoke","young","youth","yugoslavian","yurt","zampone","zebra","zebrafish","zephyr","ziggurat","zinc","zipper","zither","zone","zoo","zoologist","zoology","zoot-suit","zucchini"];function W1(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function Ya(){const e=Math.round(Math.random()*1124),t=Math.round(Math.random()*3260);return`${W1(Nq[e])} ${W1(Bq[t])}`}function hm(e){var n,r;if(!(e!=null&&e.trim().length))return"?";const t=(r=(n=e==null?void 0:e.trim())==null?void 0:n.replace(/[^a-zA-Z ]/g,""))==null?void 0:r.split(" ").map(s=>s.length?s:"").slice(0,3).reduce((s,i)=>s+i[0],"");return t==null?void 0:t.replace("undefined","")}const Sy=()=>({id:void 0,name:Ya(),apiKey:"",printerURL:"",printerType:0,enabled:!0});class Qt extends vr{static applyLoginDetailsPatchForm(t,n){n.name=t.name||Ya(),n.apiKey=t.apiKey}static convertPrinterToCreateForm(t){const n=Sy();return n.id=t.id,n.printerURL=t.printerURL,n.name=t.name||Ya(),n.apiKey=t.apiKey,n.enabled=t.enabled,n}static openPrinterURL(t){t&&window.open(t)}static async getPrinters(){const t=Me.printerRoute;return await this.get(t)}static async getPrinterLoginDetails(t){const n=Me.getPrinterLoginDetailsRoute(t);return await this.get(n)}static async restartOctoPrint(t){const n=`${Me.restartOctoPrintRoute(t)}`;return await this.post(n)}static async refreshSocket(t){const n=`${Me.refreshSocketRoute(t)}`;return await this.post(n)}static async sendPrinterConnectCommand(t){const n=Me.printerSerialConnectRoute(t);return await this.post(n)}static async sendPrinterDisconnectCommand(t){const n=Me.printerSerialDisconnectRoute(t);return await this.post(n)}static async sendPrinterJogCommand(t,n){const r=Me.printerJogCommandRoute(t);return await this.post(r,n)}static async sendPrinterHomeCommand(t,n){const r=Me.printerHomeCommandRoute(t);return await this.post(r,n)}static async createPrinter(t,n){const r=`${Me.printerRoute}?forceSave=${n}`;return await this.post(r,t)}static async batchImportPrinters(t){const n=Me.printerBatchRoute;return await this.post(n,t)}static async deletePrinter(t){const n=Me.getPrinterRoute(t);return await this.delete(n)}static async updatePrinter(t,n,r){const i=`${Me.getPrinterRoute(t)}?forceSave=${r}`;return await this.patch(i,n)}static async updatePrinterMaintenance(t,n=null){const r=Me.postPrinterDisabledReasonRoute(t);return await this.patch(r,{disabledReason:n})}static async testConnection(t){const n=Me.printerTestConnectionRoute;return await this.post(n,t)}static async toggleEnabled(t,n){const r=Me.printerEnabledRoute(t);return await this.patch(r,{enabled:n})}}class Rn extends vr{static async getSettings(){const t=Me.settingsRoute;return await this.get(t)}static async getSettingsSensitive(){const t=Me.settingsSensitiveRoute;return await this.get(t)}static async updateLoginRequiredSettings(t){const n=`${Me.updateLoginRequiredRoute}`;return await this.put(n,{loginRequired:t})}static async updateRegistrationEnabledSettings(t){const n=`${Me.updateRegistrationEnabledRoute}`;return await this.put(n,{registrationEnabled:t})}static async updateCredentialSettings(t,n,r){const s=`${Me.updateCredentialSettings}`;return await this.put(s,{jwtExpiresIn:t,refreshTokenAttempts:n,refreshTokenExpiry:r})}static async updateFrontendSettings(t){const n=`${Me.updateFrontendSettingsRoute}`;return await this.put(n,t)}static async setSentryDiagnosticsSettings(t){const n=`${Me.serverSentryDiagnosticsSettingRoute}`;return await this.patch(n,{enabled:t})}static async updateTimeoutSettings(t){const n=`${Me.updateTimeoutSettingRoute}`;return await this.put(n,t)}static async setFileCleanSettings(t){const n=`${Me.fileCleanSettingsRoute}`;return await this.put(n,t)}static async updateExperimentalMoonrakerSupport(t){const n=Me.updateExperimentalMoonrakerSupportRoute;return await this.put(n,{enabled:t})}static async updateExperimentalClientSupport(t){const n=Me.updateExperimentalClientSupportRoute;return await this.put(n,{enabled:t})}}class Fa extends vr{static async stopPrintJob(t){const n=Me.printerStopJobRoute(t);return await this.post(n)}static async pausePrintJob(t){const n=Me.printerPauseJobRoute(t);return await this.post(n)}static async resumePrintJob(t){const n=Me.printerResumeJobRoute(t);return await this.post(n)}}const Ns=ps({id:"Settings",state:()=>({settings:void 0,frontendDebugSettings:{showPrinterStateUpdateSideNav:!1,showInterpretedPrinterState:!1,showJobsRendered:!1}}),actions:{async loadSettings(){const e=await Rn.getSettings();return this.settings=e,e},async updateFrontendSettings(e){const t=await Rn.updateFrontendSettings(e);return this.settings=t,t},async saveFrontendSettings(){if(!this.settings)return;const e=await Rn.updateFrontendSettings(this.settings.frontend);this.settings=e},async updateTimeoutSettings(e){const t=await Rn.updateTimeoutSettings(e);return this.settings=t,t}},getters:{serverSettings(){var e;return(e=this.settings)==null?void 0:e.server},frontendSettings(){var e;return(e=this.settings)==null?void 0:e.frontend},preferCancelOverQuickStop(){var e,t;return((t=(e=this.settings)==null?void 0:e.frontend)==null?void 0:t.tilePreferCancelOverQuickStop)||!1},thumbnailsEnabled(){var e;return((e=this.settings)==null?void 0:e.server.experimentalThumbnailSupport)||!1},largeTiles(){var e,t;return((t=(e=this.settings)==null?void 0:e.frontend)==null?void 0:t.largeTiles)||!1},gridCols(){var e,t;return((t=(e=this.settings)==null?void 0:e.frontend)==null?void 0:t.gridCols)||8},gridRows(){var e,t;return((t=(e=this.settings)==null?void 0:e.frontend)==null?void 0:t.gridRows)||8}}}),yi={danger:"danger",dark:"dark",secondary:"secondary",success:"success"},bi={DarkBlue:"#050c2e",Black:"#000000",DarkGray:"#262626",LightBrown:"#583c0e",Brown:"#580e47",Red:"#2e0905"},hl={Disabled:"Disabled",Maintenance:"Maintenance",Offline:"Offline",Finding:"Finding",Disconnected:"Disconnected",Error:"Error",Paused:"Paused",Operational:"Operational",Printing:"Printing"};function eA(e,t,n){var f,p,v,m;const s=Ns().frontendDebugSettings.showInterpretedPrinterState,i={};if(!e.enabled)return(f=e.disabledReason)!=null&&f.length?{...i,color:yi.danger,rgb:bi.Black,text:hl.Maintenance}:{...i,color:yi.secondary,rgb:bi.DarkBlue,text:hl.Disabled};const o=(t==null?void 0:t.api)==="responding",a=(t==null?void 0:t.api)==="authFail";if(!o||!t){const y=(t==null?void 0:t.api)==="noResponse";return{...i,color:yi.secondary,rgb:bi.Red,text:a?"API key wrong":y?"API unreachable":(t==null?void 0:t.api)||"-"}}if(!o)return{...i,color:yi.danger,rgb:bi.Red,text:a?"API key wrong":"No API connection"};const l=t.socket==="authenticated",u=t.socket==="authenticating",c=(v=(p=n==null?void 0:n.current)==null?void 0:p.payload)==null?void 0:v.state,d=c==null?void 0:c.flags;if(!l||!d)return s&&console.debug(`Socket opened ${l?1:0}, socketAuthing ${u?1:0} printerState ${n?1:0},
|
|
62
|
-
currentState: ${c}, FLAGS ${d}`),{...i,color:yi.danger,rgb:bi.Red,text:n?"Awaiting state":"No USB"};if(!d){console.error("No flags",d);return}return d.error||d.closedOrError?{...i,color:yi.danger,rgb:bi.Red,text:((m=c.text)==null?void 0:m.replace("Offline","Disconnected"))||hl.Error,description:c.error}:d.paused||d.pausing?{...i,color:yi.success,rgb:bi.Brown,text:hl.Paused}:d.printing?{...i,color:yi.success,rgb:bi.LightBrown,text:hl.Printing}:{...i,color:yi.dark,rgb:bi.DarkGray,text:hl.Operational,description:c.error}}const La=e=>{var t,n;return(n=(t=e==null?void 0:e.current)==null?void 0:t.payload)==null?void 0:n.state},Vq=e=>{var t;return(t=La(e))==null?void 0:t.flags.printing},Uq=(e,t)=>{var n,r,s;return!pm(e)&&(e==null?void 0:e.enabled)&&!((n=La(t))!=null&&n.flags.operational)||((r=La(t))==null?void 0:r.flags.error)||((s=La(t))==null?void 0:s.flags.closedOrError)},tA=e=>!pm(e)&&!(e!=null&&e.enabled),pm=e=>{var t;return!(e!=null&&e.enabled)&&((t=e==null?void 0:e.disabledReason)==null?void 0:t.length)},zq=(e,t)=>{var n,r,s;return((n=La(t))==null?void 0:n.flags)&&!((r=La(t))!=null&&r.flags.printing)&&((s=La(t))==null?void 0:s.flags.operational)&&!tA(e)&&!pm(e)},nr=ps("PrinterState",{state:()=>({printerIds:[],printerEventsById:{},socketStatesById:{}}),getters:{operationalPrintersById(){const e=Lt(),t={};return this.printerIds.forEach(n=>{var s,i,o,a;const r=this.printerEventsById[n];if((a=(o=(i=(s=r==null?void 0:r.current)==null?void 0:s.payload)==null?void 0:i.state)==null?void 0:o.flags)!=null&&a.operational){const l=e.printer(n);if(l)t[n]=l;else throw new Error(`PrinterStore contains no printer with id ${n} but events are known`)}}),t},isPrinterOperational(){return e=>!!this.operationalPrintersById[e]},printingPrintersById(){const e={};return this.printerIds.forEach(t=>{var r,s,i,o;const n=this.printerEventsById[t];(o=(i=(s=(r=n==null?void 0:n.current)==null?void 0:r.payload)==null?void 0:s.state)==null?void 0:i.flags)!=null&&o.printing&&(e[t]=n)}),e},isPrinterPrinting(){return e=>!!this.printingPrintersById[e]},isPrinterStoppable(){return e=>{var r,s,i;const t=this.printerEventsById[e];if(!t)return!1;const n=(i=(s=(r=t==null?void 0:t.current)==null?void 0:r.payload)==null?void 0:s.state)==null?void 0:i.flags;return(n==null?void 0:n.printing)||(n==null?void 0:n.paused)||(n==null?void 0:n.pausing)}},isPrinterPaused(){return e=>{var r,s,i;const t=this.printerEventsById[e];if(!t)return!1;const n=(i=(s=(r=t==null?void 0:t.current)==null?void 0:r.payload)==null?void 0:s.state)==null?void 0:i.flags;return(n==null?void 0:n.paused)||(n==null?void 0:n.pausing)}},printerCurrentEventReceivedAtById(){const e={};return this.printerIds.forEach(t=>{var r;const n=this.printerEventsById[t];(r=n==null?void 0:n.current)!=null&&r.receivedAt&&(e[t]=n.current.receivedAt)}),e},onlinePrinters(){const e=Lt(),t={};return this.printerIds.forEach(n=>{const r=this.socketStatesById[n];if((r==null?void 0:r.api)==="responding"){const s=e.printer(n);if(s)t[n]=s;else throw new Error(`PrinterStore contains no printer with id ${n} but socket state is opened`)}}),t},onlinePrintersWithStates(){return Object.values(this.onlinePrinters).map(e=>({printer:e,printerState:this.printerEventsById[e.id]}))},printingCount(){const e=nr();return Object.values(e.onlinePrintersWithStates).filter(t=>Vq(t.printerState)).length},operationalNotPrintingCount(){return this.onlinePrintersWithStates.filter(e=>zq(e.printer,e.printerState)).length},isApiResponding(){return e=>Object.keys(this.onlinePrinters).includes(e.toString())},isPrinterNotOnline(){return e=>!this.isApiResponding(e)},printerJobsById(){const e=Lt(),t=Ns().frontendDebugSettings.showJobsRendered,n={};return this.printerIds.forEach(r=>{var o,a,l,u;const s=this.printerEventsById[r],i=(l=(a=(o=s==null?void 0:s.current)==null?void 0:o.payload)==null?void 0:a.state)==null?void 0:l.flags;if(i!=null&&i.printing||i!=null&&i.paused||i!=null&&i.pausing){const c=e.printer(r);if(c)n[c.id]=(u=s==null?void 0:s.current)==null?void 0:u.payload;else throw new Error(`PrinterStore contains no printer with id ${r} but events are known`)}}),t&&console.debug("[PrinterStateStore] rendered printerJobsById",n),n},printersWithJob(){const e=Lt(),t=[];return this.printerIds.forEach(n=>{var i,o,a,l;const r=this.printerEventsById[n],s=(a=(o=(i=r==null?void 0:r.current)==null?void 0:i.payload)==null?void 0:o.state)==null?void 0:a.flags;if(s!=null&&s.printing||s!=null&&s.paused||s!=null&&s.pausing){const u=e.printer(n);if(u)t.push({printer:u,job:(l=r==null?void 0:r.current)==null?void 0:l.payload});else throw new Error(`PrinterStore contains no printer with id ${n} but events are known`)}}),t},printingFilePathsByPrinterId(){const e={};return this.printerIds.forEach(t=>{var s,i,o,a,l,u,c;const n=this.printerEventsById[t],r=(o=(i=(s=n==null?void 0:n.current)==null?void 0:s.payload)==null?void 0:i.state)==null?void 0:o.flags;(r!=null&&r.printing||r!=null&&r.paused||r!=null&&r.pausing)&&(e[t]=(c=(u=(l=(a=n==null?void 0:n.current)==null?void 0:a.payload)==null?void 0:l.job)==null?void 0:u.file)==null?void 0:c.path)}),e}},actions:{setSocketStates(e){this.socketStatesById=e,this.printerIds=Object.keys(e)},setPrinterEvents(e){this.printerEventsById=e},deletePrinterEvents(e){delete this.printerEventsById[e],this.printerIds=Object.keys(this.printerEventsById)},async selectAndPrintFile({printerId:e,fullPath:t}){if(!(!e||!Lt().printer(e))){if(this.isPrinterPrinting(e)){alert("This printer is printing or not connected! Either way printing is not an option.");return}await Li.selectAndPrintFile(e,t,!0)}}}}),Lt=ps("Printers",{state:()=>({printers:[],printerFileCache:{},sideNavPrinter:void 0,updateDialogPrinter:void 0,selectedPrinters:[],maintenanceDialogPrinter:void 0}),getters:{printer(){return e=>this.printers.find(t=>t.id==e)},isSelectedPrinter(e){return t=>!!e.selectedPrinters.find(n=>n.id===t)},printerFiles(){return e=>this.printerFileCache[e]},disabledCount(){return this.printers.filter(tA).length},disconnectedCount(){const e=nr();return this.printers.filter(t=>Uq(t,e.printerEventsById[t.id])).length},maintenanceCount(){return this.printers.filter(e=>pm(e)).length}},actions:{async createPrinter(e,t){const n=await Qt.createPrinter(e,t);return this.printers.push(n),this.printers.sort((r,s)=>{var i,o,a;return(a=(i=r.name)==null?void 0:i.toLowerCase())!=null&&a.localeCompare((o=s==null?void 0:s.name)==null?void 0:o.toLowerCase())?1:-1}),n},toggleSelectedPrinter(e){const t=nr(),n=this.selectedPrinters.findIndex(r=>r.id==e.id);n===-1?t.isApiResponding(e.id)&&this.selectedPrinters.push(e):this.selectedPrinters.splice(n,1)},clearSelectedPrinters(){this.selectedPrinters=[]},setSideNavPrinter(e){this.sideNavPrinter=e},setUpdateDialogPrinter(e){this.updateDialogPrinter=e},setMaintenanceDialogPrinter(e){this.maintenanceDialogPrinter=e},async updatePrinter({printerId:e,updatedPrinter:t},n){const r=await Qt.updatePrinter(e,t,n);return this._replacePrinter({printerId:e,printer:r}),r},async loadPrinters(){const e=await Qt.getPrinters();return this.setPrinters(e),e},async deletePrinter(e){const t=await Qt.deletePrinter(e);return this._popPrinter(e),t},setPrinters(e){var n;if(!(e!=null&&e.length)){this.printers=[];return}const t=(n=this.sideNavPrinter)==null?void 0:n.id;t&&(this.sideNavPrinter=e.find(r=>r.id===t)),this.printers=e.sort((r,s)=>{var i,o,a;return(a=(i=r.name)==null?void 0:i.toLowerCase())!=null&&a.localeCompare((o=s==null?void 0:s.name)==null?void 0:o.toLowerCase())?1:-1})},_popPrinter(e){const t=this.printers.findIndex(n=>n.id===e);t!==-1?this.printers.splice(t,1):console.warn("Printer was not popped as it did not occur in state",e)},_replacePrinter({printerId:e,printer:t}){const n=this.printers.findIndex(r=>r.id===e);n!==-1?this.printers[n]=t:console.warn("Printer was not purged as it did not occur in state",e)},async deletePrinterFiles(e){if(!e)throw new Error("No printerId was provided");const t=await Li.clearFiles(e);if(!(t!=null&&t.failedFiles))throw new Error("No failed files were returned");this.printerFileCache[e]&&(this.printerFileCache[e]=t.failedFiles)},async loadPrinterFiles(e){const t=await Li.getFiles(e);return t.sort((n,r)=>n.date<r.date?1:-1),this.printerFileCache[e]=t,t},async deletePrinterFile(e,t){await Li.deleteFileOrFolder(e,t);const n=this.printerFileCache[e];if(!(n!=null&&n.length)){console.warn("Printer file list was nonexistent",e);return}const r=n.findIndex(s=>s.path===t);return r!==-1?n.splice(r,1):console.warn("File was not purged as it did not occur in state",t),this.printerFiles(e)},async sendStopJobCommand(e){const t=nr();if(!e)return;const n=this.printer(e);if(!n)return;const r=t.isPrinterPrinting(e)?"The printer seems idle - do you want to command it to stop anyway?":"The printer is still printing - are you sure to stop it?";confirm(r)&&await Fa.stopPrintJob(n.id)}}}),Dn=_e()({name:"VCardActions",props:Ve(),setup(e,t){let{slots:n}=t;return Ir({VBtn:{slim:!0,variant:"text"}}),Ie(()=>{var r;return h("div",{class:["v-card-actions",e.class],style:e.style},[(r=n.default)==null?void 0:r.call(n)])}),{}}}),Hq=ce({opacity:[Number,String],...Ve(),...vt()},"VCardSubtitle"),mm=_e()({name:"VCardSubtitle",props:Hq(),setup(e,t){let{slots:n}=t;return Ie(()=>h(e.tag,{class:["v-card-subtitle",e.class],style:[{"--v-card-subtitle-opacity":e.opacity},e.style]},n)),{}}}),an=Cu("v-card-title");function jq(e){return{aspectStyles:T(()=>{const t=Number(e.aspectRatio);return t?{paddingBottom:String(1/t*100)+"%"}:void 0})}}const nA=ce({aspectRatio:[String,Number],contentClass:null,inline:Boolean,...Ve(),...Or()},"VResponsive"),G1=_e()({name:"VResponsive",props:nA(),setup(e,t){let{slots:n}=t;const{aspectStyles:r}=jq(e),{dimensionStyles:s}=Mr(e);return Ie(()=>{var i;return h("div",{class:["v-responsive",{"v-responsive--inline":e.inline},e.class],style:[s.value,e.style]},[h("div",{class:"v-responsive__sizer",style:r.value},null),(i=n.additional)==null?void 0:i.call(n),n.default&&h("div",{class:["v-responsive__content",e.contentClass]},[n.default()])])}),{}}});function qq(e,t){if(!Ob)return;const n=t.modifiers||{},r=t.value,{handler:s,options:i}=typeof r=="object"?r:{handler:r,options:{}},o=new IntersectionObserver(function(){var d;let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1?arguments[1]:void 0;const u=(d=e._observe)==null?void 0:d[t.instance.$.uid];if(!u)return;const c=a.some(f=>f.isIntersecting);s&&(!n.quiet||u.init)&&(!n.once||c||u.init)&&s(c,a,l),c&&n.once?rA(e,t):u.init=!0},i);e._observe=Object(e._observe),e._observe[t.instance.$.uid]={init:!1,observer:o},o.observe(e)}function rA(e,t){var r;const n=(r=e._observe)==null?void 0:r[t.instance.$.uid];n&&(n.observer.unobserve(e),delete e._observe[t.instance.$.uid])}const Pw={mounted:qq,unmounted:rA},Wq=ce({absolute:Boolean,alt:String,cover:Boolean,color:String,draggable:{type:[Boolean,String],default:void 0},eager:Boolean,gradient:String,lazySrc:String,options:{type:Object,default:()=>({root:void 0,rootMargin:void 0,threshold:void 0})},sizes:String,src:{type:[String,Object],default:""},crossorigin:String,referrerpolicy:String,srcset:String,position:String,...nA(),...Ve(),...$n(),...Mu()},"VImg"),cs=_e()({name:"VImg",directives:{intersect:Pw},props:Wq(),emits:{loadstart:e=>!0,load:e=>!0,error:e=>!0},setup(e,t){let{emit:n,slots:r}=t;const{backgroundColorClasses:s,backgroundColorStyles:i}=fr(Re(e,"color")),{roundedClasses:o}=Vn(e),a=on("VImg"),l=Ae(""),u=V(),c=Ae(e.eager?"loading":"idle"),d=Ae(),f=Ae(),p=T(()=>e.src&&typeof e.src=="object"?{src:e.src.src,srcset:e.srcset||e.src.srcset,lazySrc:e.lazySrc||e.src.lazySrc,aspect:Number(e.aspectRatio||e.src.aspect||0)}:{src:e.src,srcset:e.srcset,lazySrc:e.lazySrc,aspect:Number(e.aspectRatio||0)}),v=T(()=>p.value.aspect||d.value/f.value||0);ke(()=>e.src,()=>{m(c.value!=="idle")}),ke(v,(O,L)=>{!O&&L&&u.value&&P(u.value)}),ku(()=>m());function m(O){if(!(e.eager&&O)&&!(Ob&&!O&&!e.eager)){if(c.value="loading",p.value.lazySrc){const L=new Image;L.src=p.value.lazySrc,P(L,null)}p.value.src&&Mt(()=>{var L;n("loadstart",((L=u.value)==null?void 0:L.currentSrc)||p.value.src),setTimeout(()=>{var M;if(!a.isUnmounted)if((M=u.value)!=null&&M.complete){if(u.value.naturalWidth||b(),c.value==="error")return;v.value||P(u.value,null),c.value==="loading"&&y()}else v.value||P(u.value),w()})})}}function y(){var O;a.isUnmounted||(w(),P(u.value),c.value="loaded",n("load",((O=u.value)==null?void 0:O.currentSrc)||p.value.src))}function b(){var O;a.isUnmounted||(c.value="error",n("error",((O=u.value)==null?void 0:O.currentSrc)||p.value.src))}function w(){const O=u.value;O&&(l.value=O.currentSrc||O.src)}let x=-1;Cn(()=>{clearTimeout(x)});function P(O){let L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:100;const M=()=>{if(clearTimeout(x),a.isUnmounted)return;const{naturalHeight:z,naturalWidth:H}=O;z||H?(d.value=H,f.value=z):!O.complete&&c.value==="loading"&&L!=null?x=window.setTimeout(M,L):(O.currentSrc.endsWith(".svg")||O.currentSrc.startsWith("data:image/svg+xml"))&&(d.value=1,f.value=1)};M()}const S=T(()=>({"v-img__img--cover":e.cover,"v-img__img--contain":!e.cover})),C=()=>{var M;if(!p.value.src||c.value==="idle")return null;const O=h("img",{class:["v-img__img",S.value],style:{objectPosition:e.position},crossorigin:e.crossorigin,src:p.value.src,srcset:p.value.srcset,alt:e.alt,referrerpolicy:e.referrerpolicy,draggable:e.draggable,sizes:e.sizes,ref:u,onLoad:y,onError:b},null),L=(M=r.sources)==null?void 0:M.call(r);return h(ii,{transition:e.transition,appear:!0},{default:()=>[Bt(L?h("picture",{class:"v-img__picture"},[L,O]):O,[[Xi,c.value==="loaded"]])]})},R=()=>h(ii,{transition:e.transition},{default:()=>[p.value.lazySrc&&c.value!=="loaded"&&h("img",{class:["v-img__img","v-img__img--preload",S.value],style:{objectPosition:e.position},crossorigin:e.crossorigin,src:p.value.lazySrc,alt:e.alt,referrerpolicy:e.referrerpolicy,draggable:e.draggable},null)]}),k=()=>r.placeholder?h(ii,{transition:e.transition,appear:!0},{default:()=>[(c.value==="loading"||c.value==="error"&&!r.error)&&h("div",{class:"v-img__placeholder"},[r.placeholder()])]}):null,E=()=>r.error?h(ii,{transition:e.transition,appear:!0},{default:()=>[c.value==="error"&&h("div",{class:"v-img__error"},[r.error()])]}):null,I=()=>e.gradient?h("div",{class:"v-img__gradient",style:{backgroundImage:`linear-gradient(${e.gradient})`}},null):null,A=Ae(!1);{const O=ke(v,L=>{L&&(requestAnimationFrame(()=>{requestAnimationFrame(()=>{A.value=!0})}),O())})}return Ie(()=>{const O=G1.filterProps(e);return Bt(h(G1,me({class:["v-img",{"v-img--absolute":e.absolute,"v-img--booting":!A.value},s.value,o.value,e.class],style:[{width:Le(e.width==="auto"?d.value:e.width)},i.value,e.style]},O,{aspectRatio:v.value,"aria-label":e.alt,role:e.alt?"img":void 0}),{additional:()=>h(Pe,null,[h(C,null,null),h(R,null,null),h(I,null,null),h(k,null,null),h(E,null,null)]),default:r.default}),[[hr("intersect"),{handler:m,options:e.options},null,{once:!0}]])}),{currentSrc:l,image:u,state:c,naturalWidth:d,naturalHeight:f}}}),Gq=ce({start:Boolean,end:Boolean,icon:ze,image:String,text:String,...ms(),...Ve(),...Ar(),...$n(),...Tu(),...vt(),...$t(),...Fs({variant:"flat"})},"VAvatar"),lt=_e()({name:"VAvatar",props:Gq(),setup(e,t){let{slots:n}=t;const{themeClasses:r}=Yt(e),{borderClasses:s}=Ds(e),{colorClasses:i,colorStyles:o,variantClasses:a}=tl(e),{densityClasses:l}=gs(e),{roundedClasses:u}=Vn(e),{sizeClasses:c,sizeStyles:d}=Rd(e);return Ie(()=>h(e.tag,{class:["v-avatar",{"v-avatar--start":e.start,"v-avatar--end":e.end},r.value,s.value,i.value,l.value,u.value,c.value,a.value,e.class],style:[o.value,d.value,e.style]},{default:()=>[n.default?h(Ot,{key:"content-defaults",defaults:{VImg:{cover:!0,src:e.image},VIcon:{icon:e.icon}}},{default:()=>[n.default()]}):e.image?h(cs,{key:"image",src:e.image,alt:"",cover:!0},null):e.icon?h(Q,{key:"icon",icon:e.icon},null):e.text,Go(!1,"v-avatar")]})),{}}}),Kq=ce({appendAvatar:String,appendIcon:ze,prependAvatar:String,prependIcon:ze,subtitle:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},...Ve(),...Ar()},"VCardItem"),Yq=_e()({name:"VCardItem",props:Kq(),setup(e,t){let{slots:n}=t;return Ie(()=>{var u;const r=!!(e.prependAvatar||e.prependIcon),s=!!(r||n.prepend),i=!!(e.appendAvatar||e.appendIcon),o=!!(i||n.append),a=!!(e.title!=null||n.title),l=!!(e.subtitle!=null||n.subtitle);return h("div",{class:["v-card-item",e.class],style:e.style},[s&&h("div",{key:"prepend",class:"v-card-item__prepend"},[n.prepend?h(Ot,{key:"prepend-defaults",disabled:!r,defaults:{VAvatar:{density:e.density,image:e.prependAvatar},VIcon:{density:e.density,icon:e.prependIcon}}},n.prepend):h(Pe,null,[e.prependAvatar&&h(lt,{key:"prepend-avatar",density:e.density,image:e.prependAvatar},null),e.prependIcon&&h(Q,{key:"prepend-icon",density:e.density,icon:e.prependIcon},null)])]),h("div",{class:"v-card-item__content"},[a&&h(an,{key:"title"},{default:()=>{var c;return[((c=n.title)==null?void 0:c.call(n))??re(e.title)]}}),l&&h(mm,{key:"subtitle"},{default:()=>{var c;return[((c=n.subtitle)==null?void 0:c.call(n))??re(e.subtitle)]}}),(u=n.default)==null?void 0:u.call(n)]),o&&h("div",{key:"append",class:"v-card-item__append"},[n.append?h(Ot,{key:"append-defaults",disabled:!i,defaults:{VAvatar:{density:e.density,image:e.appendAvatar},VIcon:{density:e.density,icon:e.appendIcon}}},n.append):h(Pe,null,[e.appendIcon&&h(Q,{key:"append-icon",density:e.density,icon:e.appendIcon},null),e.appendAvatar&&h(lt,{key:"append-avatar",density:e.density,image:e.appendAvatar},null)])])])}),{}}}),Xq=ce({opacity:[Number,String],...Ve(),...vt()},"VCardText"),en=_e()({name:"VCardText",props:Xq(),setup(e,t){let{slots:n}=t;return Ie(()=>h(e.tag,{class:["v-card-text",e.class],style:[{"--v-card-text-opacity":e.opacity},e.style]},n)),{}}}),Qq=ce({appendAvatar:String,appendIcon:ze,disabled:Boolean,flat:Boolean,hover:Boolean,image:String,link:{type:Boolean,default:void 0},prependAvatar:String,prependIcon:ze,ripple:{type:[Boolean,Object],default:!0},subtitle:{type:[String,Number,Boolean],default:void 0},text:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},...ms(),...Ve(),...Ar(),...Or(),...vs(),...Bp(),...Ko(),...Ru(),...$n(),...zp(),...vt(),...$t(),...Fs({variant:"elevated"})},"VCard"),gt=_e()({name:"VCard",directives:{Ripple:Au},props:Qq(),setup(e,t){let{attrs:n,slots:r}=t;const{themeClasses:s}=Yt(e),{borderClasses:i}=Ds(e),{colorClasses:o,colorStyles:a,variantClasses:l}=tl(e),{densityClasses:u}=gs(e),{dimensionStyles:c}=Mr(e),{elevationClasses:d}=$s(e),{loaderClasses:f}=Id(e),{locationStyles:p}=nl(e),{positionClasses:v}=Iu(e),{roundedClasses:m}=Vn(e),y=Up(e,n),b=T(()=>e.link!==!1&&y.isLink.value),w=T(()=>!e.disabled&&e.link!==!1&&(e.link||y.isClickable.value));return Ie(()=>{const x=b.value?"a":e.tag,P=!!(r.title||e.title!=null),S=!!(r.subtitle||e.subtitle!=null),C=P||S,R=!!(r.append||e.appendAvatar||e.appendIcon),k=!!(r.prepend||e.prependAvatar||e.prependIcon),E=!!(r.image||e.image),I=C||k||R,A=!!(r.text||e.text!=null);return Bt(h(x,me({class:["v-card",{"v-card--disabled":e.disabled,"v-card--flat":e.flat,"v-card--hover":e.hover&&!(e.disabled||e.flat),"v-card--link":w.value},s.value,i.value,o.value,u.value,d.value,f.value,v.value,m.value,l.value,e.class],style:[a.value,c.value,p.value,e.style],onClick:w.value&&y.navigate,tabindex:e.disabled?-1:void 0},y.linkProps),{default:()=>{var O;return[E&&h("div",{key:"image",class:"v-card__image"},[r.image?h(Ot,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},r.image):h(cs,{key:"image-img",cover:!0,src:e.image},null)]),h(Vp,{name:"v-card",active:!!e.loading,color:typeof e.loading=="boolean"?void 0:e.loading},{default:r.loader}),I&&h(Yq,{key:"item",prependAvatar:e.prependAvatar,prependIcon:e.prependIcon,title:e.title,subtitle:e.subtitle,appendAvatar:e.appendAvatar,appendIcon:e.appendIcon},{default:r.item,prepend:r.prepend,title:r.title,subtitle:r.subtitle,append:r.append}),A&&h(en,{key:"text"},{default:()=>{var L;return[((L=r.text)==null?void 0:L.call(r))??e.text]}}),(O=r.default)==null?void 0:O.call(r),r.actions&&h(Dn,null,{default:r.actions}),Go(w.value,"v-card")]}}),[[hr("ripple"),w.value&&e.ripple]])}),{}}}),sA=Symbol.for("vuetify:goto");function iA(){return{container:void 0,duration:300,layout:!1,offset:0,easing:"easeInOutCubic",patterns:{linear:e=>e,easeInQuad:e=>e**2,easeOutQuad:e=>e*(2-e),easeInOutQuad:e=>e<.5?2*e**2:-1+(4-2*e)*e,easeInCubic:e=>e**3,easeOutCubic:e=>--e**3+1,easeInOutCubic:e=>e<.5?4*e**3:(e-1)*(2*e-2)*(2*e-2)+1,easeInQuart:e=>e**4,easeOutQuart:e=>1- --e**4,easeInOutQuart:e=>e<.5?8*e**4:1-8*--e**4,easeInQuint:e=>e**5,easeOutQuint:e=>1+--e**5,easeInOutQuint:e=>e<.5?16*e**5:1+16*--e**5}}}function Jq(e){return Tw(e)??(document.scrollingElement||document.body)}function Tw(e){return typeof e=="string"?document.querySelector(e):Db(e)}function Ig(e,t,n){if(typeof e=="number")return t&&n?-e:e;let r=Tw(e),s=0;for(;r;)s+=t?r.offsetLeft:r.offsetTop,r=r.offsetParent;return s}function Zq(e,t){return{rtl:t.isRtl,options:Jn(iA(),e)}}async function K1(e,t,n,r){const s=n?"scrollLeft":"scrollTop",i=Jn((r==null?void 0:r.options)??iA(),t),o=r==null?void 0:r.rtl.value,a=(typeof e=="number"?e:Tw(e))??0,l=i.container==="parent"&&a instanceof HTMLElement?a.parentElement:Jq(i.container),u=typeof i.easing=="function"?i.easing:i.patterns[i.easing];if(!u)throw new TypeError(`Easing function "${i.easing}" not found.`);let c;if(typeof a=="number")c=Ig(a,n,o);else if(c=Ig(a,n,o)-Ig(l,n,o),i.layout){const v=window.getComputedStyle(a).getPropertyValue("--v-layout-top");v&&(c-=parseInt(v,10))}c+=i.offset,c=tW(l,c,!!o,!!n);const d=l[s]??0;if(c===d)return Promise.resolve(c);const f=performance.now();return new Promise(p=>requestAnimationFrame(function v(m){const b=(m-f)/i.duration,w=Math.floor(d+(c-d)*u(Pr(b,0,1)));if(l[s]=w,b>=1&&Math.abs(w-l[s])<10)return p(c);if(b>2)return p(l[s]);requestAnimationFrame(v)}))}function eW(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=Xe(sA),{isRtl:n}=Dr();if(!t)throw new Error("[Vuetify] Could not find injected goto instance");const r={...t,rtl:T(()=>t.rtl.value||n.value)};async function s(i,o){return K1(i,Jn(e,o),!1,r)}return s.horizontal=async(i,o)=>K1(i,Jn(e,o),!0,r),s}function tW(e,t,n,r){const{scrollWidth:s,scrollHeight:i}=e,[o,a]=e===document.scrollingElement?[window.innerWidth,window.innerHeight]:[e.offsetWidth,e.offsetHeight];let l,u;return r?n?(l=-(s-o),u=0):(l=0,u=s-o):(l=0,u=i+-a),Math.max(Math.min(t,u),l)}function nW(e){let{selectedElement:t,containerElement:n,isRtl:r,isHorizontal:s}=e;const i=id(s,n),o=oA(s,r,n),a=id(s,t),l=aA(s,t),u=a*.4;return o>l?l-u:o+i<l+a?l-i+a+u:o}function rW(e){let{selectedElement:t,containerElement:n,isHorizontal:r}=e;const s=id(r,n),i=aA(r,t),o=id(r,t);return i-s/2+o/2}function Y1(e,t){const n=e?"scrollWidth":"scrollHeight";return(t==null?void 0:t[n])||0}function sW(e,t){const n=e?"clientWidth":"clientHeight";return(t==null?void 0:t[n])||0}function oA(e,t,n){if(!n)return 0;const{scrollLeft:r,offsetWidth:s,scrollWidth:i}=n;return e?t?i-s+r:r:n.scrollTop}function id(e,t){const n=e?"offsetWidth":"offsetHeight";return(t==null?void 0:t[n])||0}function aA(e,t){const n=e?"offsetLeft":"offsetTop";return(t==null?void 0:t[n])||0}const iW=Symbol.for("vuetify:v-slide-group"),lA=ce({centerActive:Boolean,direction:{type:String,default:"horizontal"},symbol:{type:null,default:iW},nextIcon:{type:ze,default:"$next"},prevIcon:{type:ze,default:"$prev"},showArrows:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["always","desktop","mobile"].includes(e)},...Ve(),...rl({mobile:null}),...vt(),...Cd({selectedClass:"v-slide-group-item--active"})},"VSlideGroup"),X1=_e()({name:"VSlideGroup",props:lA(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{isRtl:r}=Dr(),{displayClasses:s,mobile:i}=pi(e),o=Pu(e,e.symbol),a=Ae(!1),l=Ae(0),u=Ae(0),c=Ae(0),d=T(()=>e.direction==="horizontal"),{resizeRef:f,contentRect:p}=za(),{resizeRef:v,contentRect:m}=za(),y=eW(),b=T(()=>({container:f.el,duration:200,easing:"easeOutQuart"})),w=T(()=>o.selected.value.length?o.items.value.findIndex(J=>J.id===o.selected.value[0]):-1),x=T(()=>o.selected.value.length?o.items.value.findIndex(J=>J.id===o.selected.value[o.selected.value.length-1]):-1);if(_t){let J=-1;ke(()=>[o.selected.value,p.value,m.value,d.value],()=>{cancelAnimationFrame(J),J=requestAnimationFrame(()=>{if(p.value&&m.value){const N=d.value?"width":"height";u.value=p.value[N],c.value=m.value[N],a.value=u.value+1<c.value}if(w.value>=0&&v.el){const N=v.el.children[x.value];S(N,e.centerActive)}})})}const P=Ae(!1);function S(J,N){let K=0;N?K=rW({containerElement:f.el,isHorizontal:d.value,selectedElement:J}):K=nW({containerElement:f.el,isHorizontal:d.value,isRtl:r.value,selectedElement:J}),C(K)}function C(J){if(!_t||!f.el)return;const N=id(d.value,f.el),K=oA(d.value,r.value,f.el);if(!(Y1(d.value,f.el)<=N||Math.abs(J-K)<16)){if(d.value&&r.value&&f.el){const{scrollWidth:oe,offsetWidth:we}=f.el;J=oe-we-J}d.value?y.horizontal(J,b.value):y(J,b.value)}}function R(J){const{scrollTop:N,scrollLeft:K}=J.target;l.value=d.value?K:N}function k(J){if(P.value=!0,!(!a.value||!v.el)){for(const N of J.composedPath())for(const K of v.el.children)if(K===N){S(K);return}}}function E(J){P.value=!1}let I=!1;function A(J){var N;!I&&!P.value&&!(J.relatedTarget&&((N=v.el)!=null&&N.contains(J.relatedTarget)))&&z(),I=!1}function O(){I=!0}function L(J){if(!v.el)return;function N(K){J.preventDefault(),z(K)}d.value?J.key==="ArrowRight"?N(r.value?"prev":"next"):J.key==="ArrowLeft"&&N(r.value?"next":"prev"):J.key==="ArrowDown"?N("next"):J.key==="ArrowUp"&&N("prev"),J.key==="Home"?N("first"):J.key==="End"&&N("last")}function M(J,N){if(!J)return;let K=J;do K=K==null?void 0:K[N==="next"?"nextElementSibling":"previousElementSibling"];while(K!=null&&K.hasAttribute("disabled"));return K}function z(J){if(!v.el)return;let N;if(!J)N=Gc(v.el)[0];else if(J==="next"){if(N=M(v.el.querySelector(":focus"),J),!N)return z("first")}else if(J==="prev"){if(N=M(v.el.querySelector(":focus"),J),!N)return z("last")}else J==="first"?(N=v.el.firstElementChild,N!=null&&N.hasAttribute("disabled")&&(N=M(N,"next"))):J==="last"&&(N=v.el.lastElementChild,N!=null&&N.hasAttribute("disabled")&&(N=M(N,"prev")));N&&N.focus({preventScroll:!0})}function H(J){const N=d.value&&r.value?-1:1,K=(J==="prev"?-N:N)*u.value;let he=l.value+K;if(d.value&&r.value&&f.el){const{scrollWidth:oe,offsetWidth:we}=f.el;he+=oe-we}C(he)}const G=T(()=>({next:o.next,prev:o.prev,select:o.select,isSelected:o.isSelected})),W=T(()=>{switch(e.showArrows){case"always":return!0;case"desktop":return!i.value;case!0:return a.value||Math.abs(l.value)>0;case"mobile":return i.value||a.value||Math.abs(l.value)>0;default:return!i.value&&(a.value||Math.abs(l.value)>0)}}),Y=T(()=>Math.abs(l.value)>1),X=T(()=>{if(!f.value)return!1;const J=Y1(d.value,f.el),N=sW(d.value,f.el);return J-N-Math.abs(l.value)>1});return Ie(()=>h(e.tag,{class:["v-slide-group",{"v-slide-group--vertical":!d.value,"v-slide-group--has-affixes":W.value,"v-slide-group--is-overflowing":a.value},s.value,e.class],style:e.style,tabindex:P.value||o.selected.value.length?-1:0,onFocus:A},{default:()=>{var J,N,K;return[W.value&&h("div",{key:"prev",class:["v-slide-group__prev",{"v-slide-group__prev--disabled":!Y.value}],onMousedown:O,onClick:()=>Y.value&&H("prev")},[((J=n.prev)==null?void 0:J.call(n,G.value))??h(Z_,null,{default:()=>[h(Q,{icon:r.value?e.nextIcon:e.prevIcon},null)]})]),h("div",{key:"container",ref:f,class:"v-slide-group__container",onScroll:R},[h("div",{ref:v,class:"v-slide-group__content",onFocusin:k,onFocusout:E,onKeydown:L},[(N=n.default)==null?void 0:N.call(n,G.value)])]),W.value&&h("div",{key:"next",class:["v-slide-group__next",{"v-slide-group__next--disabled":!X.value}],onMousedown:O,onClick:()=>X.value&&H("next")},[((K=n.next)==null?void 0:K.call(n,G.value))??h(Z_,null,{default:()=>[h(Q,{icon:r.value?e.prevIcon:e.nextIcon},null)]})])]}})),{selected:o.selected,scrollTo:H,scrollOffset:l,focus:z,hasPrev:Y,hasNext:X}}}),uA=Symbol.for("vuetify:v-chip-group"),oW=ce({column:Boolean,filter:Boolean,valueComparator:{type:Function,default:Rs},...lA(),...Ve(),...Cd({selectedClass:"v-chip--selected"}),...vt(),...$t(),...Fs({variant:"tonal"})},"VChipGroup"),np=_e()({name:"VChipGroup",props:oW(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:r}=Yt(e),{isSelected:s,select:i,next:o,prev:a,selected:l}=Pu(e,uA);return Ir({VChip:{color:Re(e,"color"),disabled:Re(e,"disabled"),filter:Re(e,"filter"),variant:Re(e,"variant")}}),Ie(()=>{const u=X1.filterProps(e);return h(X1,me(u,{class:["v-chip-group",{"v-chip-group--column":e.column},r.value,e.class],style:e.style}),{default:()=>{var c;return[(c=n.default)==null?void 0:c.call(n,{isSelected:s,select:i,next:o,prev:a,selected:l.value})]}})}),{}}}),aW=ce({activeClass:String,appendAvatar:String,appendIcon:ze,closable:Boolean,closeIcon:{type:ze,default:"$delete"},closeLabel:{type:String,default:"$vuetify.close"},draggable:Boolean,filter:Boolean,filterIcon:{type:ze,default:"$complete"},label:Boolean,link:{type:Boolean,default:void 0},pill:Boolean,prependAvatar:String,prependIcon:ze,ripple:{type:[Boolean,Object],default:!0},text:{type:[String,Number,Boolean],default:void 0},modelValue:{type:Boolean,default:!0},onClick:Nn(),onClickOnce:Nn(),...ms(),...Ve(),...Ar(),...vs(),...Pd(),...$n(),...zp(),...Tu(),...vt({tag:"span"}),...$t(),...Fs({variant:"tonal"})},"VChip"),_n=_e()({name:"VChip",directives:{Ripple:Au},props:aW(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0,"group:selected":e=>!0,click:e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{t:i}=Kr(),{borderClasses:o}=Ds(e),{colorClasses:a,colorStyles:l,variantClasses:u}=tl(e),{densityClasses:c}=gs(e),{elevationClasses:d}=$s(e),{roundedClasses:f}=Vn(e),{sizeClasses:p}=Rd(e),{themeClasses:v}=Yt(e),m=st(e,"modelValue"),y=Td(e,uA,!1),b=Up(e,n),w=T(()=>e.link!==!1&&b.isLink.value),x=T(()=>!e.disabled&&e.link!==!1&&(!!y||e.link||b.isClickable.value)),P=T(()=>({"aria-label":i(e.closeLabel),onClick(R){R.preventDefault(),R.stopPropagation(),m.value=!1,r("click:close",R)}}));function S(R){var k;r("click",R),x.value&&((k=b.navigate)==null||k.call(b,R),y==null||y.toggle())}function C(R){(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),S(R))}return()=>{var z;const R=b.isLink.value?"a":e.tag,k=!!(e.appendIcon||e.appendAvatar),E=!!(k||s.append),I=!!(s.close||e.closable),A=!!(s.filter||e.filter)&&y,O=!!(e.prependIcon||e.prependAvatar),L=!!(O||s.prepend),M=!y||y.isSelected.value;return m.value&&Bt(h(R,me({class:["v-chip",{"v-chip--disabled":e.disabled,"v-chip--label":e.label,"v-chip--link":x.value,"v-chip--filter":A,"v-chip--pill":e.pill,[`${e.activeClass}`]:e.activeClass&&((z=b.isActive)==null?void 0:z.value)},v.value,o.value,M?a.value:void 0,c.value,d.value,f.value,p.value,u.value,y==null?void 0:y.selectedClass.value,e.class],style:[M?l.value:void 0,e.style],disabled:e.disabled||void 0,draggable:e.draggable,tabindex:x.value?0:void 0,onClick:S,onKeydown:x.value&&!w.value&&C},b.linkProps),{default:()=>{var H;return[Go(x.value,"v-chip"),A&&h(tT,{key:"filter"},{default:()=>[Bt(h("div",{class:"v-chip__filter"},[s.filter?h(Ot,{key:"filter-defaults",disabled:!e.filterIcon,defaults:{VIcon:{icon:e.filterIcon}}},s.filter):h(Q,{key:"filter-icon",icon:e.filterIcon},null)]),[[Xi,y.isSelected.value]])]}),L&&h("div",{key:"prepend",class:"v-chip__prepend"},[s.prepend?h(Ot,{key:"prepend-defaults",disabled:!O,defaults:{VAvatar:{image:e.prependAvatar,start:!0},VIcon:{icon:e.prependIcon,start:!0}}},s.prepend):h(Pe,null,[e.prependIcon&&h(Q,{key:"prepend-icon",icon:e.prependIcon,start:!0},null),e.prependAvatar&&h(lt,{key:"prepend-avatar",image:e.prependAvatar,start:!0},null)])]),h("div",{class:"v-chip__content","data-no-activator":""},[((H=s.default)==null?void 0:H.call(s,{isSelected:y==null?void 0:y.isSelected.value,selectedClass:y==null?void 0:y.selectedClass.value,select:y==null?void 0:y.select,toggle:y==null?void 0:y.toggle,value:y==null?void 0:y.value.value,disabled:e.disabled}))??re(e.text)]),E&&h("div",{key:"append",class:"v-chip__append"},[s.append?h(Ot,{key:"append-defaults",disabled:!k,defaults:{VAvatar:{end:!0,image:e.appendAvatar},VIcon:{end:!0,icon:e.appendIcon}}},s.append):h(Pe,null,[e.appendIcon&&h(Q,{key:"append-icon",end:!0,icon:e.appendIcon},null),e.appendAvatar&&h(lt,{key:"append-avatar",end:!0,image:e.appendAvatar},null)])]),I&&h("button",me({key:"close",class:"v-chip__close",type:"button","data-testid":"close-chip"},P.value),[s.close?h(Ot,{key:"close-defaults",defaults:{VIcon:{icon:e.closeIcon,size:"x-small"}}},s.close):h(Q,{key:"close-icon",icon:e.closeIcon,size:"x-small"},null)])]}}),[[hr("ripple"),x.value&&e.ripple,null]])}}}),lW=ce({fluid:{type:Boolean,default:!1},...Ve(),...Or(),...vt()},"VContainer"),Bn=_e()({name:"VContainer",props:lW(),setup(e,t){let{slots:n}=t;const{rtlClasses:r}=Dr(),{dimensionStyles:s}=Mr(e);return Ie(()=>h(e.tag,{class:["v-container",{"v-container--fluid":e.fluid},r.value,e.class],style:[s.value,e.style]},n)),{}}}),cA=Hp.reduce((e,t)=>(e[t]={type:[Boolean,String,Number],default:!1},e),{}),dA=Hp.reduce((e,t)=>{const n="offset"+fi(t);return e[n]={type:[String,Number],default:null},e},{}),fA=Hp.reduce((e,t)=>{const n="order"+fi(t);return e[n]={type:[String,Number],default:null},e},{}),Q1={col:Object.keys(cA),offset:Object.keys(dA),order:Object.keys(fA)};function uW(e,t,n){let r=e;if(!(n==null||n===!1)){if(t){const s=t.replace(e,"");r+=`-${s}`}return e==="col"&&(r="v-"+r),e==="col"&&(n===""||n===!0)||(r+=`-${n}`),r.toLowerCase()}}const cW=["auto","start","end","center","baseline","stretch"],dW=ce({cols:{type:[Boolean,String,Number],default:!1},...cA,offset:{type:[String,Number],default:null},...dA,order:{type:[String,Number],default:null},...fA,alignSelf:{type:String,default:null,validator:e=>cW.includes(e)},...Ve(),...vt()},"VCol"),Ue=_e()({name:"VCol",props:dW(),setup(e,t){let{slots:n}=t;const r=T(()=>{const s=[];let i;for(i in Q1)Q1[i].forEach(a=>{const l=e[a],u=uW(i,a,l);u&&s.push(u)});const o=s.some(a=>a.startsWith("v-col-"));return s.push({"v-col":!o||!e.cols,[`v-col-${e.cols}`]:e.cols,[`offset-${e.offset}`]:e.offset,[`order-${e.order}`]:e.order,[`align-self-${e.alignSelf}`]:e.alignSelf}),s});return()=>{var s;return pr(e.tag,{class:[r.value,e.class],style:e.style},(s=n.default)==null?void 0:s.call(n))}}}),Rw=["start","end","center"],hA=["space-between","space-around","space-evenly"];function Iw(e,t){return Hp.reduce((n,r)=>{const s=e+fi(r);return n[s]=t(),n},{})}const fW=[...Rw,"baseline","stretch"],pA=e=>fW.includes(e),mA=Iw("align",()=>({type:String,default:null,validator:pA})),hW=[...Rw,...hA],gA=e=>hW.includes(e),vA=Iw("justify",()=>({type:String,default:null,validator:gA})),pW=[...Rw,...hA,"stretch"],yA=e=>pW.includes(e),bA=Iw("alignContent",()=>({type:String,default:null,validator:yA})),J1={align:Object.keys(mA),justify:Object.keys(vA),alignContent:Object.keys(bA)},mW={align:"align",justify:"justify",alignContent:"align-content"};function gW(e,t,n){let r=mW[e];if(n!=null){if(t){const s=t.replace(e,"");r+=`-${s}`}return r+=`-${n}`,r.toLowerCase()}}const vW=ce({dense:Boolean,noGutters:Boolean,align:{type:String,default:null,validator:pA},...mA,justify:{type:String,default:null,validator:gA},...vA,alignContent:{type:String,default:null,validator:yA},...bA,...Ve(),...vt()},"VRow"),rt=_e()({name:"VRow",props:vW(),setup(e,t){let{slots:n}=t;const r=T(()=>{const s=[];let i;for(i in J1)J1[i].forEach(o=>{const a=e[o],l=gW(i,o,a);l&&s.push(l)});return s.push({"v-row--no-gutters":e.noGutters,"v-row--dense":e.dense,[`align-${e.align}`]:e.align,[`justify-${e.justify}`]:e.justify,[`align-content-${e.alignContent}`]:e.alignContent}),s});return()=>{var s;return pr(e.tag,{class:["v-row",r.value,e.class],style:e.style},(s=n.default)==null?void 0:s.call(n))}}}),wn=Cu("v-spacer","div","VSpacer"),yW=$e({__name:"PrinterControlDialog",setup(e){const t=tn(nn.PrinterControlDialog),n=Lt(),r=nr(),s=T(()=>{var d;return(d=t.context())==null?void 0:d.printerId}),i=T(()=>{if(s.value)return n.printer(s.value)}),o=V(10),a=T(()=>{var f,p,v,m,y,b,w,x,P,S;const d=r.printerEventsById[s.value];return(v=(p=(f=d==null?void 0:d.current)==null?void 0:f.payload)==null?void 0:p.temps)!=null&&v.length&&((w=(b=(y=(m=d==null?void 0:d.current)==null?void 0:m.payload)==null?void 0:y.temps[0])==null?void 0:b.tool0)!=null&&w.actual)?(S=(P=(x=d==null?void 0:d.current)==null?void 0:x.payload)==null?void 0:P.temps[0])==null?void 0:S.tool0:null}),l=async(d,f,p)=>{await Qt.sendPrinterJogCommand(s.value,{x:d*o.value,y:f*o.value,z:p*o.value})},u=async d=>{await Qt.sendPrinterHomeCommand(s.value,d)},c=()=>{t.closeDialog()};return(d,f)=>{const p=mi;return D(),te(p,{id:Z(t).dialogId,"max-width":"700px",onEscape:f[14]||(f[14]=v=>c())},{default:g(()=>[h(gt,null,{default:g(()=>[h(an,null,{default:g(()=>f[15]||(f[15]=[_(" Printer Controls ")])),_:1}),h(en,null,{default:g(()=>[i.value?(D(),te(Bn,{key:0},{default:g(()=>[h(rt,null,{default:g(()=>[h(Ue,{cols:12},{default:g(()=>{var v;return[_(" Printer: "+re((v=i.value)==null?void 0:v.name)+" ",1),f[16]||(f[16]=$("br",null,null,-1)),h(_n,{color:"primary"},{default:g(()=>{var m,y;return[_(re((m=a.value)==null?void 0:m.actual)+"C / "+re((y=a.value)==null?void 0:y.target)+"C ",1)]}),_:1})]}),_:1})]),_:1}),h(rt,null,{default:g(()=>[h(Ue,{cols:8},{default:g(()=>[f[26]||(f[26]=_(" X/Y ")),f[27]||(f[27]=$("br",null,null,-1)),h(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[0]||(f[0]=v=>l(-1,1,0))},{default:g(()=>[h(Q,null,{default:g(()=>f[17]||(f[17]=[_("north_west")])),_:1})]),_:1}),h(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[1]||(f[1]=v=>l(0,1,0))},{default:g(()=>[h(Q,null,{default:g(()=>f[18]||(f[18]=[_("north")])),_:1})]),_:1}),h(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[2]||(f[2]=v=>l(1,1,0))},{default:g(()=>[h(Q,null,{default:g(()=>f[19]||(f[19]=[_("north_east")])),_:1})]),_:1}),f[28]||(f[28]=$("br",null,null,-1)),h(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[3]||(f[3]=v=>l(-1,0,0))},{default:g(()=>[h(Q,null,{default:g(()=>f[20]||(f[20]=[_("west")])),_:1})]),_:1}),h(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[4]||(f[4]=v=>u(["x","y"]))},{default:g(()=>[h(Q,null,{default:g(()=>f[21]||(f[21]=[_("home")])),_:1})]),_:1}),h(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[5]||(f[5]=v=>l(1,0,0))},{default:g(()=>[h(Q,null,{default:g(()=>f[22]||(f[22]=[_("east")])),_:1})]),_:1}),f[29]||(f[29]=$("br",null,null,-1)),h(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[6]||(f[6]=v=>l(-1,-1,0))},{default:g(()=>[h(Q,null,{default:g(()=>f[23]||(f[23]=[_("south_west")])),_:1})]),_:1}),h(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[7]||(f[7]=v=>l(0,-1,0))},{default:g(()=>[h(Q,null,{default:g(()=>f[24]||(f[24]=[_("south")])),_:1})]),_:1}),h(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[8]||(f[8]=v=>l(1,-1,0))},{default:g(()=>[h(Q,null,{default:g(()=>f[25]||(f[25]=[_("south_east")])),_:1})]),_:1})]),_:1}),h(Ue,{cols:"4"},{default:g(()=>[f[33]||(f[33]=_(" Z ")),f[34]||(f[34]=$("br",null,null,-1)),h(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[9]||(f[9]=v=>l(0,0,1))},{default:g(()=>[h(Q,null,{default:g(()=>f[30]||(f[30]=[_("north")])),_:1})]),_:1}),f[35]||(f[35]=$("br",null,null,-1)),h(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[10]||(f[10]=v=>u(["z"]))},{default:g(()=>[h(Q,null,{default:g(()=>f[31]||(f[31]=[_("home")])),_:1})]),_:1}),f[36]||(f[36]=$("br",null,null,-1)),h(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[11]||(f[11]=v=>l(1,0,1))},{default:g(()=>[h(Q,null,{default:g(()=>f[32]||(f[32]=[_("south")])),_:1})]),_:1})]),_:1})]),_:1}),h(rt,null,{default:g(()=>[h(Ue,{cols:"12"},{default:g(()=>[h(DP,{modelValue:o.value,"onUpdate:modelValue":f[12]||(f[12]=v=>o.value=v)},{default:g(()=>[h(se,{value:.1},{default:g(()=>f[37]||(f[37]=[_(" 0.1 ")])),_:1}),h(se,{value:1},{default:g(()=>f[38]||(f[38]=[_(" 1 ")])),_:1}),h(se,{value:10},{default:g(()=>f[39]||(f[39]=[_(" 10 ")])),_:1}),h(se,{value:100},{default:g(()=>f[40]||(f[40]=[_(" 100 ")])),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})):ue("",!0)]),_:1}),h(Dn,null,{default:g(()=>[h(wn),h(se,{variant:"text",onClick:f[13]||(f[13]=v=>c())},{default:g(()=>f[41]||(f[41]=[_(" Close ")])),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}});class Ml extends vr{static async batchSettingsGet(t){return await this.post("/api/batch/settings/get",{printerIds:t})}static async batchConnectUsb(t){return await this.post("/api/batch/connect/usb",{printerIds:t})}static async batchConnectSocket(t){return await this.post("/api/batch/connect/socket",{printerIds:t})}static async batchToggleEnabled(t,n){return await this.post("/api/batch/toggle-enabled",{printerIds:t,enabled:n})}static async batchGetLastPrintedFiles(t){const n=Me.batchGetLastPrintedFilesRoute;return await this.post(n,{printerIds:t})}static async batchReprintFiles(t){const n=Me.batchReprintFilesRoute;return await this.post(n,{prints:t})}}var fa=(e=>(e[e.PrinterNotAvailable=0]="PrinterNotAvailable",e[e.NoLastPrint=1]="NoLastPrint",e[e.LastPrintReady=2]="LastPrintReady",e))(fa||{});function bW(e){return e.message?`${e.message}
|
|
63
|
-
${e.stack}`:`'${e}'`}const wW=Cu("v-alert-title"),SW=["success","info","warning","error"],_W=ce({border:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["top","end","bottom","start"].includes(e)},borderColor:String,closable:Boolean,closeIcon:{type:ze,default:"$close"},closeLabel:{type:String,default:"$vuetify.close"},icon:{type:[Boolean,String,Function,Object],default:null},modelValue:{type:Boolean,default:!0},prominent:Boolean,title:String,text:String,type:{type:String,validator:e=>SW.includes(e)},...Ve(),...Ar(),...Or(),...vs(),...Ko(),...Ru(),...$n(),...vt(),...$t(),...Fs({variant:"flat"})},"VAlert"),rn=_e()({name:"VAlert",props:_W(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{emit:n,slots:r}=t;const s=st(e,"modelValue"),i=T(()=>{if(e.icon!==!1)return e.type?e.icon??`$${e.type}`:e.icon}),o=T(()=>({color:e.color??e.type,variant:e.variant})),{themeClasses:a}=Yt(e),{colorClasses:l,colorStyles:u,variantClasses:c}=tl(o),{densityClasses:d}=gs(e),{dimensionStyles:f}=Mr(e),{elevationClasses:p}=$s(e),{locationStyles:v}=nl(e),{positionClasses:m}=Iu(e),{roundedClasses:y}=Vn(e),{textColorClasses:b,textColorStyles:w}=As(Re(e,"borderColor")),{t:x}=Kr(),P=T(()=>({"aria-label":x(e.closeLabel),onClick(S){s.value=!1,n("click:close",S)}}));return()=>{const S=!!(r.prepend||i.value),C=!!(r.title||e.title),R=!!(r.close||e.closable);return s.value&&h(e.tag,{class:["v-alert",e.border&&{"v-alert--border":!!e.border,[`v-alert--border-${e.border===!0?"start":e.border}`]:!0},{"v-alert--prominent":e.prominent},a.value,l.value,d.value,p.value,m.value,y.value,c.value,e.class],style:[u.value,f.value,v.value,e.style],role:"alert"},{default:()=>{var k,E;return[Go(!1,"v-alert"),e.border&&h("div",{key:"border",class:["v-alert__border",b.value],style:w.value},null),S&&h("div",{key:"prepend",class:"v-alert__prepend"},[r.prepend?h(Ot,{key:"prepend-defaults",disabled:!i.value,defaults:{VIcon:{density:e.density,icon:i.value,size:e.prominent?44:28}}},r.prepend):h(Q,{key:"prepend-icon",density:e.density,icon:i.value,size:e.prominent?44:28},null)]),h("div",{class:"v-alert__content"},[C&&h(wW,{key:"title"},{default:()=>{var I;return[((I=r.title)==null?void 0:I.call(r))??e.title]}}),((k=r.text)==null?void 0:k.call(r))??e.text,(E=r.default)==null?void 0:E.call(r)]),r.append&&h("div",{key:"append",class:"v-alert__append"},[r.append()]),R&&h("div",{key:"close",class:"v-alert__close"},[r.close?h(Ot,{key:"close-defaults",defaults:{VBtn:{icon:e.closeIcon,size:"x-small",variant:"text"}}},{default:()=>{var I;return[(I=r.close)==null?void 0:I.call(r,{props:P.value})]}}):h(se,me({key:"close-btn",icon:e.closeIcon,size:"x-small",variant:"text"},P.value),null)])]}})}}}),_y=Symbol.for("vuetify:list");function wA(){const e=Xe(_y,{hasPrepend:Ae(!1),updateHasPrepend:()=>null}),t={hasPrepend:Ae(!1),updateHasPrepend:n=>{n&&(t.hasPrepend.value=n)}};return Gt(_y,t),e}function SA(){return Xe(_y,null)}const Aw=e=>{const t={activate:n=>{let{id:r,value:s,activated:i}=n;return r=Ne(r),e&&!s&&i.size===1&&i.has(r)||(s?i.add(r):i.delete(r)),i},in:(n,r,s)=>{let i=new Set;if(n!=null)for(const o of On(n))i=t.activate({id:o,value:!0,activated:new Set(i),children:r,parents:s});return i},out:n=>Array.from(n)};return t},_A=e=>{const t=Aw(e);return{activate:r=>{let{activated:s,id:i,...o}=r;i=Ne(i);const a=s.has(i)?new Set([i]):new Set;return t.activate({...o,id:i,activated:a})},in:(r,s,i)=>{let o=new Set;if(r!=null){const a=On(r);a.length&&(o=t.in(a.slice(0,1),s,i))}return o},out:(r,s,i)=>t.out(r,s,i)}},kW=e=>{const t=Aw(e);return{activate:r=>{let{id:s,activated:i,children:o,...a}=r;return s=Ne(s),o.has(s)?i:t.activate({id:s,activated:i,children:o,...a})},in:t.in,out:t.out}},xW=e=>{const t=_A(e);return{activate:r=>{let{id:s,activated:i,children:o,...a}=r;return s=Ne(s),o.has(s)?i:t.activate({id:s,activated:i,children:o,...a})},in:t.in,out:t.out}},EW={open:e=>{let{id:t,value:n,opened:r,parents:s}=e;if(n){const i=new Set;i.add(t);let o=s.get(t);for(;o!=null;)i.add(o),o=s.get(o);return i}else return r.delete(t),r},select:()=>null},kA={open:e=>{let{id:t,value:n,opened:r,parents:s}=e;if(n){let i=s.get(t);for(r.add(t);i!=null&&i!==t;)r.add(i),i=s.get(i);return r}else r.delete(t);return r},select:()=>null},CW={open:kA.open,select:e=>{let{id:t,value:n,opened:r,parents:s}=e;if(!n)return r;const i=[];let o=s.get(t);for(;o!=null;)i.push(o),o=s.get(o);return new Set(i)}},Ow=e=>{const t={select:n=>{let{id:r,value:s,selected:i}=n;if(r=Ne(r),e&&!s){const o=Array.from(i.entries()).reduce((a,l)=>{let[u,c]=l;return c==="on"&&a.push(u),a},[]);if(o.length===1&&o[0]===r)return i}return i.set(r,s?"on":"off"),i},in:(n,r,s)=>{const i=new Map;for(const o of n||[])t.select({id:o,value:!0,selected:i,children:r,parents:s});return i},out:n=>{const r=[];for(const[s,i]of n.entries())i==="on"&&r.push(s);return r}};return t},xA=e=>{const t=Ow(e);return{select:r=>{let{selected:s,id:i,...o}=r;i=Ne(i);const a=s.has(i)?new Map([[i,s.get(i)]]):new Map;return t.select({...o,id:i,selected:a})},in:(r,s,i)=>r!=null&&r.length?t.in(r.slice(0,1),s,i):new Map,out:(r,s,i)=>t.out(r,s,i)}},PW=e=>{const t=Ow(e);return{select:r=>{let{id:s,selected:i,children:o,...a}=r;return s=Ne(s),o.has(s)?i:t.select({id:s,selected:i,children:o,...a})},in:t.in,out:t.out}},TW=e=>{const t=xA(e);return{select:r=>{let{id:s,selected:i,children:o,...a}=r;return s=Ne(s),o.has(s)?i:t.select({id:s,selected:i,children:o,...a})},in:t.in,out:t.out}},RW=e=>{const t={select:n=>{let{id:r,value:s,selected:i,children:o,parents:a}=n;r=Ne(r);const l=new Map(i),u=[r];for(;u.length;){const d=u.shift();i.set(Ne(d),s?"on":"off"),o.has(d)&&u.push(...o.get(d))}let c=Ne(a.get(r));for(;c;){const d=o.get(c),f=d.every(v=>i.get(Ne(v))==="on"),p=d.every(v=>!i.has(Ne(v))||i.get(Ne(v))==="off");i.set(c,f?"on":p?"off":"indeterminate"),c=Ne(a.get(c))}return e&&!s&&Array.from(i.entries()).reduce((f,p)=>{let[v,m]=p;return m==="on"&&f.push(v),f},[]).length===0?l:i},in:(n,r,s)=>{let i=new Map;for(const o of n||[])i=t.select({id:o,value:!0,selected:i,children:r,parents:s});return i},out:(n,r)=>{const s=[];for(const[i,o]of n.entries())o==="on"&&!r.has(i)&&s.push(i);return s}};return t},od=Symbol.for("vuetify:nested"),EA={id:Ae(),root:{register:()=>null,unregister:()=>null,parents:V(new Map),children:V(new Map),open:()=>null,openOnSelect:()=>null,activate:()=>null,select:()=>null,activatable:V(!1),selectable:V(!1),opened:V(new Set),activated:V(new Set),selected:V(new Map),selectedValues:V([]),getPath:()=>[]}},IW=ce({activatable:Boolean,selectable:Boolean,activeStrategy:[String,Function,Object],selectStrategy:[String,Function,Object],openStrategy:[String,Object],opened:null,activated:null,selected:null,mandatory:Boolean},"nested"),AW=e=>{let t=!1;const n=V(new Map),r=V(new Map),s=st(e,"opened",e.opened,v=>new Set(v),v=>[...v.values()]),i=T(()=>{if(typeof e.activeStrategy=="object")return e.activeStrategy;if(typeof e.activeStrategy=="function")return e.activeStrategy(e.mandatory);switch(e.activeStrategy){case"leaf":return kW(e.mandatory);case"single-leaf":return xW(e.mandatory);case"independent":return Aw(e.mandatory);case"single-independent":default:return _A(e.mandatory)}}),o=T(()=>{if(typeof e.selectStrategy=="object")return e.selectStrategy;if(typeof e.selectStrategy=="function")return e.selectStrategy(e.mandatory);switch(e.selectStrategy){case"single-leaf":return TW(e.mandatory);case"leaf":return PW(e.mandatory);case"independent":return Ow(e.mandatory);case"single-independent":return xA(e.mandatory);case"classic":default:return RW(e.mandatory)}}),a=T(()=>{if(typeof e.openStrategy=="object")return e.openStrategy;switch(e.openStrategy){case"list":return CW;case"single":return EW;case"multiple":default:return kA}}),l=st(e,"activated",e.activated,v=>i.value.in(v,n.value,r.value),v=>i.value.out(v,n.value,r.value)),u=st(e,"selected",e.selected,v=>o.value.in(v,n.value,r.value),v=>o.value.out(v,n.value,r.value));Cn(()=>{t=!0});function c(v){const m=[];let y=v;for(;y!=null;)m.unshift(y),y=r.value.get(y);return m}const d=on("nested"),f=new Set,p={id:Ae(),root:{opened:s,activatable:Re(e,"activatable"),selectable:Re(e,"selectable"),activated:l,selected:u,selectedValues:T(()=>{const v=[];for(const[m,y]of u.value.entries())y==="on"&&v.push(m);return v}),register:(v,m,y)=>{if(f.has(v)){c(v).map(String).join(" -> "),c(m).concat(v).map(String).join(" -> ");return}else f.add(v);m&&v!==m&&r.value.set(v,m),y&&n.value.set(v,[]),m!=null&&n.value.set(m,[...n.value.get(m)||[],v])},unregister:v=>{if(t)return;f.delete(v),n.value.delete(v);const m=r.value.get(v);if(m){const y=n.value.get(m)??[];n.value.set(m,y.filter(b=>b!==v))}r.value.delete(v)},open:(v,m,y)=>{d.emit("click:open",{id:v,value:m,path:c(v),event:y});const b=a.value.open({id:v,value:m,opened:new Set(s.value),children:n.value,parents:r.value,event:y});b&&(s.value=b)},openOnSelect:(v,m,y)=>{const b=a.value.select({id:v,value:m,selected:new Map(u.value),opened:new Set(s.value),children:n.value,parents:r.value,event:y});b&&(s.value=b)},select:(v,m,y)=>{d.emit("click:select",{id:v,value:m,path:c(v),event:y});const b=o.value.select({id:v,value:m,selected:new Map(u.value),children:n.value,parents:r.value,event:y});b&&(u.value=b),p.root.openOnSelect(v,m,y)},activate:(v,m,y)=>{if(!e.activatable)return p.root.select(v,!0,y);d.emit("click:activate",{id:v,value:m,path:c(v),event:y});const b=i.value.activate({id:v,value:m,activated:new Set(l.value),children:n.value,parents:r.value,event:y});if(b.size!==l.value.size)l.value=b;else{for(const w of b)if(!l.value.has(w)){l.value=b;return}for(const w of l.value)if(!b.has(w)){l.value=b;return}}},children:n,parents:r,getPath:c}};return Gt(od,p),p.root},CA=(e,t)=>{const n=Xe(od,EA),r=Symbol(gr()),s=T(()=>e.value!==void 0?e.value:r),i={...n,id:s,open:(o,a)=>n.root.open(s.value,o,a),openOnSelect:(o,a)=>n.root.openOnSelect(s.value,o,a),isOpen:T(()=>n.root.opened.value.has(s.value)),parent:T(()=>n.root.parents.value.get(s.value)),activate:(o,a)=>n.root.activate(s.value,o,a),isActivated:T(()=>n.root.activated.value.has(Ne(s.value))),select:(o,a)=>n.root.select(s.value,o,a),isSelected:T(()=>n.root.selected.value.get(Ne(s.value))==="on"),isIndeterminate:T(()=>n.root.selected.value.get(Ne(s.value))==="indeterminate"),isLeaf:T(()=>!n.root.children.value.get(s.value)),isGroupActivator:n.isGroupActivator};return ku(()=>{!n.isGroupActivator&&n.root.register(s.value,n.id.value,t)}),Cn(()=>{!n.isGroupActivator&&n.root.unregister(s.value)}),t&&Gt(od,i),i},OW=()=>{const e=Xe(od,EA);Gt(od,{...e,isGroupActivator:!0})};function jd(){const e=Ae(!1);return wt(()=>{window.requestAnimationFrame(()=>{e.value=!0})}),{ssrBootStyles:T(()=>e.value?void 0:{transition:"none !important"}),isBooted:Sd(e)}}const MW=Eu({name:"VListGroupActivator",setup(e,t){let{slots:n}=t;return OW(),()=>{var r;return(r=n.default)==null?void 0:r.call(n)}}}),DW=ce({activeColor:String,baseColor:String,color:String,collapseIcon:{type:ze,default:"$collapse"},expandIcon:{type:ze,default:"$expand"},prependIcon:ze,appendIcon:ze,fluid:Boolean,subgroup:Boolean,title:String,value:null,...Ve(),...vt()},"VListGroup"),ky=_e()({name:"VListGroup",props:DW(),setup(e,t){let{slots:n}=t;const{isOpen:r,open:s,id:i}=CA(Re(e,"value"),!0),o=T(()=>`v-list-group--id-${String(i.value)}`),a=SA(),{isBooted:l}=jd();function u(p){p.stopPropagation(),s(!r.value,p)}const c=T(()=>({onClick:u,class:"v-list-group__header",id:o.value})),d=T(()=>r.value?e.collapseIcon:e.expandIcon),f=T(()=>({VListItem:{active:r.value,activeColor:e.activeColor,baseColor:e.baseColor,color:e.color,prependIcon:e.prependIcon||e.subgroup&&d.value,appendIcon:e.appendIcon||!e.subgroup&&d.value,title:e.title,value:e.value}}));return Ie(()=>h(e.tag,{class:["v-list-group",{"v-list-group--prepend":a==null?void 0:a.hasPrepend.value,"v-list-group--fluid":e.fluid,"v-list-group--subgroup":e.subgroup,"v-list-group--open":r.value},e.class],style:e.style},{default:()=>[n.activator&&h(Ot,{defaults:f.value},{default:()=>[h(MW,null,{default:()=>[n.activator({props:c.value,isOpen:r.value})]})]}),h(ii,{transition:{component:eT},disabled:!l.value},{default:()=>{var p;return[Bt(h("div",{class:"v-list-group__items",role:"group","aria-labelledby":o.value},[(p=n.default)==null?void 0:p.call(n)]),[[Xi,r.value]])]}})]})),{isOpen:r}}}),$W=ce({opacity:[Number,String],...Ve(),...vt()},"VListItemSubtitle"),yt=_e()({name:"VListItemSubtitle",props:$W(),setup(e,t){let{slots:n}=t;return Ie(()=>h(e.tag,{class:["v-list-item-subtitle",e.class],style:[{"--v-list-item-subtitle-opacity":e.opacity},e.style]},n)),{}}}),dt=Cu("v-list-item-title"),FW=ce({active:{type:Boolean,default:void 0},activeClass:String,activeColor:String,appendAvatar:String,appendIcon:ze,baseColor:String,disabled:Boolean,lines:[Boolean,String],link:{type:Boolean,default:void 0},nav:Boolean,prependAvatar:String,prependIcon:ze,ripple:{type:[Boolean,Object],default:!0},slim:Boolean,subtitle:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},value:null,onClick:Nn(),onClickOnce:Nn(),...ms(),...Ve(),...Ar(),...Or(),...vs(),...$n(),...zp(),...vt(),...$t(),...Fs({variant:"text"})},"VListItem"),Be=_e()({name:"VListItem",directives:{Ripple:Au},props:FW(),emits:{click:e=>!0},setup(e,t){let{attrs:n,slots:r,emit:s}=t;const i=Up(e,n),o=T(()=>e.value===void 0?i.href.value:e.value),{activate:a,isActivated:l,select:u,isOpen:c,isSelected:d,isIndeterminate:f,isGroupActivator:p,root:v,parent:m,openOnSelect:y,id:b}=CA(o,!1),w=SA(),x=T(()=>{var he;return e.active!==!1&&(e.active||((he=i.isActive)==null?void 0:he.value)||(v.activatable.value?l.value:d.value))}),P=T(()=>e.link!==!1&&i.isLink.value),S=T(()=>!!w&&(v.selectable.value||v.activatable.value||e.value!=null)),C=T(()=>!e.disabled&&e.link!==!1&&(e.link||i.isClickable.value||S.value)),R=T(()=>e.rounded||e.nav),k=T(()=>e.color??e.activeColor),E=T(()=>({color:x.value?k.value??e.baseColor:e.baseColor,variant:e.variant}));ke(()=>{var he;return(he=i.isActive)==null?void 0:he.value},he=>{he&&I()}),ku(()=>{var he;(he=i.isActive)!=null&&he.value&&I()});function I(){m.value!=null&&v.open(m.value,!0),y(!0)}const{themeClasses:A}=Yt(e),{borderClasses:O}=Ds(e),{colorClasses:L,colorStyles:M,variantClasses:z}=tl(E),{densityClasses:H}=gs(e),{dimensionStyles:G}=Mr(e),{elevationClasses:W}=$s(e),{roundedClasses:Y}=Vn(R),X=T(()=>e.lines?`v-list-item--${e.lines}-line`:void 0),J=T(()=>({isActive:x.value,select:u,isOpen:c.value,isSelected:d.value,isIndeterminate:f.value}));function N(he){var oe;s("click",he),C.value&&((oe=i.navigate)==null||oe.call(i,he),!p&&(v.activatable.value?a(!l.value,he):(v.selectable.value||e.value!=null)&&u(!d.value,he)))}function K(he){const oe=he.target;["INPUT","TEXTAREA"].includes(oe.tagName)||(he.key==="Enter"||he.key===" ")&&(he.preventDefault(),he.target.dispatchEvent(new MouseEvent("click",he)))}return Ie(()=>{const he=P.value?"a":e.tag,oe=r.title||e.title!=null,we=r.subtitle||e.subtitle!=null,ee=!!(e.appendAvatar||e.appendIcon),de=!!(ee||r.append),ne=!!(e.prependAvatar||e.prependIcon),U=!!(ne||r.prepend);return w==null||w.updateHasPrepend(U),e.activeColor&&AL("active-color",["color","base-color"]),Bt(h(he,me({class:["v-list-item",{"v-list-item--active":x.value,"v-list-item--disabled":e.disabled,"v-list-item--link":C.value,"v-list-item--nav":e.nav,"v-list-item--prepend":!U&&(w==null?void 0:w.hasPrepend.value),"v-list-item--slim":e.slim,[`${e.activeClass}`]:e.activeClass&&x.value},A.value,O.value,L.value,H.value,W.value,X.value,Y.value,z.value,e.class],style:[M.value,G.value,e.style],tabindex:C.value?w?-2:0:void 0,"aria-selected":S.value?v.activatable.value?l.value:v.selectable.value?d.value:x.value:void 0,onClick:N,onKeydown:C.value&&!P.value&&K},i.linkProps),{default:()=>{var De;return[Go(C.value||x.value,"v-list-item"),U&&h("div",{key:"prepend",class:"v-list-item__prepend"},[r.prepend?h(Ot,{key:"prepend-defaults",disabled:!ne,defaults:{VAvatar:{density:e.density,image:e.prependAvatar},VIcon:{density:e.density,icon:e.prependIcon},VListItemAction:{start:!0}}},{default:()=>{var He;return[(He=r.prepend)==null?void 0:He.call(r,J.value)]}}):h(Pe,null,[e.prependAvatar&&h(lt,{key:"prepend-avatar",density:e.density,image:e.prependAvatar},null),e.prependIcon&&h(Q,{key:"prepend-icon",density:e.density,icon:e.prependIcon},null)]),h("div",{class:"v-list-item__spacer"},null)]),h("div",{class:"v-list-item__content","data-no-activator":""},[oe&&h(dt,{key:"title"},{default:()=>{var He;return[((He=r.title)==null?void 0:He.call(r,{title:e.title}))??re(e.title)]}}),we&&h(yt,{key:"subtitle"},{default:()=>{var He;return[((He=r.subtitle)==null?void 0:He.call(r,{subtitle:e.subtitle}))??re(e.subtitle)]}}),(De=r.default)==null?void 0:De.call(r,J.value)]),de&&h("div",{key:"append",class:"v-list-item__append"},[r.append?h(Ot,{key:"append-defaults",disabled:!ee,defaults:{VAvatar:{density:e.density,image:e.appendAvatar},VIcon:{density:e.density,icon:e.appendIcon},VListItemAction:{end:!0}}},{default:()=>{var He;return[(He=r.append)==null?void 0:He.call(r,J.value)]}}):h(Pe,null,[e.appendIcon&&h(Q,{key:"append-icon",density:e.density,icon:e.appendIcon},null),e.appendAvatar&&h(lt,{key:"append-avatar",density:e.density,image:e.appendAvatar},null)]),h("div",{class:"v-list-item__spacer"},null)])]}}),[[hr("ripple"),C.value&&e.ripple]])}),{activate:a,isActivated:l,isGroupActivator:p,isSelected:d,list:w,select:u,root:v,id:b,link:i}}}),LW=ce({color:String,inset:Boolean,sticky:Boolean,title:String,...Ve(),...vt()},"VListSubheader"),Wr=_e()({name:"VListSubheader",props:LW(),setup(e,t){let{slots:n}=t;const{textColorClasses:r,textColorStyles:s}=As(Re(e,"color"));return Ie(()=>{const i=!!(n.default||e.title);return h(e.tag,{class:["v-list-subheader",{"v-list-subheader--inset":e.inset,"v-list-subheader--sticky":e.sticky},r.value,e.class],style:[{textColorStyles:s},e.style]},{default:()=>{var o;return[i&&h("div",{class:"v-list-subheader__text"},[((o=n.default)==null?void 0:o.call(n))??e.title])]}})}),{}}}),NW=ce({color:String,inset:Boolean,length:[Number,String],opacity:[Number,String],thickness:[Number,String],vertical:Boolean,...Ve(),...$t()},"VDivider"),dn=_e()({name:"VDivider",props:NW(),setup(e,t){let{attrs:n,slots:r}=t;const{themeClasses:s}=Yt(e),{textColorClasses:i,textColorStyles:o}=As(Re(e,"color")),a=T(()=>{const l={};return e.length&&(l[e.vertical?"height":"width"]=Le(e.length)),e.thickness&&(l[e.vertical?"borderRightWidth":"borderTopWidth"]=Le(e.thickness)),l});return Ie(()=>{const l=h("hr",{class:[{"v-divider":!0,"v-divider--inset":e.inset,"v-divider--vertical":e.vertical},s.value,i.value,e.class],style:[a.value,o.value,{"--v-border-opacity":e.opacity},e.style],"aria-orientation":!n.role||n.role==="separator"?e.vertical?"vertical":"horizontal":void 0,role:`${n.role||"separator"}`},null);return r.default?h("div",{class:["v-divider__wrapper",{"v-divider__wrapper--vertical":e.vertical,"v-divider__wrapper--inset":e.inset}]},[l,h("div",{class:"v-divider__content"},[r.default()]),l]):l}),{}}}),BW=ce({items:Array,returnObject:Boolean},"VListChildren"),PA=_e()({name:"VListChildren",props:BW(),setup(e,t){let{slots:n}=t;return wA(),()=>{var r,s;return((r=n.default)==null?void 0:r.call(n))??((s=e.items)==null?void 0:s.map(i=>{var f,p;let{children:o,props:a,type:l,raw:u}=i;if(l==="divider")return((f=n.divider)==null?void 0:f.call(n,{props:a}))??h(dn,a,null);if(l==="subheader")return((p=n.subheader)==null?void 0:p.call(n,{props:a}))??h(Wr,a,null);const c={subtitle:n.subtitle?v=>{var m;return(m=n.subtitle)==null?void 0:m.call(n,{...v,item:u})}:void 0,prepend:n.prepend?v=>{var m;return(m=n.prepend)==null?void 0:m.call(n,{...v,item:u})}:void 0,append:n.append?v=>{var m;return(m=n.append)==null?void 0:m.call(n,{...v,item:u})}:void 0,title:n.title?v=>{var m;return(m=n.title)==null?void 0:m.call(n,{...v,item:u})}:void 0},d=ky.filterProps(a);return o?h(ky,me({value:a==null?void 0:a.value},d),{activator:v=>{let{props:m}=v;const y={...a,...m,value:e.returnObject?u:a.value};return n.header?n.header({props:y}):h(Be,y,c)},default:()=>h(PA,{items:o,returnObject:e.returnObject},n)}):n.item?n.item({props:a}):h(Be,me(a,{value:e.returnObject?u:a.value}),c)}))}}}),TA=ce({items:{type:Array,default:()=>[]},itemTitle:{type:[String,Array,Function],default:"title"},itemValue:{type:[String,Array,Function],default:"value"},itemChildren:{type:[Boolean,String,Array,Function],default:"children"},itemProps:{type:[Boolean,String,Array,Function],default:"props"},returnObject:Boolean,valueComparator:Function},"list-items");function xy(e,t){const n=Xn(t,e.itemTitle,t),r=Xn(t,e.itemValue,n),s=Xn(t,e.itemChildren),i=e.itemProps===!0?typeof t=="object"&&t!=null&&!Array.isArray(t)?"children"in t?Ms(t,["children"]):t:void 0:Xn(t,e.itemProps),o={title:n,value:r,...i};return{title:String(o.title??""),value:o.value,props:o,children:Array.isArray(s)?RA(e,s):void 0,raw:t}}function RA(e,t){const n=xu(e,["itemTitle","itemValue","itemChildren","itemProps","returnObject","valueComparator"]),r=[];for(const s of t)r.push(xy(n,s));return r}function VW(e){const t=T(()=>RA(e,e.items)),n=T(()=>t.value.some(a=>a.value===null)),r=Ae(new Map),s=Ae([]);Mn(()=>{const a=t.value,l=new Map,u=[];for(let c=0;c<a.length;c++){const d=a[c];if(wP(d.value)||d.value===null){let f=l.get(d.value);f||(f=[],l.set(d.value,f)),f.push(d)}else u.push(d)}r.value=l,s.value=u});function i(a){const l=r.value,u=t.value,c=s.value,d=n.value,f=e.returnObject,p=!!e.valueComparator,v=e.valueComparator||Rs,m=xu(e,["itemTitle","itemValue","itemChildren","itemProps","returnObject","valueComparator"]),y=[];e:for(const b of a){if(!d&&b===null)continue;if(f&&typeof b=="string"){y.push(xy(m,b));continue}const w=l.get(b);if(p||!w){for(const x of p?u:c)if(v(b,x.value)){y.push(x);continue e}y.push(xy(m,b));continue}y.push(...w)}return y}function o(a){return e.returnObject?a.map(l=>{let{raw:u}=l;return u}):a.map(l=>{let{value:u}=l;return u})}return{items:t,transformIn:i,transformOut:o}}function UW(e,t){const n=Xn(t,e.itemType,"item"),r=wP(t)?t:Xn(t,e.itemTitle),s=Xn(t,e.itemValue,void 0),i=Xn(t,e.itemChildren),o=e.itemProps===!0?Ms(t,["children"]):Xn(t,e.itemProps),a={title:r,value:s,...o};return{type:n,title:a.title,value:a.value,props:a,children:n==="item"&&i?IA(e,i):void 0,raw:t}}function IA(e,t){const n=[];for(const r of t)n.push(UW(e,r));return n}function zW(e){return{items:T(()=>IA(e,e.items))}}const HW=ce({baseColor:String,activeColor:String,activeClass:String,bgColor:String,disabled:Boolean,expandIcon:ze,collapseIcon:ze,lines:{type:[Boolean,String],default:"one"},slim:Boolean,nav:Boolean,"onClick:open":Nn(),"onClick:select":Nn(),"onUpdate:opened":Nn(),...IW({selectStrategy:"single-leaf",openStrategy:"list"}),...ms(),...Ve(),...Ar(),...Or(),...vs(),itemType:{type:String,default:"type"},...TA(),...$n(),...vt(),...$t(),...Fs({variant:"text"})},"VList"),Vt=_e()({name:"VList",props:HW(),emits:{"update:selected":e=>!0,"update:activated":e=>!0,"update:opened":e=>!0,"click:open":e=>!0,"click:activate":e=>!0,"click:select":e=>!0},setup(e,t){let{slots:n}=t;const{items:r}=zW(e),{themeClasses:s}=Yt(e),{backgroundColorClasses:i,backgroundColorStyles:o}=fr(Re(e,"bgColor")),{borderClasses:a}=Ds(e),{densityClasses:l}=gs(e),{dimensionStyles:u}=Mr(e),{elevationClasses:c}=$s(e),{roundedClasses:d}=Vn(e),{children:f,open:p,parents:v,select:m,getPath:y}=AW(e),b=T(()=>e.lines?`v-list--${e.lines}-line`:void 0),w=Re(e,"activeColor"),x=Re(e,"baseColor"),P=Re(e,"color");wA(),Ir({VListGroup:{activeColor:w,baseColor:x,color:P,expandIcon:Re(e,"expandIcon"),collapseIcon:Re(e,"collapseIcon")},VListItem:{activeClass:Re(e,"activeClass"),activeColor:w,baseColor:x,color:P,density:Re(e,"density"),disabled:Re(e,"disabled"),lines:Re(e,"lines"),nav:Re(e,"nav"),slim:Re(e,"slim"),variant:Re(e,"variant")}});const S=Ae(!1),C=V();function R(L){S.value=!0}function k(L){S.value=!1}function E(L){var M;!S.value&&!(L.relatedTarget&&((M=C.value)!=null&&M.contains(L.relatedTarget)))&&O()}function I(L){const M=L.target;if(!(!C.value||["INPUT","TEXTAREA"].includes(M.tagName))){if(L.key==="ArrowDown")O("next");else if(L.key==="ArrowUp")O("prev");else if(L.key==="Home")O("first");else if(L.key==="End")O("last");else return;L.preventDefault()}}function A(L){S.value=!0}function O(L){if(C.value)return Tc(C.value,L)}return Ie(()=>h(e.tag,{ref:C,class:["v-list",{"v-list--disabled":e.disabled,"v-list--nav":e.nav,"v-list--slim":e.slim},s.value,i.value,a.value,l.value,c.value,b.value,d.value,e.class],style:[o.value,u.value,e.style],tabindex:e.disabled?-1:0,role:"listbox","aria-activedescendant":void 0,onFocusin:R,onFocusout:k,onFocus:E,onKeydown:I,onMousedown:A},{default:()=>[h(PA,{items:r.value,returnObject:e.returnObject},n)]})),{open:p,select:m,focus:O,children:f,parents:v,getPath:y}}}),jW=ce({start:Boolean,end:Boolean,...Ve(),...vt()},"VListItemAction"),vu=_e()({name:"VListItemAction",props:jW(),setup(e,t){let{slots:n}=t;return Ie(()=>h(e.tag,{class:["v-list-item-action",{"v-list-item-action--start":e.start,"v-list-item-action--end":e.end},e.class],style:e.style},n)),{}}}),qW=ce({start:Boolean,end:Boolean,...Ve(),...vt()},"VListItemMedia"),WW=_e()({name:"VListItemMedia",props:qW(),setup(e,t){let{slots:n}=t;return Ie(()=>h(e.tag,{class:["v-list-item-media",{"v-list-item-media--start":e.start,"v-list-item-media--end":e.end},e.class],style:e.style},n)),{}}}),GW={key:1},KW={key:2},YW={class:"mt-3"},XW={key:0},QW={key:1},JW={key:2},ZW=$e({__name:"BatchReprintDialog",setup(e){const t=Lt(),n=V(),r=tn(nn.BatchReprintDialog),s=V(!1),i=V(!1),o=V([]),a=V([]),l=V(""),u=Dt();function c(v){s.value=!0}async function d(v){n.value=v;try{const m=await Ml.batchGetLastPrintedFiles(n.value);o.value=m,a.value=m.filter(y=>y.connectionState==="Operational"&&y.reprintState==fa.LastPrintReady)}catch(m){l.value=m.code.toString()??""}s.value=!1}async function f(){i.value=!0;try{await Ml.batchReprintFiles(a.value.filter(v=>{var m;return(m=v.file)==null?void 0:m.path}).map(v=>{var m;return{printerId:v.printerId,path:((m=v.file)==null?void 0:m.path)||""}})),t.clearSelectedPrinters(),u.info("Action completed","Your reprinted jobs are starting",5e3),p()}catch(v){l.value=bW(v)}finally{i.value=!1}}function p(){r.closeDialog(r.context())}return(v,m)=>{const y=mi;return D(),te(y,{id:Z(r).dialogId,"max-width":"1000px",onBeforeOpened:c,onEscape:m[3]||(m[3]=b=>p()),onOpened:d},{default:g(()=>[h(gt,{class:"pa-4"},{default:g(()=>[h(an,null,{default:g(()=>m[4]||(m[4]=[$("span",{class:"text-h5"}," Batch - Submit Reprint Jobs ",-1)])),_:1}),h(en,null,{default:g(()=>{var b;return[(b=l.value)!=null&&b.length?(D(),te(rn,{key:0,color:"error"},{default:g(()=>[_(re(l.value),1)]),_:1})):ue("",!0),s.value?(D(),ge("span",GW," Loading... ")):(D(),ge("div",KW,[h(Vt,{density:"compact"},{default:g(()=>[h(Wr,null,{default:g(()=>m[5]||(m[5]=[_(" Reprinted Files - Select from list ")])),_:1}),h(ky,{modelValue:a.value,"onUpdate:modelValue":m[0]||(m[0]=w=>a.value=w),multiple:""},{default:g(()=>[(D(!0),ge(Pe,null,Wt(o.value,(w,x)=>(D(),te(Be,{key:x,value:w,disabled:w.connectionState!=="Operational"||w.reprintState!==Z(fa).LastPrintReady},{prepend:g(()=>[w.reprintState==Z(fa).LastPrintReady?(D(),te(Q,{key:0},{default:g(()=>m[6]||(m[6]=[_("checklist")])),_:1})):ue("",!0),w.reprintState==Z(fa).NoLastPrint?(D(),te(Q,{key:1},{default:g(()=>m[7]||(m[7]=[_(" question_mark ")])),_:1})):ue("",!0),w.reprintState==Z(fa).PrinterNotAvailable?(D(),te(Q,{key:2},{default:g(()=>m[8]||(m[8]=[_(" signal_disconnected ")])),_:1})):ue("",!0)]),default:g(()=>{var P,S;return[(S=(P=w.file)==null?void 0:P.path)!=null&&S.length?(D(),te(dt,{key:0},{default:g(()=>{var C;return[_(re((C=w.file)==null?void 0:C.path)+" ",1),w.connectionState!=="Operational"?(D(),te(_n,{key:0},{default:g(()=>m[9]||(m[9]=[_(" Printer busy ")])),_:1})):ue("",!0)]}),_:2},1024)):w.reprintState==Z(fa).NoLastPrint?(D(),te(dt,{key:1},{default:g(()=>m[10]||(m[10]=[_(" No file is present to print again ")])),_:1})):(D(),te(dt,{key:2},{default:g(()=>m[11]||(m[11]=[_(" OctoPrint cant be reached ")])),_:1})),h(yt,null,{default:g(()=>{var C;return[_(" Printer '"+re(((C=Z(t).printer(w.printerId))==null?void 0:C.name)??"Unknown printer")+"' ",1)]}),_:2},1024)]}),_:2},1032,["value","disabled"]))),128))]),_:1},8,["modelValue"])]),_:1})])),$("div",YW,[i.value?(D(),ge("div",XW,[h(ri,{class:"ma-3",indeterminate:"",color:"blue"}),m[12]||(m[12]=_(" Submitting "))])):a.value.length>0?(D(),ge("div",QW,re(a.value.length)+" reprint selected ",1)):(D(),ge("div",JW,"Must select at least one file"))]),m[14]||(m[14]=$("br",null,null,-1)),h(se,{disabled:i.value||a.value.length===0,onClick:m[1]||(m[1]=w=>f())},{default:g(()=>m[13]||(m[13]=[_(" Submit Batch Reprint ")])),_:1},8,["disabled"])]}),_:1}),h(Dn,null,{default:g(()=>[h(wn),h(se,{variant:"text",onClick:m[2]||(m[2]=b=>Z(r).closeDialog())},{default:g(()=>m[15]||(m[15]=[_(" Close ")])),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),e6="/img/octoprint-tentacle.svg";function AA(e,t=2){if(e===0)return"0 Bytes";const n=1024,r=t<0?0:t,s=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],i=Math.floor(Math.log(e)/Math.log(n));return parseFloat((e/Math.pow(n,i)).toFixed(r))+" "+s[i]}class xo extends vr{static async updateClientDistGithub(t,n){return await this.post("/api/server/update-client-bundle-github",{downloadRelease:t,allowDowngrade:n})}static async getGithubRateLimit(){return await this.get("/api/server/github-rate-limit")}static async getClientReleases(){return await this.get("/api/server/client-releases")}static async getVersion(){return await this.get("/api/version")}static async getFeatures(){return await this.get("/api/features")}static async test(){return await(await Wn(!1,!1)).get("/api/test")}}const Zi=ps("Feature",{state:()=>({features:void 0}),getters:{getFeatures(){return this.features},getFeature:e=>t=>{if(!e.features){console.debug("Feature store not loaded");return}return e.features[t]},hasFeature:e=>t=>{if(!e.features)return console.debug("Feature store not loaded"),!1;const n=e.features[t];return n?n==null?void 0:n.available:(console.debug(`Feature ${t} not defined. Options:`,Object.keys(e.features)),!1)}},actions:{async loadFeatures(){try{const e=await xo.getFeatures();this.setFeatures(e)}catch{this.features={}}},setFeatures(e){this.features=e}}});function OA(e){return e===0}function MA(e){return e===1}function DA(e){return OA(e)?"OctoPrint":MA(e)?"Moonraker":"Unknown"}function t6(e){let{rootEl:t,isSticky:n,layoutItemStyles:r}=e;const s=Ae(!1),i=Ae(0),o=T(()=>{const u=typeof s.value=="boolean"?"top":s.value;return[n.value?{top:"auto",bottom:"auto",height:void 0}:void 0,s.value?{[u]:Le(i.value)}:{top:r.value.top}]});wt(()=>{ke(n,u=>{u?window.addEventListener("scroll",l,{passive:!0}):window.removeEventListener("scroll",l)},{immediate:!0})}),Cn(()=>{window.removeEventListener("scroll",l)});let a=0;function l(){const u=a>window.scrollY?"up":"down",c=t.value.getBoundingClientRect(),d=parseFloat(r.value.top??0),f=window.scrollY-Math.max(0,i.value-d),p=c.height+Math.max(i.value,d)-window.scrollY-window.innerHeight,v=parseFloat(getComputedStyle(t.value).getPropertyValue("--v-body-scroll-y"))||0;c.height<window.innerHeight-d?(s.value="top",i.value=d):u==="up"&&s.value==="bottom"||u==="down"&&s.value==="top"?(i.value=window.scrollY+c.top-v,s.value=!0):u==="down"&&p<=0?(i.value=0,s.value="bottom"):u==="up"&&f<=0&&(v?s.value!=="top"&&(i.value=-f+v+d,s.value="top"):(i.value=c.top+f,s.value="top")),a=window.scrollY}return{isStuck:s,stickyStyles:o}}const n6=100,r6=20;function Z1(e){return(e<0?-1:1)*Math.sqrt(Math.abs(e))*1.41421356237}function ek(e){if(e.length<2)return 0;if(e.length===2)return e[1].t===e[0].t?0:(e[1].d-e[0].d)/(e[1].t-e[0].t);let t=0;for(let n=e.length-1;n>0;n--){if(e[n].t===e[n-1].t)continue;const r=Z1(t),s=(e[n].d-e[n-1].d)/(e[n].t-e[n-1].t);t+=(s-r)*Math.abs(s),n===e.length-1&&(t*=.5)}return Z1(t)*1e3}function s6(){const e={};function t(s){Array.from(s.changedTouches).forEach(i=>{(e[i.identifier]??(e[i.identifier]=new yL(r6))).push([s.timeStamp,i])})}function n(s){Array.from(s.changedTouches).forEach(i=>{delete e[i.identifier]})}function r(s){var u;const i=(u=e[s])==null?void 0:u.values().reverse();if(!i)throw new Error(`No samples for touch id ${s}`);const o=i[0],a=[],l=[];for(const c of i){if(o[0]-c[0]>n6)break;a.push({t:c[0],d:c[1].clientX}),l.push({t:c[0],d:c[1].clientY})}return{x:ek(a),y:ek(l),get direction(){const{x:c,y:d}=this,[f,p]=[Math.abs(c),Math.abs(d)];return f>p&&c>=0?"right":f>p&&c<=0?"left":p>f&&d>=0?"down":p>f&&d<=0?"up":i6()}}}return{addMovement:t,endTouch:n,getVelocity:r}}function i6(){throw new Error}function o6(e){let{el:t,isActive:n,isTemporary:r,width:s,touchless:i,position:o}=e;wt(()=>{window.addEventListener("touchstart",w,{passive:!0}),window.addEventListener("touchmove",x,{passive:!1}),window.addEventListener("touchend",P,{passive:!0})}),Cn(()=>{window.removeEventListener("touchstart",w),window.removeEventListener("touchmove",x),window.removeEventListener("touchend",P)});const a=T(()=>["left","right"].includes(o.value)),{addMovement:l,endTouch:u,getVelocity:c}=s6();let d=!1;const f=Ae(!1),p=Ae(0),v=Ae(0);let m;function y(C,R){return(o.value==="left"?C:o.value==="right"?document.documentElement.clientWidth-C:o.value==="top"?C:o.value==="bottom"?document.documentElement.clientHeight-C:pl())-(R?s.value:0)}function b(C){let R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const k=o.value==="left"?(C-v.value)/s.value:o.value==="right"?(document.documentElement.clientWidth-C-v.value)/s.value:o.value==="top"?(C-v.value)/s.value:o.value==="bottom"?(document.documentElement.clientHeight-C-v.value)/s.value:pl();return R?Math.max(0,Math.min(1,k)):k}function w(C){if(i.value)return;const R=C.changedTouches[0].clientX,k=C.changedTouches[0].clientY,E=25,I=o.value==="left"?R<E:o.value==="right"?R>document.documentElement.clientWidth-E:o.value==="top"?k<E:o.value==="bottom"?k>document.documentElement.clientHeight-E:pl(),A=n.value&&(o.value==="left"?R<s.value:o.value==="right"?R>document.documentElement.clientWidth-s.value:o.value==="top"?k<s.value:o.value==="bottom"?k>document.documentElement.clientHeight-s.value:pl());(I||A||n.value&&r.value)&&(m=[R,k],v.value=y(a.value?R:k,n.value),p.value=b(a.value?R:k),d=v.value>-20&&v.value<80,u(C),l(C))}function x(C){const R=C.changedTouches[0].clientX,k=C.changedTouches[0].clientY;if(d){if(!C.cancelable){d=!1;return}const I=Math.abs(R-m[0]),A=Math.abs(k-m[1]);(a.value?I>A&&I>3:A>I&&A>3)?(f.value=!0,d=!1):(a.value?A:I)>3&&(d=!1)}if(!f.value)return;C.preventDefault(),l(C);const E=b(a.value?R:k,!1);p.value=Math.max(0,Math.min(1,E)),E>1?v.value=y(a.value?R:k,!0):E<0&&(v.value=y(a.value?R:k,!1))}function P(C){if(d=!1,!f.value)return;l(C),f.value=!1;const R=c(C.changedTouches[0].identifier),k=Math.abs(R.x),E=Math.abs(R.y);(a.value?k>E&&k>400:E>k&&E>3)?n.value=R.direction===({left:"right",right:"left",top:"down",bottom:"up"}[o.value]||pl()):n.value=p.value>.5}const S=T(()=>f.value?{transform:o.value==="left"?`translateX(calc(-100% + ${p.value*s.value}px))`:o.value==="right"?`translateX(calc(100% - ${p.value*s.value}px))`:o.value==="top"?`translateY(calc(-100% + ${p.value*s.value}px))`:o.value==="bottom"?`translateY(calc(100% - ${p.value*s.value}px))`:pl(),transition:"none"}:void 0);return Hr(f,()=>{var k,E;const C=((k=t.value)==null?void 0:k.style.transform)??null,R=((E=t.value)==null?void 0:E.style.transition)??null;Mn(()=>{var I,A,O,L;(A=t.value)==null||A.style.setProperty("transform",((I=S.value)==null?void 0:I.transform)||"none"),(L=t.value)==null||L.style.setProperty("transition",((O=S.value)==null?void 0:O.transition)||null)}),Sn(()=>{var I,A;(I=t.value)==null||I.style.setProperty("transform",C),(A=t.value)==null||A.style.setProperty("transition",R)})}),{isDragging:f,dragProgress:p,dragStyles:S}}function pl(){throw new Error}const gm={"001":1,AD:1,AE:6,AF:6,AG:0,AI:1,AL:1,AM:1,AN:1,AR:1,AS:0,AT:1,AU:1,AX:1,AZ:1,BA:1,BD:0,BE:1,BG:1,BH:6,BM:1,BN:1,BR:0,BS:0,BT:0,BW:0,BY:1,BZ:0,CA:0,CH:1,CL:1,CM:1,CN:1,CO:0,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DM:0,DO:0,DZ:6,EC:1,EE:1,EG:6,ES:1,ET:0,FI:1,FJ:1,FO:1,FR:1,GB:1,"GB-alt-variant":0,GE:1,GF:1,GP:1,GR:1,GT:0,GU:0,HK:0,HN:0,HR:1,HU:1,ID:0,IE:1,IL:0,IN:0,IQ:6,IR:6,IS:1,IT:1,JM:0,JO:6,JP:0,KE:0,KG:1,KH:0,KR:0,KW:6,KZ:1,LA:0,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MH:0,MK:1,MM:0,MN:1,MO:0,MQ:1,MT:0,MV:5,MX:0,MY:1,MZ:0,NI:0,NL:1,NO:1,NP:0,NZ:1,OM:6,PA:0,PE:0,PH:0,PK:0,PL:1,PR:0,PT:0,PY:0,QA:6,RE:1,RO:1,RS:1,RU:1,SA:0,SD:6,SE:1,SG:0,SI:1,SK:1,SM:1,SV:0,SY:6,TH:0,TJ:1,TM:1,TR:1,TT:0,TW:0,UA:1,UM:0,US:0,UY:1,UZ:1,VA:1,VE:0,VI:0,VN:1,WS:0,XK:1,YE:0,ZA:0,ZW:0};function a6(e,t,n){const r=[];let s=[];const i=$A(e),o=FA(e),a=n??gm[t.slice(-2).toUpperCase()]??0,l=(i.getDay()-a+7)%7,u=(o.getDay()-a+7)%7;for(let c=0;c<l;c++){const d=new Date(i);d.setDate(d.getDate()-(l-c)),s.push(d)}for(let c=1;c<=o.getDate();c++){const d=new Date(e.getFullYear(),e.getMonth(),c);s.push(d),s.length===7&&(r.push(s),s=[])}for(let c=1;c<7-u;c++){const d=new Date(o);d.setDate(d.getDate()+c),s.push(d)}return s.length>0&&r.push(s),r}function l6(e,t,n){const r=n??gm[t.slice(-2).toUpperCase()]??0,s=new Date(e);for(;s.getDay()!==r;)s.setDate(s.getDate()-1);return s}function u6(e,t){const n=new Date(e),r=((gm[t.slice(-2).toUpperCase()]??0)+6)%7;for(;n.getDay()!==r;)n.setDate(n.getDate()+1);return n}function $A(e){return new Date(e.getFullYear(),e.getMonth(),1)}function FA(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function c6(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}const d6=/^([12]\d{3}-([1-9]|0[1-9]|1[0-2])-([1-9]|0[1-9]|[12]\d|3[01]))$/;function LA(e){if(e==null)return new Date;if(e instanceof Date)return e;if(typeof e=="string"){let t;if(d6.test(e))return c6(e);if(t=Date.parse(e),!isNaN(t))return new Date(t)}return null}const tk=new Date(2e3,0,2);function f6(e,t){const n=t??gm[e.slice(-2).toUpperCase()]??0;return El(7).map(r=>{const s=new Date(tk);return s.setDate(tk.getDate()+n+r),new Intl.DateTimeFormat(e,{weekday:"narrow"}).format(s)})}function h6(e,t,n,r){const s=LA(e)??new Date,i=r==null?void 0:r[t];if(typeof i=="function")return i(s,t,n);let o={};switch(t){case"fullDate":o={year:"numeric",month:"long",day:"numeric"};break;case"fullDateWithWeekday":o={weekday:"long",year:"numeric",month:"long",day:"numeric"};break;case"normalDate":const a=s.getDate(),l=new Intl.DateTimeFormat(n,{month:"long"}).format(s);return`${a} ${l}`;case"normalDateWithWeekday":o={weekday:"short",day:"numeric",month:"short"};break;case"shortDate":o={month:"short",day:"numeric"};break;case"year":o={year:"numeric"};break;case"month":o={month:"long"};break;case"monthShort":o={month:"short"};break;case"monthAndYear":o={month:"long",year:"numeric"};break;case"monthAndDate":o={month:"long",day:"numeric"};break;case"weekday":o={weekday:"long"};break;case"weekdayShort":o={weekday:"short"};break;case"dayOfMonth":return new Intl.NumberFormat(n).format(s.getDate());case"hours12h":o={hour:"numeric",hour12:!0};break;case"hours24h":o={hour:"numeric",hour12:!1};break;case"minutes":o={minute:"numeric"};break;case"seconds":o={second:"numeric"};break;case"fullTime":o={hour:"numeric",minute:"numeric"};break;case"fullTime12h":o={hour:"numeric",minute:"numeric",hour12:!0};break;case"fullTime24h":o={hour:"numeric",minute:"numeric",hour12:!1};break;case"fullDateTime":o={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric"};break;case"fullDateTime12h":o={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",hour12:!0};break;case"fullDateTime24h":o={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",hour12:!1};break;case"keyboardDate":o={year:"numeric",month:"2-digit",day:"2-digit"};break;case"keyboardDateTime":return o={year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric"},new Intl.DateTimeFormat(n,o).format(s).replace(/, /g," ");case"keyboardDateTime12h":return o={year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric",hour12:!0},new Intl.DateTimeFormat(n,o).format(s).replace(/, /g," ");case"keyboardDateTime24h":return o={year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric",hour12:!1},new Intl.DateTimeFormat(n,o).format(s).replace(/, /g," ");default:o=i??{timeZone:"UTC",timeZoneName:"short"}}return new Intl.DateTimeFormat(n,o).format(s)}function p6(e,t){const n=e.toJsDate(t),r=n.getFullYear(),s=x_(String(n.getMonth()+1),2,"0"),i=x_(String(n.getDate()),2,"0");return`${r}-${s}-${i}`}function m6(e){const[t,n,r]=e.split("-").map(Number);return new Date(t,n-1,r)}function g6(e,t){const n=new Date(e);return n.setMinutes(n.getMinutes()+t),n}function v6(e,t){const n=new Date(e);return n.setHours(n.getHours()+t),n}function y6(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function b6(e,t){const n=new Date(e);return n.setDate(n.getDate()+t*7),n}function w6(e,t){const n=new Date(e);return n.setDate(1),n.setMonth(n.getMonth()+t),n}function S6(e){return e.getFullYear()}function _6(e){return e.getMonth()}function k6(e){return e.getDate()}function x6(e){return new Date(e.getFullYear(),e.getMonth()+1,1)}function E6(e){return new Date(e.getFullYear(),e.getMonth()-1,1)}function C6(e){return e.getHours()}function P6(e){return e.getMinutes()}function T6(e){return new Date(e.getFullYear(),0,1)}function R6(e){return new Date(e.getFullYear(),11,31)}function I6(e,t){return rp(e,t[0])&&M6(e,t[1])}function A6(e){const t=new Date(e);return t instanceof Date&&!isNaN(t.getTime())}function rp(e,t){return e.getTime()>t.getTime()}function O6(e,t){return rp(Ey(e),Ey(t))}function M6(e,t){return e.getTime()<t.getTime()}function nk(e,t){return e.getTime()===t.getTime()}function D6(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function $6(e,t){return e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function F6(e,t){return e.getFullYear()===t.getFullYear()}function L6(e,t,n){const r=new Date(e),s=new Date(t);switch(n){case"years":return r.getFullYear()-s.getFullYear();case"quarters":return Math.floor((r.getMonth()-s.getMonth()+(r.getFullYear()-s.getFullYear())*12)/4);case"months":return r.getMonth()-s.getMonth()+(r.getFullYear()-s.getFullYear())*12;case"weeks":return Math.floor((r.getTime()-s.getTime())/(1e3*60*60*24*7));case"days":return Math.floor((r.getTime()-s.getTime())/(1e3*60*60*24));case"hours":return Math.floor((r.getTime()-s.getTime())/(1e3*60*60));case"minutes":return Math.floor((r.getTime()-s.getTime())/(1e3*60));case"seconds":return Math.floor((r.getTime()-s.getTime())/1e3);default:return r.getTime()-s.getTime()}}function N6(e,t){const n=new Date(e);return n.setHours(t),n}function B6(e,t){const n=new Date(e);return n.setMinutes(t),n}function V6(e,t){const n=new Date(e);return n.setMonth(t),n}function U6(e,t){const n=new Date(e);return n.setDate(t),n}function z6(e,t){const n=new Date(e);return n.setFullYear(t),n}function Ey(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0)}function H6(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59,999)}class j6{constructor(t){this.locale=t.locale,this.formats=t.formats}date(t){return LA(t)}toJsDate(t){return t}toISO(t){return p6(this,t)}parseISO(t){return m6(t)}addMinutes(t,n){return g6(t,n)}addHours(t,n){return v6(t,n)}addDays(t,n){return y6(t,n)}addWeeks(t,n){return b6(t,n)}addMonths(t,n){return w6(t,n)}getWeekArray(t,n){return a6(t,this.locale,n?Number(n):void 0)}startOfWeek(t,n){return l6(t,this.locale,n?Number(n):void 0)}endOfWeek(t){return u6(t,this.locale)}startOfMonth(t){return $A(t)}endOfMonth(t){return FA(t)}format(t,n){return h6(t,n,this.locale,this.formats)}isEqual(t,n){return nk(t,n)}isValid(t){return A6(t)}isWithinRange(t,n){return I6(t,n)}isAfter(t,n){return rp(t,n)}isAfterDay(t,n){return O6(t,n)}isBefore(t,n){return!rp(t,n)&&!nk(t,n)}isSameDay(t,n){return D6(t,n)}isSameMonth(t,n){return $6(t,n)}isSameYear(t,n){return F6(t,n)}setMinutes(t,n){return B6(t,n)}setHours(t,n){return N6(t,n)}setMonth(t,n){return V6(t,n)}setDate(t,n){return U6(t,n)}setYear(t,n){return z6(t,n)}getDiff(t,n,r){return L6(t,n,r)}getWeekdays(t){return f6(this.locale,t?Number(t):void 0)}getYear(t){return S6(t)}getMonth(t){return _6(t)}getDate(t){return k6(t)}getNextMonth(t){return x6(t)}getPreviousMonth(t){return E6(t)}getHours(t){return C6(t)}getMinutes(t){return P6(t)}startOfDay(t){return Ey(t)}endOfDay(t){return H6(t)}startOfYear(t){return T6(t)}endOfYear(t){return R6(t)}}const q6=Symbol.for("vuetify:date-options"),rk=Symbol.for("vuetify:date-adapter");function W6(e,t){const n=Jn({adapter:j6,locale:{af:"af-ZA",bg:"bg-BG",ca:"ca-ES",ckb:"",cs:"cs-CZ",de:"de-DE",el:"el-GR",en:"en-US",et:"et-EE",fa:"fa-IR",fi:"fi-FI",hr:"hr-HR",hu:"hu-HU",he:"he-IL",id:"id-ID",it:"it-IT",ja:"ja-JP",ko:"ko-KR",lv:"lv-LV",lt:"lt-LT",nl:"nl-NL",no:"no-NO",pl:"pl-PL",pt:"pt-PT",ro:"ro-RO",ru:"ru-RU",sk:"sk-SK",sl:"sl-SI",srCyrl:"sr-SP",srLatn:"sr-SP",sv:"sv-SE",th:"th-TH",tr:"tr-TR",az:"az-AZ",uk:"uk-UA",vi:"vi-VN",zhHans:"zh-CN",zhHant:"zh-TW"}},e);return{options:n,instance:G6(n,t)}}function G6(e,t){const n=gn(typeof e.adapter=="function"?new e.adapter({locale:e.locale[t.current.value]??t.current.value,formats:e.formats}):e.adapter);return ke(t.current,r=>{n.locale=e.locale[r]??r??n.locale}),n}const ad=Symbol.for("vuetify:layout"),NA=Symbol.for("vuetify:layout-item"),sk=1e3,BA=ce({overlaps:{type:Array,default:()=>[]},fullHeight:Boolean},"layout"),VA=ce({name:{type:String},order:{type:[Number,String],default:0},absolute:Boolean},"layout-item");function UA(){const e=Xe(ad);if(!e)throw new Error("[Vuetify] Could not find injected layout");return{getLayoutItem:e.getLayoutItem,mainRect:e.mainRect,mainStyles:e.mainStyles}}function zA(e){const t=Xe(ad);if(!t)throw new Error("[Vuetify] Could not find injected layout");const n=e.id??`layout-item-${gr()}`,r=on("useLayoutItem");Gt(NA,{id:n});const s=Ae(!1);Sb(()=>s.value=!0),xC(()=>s.value=!1);const{layoutItemStyles:i,layoutItemScrimStyles:o}=t.register(r,{...e,active:T(()=>s.value?!1:e.active.value),id:n});return Cn(()=>t.unregister(n)),{layoutItemStyles:i,layoutRect:t.layoutRect,layoutItemScrimStyles:o}}const K6=(e,t,n,r)=>{let s={top:0,left:0,right:0,bottom:0};const i=[{id:"",layer:{...s}}];for(const o of e){const a=t.get(o),l=n.get(o),u=r.get(o);if(!a||!l||!u)continue;const c={...s,[a.value]:parseInt(s[a.value],10)+(u.value?parseInt(l.value,10):0)};i.push({id:o,layer:c}),s=c}return i};function HA(e){const t=Xe(ad,null),n=T(()=>t?t.rootZIndex.value-100:sk),r=V([]),s=gn(new Map),i=gn(new Map),o=gn(new Map),a=gn(new Map),l=gn(new Map),{resizeRef:u,contentRect:c}=za(),d=T(()=>{const C=new Map,R=e.overlaps??[];for(const k of R.filter(E=>E.includes(":"))){const[E,I]=k.split(":");if(!r.value.includes(E)||!r.value.includes(I))continue;const A=s.get(E),O=s.get(I),L=i.get(E),M=i.get(I);!A||!O||!L||!M||(C.set(I,{position:A.value,amount:parseInt(L.value,10)}),C.set(E,{position:O.value,amount:-parseInt(M.value,10)}))}return C}),f=T(()=>{const C=[...new Set([...o.values()].map(k=>k.value))].sort((k,E)=>k-E),R=[];for(const k of C){const E=r.value.filter(I=>{var A;return((A=o.get(I))==null?void 0:A.value)===k});R.push(...E)}return K6(R,s,i,a)}),p=T(()=>!Array.from(l.values()).some(C=>C.value)),v=T(()=>f.value[f.value.length-1].layer),m=T(()=>({"--v-layout-left":Le(v.value.left),"--v-layout-right":Le(v.value.right),"--v-layout-top":Le(v.value.top),"--v-layout-bottom":Le(v.value.bottom),...p.value?void 0:{transition:"none"}})),y=T(()=>f.value.slice(1).map((C,R)=>{let{id:k}=C;const{layer:E}=f.value[R],I=i.get(k),A=s.get(k);return{id:k,...E,size:Number(I.value),position:A.value}})),b=C=>y.value.find(R=>R.id===C),w=on("createLayout"),x=Ae(!1);wt(()=>{x.value=!0}),Gt(ad,{register:(C,R)=>{let{id:k,order:E,position:I,layoutSize:A,elementSize:O,active:L,disableTransitions:M,absolute:z}=R;o.set(k,E),s.set(k,I),i.set(k,A),a.set(k,L),M&&l.set(k,M);const G=Cl(NA,w==null?void 0:w.vnode).indexOf(C);G>-1?r.value.splice(G,0,k):r.value.push(k);const W=T(()=>y.value.findIndex(N=>N.id===k)),Y=T(()=>n.value+f.value.length*2-W.value*2),X=T(()=>{const N=I.value==="left"||I.value==="right",K=I.value==="right",he=I.value==="bottom",oe=O.value??A.value,we=oe===0?"%":"px",ee={[I.value]:0,zIndex:Y.value,transform:`translate${N?"X":"Y"}(${(L.value?0:-(oe===0?100:oe))*(K||he?-1:1)}${we})`,position:z.value||n.value!==sk?"absolute":"fixed",...p.value?void 0:{transition:"none"}};if(!x.value)return ee;const de=y.value[W.value];if(!de)throw new Error(`[Vuetify] Could not find layout item "${k}"`);const ne=d.value.get(k);return ne&&(de[ne.position]+=ne.amount),{...ee,height:N?`calc(100% - ${de.top}px - ${de.bottom}px)`:O.value?`${O.value}px`:void 0,left:K?void 0:`${de.left}px`,right:K?`${de.right}px`:void 0,top:I.value!=="bottom"?`${de.top}px`:void 0,bottom:I.value!=="top"?`${de.bottom}px`:void 0,width:N?O.value?`${O.value}px`:void 0:`calc(100% - ${de.left}px - ${de.right}px)`}}),J=T(()=>({zIndex:Y.value-1}));return{layoutItemStyles:X,layoutItemScrimStyles:J,zIndex:Y}},unregister:C=>{o.delete(C),s.delete(C),i.delete(C),a.delete(C),l.delete(C),r.value=r.value.filter(R=>R!==C)},mainRect:v,mainStyles:m,getLayoutItem:b,items:y,layoutRect:c,rootZIndex:n});const P=T(()=>["v-layout",{"v-layout--full-height":e.fullHeight}]),S=T(()=>({zIndex:t?n.value:void 0,position:t?"relative":void 0,overflow:t?"hidden":void 0}));return{layoutClasses:P,layoutStyles:S,getLayoutItem:b,items:y,layoutRect:c,layoutRef:u}}const Y6=["start","end","left","right","top","bottom"],X6=ce({color:String,disableResizeWatcher:Boolean,disableRouteWatcher:Boolean,expandOnHover:Boolean,floating:Boolean,modelValue:{type:Boolean,default:null},permanent:Boolean,rail:{type:Boolean,default:null},railWidth:{type:[Number,String],default:56},scrim:{type:[Boolean,String],default:!0},image:String,temporary:Boolean,persistent:Boolean,touchless:Boolean,width:{type:[Number,String],default:256},location:{type:String,default:"start",validator:e=>Y6.includes(e)},sticky:Boolean,...ms(),...Ve(),...zb(),...rl({mobile:null}),...vs(),...VA(),...$n(),...vt({tag:"nav"}),...$t()},"VNavigationDrawer"),Mw=_e()({name:"VNavigationDrawer",props:X6(),emits:{"update:modelValue":e=>!0,"update:rail":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{isRtl:i}=Dr(),{themeClasses:o}=Yt(e),{borderClasses:a}=Ds(e),{backgroundColorClasses:l,backgroundColorStyles:u}=fr(Re(e,"color")),{elevationClasses:c}=$s(e),{displayClasses:d,mobile:f}=pi(e),{roundedClasses:p}=Vn(e),v=UP(),m=st(e,"modelValue",null,X=>!!X),{ssrBootStyles:y}=jd(),{scopeId:b}=Ou(),w=V(),x=Ae(!1),{runOpenDelay:P,runCloseDelay:S}=Hb(e,X=>{x.value=X}),C=T(()=>e.rail&&e.expandOnHover&&x.value?Number(e.width):Number(e.rail?e.railWidth:e.width)),R=T(()=>Tv(e.location,i.value)),k=T(()=>e.persistent),E=T(()=>!e.permanent&&(f.value||e.temporary)),I=T(()=>e.sticky&&!E.value&&R.value!=="bottom");Hr(()=>e.expandOnHover&&e.rail!=null,()=>{ke(x,X=>r("update:rail",!X))}),Hr(()=>!e.disableResizeWatcher,()=>{ke(E,X=>!e.permanent&&Mt(()=>m.value=!X))}),Hr(()=>!e.disableRouteWatcher&&!!v,()=>{ke(v.currentRoute,()=>E.value&&(m.value=!1))}),ke(()=>e.permanent,X=>{X&&(m.value=!0)}),e.modelValue==null&&!E.value&&(m.value=e.permanent||!f.value);const{isDragging:A,dragProgress:O}=o6({el:w,isActive:m,isTemporary:E,width:C,touchless:Re(e,"touchless"),position:R}),L=T(()=>{const X=E.value?0:e.rail&&e.expandOnHover?Number(e.railWidth):C.value;return A.value?X*O.value:X}),{layoutItemStyles:M,layoutItemScrimStyles:z}=zA({id:e.name,order:T(()=>parseInt(e.order,10)),position:R,layoutSize:L,elementSize:C,active:T(()=>m.value||A.value),disableTransitions:T(()=>A.value),absolute:T(()=>e.absolute||I.value&&typeof H.value!="string")}),{isStuck:H,stickyStyles:G}=t6({rootEl:w,isSticky:I,layoutItemStyles:M}),W=fr(T(()=>typeof e.scrim=="string"?e.scrim:null)),Y=T(()=>({...A.value?{opacity:O.value*.2,transition:"none"}:void 0,...z.value}));return Ir({VList:{bgColor:"transparent"}}),Ie(()=>{const X=s.image||e.image;return h(Pe,null,[h(e.tag,me({ref:w,onMouseenter:P,onMouseleave:S,class:["v-navigation-drawer",`v-navigation-drawer--${R.value}`,{"v-navigation-drawer--expand-on-hover":e.expandOnHover,"v-navigation-drawer--floating":e.floating,"v-navigation-drawer--is-hovering":x.value,"v-navigation-drawer--rail":e.rail,"v-navigation-drawer--temporary":E.value,"v-navigation-drawer--persistent":k.value,"v-navigation-drawer--active":m.value,"v-navigation-drawer--sticky":I.value},o.value,l.value,a.value,d.value,c.value,p.value,e.class],style:[u.value,M.value,y.value,G.value,e.style]},b,n),{default:()=>{var J,N,K;return[X&&h("div",{key:"image",class:"v-navigation-drawer__img"},[s.image?h(Ot,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{alt:"",cover:!0,height:"inherit",src:e.image}}},s.image):h(cs,{key:"image-img",alt:"",cover:!0,height:"inherit",src:e.image},null)]),s.prepend&&h("div",{class:"v-navigation-drawer__prepend"},[(J=s.prepend)==null?void 0:J.call(s)]),h("div",{class:"v-navigation-drawer__content"},[(N=s.default)==null?void 0:N.call(s)]),s.append&&h("div",{class:"v-navigation-drawer__append"},[(K=s.append)==null?void 0:K.call(s)])]}}),h(Fo,{name:"fade-transition"},{default:()=>[E.value&&(A.value||m.value)&&!!e.scrim&&h("div",me({class:["v-navigation-drawer__scrim",W.backgroundColorClasses.value],style:[Y.value,W.backgroundColorStyles.value],onClick:()=>{k.value||(m.value=!1)}},b),null)]})])}),{isStuck:H}}}),Q6=ce({active:Boolean,disabled:Boolean,max:[Number,String],value:{type:[Number,String],default:0},...Ve(),...Mu({transition:{component:ZP}})},"VCounter"),Dw=_e()({name:"VCounter",functional:!0,props:Q6(),setup(e,t){let{slots:n}=t;const r=T(()=>e.max?`${e.value} / ${e.max}`:String(e.value));return Ie(()=>h(ii,{transition:e.transition},{default:()=>[Bt(h("div",{class:["v-counter",{"text-error":e.max&&!e.disabled&&parseFloat(e.value)>parseFloat(e.max)},e.class],style:e.style},[n.default?n.default({counter:r.value,max:e.max,value:e.value}):r.value]),[[Xi,e.active]])]})),{}}}),J6=ce({text:String,onClick:Nn(),...Ve(),...$t()},"VLabel"),$w=_e()({name:"VLabel",props:J6(),setup(e,t){let{slots:n}=t;return Ie(()=>{var r;return h("label",{class:["v-label",{"v-label--clickable":!!e.onClick},e.class],style:e.style,onClick:e.onClick},[e.text,(r=n.default)==null?void 0:r.call(n)])}),{}}}),Z6=ce({floating:Boolean,...Ve()},"VFieldLabel"),wf=_e()({name:"VFieldLabel",props:Z6(),setup(e,t){let{slots:n}=t;return Ie(()=>h($w,{class:["v-field-label",{"v-field-label--floating":e.floating},e.class],style:e.style,"aria-hidden":e.floating||void 0},n)),{}}});function jA(e){const{t}=Kr();function n(r){let{name:s}=r;const i={prepend:"prependAction",prependInner:"prependAction",append:"appendAction",appendInner:"appendAction",clear:"clear"}[s],o=e[`onClick:${s}`];function a(u){u.key!=="Enter"&&u.key!==" "||(u.preventDefault(),u.stopPropagation(),Lp(o,new PointerEvent("click",u)))}const l=o&&i?t(`$vuetify.input.${i}`,e.label??""):void 0;return h(Q,{icon:e[`${s}Icon`],"aria-label":l,onClick:o,onKeydown:a},null)}return{InputIcon:n}}const qA=ce({focused:Boolean,"onUpdate:focused":Nn()},"focus");function ju(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:hi();const n=st(e,"focused"),r=T(()=>({[`${t}--focused`]:n.value}));function s(){n.value=!0}function i(){n.value=!1}return{focusClasses:r,isFocused:n,focus:s,blur:i}}const eG=["underlined","outlined","filled","solo","solo-inverted","solo-filled","plain"],vm=ce({appendInnerIcon:ze,bgColor:String,clearable:Boolean,clearIcon:{type:ze,default:"$clear"},active:Boolean,centerAffix:{type:Boolean,default:void 0},color:String,baseColor:String,dirty:Boolean,disabled:{type:Boolean,default:null},error:Boolean,flat:Boolean,label:String,persistentClear:Boolean,prependInnerIcon:ze,reverse:Boolean,singleLine:Boolean,variant:{type:String,default:"filled",validator:e=>eG.includes(e)},"onClick:clear":Nn(),"onClick:appendInner":Nn(),"onClick:prependInner":Nn(),...Ve(),...Bp(),...$n(),...$t()},"VField"),ym=_e()({name:"VField",inheritAttrs:!1,props:{id:String,...qA(),...vm()},emits:{"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{themeClasses:i}=Yt(e),{loaderClasses:o}=Id(e),{focusClasses:a,isFocused:l,focus:u,blur:c}=ju(e),{InputIcon:d}=jA(e),{roundedClasses:f}=Vn(e),{rtlClasses:p}=Dr(),v=T(()=>e.dirty||e.active),m=T(()=>!!(e.label||s.label)),y=T(()=>!e.singleLine&&m.value),b=gr(),w=T(()=>e.id||`input-${b}`),x=T(()=>`${w.value}-messages`),P=V(),S=V(),C=V(),R=T(()=>["plain","underlined"].includes(e.variant)),{backgroundColorClasses:k,backgroundColorStyles:E}=fr(Re(e,"bgColor")),{textColorClasses:I,textColorStyles:A}=As(T(()=>e.error||e.disabled?void 0:v.value&&l.value?e.color:e.baseColor));ke(v,M=>{if(y.value){const z=P.value.$el,H=S.value.$el;requestAnimationFrame(()=>{const G=Fb(z),W=H.getBoundingClientRect(),Y=W.x-G.x,X=W.y-G.y-(G.height/2-W.height/2),J=W.width/.75,N=Math.abs(J-G.width)>1?{maxWidth:Le(J)}:void 0,K=getComputedStyle(z),he=getComputedStyle(H),oe=parseFloat(K.transitionDuration)*1e3||150,we=parseFloat(he.getPropertyValue("--v-field-label-scale")),ee=he.getPropertyValue("color");z.style.visibility="visible",H.style.visibility="hidden",Pl(z,{transform:`translate(${Y}px, ${X}px) scale(${we})`,color:ee,...N},{duration:oe,easing:Mh,direction:M?"normal":"reverse"}).finished.then(()=>{z.style.removeProperty("visibility"),H.style.removeProperty("visibility")})})}},{flush:"post"});const O=T(()=>({isActive:v,isFocused:l,controlRef:C,blur:c,focus:u}));function L(M){M.target!==document.activeElement&&M.preventDefault()}return Ie(()=>{var Y,X,J;const M=e.variant==="outlined",z=!!(s["prepend-inner"]||e.prependInnerIcon),H=!!(e.clearable||s.clear)&&!e.disabled,G=!!(s["append-inner"]||e.appendInnerIcon||H),W=()=>s.label?s.label({...O.value,label:e.label,props:{for:w.value}}):e.label;return h("div",me({class:["v-field",{"v-field--active":v.value,"v-field--appended":G,"v-field--center-affix":e.centerAffix??!R.value,"v-field--disabled":e.disabled,"v-field--dirty":e.dirty,"v-field--error":e.error,"v-field--flat":e.flat,"v-field--has-background":!!e.bgColor,"v-field--persistent-clear":e.persistentClear,"v-field--prepended":z,"v-field--reverse":e.reverse,"v-field--single-line":e.singleLine,"v-field--no-label":!W(),[`v-field--variant-${e.variant}`]:!0},i.value,k.value,a.value,o.value,f.value,p.value,e.class],style:[E.value,e.style],onClick:L},n),[h("div",{class:"v-field__overlay"},null),h(Vp,{name:"v-field",active:!!e.loading,color:e.error?"error":typeof e.loading=="string"?e.loading:e.color},{default:s.loader}),z&&h("div",{key:"prepend",class:"v-field__prepend-inner"},[e.prependInnerIcon&&h(d,{key:"prepend-icon",name:"prependInner"},null),(Y=s["prepend-inner"])==null?void 0:Y.call(s,O.value)]),h("div",{class:"v-field__field","data-no-activator":""},[["filled","solo","solo-inverted","solo-filled"].includes(e.variant)&&y.value&&h(wf,{key:"floating-label",ref:S,class:[I.value],floating:!0,for:w.value,style:A.value},{default:()=>[W()]}),m.value&&h(wf,{key:"label",ref:P,for:w.value},{default:()=>[W()]}),(X=s.default)==null?void 0:X.call(s,{...O.value,props:{id:w.value,class:"v-field__input","aria-describedby":x.value},focus:u,blur:c})]),H&&h(tT,{key:"clear"},{default:()=>[Bt(h("div",{class:"v-field__clearable",onMousedown:N=>{N.preventDefault(),N.stopPropagation()}},[h(Ot,{defaults:{VIcon:{icon:e.clearIcon}}},{default:()=>[s.clear?s.clear({...O.value,props:{onFocus:u,onBlur:c,onClick:e["onClick:clear"]}}):h(d,{name:"clear",onFocus:u,onBlur:c},null)]})]),[[Xi,e.dirty]])]}),G&&h("div",{key:"append",class:"v-field__append-inner"},[(J=s["append-inner"])==null?void 0:J.call(s,O.value),e.appendInnerIcon&&h(d,{key:"append-icon",name:"appendInner"},null)]),h("div",{class:["v-field__outline",I.value],style:A.value},[M&&h(Pe,null,[h("div",{class:"v-field__outline__start"},null),y.value&&h("div",{class:"v-field__outline__notch"},[h(wf,{ref:S,floating:!0,for:w.value},{default:()=>[W()]})]),h("div",{class:"v-field__outline__end"},null)]),R.value&&y.value&&h(wf,{ref:S,floating:!0,for:w.value},{default:()=>[W()]})])])}),{controlRef:C}}});function Fw(e){const t=Object.keys(ym.props).filter(n=>!Fp(n)&&n!=="class"&&n!=="style");return xu(e,t)}const tG=ce({active:Boolean,color:String,messages:{type:[Array,String],default:()=>[]},...Ve(),...Mu({transition:{component:ZP,leaveAbsolute:!0,group:!0}})},"VMessages"),nG=_e()({name:"VMessages",props:tG(),setup(e,t){let{slots:n}=t;const r=T(()=>On(e.messages)),{textColorClasses:s,textColorStyles:i}=As(T(()=>e.color));return Ie(()=>h(ii,{transition:e.transition,tag:"div",class:["v-messages",s.value,e.class],style:[i.value,e.style]},{default:()=>[e.active&&r.value.map((o,a)=>h("div",{class:"v-messages__message",key:`${a}-${r.value}`},[n.message?n.message({message:o}):o]))]})),{}}}),WA=Symbol.for("vuetify:form"),rG=ce({disabled:Boolean,fastFail:Boolean,readonly:Boolean,modelValue:{type:Boolean,default:null},validateOn:{type:String,default:"input"}},"form");function sG(e){const t=st(e,"modelValue"),n=T(()=>e.disabled),r=T(()=>e.readonly),s=Ae(!1),i=V([]),o=V([]);async function a(){const c=[];let d=!0;o.value=[],s.value=!0;for(const f of i.value){const p=await f.validate();if(p.length>0&&(d=!1,c.push({id:f.id,errorMessages:p})),!d&&e.fastFail)break}return o.value=c,s.value=!1,{valid:d,errors:o.value}}function l(){i.value.forEach(c=>c.reset())}function u(){i.value.forEach(c=>c.resetValidation())}return ke(i,()=>{let c=0,d=0;const f=[];for(const p of i.value)p.isValid===!1?(d++,f.push({id:p.id,errorMessages:p.errorMessages})):p.isValid===!0&&c++;o.value=f,t.value=d>0?!1:c===i.value.length?!0:null},{deep:!0,flush:"post"}),Gt(WA,{register:c=>{let{id:d,vm:f,validate:p,reset:v,resetValidation:m}=c;i.value.some(y=>y.id===d),i.value.push({id:d,validate:p,reset:v,resetValidation:m,vm:Pp(f),isValid:null,errorMessages:[]})},unregister:c=>{i.value=i.value.filter(d=>d.id!==c)},update:(c,d,f)=>{const p=i.value.find(v=>v.id===c);p&&(p.isValid=d,p.errorMessages=f)},isDisabled:n,isReadonly:r,isValidating:s,isValid:t,items:i,validateOn:Re(e,"validateOn")}),{errors:o,isDisabled:n,isReadonly:r,isValidating:s,isValid:t,items:i,validate:a,reset:l,resetValidation:u}}function GA(e){const t=Xe(WA,null);return{...t,isReadonly:T(()=>!!((e==null?void 0:e.readonly)??(t==null?void 0:t.isReadonly.value))),isDisabled:T(()=>!!((e==null?void 0:e.disabled)??(t==null?void 0:t.isDisabled.value)))}}const iG=ce({disabled:{type:Boolean,default:null},error:Boolean,errorMessages:{type:[Array,String],default:()=>[]},maxErrors:{type:[Number,String],default:1},name:String,label:String,readonly:{type:Boolean,default:null},rules:{type:Array,default:()=>[]},modelValue:null,validateOn:String,validationValue:null,...qA()},"validation");function oG(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:hi(),n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:gr();const r=st(e,"modelValue"),s=T(()=>e.validationValue===void 0?r.value:e.validationValue),i=GA(e),o=V([]),a=Ae(!0),l=T(()=>!!(On(r.value===""?null:r.value).length||On(s.value===""?null:s.value).length)),u=T(()=>{var x;return(x=e.errorMessages)!=null&&x.length?On(e.errorMessages).concat(o.value).slice(0,Math.max(0,Number(e.maxErrors))):o.value}),c=T(()=>{var S;let x=(e.validateOn??((S=i.validateOn)==null?void 0:S.value))||"input";x==="lazy"&&(x="input lazy"),x==="eager"&&(x="input eager");const P=new Set((x==null?void 0:x.split(" "))??[]);return{input:P.has("input"),blur:P.has("blur")||P.has("input")||P.has("invalid-input"),invalidInput:P.has("invalid-input"),lazy:P.has("lazy"),eager:P.has("eager")}}),d=T(()=>{var x;return e.error||(x=e.errorMessages)!=null&&x.length?!1:e.rules.length?a.value?o.value.length||c.value.lazy?null:!0:!o.value.length:!0}),f=Ae(!1),p=T(()=>({[`${t}--error`]:d.value===!1,[`${t}--dirty`]:l.value,[`${t}--disabled`]:i.isDisabled.value,[`${t}--readonly`]:i.isReadonly.value})),v=on("validation"),m=T(()=>e.name??Z(n));ku(()=>{var x;(x=i.register)==null||x.call(i,{id:m.value,vm:v,validate:w,reset:y,resetValidation:b})}),Cn(()=>{var x;(x=i.unregister)==null||x.call(i,m.value)}),wt(async()=>{var x;c.value.lazy||await w(!c.value.eager),(x=i.update)==null||x.call(i,m.value,d.value,u.value)}),Hr(()=>c.value.input||c.value.invalidInput&&d.value===!1,()=>{ke(s,()=>{if(s.value!=null)w();else if(e.focused){const x=ke(()=>e.focused,P=>{P||w(),x()})}})}),Hr(()=>c.value.blur,()=>{ke(()=>e.focused,x=>{x||w()})}),ke([d,u],()=>{var x;(x=i.update)==null||x.call(i,m.value,d.value,u.value)});async function y(){r.value=null,await Mt(),await b()}async function b(){a.value=!0,c.value.lazy?o.value=[]:await w(!c.value.eager)}async function w(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const P=[];f.value=!0;for(const S of e.rules){if(P.length>=Number(e.maxErrors??1))break;const R=await(typeof S=="function"?S:()=>S)(s.value);if(R!==!0){if(R!==!1&&typeof R!="string"){console.warn(`${R} is not a valid value. Rule functions must return boolean true or a string.`);continue}P.push(R||"")}}return o.value=P,f.value=!1,a.value=x,o.value}return{errorMessages:u,isDirty:l,isDisabled:i.isDisabled,isReadonly:i.isReadonly,isPristine:a,isValid:d,isValidating:f,reset:y,resetValidation:b,validate:w,validationClasses:p}}const al=ce({id:String,appendIcon:ze,centerAffix:{type:Boolean,default:!0},prependIcon:ze,hideDetails:[Boolean,String],hideSpinButtons:Boolean,hint:String,persistentHint:Boolean,messages:{type:[Array,String],default:()=>[]},direction:{type:String,default:"horizontal",validator:e=>["horizontal","vertical"].includes(e)},"onClick:prepend":Nn(),"onClick:append":Nn(),...Ve(),...Ar(),...xu(Or(),["maxWidth","minWidth","width"]),...$t(),...iG()},"VInput"),ds=_e()({name:"VInput",props:{...al()},emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:r,emit:s}=t;const{densityClasses:i}=gs(e),{dimensionStyles:o}=Mr(e),{themeClasses:a}=Yt(e),{rtlClasses:l}=Dr(),{InputIcon:u}=jA(e),c=gr(),d=T(()=>e.id||`input-${c}`),f=T(()=>`${d.value}-messages`),{errorMessages:p,isDirty:v,isDisabled:m,isReadonly:y,isPristine:b,isValid:w,isValidating:x,reset:P,resetValidation:S,validate:C,validationClasses:R}=oG(e,"v-input",d),k=T(()=>({id:d,messagesId:f,isDirty:v,isDisabled:m,isReadonly:y,isPristine:b,isValid:w,isValidating:x,reset:P,resetValidation:S,validate:C})),E=T(()=>{var I;return(I=e.errorMessages)!=null&&I.length||!b.value&&p.value.length?p.value:e.hint&&(e.persistentHint||e.focused)?e.hint:e.messages});return Ie(()=>{var M,z,H,G;const I=!!(r.prepend||e.prependIcon),A=!!(r.append||e.appendIcon),O=E.value.length>0,L=!e.hideDetails||e.hideDetails==="auto"&&(O||!!r.details);return h("div",{class:["v-input",`v-input--${e.direction}`,{"v-input--center-affix":e.centerAffix,"v-input--hide-spin-buttons":e.hideSpinButtons},i.value,a.value,l.value,R.value,e.class],style:[o.value,e.style]},[I&&h("div",{key:"prepend",class:"v-input__prepend"},[(M=r.prepend)==null?void 0:M.call(r,k.value),e.prependIcon&&h(u,{key:"prepend-icon",name:"prepend"},null)]),r.default&&h("div",{class:"v-input__control"},[(z=r.default)==null?void 0:z.call(r,k.value)]),A&&h("div",{key:"append",class:"v-input__append"},[e.appendIcon&&h(u,{key:"append-icon",name:"append"},null),(H=r.append)==null?void 0:H.call(r,k.value)]),L&&h("div",{id:f.value,class:"v-input__details",role:"alert","aria-live":"polite"},[h(nG,{active:O,messages:E.value},{message:r.message}),(G=r.details)==null?void 0:G.call(r,k.value)])])}),{reset:P,resetValidation:S,validate:C,isValid:w,errorMessages:p}}}),aG=["color","file","time","date","datetime-local","week","month"],KA=ce({autofocus:Boolean,counter:[Boolean,Number,String],counterValue:[Number,Function],prefix:String,placeholder:String,persistentPlaceholder:Boolean,persistentCounter:Boolean,suffix:String,role:String,type:{type:String,default:"text"},modelModifiers:Object,...al(),...vm()},"VTextField"),ut=_e()({name:"VTextField",directives:{Intersect:Pw},inheritAttrs:!1,props:KA(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const i=st(e,"modelValue"),{isFocused:o,focus:a,blur:l}=ju(e),u=T(()=>typeof e.counterValue=="function"?e.counterValue(i.value):typeof e.counterValue=="number"?e.counterValue:(i.value??"").toString().length),c=T(()=>{if(n.maxlength)return n.maxlength;if(!(!e.counter||typeof e.counter!="number"&&typeof e.counter!="string"))return e.counter}),d=T(()=>["plain","underlined"].includes(e.variant));function f(C,R){var k,E;!e.autofocus||!C||(E=(k=R[0].target)==null?void 0:k.focus)==null||E.call(k)}const p=V(),v=V(),m=V(),y=T(()=>aG.includes(e.type)||e.persistentPlaceholder||o.value||e.active);function b(){var C;m.value!==document.activeElement&&((C=m.value)==null||C.focus()),o.value||a()}function w(C){r("mousedown:control",C),C.target!==m.value&&(b(),C.preventDefault())}function x(C){b(),r("click:control",C)}function P(C){C.stopPropagation(),b(),Mt(()=>{i.value=null,Lp(e["onClick:clear"],C)})}function S(C){var k;const R=C.target;if(i.value=R.value,(k=e.modelModifiers)!=null&&k.trim&&["text","search","password","tel","url"].includes(e.type)){const E=[R.selectionStart,R.selectionEnd];Mt(()=>{R.selectionStart=E[0],R.selectionEnd=E[1]})}}return Ie(()=>{const C=!!(s.counter||e.counter!==!1&&e.counter!=null),R=!!(C||s.details),[k,E]=el(n),{modelValue:I,...A}=ds.filterProps(e),O=Fw(e);return h(ds,me({ref:p,modelValue:i.value,"onUpdate:modelValue":L=>i.value=L,class:["v-text-field",{"v-text-field--prefixed":e.prefix,"v-text-field--suffixed":e.suffix,"v-input--plain-underlined":d.value},e.class],style:e.style},k,A,{centerAffix:!d.value,focused:o.value}),{...s,default:L=>{let{id:M,isDisabled:z,isDirty:H,isReadonly:G,isValid:W}=L;return h(ym,me({ref:v,onMousedown:w,onClick:x,"onClick:clear":P,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"],role:e.role},O,{id:M.value,active:y.value||H.value,dirty:H.value||e.dirty,disabled:z.value,focused:o.value,error:W.value===!1}),{...s,default:Y=>{let{props:{class:X,...J}}=Y;const N=Bt(h("input",me({ref:m,value:i.value,onInput:S,autofocus:e.autofocus,readonly:G.value,disabled:z.value,name:e.name,placeholder:e.placeholder,size:1,type:e.type,onFocus:b,onBlur:l},J,E),null),[[hr("intersect"),{handler:f},null,{once:!0}]]);return h(Pe,null,[e.prefix&&h("span",{class:"v-text-field__prefix"},[h("span",{class:"v-text-field__prefix__text"},[e.prefix])]),s.default?h("div",{class:X,"data-no-activator":""},[s.default(),N]):Bi(N,{class:X}),e.suffix&&h("span",{class:"v-text-field__suffix"},[h("span",{class:"v-text-field__suffix__text"},[e.suffix])])])}})},details:R?L=>{var M;return h(Pe,null,[(M=s.details)==null?void 0:M.call(s,L),C&&h(Pe,null,[h("span",null,null),h(Dw,{active:e.persistentCounter||o.value,value:u.value,max:c.value,disabled:e.disabled},s.counter)])])}:void 0})}),Qi({},p,v,m)}}),lG=ce({id:String,text:String,...Ms(Ad({closeOnBack:!1,location:"end",locationStrategy:"connected",eager:!0,minWidth:0,offset:10,openOnClick:!1,openOnHover:!0,origin:"auto",scrim:!1,scrollStrategy:"reposition",transition:!1}),["absolute","persistent"])},"VTooltip"),nt=_e()({name:"VTooltip",props:lG(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=st(e,"modelValue"),{scopeId:s}=Ou(),i=gr(),o=T(()=>e.id||`v-tooltip-${i}`),a=V(),l=T(()=>e.location.split(" ").length>1?e.location:e.location+" center"),u=T(()=>e.origin==="auto"||e.origin==="overlap"||e.origin.split(" ").length>1||e.location.split(" ").length>1?e.origin:e.origin+" center"),c=T(()=>e.transition?e.transition:r.value?"scale-transition":"fade-transition"),d=T(()=>me({"aria-describedby":o.value},e.activatorProps));return Ie(()=>{const f=Vi.filterProps(e);return h(Vi,me({ref:a,class:["v-tooltip",e.class],style:e.style,id:o.value},f,{modelValue:r.value,"onUpdate:modelValue":p=>r.value=p,transition:c.value,absolute:!0,location:l.value,origin:u.value,persistent:!0,role:"tooltip",activatorProps:d.value,_disableGlobalStack:!0},s),{activator:n.activator,default:function(){var y;for(var p=arguments.length,v=new Array(p),m=0;m<p;m++)v[m]=arguments[m];return((y=n.default)==null?void 0:y.call(n,...v))??e.text}})}),Qi({},a)}}),uG={key:0,class:"d-flex justify-center static-disabled"},cG={key:1,class:"pulsating-red d-flex justify-center"},dG={key:0,class:"d-flex justify-center"},fG={key:0},hG={key:1},pG={key:1},mG={key:0},gG={key:1},vG={key:0},yG={key:1},bG={key:0},wG={key:1},SG={key:2},_G=$e({__name:"FileExplorerSideNav",setup(e){const t=Lt(),n=nr(),r=Zi(),s=V(36),i=V(void 0),o=V(void 0),a=V(!1),l=V(!0),u=T(()=>t.sideNavPrinter),c=T(()=>{var ne;return(ne=u.value)==null?void 0:ne.id}),d=T(()=>c.value?n.isApiResponding(c.value):!1),f=T(()=>{var ne;return OA((ne=u.value)==null?void 0:ne.printerType)}),p=T(()=>{var ne;return MA((ne=u.value)==null?void 0:ne.printerType)}),v=T(()=>{var ne;return DA((ne=u.value)==null?void 0:ne.printerType)}),m=T(()=>c.value?n.isPrinterOperational(c.value):!1),y=T(()=>{var ne;return(ne=u.value)==null?void 0:ne.enabled}),b=T(()=>{var ne,U;return!!((U=(ne=u.value)==null?void 0:ne.disabledReason)!=null&&U.length)}),w=T(()=>c.value?n.isPrinterPrinting(c.value):!1),x=T(()=>{var ne;return(ne=o.value)!=null&&ne.length?o.value.filter(U=>{var De;return(De=i.value)!=null&&De.length?`${U.path}`.toLowerCase().includes(i.value):!0})||[]:[]}),P=T(()=>!u.value||!c.value?!1:n.isPrinterStoppable(c.value)),S=T(()=>!u.value||!c.value?!1:n.isPrinterPaused(c.value)),C=T(()=>{var ne;return c.value?((ne=o.value)==null?void 0:ne.length)&&n.isApiResponding(c.value):!1}),R=T(()=>{if(!c.value)throw new Error("Printer ID not set, cannot get current job");return n.printerJobsById[c.value]}),k=T(()=>{if(!c.value)throw new Error("Printer ID not set, cannot get current printing file name");return n.printingFilePathsByPrinterId[c.value]}),E=T(()=>{var F;if(!c.value||!u.value)return null;const ne=n.printerEventsById[c.value],U=n.socketStatesById[c.value],De=eA(u.value,U,ne);return((F=Ns().frontendDebugSettings)==null?void 0:F.showInterpretedPrinterState)&&console.debug("[FileExplorerSideNav] rendered for printerId",c.value,De==null?void 0:De.text,De==null?void 0:De.color,De==null?void 0:De.rgb),De}),I=async()=>{var U;l.value=!0;const ne=(U=u.value)==null?void 0:U.id;if(ne)try{n.isApiResponding(ne)?o.value=await t.loadPrinterFiles(ne):o.value=await Li.getFileCache(ne)}finally{l.value=!1}},A=async ne=>{c.value&&await t.deletePrinterFile(c.value,ne.path)};ke(u,async(ne,U)=>{a.value=!!ne;const De=ne==null?void 0:ne.id;!ne||!De||(!o.value||ne.id!==(U==null?void 0:U.id)||!U)&&await I()}),ke(a,ne=>{ne||t.setSideNavPrinter(void 0)});function O(ne){return ne?ne==null?void 0:ne.toFixed(1):""}function L(ne){return c.value?n.printingFilePathsByPrinterId[c.value]===ne.path:!1}function M(){const ne=u.value;if(ne&&a.value)return hm(ne.name)}function z(){u.value&&(Qt.openPrinterURL(u.value.printerURL),de())}function H(){if(!u.value)return;const ne=new URL(u.value.printerURL);ne.port="8080",Qt.openPrinterURL(ne.toString()),de()}async function G(){if(c.value){if(n.isPrinterOperational(c.value))return await Qt.sendPrinterDisconnectCommand(c.value);await Qt.sendPrinterConnectCommand(c.value)}}async function W(){if(!c.value)throw new Error("Printer ID not set, cant toggle enabled");if(!u.value)throw new Error("Cant toggle enabled, sidenav printer unset");const ne=!u.value.enabled;await Qt.toggleEnabled(c.value,ne)}async function Y(){if(!c.value)throw new Error("Printer ID not set, cant toggle maintenance");if(!u.value)throw new Error("Cant toggle enabled, sidenav printer unset");if(b.value){await Qt.updatePrinterMaintenance(c.value);return}t.setMaintenanceDialogPrinter(u.value),await tn(nn.PrinterMaintenanceDialog).openDialog(),de()}async function X(){c.value&&await Qt.refreshSocket(c.value)}async function J(){c.value&&confirm("Are you sure to cancel the current print job?")&&await Fa.stopPrintJob(c.value)}async function N(){c.value&&await Fa.pausePrintJob(c.value)}async function K(){c.value&&await Fa.resumePrintJob(c.value)}async function he(){c.value&&confirm("Are you sure to delete all files for this printer?")&&(l.value=!0,await t.deletePrinterFiles(c.value),l.value=!1,o.value=t.printerFiles(c.value))}function oe(){u.value&&(t.setUpdateDialogPrinter(u.value),tn(nn.AddOrUpdatePrinterDialog).openDialog(),de())}async function we(ne){c.value&&await n.selectAndPrintFile({printerId:c.value,fullPath:ne.path})}function ee(ne){c.value&&Li.downloadFile(c.value,ne)}function de(){t.setSideNavPrinter(void 0)}return(ne,U)=>{const De=hr("drop-upload");return D(),te(Mw,{modelValue:a.value,"onUpdate:modelValue":U[14]||(U[14]=He=>a.value=He),loading:"true",absolute:"",location:"right",scrim:"white",temporary:"",width:"700",onClose:U[15]||(U[15]=He=>de())},{default:g(()=>{var He,F,B;return[u.value?(D(),te(Be,{key:0,lines:"two"},{prepend:g(()=>[h(nt,{location:"left"},{activator:g(({props:q})=>[h(se,me({size:s.value},q,{icon:"",class:"mr-4 mt-1",color:"primary",onClick:U[0]||(U[0]=fe=>z()),onMouseup:U[1]||(U[1]=Pt(fe=>z(),["middle"]))}),{default:g(()=>[h(lt,{size:s.value,class:"font-weight-bold",color:"primary"},{default:g(()=>[_(re(M()),1)]),_:1},8,["size"])]),_:2},1040,["size"])]),default:g(()=>[$("span",null," Visit the "+re(v.value)+" associated to this printer ",1)]),_:1})]),default:g(()=>[h(dt,{class:"font-weight-bold"},{default:g(()=>[_(re(u.value.name),1)]),_:1}),h(yt),h(WW,null,{default:g(()=>{var q,fe,ae,ye;return[!y.value||!d.value?(D(),ge("strong",uG,re(y.value?"Enabled":"Disabled")+" - "+re(d.value?(fe=(q=E.value)==null?void 0:q.text)==null?void 0:fe.toUpperCase():"Offline"),1)):ue("",!0),y.value&&((ae=E.value)!=null&&ae.text)&&m.value&&d.value?(D(),ge("strong",cG," Enabled - "+re((ye=E.value)==null?void 0:ye.text),1)):ue("",!0)]}),_:1}),R.value?(D(),te(yt,{key:0},{default:g(()=>{var q,fe,ae,ye;return[(q=R.value)!=null&&q.progress?(D(),ge("span",dG," Progress: "+re(O((fe=R.value)==null?void 0:fe.progress.completion))+"% ",1)):ue("",!0),(ae=R.value)!=null&&ae.progress?(D(),te(ou,{key:1,"model-value":O((ye=R.value.progress)==null?void 0:ye.completion),class:"mt-1 mb-1",height:"8px"},null,8,["model-value"])):ue("",!0),h(nt,{location:"bottom"},{activator:g(({props:Ce})=>[h(se,me({variant:"outlined",size:"small"},Ce),{default:g(()=>[_(re(k.value),1)]),_:2},1040)]),default:g(()=>[$("span",null,re(k.value),1)]),_:1})]}),_:1})):ue("",!0)]),_:1})):ue("",!0),!y.value||!d.value?(D(),te(rn,{key:1,color:"primary"},{default:g(()=>[y.value?(D(),ge("span",hG,[_(" This "+re(v.value)+" seems unreachable... Will keep trying for you ",1),h(Q,null,{default:g(()=>U[16]||(U[16]=[_("hourglass_top")])),_:1})])):(D(),ge("span",fG," Disabled "+re(v.value)+", enable it first to get live updates ",1))]),_:1})):ue("",!0),!((He=u.value)!=null&&He.enabled)&&!((F=u.value)!=null&&F.disabledReason)?(D(),te(rn,{key:2,color:"secondary"},{default:g(()=>[_(" This "+re(v.value)+" was disabled without reason. ",1)]),_:1})):ue("",!0),(B=u.value)!=null&&B.disabledReason?(D(),te(rn,{key:3,color:"black"},{default:g(()=>{var q;return[_(" This "+re(v.value)+" was disabled for maintenance: ",1),U[17]||(U[17]=$("br",null,null,-1)),$("small",null," "+re((q=u.value)==null?void 0:q.disabledReason),1)]}),_:1})):ue("",!0),h(dn),Bt((D(),te(Vt,{density:"compact"},{default:g(()=>[h(Wr,{inset:""},{default:g(()=>U[18]||(U[18]=[_(" Manage FDM Monster instance ")])),_:1}),h(nt,{location:"left"},{activator:g(({props:q})=>[h(Be,me({class:"extra-dense-list-item",link:""},q,{onClick:U[2]||(U[2]=Pt(fe=>z(),["prevent","stop"]))}),{prepend:g(()=>[h(lt,{class:"ml-3 mr-6 ma-5",size:s.value},{default:g(()=>[f.value?(D(),te(cs,{key:0,src:e6})):(D(),ge("span",pG,"MO"))]),_:1},8,["size"])]),default:g(()=>[$("span",null," Open "+re(v.value),1)]),_:2},1040)]),default:g(()=>[$("span",null," Visit the "+re(v.value)+" associated to this printer ",1)]),_:1}),p.value?(D(),te(nt,{key:0,location:"left"},{activator:g(({props:q})=>[h(Be,me({class:"extra-dense-list-item",link:""},q,{onClick:U[3]||(U[3]=Pt(fe=>H(),["prevent","stop"]))}),{prepend:g(()=>[h(lt,{class:"ml-3 mr-6 ma-5",size:s.value},{default:g(()=>U[19]||(U[19]=[$("span",null,"MA",-1)])),_:1},8,["size"])]),default:g(()=>[U[20]||(U[20]=$("span",null," Open Mainsail ",-1))]),_:2},1040)]),default:g(()=>[U[21]||(U[21]=$("span",null," Visit the Mainsail for this printer ",-1))]),_:1})):ue("",!0),h(nt,{location:"left"},{activator:g(({props:q})=>[h(Be,me({class:"extra-dense-list-item",link:""},q,{onClick:U[4]||(U[4]=Pt(fe=>W(),["prevent","stop"]))}),{prepend:g(()=>[h(lt,{size:s.value,color:"grey-lighten-1"},{default:g(()=>[h(Q,{color:y.value?"primary":"green"},{default:g(()=>U[22]||(U[22]=[_(" dns ")])),_:1},8,["color"])]),_:1},8,["size"])]),default:g(()=>[y.value?(D(),ge("span",mG," Disable Printer Location ")):y.value?ue("",!0):(D(),ge("span",gG," Enable Printer Location "))]),_:2},1040)]),default:g(()=>[U[23]||(U[23]=$("span",null," Deactivate connection, without impacting print ",-1))]),_:1}),h(nt,{location:"left"},{activator:g(({props:q})=>[h(Be,me({class:"extra-dense-list-item",link:""},q,{onClick:U[5]||(U[5]=Pt(fe=>Y(),["prevent","stop"]))}),{default:g(()=>[h(lt,{size:s.value,color:"grey-lighten-1"},{default:g(()=>[h(Q,{color:b.value?"green":"primary"},{default:g(()=>U[24]||(U[24]=[_(" construction ")])),_:1},8,["color"])]),_:1},8,["size"]),b.value?b.value?(D(),ge("span",yG," Complete Maintenance ")):ue("",!0):(D(),ge("span",vG," Enable Maintenance "))]),_:2},1040)]),default:g(()=>[U[25]||(U[25]=$("span",null," Deactivate, set under repair, without impacting print ",-1))]),_:1}),h(nt,{location:"left"},{activator:g(({props:q})=>[h(Be,me({class:"extra-dense-list-item",link:""},q,{onClick:U[6]||(U[6]=Pt(fe=>X(),["prevent","stop"]))}),{default:g(()=>[h(lt,{size:s.value},{default:g(()=>[h(Q,{color:b.value?"green":"primary",class:"grey-lighten-1"},{default:g(()=>U[26]||(U[26]=[_(" autorenew ")])),_:1},8,["color"])]),_:1},8,["size"]),U[27]||(U[27]=$("span",null,[_(" Refresh State "),$("small",null," - this does not affect the print! ")],-1))]),_:2},1040)]),default:g(()=>[U[28]||(U[28]=$("span",null," Let FDM Monster know you are experiencing inconsistencies, reset all volatile states ",-1))]),_:1}),h(dn),h(Wr,{inset:""},{default:g(()=>U[29]||(U[29]=[_(" Commands ")])),_:1}),h(nt,{location:"left"},{activator:g(({props:q})=>{var fe;return[h(Be,me({disabled:!((fe=u.value)!=null&&fe.enabled)||!d.value,class:"extra-dense-list-item",link:""},q,{onClick:U[7]||(U[7]=Pt(ae=>G(),["prevent","stop"]))}),{default:g(()=>[h(lt,{size:s.value},{default:g(()=>[h(Q,null,{default:g(()=>U[30]||(U[30]=[_(" usb ")])),_:1})]),_:1},8,["size"]),P.value?(D(),ge("span",bG," Disconnect USB & Stop Print ")):m.value?(D(),ge("span",wG," Disconnect USB ")):(D(),ge("span",SG," Connect USB "))]),_:2},1040,["disabled"])]}),default:g(()=>[U[31]||(U[31]=$("span",null," Disconnect USB, disrupting any print ",-1))]),_:1}),Z(r).hasFeature("pauseResumePrinterCommand")?(D(),te(nt,{key:1,location:"left"},{activator:g(({props:q})=>[h(Be,me({disabled:!d.value||!w.value,class:"extra-dense-list-item",link:""},q,{onClick:U[8]||(U[8]=Pt(fe=>S.value?K():N(),["prevent","stop"]))}),{default:g(()=>[h(lt,{size:s.value},{default:g(()=>[S.value?ue("",!0):(D(),te(Q,{key:0},{default:g(()=>U[32]||(U[32]=[_(" pause ")])),_:1})),S.value?(D(),te(Q,{key:1},{default:g(()=>U[33]||(U[33]=[_(" play_circle_outline ")])),_:1})):ue("",!0)]),_:1},8,["size"]),_(" "+re(S.value?"Resume print":"Pause print"),1)]),_:2},1040,["disabled"])]),default:g(()=>[U[34]||(U[34]=$("span",null," Send Pause or Resume command ",-1))]),_:1})):ue("",!0),h(nt,{location:"left"},{activator:g(({props:q})=>[h(Be,me({disabled:!P.value,class:"extra-dense-list-item",link:""},q,{onClick:U[9]||(U[9]=Pt(fe=>J(),["prevent","stop"]))}),{default:g(()=>[h(lt,{size:s.value},{default:g(()=>[h(Q,null,{default:g(()=>U[35]||(U[35]=[_(" stop ")])),_:1})]),_:1},8,["size"]),U[36]||(U[36]=_(" Cancel print "))]),_:2},1040,["disabled"])]),default:g(()=>[U[37]||(U[37]=$("span",null," Cancel print gracefully ",-1))]),_:1}),h(nt,{location:"left"},{activator:g(({props:q})=>[h(Be,me({disabled:!C.value,class:"extra-dense-list-item",link:""},q,{onClick:U[10]||(U[10]=Pt(fe=>he(),["prevent","stop"]))}),{default:g(()=>[h(lt,{size:s.value},{default:g(()=>[h(Q,null,{default:g(()=>U[38]||(U[38]=[_(" delete ")])),_:1})]),_:1},8,["size"]),U[39]||(U[39]=_(" Delete files "))]),_:2},1040,["disabled"])]),default:g(()=>[U[40]||(U[40]=$("span",null," Clear all files present on OctoPrint (local) ",-1))]),_:1}),h(nt,{location:"left"},{activator:g(({props:q})=>[h(Be,me({class:"extra-dense-list-item",link:""},q,{onClick:U[11]||(U[11]=Pt(fe=>I(),["prevent","stop"]))}),{default:g(()=>[h(lt,{size:s.value},{default:g(()=>[h(Q,null,{default:g(()=>U[41]||(U[41]=[_(" refresh ")])),_:1})]),_:1},8,["size"]),U[42]||(U[42]=_(" Refresh files "))]),_:2},1040)]),default:g(()=>[U[43]||(U[43]=$("span",null," Rebuild the file list on OctoPrint (local) ",-1))]),_:1}),h(nt,{location:"left"},{activator:g(({props:q})=>[h(Be,me({class:"extra-dense-list-item",link:""},q,{onClick:U[12]||(U[12]=Pt(fe=>oe(),["prevent","stop"]))}),{default:g(()=>[h(lt,{size:s.value},{default:g(()=>[h(Q,null,{default:g(()=>U[44]||(U[44]=[_(" settings ")])),_:1})]),_:1},8,["size"]),U[45]||(U[45]=_(" Settings "))]),_:2},1040)]),default:g(()=>[U[46]||(U[46]=$("span",null," Edit the printer settings ",-1))]),_:1})]),_:1})),[[De,{printers:[u.value]}]]),h(dn),Bt((D(),te(Vt,{density:"compact"},{default:g(()=>[h(Wr,{inset:""},{default:g(()=>U[47]||(U[47]=[_(" Files - drag 'n drop! ")])),_:1}),h(ut,{modelValue:i.value,"onUpdate:modelValue":U[13]||(U[13]=q=>i.value=q),class:"ml-5 mr-5",clearable:"",label:"Search files...","prepend-icon":"search"},null,8,["modelValue"]),x.value.length?ue("",!0):(D(),te(Be,{key:0},{default:g(()=>[h(lt,{size:s.value},{default:g(()=>[h(Q,null,{default:g(()=>U[48]||(U[48]=[_(" clear ")])),_:1})]),_:1},8,["size"]),h(dt,null,{default:g(()=>U[49]||(U[49]=[_(" No files to show ")])),_:1})]),_:1})),l.value?(D(),te(ou,{key:1,indeterminate:""})):ue("",!0),(D(!0),ge(Pe,null,Wt(x.value,(q,fe)=>(D(),te(Be,{key:fe,density:"compact",link:"",style:{"padding-top":"0"}},{default:g(()=>[h(lt,{size:s.value},{default:g(()=>[h(nt,{location:"left"},{activator:g(({props:ae})=>[h(se,me({ref_for:!0},ae,{onClick:ye=>ee(q.path)}),{default:g(()=>[h(Q,null,{default:g(()=>U[50]||(U[50]=[_(" download ")])),_:1})]),_:2},1040,["onClick"])]),default:g(()=>[U[51]||(U[51]=$("span",null," Download GCode ",-1))]),_:2},1024)]),_:2},1032,["size"]),h(vu,null,{default:g(()=>[h(nt,{location:"left"},{activator:g(({props:ae})=>[h(se,me({disabled:L(q),icon:"",ref_for:!0},ae,{onClick:ye=>we(q)}),{default:g(()=>[h(Q,null,{default:g(()=>U[52]||(U[52]=[_(" play_arrow ")])),_:1})]),_:2},1040,["disabled","onClick"])]),default:g(()=>[U[53]||(U[53]=$("span",null," Select & Print ",-1))]),_:2},1024)]),_:2},1024),h(nt,{location:"left"},{activator:g(({props:ae})=>[$("span",me({class:{"current-file-print":L(q)},ref_for:!0},ae),re(q.path),17)]),default:g(()=>[$("span",null,[_(" File: "+re(q.path)+" ",1),U[54]||(U[54]=$("br",null,null,-1)),_(" Size: "+re(Z(AA)(q.size))+" ",1),U[55]||(U[55]=$("br",null,null,-1)),$("strong",null,re(L(q)?"Printing":"Unused"),1)])]),_:2},1024),h(vu,null,{default:g(()=>[h(nt,{location:"left"},{activator:g(({props:ae})=>[h(se,me({disabled:L(q),ref_for:!0},ae,{onClick:ye=>A(q)}),{default:g(()=>[h(Q,{color:"grey-lighten-1"},{default:g(()=>U[56]||(U[56]=[_(" delete ")])),_:1})]),_:2},1040,["disabled","onClick"])]),default:g(()=>[U[57]||(U[57]=$("span",null," Delete file ",-1))]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1})),[[De,{printers:[u.value]}]])]}),_:1},8,["modelValue"])}}});class sp extends vr{static async downloadYamlExport(t){const r=await(await Wn()).request({method:"POST",url:"api/server/export-printers-floors-yaml",data:t,responseType:"arraybuffer"});wy(r.data,"export-fdm-monster-"+Date.now()+".yaml")}static async uploadAndImportYaml(t){const n=new FormData;return n.append("file",t),await this.postUpload("api/server/import-printers-floors-yaml",n,{})}static async downloadLogDump(){const n=await(await Wn()).request({method:"POST",url:"api/server/dump-fdm-monster-logs",responseType:"arraybuffer"});wy(n.data,"logs-fdm-monster-"+Date.now()+".zip")}static async clearLogFilesOlderThanWeek(){return await this.delete("api/server/clear-outdated-fdm-monster-logs")}}const YA=Symbol.for("vuetify:selection-control-group"),Lw=ce({color:String,disabled:{type:Boolean,default:null},defaultsTarget:String,error:Boolean,id:String,inline:Boolean,falseIcon:ze,trueIcon:ze,ripple:{type:[Boolean,Object],default:!0},multiple:{type:Boolean,default:null},name:String,readonly:{type:Boolean,default:null},modelValue:null,type:String,valueComparator:{type:Function,default:Rs},...Ve(),...Ar(),...$t()},"SelectionControlGroup"),kG=ce({...Lw({defaultsTarget:"VSelectionControl"})},"VSelectionControlGroup"),xG=_e()({name:"VSelectionControlGroup",props:kG(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=st(e,"modelValue"),s=gr(),i=T(()=>e.id||`v-selection-control-group-${s}`),o=T(()=>e.name||i.value),a=new Set;return Gt(YA,{modelValue:r,forceUpdate:()=>{a.forEach(l=>l())},onForceUpdate:l=>{a.add(l),Sn(()=>{a.delete(l)})}}),Ir({[e.defaultsTarget]:{color:Re(e,"color"),disabled:Re(e,"disabled"),density:Re(e,"density"),error:Re(e,"error"),inline:Re(e,"inline"),modelValue:r,multiple:T(()=>!!e.multiple||e.multiple==null&&Array.isArray(r.value)),name:o,falseIcon:Re(e,"falseIcon"),trueIcon:Re(e,"trueIcon"),readonly:Re(e,"readonly"),ripple:Re(e,"ripple"),type:Re(e,"type"),valueComparator:Re(e,"valueComparator")}}),Ie(()=>{var l;return h("div",{class:["v-selection-control-group",{"v-selection-control-group--inline":e.inline},e.class],style:e.style,role:e.type==="radio"?"radiogroup":void 0},[(l=n.default)==null?void 0:l.call(n)])}),{}}}),bm=ce({label:String,baseColor:String,trueValue:null,falseValue:null,value:null,...Ve(),...Lw()},"VSelectionControl");function EG(e){const t=Xe(YA,void 0),{densityClasses:n}=gs(e),r=st(e,"modelValue"),s=T(()=>e.trueValue!==void 0?e.trueValue:e.value!==void 0?e.value:!0),i=T(()=>e.falseValue!==void 0?e.falseValue:!1),o=T(()=>!!e.multiple||e.multiple==null&&Array.isArray(r.value)),a=T({get(){const p=t?t.modelValue.value:r.value;return o.value?On(p).some(v=>e.valueComparator(v,s.value)):e.valueComparator(p,s.value)},set(p){if(e.readonly)return;const v=p?s.value:i.value;let m=v;o.value&&(m=p?[...On(r.value),v]:On(r.value).filter(y=>!e.valueComparator(y,s.value))),t?t.modelValue.value=m:r.value=m}}),{textColorClasses:l,textColorStyles:u}=As(T(()=>{if(!(e.error||e.disabled))return a.value?e.color:e.baseColor})),{backgroundColorClasses:c,backgroundColorStyles:d}=fr(T(()=>a.value&&!e.error&&!e.disabled?e.color:e.baseColor)),f=T(()=>a.value?e.trueIcon:e.falseIcon);return{group:t,densityClasses:n,trueValue:s,falseValue:i,model:a,textColorClasses:l,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,icon:f}}const Xa=_e()({name:"VSelectionControl",directives:{Ripple:Au},inheritAttrs:!1,props:bm(),emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const{group:s,densityClasses:i,icon:o,model:a,textColorClasses:l,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,trueValue:f}=EG(e),p=gr(),v=Ae(!1),m=Ae(!1),y=V(),b=T(()=>e.id||`input-${p}`),w=T(()=>!e.disabled&&!e.readonly);s==null||s.onForceUpdate(()=>{y.value&&(y.value.checked=a.value)});function x(R){w.value&&(v.value=!0,Ah(R.target,":focus-visible")!==!1&&(m.value=!0))}function P(){v.value=!1,m.value=!1}function S(R){R.stopPropagation()}function C(R){if(!w.value){y.value&&(y.value.checked=a.value);return}e.readonly&&s&&Mt(()=>s.forceUpdate()),a.value=R.target.checked}return Ie(()=>{var A,O;const R=r.label?r.label({label:e.label,props:{for:b.value}}):e.label,[k,E]=el(n),I=h("input",me({ref:y,checked:a.value,disabled:!!e.disabled,id:b.value,onBlur:P,onFocus:x,onInput:C,"aria-disabled":!!e.disabled,"aria-label":e.label,type:e.type,value:f.value,name:e.name,"aria-checked":e.type==="checkbox"?a.value:void 0},E),null);return h("div",me({class:["v-selection-control",{"v-selection-control--dirty":a.value,"v-selection-control--disabled":e.disabled,"v-selection-control--error":e.error,"v-selection-control--focused":v.value,"v-selection-control--focus-visible":m.value,"v-selection-control--inline":e.inline},i.value,e.class]},k,{style:e.style}),[h("div",{class:["v-selection-control__wrapper",l.value],style:u.value},[(A=r.default)==null?void 0:A.call(r,{backgroundColorClasses:c,backgroundColorStyles:d}),Bt(h("div",{class:["v-selection-control__input"]},[((O=r.input)==null?void 0:O.call(r,{model:a,textColorClasses:l,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,inputNode:I,icon:o.value,props:{onFocus:x,onBlur:P,id:b.value}}))??h(Pe,null,[o.value&&h(Q,{key:"icon",icon:o.value},null),I])]),[[hr("ripple"),e.ripple&&[!e.disabled&&!e.readonly,null,["center","circle"]]]])]),R&&h($w,{for:b.value,onClick:S},{default:()=>[R]})])}),{isFocused:v,input:y}}}),XA=ce({indeterminate:Boolean,indeterminateIcon:{type:ze,default:"$checkboxIndeterminate"},...bm({falseIcon:"$checkboxOff",trueIcon:"$checkboxOn"})},"VCheckboxBtn"),yu=_e()({name:"VCheckboxBtn",props:XA(),emits:{"update:modelValue":e=>!0,"update:indeterminate":e=>!0},setup(e,t){let{slots:n}=t;const r=st(e,"indeterminate"),s=st(e,"modelValue");function i(l){r.value&&(r.value=!1)}const o=T(()=>r.value?e.indeterminateIcon:e.falseIcon),a=T(()=>r.value?e.indeterminateIcon:e.trueIcon);return Ie(()=>{const l=Ms(Xa.filterProps(e),["modelValue"]);return h(Xa,me(l,{modelValue:s.value,"onUpdate:modelValue":[u=>s.value=u,i],class:["v-checkbox-btn",e.class],style:e.style,type:"checkbox",falseIcon:o.value,trueIcon:a.value,"aria-checked":r.value?"mixed":void 0}),n)}),{}}}),CG=ce({...al(),...Ms(XA(),["inline"])},"VCheckbox"),yn=_e()({name:"VCheckbox",inheritAttrs:!1,props:CG(),emits:{"update:modelValue":e=>!0,"update:focused":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const s=st(e,"modelValue"),{isFocused:i,focus:o,blur:a}=ju(e),l=gr(),u=T(()=>e.id||`checkbox-${l}`);return Ie(()=>{const[c,d]=el(n),f=ds.filterProps(e),p=yu.filterProps(e);return h(ds,me({class:["v-checkbox",e.class]},c,f,{modelValue:s.value,"onUpdate:modelValue":v=>s.value=v,id:u.value,focused:i.value,style:e.style}),{...r,default:v=>{let{id:m,messagesId:y,isDisabled:b,isReadonly:w,isValid:x}=v;return h(yu,me(p,{id:m.value,"aria-describedby":y.value,disabled:b.value,readonly:w.value},d,{error:x.value===!1,modelValue:s.value,"onUpdate:modelValue":P=>s.value=P,onFocus:o,onBlur:a}),r)}})}),{}}}),PG=ce({chips:Boolean,counter:Boolean,counterSizeString:{type:String,default:"$vuetify.fileInput.counterSize"},counterString:{type:String,default:"$vuetify.fileInput.counter"},hideInput:Boolean,multiple:Boolean,showSize:{type:[Boolean,Number,String],default:!1,validator:e=>typeof e=="boolean"||[1e3,1024].includes(Number(e))},...al({prependIcon:"$file"}),modelValue:{type:[Array,Object],default:e=>e.multiple?[]:null,validator:e=>On(e).every(t=>t!=null&&typeof t=="object")},...vm({clearable:!0})},"VFileInput"),QA=_e()({name:"VFileInput",inheritAttrs:!1,props:PG(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{t:i}=Kr(),o=st(e,"modelValue",e.modelValue,A=>On(A),A=>!e.multiple&&Array.isArray(A)?A[0]:A),{isFocused:a,focus:l,blur:u}=ju(e),c=T(()=>typeof e.showSize!="boolean"?e.showSize:void 0),d=T(()=>(o.value??[]).reduce((A,O)=>{let{size:L=0}=O;return A+L},0)),f=T(()=>E_(d.value,c.value)),p=T(()=>(o.value??[]).map(A=>{const{name:O="",size:L=0}=A;return e.showSize?`${O} (${E_(L,c.value)})`:O})),v=T(()=>{var O;const A=((O=o.value)==null?void 0:O.length)??0;return e.showSize?i(e.counterSizeString,A,f.value):i(e.counterString,A)}),m=V(),y=V(),b=V(),w=T(()=>a.value||e.active),x=T(()=>["plain","underlined"].includes(e.variant));function P(){var A;b.value!==document.activeElement&&((A=b.value)==null||A.focus()),a.value||l()}function S(A){var O;(O=b.value)==null||O.click()}function C(A){r("mousedown:control",A)}function R(A){var O;(O=b.value)==null||O.click(),r("click:control",A)}function k(A){A.stopPropagation(),P(),Mt(()=>{o.value=[],Lp(e["onClick:clear"],A)})}function E(A){A.preventDefault()}function I(A){A.preventDefault(),A.dataTransfer&&(o.value=[...A.dataTransfer.files??[]])}return ke(o,A=>{(!Array.isArray(A)||!A.length)&&b.value&&(b.value.value="")}),Ie(()=>{const A=!!(s.counter||e.counter),O=!!(A||s.details),[L,M]=el(n),{modelValue:z,...H}=ds.filterProps(e),G=Fw(e);return h(ds,me({ref:m,modelValue:e.multiple?o.value:o.value[0],class:["v-file-input",{"v-file-input--chips":!!e.chips,"v-file-input--hide":e.hideInput,"v-input--plain-underlined":x.value},e.class],style:e.style,"onClick:prepend":S},L,H,{centerAffix:!x.value,focused:a.value}),{...s,default:W=>{let{id:Y,isDisabled:X,isDirty:J,isReadonly:N,isValid:K}=W;return h(ym,me({ref:y,"prepend-icon":e.prependIcon,onMousedown:C,onClick:R,"onClick:clear":k,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"]},G,{id:Y.value,active:w.value||J.value,dirty:J.value||e.dirty,disabled:X.value,focused:a.value,error:K.value===!1,onDragover:E,onDrop:I}),{...s,default:he=>{var ee;let{props:{class:oe,...we}}=he;return h(Pe,null,[h("input",me({ref:b,type:"file",readonly:N.value,disabled:X.value,multiple:e.multiple,name:e.name,onClick:de=>{de.stopPropagation(),N.value&&de.preventDefault(),P()},onChange:de=>{if(!de.target)return;const ne=de.target;o.value=[...ne.files??[]]},onFocus:P,onBlur:u},we,M),null),h("div",{class:oe},[!!((ee=o.value)!=null&&ee.length)&&!e.hideInput&&(s.selection?s.selection({fileNames:p.value,totalBytes:d.value,totalBytesReadable:f.value}):e.chips?p.value.map(de=>h(_n,{key:de,size:"small",text:de},null)):p.value.join(", "))])])}})},details:O?W=>{var Y,X;return h(Pe,null,[(Y=s.details)==null?void 0:Y.call(s,W),A&&h(Pe,null,[h("span",null,null),h(Dw,{active:!!((X=o.value)!=null&&X.length),value:v.value,disabled:e.disabled},s.counter)])])}:void 0})}),Qi({},m,y,b)}}),TG=ce({...bm({falseIcon:"$radioOff",trueIcon:"$radioOn"})},"VRadio"),Cy=_e()({name:"VRadio",props:TG(),setup(e,t){let{slots:n}=t;return Ie(()=>{const r=Xa.filterProps(e);return h(Xa,me(r,{class:["v-radio",e.class],style:e.style,type:"radio"}),n)}),{}}}),RG=ce({height:{type:[Number,String],default:"auto"},...al(),...Ms(Lw(),["multiple"]),trueIcon:{type:ze,default:"$radioOn"},falseIcon:{type:ze,default:"$radioOff"},type:{type:String,default:"radio"}},"VRadioGroup"),JA=_e()({name:"VRadioGroup",inheritAttrs:!1,props:RG(),emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const s=gr(),i=T(()=>e.id||`radio-group-${s}`),o=st(e,"modelValue");return Ie(()=>{const[a,l]=el(n),u=ds.filterProps(e),c=Xa.filterProps(e),d=r.label?r.label({label:e.label,props:{for:i.value}}):e.label;return h(ds,me({class:["v-radio-group",e.class],style:e.style},a,u,{modelValue:o.value,"onUpdate:modelValue":f=>o.value=f,id:i.value}),{...r,default:f=>{let{id:p,messagesId:v,isDisabled:m,isReadonly:y}=f;return h(Pe,null,[d&&h($w,{id:p.value},{default:()=>[d]}),h(xG,me(c,{id:p.value,"aria-describedby":v.value,defaultsTarget:"VRadio",trueIcon:e.trueIcon,falseIcon:e.falseIcon,type:e.type,disabled:m.value,readonly:y.value,"aria-labelledby":d?p.value:void 0,multiple:!1},l,{modelValue:o.value,"onUpdate:modelValue":b=>o.value=b}),r)])}})}),{}}}),IG=ce({autoGrow:Boolean,autofocus:Boolean,counter:[Boolean,Number,String],counterValue:Function,prefix:String,placeholder:String,persistentPlaceholder:Boolean,persistentCounter:Boolean,noResize:Boolean,rows:{type:[Number,String],default:5,validator:e=>!isNaN(parseFloat(e))},maxRows:{type:[Number,String],validator:e=>!isNaN(parseFloat(e))},suffix:String,modelModifiers:Object,...al(),...vm()},"VTextarea"),ZA=_e()({name:"VTextarea",directives:{Intersect:Pw},inheritAttrs:!1,props:IG(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const i=st(e,"modelValue"),{isFocused:o,focus:a,blur:l}=ju(e),u=T(()=>typeof e.counterValue=="function"?e.counterValue(i.value):(i.value||"").toString().length),c=T(()=>{if(n.maxlength)return n.maxlength;if(!(!e.counter||typeof e.counter!="number"&&typeof e.counter!="string"))return e.counter});function d(A,O){var L,M;!e.autofocus||!A||(M=(L=O[0].target)==null?void 0:L.focus)==null||M.call(L)}const f=V(),p=V(),v=Ae(""),m=V(),y=T(()=>e.persistentPlaceholder||o.value||e.active);function b(){var A;m.value!==document.activeElement&&((A=m.value)==null||A.focus()),o.value||a()}function w(A){b(),r("click:control",A)}function x(A){r("mousedown:control",A)}function P(A){A.stopPropagation(),b(),Mt(()=>{i.value="",Lp(e["onClick:clear"],A)})}function S(A){var L;const O=A.target;if(i.value=O.value,(L=e.modelModifiers)!=null&&L.trim){const M=[O.selectionStart,O.selectionEnd];Mt(()=>{O.selectionStart=M[0],O.selectionEnd=M[1]})}}const C=V(),R=V(Number(e.rows)),k=T(()=>["plain","underlined"].includes(e.variant));Mn(()=>{e.autoGrow||(R.value=Number(e.rows))});function E(){e.autoGrow&&Mt(()=>{if(!C.value||!p.value)return;const A=getComputedStyle(C.value),O=getComputedStyle(p.value.$el),L=parseFloat(A.getPropertyValue("--v-field-padding-top"))+parseFloat(A.getPropertyValue("--v-input-padding-top"))+parseFloat(A.getPropertyValue("--v-field-padding-bottom")),M=C.value.scrollHeight,z=parseFloat(A.lineHeight),H=Math.max(parseFloat(e.rows)*z+L,parseFloat(O.getPropertyValue("--v-input-control-height"))),G=parseFloat(e.maxRows)*z+L||1/0,W=Pr(M??0,H,G);R.value=Math.floor((W-L)/z),v.value=Le(W)})}wt(E),ke(i,E),ke(()=>e.rows,E),ke(()=>e.maxRows,E),ke(()=>e.density,E);let I;return ke(C,A=>{A?(I=new ResizeObserver(E),I.observe(C.value)):I==null||I.disconnect()}),Cn(()=>{I==null||I.disconnect()}),Ie(()=>{const A=!!(s.counter||e.counter||e.counterValue),O=!!(A||s.details),[L,M]=el(n),{modelValue:z,...H}=ds.filterProps(e),G=Fw(e);return h(ds,me({ref:f,modelValue:i.value,"onUpdate:modelValue":W=>i.value=W,class:["v-textarea v-text-field",{"v-textarea--prefixed":e.prefix,"v-textarea--suffixed":e.suffix,"v-text-field--prefixed":e.prefix,"v-text-field--suffixed":e.suffix,"v-textarea--auto-grow":e.autoGrow,"v-textarea--no-resize":e.noResize||e.autoGrow,"v-input--plain-underlined":k.value},e.class],style:e.style},L,H,{centerAffix:R.value===1&&!k.value,focused:o.value}),{...s,default:W=>{let{id:Y,isDisabled:X,isDirty:J,isReadonly:N,isValid:K}=W;return h(ym,me({ref:p,style:{"--v-textarea-control-height":v.value},onClick:w,onMousedown:x,"onClick:clear":P,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"]},G,{id:Y.value,active:y.value||J.value,centerAffix:R.value===1&&!k.value,dirty:J.value||e.dirty,disabled:X.value,focused:o.value,error:K.value===!1}),{...s,default:he=>{let{props:{class:oe,...we}}=he;return h(Pe,null,[e.prefix&&h("span",{class:"v-text-field__prefix"},[e.prefix]),Bt(h("textarea",me({ref:m,class:oe,value:i.value,onInput:S,autofocus:e.autofocus,readonly:N.value,disabled:X.value,placeholder:e.placeholder,rows:e.rows,name:e.name,onFocus:b,onBlur:l},we,M),null),[[hr("intersect"),{handler:d},null,{once:!0}]]),e.autoGrow&&Bt(h("textarea",{class:[oe,"v-textarea__sizer"],id:`${we.id}-sizer`,"onUpdate:modelValue":ee=>i.value=ee,ref:C,readonly:!0,"aria-hidden":"true"},null),[[HF,i.value]]),e.suffix&&h("span",{class:"v-text-field__suffix"},[e.suffix])])}})},details:O?W=>{var Y;return h(Pe,null,[(Y=s.details)==null?void 0:Y.call(s,W),A&&h(Pe,null,[h("span",null,null),h(Dw,{active:e.persistentCounter||o.value,value:u.value,max:c.value,disabled:e.disabled},s.counter)])])}:void 0})}),Qi({},f,p,m)}}),AG={key:0,class:"pl-2"},OG={key:1},MG=$e({__name:"YamlImportExportDialog",setup(e){const t=Zi(),n=tn(nn.YamlImportExport),r=Dt(),s=V(""),i=V(""),o=V(0),a=V(!0),l=V(!0),u=V(!0),c=V(!0),d=V(void 0),f=V(""),p=T(()=>!t.hasFeature("printerGroupsApi")),v=T(()=>!!d.value),m=T(()=>o.value===0),y=async()=>{await t.loadFeatures(),u.value=t.hasFeature("printerGroupsApi")},b=async()=>{d.value=void 0,s.value="",i.value="",f.value=""},w=async()=>{l.value&&(c.value=!0),await sp.downloadYamlExport({exportPrinters:c.value,exportGroups:u.value,exportFloorGrid:l.value,printerComparisonStrategiesByPriority:["name","url"],exportFloors:a.value,floorComparisonStrategiesByPriority:"floor",notes:f.value}),r.openInfoMessage({title:"Downloaded the YAML file"}),f.value=""},x=async()=>{if(s.value="",i.value="",!d.value){s.value="The import file was not specified";return}try{await sp.uploadAndImportYaml(d.value),d.value=void 0,r.openInfoMessage({title:"Imported the YAML file"}),P()}catch(S){s.value="An error occurred uring import",i.value=S.message.toString(),d.value=void 0}},P=()=>{d.value=void 0,s.value="",i.value="",f.value="",n.closeDialog()};return(S,C)=>{const R=mi;return D(),te(R,{id:Z(n).dialogId,"max-width":"700px",onBeforeOpened:y,onOpened:b,onEscape:C[10]||(C[10]=k=>P())},{default:g(()=>[h(gt,{class:"pa-4"},{default:g(()=>[h(an,null,{default:g(()=>C[11]||(C[11]=[$("span",{class:"text-h5"}," YAML export and import ",-1)])),_:1}),h(en,null,{default:g(()=>[C[18]||(C[18]=$("div",null,"Choose mode:",-1)),h(rt,null,{default:g(()=>[C[12]||(C[12]=$("br",null,null,-1)),h(JA,{modelValue:Z(o),"onUpdate:modelValue":C[0]||(C[0]=k=>Je(o)?o.value=k:null),class:"ml-3",inline:""},{default:g(()=>[h(Cy,{value:0,label:"Import YAML"}),h(Cy,{value:1,label:"Export YAML"})]),_:1},8,["modelValue"])]),_:1}),$("div",null,[Z(m)?(D(),ge("div",AG,[h(QA,{modelValue:Z(d),"onUpdate:modelValue":C[1]||(C[1]=k=>Je(d)?d.value=k:null),accept:".yaml",label:"Select a YAML file for import *"},null,8,["modelValue"])])):(D(),ge("div",OG,[h(yn,{modelValue:Z(a),"onUpdate:modelValue":C[2]||(C[2]=k=>Je(a)?a.value=k:null),class:"pa-0 ma-0 mt-2 ml-2",label:"Include floors"},null,8,["modelValue"]),h(yn,{modelValue:Z(u),"onUpdate:modelValue":C[3]||(C[3]=k=>Je(u)?u.value=k:null),disabled:Z(p),class:"pa-0 ma-0 mt-2 ml-2",label:"Include groups"},null,8,["modelValue","disabled"]),h(yn,{modelValue:Z(c),"onUpdate:modelValue":C[4]||(C[4]=k=>Je(c)?c.value=k:null),class:"pa-0 ma-0 ml-2",label:"Include printers"},null,8,["modelValue"]),h(yn,{modelValue:Z(l),"onUpdate:modelValue":C[5]||(C[5]=k=>Je(l)?l.value=k:null),class:"pa-0 ma-0 ml-2",label:"Include grid positions (auto-includes printers)"},null,8,["modelValue"]),C[13]||(C[13]=_(" Include notes (for yourself): ")),h(ZA,{modelValue:Z(f),"onUpdate:modelValue":C[6]||(C[6]=k=>Je(f)?f.value=k:null),rows:"1"},null,8,["modelValue"])])),Z(m)?ue("",!0):(D(),te(se,{key:2,onClick:C[7]||(C[7]=k=>w())},{default:g(()=>[h(Q,null,{default:g(()=>C[14]||(C[14]=[_("download")])),_:1}),C[15]||(C[15]=_(" Export YAML file "))]),_:1})),Z(m)?(D(),te(se,{key:3,disabled:!Z(v),onClick:C[8]||(C[8]=k=>x())},{default:g(()=>[h(Q,null,{default:g(()=>C[16]||(C[16]=[_("upload")])),_:1}),C[17]||(C[17]=_(" Import YAML data "))]),_:1},8,["disabled"])):ue("",!0)])]),_:1}),h(Dn,null,{default:g(()=>[C[20]||(C[20]=$("em",{class:"text-red"}," * indicates required field ",-1)),h(wn),h(se,{variant:"text",onClick:C[9]||(C[9]=k=>P())},{default:g(()=>C[19]||(C[19]=[_(" Close ")])),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),DG="/assets/octofarm-printer-export-Dw0Zh14I.gif",Nw=Symbol.for("vuetify:v-stepper"),eO=ce({color:String,disabled:{type:[Boolean,String],default:!1},prevText:{type:String,default:"$vuetify.stepper.prev"},nextText:{type:String,default:"$vuetify.stepper.next"}},"VStepperActions"),$G=_e()({name:"VStepperActions",props:eO(),emits:{"click:prev":()=>!0,"click:next":()=>!0},setup(e,t){let{emit:n,slots:r}=t;const{t:s}=Kr();function i(){n("click:prev")}function o(){n("click:next")}return Ie(()=>{const a={onClick:i},l={onClick:o};return h("div",{class:"v-stepper-actions"},[h(Ot,{defaults:{VBtn:{disabled:["prev",!0].includes(e.disabled),text:s(e.prevText),variant:"text"}}},{default:()=>{var u;return[((u=r.prev)==null?void 0:u.call(r,{props:a}))??h(se,a,null)]}}),h(Ot,{defaults:{VBtn:{color:e.color,disabled:["next",!0].includes(e.disabled),text:s(e.nextText),variant:"tonal"}}},{default:()=>{var u;return[((u=r.next)==null?void 0:u.call(r,{props:l}))??h(se,l,null)]}})])}),{}}}),Bw=Cu("v-stepper-header"),FG=ce({color:String,title:String,subtitle:String,complete:Boolean,completeIcon:{type:ze,default:"$complete"},editable:Boolean,editIcon:{type:ze,default:"$edit"},error:Boolean,errorIcon:{type:ze,default:"$error"},icon:ze,ripple:{type:[Boolean,Object],default:!0},rules:{type:Array,default:()=>[]}},"StepperItem"),LG=ce({...FG(),...Pd()},"VStepperItem"),ah=_e()({name:"VStepperItem",directives:{Ripple:Au},props:LG(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const r=Td(e,Nw,!0),s=T(()=>(r==null?void 0:r.value.value)??e.value),i=T(()=>e.rules.every(f=>f()===!0)),o=T(()=>!e.disabled&&e.editable),a=T(()=>!e.disabled&&e.editable),l=T(()=>e.error||!i.value),u=T(()=>e.complete||e.rules.length>0&&i.value),c=T(()=>l.value?e.errorIcon:u.value?e.completeIcon:r.isSelected.value&&e.editable?e.editIcon:e.icon),d=T(()=>({canEdit:a.value,hasError:l.value,hasCompleted:u.value,title:e.title,subtitle:e.subtitle,step:s.value,value:e.value}));return Ie(()=>{var y,b,w;const f=(!r||r.isSelected.value||u.value||a.value)&&!l.value&&!e.disabled,p=!!(e.title!=null||n.title),v=!!(e.subtitle!=null||n.subtitle);function m(){r==null||r.toggle()}return Bt(h("button",{class:["v-stepper-item",{"v-stepper-item--complete":u.value,"v-stepper-item--disabled":e.disabled,"v-stepper-item--error":l.value},r==null?void 0:r.selectedClass.value],disabled:!e.editable,type:"button",onClick:m},[o.value&&Go(!0,"v-stepper-item"),h(lt,{key:"stepper-avatar",class:"v-stepper-item__avatar",color:f?e.color:void 0,size:24},{default:()=>{var x;return[((x=n.icon)==null?void 0:x.call(n,d.value))??(c.value?h(Q,{icon:c.value},null):s.value)]}}),h("div",{class:"v-stepper-item__content"},[p&&h("div",{key:"title",class:"v-stepper-item__title"},[((y=n.title)==null?void 0:y.call(n,d.value))??e.title]),v&&h("div",{key:"subtitle",class:"v-stepper-item__subtitle"},[((b=n.subtitle)==null?void 0:b.call(n,d.value))??e.subtitle]),(w=n.default)==null?void 0:w.call(n,d.value)])]),[[hr("ripple"),e.ripple&&e.editable,null]])}),{}}}),NG=e=>{const{touchstartX:t,touchendX:n,touchstartY:r,touchendY:s}=e,i=.5,o=16;e.offsetX=n-t,e.offsetY=s-r,Math.abs(e.offsetY)<i*Math.abs(e.offsetX)&&(e.left&&n<t-o&&e.left(e),e.right&&n>t+o&&e.right(e)),Math.abs(e.offsetX)<i*Math.abs(e.offsetY)&&(e.up&&s<r-o&&e.up(e),e.down&&s>r+o&&e.down(e))};function BG(e,t){var r;const n=e.changedTouches[0];t.touchstartX=n.clientX,t.touchstartY=n.clientY,(r=t.start)==null||r.call(t,{originalEvent:e,...t})}function VG(e,t){var r;const n=e.changedTouches[0];t.touchendX=n.clientX,t.touchendY=n.clientY,(r=t.end)==null||r.call(t,{originalEvent:e,...t}),NG(t)}function UG(e,t){var r;const n=e.changedTouches[0];t.touchmoveX=n.clientX,t.touchmoveY=n.clientY,(r=t.move)==null||r.call(t,{originalEvent:e,...t})}function zG(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t={touchstartX:0,touchstartY:0,touchendX:0,touchendY:0,touchmoveX:0,touchmoveY:0,offsetX:0,offsetY:0,left:e.left,right:e.right,up:e.up,down:e.down,start:e.start,move:e.move,end:e.end};return{touchstart:n=>BG(n,t),touchend:n=>VG(n,t),touchmove:n=>UG(n,t)}}function HG(e,t){var a;const n=t.value,r=n!=null&&n.parent?e.parentElement:e,s=(n==null?void 0:n.options)??{passive:!0},i=(a=t.instance)==null?void 0:a.$.uid;if(!r||!i)return;const o=zG(t.value);r._touchHandlers=r._touchHandlers??Object.create(null),r._touchHandlers[i]=o,pP(o).forEach(l=>{r.addEventListener(l,o[l],s)})}function jG(e,t){var i,o;const n=(i=t.value)!=null&&i.parent?e.parentElement:e,r=(o=t.instance)==null?void 0:o.$.uid;if(!(n!=null&&n._touchHandlers)||!r)return;const s=n._touchHandlers[r];pP(s).forEach(a=>{n.removeEventListener(a,s[a])}),delete n._touchHandlers[r]}const tO={mounted:HG,unmounted:jG},nO=Symbol.for("vuetify:v-window"),rO=Symbol.for("vuetify:v-window-group"),sO=ce({continuous:Boolean,nextIcon:{type:[Boolean,String,Function,Object],default:"$next"},prevIcon:{type:[Boolean,String,Function,Object],default:"$prev"},reverse:Boolean,showArrows:{type:[Boolean,String],validator:e=>typeof e=="boolean"||e==="hover"},touch:{type:[Object,Boolean],default:void 0},direction:{type:String,default:"horizontal"},modelValue:null,disabled:Boolean,selectedClass:{type:String,default:"v-window-item--active"},mandatory:{type:[Boolean,String],default:"force"},...Ve(),...vt(),...$t()},"VWindow"),ik=_e()({name:"VWindow",directives:{Touch:tO},props:sO(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:r}=Yt(e),{isRtl:s}=Dr(),{t:i}=Kr(),o=Pu(e,rO),a=V(),l=T(()=>s.value?!e.reverse:e.reverse),u=Ae(!1),c=T(()=>{const P=e.direction==="vertical"?"y":"x",C=(l.value?!u.value:u.value)?"-reverse":"";return`v-window-${P}${C}-transition`}),d=Ae(0),f=V(void 0),p=T(()=>o.items.value.findIndex(P=>o.selected.value.includes(P.id)));ke(p,(P,S)=>{const C=o.items.value.length,R=C-1;C<=2?u.value=P<S:P===R&&S===0?u.value=!0:P===0&&S===R?u.value=!1:u.value=P<S}),Gt(nO,{transition:c,isReversed:u,transitionCount:d,transitionHeight:f,rootRef:a});const v=T(()=>e.continuous||p.value!==0),m=T(()=>e.continuous||p.value!==o.items.value.length-1);function y(){v.value&&o.prev()}function b(){m.value&&o.next()}const w=T(()=>{const P=[],S={icon:s.value?e.nextIcon:e.prevIcon,class:`v-window__${l.value?"right":"left"}`,onClick:o.prev,"aria-label":i("$vuetify.carousel.prev")};P.push(v.value?n.prev?n.prev({props:S}):h(se,S,null):h("div",null,null));const C={icon:s.value?e.prevIcon:e.nextIcon,class:`v-window__${l.value?"left":"right"}`,onClick:o.next,"aria-label":i("$vuetify.carousel.next")};return P.push(m.value?n.next?n.next({props:C}):h(se,C,null):h("div",null,null)),P}),x=T(()=>e.touch===!1?e.touch:{...{left:()=>{l.value?y():b()},right:()=>{l.value?b():y()},start:S=>{let{originalEvent:C}=S;C.stopPropagation()}},...e.touch===!0?{}:e.touch});return Ie(()=>Bt(h(e.tag,{ref:a,class:["v-window",{"v-window--show-arrows-on-hover":e.showArrows==="hover"},r.value,e.class],style:e.style},{default:()=>{var P,S;return[h("div",{class:"v-window__container",style:{height:f.value}},[(P=n.default)==null?void 0:P.call(n,{group:o}),e.showArrows!==!1&&h("div",{class:"v-window__controls"},[w.value])]),(S=n.additional)==null?void 0:S.call(n,{group:o})]}}),[[hr("touch"),x.value]])),{group:o}}}),qG=ce({...Ms(sO(),["continuous","nextIcon","prevIcon","showArrows","touch","mandatory"])},"VStepperWindow"),iO=_e()({name:"VStepperWindow",props:qG(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=Xe(Nw,null),s=st(e,"modelValue"),i=T({get(){var o;return s.value!=null||!r?s.value:(o=r.items.value.find(a=>r.selected.value.includes(a.id)))==null?void 0:o.value},set(o){s.value=o}});return Ie(()=>{const o=ik.filterProps(e);return h(ik,me({_as:"VStepperWindow"},o,{modelValue:i.value,"onUpdate:modelValue":a=>i.value=a,class:["v-stepper-window",e.class],style:e.style,mandatory:!1,touch:!1}),n)}),{}}}),oO=ce({reverseTransition:{type:[Boolean,String],default:void 0},transition:{type:[Boolean,String],default:void 0},...Ve(),...Pd(),...iT()},"VWindowItem"),ok=_e()({name:"VWindowItem",directives:{Touch:tO},props:oO(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const r=Xe(nO),s=Td(e,rO),{isBooted:i}=jd();if(!r||!s)throw new Error("[Vuetify] VWindowItem must be used inside VWindow");const o=Ae(!1),a=T(()=>i.value&&(r.isReversed.value?e.reverseTransition!==!1:e.transition!==!1));function l(){!o.value||!r||(o.value=!1,r.transitionCount.value>0&&(r.transitionCount.value-=1,r.transitionCount.value===0&&(r.transitionHeight.value=void 0)))}function u(){var v;o.value||!r||(o.value=!0,r.transitionCount.value===0&&(r.transitionHeight.value=Le((v=r.rootRef.value)==null?void 0:v.clientHeight)),r.transitionCount.value+=1)}function c(){l()}function d(v){o.value&&Mt(()=>{!a.value||!o.value||!r||(r.transitionHeight.value=Le(v.clientHeight))})}const f=T(()=>{const v=r.isReversed.value?e.reverseTransition:e.transition;return a.value?{name:typeof v!="string"?r.transition.value:v,onBeforeEnter:u,onAfterEnter:l,onEnterCancelled:c,onBeforeLeave:u,onAfterLeave:l,onLeaveCancelled:c,onEnter:d}:!1}),{hasContent:p}=oT(e,s.isSelected);return Ie(()=>h(ii,{transition:f.value,disabled:!i.value},{default:()=>{var v;return[Bt(h("div",{class:["v-window-item",s.selectedClass.value,e.class],style:e.style},[p.value&&((v=n.default)==null?void 0:v.call(n))]),[[Xi,s.isSelected.value]])]}})),{groupItem:s}}}),WG=ce({...oO()},"VStepperWindowItem"),lh=_e()({name:"VStepperWindowItem",props:WG(),setup(e,t){let{slots:n}=t;return Ie(()=>{const r=ok.filterProps(e);return h(ok,me({_as:"VStepperWindowItem"},r,{class:["v-stepper-window-item",e.class],style:e.style}),n)}),{}}}),aO=ce({color:String,...ms(),...Ve(),...Or(),...vs(),...Ko(),...Ru(),...$n(),...vt(),...$t()},"VSheet"),ip=_e()({name:"VSheet",props:aO(),setup(e,t){let{slots:n}=t;const{themeClasses:r}=Yt(e),{backgroundColorClasses:s,backgroundColorStyles:i}=fr(Re(e,"color")),{borderClasses:o}=Ds(e),{dimensionStyles:a}=Mr(e),{elevationClasses:l}=$s(e),{locationStyles:u}=nl(e),{positionClasses:c}=Iu(e),{roundedClasses:d}=Vn(e);return Ie(()=>h(e.tag,{class:["v-sheet",r.value,s.value,o.value,l.value,c.value,d.value,e.class],style:[i.value,a.value,u.value,e.style]},n)),{}}}),GG=ce({altLabels:Boolean,bgColor:String,completeIcon:ze,editIcon:ze,editable:Boolean,errorIcon:ze,hideActions:Boolean,items:{type:Array,default:()=>[]},itemTitle:{type:String,default:"title"},itemValue:{type:String,default:"value"},nonLinear:Boolean,flat:Boolean,...rl()},"Stepper"),KG=ce({...GG(),...Cd({mandatory:"force",selectedClass:"v-stepper-item--selected"}),...aO(),...xu(eO(),["prevText","nextText"])},"VStepper"),lO=_e()({name:"VStepper",props:KG(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{items:r,next:s,prev:i,selected:o}=Pu(e,Nw),{displayClasses:a,mobile:l}=pi(e),{completeIcon:u,editIcon:c,errorIcon:d,color:f,editable:p,prevText:v,nextText:m}=Wo(e),y=T(()=>e.items.map((x,P)=>{const S=Xn(x,e.itemTitle,x),C=Xn(x,e.itemValue,P+1);return{title:S,value:C,raw:x}})),b=T(()=>r.value.findIndex(x=>o.value.includes(x.id))),w=T(()=>e.disabled?e.disabled:b.value===0?"prev":b.value===r.value.length-1?"next":!1);return Ir({VStepperItem:{editable:p,errorIcon:d,completeIcon:u,editIcon:c,prevText:v,nextText:m},VStepperActions:{color:f,disabled:w,prevText:v,nextText:m}}),Ie(()=>{const x=ip.filterProps(e),P=!!(n.header||e.items.length),S=e.items.length>0,C=!e.hideActions&&!!(S||n.actions);return h(ip,me(x,{color:e.bgColor,class:["v-stepper",{"v-stepper--alt-labels":e.altLabels,"v-stepper--flat":e.flat,"v-stepper--non-linear":e.nonLinear,"v-stepper--mobile":l.value},a.value,e.class],style:e.style}),{default:()=>{var R,k;return[P&&h(Bw,{key:"stepper-header"},{default:()=>[y.value.map((E,I)=>{let{raw:A,...O}=E;return h(Pe,null,[!!I&&h(dn,null,null),h(ah,O,{default:n[`header-item.${O.value}`]??n.header,icon:n.icon,title:n.title,subtitle:n.subtitle})])})]}),S&&h(iO,{key:"stepper-window"},{default:()=>[y.value.map(E=>h(lh,{value:E.value},{default:()=>{var I,A;return((I=n[`item.${E.value}`])==null?void 0:I.call(n,E))??((A=n.item)==null?void 0:A.call(n,E))}}))]}),(R=n.default)==null?void 0:R.call(n,{prev:i,next:s}),C&&(((k=n.actions)==null?void 0:k.call(n,{next:s,prev:i}))??h($G,{key:"stepper-actions","onClick:prev":i,"onClick:next":s},n))]}})}),{prev:i,next:s}}}),YG={class:"my-3"},XG={key:0},QG={key:1},JG={class:"my-2"},ZG={key:0},e7={class:"mr-4"},t7={class:"mr-4"},n7={class:"mr-4"},r7={class:"my-3"},s7={key:0,class:"mb-5 mt-10"},i7={key:1},o7={class:"ml-5 mt-2"},a7={key:0,class:"ml-5 mt-2"},l7=$e({__name:"OctoFarmImportDialog",setup(e){const t=V(),n=V(!1),r=V(!1),s=V(""),i=V(""),o=V(),a=V(0),l=V([]),u=V([]),c=V(!1),d=tn(nn.ImportOctoFarmDialog);function f(){}async function p(){}const v=async()=>{if(!o.value){n.value=!1;return}const P=JSON.parse(await o.value.text());if(!P||!Array.isArray(P))return[];if(!(P!=null&&P.length))return[];let S=P;P.length===1&&Array.isArray(P[0])&&(S=P[0]),S=S.map(k=>{var E,I;return k._id&&delete k._id,k.apikey&&(k.apiKey=k.apikey,delete k.apikey),k.settingsApperance&&(k.settingsAppearance=k.settingsApperance,delete k.settingsApperance),(E=k.settingsAppearance)!=null&&E.name?(k.name=(I=k.settingsAppearance)==null?void 0:I.name,delete k.settingsAppearance):k.name=k.printerURL,{enabled:!k.disabled,apiKey:k.apiKey,printerURL:k.printerURL,name:k.name}});let C=!1;const R=[];s.value="",i.value="";for(const k of S){const E=Object.keys(k);E.includes("enabled")&&(k.enabled===!1||k.enabled===!0)&&E.includes("apiKey")&&k.apiKey.length&&E.includes("printerURL")&&k.printerURL.length&&E.includes("name")&&k.name||(R.push(k.name||k.printerURL||"No name known for printer"),C||(C=!0))}return n.value=!C,C&&(s.value="Imported file failed the validation step",i.value="These printers failed validation: "+R.join(", ")),S},m=async()=>{const P=await v();P!=null&&P.length&&(u.value=[...Array(P.length)].map((S,C)=>C),l.value=P||[],t.value=2)},y=()=>{u.value.length?u.value=[]:u.value=[...Array(l.value.length)].map((S,C)=>C)},b=async()=>{var P;a.value=((P=await v())==null?void 0:P.length)||0},w=async()=>{t.value=3;const P=l.value.filter((S,C)=>u.value.includes(C));if(P!=null&&P.length)try{await Qt.batchImportPrinters(P),c.value=!0}catch(S){c.value=!1,o.value=void 0,s.value="An error occurred",i.value=S.message.toString()}},x=()=>{o.value=void 0,d.closeDialog(),t.value=1};return(P,S)=>{const C=An("v-subheader"),R=An("v-list-item-content"),k=An("v-list-item-group"),E=mi;return D(),te(E,{id:Z(d).dialogId,"max-width":"700px",onBeforeOpened:S[8]||(S[8]=I=>void 0),onEscape:S[9]||(S[9]=I=>x()),onOpened:S[10]||(S[10]=I=>p())},{default:g(()=>[h(gt,{class:"pa-4"},{default:g(()=>[h(an,null,{default:g(()=>S[11]||(S[11]=[$("span",{class:"text-h5"}," Import OctoFarm Printers ",-1)])),_:1}),h(en,null,{default:g(()=>[h(rt,null,{default:g(()=>[h(Ue,{cols:"12"},{default:g(()=>[h(lO,{modelValue:Z(t),"onUpdate:modelValue":S[6]||(S[6]=I=>Je(t)?t.value=I:null),"non-linear":""},{default:g(()=>[h(Bw,null,{default:g(()=>[h(ah,{complete:Z(t)>1,value:"1",editable:""},{default:g(()=>S[12]||(S[12]=[_(" Export PrintersDB from OctoFarm ")])),_:1},8,["complete"]),h(ah,{complete:Z(t)>2,value:"2",editable:""},{default:g(()=>S[13]||(S[13]=[_(" Show printers & decide ")])),_:1},8,["complete"]),h(ah,{complete:Z(t)>3,value:"3",editable:""},{default:g(()=>S[14]||(S[14]=[_(" Import printers into FDM Monster ")])),_:1},8,["complete"])]),_:1}),h(iO,null,{default:g(()=>[h(lh,{value:"1"},{default:g(()=>[h(QA,{class:"mt-2",style:{"max-width":"400px"},modelValue:Z(o),"onUpdate:modelValue":S[0]||(S[0]=I=>Je(o)?o.value=I:null),filled:"",accept:".json",clearable:"",label:"Upload PrintersDB.json file",onChange:S[1]||(S[1]=I=>b())},null,8,["modelValue"]),$("ol",null,[$("li",null,[$("h4",null,[h(Q,null,{default:g(()=>S[15]||(S[15]=[_("navigation")])),_:1}),S[16]||(S[16]=_(" Go to your OctoFarm System page "))])]),$("li",null,[$("h4",null,[h(Q,null,{default:g(()=>S[17]||(S[17]=[_("mouse")])),_:1}),S[18]||(S[18]=_(" Click 'Database' "))])]),$("li",null,[$("h4",null,[h(Q,null,{default:g(()=>S[19]||(S[19]=[_("mouse")])),_:1}),S[20]||(S[20]=_(" Click the button 'Export Printers' "))])]),$("li",null,[$("h4",null,[h(Q,null,{default:g(()=>S[21]||(S[21]=[_("upload")])),_:1}),S[22]||(S[22]=_(" Upload 'PrintersDB.json' above "))])])]),$("div",YG,[h(Q,{class:"pr-2"},{default:g(()=>S[23]||(S[23]=[_("info")])),_:1}),S[25]||(S[25]=_(' OctoFarm printers should be exported as a JSON file. Please upload the correct "PrintersDB.json" database file using the steps provided. ')),h(se,{small:"",class:"ml-2",color:"success",onClick:S[2]||(S[2]=I=>r.value=!Z(r))},{default:g(()=>[h(Q,{class:"pr-2"},{default:g(()=>S[24]||(S[24]=[_("gif")])),_:1}),Z(r)?(D(),ge("span",QG,"Hide GIF")):(D(),ge("span",XG,"Show GIF"))]),_:1})]),Z(r)?(D(),te(cs,{key:0,class:"my-4",src:Z(DG),style:{border:"3px solid dimgray","max-width":"800px"},elevation:"10"},null,8,["src"])):ue("",!0),S[27]||(S[27]=$("br",null,null,-1)),h(se,{color:"primary",onClick:S[3]||(S[3]=I=>m()),disabled:!Z(o)},{default:g(()=>S[26]||(S[26]=[_(" Validate ")])),_:1},8,["disabled"])]),_:1}),h(lh,{value:"2"},{default:g(()=>{var I;return[$("div",JG,[h(Q,{class:"pr-2"},{default:g(()=>S[28]||(S[28]=[_("info")])),_:1}),_(" Import state: "+re(Z(n)?"success":"failed")+" - "+re(Z(a))+" printer(s) found ",1)]),Z(s)?(D(),te(rn,{key:0,class:"my-2",type:"error"},{default:g(()=>{var A,O;return[_(re(Z(s))+" ",1),S[29]||(S[29]=$("br",null,null,-1)),_(" Details: "+re((A=Z(i))==null?void 0:A.slice(0,75))+" ",1),((O=Z(i))==null?void 0:O.length)>75?(D(),ge("span",ZG,"...")):ue("",!0)]}),_:1})):ue("",!0),h(dn,{class:"mt-2"}),h(Vt,{"two-line":"",flat:"",subheader:"",dense:"",class:"mt-2"},{default:g(()=>[h(C,null,{default:g(()=>S[30]||(S[30]=[_("Found printers")])),_:1}),h(k,{modelValue:Z(u),"onUpdate:modelValue":S[4]||(S[4]=A=>Je(u)?u.value=A:null),multiple:""},{default:g(()=>[(D(!0),ge(Pe,null,Wt(Z(l),A=>(D(),te(Be,{dense:"",key:A.name,title:A.name},{default:g(({isActive:O})=>[h(vu,null,{default:g(()=>[h(yn,{"input-value":O},null,8,["input-value"])]),_:2},1024),h(R,null,{default:g(()=>[h(dt,null,{default:g(()=>[_(re(A.name),1)]),_:2},1024),h(yt,null,{default:g(()=>[$("span",e7,"URL: "+re(A.printerURL),1),$("span",t7,"Enabled: "+re(A.enabled),1),$("span",n7,"API Key: "+re(A.apiKey),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["title"]))),128))]),_:1},8,["modelValue"]),h(C,null,{default:g(()=>[h(se,{onClick:y,class:"my-2",small:""},{default:g(()=>[h(Q,{class:"mr-2"},{default:g(()=>S[31]||(S[31]=[_("check")])),_:1}),S[32]||(S[32]=_(" Toggle selection "))]),_:1})]),_:1})]),_:1}),$("div",r7,[h(Q,{class:"pr-2"},{default:g(()=>S[33]||(S[33]=[_("info")])),_:1}),S[34]||(S[34]=_(" At this moment, the following properties will be imported: enabled, name, printerURL and apiKey "))]),h(se,{class:"my-2",color:"primary",onClick:S[5]||(S[5]=A=>w()),disabled:!((I=Z(u))!=null&&I.length)},{default:g(()=>{var A;return[_(" Submit "+re((A=Z(u))==null?void 0:A.length)+" printers ",1)]}),_:1},8,["disabled"])]}),_:1}),h(lh,{value:"3"},{default:g(()=>{var I,A;return[Z(c)?(D(),ge("div",s7,[h(Q,{size:"100",class:"mr-5",color:"green circle"},{default:g(()=>S[35]||(S[35]=[_("check_circle")])),_:1}),S[36]||(S[36]=_(" Import Completed "))])):(D(),ge("div",i7,[h(Q,{size:"100",class:"mr-5",color:"red circle"},{default:g(()=>S[37]||(S[37]=[_("error")])),_:1}),_(" Something went wrong: "+re(Z(s))+" ",1),S[38]||(S[38]=$("br",null,null,-1)),$("span",o7," Details: "+re((I=Z(i))==null?void 0:I.slice(0,75)),1),((A=Z(i))==null?void 0:A.length)>75?(D(),ge("span",a7,"...")):ue("",!0)]))]}),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),h(se,{class:"mt-2"},{default:g(()=>S[39]||(S[39]=[_(" Validate printers ")])),_:1})]),_:1}),h(Dn,null,{default:g(()=>[h(wn),h(se,{onClick:S[7]||(S[7]=I=>x())},{default:g(()=>[h(Q,{class:"mr-2"},{default:g(()=>S[40]||(S[40]=[_("close")])),_:1}),S[41]||(S[41]=_(" Close "))]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),u7=ce({id:String,submenu:Boolean,...Ms(Ad({closeDelay:250,closeOnContentClick:!0,locationStrategy:"connected",location:void 0,openDelay:300,scrim:!1,scrollStrategy:"reposition",transition:{component:Ub}}),["absolute"])},"VMenu"),wm=_e()({name:"VMenu",props:u7(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=st(e,"modelValue"),{scopeId:s}=Ou(),{isRtl:i}=Dr(),o=gr(),a=T(()=>e.id||`v-menu-${o}`),l=V(),u=Xe($v,null),c=Ae(new Set);Gt($v,{register(){c.value.add(o)},unregister(){c.value.delete(o)},closeParents(y){setTimeout(()=>{var b;!c.value.size&&!e.persistent&&(y==null||(b=l.value)!=null&&b.contentEl&&!wL(y,l.value.contentEl))&&(r.value=!1,u==null||u.closeParents())},40)}}),Cn(()=>{u==null||u.unregister(),document.removeEventListener("focusin",d)}),Sb(()=>r.value=!1);async function d(y){var x,P,S;const b=y.relatedTarget,w=y.target;await Mt(),r.value&&b!==w&&((x=l.value)!=null&&x.contentEl)&&((P=l.value)!=null&&P.globalTop)&&![document,l.value.contentEl].includes(w)&&!l.value.contentEl.contains(w)&&((S=Gc(l.value.contentEl)[0])==null||S.focus())}ke(r,y=>{y?(u==null||u.register(),_t&&document.addEventListener("focusin",d,{once:!0})):(u==null||u.unregister(),_t&&document.removeEventListener("focusin",d))},{immediate:!0});function f(y){u==null||u.closeParents(y)}function p(y){var b,w,x,P,S;if(!e.disabled)if(y.key==="Tab"||y.key==="Enter"&&!e.closeOnContentClick){if(y.key==="Enter"&&(y.target instanceof HTMLTextAreaElement||y.target instanceof HTMLInputElement&&y.target.closest("form")))return;y.key==="Enter"&&y.preventDefault(),yP(Gc((b=l.value)==null?void 0:b.contentEl,!1),y.shiftKey?"prev":"next",R=>R.tabIndex>=0)||(r.value=!1,(x=(w=l.value)==null?void 0:w.activatorEl)==null||x.focus())}else e.submenu&&y.key===(i.value?"ArrowRight":"ArrowLeft")&&(r.value=!1,(S=(P=l.value)==null?void 0:P.activatorEl)==null||S.focus())}function v(y){var w;if(e.disabled)return;const b=(w=l.value)==null?void 0:w.contentEl;b&&r.value?y.key==="ArrowDown"?(y.preventDefault(),y.stopImmediatePropagation(),Tc(b,"next")):y.key==="ArrowUp"?(y.preventDefault(),y.stopImmediatePropagation(),Tc(b,"prev")):e.submenu&&(y.key===(i.value?"ArrowRight":"ArrowLeft")?r.value=!1:y.key===(i.value?"ArrowLeft":"ArrowRight")&&(y.preventDefault(),Tc(b,"first"))):(e.submenu?y.key===(i.value?"ArrowLeft":"ArrowRight"):["ArrowDown","ArrowUp"].includes(y.key))&&(r.value=!0,y.preventDefault(),setTimeout(()=>setTimeout(()=>v(y))))}const m=T(()=>me({"aria-haspopup":"menu","aria-expanded":String(r.value),"aria-controls":a.value,onKeydown:v},e.activatorProps));return Ie(()=>{const y=Vi.filterProps(e);return h(Vi,me({ref:l,id:a.value,class:["v-menu",e.class],style:e.style},y,{modelValue:r.value,"onUpdate:modelValue":b=>r.value=b,absolute:!0,activatorProps:m.value,location:e.location??(e.submenu?"end":"bottom"),"onClick:outside":f,onKeydown:p},s),{activator:n.activator,default:function(){for(var b=arguments.length,w=new Array(b),x=0;x<b;x++)w[x]=arguments[x];return h(Ot,{root:"VMenu"},{default:()=>{var P;return[(P=n.default)==null?void 0:P.call(n,...w)]}})}})}),Qi({id:a,ΨopenChildren:c},l)}}),c7=ce({renderless:Boolean,...Ve()},"VVirtualScrollItem"),d7=_e()({name:"VVirtualScrollItem",inheritAttrs:!1,props:c7(),emits:{"update:height":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{resizeRef:i,contentRect:o}=za(void 0,"border");ke(()=>{var a;return(a=o.value)==null?void 0:a.height},a=>{a!=null&&r("update:height",a)}),Ie(()=>{var a,l;return e.renderless?h(Pe,null,[(a=s.default)==null?void 0:a.call(s,{itemRef:i})]):h("div",me({ref:i,class:["v-virtual-scroll__item",e.class],style:e.style},n),[(l=s.default)==null?void 0:l.call(s)])})}}),f7=-1,h7=1,Ag=100,p7=ce({itemHeight:{type:[Number,String],default:null},height:[Number,String]},"virtual");function m7(e,t){const n=pi(),r=Ae(0);Mn(()=>{r.value=parseFloat(e.itemHeight||0)});const s=Ae(0),i=Ae(Math.ceil((parseInt(e.height)||n.height.value)/(r.value||16))||1),o=Ae(0),a=Ae(0),l=V(),u=V();let c=0;const{resizeRef:d,contentRect:f}=za();Mn(()=>{d.value=l.value});const p=T(()=>{var X;return l.value===document.documentElement?n.height.value:((X=f.value)==null?void 0:X.height)||parseInt(e.height)||0}),v=T(()=>!!(l.value&&u.value&&p.value&&r.value));let m=Array.from({length:t.value.length}),y=Array.from({length:t.value.length});const b=Ae(0);let w=-1;function x(X){return m[X]||r.value}const P=gL(()=>{const X=performance.now();y[0]=0;const J=t.value.length;for(let N=1;N<=J-1;N++)y[N]=(y[N-1]||0)+x(N-1);b.value=Math.max(b.value,performance.now()-X)},b),S=ke(v,X=>{X&&(S(),c=u.value.offsetTop,P.immediate(),H(),~w&&Mt(()=>{_t&&window.requestAnimationFrame(()=>{W(w),w=-1})}))});Sn(()=>{P.clear()});function C(X,J){const N=m[X],K=r.value;r.value=K?Math.min(r.value,J):J,(N!==J||K!==r.value)&&(m[X]=J,P())}function R(X){return X=Pr(X,0,t.value.length-1),y[X]||0}function k(X){return g7(y,X)}let E=0,I=0,A=0;ke(p,(X,J)=>{J&&(H(),X<J&&requestAnimationFrame(()=>{I=0,H()}))});let O=-1;function L(){if(!l.value||!u.value)return;const X=l.value.scrollTop,J=performance.now();J-A>500?(I=Math.sign(X-E),c=u.value.offsetTop):I=X-E,E=X,A=J,window.clearTimeout(O),O=window.setTimeout(M,500),H()}function M(){!l.value||!u.value||(I=0,A=0,window.clearTimeout(O),H())}let z=-1;function H(){cancelAnimationFrame(z),z=requestAnimationFrame(G)}function G(){if(!l.value||!p.value)return;const X=E-c,J=Math.sign(I),N=Math.max(0,X-Ag),K=Pr(k(N),0,t.value.length),he=X+p.value+Ag,oe=Pr(k(he)+1,K+1,t.value.length);if((J!==f7||K<s.value)&&(J!==h7||oe>i.value)){const we=R(s.value)-R(K),ee=R(oe)-R(i.value);Math.max(we,ee)>Ag?(s.value=K,i.value=oe):(K<=0&&(s.value=K),oe>=t.value.length&&(i.value=oe))}o.value=R(s.value),a.value=R(t.value.length)-R(i.value)}function W(X){const J=R(X);!l.value||X&&!J?w=X:l.value.scrollTop=J}const Y=T(()=>t.value.slice(s.value,i.value).map((X,J)=>({raw:X,index:J+s.value,key:Mb(X)&&"value"in X?X.value:J+s.value})));return ke(t,()=>{m=Array.from({length:t.value.length}),y=Array.from({length:t.value.length}),P.immediate(),H()},{deep:!0}),{calculateVisibleItems:H,containerRef:l,markerRef:u,computedItems:Y,paddingTop:o,paddingBottom:a,scrollToIndex:W,handleScroll:L,handleScrollend:M,handleItemResize:C}}function g7(e,t){let n=e.length-1,r=0,s=0,i=null,o=-1;if(e[n]<t)return n;for(;r<=n;)if(s=r+n>>1,i=e[s],i>t)n=s-1;else if(i<t)o=s,r=s+1;else return i===t?s:r;return o}const v7=ce({items:{type:Array,default:()=>[]},renderless:Boolean,...p7(),...Ve(),...Or()},"VVirtualScroll"),y7=_e()({name:"VVirtualScroll",props:v7(),setup(e,t){let{slots:n}=t;const r=on("VVirtualScroll"),{dimensionStyles:s}=Mr(e),{calculateVisibleItems:i,containerRef:o,markerRef:a,handleScroll:l,handleScrollend:u,handleItemResize:c,scrollToIndex:d,paddingTop:f,paddingBottom:p,computedItems:v}=m7(e,Re(e,"items"));return Hr(()=>e.renderless,()=>{function m(){var w,x;const b=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)?"addEventListener":"removeEventListener";o.value===document.documentElement?(document[b]("scroll",l,{passive:!0}),document[b]("scrollend",u)):((w=o.value)==null||w[b]("scroll",l,{passive:!0}),(x=o.value)==null||x[b]("scrollend",u))}wt(()=>{o.value=IP(r.vnode.el,!0),m(!0)}),Sn(m)}),Ie(()=>{const m=v.value.map(y=>h(d7,{key:y.key,renderless:e.renderless,"onUpdate:height":b=>c(y.index,b)},{default:b=>{var w;return(w=n.default)==null?void 0:w.call(n,{item:y.raw,index:y.index,...b})}}));return e.renderless?h(Pe,null,[h("div",{ref:a,class:"v-virtual-scroll__spacer",style:{paddingTop:Le(f.value)}},null),m,h("div",{class:"v-virtual-scroll__spacer",style:{paddingBottom:Le(p.value)}},null)]):h("div",{ref:o,class:["v-virtual-scroll",e.class],onScrollPassive:l,onScrollend:u,style:[s.value,e.style]},[h("div",{ref:a,class:"v-virtual-scroll__container",style:{paddingTop:Le(f.value),paddingBottom:Le(p.value)}},[m])])}),{calculateVisibleItems:i,scrollToIndex:d}}});function b7(e,t){const n=Ae(!1);let r;function s(a){cancelAnimationFrame(r),n.value=!0,r=requestAnimationFrame(()=>{r=requestAnimationFrame(()=>{n.value=!1})})}async function i(){await new Promise(a=>requestAnimationFrame(a)),await new Promise(a=>requestAnimationFrame(a)),await new Promise(a=>requestAnimationFrame(a)),await new Promise(a=>{if(n.value){const l=ke(n,()=>{l(),a()})}else a()})}async function o(a){var c,d;if(a.key==="Tab"&&((c=t.value)==null||c.focus()),!["PageDown","PageUp","Home","End"].includes(a.key))return;const l=(d=e.value)==null?void 0:d.$el;if(!l)return;(a.key==="Home"||a.key==="End")&&l.scrollTo({top:a.key==="Home"?0:l.scrollHeight,behavior:"smooth"}),await i();const u=l.querySelectorAll(":scope > :not(.v-virtual-scroll__spacer)");if(a.key==="PageDown"||a.key==="Home"){const f=l.getBoundingClientRect().top;for(const p of u)if(p.getBoundingClientRect().top>=f){p.focus();break}}else{const f=l.getBoundingClientRect().bottom;for(const p of[...u].reverse())if(p.getBoundingClientRect().bottom<=f){p.focus();break}}}return{onScrollPassive:s,onKeydown:o}}const w7=ce({chips:Boolean,closableChips:Boolean,closeText:{type:String,default:"$vuetify.close"},openText:{type:String,default:"$vuetify.open"},eager:Boolean,hideNoData:Boolean,hideSelected:Boolean,listProps:{type:Object},menu:Boolean,menuIcon:{type:ze,default:"$dropdown"},menuProps:{type:Object},multiple:Boolean,noDataText:{type:String,default:"$vuetify.noDataText"},openOnClear:Boolean,itemColor:String,...TA({itemChildren:!1})},"Select"),S7=ce({...w7(),...Ms(KA({modelValue:null,role:"combobox"}),["validationValue","dirty","appendInnerIcon"]),...Mu({transition:{component:Ub}})},"VSelect"),Vo=_e()({name:"VSelect",props:S7(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:menu":e=>!0},setup(e,t){let{slots:n}=t;const{t:r}=Kr(),s=V(),i=V(),o=V(),a=st(e,"menu"),l=T({get:()=>a.value,set:Y=>{var X;a.value&&!Y&&((X=i.value)!=null&&X.ΨopenChildren.size)||(a.value=Y)}}),{items:u,transformIn:c,transformOut:d}=VW(e),f=st(e,"modelValue",[],Y=>c(Y===null?[null]:On(Y)),Y=>{const X=d(Y);return e.multiple?X:X[0]??null}),p=T(()=>typeof e.counterValue=="function"?e.counterValue(f.value):typeof e.counterValue=="number"?e.counterValue:f.value.length),v=GA(e),m=T(()=>f.value.map(Y=>Y.value)),y=Ae(!1),b=T(()=>l.value?e.closeText:e.openText);let w="",x;const P=T(()=>e.hideSelected?u.value.filter(Y=>!f.value.some(X=>(e.valueComparator||Rs)(X,Y))):u.value),S=T(()=>e.hideNoData&&!P.value.length||v.isReadonly.value||v.isDisabled.value),C=T(()=>{var Y;return{...e.menuProps,activatorProps:{...((Y=e.menuProps)==null?void 0:Y.activatorProps)||{},"aria-haspopup":"listbox"}}}),R=V(),k=b7(R,s);function E(Y){e.openOnClear&&(l.value=!0)}function I(){S.value||(l.value=!l.value)}function A(Y){P_(Y)&&O(Y)}function O(Y){var K,he;if(!Y.key||v.isReadonly.value)return;["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(Y.key)&&Y.preventDefault(),["Enter","ArrowDown"," "].includes(Y.key)&&(l.value=!0),["Escape","Tab"].includes(Y.key)&&(l.value=!1),Y.key==="Home"?(K=R.value)==null||K.focus("first"):Y.key==="End"&&((he=R.value)==null||he.focus("last"));const X=1e3;if(!P_(Y))return;const J=performance.now();J-x>X&&(w=""),w+=Y.key.toLowerCase(),x=J;const N=u.value.find(oe=>oe.title.toLowerCase().startsWith(w));if(N!==void 0){f.value=[N];const oe=P.value.indexOf(N);_t&&window.requestAnimationFrame(()=>{var we;oe>=0&&((we=o.value)==null||we.scrollToIndex(oe))})}}function L(Y){let X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!Y.props.disabled)if(e.multiple){const J=f.value.findIndex(K=>(e.valueComparator||Rs)(K.value,Y.value)),N=X??!~J;if(~J){const K=N?[...f.value,Y]:[...f.value];K.splice(J,1),f.value=K}else N&&(f.value=[...f.value,Y])}else{const J=X!==!1;f.value=J?[Y]:[],Mt(()=>{l.value=!1})}}function M(Y){var X;(X=R.value)!=null&&X.$el.contains(Y.relatedTarget)||(l.value=!1)}function z(){var Y;e.eager&&((Y=o.value)==null||Y.calculateVisibleItems())}function H(){var Y;y.value&&((Y=s.value)==null||Y.focus())}function G(Y){y.value=!0}function W(Y){if(Y==null)f.value=[];else if(Ah(s.value,":autofill")||Ah(s.value,":-webkit-autofill")){const X=u.value.find(J=>J.title===Y);X&&L(X)}else s.value&&(s.value.value="")}return ke(l,()=>{if(!e.hideSelected&&l.value&&f.value.length){const Y=P.value.findIndex(X=>f.value.some(J=>(e.valueComparator||Rs)(J.value,X.value)));_t&&window.requestAnimationFrame(()=>{var X;Y>=0&&((X=o.value)==null||X.scrollToIndex(Y))})}}),ke(()=>e.items,(Y,X)=>{l.value||y.value&&!X.length&&Y.length&&(l.value=!0)}),Ie(()=>{const Y=!!(e.chips||n.chip),X=!!(!e.hideNoData||P.value.length||n["prepend-item"]||n["append-item"]||n["no-data"]),J=f.value.length>0,N=ut.filterProps(e),K=J||!y.value&&e.label&&!e.persistentPlaceholder?void 0:e.placeholder;return h(ut,me({ref:s},N,{modelValue:f.value.map(he=>he.props.value).join(", "),"onUpdate:modelValue":W,focused:y.value,"onUpdate:focused":he=>y.value=he,validationValue:f.externalValue,counterValue:p.value,dirty:J,class:["v-select",{"v-select--active-menu":l.value,"v-select--chips":!!e.chips,[`v-select--${e.multiple?"multiple":"single"}`]:!0,"v-select--selected":f.value.length,"v-select--selection-slot":!!n.selection},e.class],style:e.style,inputmode:"none",placeholder:K,"onClick:clear":E,"onMousedown:control":I,onBlur:M,onKeydown:O,"aria-label":r(b.value),title:r(b.value)}),{...n,default:()=>h(Pe,null,[h(wm,me({ref:i,modelValue:l.value,"onUpdate:modelValue":he=>l.value=he,activator:"parent",contentClass:"v-select__content",disabled:S.value,eager:e.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:e.transition,onAfterEnter:z,onAfterLeave:H},C.value),{default:()=>[X&&h(Vt,me({ref:R,selected:m.value,selectStrategy:e.multiple?"independent":"single-independent",onMousedown:he=>he.preventDefault(),onKeydown:A,onFocusin:G,tabindex:"-1","aria-live":"polite",color:e.itemColor??e.color},k,e.listProps),{default:()=>{var he,oe,we;return[(he=n["prepend-item"])==null?void 0:he.call(n),!P.value.length&&!e.hideNoData&&(((oe=n["no-data"])==null?void 0:oe.call(n))??h(Be,{key:"no-data",title:r(e.noDataText)},null)),h(y7,{ref:o,renderless:!0,items:P.value},{default:ee=>{var He;let{item:de,index:ne,itemRef:U}=ee;const De=me(de.props,{ref:U,key:de.value,onClick:()=>L(de,null)});return((He=n.item)==null?void 0:He.call(n,{item:de,index:ne,props:De}))??h(Be,me(De,{role:"option"}),{prepend:F=>{let{isSelected:B}=F;return h(Pe,null,[e.multiple&&!e.hideSelected?h(yu,{key:de.value,modelValue:B,ripple:!1,tabindex:"-1"},null):void 0,de.props.prependAvatar&&h(lt,{image:de.props.prependAvatar},null),de.props.prependIcon&&h(Q,{icon:de.props.prependIcon},null)])}})}}),(we=n["append-item"])==null?void 0:we.call(n)]}})]}),f.value.map((he,oe)=>{function we(U){U.stopPropagation(),U.preventDefault(),L(he,!1)}const ee={"onClick:close":we,onKeydown(U){U.key!=="Enter"&&U.key!==" "||(U.preventDefault(),U.stopPropagation(),we(U))},onMousedown(U){U.preventDefault(),U.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0},de=Y?!!n.chip:!!n.selection,ne=de?bP(Y?n.chip({item:he,index:oe,props:ee}):n.selection({item:he,index:oe})):void 0;if(!(de&&!ne))return h("div",{key:he.value,class:"v-select__selection"},[Y?n.chip?h(Ot,{key:"chip-defaults",defaults:{VChip:{closable:e.closableChips,size:"small",text:he.title}}},{default:()=>[ne]}):h(_n,me({key:"chip",closable:e.closableChips,size:"small",text:he.title,disabled:he.props.disabled},ee),null):ne??h("span",{class:"v-select__selection-text"},[he.title,e.multiple&&oe<f.value.length-1&&h("span",{class:"v-select__selection-comma"},[_(",")])])])})]),"append-inner":function(){var ee;for(var he=arguments.length,oe=new Array(he),we=0;we<he;we++)oe[we]=arguments[we];return h(Pe,null,[(ee=n["append-inner"])==null?void 0:ee.call(n,...oe),e.menuIcon?h(Q,{class:"v-select__menu-icon",icon:e.menuIcon},null):void 0])}})}),Qi({isFocused:y,menu:l,select:L},s)}}),_7={class:"text-h5"},k7=$e({__name:"PrinterMaintenanceDialog",setup(e){const t=V([]),n=["Broken part","Blob","Maxtemp","Preheat error","Cable USB ","Bed thermal runaway","Thermistor Heatbed","Thermistor Heatblock","Thermal Runaway","Mintemp Nozzle","Mintemp Heatbed","Nozzle","Nozzle Clog","Fan Hotend","Fan Part cooling","Extruder rattle","Extruder","Z Axis","X Axis","Y Axis","Rented","Motherboard","Other","Clean"],r=V({}),s=Lt(),i=tn(nn.PrinterMaintenanceDialog),o=T(()=>s.maintenanceDialogPrinter),a=()=>{r.value.disabledReason=t.value.join(", ")},l=async()=>{var f;const c=(f=o.value)==null?void 0:f.id;if(!c){r.value={},u();return}const d=r.value.disabledReason;await Qt.updatePrinterMaintenance(c,d),r.value={},u()},u=()=>{t.value=[],i.closeDialog(),s.setMaintenanceDialogPrinter()};return(c,d)=>{const f=mi;return D(),te(f,{id:Z(i).dialogId,"max-width":"700px",onEscape:d[5]||(d[5]=p=>u())},{default:g(()=>[h(gt,{class:"pa-4"},{default:g(()=>[h(an,null,{default:g(()=>{var p;return[$("span",_7," Mark '"+re((p=o.value)==null?void 0:p.name)+"' for maintenance ",1)]}),_:1}),h(rn,{color:"secondary"},{default:g(()=>d[6]||(d[6]=[_(" Keep this info clear and stick to convention ")])),_:1}),h(en,null,{default:g(()=>[h(rt,null,{default:g(()=>[h(Ue,{cols:"12"},{default:g(()=>[h(Vo,{modelValue:t.value,"onUpdate:modelValue":[d[0]||(d[0]=p=>t.value=p),d[1]||(d[1]=p=>a())],chips:!0,items:n,"menu-props":{closeOnBack:!0,closeOnContentClick:!0},clearable:"",color:"primary",multiple:"",placeholder:"Quick select reason"},null,8,["modelValue"]),h(ZA,{modelValue:r.value.disabledReason,"onUpdate:modelValue":d[2]||(d[2]=p=>r.value.disabledReason=p),"data-vv-validate-on":"change|blur"},{label:g(()=>d[7]||(d[7]=[$("div",null,"Type the reason*",-1)])),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(Dn,null,{default:g(()=>[d[10]||(d[10]=$("em",{class:"text-red"}," * indicates required field ",-1)),h(wn),h(se,{variant:"text",onClick:d[3]||(d[3]=p=>u())},{default:g(()=>d[8]||(d[8]=[_(" Close ")])),_:1}),h(se,{color:"blue-darken-1",variant:"text",onClick:d[4]||(d[4]=p=>l())},{default:g(()=>d[9]||(d[9]=[_(" Save ")])),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),x7=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],E7=[1,2,3,4,5,6,7,8,9,10,11,12],uO=$e({__name:"GridSettingsList",setup(e){const t=Ns(),n=Dt(),r=T(()=>t.largeTiles),s=T(()=>t.preferCancelOverQuickStop);async function i(u){if(u)return l(u,t.gridRows)}async function o(u){if(u)return l(t.gridCols,u)}async function a(){return l(t.gridCols,t.gridRows)}async function l(u,c){await t.updateFrontendSettings({gridCols:c,gridRows:u,largeTiles:r.value,tilePreferCancelOverQuickStop:s.value}),n.info("Grid settings updated")}return(u,c)=>(D(),ge("div",null,[h(en,null,{default:g(()=>[h(Vt,{subheader:"",lines:"three"},{default:g(()=>{var d;return[h(Wr,null,{default:g(()=>c[2]||(c[2]=[_(" Grid Rows and Columns ")])),_:1}),(d=Z(t).settings)!=null&&d.frontend?(D(),te(Be,{key:0},{default:g(()=>[h(rt,null,{default:g(()=>[h(Ue,{cols:"3"},{default:g(()=>[h(Vo,{type:"number","onUpdate:modelValue":o,value:Z(t).settings.frontend.gridRows,items:Z(x7),label:"Set the grid rows"},null,8,["value","items"])]),_:1}),h(Ue,{cols:"3"},{default:g(()=>[h(Vo,{type:"number","onUpdate:modelValue":i,value:Z(t).settings.frontend.gridCols,items:Z(E7),label:"Set the grid columns"},null,8,["value","items"])]),_:1})]),_:1})]),_:1})):ue("",!0)]}),_:1}),h(dn),h(Vt,{subheader:"",lines:"three"},{default:g(()=>[h(Wr,null,{default:g(()=>c[3]||(c[3]=[_(" Large or Compact Tiles ")])),_:1}),h(Be,null,{default:g(()=>{var d;return[(d=Z(t).settings)!=null&&d.frontend?(D(),te(rt,{key:0},{default:g(()=>[h(Ue,{cols:"5"},{default:g(()=>[h(yn,{onChange:a,modelValue:Z(t).settings.frontend.largeTiles,"onUpdate:modelValue":c[0]||(c[0]=f=>Z(t).settings.frontend.largeTiles=f),label:"Large tiles"},null,8,["modelValue"])]),_:1})]),_:1})):ue("",!0)]}),_:1})]),_:1}),h(dn),h(Vt,{subheader:"","three-line":""},{default:g(()=>[h(Wr,null,{default:g(()=>c[4]||(c[4]=[_("Large or Compact Tiles")])),_:1}),h(Be,null,{default:g(()=>{var d;return[(d=Z(t).settings)!=null&&d.frontend?(D(),te(rt,{key:0},{default:g(()=>[h(Ue,{cols:"5"},{default:g(()=>[h(yn,{onChange:a,modelValue:Z(t).settings.frontend.tilePreferCancelOverQuickStop,"onUpdate:modelValue":c[1]||(c[1]=f=>Z(t).settings.frontend.tilePreferCancelOverQuickStop=f),label:"Print tile - show cancel instead of quick stop"},null,8,["modelValue"])]),_:1})]),_:1})):ue("",!0)]}),_:1})]),_:1})]),_:1})]))}}),C7={class:"text-h5"},P7=$e({__name:"GridSettingsDialog",setup(e){const t=tn(nn.GridSettingsDialog);function n(){t.closeDialog(t.context())}return(r,s)=>{const i=mi;return D(),te(i,{id:Z(t).dialogId,"max-width":"1000px",onEscape:s[1]||(s[1]=o=>n())},{default:g(()=>[h(gt,{class:"pa-4"},{default:g(()=>[h(an,null,{default:g(()=>[$("span",C7,[s[4]||(s[4]=_(" Grid Settings ")),h(nt,{top:""},{activator:g(({props:o})=>[h(se,me(o,{class:"ma-2",fab:"","x-small":""}),{default:g(()=>[h(Q,null,{default:g(()=>s[2]||(s[2]=[_("question_mark")])),_:1})]),_:2},1040)]),default:g(()=>s[3]||(s[3]=[_(" Change your grid rows, columns and tile settings. ")])),_:1})])]),_:1}),h(uO),h(Dn,null,{default:g(()=>[h(wn),h(se,{onClick:s[0]||(s[0]=o=>Z(t).closeDialog())},{default:g(()=>s[5]||(s[5]=[_("Close")])),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}});class ns extends vr{static async createUser(t){const n=Me.userRoute;return await this.post(n,t)}static async listUsers(){const t=Me.userRoute;return await this.get(t)}static async listRoles(){const t=Me.rolesRoute;return await this.get(t)}static async getProfile(){const t=Me.userProfileRoute;return await this.get(t)}static async changePassword(t,n,r){const s=Me.userChangePasswordRoute(t);return await this.post(s,{oldPassword:n,newPassword:r})}static async changeUsername(t,n){const r=Me.userChangeUsernameRoute(t);return await this.post(r,{username:n})}static async deleteUser(t){const n=Me.userDeleteRoute(t);return await this.delete(n)}static async setUserVerified(t,n){const r=Me.userSetVerifiedRoute(t);return await this.post(r,{isVerified:n})}static async setRootUser(t,n){const r=Me.userSetRootUserRoute(t);return await this.post(r,{isRootUser:n})}static async setUserRoles(t,n){const r=Me.userSetUserRolesRoute(t);return await this.post(r,{roleIds:n})}}const T7={class:"text-h5"},R7={class:"pl-5"},I7=$e({__name:"CreateUserDialog",setup(e){const t=tn(nn.CreateUserDialog),n=Xe("appConstants"),r=Dt(),s=V({username:"",password:"",roleIds:[]}),i=V(""),o=V([]),a=T(()=>{var f,p;return(p=(f=s.value)==null?void 0:f.username)!=null&&p.length?hm(s.value.username):"??"}),l={required:f=>!!f||"Required field",minLength:f=>f.length>=n.minUsernameLength||`Minimum ${n.minUsernameLength} characters`,password:f=>f.length>=8?!0:"Password must be at least 8 characters",passwordMatch:f=>f===s.value.password||"Passwords must match"},u=()=>!s.value.username||s.value.username.length<n.minUsernameLength?(r.openErrorMessage({title:"Invalid username"}),!1):!s.value.password||l.password(s.value.password)!==!0?(r.openErrorMessage({title:"Invalid password"}),!1):s.value.password!==i.value?(r.openErrorMessage({title:"Passwords do not match"}),!1):s.value.roleIds.length?!0:(r.openErrorMessage({title:"Please select a role"}),!1),c=async()=>{if(u())try{await ns.createUser(s.value),r.openInfoMessage({title:`User ${s.value.username} created successfully`}),d()}catch(f){r.openErrorMessage({title:"Failed to create user",subtitle:f instanceof Error?f.message:"Unknown error"})}},d=()=>{s.value={username:"",password:"",roleIds:[]},i.value="",t.closeDialog()};return wt(async()=>{try{o.value=await ns.listRoles()}catch(f){r.openErrorMessage({title:"Failed to load roles",subtitle:f instanceof Error?f.message:"Unknown error"})}}),(f,p)=>{const v=mi;return D(),te(v,{id:Z(t).dialogId,"max-width":"700px",onEscape:d},{default:g(()=>[h(gt,{class:"pa-4"},{default:g(()=>[h(an,null,{default:g(()=>[$("span",T7,[h(lt,{color:"primary",size:"56"},{default:g(()=>[_(re(a.value),1)]),_:1}),$("span",R7,[p[6]||(p[6]=_("New verified User ")),h(nt,{top:""},{activator:g(({props:m})=>[h(se,me({class:"ma-2",fab:""},m,{"x-small":""}),{default:g(()=>[h(Q,null,{default:g(()=>p[4]||(p[4]=[_("question_mark")])),_:1})]),_:2},1040)]),default:g(()=>p[5]||(p[5]=[_(" The user will be set to verified and assigned roles. Please share the username and password with them manually. ")])),_:1})])])]),_:1}),h(en,null,{default:g(()=>[h(rt,null,{default:g(()=>[h(Ue,{cols:12},{default:g(()=>[h(Bn,null,{default:g(()=>[h(rt,null,{default:g(()=>[h(Ue,{cols:"12",md:"6"},{default:g(()=>[h(ut,{modelValue:s.value.username,"onUpdate:modelValue":p[0]||(p[0]=m=>s.value.username=m),rules:[l.required,l.minLength],autofocus:"",label:"Username*","prepend-icon":"person",required:""},null,8,["modelValue","rules"]),h(ut,{modelValue:s.value.password,"onUpdate:modelValue":p[1]||(p[1]=m=>s.value.password=m),rules:[l.required,l.password],label:"Password*","prepend-icon":"lock",required:"",type:"password"},null,8,["modelValue","rules"]),h(ut,{modelValue:i.value,"onUpdate:modelValue":p[2]||(p[2]=m=>i.value=m),rules:[l.required,l.passwordMatch],label:"Confirm Password*","prepend-icon":"lock",required:"",type:"password"},null,8,["modelValue","rules"]),h(Vo,{modelValue:s.value.roleIds,"onUpdate:modelValue":p[3]||(p[3]=m=>s.value.roleIds=m),items:o.value.map(m=>({text:m.name,value:m.id})),rules:[l.required],label:"Roles*",multiple:"","prepend-icon":"shield",required:""},null,8,["modelValue","items","rules"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),h(Dn,null,{default:g(()=>[p[9]||(p[9]=$("em",{class:"text-red"}," * indicates required field ",-1)),h(wn),h(se,{variant:"text",onClick:d},{default:g(()=>p[7]||(p[7]=[_("Close")])),_:1}),h(se,{color:"blue-darken-1",variant:"text",onClick:c},{default:g(()=>p[8]||(p[8]=[_("Create")])),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),cO=()=>({id:void 0,name:Ya(),floor:"1",printers:[]});class rs extends vr{static convertPrinterFloorToCreateForm(t){const n=cO();return n.id=t==null?void 0:t.id,n.name=(t==null?void 0:t.name)||Ya(),n.printers=[],n.floor=((t==null?void 0:t.floor)||1).toString(),n}static convertCreateFormToFloor(t){const n={...t};if(n.floor=parseInt(n.floor),Number.isNaN(n.floor))throw new Error("Floor number did not convert to number.");return n}static async getFloors(){const t=`${Me.floorRoute}/`;return await this.get(t)}static async createFloor(t){const n=`${Me.floorRoute}/`;return await this.post(n,t)}static async updateFloorName(t,n){const r=`${Me.updatePrinterFloorNameRoute(t)}/`;return await this.patch(r,{name:n})}static async updateFloorNumber(t,n){const r=`${Me.updatePrinterFloorNumberRoute(t)}/`;return await this.patch(r,{floor:n})}static async deleteFloor(t){const n=`${Me.getFloorRoute(t)}/`;return await this.delete(n)}static async addPrinterToFloor(t,n){const r=`${Me.addOrRemovePrinterFromFloorRoute(t)}/`;return await this.post(r,n)}static async deletePrinterFromFloor(t,n){const r=`${Me.addOrRemovePrinterFromFloorRoute(t)}/`;return await this.delete(r,{printerId:n})}}const eo=ps("Floors",{state:()=>({floors:[],selectedFloorIndex:0}),getters:{selectedFloor(e){return e.floors.length<=e.selectedFloorIndex?null:e.floors[e.selectedFloorIndex]},sortedFloors(e){return e.floors.sort((t,n)=>t.floor-n.floor)},floor(e){return t=>e.floors.find(n=>n.id===t)},floorNames(e){return e.floors.map(t=>t.name)},floorOfPrinter(){return e=>this.floors.find(t=>t.printers.map(n=>n.printerId).includes(e))},floorlessPrinters(e){return Lt().printers.filter(n=>!e.floors.find(r=>r.printers.find(s=>s.printerId===n.id)))},gridSortedPrinters(){const e=Ns(),t=e.gridCols,n=e.gridRows,s=Lt().printers;if(!s.length)return[];if(!this.selectedFloor)return[];const i=this.selectedFloor.printers,o=[];for(let a=0;a<t;a++){const l=[];o.push(l);for(let u=0;u<n;u++){const c=i.find(d=>d.x===a&&d.y===u);if(!c)l.push(void 0);else{const d=s.find(f=>f.id===c.printerId);l.push(d)}}}return o}},actions:{async loadFloors(){const e=await rs.getFloors();return this.saveFloors(e),e},async createFloor(e){const t=await rs.createFloor(e);return this.floors.push(t),t},saveFloors(e){var r;if(!(e!=null&&e.length))return;this.floors=e.sort((s,i)=>s.floor-i.floor);const t=(r=this.selectedFloor)==null?void 0:r.id,n=this.floors.findIndex(s=>s.id===t);this.selectedFloorIndex=n===-1?0:n},async deleteFloor(e){await rs.deleteFloor(e),this._popPrinterFloor(e)},async updateFloorName({floorId:e,name:t}){const n=await rs.updateFloorName(e,t);return this._replaceFloor(n),n},async updateFloorNumber({floorId:e,floorNumber:t}){const n=await rs.updateFloorNumber(e,t);return this._replaceFloor(n),n},async addPrinterToFloor({floorId:e,printerId:t,x:n,y:r}){const s=await rs.addPrinterToFloor(e,{printerId:t,x:n,y:r});this._replaceFloor(s)},async changeSelectedFloorByIndex(e){var n;if(!((n=this.floors)!=null&&n.length))return;if(this.floors.length<=e){console.warn("Selected floor index exceeds floors array"),this.selectedFloorIndex=0;return}if(!this.floors[e]){console.warn("Selected floor index did not exist in floors array"),this.selectedFloorIndex=0;return}this.selectedFloorIndex=e},async deletePrinterFromFloor({floorId:e,printerId:t}){const n=await rs.deletePrinterFromFloor(e,t);this._replaceFloor(n)},_popPrinterFloor(e){const t=this.floors.findIndex(n=>n.id===e);t!==-1&&this.floors.splice(t,1)},_replaceFloor(e){const t=this.floors.findIndex(n=>n.id===e.id);t!==-1&&(this.floors[t]=e)}}}),A7={class:"text-h5"},O7=$e({__name:"AddOrUpdateFloorDialog",setup(e){const t=tn(nn.AddOrUpdateFloorDialog),n=eo(),r=Xe("appConstants"),s=Dt(),i=V(cO()),o=T(()=>{var d;return(d=t.context())==null?void 0:d.printerFloorId}),a=T(()=>i.value?hm(i.value.name):""),l=()=>!i.value.name||i.value.name.length<r.minPrinterFloorNameLength?(s.openErrorMessage({title:"Invalid floor name"}),!1):Number.isInteger(Number(i.value.floor))?!0:(s.openErrorMessage({title:"Floor number must be an integer"}),!1),u=async()=>{if(!l())return;const d=rs.convertCreateFormToFloor(i.value);await n.createFloor(d),s.openInfoMessage({title:`Floor ${d.name} created`}),i.value.name=Ya();const f=Math.max(...n.floors.map(p=>p.floor))+1;i.value.floor=f.toString(),c()},c=()=>{t.closeDialog()};return ke(o,d=>{if(d){const f=n.floor(d);i.value=rs.convertPrinterFloorToCreateForm(f)}}),wt(()=>{var d;if(o.value){const f=n.floor(o.value);i.value=rs.convertPrinterFloorToCreateForm(f)}else if((d=n.floors)!=null&&d.length){const f=Math.max(...n.floors.map(p=>p.floor))+1;i.value.floor=f.toString()}}),(d,f)=>{const p=mi;return D(),te(p,{id:Z(t).dialogId,"max-width":"700px",onEscape:c},{default:g(()=>[h(gt,null,{default:g(()=>[h(an,null,{default:g(()=>[$("span",A7,[h(lt,{color:"primary",size:"56"},{default:g(()=>[_(re(a.value),1)]),_:1}),f[2]||(f[2]=_(" New Floor "))])]),_:1}),h(en,null,{default:g(()=>[h(rt,null,{default:g(()=>[h(Ue,{cols:12},{default:g(()=>[h(Bn,null,{default:g(()=>[h(rt,null,{default:g(()=>[i.value?(D(),te(Ue,{key:0,cols:"12",md:"6"},{default:g(()=>[h(ut,{modelValue:i.value.name,"onUpdate:modelValue":f[0]||(f[0]=v=>i.value.name=v),autofocus:"",label:"Floor name*",required:""},null,8,["modelValue"]),h(ut,{modelValue:i.value.floor,"onUpdate:modelValue":f[1]||(f[1]=v=>i.value.floor=v),label:"Floor number",required:"",type:"number"},null,8,["modelValue"])]),_:1})):ue("",!0)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),h(Dn,null,{default:g(()=>[f[5]||(f[5]=$("em",{class:"text-red"}," * indicates required field ",-1)),h(wn),h(se,{variant:"text",onClick:c},{default:g(()=>f[3]||(f[3]=[_("Close")])),_:1}),h(se,{color:"blue-darken-1",variant:"text",onClick:u},{default:g(()=>f[4]||(f[4]=[_("Create")])),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}});class op extends vr{static async listCameraStreams(){return await this.get("/api/camera-stream/")}static async createCameraStream(t){return await this.post("/api/camera-stream/",t)}static async getCameraStream(t){return await this.get(`/api/camera-stream/${t}`)}static async updateCameraStream(t,n){return await this.put(`/api/camera-stream/${t}`,n)}static async deleteCameraStream(t){return await this.delete(`/api/camera-stream/${t}`)}}var qu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Qa=typeof window>"u"||"Deno"in globalThis;function ts(){}function M7(e,t){return typeof e=="function"?e(t):e}function Py(e){return typeof e=="number"&&e>=0&&e!==1/0}function dO(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Vl(e,t){return typeof e=="function"?e(t):e}function Es(e,t){return typeof e=="function"?e(t):e}function ak(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Vw(o,t.options))return!1}else if(!ld(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function lk(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Ja(t.options.mutationKey)!==Ja(i))return!1}else if(!ld(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Vw(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ja)(e)}function Ja(e){return JSON.stringify(e,(t,n)=>Ty(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function ld(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!ld(e[n],t[n])):!1}function fO(e,t){if(e===t)return e;const n=uk(e)&&uk(t);if(n||Ty(e)&&Ty(t)){const r=n?e:Object.keys(e),s=r.length,i=n?t:Object.keys(t),o=i.length,a=n?[]:{};let l=0;for(let u=0;u<o;u++){const c=n?u:i[u];(!n&&r.includes(c)||n)&&e[c]===void 0&&t[c]===void 0?(a[c]=void 0,l++):(a[c]=fO(e[c],t[c]),a[c]===e[c]&&e[c]!==void 0&&l++)}return s===o&&l===s?e:a}return t}function ap(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function uk(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ty(e){if(!ck(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!ck(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function ck(e){return Object.prototype.toString.call(e)==="[object Object]"}function D7(e){return new Promise(t=>{setTimeout(t,e)})}function Ry(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?fO(e,t):t}function $7(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function F7(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Uw=Symbol();function hO(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Uw?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var wa,mo,jl,PE,L7=(PE=class extends qu{constructor(){super();je(this,wa);je(this,mo);je(this,jl);Oe(this,jl,t=>{if(!Qa&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){j(this,mo)||this.setEventListener(j(this,jl))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,mo))==null||t.call(this),Oe(this,mo,void 0))}setEventListener(t){var n;Oe(this,jl,t),(n=j(this,mo))==null||n.call(this),Oe(this,mo,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){j(this,wa)!==t&&(Oe(this,wa,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof j(this,wa)=="boolean"?j(this,wa):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},wa=new WeakMap,mo=new WeakMap,jl=new WeakMap,PE),zw=new L7,ql,go,Wl,TE,N7=(TE=class extends qu{constructor(){super();je(this,ql,!0);je(this,go);je(this,Wl);Oe(this,Wl,t=>{if(!Qa&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){j(this,go)||this.setEventListener(j(this,Wl))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,go))==null||t.call(this),Oe(this,go,void 0))}setEventListener(t){var n;Oe(this,Wl,t),(n=j(this,go))==null||n.call(this),Oe(this,go,t(this.setOnline.bind(this)))}setOnline(t){j(this,ql)!==t&&(Oe(this,ql,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return j(this,ql)}},ql=new WeakMap,go=new WeakMap,Wl=new WeakMap,TE),lp=new N7;function Iy(){let e,t;const n=new Promise((s,i)=>{e=s,t=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}function B7(e){return Math.min(1e3*2**e,3e4)}function pO(e){return(e??"online")==="online"?lp.isOnline():!0}var mO=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Og(e){return e instanceof mO}function gO(e){let t=!1,n=0,r=!1,s;const i=Iy(),o=m=>{var y;r||(f(new mO(m)),(y=e.abort)==null||y.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>zw.isFocused()&&(e.networkMode==="always"||lp.isOnline())&&e.canRun(),c=()=>pO(e.networkMode)&&e.canRun(),d=m=>{var y;r||(r=!0,(y=e.onSuccess)==null||y.call(e,m),s==null||s(),i.resolve(m))},f=m=>{var y;r||(r=!0,(y=e.onError)==null||y.call(e,m),s==null||s(),i.reject(m))},p=()=>new Promise(m=>{var y;s=b=>{(r||u())&&m(b)},(y=e.onPause)==null||y.call(e)}).then(()=>{var m;s=void 0,r||(m=e.onContinue)==null||m.call(e)}),v=()=>{if(r)return;let m;const y=n===0?e.initialPromise:void 0;try{m=y??e.fn()}catch(b){m=Promise.reject(b)}Promise.resolve(m).then(d).catch(b=>{var C;if(r)return;const w=e.retry??(Qa?0:3),x=e.retryDelay??B7,P=typeof x=="function"?x(n,b):x,S=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,b);if(t||!S){f(b);return}n++,(C=e.onFail)==null||C.call(e,n,b),D7(P).then(()=>u()?void 0:p()).then(()=>{t?f(b):v()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?v():p().then(v),i)}}function V7(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=a=>setTimeout(a,0);const i=a=>{t?e.push(a):s(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var Ln=V7(),Sa,RE,vO=(RE=class{constructor(){je(this,Sa)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Py(this.gcTime)&&Oe(this,Sa,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Qa?1/0:5*60*1e3))}clearGcTimeout(){j(this,Sa)&&(clearTimeout(j(this,Sa)),Oe(this,Sa,void 0))}},Sa=new WeakMap,RE),Gl,Kl,es,_a,jn,gd,ka,ws,ki,IE,U7=(IE=class extends vO{constructor(t){super();je(this,ws);je(this,Gl);je(this,Kl);je(this,es);je(this,_a);je(this,jn);je(this,gd);je(this,ka);Oe(this,ka,!1),Oe(this,gd,t.defaultOptions),this.setOptions(t.options),this.observers=[],Oe(this,_a,t.client),Oe(this,es,j(this,_a).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Oe(this,Gl,z7(this.options)),this.state=t.state??j(this,Gl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=j(this,jn))==null?void 0:t.promise}setOptions(t){this.options={...j(this,gd),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&j(this,es).remove(this)}setData(t,n){const r=Ry(this.state.data,t,this.options);return tt(this,ws,ki).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){tt(this,ws,ki).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=j(this,jn))==null?void 0:r.promise;return(s=j(this,jn))==null||s.cancel(t),n?n.then(ts).catch(ts):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(j(this,Gl))}isActive(){return this.observers.some(t=>Es(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Uw||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!dO(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=j(this,jn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=j(this,jn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),j(this,es).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(j(this,jn)&&(j(this,ka)?j(this,jn).cancel({revert:!0}):j(this,jn).cancelRetry()),this.scheduleGc()),j(this,es).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||tt(this,ws,ki).call(this,{type:"invalidate"})}fetch(t,n){var l,u,c;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(j(this,jn))return j(this,jn).continueRetry(),j(this,jn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,s=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(Oe(this,ka,!0),r.signal)})},i=()=>{const d=hO(this.options,n),f={client:j(this,_a),queryKey:this.queryKey,meta:this.meta};return s(f),Oe(this,ka,!1),this.options.persister?this.options.persister(d,f,this):d(f)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:j(this,_a),state:this.state,fetchFn:i};s(o),(l=this.options.behavior)==null||l.onFetch(o,this),Oe(this,Kl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&tt(this,ws,ki).call(this,{type:"fetch",meta:(c=o.fetchOptions)==null?void 0:c.meta});const a=d=>{var f,p,v,m;Og(d)&&d.silent||tt(this,ws,ki).call(this,{type:"error",error:d}),Og(d)||((p=(f=j(this,es).config).onError)==null||p.call(f,d,this),(m=(v=j(this,es).config).onSettled)==null||m.call(v,this.state.data,d,this)),this.scheduleGc()};return Oe(this,jn,gO({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var f,p,v,m;if(d===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(y){a(y);return}(p=(f=j(this,es).config).onSuccess)==null||p.call(f,d,this),(m=(v=j(this,es).config).onSettled)==null||m.call(v,d,this.state.error,this),this.scheduleGc()},onError:a,onFail:(d,f)=>{tt(this,ws,ki).call(this,{type:"failed",failureCount:d,error:f})},onPause:()=>{tt(this,ws,ki).call(this,{type:"pause"})},onContinue:()=>{tt(this,ws,ki).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),j(this,jn).start()}},Gl=new WeakMap,Kl=new WeakMap,es=new WeakMap,_a=new WeakMap,jn=new WeakMap,gd=new WeakMap,ka=new WeakMap,ws=new WeakSet,ki=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...yO(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return Og(s)&&s.revert&&j(this,Kl)?{...j(this,Kl),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ln.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),j(this,es).notify({query:this,type:"updated",action:t})})},IE);function yO(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:pO(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function z7(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Js,AE,bO=(AE=class extends qu{constructor(n={}){super();je(this,Js);this.config=n,Oe(this,Js,new Map)}build(n,r,s){const i=r.queryKey,o=r.queryHash??Vw(i,r);let a=this.get(o);return a||(a=new U7({client:n,queryKey:i,queryHash:o,options:n.defaultQueryOptions(r),state:s,defaultOptions:n.getQueryDefaults(i)}),this.add(a)),a}add(n){j(this,Js).has(n.queryHash)||(j(this,Js).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const r=j(this,Js).get(n.queryHash);r&&(n.destroy(),r===n&&j(this,Js).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Ln.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return j(this,Js).get(n)}getAll(){return[...j(this,Js).values()]}find(n){const r={exact:!0,...n};return this.getAll().find(s=>ak(r,s))}findAll(n={}){const r=this.getAll();return Object.keys(n).length>0?r.filter(s=>ak(n,s)):r}notify(n){Ln.batch(()=>{this.listeners.forEach(r=>{r(n)})})}onFocus(){Ln.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Ln.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},Js=new WeakMap,AE),Zs,or,xa,ei,oo,OE,H7=(OE=class extends vO{constructor(t){super();je(this,ei);je(this,Zs);je(this,or);je(this,xa);this.mutationId=t.mutationId,Oe(this,or,t.mutationCache),Oe(this,Zs,[]),this.state=t.state||wO(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){j(this,Zs).includes(t)||(j(this,Zs).push(t),this.clearGcTimeout(),j(this,or).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Oe(this,Zs,j(this,Zs).filter(n=>n!==t)),this.scheduleGc(),j(this,or).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){j(this,Zs).length||(this.state.status==="pending"?this.scheduleGc():j(this,or).remove(this))}continue(){var t;return((t=j(this,xa))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,i,o,a,l,u,c,d,f,p,v,m,y,b,w,x,P,S,C,R;Oe(this,xa,gO({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(k,E)=>{tt(this,ei,oo).call(this,{type:"failed",failureCount:k,error:E})},onPause:()=>{tt(this,ei,oo).call(this,{type:"pause"})},onContinue:()=>{tt(this,ei,oo).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>j(this,or).canRun(this)}));const n=this.state.status==="pending",r=!j(this,xa).canStart();try{if(!n){tt(this,ei,oo).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(s=j(this,or).config).onMutate)==null?void 0:i.call(s,t,this));const E=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));E!==this.state.context&&tt(this,ei,oo).call(this,{type:"pending",context:E,variables:t,isPaused:r})}const k=await j(this,xa).start();return await((u=(l=j(this,or).config).onSuccess)==null?void 0:u.call(l,k,t,this.state.context,this)),await((d=(c=this.options).onSuccess)==null?void 0:d.call(c,k,t,this.state.context)),await((p=(f=j(this,or).config).onSettled)==null?void 0:p.call(f,k,null,this.state.variables,this.state.context,this)),await((m=(v=this.options).onSettled)==null?void 0:m.call(v,k,null,t,this.state.context)),tt(this,ei,oo).call(this,{type:"success",data:k}),k}catch(k){try{throw await((b=(y=j(this,or).config).onError)==null?void 0:b.call(y,k,t,this.state.context,this)),await((x=(w=this.options).onError)==null?void 0:x.call(w,k,t,this.state.context)),await((S=(P=j(this,or).config).onSettled)==null?void 0:S.call(P,void 0,k,this.state.variables,this.state.context,this)),await((R=(C=this.options).onSettled)==null?void 0:R.call(C,void 0,k,t,this.state.context)),k}finally{tt(this,ei,oo).call(this,{type:"error",error:k})}}finally{j(this,or).runNext(this)}}},Zs=new WeakMap,or=new WeakMap,xa=new WeakMap,ei=new WeakSet,oo=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ln.batch(()=>{j(this,Zs).forEach(r=>{r.onMutationUpdate(t)}),j(this,or).notify({mutation:this,type:"updated",action:t})})},OE);function wO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ii,Ss,vd,ME,SO=(ME=class extends qu{constructor(n={}){super();je(this,Ii);je(this,Ss);je(this,vd);this.config=n,Oe(this,Ii,new Set),Oe(this,Ss,new Map),Oe(this,vd,0)}build(n,r,s){const i=new H7({mutationCache:this,mutationId:++Kd(this,vd)._,options:n.defaultMutationOptions(r),state:s});return this.add(i),i}add(n){j(this,Ii).add(n);const r=Sf(n);if(typeof r=="string"){const s=j(this,Ss).get(r);s?s.push(n):j(this,Ss).set(r,[n])}this.notify({type:"added",mutation:n})}remove(n){if(j(this,Ii).delete(n)){const r=Sf(n);if(typeof r=="string"){const s=j(this,Ss).get(r);if(s)if(s.length>1){const i=s.indexOf(n);i!==-1&&s.splice(i,1)}else s[0]===n&&j(this,Ss).delete(r)}}this.notify({type:"removed",mutation:n})}canRun(n){const r=Sf(n);if(typeof r=="string"){const s=j(this,Ss).get(r),i=s==null?void 0:s.find(o=>o.state.status==="pending");return!i||i===n}else return!0}runNext(n){var s;const r=Sf(n);if(typeof r=="string"){const i=(s=j(this,Ss).get(r))==null?void 0:s.find(o=>o!==n&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ln.batch(()=>{j(this,Ii).forEach(n=>{this.notify({type:"removed",mutation:n})}),j(this,Ii).clear(),j(this,Ss).clear()})}getAll(){return Array.from(j(this,Ii))}find(n){const r={exact:!0,...n};return this.getAll().find(s=>lk(r,s))}findAll(n={}){return this.getAll().filter(r=>lk(n,r))}notify(n){Ln.batch(()=>{this.listeners.forEach(r=>{r(n)})})}resumePausedMutations(){const n=this.getAll().filter(r=>r.state.isPaused);return Ln.batch(()=>Promise.all(n.map(r=>r.continue().catch(ts))))}},Ii=new WeakMap,Ss=new WeakMap,vd=new WeakMap,ME);function Sf(e){var t;return(t=e.options.scope)==null?void 0:t.id}function dk(e){return{onFetch:(t,n)=>{var c,d,f,p,v;const r=t.options,s=(f=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],o=((v=t.state.data)==null?void 0:v.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const y=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},b=hO(t.options,t.fetchOptions),w=async(x,P,S)=>{if(m)return Promise.reject();if(P==null&&x.pages.length)return Promise.resolve(x);const C={client:t.client,queryKey:t.queryKey,pageParam:P,direction:S?"backward":"forward",meta:t.options.meta};y(C);const R=await b(C),{maxPages:k}=t.options,E=S?F7:$7;return{pages:E(x.pages,R,k),pageParams:E(x.pageParams,P,k)}};if(s&&i.length){const x=s==="backward",P=x?j7:fk,S={pages:i,pageParams:o},C=P(r,S);a=await w(S,C,x)}else{const x=e??i.length;do{const P=l===0?o[0]??r.initialPageParam:fk(r,a);if(l>0&&P==null)break;a=await w(a,P),l++}while(l<x)}return a};t.options.persister?t.fetchFn=()=>{var m,y;return(y=(m=t.options).persister)==null?void 0:y.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function fk(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function j7(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var cn,vo,yo,Yl,Xl,bo,Ql,Jl,DE,q7=(DE=class{constructor(t={}){je(this,cn);je(this,vo);je(this,yo);je(this,Yl);je(this,Xl);je(this,bo);je(this,Ql);je(this,Jl);Oe(this,cn,t.queryCache||new bO),Oe(this,vo,t.mutationCache||new SO),Oe(this,yo,t.defaultOptions||{}),Oe(this,Yl,new Map),Oe(this,Xl,new Map),Oe(this,bo,0)}mount(){Kd(this,bo)._++,j(this,bo)===1&&(Oe(this,Ql,zw.subscribe(async t=>{t&&(await this.resumePausedMutations(),j(this,cn).onFocus())})),Oe(this,Jl,lp.subscribe(async t=>{t&&(await this.resumePausedMutations(),j(this,cn).onOnline())})))}unmount(){var t,n;Kd(this,bo)._--,j(this,bo)===0&&((t=j(this,Ql))==null||t.call(this),Oe(this,Ql,void 0),(n=j(this,Jl))==null||n.call(this),Oe(this,Jl,void 0))}isFetching(t){return j(this,cn).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return j(this,vo).findAll({...t,status:"pending"}).length}getQueryData(t){var r;const n=this.defaultQueryOptions({queryKey:t});return(r=j(this,cn).get(n.queryHash))==null?void 0:r.state.data}ensureQueryData(t){const n=this.defaultQueryOptions(t),r=j(this,cn).build(this,n),s=r.state.data;return s===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(Vl(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(s))}getQueriesData(t){return j(this,cn).findAll(t).map(({queryKey:n,state:r})=>{const s=r.data;return[n,s]})}setQueryData(t,n,r){const s=this.defaultQueryOptions({queryKey:t}),i=j(this,cn).get(s.queryHash),o=i==null?void 0:i.state.data,a=M7(n,o);if(a!==void 0)return j(this,cn).build(this,s).setData(a,{...r,manual:!0})}setQueriesData(t,n,r){return Ln.batch(()=>j(this,cn).findAll(t).map(({queryKey:s})=>[s,this.setQueryData(s,n,r)]))}getQueryState(t){var r;const n=this.defaultQueryOptions({queryKey:t});return(r=j(this,cn).get(n.queryHash))==null?void 0:r.state}removeQueries(t){const n=j(this,cn);Ln.batch(()=>{n.findAll(t).forEach(r=>{n.remove(r)})})}resetQueries(t,n){const r=j(this,cn);return Ln.batch(()=>(r.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...t},n)))}cancelQueries(t,n={}){const r={revert:!0,...n},s=Ln.batch(()=>j(this,cn).findAll(t).map(i=>i.cancel(r)));return Promise.all(s).then(ts).catch(ts)}invalidateQueries(t,n={}){return Ln.batch(()=>(j(this,cn).findAll(t).forEach(r=>{r.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},n)))}refetchQueries(t,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},s=Ln.batch(()=>j(this,cn).findAll(t).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,r);return r.throwOnError||(o=o.catch(ts)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(s).then(ts)}fetchQuery(t){const n=this.defaultQueryOptions(t);n.retry===void 0&&(n.retry=!1);const r=j(this,cn).build(this,n);return r.isStaleByTime(Vl(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(ts).catch(ts)}fetchInfiniteQuery(t){return t.behavior=dk(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(ts).catch(ts)}ensureInfiniteQueryData(t){return t.behavior=dk(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return lp.isOnline()?j(this,vo).resumePausedMutations():Promise.resolve()}getQueryCache(){return j(this,cn)}getMutationCache(){return j(this,vo)}getDefaultOptions(){return j(this,yo)}setDefaultOptions(t){Oe(this,yo,t)}setQueryDefaults(t,n){j(this,Yl).set(Ja(t),{queryKey:t,defaultOptions:n})}getQueryDefaults(t){const n=[...j(this,Yl).values()],r={};return n.forEach(s=>{ld(t,s.queryKey)&&Object.assign(r,s.defaultOptions)}),r}setMutationDefaults(t,n){j(this,Xl).set(Ja(t),{mutationKey:t,defaultOptions:n})}getMutationDefaults(t){const n=[...j(this,Xl).values()],r={};return n.forEach(s=>{ld(t,s.mutationKey)&&Object.assign(r,s.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const n={...j(this,yo).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return n.queryHash||(n.queryHash=Vw(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===Uw&&(n.enabled=!1),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...j(this,yo).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){j(this,cn).clear(),j(this,vo).clear()}},cn=new WeakMap,vo=new WeakMap,yo=new WeakMap,Yl=new WeakMap,Xl=new WeakMap,bo=new WeakMap,Ql=new WeakMap,Jl=new WeakMap,DE),Sr,ft,yd,ar,Ea,Zl,wo,ti,bd,eu,tu,Ca,Pa,So,nu,Tt,gc,Ay,Oy,My,Dy,$y,Fy,Ly,_O,$E,W7=($E=class extends qu{constructor(t,n){super();je(this,Tt);je(this,Sr);je(this,ft);je(this,yd);je(this,ar);je(this,Ea);je(this,Zl);je(this,wo);je(this,ti);je(this,bd);je(this,eu);je(this,tu);je(this,Ca);je(this,Pa);je(this,So);je(this,nu,new Set);this.options=n,Oe(this,Sr,t),Oe(this,ti,null),Oe(this,wo,Iy()),this.options.experimental_prefetchInRender||j(this,wo).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(j(this,ft).addObserver(this),hk(j(this,ft),this.options)?tt(this,Tt,gc).call(this):this.updateResult(),tt(this,Tt,Dy).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ny(j(this,ft),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ny(j(this,ft),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,tt(this,Tt,$y).call(this),tt(this,Tt,Fy).call(this),j(this,ft).removeObserver(this)}setOptions(t,n){const r=this.options,s=j(this,ft);if(this.options=j(this,Sr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Es(this.options.enabled,j(this,ft))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");tt(this,Tt,Ly).call(this),j(this,ft).setOptions(this.options),r._defaulted&&!ap(this.options,r)&&j(this,Sr).getQueryCache().notify({type:"observerOptionsUpdated",query:j(this,ft),observer:this});const i=this.hasListeners();i&&pk(j(this,ft),s,this.options,r)&&tt(this,Tt,gc).call(this),this.updateResult(n),i&&(j(this,ft)!==s||Es(this.options.enabled,j(this,ft))!==Es(r.enabled,j(this,ft))||Vl(this.options.staleTime,j(this,ft))!==Vl(r.staleTime,j(this,ft)))&&tt(this,Tt,Ay).call(this);const o=tt(this,Tt,Oy).call(this);i&&(j(this,ft)!==s||Es(this.options.enabled,j(this,ft))!==Es(r.enabled,j(this,ft))||o!==j(this,So))&&tt(this,Tt,My).call(this,o)}getOptimisticResult(t){const n=j(this,Sr).getQueryCache().build(j(this,Sr),t),r=this.createResult(n,t);return K7(this,r)&&(Oe(this,ar,r),Oe(this,Zl,this.options),Oe(this,Ea,j(this,ft).state)),r}getCurrentResult(){return j(this,ar)}trackResult(t,n){const r={};return Object.keys(t).forEach(s=>{Object.defineProperty(r,s,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(s),n==null||n(s),t[s])})}),r}trackProp(t){j(this,nu).add(t)}getCurrentQuery(){return j(this,ft)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=j(this,Sr).defaultQueryOptions(t),r=j(this,Sr).getQueryCache().build(j(this,Sr),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return tt(this,Tt,gc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),j(this,ar)))}createResult(t,n){var k;const r=j(this,ft),s=this.options,i=j(this,ar),o=j(this,Ea),a=j(this,Zl),u=t!==r?t.state:j(this,yd),{state:c}=t;let d={...c},f=!1,p;if(n._optimisticResults){const E=this.hasListeners(),I=!E&&hk(t,n),A=E&&pk(t,r,n,s);(I||A)&&(d={...d,...yO(c.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:v,errorUpdatedAt:m,status:y}=d;if(n.select&&d.data!==void 0)if(i&&d.data===(o==null?void 0:o.data)&&n.select===j(this,bd))p=j(this,eu);else try{Oe(this,bd,n.select),p=n.select(d.data),p=Ry(i==null?void 0:i.data,p,n),Oe(this,eu,p),Oe(this,ti,null)}catch(E){Oe(this,ti,E)}else p=d.data;if(n.placeholderData!==void 0&&p===void 0&&y==="pending"){let E;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))E=i.data;else if(E=typeof n.placeholderData=="function"?n.placeholderData((k=j(this,tu))==null?void 0:k.state.data,j(this,tu)):n.placeholderData,n.select&&E!==void 0)try{E=n.select(E),Oe(this,ti,null)}catch(I){Oe(this,ti,I)}E!==void 0&&(y="success",p=Ry(i==null?void 0:i.data,E,n),f=!0)}j(this,ti)&&(v=j(this,ti),p=j(this,eu),m=Date.now(),y="error");const b=d.fetchStatus==="fetching",w=y==="pending",x=y==="error",P=w&&b,S=p!==void 0,R={status:y,fetchStatus:d.fetchStatus,isPending:w,isSuccess:y==="success",isError:x,isInitialLoading:P,isLoading:P,data:p,dataUpdatedAt:d.dataUpdatedAt,error:v,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!w,isLoadingError:x&&!S,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:x&&S,isStale:Hw(t,n),refetch:this.refetch,promise:j(this,wo)};if(this.options.experimental_prefetchInRender){const E=O=>{R.status==="error"?O.reject(R.error):R.data!==void 0&&O.resolve(R.data)},I=()=>{const O=Oe(this,wo,R.promise=Iy());E(O)},A=j(this,wo);switch(A.status){case"pending":t.queryHash===r.queryHash&&E(A);break;case"fulfilled":(R.status==="error"||R.data!==A.value)&&I();break;case"rejected":(R.status!=="error"||R.error!==A.reason)&&I();break}}return R}updateResult(t){const n=j(this,ar),r=this.createResult(j(this,ft),this.options);if(Oe(this,Ea,j(this,ft).state),Oe(this,Zl,this.options),j(this,Ea).data!==void 0&&Oe(this,tu,j(this,ft)),ap(r,n))return;Oe(this,ar,r);const s={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!j(this,nu).size)return!0;const l=new Set(a??j(this,nu));return this.options.throwOnError&&l.add("error"),Object.keys(j(this,ar)).some(u=>{const c=u;return j(this,ar)[c]!==n[c]&&l.has(c)})};(t==null?void 0:t.listeners)!==!1&&i()&&(s.listeners=!0),tt(this,Tt,_O).call(this,{...s,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&tt(this,Tt,Dy).call(this)}},Sr=new WeakMap,ft=new WeakMap,yd=new WeakMap,ar=new WeakMap,Ea=new WeakMap,Zl=new WeakMap,wo=new WeakMap,ti=new WeakMap,bd=new WeakMap,eu=new WeakMap,tu=new WeakMap,Ca=new WeakMap,Pa=new WeakMap,So=new WeakMap,nu=new WeakMap,Tt=new WeakSet,gc=function(t){tt(this,Tt,Ly).call(this);let n=j(this,ft).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ts)),n},Ay=function(){tt(this,Tt,$y).call(this);const t=Vl(this.options.staleTime,j(this,ft));if(Qa||j(this,ar).isStale||!Py(t))return;const r=dO(j(this,ar).dataUpdatedAt,t)+1;Oe(this,Ca,setTimeout(()=>{j(this,ar).isStale||this.updateResult()},r))},Oy=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(j(this,ft)):this.options.refetchInterval)??!1},My=function(t){tt(this,Tt,Fy).call(this),Oe(this,So,t),!(Qa||Es(this.options.enabled,j(this,ft))===!1||!Py(j(this,So))||j(this,So)===0)&&Oe(this,Pa,setInterval(()=>{(this.options.refetchIntervalInBackground||zw.isFocused())&&tt(this,Tt,gc).call(this)},j(this,So)))},Dy=function(){tt(this,Tt,Ay).call(this),tt(this,Tt,My).call(this,tt(this,Tt,Oy).call(this))},$y=function(){j(this,Ca)&&(clearTimeout(j(this,Ca)),Oe(this,Ca,void 0))},Fy=function(){j(this,Pa)&&(clearInterval(j(this,Pa)),Oe(this,Pa,void 0))},Ly=function(){const t=j(this,Sr).getQueryCache().build(j(this,Sr),this.options);if(t===j(this,ft))return;const n=j(this,ft);Oe(this,ft,t),Oe(this,yd,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},_O=function(t){Ln.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(j(this,ar))}),j(this,Sr).getQueryCache().notify({query:j(this,ft),type:"observerResultsUpdated"})})},$E);function G7(e,t){return Es(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function hk(e,t){return G7(e,t)||e.state.data!==void 0&&Ny(e,t,t.refetchOnMount)}function Ny(e,t,n){if(Es(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Hw(e,t)}return!1}function pk(e,t,n,r){return(e!==t||Es(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Hw(e,n)}function Hw(e,t){return Es(t.enabled,e)!==!1&&e.isStaleByTime(Vl(t.staleTime,e))}function K7(e,t){return!ap(e.getCurrentResult(),t)}var _o,ko,_r,Ai,Ni,uh,By,FE,Y7=(FE=class extends qu{constructor(n,r){super();je(this,Ni);je(this,_o);je(this,ko);je(this,_r);je(this,Ai);Oe(this,_o,n),this.setOptions(r),this.bindMethods(),tt(this,Ni,uh).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=j(this,_o).defaultMutationOptions(n),ap(this.options,r)||j(this,_o).getMutationCache().notify({type:"observerOptionsUpdated",mutation:j(this,_r),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Ja(r.mutationKey)!==Ja(this.options.mutationKey)?this.reset():((s=j(this,_r))==null?void 0:s.state.status)==="pending"&&j(this,_r).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=j(this,_r))==null||n.removeObserver(this)}onMutationUpdate(n){tt(this,Ni,uh).call(this),tt(this,Ni,By).call(this,n)}getCurrentResult(){return j(this,ko)}reset(){var n;(n=j(this,_r))==null||n.removeObserver(this),Oe(this,_r,void 0),tt(this,Ni,uh).call(this),tt(this,Ni,By).call(this)}mutate(n,r){var s;return Oe(this,Ai,r),(s=j(this,_r))==null||s.removeObserver(this),Oe(this,_r,j(this,_o).getMutationCache().build(j(this,_o),this.options)),j(this,_r).addObserver(this),j(this,_r).execute(n)}},_o=new WeakMap,ko=new WeakMap,_r=new WeakMap,Ai=new WeakMap,Ni=new WeakSet,uh=function(){var r;const n=((r=j(this,_r))==null?void 0:r.state)??wO();Oe(this,ko,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},By=function(n){Ln.batch(()=>{var r,s,i,o,a,l,u,c;if(j(this,Ai)&&this.hasListeners()){const d=j(this,ko).variables,f=j(this,ko).context;(n==null?void 0:n.type)==="success"?((s=(r=j(this,Ai)).onSuccess)==null||s.call(r,n.data,d,f),(o=(i=j(this,Ai)).onSettled)==null||o.call(i,n.data,null,d,f)):(n==null?void 0:n.type)==="error"&&((l=(a=j(this,Ai)).onError)==null||l.call(a,n.error,d,f),(c=(u=j(this,Ai)).onSettled)==null||c.call(u,void 0,n.error,d,f))}this.listeners.forEach(d=>{d(j(this,ko))})})},FE),X7="VUE_QUERY_CLIENT";function kO(e){const t=e?`:${e}`:"";return`${X7}${t}`}function Vy(e,t){Object.keys(e).forEach(n=>{e[n]=t[n]})}function Uy(e,t,n="",r=0){if(t){const s=t(e,n,r);if(s===void 0&&Je(e)||s!==void 0)return s}if(Array.isArray(e))return e.map((s,i)=>Uy(s,t,String(i),r+1));if(typeof e=="object"&&J7(e)){const s=Object.entries(e).map(([i,o])=>[i,Uy(o,t,i,r+1)]);return Object.fromEntries(s)}return e}function Q7(e,t){return Uy(e,t)}function it(e,t=!1){return Q7(e,(n,r,s)=>{if(s===1&&r==="queryKey")return it(n,!0);if(t&&Z7(n))return it(n(),t);if(Je(n))return it(Z(n),t)})}function J7(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Z7(e){return typeof e=="function"}function zy(e,t){return typeof e=="function"?e(...t):!!e}function jw(e=""){if(!AC())throw new Error("vue-query hooks can only be used inside setup() function or functions that support injection context.");const t=kO(e),n=Xe(t);if(!n)throw new Error("No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.");return n}var eK=class extends bO{find(e){return super.find(it(e))}findAll(e={}){return super.findAll(it(e))}},tK=class extends SO{find(e){return super.find(it(e))}findAll(e={}){return super.findAll(it(e))}},nK=class extends q7{constructor(e={}){const t={defaultOptions:e.defaultOptions,queryCache:e.queryCache||new eK,mutationCache:e.mutationCache||new tK};super(t),this.isRestoring=V(!1)}isFetching(e={}){return super.isFetching(it(e))}isMutating(e={}){return super.isMutating(it(e))}getQueryData(e){return super.getQueryData(it(e))}ensureQueryData(e){return super.ensureQueryData(it(e))}getQueriesData(e){return super.getQueriesData(it(e))}setQueryData(e,t,n={}){return super.setQueryData(it(e),t,it(n))}setQueriesData(e,t,n={}){return super.setQueriesData(it(e),t,it(n))}getQueryState(e){return super.getQueryState(it(e))}removeQueries(e={}){return super.removeQueries(it(e))}resetQueries(e={},t={}){return super.resetQueries(it(e),it(t))}cancelQueries(e={},t={}){return super.cancelQueries(it(e),it(t))}invalidateQueries(e={},t={}){const n=it(e),r=it(t);if(super.invalidateQueries({...n,refetchType:"none"},r),n.refetchType==="none")return Promise.resolve();const s={...n,type:n.refetchType??n.type??"active"};return Mt().then(()=>super.refetchQueries(s,r))}refetchQueries(e={},t={}){return super.refetchQueries(it(e),it(t))}fetchQuery(e){return super.fetchQuery(it(e))}prefetchQuery(e){return super.prefetchQuery(it(e))}fetchInfiniteQuery(e){return super.fetchInfiniteQuery(it(e))}prefetchInfiniteQuery(e){return super.prefetchInfiniteQuery(it(e))}setDefaultOptions(e){super.setDefaultOptions(it(e))}setQueryDefaults(e,t){super.setQueryDefaults(it(e),it(t))}getQueryDefaults(e){return super.getQueryDefaults(it(e))}setMutationDefaults(e,t){super.setMutationDefaults(it(e),it(t))}getMutationDefaults(e){return super.getMutationDefaults(it(e))}},rK={install:(e,t={})=>{const n=kO(t.queryClientKey);let r;if("queryClient"in t&&t.queryClient)r=t.queryClient;else{const o="queryClientConfig"in t?t.queryClientConfig:void 0;r=new nK(o)}Qa||r.mount();let s=()=>{};if(t.clientPersister){r.isRestoring.value=!0;const[o,a]=t.clientPersister(r);s=o,a.then(()=>{var l;r.isRestoring.value=!1,(l=t.clientPersisterOnSuccess)==null||l.call(t,r)})}const i=()=>{r.unmount(),s()};if(e.onUnmount)e.onUnmount(i);else{const o=e.unmount;e.unmount=function(){i(),o()}}e.provide(n,r)}};function sK(e,t,n){const r=jw(),s=T(()=>{const p=it(t);typeof p.enabled=="function"&&(p.enabled=p.enabled());const v=r.defaultQueryOptions(p);return v._optimisticResults=r.isRestoring.value?"isRestoring":"optimistic",v}),i=new e(r,s.value),o=Cp(i.getCurrentResult());let a=()=>{};ke(r.isRestoring,p=>{p||(a(),a=i.subscribe(v=>{Vy(o,v)}))},{immediate:!0});const l=()=>{i.setOptions(s.value),Vy(o,i.getCurrentResult())};ke(s,l),Sn(()=>{a()});const u=(...p)=>(l(),o.refetch(...p)),c=()=>new Promise((p,v)=>{let m=()=>{};const y=()=>{if(s.value.enabled!==!1){i.setOptions(s.value);const b=i.getOptimisticResult(s.value);b.isStale?(m(),i.fetchOptimistic(s.value).then(p,w=>{zy(s.value.throwOnError,[w,i.getCurrentQuery()])?v(w):p(i.getCurrentResult())})):(m(),p(b))}};y(),m=ke(s,y)});ke(()=>o.error,p=>{if(o.isError&&!o.isFetching&&zy(s.value.throwOnError,[p,i.getCurrentQuery()]))throw p});const f=Wo(o);for(const p in o)typeof o[p]=="function"&&(f[p]=o[p]);return f.suspense=c,f.refetch=u,f}function Sm(e,t){return sK(W7,e)}function iK(e,t){const n=jw(),r=T(()=>n.defaultMutationOptions(it(e))),s=new Y7(n,r.value),i=Cp(s.getCurrentResult()),o=s.subscribe(c=>{Vy(i,c)}),a=(c,d)=>{s.mutate(c,d).catch(()=>{})};ke(r,()=>{s.setOptions(r.value)}),Sn(()=>{o()});const u=Wo(i);return ke(()=>i.error,c=>{if(c&&zy(r.value.throwOnError,[c]))throw c}),{...u,mutate:a,mutateAsync:i.mutate,reset:i.reset}}const oK=ce({...Ve(),...Or(),...BA()},"VLayout"),_m=_e()({name:"VLayout",props:oK(),setup(e,t){let{slots:n}=t;const{layoutClasses:r,layoutStyles:s,getLayoutItem:i,items:o,layoutRef:a}=HA(e),{dimensionStyles:l}=Mr(e);return Ie(()=>{var u;return h("div",{ref:a,class:[r.value,e.class],style:[l.value,s.value,e.style]},[(u=n.default)==null?void 0:u.call(n)])}),{getLayoutItem:i,items:o}}}),aK={class:"text-h5"},lK={key:0},uK={key:1},cK=$e({__name:"AddOrUpdateCameraStreamDialog",setup(e){const t=jw(),n=tn(nn.AddOrUpdateCameraDialog),r=T(()=>"C"),s=V({name:"",streamURL:""}),i=()=>{var d;return((d=n.context())==null?void 0:d.addOrUpdate)==="update"},o=T(()=>i());ke(()=>n.context(),d=>{var p;if(!d||(d==null?void 0:d.addOrUpdate)!=="update"){s.value.streamURL="",s.value.name="";return}const f=(p=t.getQueryData(["cameraStream"]))==null?void 0:p.find(v=>v.cameraStream.id===d.cameraId);s.value.name=f==null?void 0:f.cameraStream.name,s.value.streamURL=(f==null?void 0:f.cameraStream.streamURL)||""});function a(){n.closeDialog()}async function l(){await op.createCameraStream({streamURL:s.value.streamURL,name:s.value.name}),await t.refetchQueries({queryKey:["cameraStream"]}),n.closeDialog()}async function u(){var d;await op.updateCameraStream((d=n.context())==null?void 0:d.cameraId,{streamURL:s.value.streamURL,name:s.value.name}),await t.refetchQueries({queryKey:["cameraStream"]}),n.closeDialog()}function c(){n.closeDialog()}return(d,f)=>{const p=mi;return D(),te(p,{id:Z(n).dialogId,"max-width":"800px",onEscape:f[3]||(f[3]=v=>a())},{default:g(()=>[h(gt,null,{default:g(()=>[h(an,null,{default:g(()=>[$("span",aK,[h(lt,{class:"mr-2",color:"primary",size:"56"},{default:g(()=>[_(re(r.value),1)]),_:1}),o.value?(D(),ge("span",lK," Updating Camera ")):(D(),ge("span",uK," New Camera "))])]),_:1}),h(en,null,{default:g(()=>[h(Bn,{"grid-list-md":""},{default:g(()=>[h(_m,{wrap:""},{default:g(()=>[h(ut,{modelValue:s.value.name,"onUpdate:modelValue":f[0]||(f[0]=v=>s.value.name=v),label:"Name",required:""},null,8,["modelValue"]),h(ut,{modelValue:s.value.streamURL,"onUpdate:modelValue":f[1]||(f[1]=v=>s.value.streamURL=v),label:"Url (MJPEG)",required:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(Dn,null,{default:g(()=>[h(wn),h(se,{color:"primary-darken-2",onClick:c},{default:g(()=>f[4]||(f[4]=[_(" Cancel ")])),_:1}),h(se,{color:"primary",onClick:f[2]||(f[2]=v=>o.value?u():l())},{default:g(()=>[_(re(o.value?"Update":"Create"),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),qw=ps("TestPrinter",{state:()=>({currentCorrelationToken:void 0,testPrinter:void 0,testPrinterEvents:[]}),getters:{getEvents(){return()=>{var e;return(((e=this.testPrinterEvents)==null?void 0:e.filter(t=>t.correlationToken===this.currentCorrelationToken))||[]).filter(t=>(t.event!=="API_STATE_UPDATED"||t.payload!=="unset")&&(t.event!=="WS_STATE_UPDATED"||t.payload!=="unopened")).map(t=>{var r,s,i;return{event:t.event.startsWith("WS_")?"Socket":"API",payload:(s=(r=t.payload)==null?void 0:r.toString())==null?void 0:s.replace("noResponse","unreachable").replace("authFail","authentication failure"),failure:["authFail","noResponse","aborted","globalKey","error","connection error","closed","connection closed"].includes((i=t.payload)==null?void 0:i.toString())}})}}},actions:{clearEvents(){this.testPrinterEvents=[]},async createTestPrinter(e){return this.testPrinter=e,await Qt.testConnection(e)},saveEvent(e){var t;(t=this.testPrinterEvents)==null||t.push(e)}}}),dK="error",fK="success",hK=$e({__name:"PrinterChecksPanel",setup(e){const t=qw(),n=V(4);function r(){return t.getEvents().map(s=>({label:s.event,text:s.payload,color:s.failure?dK:fK}))}return(s,i)=>(D(),te(Ue,{cols:Z(n)},{default:g(()=>[i[0]||(i[0]=$("strong",null," Checks: ",-1)),(D(!0),ge(Pe,null,Wt(r(),(o,a)=>(D(),te(rn,{key:a,type:o.color,density:"compact"},{default:g(()=>[$("small",null,re(o.label)+" "+re(o.text),1)]),_:2},1032,["type"]))),128))]),_:1},8,["cols"]))}}),pK="/assets/klipper-logo-B1Hu-a1R.svg",mk="/assets/octoprint-tentacle-D_4slObB.svg",xO=Symbol.for("vuetify:v-item-group"),mK=ce({...Ve(),...Cd({selectedClass:"v-item--selected"}),...vt(),...$t()},"VItemGroup"),gK=_e()({name:"VItemGroup",props:mK(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:r}=Yt(e),{isSelected:s,select:i,next:o,prev:a,selected:l}=Pu(e,xO);return()=>h(e.tag,{class:["v-item-group",r.value,e.class],style:e.style},{default:()=>{var u;return[(u=n.default)==null?void 0:u.call(n,{isSelected:s,select:i,next:o,prev:a,selected:l.value})]}})}}),vK=_e()({name:"VItem",props:Pd(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const{isSelected:r,select:s,toggle:i,selectedClass:o,value:a,disabled:l}=Td(e,xO);return()=>{var u;return(u=n.default)==null?void 0:u.call(n,{isSelected:r.value,selectedClass:o.value,select:s,toggle:i,value:a.value,disabled:l.value})}}}),yK={class:"text-h5"},bK={key:0},wK={key:1},SK={class:"ml-3 align-center"},_K=$e({__name:"AddOrUpdatePrinterDialog",setup(e){const t=tn(nn.AddOrUpdatePrinterDialog),n=Lt(),r=qw(),s=Zi(),i=Xe("appConstants"),o=Dt(),a=V(null),l=V(!1),u=V(!1),c=V(!1),d=V(""),f=V(Sy()),p=T(()=>{var L,M;if(s.hasFeature("multiplePrinterServices")){const z=s.getFeature("multiplePrinterServices");if((M=(L=z==null?void 0:z.subFeatures)==null?void 0:L.types)==null?void 0:M.includes("klipper"))return[{name:"OctoPrint",logo:mk,height:"75px"},{name:"Klipper",logo:pK,height:"75px"}]}return[{name:"OctoPrint",logo:mk,height:"75px"}]}),v=T(()=>{var L;return(L=n.updateDialogPrinter)==null?void 0:L.id});wt(async()=>{if(v.value){const L=n.printer(v.value);f.value=Qt.convertPrinterToCreateForm(L)}}),ke(v,L=>{if(!L)return;const M=n.printer(L);f.value=Qt.convertPrinterToCreateForm(M)});const m=T(()=>n.updateDialogPrinter),y=T(()=>!!m.value),b=T(()=>y?"Save":"Create"),w=T(()=>{var L;return f?hm((L=f.value)==null?void 0:L.name):"?"}),x=T(()=>({required:!0,max:i.maxPrinterNameLength})),P=T(()=>({required:!0,length:i.apiKeyLength,alpha_num:!0}));function S(){f.value=Sy()}function C(){c.value=!0}async function R(){if(!f)return;r.clearEvents(),C();const{correlationToken:L}=await r.createTestPrinter(f.value);r.currentCorrelationToken=L}async function k(L){await n.createPrinter(L,u.value),o.openInfoMessage({title:`Printer ${L.name} created`})}async function E(L){const M=L.id;await n.updatePrinter({printerId:M,updatedPrinter:L},u.value),o.openInfoMessage({title:`Printer ${L.name} updated`})}async function I(){var M,z,H,G,W;if(!f)return;a.value=null,l.value=!0,(M=f.value.printerURL)!=null&&M.length&&!((z=f.value.printerURL)!=null&&z.startsWith("http://"))&&!((H=f.value.printerURL)!=null&&H.startsWith("https://"))&&(f.value.printerURL+="https://");const L=f.value;try{y.value?await E(L):await k(L),O()}catch(Y){Y instanceof DT?(a.value=((W=(G=Y.response)==null?void 0:G.data)==null?void 0:W.error)||Y.message,o.error("Validation Failed",Y.message)):(a.value=Y.message,o.error("Error",Y.message))}finally{l.value=!1,u.value=!1}}async function A(){f.value.name=Ya(),n.updateDialogPrinter=void 0,a.value=null,u.value=!1,a.value=null}function O(){t.closeDialog(),u.value=!1,a.value=null,c.value=!1,r.clearEvents(),S(),n.updateDialogPrinter=void 0,d.value=""}return(L,M)=>{const z=hK,H=mi;return D(),te(H,{id:Z(t).dialogId,"max-width":Z(c)?"900px":"700px",onEscape:M[11]||(M[11]=G=>O())},{default:g(()=>[h(gt,{class:"pa-4"},{default:g(()=>[h(an,null,{default:g(()=>[$("span",yK,[h(lt,{color:"primary",size:"56"},{default:g(()=>[_(re(Z(w)),1)]),_:1}),Z(y)?(D(),ge("span",bK," Updating Printer ")):(D(),ge("span",wK," New Printer "))])]),_:1}),h(en,null,{default:g(()=>{var G;return[M[14]||(M[14]=$("h4",null,"Printer type",-1)),h(gK,{modelValue:Z(f).printerType,"onUpdate:modelValue":M[0]||(M[0]=W=>Z(f).printerType=W),mandatory:""},{default:g(()=>[h(Bn,null,{default:g(()=>[h(rt,null,{default:g(()=>[(D(!0),ge(Pe,null,Wt(Z(p),W=>(D(),te(Ue,{key:W.name,cols:"12",md:"6"},{default:g(()=>[h(vK,null,{default:g(({isSelected:Y,toggle:X})=>[h(gt,{color:Y?"primary":"blue-grey darken-4",class:"d-flex align-center justify-center elevation-8",height:"75px",width:"225px",onClick:X},{default:g(()=>[h(cs,{src:W.logo,height:W.height,"max-width":"125px",width:"125px"},null,8,["src","height"]),h(NN,null,{default:g(()=>[$("h3",SK,re(W.name),1)]),_:2},1024)]),_:2},1032,["color","onClick"])]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"]),h(rt,null,{default:g(()=>[h(Ue,{cols:Z(c)?8:12},{default:g(()=>[Z(f)?(D(),te(rt,{key:0},{default:g(()=>[h(Ue,null,{default:g(()=>[h(ut,{modelValue:Z(f).name,"onUpdate:modelValue":M[1]||(M[1]=W=>Z(f).name=W),counter:Z(x).max,autofocus:"",class:"ma-1",label:"Printer name*",required:""},null,8,["modelValue","counter"])]),_:1}),h(Ue,null,{default:g(()=>[h(yn,{modelValue:Z(f).enabled,"onUpdate:modelValue":M[2]||(M[2]=W=>Z(f).enabled=W),hint:"Disabling makes the printer passive",label:"Enabled*","persistent-hint":"",required:""},null,8,["modelValue"])]),_:1})]),_:1})):ue("",!0),h(ut,{modelValue:Z(f).printerURL,"onUpdate:modelValue":M[3]||(M[3]=W=>Z(f).printerURL=W),class:"ma-1",hint:"F.e. 'octopi.local' or 'https://my.printer.com'",label:"Printer URL*"},null,8,["modelValue"]),h(ut,{modelValue:Z(f).apiKey,"onUpdate:modelValue":M[4]||(M[4]=W=>Z(f).apiKey=W),counter:Z(P).length,class:"ma-1",hint:"User or Application Key with 32 or 43 characters (Global API key will fail)",label:"API Key*","persistent-hint":"",required:""},null,8,["modelValue","counter"])]),_:1},8,["cols"]),Z(c)?(D(),te(z,{key:0,cols:4},{default:g(()=>[h(se,{onClick:M[5]||(M[5]=W=>c.value=!1)},{default:g(()=>M[12]||(M[12]=[_(" Hide checks ")])),_:1})]),_:1})):ue("",!0)]),_:1}),(G=Z(a))!=null&&G.length?(D(),te(rn,{key:0,color:"primary",class:"my-3"},{default:g(()=>[_(re(Z(a))+" ",1),h(yn,{color:"warning",modelValue:Z(u),"onUpdate:modelValue":M[6]||(M[6]=W=>Je(u)?u.value=W:null),label:"Force save"},null,8,["modelValue"])]),_:1})):ue("",!0),Z(l)?(D(),te(rn,{key:1,class:"my-3"},{default:g(()=>[M[13]||(M[13]=_(" Validating printer ")),h(ri,{indeterminate:""})]),_:1})):ue("",!0)]}),_:1}),h(Dn,null,{default:g(()=>[M[18]||(M[18]=$("em",{class:"text-red"}," * indicates required field ",-1)),h(wn),h(se,{variant:"text",onClick:M[7]||(M[7]=G=>O())},{default:g(()=>M[15]||(M[15]=[_(" Close ")])),_:1}),Z(y)?(D(),te(se,{key:0,color:"gray",variant:"text",onClick:M[8]||(M[8]=G=>A())},{default:g(()=>M[16]||(M[16]=[_(" Duplicate ")])),_:1})):ue("",!0),h(se,{color:"warning",variant:"text",onClick:M[9]||(M[9]=G=>R())},{default:g(()=>M[17]||(M[17]=[_(" Test connection ")])),_:1}),h(se,{color:"blue-darken-1",variant:"text",onClick:M[10]||(M[10]=G=>I())},{default:g(()=>[_(re(Z(b)),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["id","max-width"])}}}),kK=ce({text:String,...Ve(),...vt()},"VToolbarTitle"),En=_e()({name:"VToolbarTitle",props:kK(),setup(e,t){let{slots:n}=t;return Ie(()=>{const r=!!(n.default||n.text||e.text);return h(e.tag,{class:["v-toolbar-title",e.class],style:e.style},{default:()=>{var s;return[r&&h("div",{class:"v-toolbar-title__placeholder"},[n.text?n.text():e.text,(s=n.default)==null?void 0:s.call(n)])]}})}),{}}}),xK=[null,"prominent","default","comfortable","compact"],EO=ce({absolute:Boolean,collapse:Boolean,color:String,density:{type:String,default:"default",validator:e=>xK.includes(e)},extended:Boolean,extensionHeight:{type:[Number,String],default:48},flat:Boolean,floating:Boolean,height:{type:[Number,String],default:64},image:String,title:String,...ms(),...Ve(),...vs(),...$n(),...vt({tag:"header"}),...$t()},"VToolbar"),mr=_e()({name:"VToolbar",props:EO(),setup(e,t){var p;let{slots:n}=t;const{backgroundColorClasses:r,backgroundColorStyles:s}=fr(Re(e,"color")),{borderClasses:i}=Ds(e),{elevationClasses:o}=$s(e),{roundedClasses:a}=Vn(e),{themeClasses:l}=Yt(e),{rtlClasses:u}=Dr(),c=Ae(!!(e.extended||(p=n.extension)!=null&&p.call(n))),d=T(()=>parseInt(Number(e.height)+(e.density==="prominent"?Number(e.height):0)-(e.density==="comfortable"?8:0)-(e.density==="compact"?16:0),10)),f=T(()=>c.value?parseInt(Number(e.extensionHeight)+(e.density==="prominent"?Number(e.extensionHeight):0)-(e.density==="comfortable"?4:0)-(e.density==="compact"?8:0),10):0);return Ir({VBtn:{variant:"text"}}),Ie(()=>{var b;const v=!!(e.title||n.title),m=!!(n.image||e.image),y=(b=n.extension)==null?void 0:b.call(n);return c.value=!!(e.extended||y),h(e.tag,{class:["v-toolbar",{"v-toolbar--absolute":e.absolute,"v-toolbar--collapse":e.collapse,"v-toolbar--flat":e.flat,"v-toolbar--floating":e.floating,[`v-toolbar--density-${e.density}`]:!0},r.value,i.value,o.value,a.value,l.value,u.value,e.class],style:[s.value,e.style]},{default:()=>[m&&h("div",{key:"image",class:"v-toolbar__image"},[n.image?h(Ot,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},n.image):h(cs,{key:"image-img",cover:!0,src:e.image},null)]),h(Ot,{defaults:{VTabs:{height:Le(d.value)}}},{default:()=>{var w,x,P;return[h("div",{class:"v-toolbar__content",style:{height:Le(d.value)}},[n.prepend&&h("div",{class:"v-toolbar__prepend"},[(w=n.prepend)==null?void 0:w.call(n)]),v&&h(En,{key:"title",text:e.title},{text:n.title}),(x=n.default)==null?void 0:x.call(n),n.append&&h("div",{class:"v-toolbar__append"},[(P=n.append)==null?void 0:P.call(n)])])]}}),h(Ot,{defaults:{VTabs:{height:Le(f.value)}}},{default:()=>[h(eT,null,{default:()=>[c.value&&h("div",{class:"v-toolbar__extension",style:{height:Le(f.value)}},[y])]})]})]})}),{contentHeight:d,extensionHeight:f}}}),EK=$e({__name:"HelpOverlay",setup(e){const t=V(!1);return(n,r)=>(D(),te(uT,{modelValue:Z(t),"onUpdate:modelValue":r[0]||(r[0]=s=>Je(t)?t.value=s:null),fullscreen:"",eager:"",transition:"dialog-bottom-transition",width:"100%"},{activator:g(({props:s})=>[h(nt,{location:"top"},{activator:g(({props:i})=>[h(se,me({icon:"help"},{...s,...i}),{default:g(()=>[h(Q,null,{default:g(()=>r[1]||(r[1]=[_("help")])),_:1})]),_:2},1040)]),default:g(()=>[r[2]||(r[2]=$("span",null," Load the online documentation webpage ",-1))]),_:2},1024)]),default:g(({isActive:s})=>[h(gt,{height:"100%",width:"100%"},{default:g(()=>[h(mr,{color:"primary"},{default:g(()=>[h(Q,{class:"ml-5"},{default:g(()=>r[3]||(r[3]=[_("help")])),_:1}),r[6]||(r[6]=$("h2",{class:"ml-10"},"FDM Monster Documentation",-1)),h(wn),r[7]||(r[7]=$("span",{class:"mr-10"}," docs.fdm-monster.net ",-1)),h(se,{variant:"flat",onClick:i=>s.value=!1},{default:g(()=>[h(Q,{class:"mr-2"},{default:g(()=>r[4]||(r[4]=[_("close")])),_:1}),r[5]||(r[5]=_(" Close help "))]),_:2},1032,["onClick"])]),_:2},1024),r[8]||(r[8]=$("iframe",{height:"100%",src:"https://docs.fdm-monster.net",style:{"background-color":"black","border-width":"0"},width:"100%"},null,-1))]),_:2},1024)]),_:1},8,["modelValue"]))}}),CK=$e({__name:"TooltipButton",props:{tooltip:{},color:{default:"white"},icon:{default:""},iconClass:{default:""},text:{default:""},location:{default:"bottom"}},emits:["click"],setup(e){const t=e;return(n,r)=>(D(),te(nt,{location:t.location},{activator:g(({props:s})=>[h(se,me(s,{variant:"outlined",class:"ml-2",color:n.color,onClick:r[0]||(r[0]=i=>n.$emit("click"))}),{default:g(()=>[Op(n.$slots,"default",{},()=>{var i;return[(i=t.icon)!=null&&i.length?(D(),te(Q,{key:0,class:Ho("mr-2 "+t.iconClass)},{default:g(()=>[_(re(t.icon),1)]),_:1},8,["class"])):ue("",!0),_(" "+re(t.text),1)]})]),_:2},1040,["color"])]),default:g(()=>[$("span",null,re(t.tooltip),1)]),_:3},8,["location"]))}});/*!
|
|
64
|
-
* vue-router v4.5.0
|
|
65
|
-
* (c) 2024 Eduardo San Martin Morote
|
|
66
|
-
* @license MIT
|
|
67
|
-
*/const xl=typeof document<"u";function CO(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function PK(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&CO(e.default)}const Et=Object.assign;function Mg(e,t){const n={};for(const r in t){const s=t[r];n[r]=Os(s)?s.map(e):e(s)}return n}const $c=()=>{},Os=Array.isArray,PO=/#/g,TK=/&/g,RK=/\//g,IK=/=/g,AK=/\?/g,TO=/\+/g,OK=/%5B/g,MK=/%5D/g,RO=/%5E/g,DK=/%60/g,IO=/%7B/g,$K=/%7C/g,AO=/%7D/g,FK=/%20/g;function Ww(e){return encodeURI(""+e).replace($K,"|").replace(OK,"[").replace(MK,"]")}function LK(e){return Ww(e).replace(IO,"{").replace(AO,"}").replace(RO,"^")}function Hy(e){return Ww(e).replace(TO,"%2B").replace(FK,"+").replace(PO,"%23").replace(TK,"%26").replace(DK,"`").replace(IO,"{").replace(AO,"}").replace(RO,"^")}function NK(e){return Hy(e).replace(IK,"%3D")}function BK(e){return Ww(e).replace(PO,"%23").replace(AK,"%3F")}function VK(e){return e==null?"":BK(e).replace(RK,"%2F")}function ud(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const UK=/\/$/,zK=e=>e.replace(UK,"");function Dg(e,t,n="/"){let r,s={},i="",o="";const a=t.indexOf("#");let l=t.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(r=t.slice(0,l),i=t.slice(l+1,a>-1?a:t.length),s=e(i)),a>-1&&(r=r||t.slice(0,a),o=t.slice(a,t.length)),r=WK(r??t,n),{fullPath:r+(i&&"?")+i+o,path:r,query:s,hash:ud(o)}}function HK(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function gk(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function jK(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&bu(t.matched[r],n.matched[s])&&OO(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function bu(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function OO(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!qK(e[n],t[n]))return!1;return!0}function qK(e,t){return Os(e)?vk(e,t):Os(t)?vk(t,e):e===t}function vk(e,t){return Os(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function WK(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let i=n.length-1,o,a;for(o=0;o<r.length;o++)if(a=r[o],a!==".")if(a==="..")i>1&&i--;else break;return n.slice(0,i).join("/")+"/"+r.slice(o).join("/")}const no={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var cd;(function(e){e.pop="pop",e.push="push"})(cd||(cd={}));var Fc;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Fc||(Fc={}));function GK(e){if(!e)if(xl){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),zK(e)}const KK=/^[^#]+#/;function YK(e,t){return e.replace(KK,"#")+t}function XK(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const km=()=>({left:window.scrollX,top:window.scrollY});function QK(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=XK(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function yk(e,t){return(history.state?history.state.position-t:-1)+e}const jy=new Map;function JK(e,t){jy.set(e,t)}function ZK(e){const t=jy.get(e);return jy.delete(e),t}let e9=()=>location.protocol+"//"+location.host;function MO(e,t){const{pathname:n,search:r,hash:s}=t,i=e.indexOf("#");if(i>-1){let a=s.includes(e.slice(i))?e.slice(i).length:1,l=s.slice(a);return l[0]!=="/"&&(l="/"+l),gk(l,"")}return gk(n,e)+r+s}function t9(e,t,n,r){let s=[],i=[],o=null;const a=({state:f})=>{const p=MO(e,location),v=n.value,m=t.value;let y=0;if(f){if(n.value=p,t.value=f,o&&o===v){o=null;return}y=m?f.position-m.position:0}else r(p);s.forEach(b=>{b(n.value,v,{delta:y,type:cd.pop,direction:y?y>0?Fc.forward:Fc.back:Fc.unknown})})};function l(){o=n.value}function u(f){s.push(f);const p=()=>{const v=s.indexOf(f);v>-1&&s.splice(v,1)};return i.push(p),p}function c(){const{history:f}=window;f.state&&f.replaceState(Et({},f.state,{scroll:km()}),"")}function d(){for(const f of i)f();i=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:l,listen:u,destroy:d}}function bk(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?km():null}}function n9(e){const{history:t,location:n}=window,r={value:MO(e,n)},s={value:t.state};s.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(l,u,c){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:e9()+e+l;try{t[c?"replaceState":"pushState"](u,"",f),s.value=u}catch(p){console.error(p),n[c?"replace":"assign"](f)}}function o(l,u){const c=Et({},t.state,bk(s.value.back,l,s.value.forward,!0),u,{position:s.value.position});i(l,c,!0),r.value=l}function a(l,u){const c=Et({},s.value,t.state,{forward:l,scroll:km()});i(c.current,c,!0);const d=Et({},bk(r.value,l,null),{position:c.position+1},u);i(l,d,!1),r.value=l}return{location:r,state:s,push:a,replace:o}}function r9(e){e=GK(e);const t=n9(e),n=t9(e,t.state,t.location,t.replace);function r(i,o=!0){o||n.pauseListeners(),history.go(i)}const s=Et({location:"",base:e,go:r,createHref:YK.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function s9(e){return typeof e=="string"||e&&typeof e=="object"}function DO(e){return typeof e=="string"||typeof e=="symbol"}const $O=Symbol("");var wk;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(wk||(wk={}));function wu(e,t){return Et(new Error,{type:e,[$O]:!0},t)}function wi(e,t){return e instanceof Error&&$O in e&&(t==null||!!(e.type&t))}const Sk="[^/]+?",i9={sensitive:!1,strict:!1,start:!0,end:!0},o9=/[.+*?^${}()[\]/\\]/g;function a9(e,t){const n=Et({},i9,t),r=[];let s=n.start?"^":"";const i=[];for(const u of e){const c=u.length?[]:[90];n.strict&&!u.length&&(s+="/");for(let d=0;d<u.length;d++){const f=u[d];let p=40+(n.sensitive?.25:0);if(f.type===0)d||(s+="/"),s+=f.value.replace(o9,"\\$&"),p+=40;else if(f.type===1){const{value:v,repeatable:m,optional:y,regexp:b}=f;i.push({name:v,repeatable:m,optional:y});const w=b||Sk;if(w!==Sk){p+=10;try{new RegExp(`(${w})`)}catch(P){throw new Error(`Invalid custom RegExp for param "${v}" (${w}): `+P.message)}}let x=m?`((?:${w})(?:/(?:${w}))*)`:`(${w})`;d||(x=y&&u.length<2?`(?:/${x})`:"/"+x),y&&(x+="?"),s+=x,p+=20,y&&(p+=-8),m&&(p+=-20),w===".*"&&(p+=-50)}c.push(p)}r.push(c)}if(n.strict&&n.end){const u=r.length-1;r[u][r[u].length-1]+=.7000000000000001}n.strict||(s+="/?"),n.end?s+="$":n.strict&&!s.endsWith("/")&&(s+="(?:/|$)");const o=new RegExp(s,n.sensitive?"":"i");function a(u){const c=u.match(o),d={};if(!c)return null;for(let f=1;f<c.length;f++){const p=c[f]||"",v=i[f-1];d[v.name]=p&&v.repeatable?p.split("/"):p}return d}function l(u){let c="",d=!1;for(const f of e){(!d||!c.endsWith("/"))&&(c+="/"),d=!1;for(const p of f)if(p.type===0)c+=p.value;else if(p.type===1){const{value:v,repeatable:m,optional:y}=p,b=v in u?u[v]:"";if(Os(b)&&!m)throw new Error(`Provided param "${v}" is an array but it is not repeatable (* or + modifiers)`);const w=Os(b)?b.join("/"):b;if(!w)if(y)f.length<2&&(c.endsWith("/")?c=c.slice(0,-1):d=!0);else throw new Error(`Missing required param "${v}"`);c+=w}}return c||"/"}return{re:o,score:r,keys:i,parse:a,stringify:l}}function l9(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function FO(e,t){let n=0;const r=e.score,s=t.score;for(;n<r.length&&n<s.length;){const i=l9(r[n],s[n]);if(i)return i;n++}if(Math.abs(s.length-r.length)===1){if(_k(r))return 1;if(_k(s))return-1}return s.length-r.length}function _k(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const u9={type:0,value:""},c9=/[a-zA-Z0-9_]/;function d9(e){if(!e)return[[]];if(e==="/")return[[u9]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${u}": ${p}`)}let n=0,r=n;const s=[];let i;function o(){i&&s.push(i),i=[]}let a=0,l,u="",c="";function d(){u&&(n===0?i.push({type:0,value:u}):n===1||n===2||n===3?(i.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:u,regexp:c,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),u="")}function f(){u+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==2){r=n,n=4;continue}switch(n){case 0:l==="/"?(u&&d(),o()):l===":"?(d(),n=1):f();break;case 4:f(),n=r;break;case 1:l==="("?n=2:c9.test(l)?f():(d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+l:n=3:c+=l;break;case 3:d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,c="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${u}"`),d(),o(),s}function f9(e,t,n){const r=a9(d9(e.path),n),s=Et(r,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function h9(e,t){const n=[],r=new Map;t=Ck({strict:!1,end:!0,sensitive:!1},t);function s(d){return r.get(d)}function i(d,f,p){const v=!p,m=xk(d);m.aliasOf=p&&p.record;const y=Ck(t,d),b=[m];if("alias"in d){const P=typeof d.alias=="string"?[d.alias]:d.alias;for(const S of P)b.push(xk(Et({},m,{components:p?p.record.components:m.components,path:S,aliasOf:p?p.record:m})))}let w,x;for(const P of b){const{path:S}=P;if(f&&S[0]!=="/"){const C=f.record.path,R=C[C.length-1]==="/"?"":"/";P.path=f.record.path+(S&&R+S)}if(w=f9(P,f,y),p?p.alias.push(w):(x=x||w,x!==w&&x.alias.push(w),v&&d.name&&!Ek(w)&&o(d.name)),LO(w)&&l(w),m.children){const C=m.children;for(let R=0;R<C.length;R++)i(C[R],w,p&&p.children[R])}p=p||w}return x?()=>{o(x)}:$c}function o(d){if(DO(d)){const f=r.get(d);f&&(r.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&&r.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function a(){return n}function l(d){const f=g9(d,n);n.splice(f,0,d),d.record.name&&!Ek(d)&&r.set(d.record.name,d)}function u(d,f){let p,v={},m,y;if("name"in d&&d.name){if(p=r.get(d.name),!p)throw wu(1,{location:d});y=p.record.name,v=Et(kk(f.params,p.keys.filter(x=>!x.optional).concat(p.parent?p.parent.keys.filter(x=>x.optional):[]).map(x=>x.name)),d.params&&kk(d.params,p.keys.map(x=>x.name))),m=p.stringify(v)}else if(d.path!=null)m=d.path,p=n.find(x=>x.re.test(m)),p&&(v=p.parse(m),y=p.record.name);else{if(p=f.name?r.get(f.name):n.find(x=>x.re.test(f.path)),!p)throw wu(1,{location:d,currentLocation:f});y=p.record.name,v=Et({},f.params,d.params),m=p.stringify(v)}const b=[];let w=p;for(;w;)b.unshift(w.record),w=w.parent;return{name:y,path:m,params:v,matched:b,meta:m9(b)}}e.forEach(d=>i(d));function c(){n.length=0,r.clear()}return{addRoute:i,resolve:u,removeRoute:o,clearRoutes:c,getRoutes:a,getRecordMatcher:s}}function kk(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function xk(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:p9(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 p9(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function Ek(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function m9(e){return e.reduce((t,n)=>Et(t,n.meta),{})}function Ck(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function g9(e,t){let n=0,r=t.length;for(;n!==r;){const i=n+r>>1;FO(e,t[i])<0?r=i:n=i+1}const s=v9(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function v9(e){let t=e;for(;t=t.parent;)if(LO(t)&&FO(e,t)===0)return t}function LO({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function y9(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;s<r.length;++s){const i=r[s].replace(TO," "),o=i.indexOf("="),a=ud(o<0?i:i.slice(0,o)),l=o<0?null:ud(i.slice(o+1));if(a in t){let u=t[a];Os(u)||(u=t[a]=[u]),u.push(l)}else t[a]=l}return t}function Pk(e){let t="";for(let n in e){const r=e[n];if(n=NK(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(Os(r)?r.map(i=>i&&Hy(i)):[r&&Hy(r)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+n,i!=null&&(t+="="+i))})}return t}function b9(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Os(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const w9=Symbol(""),Tk=Symbol(""),xm=Symbol(""),Gw=Symbol(""),qy=Symbol("");function ic(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function po(e,t,n,r,s,i=o=>o()){const o=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const u=f=>{f===!1?l(wu(4,{from:n,to:t})):f instanceof Error?l(f):s9(f)?l(wu(2,{from:t,to:f})):(o&&r.enterCallbacks[s]===o&&typeof f=="function"&&o.push(f),a())},c=i(()=>e.call(r&&r.instances[s],t,n,u));let d=Promise.resolve(c);e.length<3&&(d=d.then(u)),d.catch(f=>l(f))})}function $g(e,t,n,r,s=i=>i()){const i=[];for(const o of e)for(const a in o.components){let l=o.components[a];if(!(t!=="beforeRouteEnter"&&!o.instances[a]))if(CO(l)){const c=(l.__vccOpts||l)[t];c&&i.push(po(c,n,r,o,a,s))}else{let u=l();i.push(()=>u.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const d=PK(c)?c.default:c;o.mods[a]=c,o.components[a]=d;const p=(d.__vccOpts||d)[t];return p&&po(p,n,r,o,a,s)()}))}}return i}function Rk(e){const t=Xe(xm),n=Xe(Gw),r=T(()=>{const l=Z(e.to);return t.resolve(l)}),s=T(()=>{const{matched:l}=r.value,{length:u}=l,c=l[u-1],d=n.matched;if(!c||!d.length)return-1;const f=d.findIndex(bu.bind(null,c));if(f>-1)return f;const p=Ik(l[u-2]);return u>1&&Ik(c)===p&&d[d.length-1].path!==p?d.findIndex(bu.bind(null,l[u-2])):f}),i=T(()=>s.value>-1&&E9(n.params,r.value.params)),o=T(()=>s.value>-1&&s.value===n.matched.length-1&&OO(n.params,r.value.params));function a(l={}){if(x9(l)){const u=t[Z(e.replace)?"replace":"push"](Z(e.to)).catch($c);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:r,href:T(()=>r.value.href),isActive:i,isExactActive:o,navigate:a}}function S9(e){return e.length===1?e[0]:e}const _9=$e({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:Rk,setup(e,{slots:t}){const n=gn(Rk(e)),{options:r}=Xe(xm),s=T(()=>({[Ak(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Ak(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&S9(t.default(n));return e.custom?i:pr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},i)}}}),k9=_9;function x9(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 E9(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!Os(s)||s.length!==r.length||r.some((i,o)=>i!==s[o]))return!1}return!0}function Ik(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Ak=(e,t,n)=>e??t??n,C9=$e({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=Xe(qy),s=T(()=>e.route||r.value),i=Xe(Tk,0),o=T(()=>{let u=Z(i);const{matched:c}=s.value;let d;for(;(d=c[u])&&!d.components;)u++;return u}),a=T(()=>s.value.matched[o.value]);Gt(Tk,T(()=>o.value+1)),Gt(w9,a),Gt(qy,s);const l=V();return ke(()=>[l.value,a.value,e.name],([u,c,d],[f,p,v])=>{c&&(c.instances[d]=u,p&&p!==c&&u&&u===f&&(c.leaveGuards.size||(c.leaveGuards=p.leaveGuards),c.updateGuards.size||(c.updateGuards=p.updateGuards))),u&&c&&(!p||!bu(c,p)||!f)&&(c.enterCallbacks[d]||[]).forEach(m=>m(u))},{flush:"post"}),()=>{const u=s.value,c=e.name,d=a.value,f=d&&d.components[c];if(!f)return Ok(n.default,{Component:f,route:u});const p=d.props[c],v=p?p===!0?u.params:typeof p=="function"?p(u):p:null,y=pr(f,Et({},v,t,{onVnodeUnmounted:b=>{b.component.isUnmounted&&(d.instances[c]=null)},ref:l}));return Ok(n.default,{Component:y,route:u})||y}}});function Ok(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const P9=C9;function T9(e){const t=h9(e.routes,e),n=e.parseQuery||y9,r=e.stringifyQuery||Pk,s=e.history,i=ic(),o=ic(),a=ic(),l=Ae(no);let u=no;xl&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=Mg.bind(null,ee=>""+ee),d=Mg.bind(null,VK),f=Mg.bind(null,ud);function p(ee,de){let ne,U;return DO(ee)?(ne=t.getRecordMatcher(ee),U=de):U=ee,t.addRoute(U,ne)}function v(ee){const de=t.getRecordMatcher(ee);de&&t.removeRoute(de)}function m(){return t.getRoutes().map(ee=>ee.record)}function y(ee){return!!t.getRecordMatcher(ee)}function b(ee,de){if(de=Et({},de||l.value),typeof ee=="string"){const B=Dg(n,ee,de.path),q=t.resolve({path:B.path},de),fe=s.createHref(B.fullPath);return Et(B,q,{params:f(q.params),hash:ud(B.hash),redirectedFrom:void 0,href:fe})}let ne;if(ee.path!=null)ne=Et({},ee,{path:Dg(n,ee.path,de.path).path});else{const B=Et({},ee.params);for(const q in B)B[q]==null&&delete B[q];ne=Et({},ee,{params:d(B)}),de.params=d(de.params)}const U=t.resolve(ne,de),De=ee.hash||"";U.params=c(f(U.params));const He=HK(r,Et({},ee,{hash:LK(De),path:U.path})),F=s.createHref(He);return Et({fullPath:He,hash:De,query:r===Pk?b9(ee.query):ee.query||{}},U,{redirectedFrom:void 0,href:F})}function w(ee){return typeof ee=="string"?Dg(n,ee,l.value.path):Et({},ee)}function x(ee,de){if(u!==ee)return wu(8,{from:de,to:ee})}function P(ee){return R(ee)}function S(ee){return P(Et(w(ee),{replace:!0}))}function C(ee){const de=ee.matched[ee.matched.length-1];if(de&&de.redirect){const{redirect:ne}=de;let U=typeof ne=="function"?ne(ee):ne;return typeof U=="string"&&(U=U.includes("?")||U.includes("#")?U=w(U):{path:U},U.params={}),Et({query:ee.query,hash:ee.hash,params:U.path!=null?{}:ee.params},U)}}function R(ee,de){const ne=u=b(ee),U=l.value,De=ee.state,He=ee.force,F=ee.replace===!0,B=C(ne);if(B)return R(Et(w(B),{state:typeof B=="object"?Et({},De,B.state):De,force:He,replace:F}),de||ne);const q=ne;q.redirectedFrom=de;let fe;return!He&&jK(r,U,ne)&&(fe=wu(16,{to:q,from:U}),J(U,U,!0,!1)),(fe?Promise.resolve(fe):I(q,U)).catch(ae=>wi(ae)?wi(ae,2)?ae:X(ae):W(ae,q,U)).then(ae=>{if(ae){if(wi(ae,2))return R(Et({replace:F},w(ae.to),{state:typeof ae.to=="object"?Et({},De,ae.to.state):De,force:He}),de||q)}else ae=O(q,U,!0,F,De);return A(q,U,ae),ae})}function k(ee,de){const ne=x(ee,de);return ne?Promise.reject(ne):Promise.resolve()}function E(ee){const de=he.values().next().value;return de&&typeof de.runWithContext=="function"?de.runWithContext(ee):ee()}function I(ee,de){let ne;const[U,De,He]=R9(ee,de);ne=$g(U.reverse(),"beforeRouteLeave",ee,de);for(const B of U)B.leaveGuards.forEach(q=>{ne.push(po(q,ee,de))});const F=k.bind(null,ee,de);return ne.push(F),we(ne).then(()=>{ne=[];for(const B of i.list())ne.push(po(B,ee,de));return ne.push(F),we(ne)}).then(()=>{ne=$g(De,"beforeRouteUpdate",ee,de);for(const B of De)B.updateGuards.forEach(q=>{ne.push(po(q,ee,de))});return ne.push(F),we(ne)}).then(()=>{ne=[];for(const B of He)if(B.beforeEnter)if(Os(B.beforeEnter))for(const q of B.beforeEnter)ne.push(po(q,ee,de));else ne.push(po(B.beforeEnter,ee,de));return ne.push(F),we(ne)}).then(()=>(ee.matched.forEach(B=>B.enterCallbacks={}),ne=$g(He,"beforeRouteEnter",ee,de,E),ne.push(F),we(ne))).then(()=>{ne=[];for(const B of o.list())ne.push(po(B,ee,de));return ne.push(F),we(ne)}).catch(B=>wi(B,8)?B:Promise.reject(B))}function A(ee,de,ne){a.list().forEach(U=>E(()=>U(ee,de,ne)))}function O(ee,de,ne,U,De){const He=x(ee,de);if(He)return He;const F=de===no,B=xl?history.state:{};ne&&(U||F?s.replace(ee.fullPath,Et({scroll:F&&B&&B.scroll},De)):s.push(ee.fullPath,De)),l.value=ee,J(ee,de,ne,F),X()}let L;function M(){L||(L=s.listen((ee,de,ne)=>{if(!oe.listening)return;const U=b(ee),De=C(U);if(De){R(Et(De,{replace:!0,force:!0}),U).catch($c);return}u=U;const He=l.value;xl&&JK(yk(He.fullPath,ne.delta),km()),I(U,He).catch(F=>wi(F,12)?F:wi(F,2)?(R(Et(w(F.to),{force:!0}),U).then(B=>{wi(B,20)&&!ne.delta&&ne.type===cd.pop&&s.go(-1,!1)}).catch($c),Promise.reject()):(ne.delta&&s.go(-ne.delta,!1),W(F,U,He))).then(F=>{F=F||O(U,He,!1),F&&(ne.delta&&!wi(F,8)?s.go(-ne.delta,!1):ne.type===cd.pop&&wi(F,20)&&s.go(-1,!1)),A(U,He,F)}).catch($c)}))}let z=ic(),H=ic(),G;function W(ee,de,ne){X(ee);const U=H.list();return U.length?U.forEach(De=>De(ee,de,ne)):console.error(ee),Promise.reject(ee)}function Y(){return G&&l.value!==no?Promise.resolve():new Promise((ee,de)=>{z.add([ee,de])})}function X(ee){return G||(G=!ee,M(),z.list().forEach(([de,ne])=>ee?ne(ee):de()),z.reset()),ee}function J(ee,de,ne,U){const{scrollBehavior:De}=e;if(!xl||!De)return Promise.resolve();const He=!ne&&ZK(yk(ee.fullPath,0))||(U||!ne)&&history.state&&history.state.scroll||null;return Mt().then(()=>De(ee,de,He)).then(F=>F&&QK(F)).catch(F=>W(F,ee,de))}const N=ee=>s.go(ee);let K;const he=new Set,oe={currentRoute:l,listening:!0,addRoute:p,removeRoute:v,clearRoutes:t.clearRoutes,hasRoute:y,getRoutes:m,resolve:b,options:e,push:P,replace:S,go:N,back:()=>N(-1),forward:()=>N(1),beforeEach:i.add,beforeResolve:o.add,afterEach:a.add,onError:H.add,isReady:Y,install(ee){const de=this;ee.component("RouterLink",k9),ee.component("RouterView",P9),ee.config.globalProperties.$router=de,Object.defineProperty(ee.config.globalProperties,"$route",{enumerable:!0,get:()=>Z(l)}),xl&&!K&&l.value===no&&(K=!0,P(s.location).catch(De=>{}));const ne={};for(const De in no)Object.defineProperty(ne,De,{get:()=>l.value[De],enumerable:!0});ee.provide(xm,de),ee.provide(Gw,Cp(ne)),ee.provide(qy,l);const U=ee.unmount;he.add(ee),ee.unmount=function(){he.delete(ee),he.size<1&&(u=no,L&&L(),L=null,l.value=no,K=!1,G=!1),U()}}};function we(ee){return ee.reduce((de,ne)=>de.then(()=>E(ne)),Promise.resolve())}return oe}function R9(e,t){const n=[],r=[],s=[],i=Math.max(t.matched.length,e.matched.length);for(let o=0;o<i;o++){const a=t.matched[o];a&&(e.matched.find(u=>bu(u,a))?r.push(a):n.push(a));const l=e.matched[o];l&&(t.matched.find(u=>bu(u,l))||s.push(l))}return[n,r,s]}function Jo(){return Xe(xm)}function NO(e){return Xe(Gw)}const I9={class:"text-center"},A9={class:"float-end"},O9=$e({__name:"PrintJobsMenu",setup(e){const t=nr(),n=V(""),r=V(!1),s=T(()=>t.printersWithJob.filter(a=>{var p,v,m,y;const l=(v=(p=a.job)==null?void 0:p.job)==null?void 0:v.file.name,u=(l==null?void 0:l.toLowerCase())||"",c=((m=a.printer.printerURL)==null?void 0:m.toLowerCase())||"",d=((y=a.printer.name)==null?void 0:y.toLowerCase())||"",f=`${u} ${c} ${d}`;return!n.value||f.includes(n.value.toLowerCase())})),i=T(()=>s.value.length||0);function o(a){return a?a==null?void 0:a.toFixed(0):""}return ke(r,()=>{n.value=""}),(a,l)=>(D(),ge("div",I9,[h(wm,{modelValue:Z(r),"onUpdate:modelValue":l[3]||(l[3]=u=>Je(r)?r.value=u:null),"close-on-content-click":!1,"nudge-width":400,location:"bottom right","offset-x":"","offset-y":"",transition:"slide-x-transition"},{activator:g(({props:u})=>[h(se,me({color:Z(i)?"green":"secondary",dark:""},u),{default:g(()=>[$("span",null," Print jobs "+re(Z(i)?`(${Z(i)})`:""),1),h(Q,{end:""},{default:g(()=>l[4]||(l[4]=[_(" work ")])),_:1})]),_:2},1040,["color"])]),default:g(()=>[h(gt,{class:"d-flex flex-column","min-width":"300"},{default:g(()=>[h(Vt,{style:{"overflow-y":"hidden","flex-shrink":"0"}},{default:g(()=>[h(Be,null,{prepend:g(()=>[h(lt,{class:"font-weight-bold",color:"primary",size:"44"},{default:g(()=>[_(re(Z(i)),1)]),_:1})]),default:g(()=>[h(dt,null,{default:g(()=>[l[7]||(l[7]=_(" Print Jobs ")),$("span",A9,[h(se,{variant:"tonal",onClick:l[0]||(l[0]=u=>r.value=!1)},{default:g(()=>[h(Q,null,{default:g(()=>l[5]||(l[5]=[_("close")])),_:1}),l[6]||(l[6]=_("Close "))]),_:1})])]),_:1}),h(vu,{class:"mt-2"},{default:g(()=>[h(ut,{modelValue:Z(n),"onUpdate:modelValue":l[1]||(l[1]=u=>Je(n)?n.value=u:null),autofocus:"",class:"p-2",clearable:"",label:"Search jobs or printers","persistent-placeholder":"",placeholder:"Type part of a filename or printer name to search","prepend-icon":"search",style:{"min-width":"900px"}},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(dn),h(Vt,{style:{"overflow-y":"auto","flex-shrink":"1"}},{default:g(()=>[Z(i)?ue("",!0):(D(),te(Be,{key:0},{default:g(()=>l[8]||(l[8]=[_(" No active prints ")])),_:1})),(D(!0),ge(Pe,null,Wt(Z(s),({printer:u,job:c})=>(D(),te(Be,{key:u.id,lines:"two"},{prepend:g(()=>[h(lt,{size:"70"},{default:g(()=>{var d;return[h(ri,{"model-value":(d=c==null?void 0:c.progress)==null?void 0:d.completion,width:5,color:"green",size:"50"},{default:g(()=>{var f;return[_(re(o((f=c.progress)==null?void 0:f.completion)+"%"||""),1)]}),_:2},1032,["model-value"])]}),_:2},1024)]),default:g(()=>[h(dt,null,{default:g(()=>{var d,f;return[_(re((f=(d=c.job)==null?void 0:d.file)==null?void 0:f.name),1)]}),_:2},1024),h(yt,null,{default:g(()=>[_(" Elapsed: "+re(Math.round((c==null?void 0:c.progress.printTime)??0/60))+" minutes ",1),l[9]||(l[9]=$("br",null,null,-1)),_(" Printer: "+re(u.name),1)]),_:2},1024)]),_:2},1024))),128))]),_:1}),h(Dn,null,{default:g(()=>[h(wn),h(se,{onClick:l[2]||(l[2]=u=>r.value=!1)},{default:g(()=>l[10]||(l[10]=[_(" Close ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]))}}),Kw=ps("profile",{state:()=>({username:null,isDemoUser:null,userId:null}),actions:{async getProfile(){return await ns.getProfile().then(e=>{this.username=e.username,this.userId=e.id,this.isDemoUser=e.isDemoUser})}}}),qt={Home:"Home",Login:"Login",Registration:"Registration",PrintersView:"PrintersView",Settings:"Settings",CameraGridView:"CameraGridView",PrintStatistics:"Print Statistics",About:"About",PermissionDenied:"PermissionDenied",NotFound:"NotFound",FirstTimeSetup:"FirstTimeSetup",ServerProtection:"ServerProtection"};async function M9(e,t){return e.push({name:t})}async function BO(e){if(e.currentRoute.value.path==="/login"){console.log("routeToLogin: already at login page");return}return M9(e,qt.Login)}const Mk=!0,D9=()=>Object.freeze({apiKeyLength:43,maxPort:65535,maxPrinterNameLength:25,maxPrinterGroupNameLength:30,maxPrinterGroupLocationX:4,maxPrinterGroupLocationY:4,minPrinterFloorNameLength:3,minUsernameLength:3}),di=Object.create(null);di.open="0";di.close="1";di.ping="2";di.pong="3";di.message="4";di.upgrade="5";di.noop="6";const ch=Object.create(null);Object.keys(di).forEach(e=>{ch[di[e]]=e});const Wy={type:"error",data:"parser error"},VO=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",UO=typeof ArrayBuffer=="function",zO=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Yw=({type:e,data:t},n,r)=>VO&&t instanceof Blob?n?r(t):Dk(t,r):UO&&(t instanceof ArrayBuffer||zO(t))?n?r(t):Dk(new Blob([t]),r):r(di[e]+(t||"")),Dk=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function $k(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Fg;function $9(e,t){if(VO&&e.data instanceof Blob)return e.data.arrayBuffer().then($k).then(t);if(UO&&(e.data instanceof ArrayBuffer||zO(e.data)))return t($k(e.data));Yw(e,!1,n=>{Fg||(Fg=new TextEncoder),t(Fg.encode(n))})}const Fk="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",vc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Fk.length;e++)vc[Fk.charCodeAt(e)]=e;const F9=e=>{let t=e.length*.75,n=e.length,r,s=0,i,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),c=new Uint8Array(u);for(r=0;r<n;r+=4)i=vc[e.charCodeAt(r)],o=vc[e.charCodeAt(r+1)],a=vc[e.charCodeAt(r+2)],l=vc[e.charCodeAt(r+3)],c[s++]=i<<2|o>>4,c[s++]=(o&15)<<4|a>>2,c[s++]=(a&3)<<6|l&63;return u},L9=typeof ArrayBuffer=="function",Xw=(e,t)=>{if(typeof e!="string")return{type:"message",data:HO(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:N9(e.substring(1),t)}:ch[n]?e.length>1?{type:ch[n],data:e.substring(1)}:{type:ch[n]}:Wy},N9=(e,t)=>{if(L9){const n=F9(e);return HO(n,t)}else return{base64:!0,data:e}},HO=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},jO="",B9=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((i,o)=>{Yw(i,!1,a=>{r[o]=a,++s===n&&t(r.join(jO))})})},V9=(e,t)=>{const n=e.split(jO),r=[];for(let s=0;s<n.length;s++){const i=Xw(n[s],t);if(r.push(i),i.type==="error")break}return r};function U9(){return new TransformStream({transform(e,t){$9(e,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const i=new DataView(s.buffer);i.setUint8(0,126),i.setUint16(1,r)}else{s=new Uint8Array(9);const i=new DataView(s.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let Lg;function _f(e){return e.reduce((t,n)=>t+n.length,0)}function kf(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let s=0;s<t;s++)n[s]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function z9(e,t){Lg||(Lg=new TextDecoder);const n=[];let r=0,s=-1,i=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(r===0){if(_f(n)<1)break;const l=kf(n,1);i=(l[0]&128)===128,s=l[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(_f(n)<2)break;const l=kf(n,2);s=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(_f(n)<8)break;const l=kf(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),c=u.getUint32(0);if(c>Math.pow(2,21)-1){a.enqueue(Wy);break}s=c*Math.pow(2,32)+u.getUint32(4),r=3}else{if(_f(n)<s)break;const l=kf(n,s);a.enqueue(Xw(i?l:Lg.decode(l),t)),r=0}if(s===0||s>e){a.enqueue(Wy);break}}}})}const qO=4;function bn(e){if(e)return H9(e)}function H9(e){for(var t in bn.prototype)e[t]=bn.prototype[t];return e}bn.prototype.on=bn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};bn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};bn.prototype.off=bn.prototype.removeListener=bn.prototype.removeAllListeners=bn.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,s=0;s<n.length;s++)if(r=n[s],r===t||r.fn===t){n.splice(s,1);break}return n.length===0&&delete this._callbacks["$"+e],this};bn.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,s=n.length;r<s;++r)n[r].apply(this,t)}return this};bn.prototype.emitReserved=bn.prototype.emit;bn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};bn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Em=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),ss=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),j9="arraybuffer";function WO(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const q9=ss.setTimeout,W9=ss.clearTimeout;function Cm(e,t){t.useNativeTimers?(e.setTimeoutFn=q9.bind(ss),e.clearTimeoutFn=W9.bind(ss)):(e.setTimeoutFn=ss.setTimeout.bind(ss),e.clearTimeoutFn=ss.clearTimeout.bind(ss))}const G9=1.33;function K9(e){return typeof e=="string"?Y9(e):Math.ceil((e.byteLength||e.size)*G9)}function Y9(e){let t=0,n=0;for(let r=0,s=e.length;r<s;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function GO(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function X9(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Q9(e){let t={},n=e.split("&");for(let r=0,s=n.length;r<s;r++){let i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}class J9 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Qw extends bn{constructor(t){super(),this.writable=!1,Cm(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new J9(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=Xw(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=X9(t);return n.length?"?"+n:""}}class Z9 extends Qw{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};V9(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,B9(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=GO()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let KO=!1;try{KO=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const eY=KO;function tY(){}class nY extends Z9{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(s,i)=>{this.onError("xhr post error",s,i)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}let Ul=class dh extends bn{constructor(t,n,r){super(),this.createRequest=t,Cm(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=WO(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this._opts.extraHeaders[s])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var s;r.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document<"u"&&(this._index=dh.requestsCount++,dh.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=tY,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete dh.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Ul.requestsCount=0;Ul.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Lk);else if(typeof addEventListener=="function"){const e="onpagehide"in ss?"pagehide":"unload";addEventListener(e,Lk,!1)}}function Lk(){for(let e in Ul.requests)Ul.requests.hasOwnProperty(e)&&Ul.requests[e].abort()}const rY=function(){const e=YO({xdomain:!1});return e&&e.responseType!==null}();class sY extends nY{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=rY&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Ul(YO,this.uri(),t)}}function YO(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||eY))return new XMLHttpRequest}catch{}if(!t)try{return new ss[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const XO=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class iY extends Qw{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=XO?{}:WO(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;Yw(r,this.supportsBinary,i=>{try{this.doWrite(r,i)}catch{}s&&Em(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=GO()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Ng=ss.WebSocket||ss.MozWebSocket;class oY extends iY{createSocket(t,n,r){return XO?new Ng(t,n,r):n?new Ng(t,n):new Ng(t)}doWrite(t,n){this.ws.send(n)}}class aY extends Qw{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=z9(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=U9();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const i=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),i())}).catch(a=>{})};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;this._writer.write(r).then(()=>{s&&Em(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const lY={websocket:oY,webtransport:aY,polling:sY},uY=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,cY=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Gy(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let s=uY.exec(e||""),i={},o=14;for(;o--;)i[cY[o]]=s[o]||"";return n!=-1&&r!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=dY(i,i.path),i.queryKey=fY(i,i.query),i}function dY(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function fY(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,i){s&&(n[s]=i)}),n}const Ky=typeof addEventListener=="function"&&typeof removeEventListener=="function",fh=[];Ky&&addEventListener("offline",()=>{fh.forEach(e=>e())},!1);class Oo extends bn{constructor(t,n){if(super(),this.binaryType=j9,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=Gy(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=Gy(n.host).host);Cm(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const s=r.prototype.name;this.transports.push(s),this._transportsByName[s]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Q9(this.opts.query)),Ky&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},fh.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=qO,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Oo.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Oo.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const s=this.writeBuffer[r].data;if(s&&(n+=K9(s)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Em(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,s){if(typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const i={type:t,data:n,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),s&&this.once("flush",s),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Oo.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Ky&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=fh.indexOf(this._offlineEventListener);r!==-1&&fh.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Oo.protocol=qO;class hY extends Oo{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Oo.priorWebsocketSuccess=!1;const s=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",d=>{if(!r)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Oo.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function i(){r||(r=!0,c(),n.close(),n=null)}const o=d=>{const f=new Error("probe error: "+d);f.transport=n.name,i(),this.emitReserved("upgradeError",f)};function a(){o("transport closed")}function l(){o("socket closed")}function u(d){n&&d.name!==n.name&&i()}const c=()=>{n.removeListener("open",s),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",s),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let pY=class extends hY{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(s=>lY[s]).filter(s=>!!s)),super(t,r)}};function mY(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=Gy(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}const gY=typeof ArrayBuffer=="function",vY=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,QO=Object.prototype.toString,yY=typeof Blob=="function"||typeof Blob<"u"&&QO.call(Blob)==="[object BlobConstructor]",bY=typeof File=="function"||typeof File<"u"&&QO.call(File)==="[object FileConstructor]";function Jw(e){return gY&&(e instanceof ArrayBuffer||vY(e))||yY&&e instanceof Blob||bY&&e instanceof File}function hh(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(hh(e[n]))return!0;return!1}if(Jw(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return hh(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&hh(e[n]))return!0;return!1}function wY(e){const t=[],n=e.data,r=e;return r.data=Yy(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Yy(e,t){if(!e)return e;if(Jw(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Yy(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Yy(e[r],t));return n}return e}function SY(e,t){return e.data=Xy(e.data,t),delete e.attachments,e}function Xy(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Xy(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Xy(e[n],t));return e}const _Y=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],kY=5;var ht;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(ht||(ht={}));class xY{constructor(t){this.replacer=t}encode(t){return(t.type===ht.EVENT||t.type===ht.ACK)&&hh(t)?this.encodeAsBinary({type:t.type===ht.EVENT?ht.BINARY_EVENT:ht.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===ht.BINARY_EVENT||t.type===ht.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=wY(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}function Nk(e){return Object.prototype.toString.call(e)==="[object Object]"}class Zw extends bn{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===ht.BINARY_EVENT;r||n.type===ht.BINARY_ACK?(n.type=r?ht.EVENT:ht.ACK,this.reconstructor=new EY(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Jw(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(ht[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===ht.BINARY_EVENT||r.type===ht.BINARY_ACK){const i=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(i,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(t.charAt(n+1)==="/"){const i=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(i,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){const i=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(i,n+1))}if(t.charAt(++n)){const i=this.tryParse(t.substr(n));if(Zw.isPayloadValid(r.type,i))r.data=i;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case ht.CONNECT:return Nk(n);case ht.DISCONNECT:return n===void 0;case ht.CONNECT_ERROR:return typeof n=="string"||Nk(n);case ht.EVENT:case ht.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&_Y.indexOf(n[0])===-1);case ht.ACK:case ht.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class EY{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=SY(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const CY=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Zw,Encoder:xY,get PacketType(){return ht},protocol:kY},Symbol.toStringTag,{value:"Module"}));function ks(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const PY=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class JO extends bn{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[ks(t,"open",this.onopen.bind(this)),ks(t,"packet",this.onpacket.bind(this)),ks(t,"error",this.onerror.bind(this)),ks(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,s,i;if(PY.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:ht.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const c=this.ids++,d=n.pop();this._registerAckCallback(c,d),o.id=c}const a=(s=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||s===void 0?void 0:s.writable,l=this.connected&&!(!((i=this.io.engine)===null||i===void 0)&&i._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},s),o=(...a)=>{this.io.clearTimeoutFn(i),n.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,s)=>{const i=(o,a)=>o?s(o):r(a);i.withError=!0,n.push(i),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...i)=>r!==this._queue[0]?void 0:(s!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(this._queue.shift(),n&&n(null,...i)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:ht.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case ht.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case ht.EVENT:case ht.BINARY_EVENT:this.onevent(t);break;case ht.ACK:case ht.BINARY_ACK:this.onack(t);break;case ht.DISCONNECT:this.ondisconnect();break;case ht.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...s){r||(r=!0,n.packet({type:ht.ACK,id:t,data:s}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:ht.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Wu(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Wu.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Wu.prototype.reset=function(){this.attempts=0};Wu.prototype.setMin=function(e){this.ms=e};Wu.prototype.setMax=function(e){this.max=e};Wu.prototype.setJitter=function(e){this.jitter=e};class Qy extends bn{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Cm(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Wu({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||CY;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new pY(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=ks(n,"open",function(){r.onopen(),t&&t()}),i=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=ks(n,"error",i);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{s(),i(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(s),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ks(t,"ping",this.onping.bind(this)),ks(t,"data",this.ondata.bind(this)),ks(t,"error",this.onerror.bind(this)),ks(t,"close",this.onclose.bind(this)),ks(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Em(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new JO(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const oc={};function ph(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=mY(e,t.path||"/socket.io"),r=n.source,s=n.id,i=n.path,o=oc[s]&&i in oc[s].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new Qy(r,t):(oc[s]||(oc[s]=new Qy(r,t)),l=oc[s]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(ph,{Manager:Qy,Socket:JO,io:ph,connect:ph});let Jt=null;const kr=gn({connected:!1,setup:!1,id:""});function TY(e,t){if(kr.setup)throw new Error("Socket already set up");kr.setup=!1,Jt=ph(e,{auth:t!=null&&t.length?{token:t}:void 0}),kr.setup=!0,Jt.on("connect",()=>{kr.id=Jt.id||"",kr.connected=!0}),Jt.on("disconnect",()=>{kr.id="",kr.connected=!1})}function RY(){kr.connected=!1,Jt==null||Jt.close(),Jt==null||Jt.open()}function IY(){Jt&&Jt.close(),Jt=null,kr.setup=!1,kr.connected=!1,kr.id=""}function AY(){if(!Jt)return console.warn("Socket not set-up"),{setup:!1};const e={setup:!0,active:Jt.active,connected:Jt.connected,id:Jt.id,recovered:Jt.recovered};return console.warn(e),e}const OY=ce({scrollTarget:{type:String},scrollThreshold:{type:[String,Number],default:300}},"scroll");function MY(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{canScroll:n}=t;let r=0,s=0;const i=V(null),o=Ae(0),a=Ae(0),l=Ae(0),u=Ae(!1),c=Ae(!1),d=T(()=>Number(e.scrollThreshold)),f=T(()=>Pr((d.value-o.value)/d.value||0)),p=()=>{const v=i.value;if(!v||n&&!n.value)return;r=o.value,o.value="window"in v?v.pageYOffset:v.scrollTop;const m=v instanceof Window?document.documentElement.scrollHeight:v.scrollHeight;if(s!==m){s=m;return}c.value=o.value<r,l.value=Math.abs(o.value-d.value)};return ke(c,()=>{a.value=a.value||o.value}),ke(u,()=>{a.value=0}),wt(()=>{ke(()=>e.scrollTarget,v=>{var y;const m=v?document.querySelector(v):window;m&&m!==i.value&&((y=i.value)==null||y.removeEventListener("scroll",p),i.value=m,i.value.addEventListener("scroll",p,{passive:!0}))},{immediate:!0})}),Cn(()=>{var v;(v=i.value)==null||v.removeEventListener("scroll",p)}),n&&ke(n,p,{immediate:!0}),{scrollThreshold:d,currentScroll:o,currentThreshold:l,isScrollActive:u,scrollRatio:f,isScrollingUp:c,savedScroll:a}}const DY=ce({scrollBehavior:String,modelValue:{type:Boolean,default:!0},location:{type:String,default:"top",validator:e=>["top","bottom"].includes(e)},...EO(),...VA(),...OY(),height:{type:[Number,String],default:64}},"VAppBar"),ZO=_e()({name:"VAppBar",props:DY(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=V(),s=st(e,"modelValue"),i=T(()=>{var x;const w=new Set(((x=e.scrollBehavior)==null?void 0:x.split(" "))??[]);return{hide:w.has("hide"),fullyHide:w.has("fully-hide"),inverted:w.has("inverted"),collapse:w.has("collapse"),elevate:w.has("elevate"),fadeImage:w.has("fade-image")}}),o=T(()=>{const w=i.value;return w.hide||w.fullyHide||w.inverted||w.collapse||w.elevate||w.fadeImage||!s.value}),{currentScroll:a,scrollThreshold:l,isScrollingUp:u,scrollRatio:c}=MY(e,{canScroll:o}),d=T(()=>i.value.hide||i.value.fullyHide),f=T(()=>e.collapse||i.value.collapse&&(i.value.inverted?c.value>0:c.value===0)),p=T(()=>e.flat||i.value.fullyHide&&!s.value||i.value.elevate&&(i.value.inverted?a.value>0:a.value===0)),v=T(()=>i.value.fadeImage?i.value.inverted?1-c.value:c.value:void 0),m=T(()=>{var P,S;if(i.value.hide&&i.value.inverted)return 0;const w=((P=r.value)==null?void 0:P.contentHeight)??0,x=((S=r.value)==null?void 0:S.extensionHeight)??0;return d.value?a.value<l.value||i.value.fullyHide?w+x:w:w+x});Hr(T(()=>!!e.scrollBehavior),()=>{Mn(()=>{d.value?i.value.inverted?s.value=a.value>l.value:s.value=u.value||a.value<l.value:s.value=!0})});const{ssrBootStyles:y}=jd(),{layoutItemStyles:b}=zA({id:e.name,order:T(()=>parseInt(e.order,10)),position:Re(e,"location"),layoutSize:m,elementSize:Ae(void 0),active:s,absolute:Re(e,"absolute")});return Ie(()=>{const w=mr.filterProps(e);return h(mr,me({ref:r,class:["v-app-bar",{"v-app-bar--bottom":e.location==="bottom"},e.class],style:[{...b.value,"--v-toolbar-image-opacity":v.value,height:void 0,...y.value},e.style]},w,{collapse:f.value,flat:p.value}),n)}),{}}}),$Y=ce({...XP({icon:"$menu",variant:"text"})},"VAppBarNavIcon"),FY=_e()({name:"VAppBarNavIcon",props:$Y(),setup(e,t){let{slots:n}=t;return Ie(()=>h(se,me(e,{class:["v-app-bar-nav-icon"]}),n)),{}}}),LY={key:1,class:"text-uppercase text--white"},NY={key:3,class:"ml-2"},BY={key:4,class:"ml-2"},VY=$e({__name:"TopBar",setup(e){const t=Kw(),n=us(),r=Jo(),s=[{title:"Open Profile",icon:"person",path:"/settings/account"}],i=V(Date.now());oL(()=>{i.value=Date.now()},1e3);const o=T(()=>{var d;if(!((d=n.tokenClaims)!=null&&d.exp))return"";const c=n.tokenClaims.exp-i.value/1e3;return`${Math.round(c)}s`}),a=T(()=>t.username),l=T(()=>n.isDemoMode);async function u(){await n.logout(!0),await BO(r)}return(c,d)=>{const f=CK,p=EK;return D(),te(ZO,{elevation:"0"},{default:g(()=>[h(En,{class:"text-uppercase text-white"},{default:g(()=>d[1]||(d[1]=[$("span",{class:"font-weight-light"}," FDM ",-1),$("strong",null," Monster ",-1)])),_:1}),l.value?(D(),te(wn,{key:0})):ue("",!0),l.value?(D(),ge("h2",LY," DEMO MODE ")):ue("",!0),h(wn),h(O9),Z(n).hasAuthToken&&!Z(n).isLoginExpired?(D(),te(wm,{key:2,"close-on-content-click":!1,location:"bottom right","open-on-hover":"",transition:"slide-y-transition"},{activator:g(({props:v})=>[h(se,me({class:"ml-2",color:"secondary",theme:"dark"},v),{default:g(()=>[h(Q,{class:"mr-2"},{default:g(()=>d[2]||(d[2]=[_("person")])),_:1}),_(" "+re(a.value),1)]),_:2},1040)]),default:g(()=>[h(Vt,null,{default:g(()=>[(D(),ge(Pe,null,Wt(s,(v,m)=>h(Be,{key:m,to:v.path,title:v.title,"prepend-avatar":v.icon,link:""},null,8,["to","title","prepend-avatar"])),64))]),_:1})]),_:1})):ue("",!0),Z(Mk)&&o.value?(D(),ge("span",NY," AuthExp "+re(o.value),1)):ue("",!0),Z(Mk)?(D(),ge("span",BY,[$("small",null," S"+re(Z(kr).setup?1:0)+" C"+re(Z(kr).connected?1:0)+" "+re(Z(kr).id),1)])):ue("",!0),Z(n).loginRequired===!0?(D(),te(f,{key:5,tooltip:"Go back to login",text:"Logout",color:"secondary",icon:"logout",onClick:d[0]||(d[0]=v=>u())})):ue("",!0),Z(n).loginRequired===!0?(D(),te(se,{key:6,class:"ml-2"},{default:g(()=>[h(Q,{class:"mr-2"},{default:g(()=>d[3]||(d[3]=[_("logout")])),_:1}),d[4]||(d[4]=_(" Logout "))]),_:1})):ue("",!0),h(p)]),_:1})}}}),eS="/assets/logo-CJVdjy51.png",UY=$e({__name:"NavigationBar",setup(e){const t=[["home","Devices","/"],["print","Printers","/printers"],["camera_alt","CameraGridView","/cameras"],["settings","Settings","/settings"],["timeline","PrintStatistics","/statistics"],["contact_support","About","/about"]];return(n,r)=>(D(),te(Mw,{permanent:"",rail:""},{default:g(()=>[h(FY,{class:"ml-1 mt-2"},{default:g(()=>[h(cs,{alt:"FDM Monster Logo",src:Z(eS),class:"shrink mr-1 pt-3 ml-1",transition:"scale-transition",width:"40"},null,8,["src"])]),_:1}),h(dn),h(Vt,{density:"compact",nav:""},{default:g(()=>[(D(),ge(Pe,null,Wt(t,([s,i,o],a)=>h(Be,{key:a,to:o,"prepend-icon":s,title:i,density:"comfortable","router-link":""},null,8,["to","prepend-icon","title"])),64))]),_:1})]),_:1}))}});function zY(e){const t=Ae(e());let n=-1;function r(){clearInterval(n)}function s(){r(),Mt(()=>t.value=e())}function i(o){const a=o?getComputedStyle(o):{transitionDuration:.2},l=parseFloat(a.transitionDuration)*1e3||200;if(r(),t.value<=0)return;const u=performance.now();n=window.setInterval(()=>{const c=performance.now()-u+l;t.value=Math.max(e()-c,0),t.value<=0&&r()},l)}return Sn(r),{clear:r,time:t,start:i,reset:s}}const HY=ce({multiLine:Boolean,text:String,timer:[Boolean,String],timeout:{type:[Number,String],default:5e3},vertical:Boolean,...Ko({location:"bottom"}),...Ru(),...$n(),...Fs(),...$t(),...Ms(Ad({transition:"v-snackbar-transition"}),["persistent","noClickAnimation","scrim","scrollStrategy"])},"VSnackbar"),tS=_e()({name:"VSnackbar",props:HY(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=st(e,"modelValue"),{positionClasses:s}=Iu(e),{scopeId:i}=Ou(),{themeClasses:o}=Yt(e),{colorClasses:a,colorStyles:l,variantClasses:u}=tl(e),{roundedClasses:c}=Vn(e),d=zY(()=>Number(e.timeout)),f=V(),p=V(),v=Ae(!1),m=Ae(0),y=V(),b=Xe(ad,void 0);Hr(()=>!!b,()=>{const A=UA();Mn(()=>{y.value=A.mainStyles.value})}),ke(r,x),ke(()=>e.timeout,x),wt(()=>{r.value&&x()});let w=-1;function x(){d.reset(),window.clearTimeout(w);const A=Number(e.timeout);if(!r.value||A===-1)return;const O=Db(p.value);d.start(O),w=window.setTimeout(()=>{r.value=!1},A)}function P(){d.reset(),window.clearTimeout(w)}function S(){v.value=!0,P()}function C(){v.value=!1,x()}function R(A){m.value=A.touches[0].clientY}function k(A){Math.abs(m.value-A.changedTouches[0].clientY)>50&&(r.value=!1)}function E(){v.value&&C()}const I=T(()=>e.location.split(" ").reduce((A,O)=>(A[`v-snackbar--${O}`]=!0,A),{}));return Ie(()=>{const A=Vi.filterProps(e),O=!!(n.default||n.text||e.text);return h(Vi,me({ref:f,class:["v-snackbar",{"v-snackbar--active":r.value,"v-snackbar--multi-line":e.multiLine&&!e.vertical,"v-snackbar--timer":!!e.timer,"v-snackbar--vertical":e.vertical},I.value,s.value,e.class],style:[y.value,e.style]},A,{modelValue:r.value,"onUpdate:modelValue":L=>r.value=L,contentProps:me({class:["v-snackbar__wrapper",o.value,a.value,c.value,u.value],style:[l.value],onPointerenter:S,onPointerleave:C},A.contentProps),persistent:!0,noClickAnimation:!0,scrim:!1,scrollStrategy:"none",_disableGlobalStack:!0,onTouchstartPassive:R,onTouchend:k,onAfterLeave:E},i),{default:()=>{var L,M;return[Go(!1,"v-snackbar"),e.timer&&!v.value&&h("div",{key:"timer",class:"v-snackbar__timer"},[h(ou,{ref:p,color:typeof e.timer=="string"?e.timer:"info",max:e.timeout,"model-value":d.time.value},null)]),O&&h("div",{key:"content",class:"v-snackbar__content",role:"status","aria-live":"polite"},[((L=n.text)==null?void 0:L.call(n))??e.text,(M=n.default)==null?void 0:M.call(n)]),n.actions&&h(Ot,{defaults:{VBtn:{variant:"text",ripple:!1,slim:!0}}},{default:()=>[h("div",{class:"v-snackbar__actions"},[n.actions({isActive:r})])]})]},activator:n.activator})}),Qi({},f)}}),jY={style:{width:"100%"}},qY={class:"font-weight-bold text-button"},WY=$e({__name:"AppProgressSnackbar",setup(e){const t=Dt(),n=V(!1),r=V(""),s=V([]),i=V(100);function o(u){return s.value.find(c=>c.key===u)}function a(u,c,d=0,f=!1,p=Date.now()+1500){console.log(`[AppProgressSnackbar] Adding ${u} tracker with progress ${d}`),s.value.push({key:u,title:c,value:d,completed:f,startedAt:Date.now(),expiresAt:p,timeoutAt:void 0})}function l(u){s.value=s.value.filter(c=>c.key!==u)}return wt(()=>{setInterval(()=>{if(s.value.length){for(const u of s.value){const{value:c,completed:d,expiresAt:f,key:p}=u;(d||c>=100)&&f<Date.now()||u.timeoutAt&&u.timeoutAt<Date.now()?l(p):!u.timeoutAt&&f<Date.now()&&(u.timeoutAt=Date.now()+5e3)}s.value.length?(i.value=-1,n.value=!0):(i.value=2e3,r.value="Upload ended",console.debug(`[AppSnackbars] Setting timeout to ${i.value}`))}},1e3),t.onProgressMessage(u=>{const{key:c,value:d,title:f,completed:p}=u,v=o(c);if(v)Math.min(100,d)>=v.value&&(v.expiresAt=Date.now()+1500,v.value=d,v.completed=p);else{if(d>=100)return;a(c,f,d,!1,Date.now()+1500)}r.value="Uploading files"})}),(u,c)=>(D(),te(tS,{modelValue:n.value,"onUpdate:modelValue":c[1]||(c[1]=d=>n.value=d),timeout:i.value,absolute:"",location:"bottom right",class:"ma-3 elevation-24","min-width":"450px","multi-line":"",rounded:"pill",style:{"z-index":"1000"}},{default:g(()=>[h(rt,null,{default:g(()=>[h(Ue,{cols:"2"},{default:g(()=>[h(se,{icon:"file_upload",size:"large"})]),_:1}),h(Ue,{class:"d-flex align-center flex-row",cols:"8"},{default:g(()=>[$("div",jY,[$("span",qY,re(r.value),1),(D(!0),ge(Pe,null,Wt(s.value,(d,f)=>(D(),ge("div",{key:f,class:"mb-2"},[d.completed?(D(),te(Q,{key:0},{default:g(()=>c[2]||(c[2]=[_("check")])),_:1})):d.timeoutAt?(D(),te(Q,{key:1},{default:g(()=>c[3]||(c[3]=[_("pause")])),_:1})):(D(),te(Q,{key:2},{default:g(()=>c[4]||(c[4]=[_("hourglass_bottom")])),_:1})),_(" "+re(d.title)+" "+re((d.completed?100:d.value).toFixed(1))+"% ",1),c[5]||(c[5]=$("br",null,null,-1)),(D(),te(ou,{key:d.key,"model-value":d.completed?100:d.value,color:d.timeoutAt?"red":"success"},null,8,["model-value","color"]))]))),128))])]),_:1}),h(Ue,{cols:"1"},{default:g(()=>[h(se,{icon:"close",size:"large",onClick:c[0]||(c[0]=d=>n.value=!1)})]),_:1})]),_:1})]),_:1},8,["modelValue","timeout"]))}}),GY={class:"font-weight-bold text-button"},KY={key:0},YY=$e({__name:"AppErrorSnackbar",setup(e){const t=Dt(),n=V(-1),r=V(!1),s=V(""),i=V("");return wt(()=>{t.onErrorMessage(o=>{s.value=o.title,i.value=o.subtitle??"",r.value=!0,n.value=o.timeout??1e4})}),(o,a)=>(D(),te(tS,{modelValue:r.value,"onUpdate:modelValue":a[1]||(a[1]=l=>r.value=l),timeout:n.value,absolute:"",location:"bottom",class:"ml-16 mb-16 ma-3 elevation-24",color:"error-darken-1",rounded:"pill","multi-line":"",style:{"z-index":"1000"},width:"450"},{default:g(()=>[h(rt,null,{default:g(()=>[h(Ue,{cols:"2"},{default:g(()=>[h(se,{icon:"error"})]),_:1}),h(Ue,{class:"d-flex align-center flex-row",cols:"8"},{default:g(()=>{var l;return[$("div",null,[$("span",GY,re(s.value),1),(l=i.value)!=null&&l.length?(D(),ge("div",KY,re(i.value),1)):ue("",!0)])]}),_:1}),h(Ue,{cols:"1"},{default:g(()=>[h(se,{icon:"close",onClick:a[0]||(a[0]=l=>r.value=!1)})]),_:1})]),_:1})]),_:1},8,["modelValue","timeout"]))}}),XY={class:"font-weight-bold text-button"},QY={key:0},JY=$e({__name:"AppInfoSnackbar",setup(e){const t=Dt(),n=V(!1),r=V(""),s=V(""),i=V(2e3),o=V(!1);return wt(()=>{t.onInfoMessage(a=>{r.value=a.title,s.value=a.subtitle??"",o.value=a.warning??!1,i.value=a.timeout??2e3,n.value=!0})}),(a,l)=>(D(),te(tS,{modelValue:n.value,"onUpdate:modelValue":l[1]||(l[1]=u=>n.value=u),absolute:"",location:"bottom",color:o.value?"warning darken-2":"success",class:"ma-3 elevation-24",rounded:"pill",timeout:i.value,style:{"z-index":"1000"},"multi-line":""},{default:g(()=>[h(rt,null,{default:g(()=>[h(Ue,{cols:"2"},{default:g(()=>[h(se,{icon:"info"})]),_:1}),h(Ue,{cols:"8",class:"d-flex align-center flex-row"},{default:g(()=>{var u;return[$("div",null,[$("span",XY,re(r.value),1),(u=s.value)!=null&&u.length?(D(),ge("div",QY,re(s.value),1)):ue("",!0)])]}),_:1}),h(Ue,{cols:"2"},{default:g(()=>[h(se,{icon:"close",onClick:l[0]||(l[0]=u=>n.value=!1)})]),_:1})]),_:1})]),_:1},8,["modelValue","color","timeout"]))}}),nS=ps("Uploads",{state:()=>({queuedUploads:[],failedUploads:[],uploadingNow:!1}),getters:{hasPendingUploads(e){var t;return((t=e.queuedUploads)==null?void 0:t.length)>0},isUploadingNow(e){return e.uploadingNow},nextUpload(e){return e.queuedUploads[0]}},actions:{queueUploads(e){this.failedUploads=[],this.queuedUploads.push(...e)},cancelUploads(){this.queuedUploads=[],this.failedUploads=[]},async handleNextUpload(){var r;const e=Dt();if(!((r=this.queuedUploads)!=null&&r.length))return;this.uploadingNow=!0;const{file:t,printer:n}=this.nextUpload;this.queuedUploads.splice(0,1);try{await Li.uploadFile(n,t)}catch(s){if(s.isAxiosError){const i={file:t,printer:n,error:s};this.failedUploads.push(i),e.openErrorMessage({title:"Upload failure",subtitle:`File ${t.name}Upload failed for to printer ${n.name}`})}else e.openErrorMessage({title:"Upload failure",subtitle:"Unknown upload error occurred"})}this.uploadingNow=!1}}}),ZY="/img/OIG.JYDC2RaWdz7g9.jpg",Zo=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},eX=e=>Math.random()*e,tX={name:"GridLoader",props:{loading:{type:Boolean,default:!0},color:{type:String,default:"#000000"},size:{type:Number,default:15},margin:{type:String,default:"2px"},sizeUnit:{type:String,default:"px"}},methods:{random:eX,getWrapperStyle(){return{width:`${parseFloat(this.size)*3+parseFloat(this.margin)*6}${this.sizeUnit}`,fontSize:0}},getCircleStyle(e){const t=`grid ${e/100+.6}s ${e/100-.2}s infinite ease`;return{display:"inline-block",backgroundColor:this.color,width:`${this.size}${this.sizeUnit}`,height:`${this.size}${this.sizeUnit}`,margin:this.margin,borderRadius:"100%",animationFillMode:"both",animation:t}}}};function nX(e,t,n,r,s,i){return n.loading?(D(),ge("div",{key:0,style:os(i.getWrapperStyle())},[(D(),ge(Pe,null,Wt(9,o=>$("div",{key:o,style:os(i.getCircleStyle(i.random(100)))},null,4)),64))],4)):ue("",!0)}const eM=Zo(tX,[["render",nX]]);function tM(e){const t=ct();t.getOptions().enabled=e,console.warn("Sentry enabled:",e)}const rX=e=>new Promise(t=>setTimeout(t,e)),sX=ps("tracked-uploads",()=>{const e=V([]),t=T(()=>e.value.filter(r=>!r.completed));function n(r){e.value.splice(0),e.value.push(...r)}return{current:e,setUploads:n,activeUploads:t}});class iX{constructor(){ve(this,"printerStore",Lt());ve(this,"floorStore",eo());ve(this,"printerStateStore",nr());ve(this,"testPrinterStore",qw());ve(this,"trackedUploadsStore",sX());ve(this,"snackbar",Dt())}socketState(){return AY()}async setupSocketConnection(){console.debug("Setting up socket.io client");const t=await ZI(),n=us();n.loadTokens(),TY(t,n.loginRequired?n.token:void 0),Jt==null||Jt.on("legacy-update",r=>this.onMessage(JSON.parse(r))),Jt==null||Jt.on("test-printer-state",r=>{this.testPrinterStore.saveEvent(r),console.log(r)})}disconnect(){IY()}reconnect(){Jt&&(console.debug("Resetting socket.io client connection"),RY())}onMessage(t){var n,r,s;(n=t.trackedUploads.current)!=null&&n.length&&(this.trackedUploadsStore.setUploads(t==null?void 0:t.trackedUploads.current),this.trackedUploadsStore.activeUploads.forEach(o=>{this.snackbar.openProgressMessage(o.correlationToken,o.multerFile.originalname,(o.progress||0)*100,o.completed)})),(r=t.floors)!=null&&r.length&&this.floorStore.saveFloors(t.floors),(s=t.printers)!=null&&s.length&&this.printerStore.setPrinters(t.printers),t.socketStates&&this.printerStateStore.setSocketStates(t.socketStates),t.printerEvents&&this.printerStateStore.setPrinterEvents(t.printerEvents)}}const oX={key:1,style:{margin:"50px"}},aX={class:"mt-2 mb-2"},lX={key:0,class:"mt-2 mb-2"},uX={key:1,class:"mt-2 mb-2"},cX={key:2,style:{animation:"fadeIn 0.75s"}},dX=$e({__name:"AppLoader",setup(e){const t=us(),n=Ns(),r=Zi(),s=Kw(),i=V(!1),o=Jo(),a=V(""),l=V(!0),u=V(),c=V(),d=V(),f=Dt(),p=new iX;function v(){window.location.reload()}function m(){navigator.clipboard.writeText(JSON.stringify(u.value)),f.openInfoMessage({title:"Copied",subtitle:"Error copied to clipboard"})}function y(R,k=""){R?(a.value=k,u.value=null,c.value=null,d.value=null):a.value="",i.value=R}async function b(){var R;try{await n.loadSettings(),await r.loadFeatures(),await s.getProfile();const k=(R=n.serverSettings)==null?void 0:R.sentryDiagnosticsEnabled;tM(!!k)}catch(k){console.log("Error when loading settings.",k),f.openErrorMessage({title:"Error",subtitle:"Error when loading settings, features and/or profile."}),li(k)}p.socketState().setup?p.reconnect():await p.setupSocketConnection(),y(!1)}return Br("auth:permission-denied").on(async R=>{console.log("[AppLoader] Permission denied, going to permission denied page"),y(!0,"Permission denied"),await o.push({name:qt.PermissionDenied,query:{roles:R==null?void 0:R.roles,page:String(o.currentRoute.value.name),permissions:R==null?void 0:R.permissions,error:R==null?void 0:R.error,url:R==null?void 0:R.url}}),y(!1)}),Br("auth:failure").on(async R=>{console.debug(`[AppLoader] Event received: 'auth:failure', going back to login, context: ${R}`),y(!0,"Authentication failed, going back to login"),o.currentRoute.value.name!==qt.Login&&await o.push({name:qt.Login}),y(!1)}),Br("auth:login").on(async()=>{console.debug("[AppLoader] Event received: 'auth:login', loading app"),y(!0,"Loading app"),await b()}),Br(`auth:${xr.AccountNotVerified}`).on(async()=>{console.debug(`[AppLoader] Event received: 'auth:${xr.AccountNotVerified}', going to login`),f.error("Account not verified, please ask an administrator to verify your account."),y(!0,"Account not verified, please ask an administrator to verify your account."),o.currentRoute.value.name!==qt.Login&&await o.push({name:qt.Login}),y(!1)}),Br(`auth:${xr.PasswordChangeRequired}`).on(async()=>{console.debug(`[AppLoader] Event received: 'auth:${xr.PasswordChangeRequired}', going to login`),f.error("Password change required, please change your password."),y(!0,"Password change required, please change your password."),o.currentRoute.value.name!==qt.Login&&await o.push({name:qt.Login}),y(!1)}),Ap(()=>{p&&p.disconnect()}),ku(async()=>{var A,O;l.value=!0;const R=["Loading FDM Monster","Loading it all","Loading features","Loading what needs to be loaded","Farming potatoes","Wiping the floor","Cleaning cobwebs","Loading filament.dll","Loading 3D_printer.exe","Loading spools"],k=R[Math.floor(Math.random()*R.length)];y(!0,k);try{await xo.test()}catch(L){l.value=!1,u.value=L,c.value="api/test",li(L);return}const{loginRequired:E,wizardState:I}=await t.checkAuthenticationRequirements();if(!I.wizardCompleted){console.debug("[AppLoader] Wizard not completed, going to wizard"),await t.logout(!1),o.currentRoute.value.name!==qt.FirstTimeSetup&&await o.replace({name:qt.FirstTimeSetup}),y(!1);return}if(!E)return console.debug("[AppLoader] Login not required, loading app"),await b();if(console.debug("[AppLoader] Checking if tokens are present"),!t.hasAuthToken&&!t.hasRefreshToken)return console.debug("[AppLoader] No tokens present, hiding overlay as router will have handled it"),y(!1);y(!0,"Refreshing login"),console.debug("[AppLoader] Verifying or refreshing login once");try{const{success:L,handled:M}=await t.verifyOrRefreshLoginOnceOrLogout();if(M){console.debug("[AppLoader] received handled event, hiding overlay");return}if(!L){console.debug("[AppLoader] No success refreshing"),y(!0,"Login expired, going back to login"),await rX(500),o.currentRoute.value.name!==qt.Login&&await o.push({name:qt.Login}),y(!1);return}}catch(L){console.log("[AppLoader] Error when refreshing login",L),l.value=!1,u.value=L.message,c.value=(A=L.config)==null?void 0:A.url,d.value=(O=L.response)==null?void 0:O.data,li(L);return}console.debug("[AppLoader] Loading app"),await b()}),(R,k)=>(D(),ge(Pe,null,[h(Vi,{modelValue:i.value,"onUpdate:modelValue":k[2]||(k[2]=E=>i.value=E),opacity:"0.98",style:{"z-index":"7"}},{default:g(()=>[l.value?(D(),te(eM,{key:0,size:20,class:"ma-auto",color:"#a70015"})):ue("",!0),k[19]||(k[19]=$("br",null,null,-1)),u.value?(D(),ge("div",oX,[k[16]||(k[16]=$("h1",null,"FDM Monster Server Error",-1)),k[17]||(k[17]=$("p",null," Did not expect this answer from the server. Please check your configuration and logs. ",-1)),h(ip,{class:"pa-4 rounded",color:"grey-darken-2",width:"80%"},{default:g(()=>[k[11]||(k[11]=_(" Details: ")),$("div",aX,re(JSON.stringify(u.value,null,4)),1),c.value?(D(),ge("div",lX," Original URL: "+re(c.value),1)):ue("",!0),d.value?(D(),ge("div",uX," Response body: "+re(d.value),1)):ue("",!0),k[12]||(k[12]=$("br",null,null,-1)),h(se,{class:"mb-2",color:"secondary",onClick:k[0]||(k[0]=E=>m())},{default:g(()=>[h(Q,{class:"mr-2"},{default:g(()=>k[3]||(k[3]=[_("content_copy")])),_:1}),k[4]||(k[4]=_(" Copy error details "))]),_:1}),k[13]||(k[13]=$("br",null,null,-1)),h(se,{color:"primary mb-2",onClick:k[1]||(k[1]=E=>v())},{default:g(()=>[h(Q,{class:"mr-2"},{default:g(()=>k[5]||(k[5]=[_("refresh")])),_:1}),k[6]||(k[6]=_(" reload the page "))]),_:1}),k[14]||(k[14]=$("br",null,null,-1)),h(se,{color:"darken-2 mb-2",href:"https://docs.fdm-monster.net",style:{color:"white"},target:"_blank"},{default:g(()=>[h(Q,{class:"mr-2"},{default:g(()=>k[7]||(k[7]=[_("menu_book")])),_:1}),k[8]||(k[8]=_(" view documentation "))]),_:1}),k[15]||(k[15]=$("br",null,null,-1)),h(se,{color:"purple-darken-4",href:"https://discord.gg/mwA8uP8CMc",style:{color:"white"},target:"_blank"},{default:g(()=>[h(Q,{class:"mr-2"},{default:g(()=>k[9]||(k[9]=[_("chat")])),_:1}),k[10]||(k[10]=_(" join our Discord "))]),_:1})]),_:1}),k[18]||(k[18]=$("img",{class:"justify-center align-center align-content-center rounded-pill mt-8 ma-4",src:ZY,style:{opacity:"0.9"},width:"400"},null,-1))])):ue("",!0),l.value?(D(),ge("div",cX,re(a.value),1)):ue("",!0)]),_:1},8,["modelValue"]),i.value?ue("",!0):Op(R.$slots,"default",{key:0})],64))}});async function fX(){const e="vpss",t=document.getElementById(e),n=document.getElementById(`${e}-style`);if(!t||!n){console.error("Splash screen not found. Did you forget to add the `vite-plugin-splash-screen` plugin?");return}const r=window.__VPSS__||{};if(t.addEventListener("animationend",s=>{s.animationName==="vpss-hide"&&(t.remove(),n.remove())}),"minDurationMs"in r&&"renderedAt"in r){const s=new Date().getTime()-r.renderedAt,i=Math.max(r.minDurationMs-s,0);await new Promise(o=>setTimeout(o,i))}t.classList.add(`${e}-hidden`)}const hX=ce({...Ve(),...BA({fullHeight:!0}),...$t()},"VApp"),pX=_e()({name:"VApp",props:hX(),setup(e,t){let{slots:n}=t;const r=Yt(e),{layoutClasses:s,getLayoutItem:i,items:o,layoutRef:a}=HA(e),{rtlClasses:l}=Dr();return Ie(()=>{var u;return h("div",{ref:a,class:["v-application",r.themeClasses.value,s.value,l.value,e.class],style:[e.style]},[h("div",{class:"v-application__wrap"},[(u=n.default)==null?void 0:u.call(n)])])}),{getLayoutItem:i,items:o,theme:r}}}),mX=ce({scrollable:Boolean,...Ve(),...Or(),...vt({tag:"main"})},"VMain"),gX=_e()({name:"VMain",props:mX(),setup(e,t){let{slots:n}=t;const{dimensionStyles:r}=Mr(e),{mainStyles:s}=UA(),{ssrBootStyles:i}=jd();return Ie(()=>h(e.tag,{class:["v-main",{"v-main--scrollable":e.scrollable},e.class],style:[s.value,i.value,r.value,e.style]},{default:()=>{var o,a;return[e.scrollable?h("div",{class:"v-main__scroller"},[(o=n.default)==null?void 0:o.call(n)]):(a=n.default)==null?void 0:a.call(n)]}})),{}}}),vX=$e({__name:"App",setup(e){const t=nS(),n=us(),r=t.queuedUploads;return ke(r,async()=>{await t.handleNextUpload()}),wt(()=>{fX(),console.debug(`App.vue mounted. Logged in: ${n.hasAuthToken}, Expired: ${n.isLoginExpired}`)}),(s,i)=>{const o=JY,a=YY,l=WY,u=UY,c=VY,d=An("router-view"),f=_K,p=cK,v=O7,m=I7,y=P7,b=k7,w=l7,x=MG,P=_G,S=ZW,C=yW;return D(),te(pX,null,{default:g(()=>[h(o),h(a),h(l),Z(n).hasAuthToken&&!Z(n).isLoginExpired||!Z(n).loginRequired?(D(),te(u,{key:0})):ue("",!0),Z(n).hasAuthToken&&!Z(n).isLoginExpired||!Z(n).loginRequired?(D(),te(c,{key:1})):ue("",!0),h(dX,null,{default:g(()=>[h(gX,null,{default:g(()=>[h(d)]),_:1})]),_:1}),h(f),h(p),h(v),h(m),h(y),h(b),h(w),h(x),h(P),h(S),h(C)]),_:1})}}}),rS="/img/logo.svg",nM=$e({__name:"PrinterCreateAction",props:{floorId:{},floorX:{},floorY:{}},setup(e){const t=e,n=tn(nn.AddOrUpdatePrinterDialog);function r(){n.openDialog(t)}return(s,i)=>(D(),te(se,{class:"ma-2",color:"primary",size:"small",rounded:"",onClickCapture:i[0]||(i[0]=Pt(o=>r(),["stop"]))},{default:g(()=>[h(Q,null,{default:g(()=>i[1]||(i[1]=[_("add")])),_:1}),i[2]||(i[2]=_(" New printer "))]),_:1}))}});class rM extends vr{static async postQuickStopM112Command(t){const n=Me.sendQuickStopM112Route(t);return await this.post(n)}}const Pm=ps("GridStore",{state:()=>({gridEditMode:!1})}),yX="thumbnail",bX=(e,t)=>Sm({queryKey:[yX,e],queryFn:async()=>e.value?Li.getThumbnail(e.value).then(n=>n.thumbnailBase64||""):"",enabled:!!e&&!!t}),wX={class:"d-flex flex flex-column justify-center",style:{height:"100%"}},SX={key:1,class:"printer-file-or-stream-viewer"},_X={key:2,class:"printer-file-or-stream-viewer"},kX={key:3,class:"printer-menu"},xX={class:"file-name"},EX={key:5,class:"centered-controls"},CX={key:0},PX={key:1},Bk="rgba(100,100,100,0.1)",TX=$e({__name:"PrinterGridTile",props:{printer:{type:Object,required:!1},x:{type:Number,required:!0},y:{type:Number,required:!0}},setup(e){const t=e,n=Lt(),r=nr(),s=eo(),i=Zi(),o=Ns(),a=Pm(),l=tn(nn.PrinterControlDialog),u=tn(nn.AddOrUpdatePrinterDialog),c=Dt(),d=T(()=>{var J;return(J=t.printer)==null?void 0:J.id}),f=T(()=>o.largeTiles),p=T(()=>f.value?"80px":"40px"),{data:v}=bX(d,o.thumbnailsEnabled),m=T(()=>d.value?r.isApiResponding(d.value):!1),y=T(()=>d.value?r.isPrinterOperational(d.value):!1),b=T(()=>d.value?r.isPrinterPrinting(d.value):!1),w=T(()=>d.value?r.isPrinterPaused(d.value):!1),x=T(()=>d.value?n.isSelectedPrinter(d.value):!1),P=T(()=>{var J;return((J=n.selectedPrinters)==null?void 0:J.length)&&!x.value}),S=T(()=>o.preferCancelOverQuickStop),C=T(()=>i.hasFeature("printerControlApi")),R=T(()=>{if(!d.value)return;const J=n.printer(d.value);if(!J)return;const N=r.printerEventsById[d.value],K=r.socketStatesById[d.value];return eA(J,K,N)}),k=T(()=>{const J=R.value;return J&&J.rgb||Bk}),E=T(()=>{if(d.value)return r.printerJobsById[d.value]}),I=T(()=>{if(d.value)return r.printingFilePathsByPrinterId[d.value]}),A=async()=>{d.value&&confirm("Are you sure to cancel the current print job?")&&await Fa.stopPrintJob(d.value)},O=async()=>{d.value&&await Fa.pausePrintJob(d.value)},L=async()=>{d.value&&await Fa.resumePrintJob(d.value)},M=()=>{n.setSideNavPrinter(t.printer)},z=async()=>{d.value&&(await Qt.refreshSocket(d.value),c.openInfoMessage({title:"Refreshing OctoPrint connection state"}))},H=()=>{n.setUpdateDialogPrinter(t.printer),u.openDialog()},G=async()=>{if(!d.value)throw new Error("PrinterId not set, cant open dialog");await l.openDialog({printerId:d})},W=async()=>{d.value&&confirm("Are you sure to abort the print in Quick Stop mode? Please reconnect after.")&&await rM.postQuickStopM112Command(d.value)},Y=async()=>{d.value&&await Qt.sendPrinterConnectCommand(d.value)},X=async()=>{var J;if(!(!t.printer||!d.value)){if(a.gridEditMode){const N=(J=s.selectedFloor)==null?void 0:J.id;if(!N)throw new Error("Cant clear printer, floor not selected");await rs.deletePrinterFromFloor(N,d.value);return}n.toggleSelectedPrinter(t.printer)}};return(J,N)=>{const K=nM,he=hr("drop-upload"),oe=hr("drop-printer-position");return Bt((D(),ge("div",null,[Bt((D(),te(gt,{elevation:"5",class:Ho(["tile colored-tile rounded-lg",{"tile-large":f.value,"tile-selected":x.value,"tile-unselected":P.value,"tile-no-printer":!e.printer}]),onClick:N[8]||(N[8]=we=>X())},{default:g(()=>{var we,ee,de,ne,U,De,He;return[Bt($("div",{class:"printer-title"},re(((we=e.printer)==null?void 0:we.name)??" "),513),[[Xi,e.printer]]),!e.printer||Z(a).gridEditMode?(D(),ge("div",{key:0,style:os([{position:"absolute"},{height:f.value?"calc(120px - 20px)":"calc(84px - 20px)"}]),class:"plus-hover-icon"},[$("div",wX,[e.printer?ue("",!0):(D(),te(K,{key:0,"floor-id":(ee=Z(s).selectedFloor)==null?void 0:ee.id,"floor-x":e.x,"floor-y":e.y},null,8,["floor-id","floor-x","floor-y"])),e.printer?(D(),te(se,{key:1,color:"error",small:"",rounded:"",onClickCapture:N[0]||(N[0]=Pt(F=>X(),["stop"]))},{default:g(()=>[h(Q,null,{default:g(()=>N[9]||(N[9]=[_("clear")])),_:1}),N[10]||(N[10]=_(" Clear position "))]),_:1})):ue("",!0)])],4)):ue("",!0),e.printer&&m.value?(D(),ge("div",SX,[(de=Z(v))!=null&&de.length?(D(),te(cs,{key:1,width:p.value,src:"data:image/png;base64,"+(Z(v)??"")},null,8,["width","src"])):(D(),te(cs,{key:0,style:{opacity:"0.3",filter:"grayscale(100%)"},width:p.value,src:Z(eS),alt:"No thumbnail was found in GCode"},null,8,["width","src"]))])):e.printer?(D(),ge("div",_X,[(ne=R.value)!=null&&ne.text.includes("API")?(D(),te(Q,{key:0,size:p.value,color:"secondary"},{default:g(()=>N[11]||(N[11]=[_(" wifi_off ")])),_:1},8,["size"])):ue("",!0),e.printer.enabled?ue("",!0):(D(),te(Q,{key:1,size:p.value,color:"secondary"},{default:g(()=>N[12]||(N[12]=[_(" disabled_by_default ")])),_:1},8,["size"])),(U=R.value)!=null&&U.text.includes("unset")?(D(),te(Q,{key:2,size:p.value,color:"secondary"},{default:g(()=>N[13]||(N[13]=[_(" question_mark ")])),_:1},8,["size"])):ue("",!0)])):ue("",!0),e.printer&&!Z(a).gridEditMode?(D(),ge("div",kX,[h(nt,{top:""},{activator:g(({props:F})=>[h(se,me(F,{small:"",color:"darkgray",style:{"border-radius":"7px"},elevation:"0",onClick:N[1]||(N[1]=Pt(B=>M(),["prevent","stop"]))}),{default:g(()=>[h(Q,{dark:""},{default:g(()=>N[14]||(N[14]=[_("menu")])),_:1})]),_:2},1040)]),default:g(()=>N[15]||(N[15]=[_("Open printer details")])),_:1})])):ue("",!0),e.printer&&!Z(a).gridEditMode?(D(),ge("div",{key:4,class:"printer-controls",style:os([{overflow:"clip"},{position:f.value?"inherit":"absolute",top:f.value?"inherit":"30px"}])},[$("small",xX,re(I.value??" "),1)],4)):ue("",!0),e.printer&&!Z(a).gridEditMode?(D(),ge("div",EX,[h(nt,{top:""},{activator:g(({props:F})=>[C.value?(D(),te(se,me({key:0},F,{disabled:!m.value||!y.value,size:f.value?"small":"x-small",color:"darkgray",style:{"border-radius":"7px"},elevation:"0",onClick:N[2]||(N[2]=Pt(B=>G(),["prevent","stop"]))}),{default:g(()=>[h(Q,null,{default:g(()=>N[16]||(N[16]=[_("open_with")])),_:1})]),_:2},1040,["disabled","size"])):ue("",!0)]),default:g(()=>N[17]||(N[17]=[_("Move and home printer")])),_:1}),h(nt,{top:""},{activator:g(({props:F})=>[!y.value&&m.value?(D(),te(se,me({key:0},F,{size:f.value?"small":"x-small",color:"darkgray",style:{"border-radius":"7px"},elevation:"0",onClick:N[3]||(N[3]=Pt(B=>Y(),["prevent","stop"]))}),{default:g(()=>[h(Q,null,{default:g(()=>N[18]||(N[18]=[_("usb")])),_:1})]),_:2},1040,["size"])):ue("",!0)]),default:g(()=>N[19]||(N[19]=[_("Connect USB (only for OctoPrint)")])),_:1}),h(nt,{top:""},{activator:g(({props:F})=>[h(se,me(F,{size:f.value?"small":"x-small",color:"darkgray",style:{"border-radius":"7px"},elevation:"0",onClick:N[4]||(N[4]=Pt(B=>z(),["prevent","stop"]))}),{default:g(()=>[h(Q,null,{default:g(()=>N[20]||(N[20]=[_("refresh")])),_:1})]),_:2},1040,["size"])]),default:g(()=>N[21]||(N[21]=[_("Reload printer websocket and refresh all states")])),_:1}),h(nt,{top:""},{activator:g(({props:F})=>[h(se,me(F,{disabled:!m.value||!w.value&&!b.value,size:f.value?"small":"x-small",color:"darkgray",style:{"border-radius":"7px"},elevation:"0",onClick:N[5]||(N[5]=Pt(B=>w.value?L():O(),["prevent","stop"]))}),{default:g(()=>[w.value?ue("",!0):(D(),te(Q,{key:0},{default:g(()=>N[22]||(N[22]=[_("pause")])),_:1})),w.value?(D(),te(Q,{key:1},{default:g(()=>N[23]||(N[23]=[_("play_arrow")])),_:1})):ue("",!0)]),_:2},1040,["disabled","size"])]),default:g(()=>[_(re(w.value?"Resume print":"Pause print"),1)]),_:1}),h(nt,{top:""},{activator:g(({props:F})=>[h(se,me(F,{size:f.value?"small":"x-small",disabled:!m.value||S.value&&!b.value&&!w.value,color:"darkgray",style:{"border-radius":"7px"},elevation:"0",onClick:N[6]||(N[6]=Pt(B=>S.value?A():W(),["prevent","stop"]))}),{default:g(()=>[h(Q,null,{default:g(()=>[_(re(S.value?"stop":"dangerous"),1)]),_:1})]),_:2},1040,["size","disabled"])]),default:g(()=>[_(re(S.value?"Cancel current print gracefully":"Perform quick stop of printer"),1)]),_:1}),h(nt,{top:""},{activator:g(({props:F})=>[h(se,me(F,{size:f.value?"small":"x-small",color:"darkgray",style:{"border-radius":"7px"},elevation:"0",onClick:N[7]||(N[7]=Pt(B=>H(),["prevent","stop"]))}),{default:g(()=>[h(Q,null,{default:g(()=>N[24]||(N[24]=[_("settings")])),_:1})]),_:2},1040,["size"])]),default:g(()=>N[25]||(N[25]=[_("Open printer settings")])),_:1})])):ue("",!0),e.printer&&!Z(a).gridEditMode?(D(),te(ou,{key:6,value:(He=(De=E.value)==null?void 0:De.progress)==null?void 0:He.completion,"background-color":"dark-gray",height:"14",class:"progress-bar"},{default:g(({value:F})=>{var B;return[$("strong",null,re((F==null?void 0:F.toFixed(1))+"%"),1),h(nt,{"close-delay":"100",color:"danger","open-delay":"0",top:"",disabled:(B=e.printer)==null?void 0:B.enabled},{activator:g(({props:q})=>{var fe,ae,ye;return[$("span",me({class:"xsmall-resized-font text--secondary ml-sm-2"},q),[(fe=e.printer)!=null&&fe.disabledReason?(D(),ge("span",CX,[N[27]||(N[27]=$("small",null," MAINTENANCE",-1)),h(Q,{class:"d-none d-xl-inline",color:"primary",small:""},{default:g(()=>N[26]||(N[26]=[_("info")])),_:1})])):(D(),ge("span",PX,[$("small",{style:os({"background-color":k.value+"99","border-left":"5px solid "+k.value+"ff",padding:"5px"})},re((ye=(ae=R.value)==null?void 0:ae.text)==null?void 0:ye.toUpperCase()),5)]))],16)]}),default:g(()=>{var q;return[$("span",null,re(((q=e.printer)==null?void 0:q.disabledReason)??"Printer disabled"),1)]}),_:1},8,["disabled"])]}),_:1},8,["value"])):ue("",!0)]}),_:1},8,["class"])),[[he,{printers:[e.printer]}]])])),[[oe,{x:e.x,y:e.y,printerSet:e.printer}]])}}}),sM="FDM-Monster-Client-Vue2";var iM=(e=>(e.PRINTER_PLACE="PRINTER_PLACE",e))(iM||{});function RX(e){var t,n;return!((t=e==null?void 0:e.appId)!=null&&t.length)||!((n=e==null?void 0:e.intent)!=null&&n.length)?!1:e.appId===sM&&e.intent==="PRINTER_PLACE"}const IX=ce({color:String,density:String,...Ve()},"VBannerActions"),AX=_e()({name:"VBannerActions",props:IX(),setup(e,t){let{slots:n}=t;return Ir({VBtn:{color:e.color,density:e.density,slim:!0,variant:"text"}}),Ie(()=>{var r;return h("div",{class:["v-banner-actions",e.class],style:e.style},[(r=n.default)==null?void 0:r.call(n)])}),{}}}),OX=Cu("v-banner-text"),MX=ce({avatar:String,bgColor:String,color:String,icon:ze,lines:String,stacked:Boolean,sticky:Boolean,text:String,...ms(),...Ve(),...Ar(),...Or(),...rl({mobile:null}),...vs(),...Ko(),...Ru(),...$n(),...vt(),...$t()},"VBanner"),oM=_e()({name:"VBanner",props:MX(),setup(e,t){let{slots:n}=t;const{backgroundColorClasses:r,backgroundColorStyles:s}=fr(e,"bgColor"),{borderClasses:i}=Ds(e),{densityClasses:o}=gs(e),{displayClasses:a,mobile:l}=pi(e),{dimensionStyles:u}=Mr(e),{elevationClasses:c}=$s(e),{locationStyles:d}=nl(e),{positionClasses:f}=Iu(e),{roundedClasses:p}=Vn(e),{themeClasses:v}=Yt(e),m=Re(e,"color"),y=Re(e,"density");Ir({VBannerActions:{color:m,density:y}}),Ie(()=>{const b=!!(e.text||n.text),w=!!(e.avatar||e.icon),x=!!(w||n.prepend);return h(e.tag,{class:["v-banner",{"v-banner--stacked":e.stacked||l.value,"v-banner--sticky":e.sticky,[`v-banner--${e.lines}-line`]:!!e.lines},v.value,r.value,i.value,o.value,a.value,c.value,f.value,p.value,e.class],style:[s.value,u.value,d.value,e.style],role:"banner"},{default:()=>{var P;return[x&&h("div",{key:"prepend",class:"v-banner__prepend"},[n.prepend?h(Ot,{key:"prepend-defaults",disabled:!w,defaults:{VAvatar:{color:m.value,density:y.value,icon:e.icon,image:e.avatar}}},n.prepend):h(lt,{key:"prepend-avatar",color:m.value,density:y.value,icon:e.icon,image:e.avatar},null)]),h("div",{class:"v-banner__content"},[b&&h(OX,{key:"text"},{default:()=>{var S;return[((S=n.text)==null?void 0:S.call(n))??e.text]}}),(P=n.default)==null?void 0:P.call(n)]),n.actions&&h(AX,{key:"actions"},n.actions)]}})})}}),DX={class:"printer-grid-container"},$X={key:0,class:"d-flex flex-row justify-start",style:{gap:"10px",width:"100%"}},FX={key:0,class:"d-flex flex-column justify-start",style:{gap:"10px","margin-top":"10px"}},LX=$e({__name:"PrinterGrid",props:{gap:{type:String,default:"4px"}},setup(e){const t=Lt(),n=eo(),r=Ns(),s=Pm();wt(async()=>{await t.loadPrinters(),await n.loadFloors()});const i=e,o=T(()=>n.gridSortedPrinters),a=T(()=>r.gridCols),l=T(()=>r.gridRows),u=T(()=>r.largeTiles),c=T(()=>l.value*a.value),d=T(()=>({display:"grid",gridTemplateColumns:`repeat(${a.value}, 1fr)`,gap:i.gap})),f=P=>P%a.value,p=P=>Math.floor(P/a.value);function v(P,S){S.dataTransfer&&P.id&&S.dataTransfer.setData("text",JSON.stringify({appId:sM,intent:iM.PRINTER_PLACE,printerId:P.id}))}function m(P,S){var k;const C=P,R=S;if(!(!((k=o.value)!=null&&k.length)||!o.value[C]))return o.value[C][R]}async function y(){!s.gridEditMode||!r.frontendSettings||r.frontendSettings.gridRows>=16||(r.frontendSettings.gridRows++,await r.saveFrontendSettings())}async function b(){!s.gridEditMode||!r.frontendSettings||r.frontendSettings.gridCols>=12||(r.frontendSettings.gridCols++,await r.saveFrontendSettings())}async function w(){!s.gridEditMode||!r.frontendSettings||r.frontendSettings.gridRows!=1&&(r.frontendSettings.gridRows--,await r.saveFrontendSettings())}async function x(){!s.gridEditMode||!r.frontendSettings||r.frontendSettings.gridCols!=1&&(r.frontendSettings.gridCols--,await r.saveFrontendSettings())}return(P,S)=>(D(),ge("div",null,[Z(s).gridEditMode?(D(),te(oM,{key:0},{default:g(()=>[h(rt,{style:{"margin-bottom":"-5px"}},{default:g(()=>[h(Ue,null,{default:g(()=>[$("span",null," Drag "+re(Z(n).floorlessPrinters.length)+" unplaced printer(s) from here to place it on the grid. ",1),h(np,null,{default:g(()=>[(D(!0),ge(Pe,null,Wt(Z(n).floorlessPrinters,C=>(D(),te(_n,{key:C.id,draggable:"",size:"small",style:{cursor:"move"},onDragstart:R=>v(C,R)},{default:g(()=>[_(re(C.name),1)]),_:2},1032,["onDragstart"]))),128))]),_:1})]),_:1}),h(Ue,null,{default:g(()=>[$("div",null,[S[6]||(S[6]=_(" Clear printers by clicking on ")),$("strong",null,[h(Q,null,{default:g(()=>S[4]||(S[4]=[_("disabled_visible")])),_:1}),S[5]||(S[5]=_(" Click to clear "))])])]),_:1})]),_:1})]),_:1})):ue("",!0),$("div",DX,[$("div",{class:"printer-grid",style:os(d.value)},[(D(!0),ge(Pe,null,Wt(c.value,C=>(D(),ge("div",{key:`printer-${f(C-1)}-${p(C-1)}`,class:Ho(["printer-cell",{"printer-cell-large":u.value}])},[h(TX,{printer:m(f(C-1),p(C-1)),x:f(C-1),y:p(C-1)},null,8,["printer","x","y"])],2))),128)),Z(s).gridEditMode?(D(),ge("div",$X,[S[9]||(S[9]=_(" Columns ")),h(se,{"x-small":"",rounded:"",disabled:Z(r).gridCols<=1,onClick:S[0]||(S[0]=C=>x())},{default:g(()=>[h(Q,null,{default:g(()=>S[7]||(S[7]=[_("remove")])),_:1})]),_:1},8,["disabled"]),h(se,{"x-small":"",rounded:"",disabled:Z(r).gridCols>=12,onClick:S[1]||(S[1]=C=>b())},{default:g(()=>[h(Q,null,{default:g(()=>S[8]||(S[8]=[_("add")])),_:1})]),_:1},8,["disabled"])])):ue("",!0)],4),Z(s).gridEditMode?(D(),ge("div",FX,[S[12]||(S[12]=_(" Rows ")),h(se,{"x-small":"",rounded:"",disabled:Z(r).gridRows<=1,onClick:S[2]||(S[2]=C=>w())},{default:g(()=>[h(Q,null,{default:g(()=>S[10]||(S[10]=[_("remove")])),_:1})]),_:1},8,["disabled"]),h(se,{"x-small":"",rounded:"",disabled:Z(r).gridRows>=16,onClick:S[3]||(S[3]=C=>y())},{default:g(()=>[h(Q,null,{default:g(()=>S[11]||(S[11]=[_("add")])),_:1})]),_:1},8,["disabled"])])):ue("",!0)]),S[13]||(S[13]=$("img",{alt:"FDM Monster Background",class:"grid-bg-img align-content-center",src:rS,style:{opacity:"0.08","pointer-events":"none"}},null,-1))]))}}),NX=Zo(LX,[["__scopeId","data-v-0a20edf3"]]);function BX(e,t){return e?t.map(n=>({file:n,printer:e})):[]}function aM(e,t){return!(e!=null&&e.length)||!t?[]:e.map(n=>({file:t,printer:n}))}const VX=ce({indeterminate:Boolean,inset:Boolean,flat:Boolean,loading:{type:[Boolean,String],default:!1},...al(),...bm()},"VSwitch"),up=_e()({name:"VSwitch",inheritAttrs:!1,props:VX(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:indeterminate":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const s=st(e,"indeterminate"),i=st(e,"modelValue"),{loaderClasses:o}=Id(e),{isFocused:a,focus:l,blur:u}=ju(e),c=V(),d=_t&&window.matchMedia("(forced-colors: active)").matches,f=T(()=>typeof e.loading=="string"&&e.loading!==""?e.loading:e.color),p=gr(),v=T(()=>e.id||`switch-${p}`);function m(){s.value&&(s.value=!1)}function y(b){var w,x;b.stopPropagation(),b.preventDefault(),(x=(w=c.value)==null?void 0:w.input)==null||x.click()}return Ie(()=>{const[b,w]=el(n),x=ds.filterProps(e),P=Xa.filterProps(e);return h(ds,me({class:["v-switch",{"v-switch--flat":e.flat},{"v-switch--inset":e.inset},{"v-switch--indeterminate":s.value},o.value,e.class]},b,x,{modelValue:i.value,"onUpdate:modelValue":S=>i.value=S,id:v.value,focused:a.value,style:e.style}),{...r,default:S=>{let{id:C,messagesId:R,isDisabled:k,isReadonly:E,isValid:I}=S;const A={model:i,isValid:I};return h(Xa,me({ref:c},P,{modelValue:i.value,"onUpdate:modelValue":[O=>i.value=O,m],id:C.value,"aria-describedby":R.value,type:"checkbox","aria-checked":s.value?"mixed":void 0,disabled:k.value,readonly:E.value,onFocus:l,onBlur:u},w),{...r,default:O=>{let{backgroundColorClasses:L,backgroundColorStyles:M}=O;return h("div",{class:["v-switch__track",d?void 0:L.value],style:M.value,onClick:y},[r["track-true"]&&h("div",{key:"prepend",class:"v-switch__track-true"},[r["track-true"](A)]),r["track-false"]&&h("div",{key:"append",class:"v-switch__track-false"},[r["track-false"](A)])])},input:O=>{let{inputNode:L,icon:M,backgroundColorClasses:z,backgroundColorStyles:H}=O;return h(Pe,null,[L,h("div",{class:["v-switch__thumb",{"v-switch__thumb--filled":M||e.loading},e.inset||d?void 0:z.value],style:e.inset?void 0:H.value},[r.thumb?h(Ot,{defaults:{VIcon:{icon:M,size:"x-small"}}},{default:()=>[r.thumb({...A,icon:M})]}):h(LN,null,{default:()=>[e.loading?h(Vp,{name:"v-switch",active:!0,color:I.value===!1?void 0:f.value},{default:G=>r.loader?r.loader(G):h(ri,{active:G.isActive,color:G.color,indeterminate:!0,size:"16",width:"2"},null)}):M&&h(Q,{key:String(M),icon:M,size:"x-small"},null)]})])])}})}})}),{}}}),UX={class:"d-flex flex-wrap gap-2"},zX={class:"pr-2"},HX={class:"pr-2"},jX={class:"pr-2"},qX={class:"pr-2"},WX={class:"pr-2"},GX={class:"ma-4 pt-6"},KX=$e({__name:"HomeToolbar",setup(e){const t=Lt(),n=nr(),r=eo(),s=Pm(),i=T(()=>r.selectedFloorIndex),o=T(()=>r.floors);function a(l){r.changeSelectedFloorByIndex(l)}return(l,u)=>(D(),te(mr,{flat:""},{default:g(()=>{var c;return[h(DP,{"model-value":i.value,class:"ml-7",mandatory:"",rounded:"","onUpdate:modelValue":a},{default:g(()=>[(D(!0),ge(Pe,null,Wt(o.value,d=>(D(),te(se,{key:d.id,size:"small"},{default:g(()=>[h(Q,null,{default:g(()=>u[2]||(u[2]=[_("layers")])),_:1}),_(" "+re(d.name),1)]),_:2},1024))),128))]),_:1},8,["model-value"]),(c=Z(t).printers)!=null&&c.length?ue("",!0):(D(),te(se,{key:0,class:"mt-0 ml-6",color:"primary",to:"/printers"},{default:g(()=>u[3]||(u[3]=[_(" You have no printers. Click here to start! ")])),_:1})),Z(r).floorlessPrinters.length?(D(),te(rn,{key:1,class:"ml-4"},{default:g(()=>[h(Q,null,{default:g(()=>u[4]||(u[4]=[_("warning")])),_:1}),_(" "+re(Z(r).floorlessPrinters.length)+" unplaced printer(s)! ",1)]),_:1})):ue("",!0),h(wn),$("span",UX,[$("span",zX,[h(Q,null,{default:g(()=>u[5]||(u[5]=[_("print")])),_:1}),_(" "+re(Z(n).printingCount),1)]),$("span",HX,[h(Q,null,{default:g(()=>u[6]||(u[6]=[_("ac_unit")])),_:1}),_(" "+re(Z(n).operationalNotPrintingCount),1)]),$("span",jX,[h(Q,null,{default:g(()=>u[7]||(u[7]=[_("handyman")])),_:1}),_(" "+re(Z(t).maintenanceCount),1)]),$("span",qX,[h(Q,null,{default:g(()=>u[8]||(u[8]=[_("usb_off")])),_:1}),_(" "+re(Z(t).disconnectedCount),1)]),$("span",WX,[h(Q,null,{default:g(()=>u[9]||(u[9]=[_("print_disabled")])),_:1}),_(" "+re(Z(t).disabledCount),1)])]),h(se,{elevation:"2",small:"",class:"ml-6",icon:"",onClick:u[0]||(u[0]=d=>Z(tn)(Z(nn).GridSettingsDialog).openDialog())},{default:g(()=>[h(Q,null,{default:g(()=>u[10]||(u[10]=[_("settings")])),_:1})]),_:1}),$("div",GX,[h(up,{modelValue:Z(s).gridEditMode,"onUpdate:modelValue":u[1]||(u[1]=d=>Z(s).gridEditMode=d),label:"Grid Edit Mode"},null,8,["modelValue"])])]}),_:1}))}}),YX={class:"pl-1"},XX=$e({__name:"PrinterGridView",setup(e){const t=Pm(),n=Lt(),r=nr(),s=nS(),i=Zi(),o=Dt(),a=V(void 0),l=T(()=>i.hasFeature("batchReprintCalls")),u=T(()=>n.selectedPrinters.length>0),c=T(()=>n.selectedPrinters),d=V(null),f=()=>{d.value&&(d.value.value="",a.value=void 0)},p=()=>{n.clearSelectedPrinters()},v=async()=>{var P;const x=await tn(nn.BatchReprintDialog).handleAsync((P=n.selectedPrinters)==null?void 0:P.map(S=>S.id));console.log("[PrinterGridView] Dialog completed",x)},m=()=>{const x=c.value,P=x.filter(R=>r.isApiResponding(R.id));if(!a.value)return;const S=x.length-P.length;S>0&&o.openInfoMessage({title:`${S} printers inaccessible`,subtitle:"These were skipped from uploading."});const C=aM(P,a.value);s.queueUploads(C),d.value&&(d.value.value=""),p()},y=()=>{d.value&&d.value.files?a.value=d.value.files[0]:a.value=void 0},b=x=>{n.toggleSelectedPrinter(x)},w=x=>{Qt.openPrinterURL(x.printerURL)};return(x,P)=>{const S=hr("drop-upload");return D(),ge("div",null,[h(KX),Z(t).gridEditMode?ue("",!0):Bt((D(),te(oM,{key:0},{default:g(()=>[h(rt,{style:{"margin-bottom":"-5px"}},{default:g(()=>[h(Ue,{style:{padding:"5px 0 0 15px"}},{default:g(()=>[h(np,{class:"d-inline-block"},{default:g(()=>[c.value.length===0?(D(),te(_n,{key:0,size:"small"},{default:g(()=>P[6]||(P[6]=[_(" No selected printers ")])),_:1})):ue("",!0),(D(!0),ge(Pe,null,Wt(c.value,C=>(D(),te(_n,{key:C.id,closable:"",color:"primary",size:"small",onClick:R=>w(C),"onClick:close":R=>b(C)},{default:g(()=>[_(re(C.name),1)]),_:2},1032,["onClick","onClick:close"]))),128))]),_:1})]),_:1}),h(Ue,{align:"right",style:{padding:"0"}},{default:g(()=>[a.value?(D(),te(np,{key:0,class:"float-end"},{default:g(()=>[h(_n,{closable:"","onClick:close":P[0]||(P[0]=C=>f())},{default:g(()=>[_(re(a.value.name)+" ",1),$("strong",YX,re(Z(AA)(a.value.size)),1)]),_:1})]),_:1})):ue("",!0),P[12]||(P[12]=$("br",null,null,-1)),l.value?(D(),te(se,{key:1,disabled:!u.value,color:"primary",size:"x-small",onClick:P[1]||(P[1]=C=>v())},{default:g(()=>[h(Q,{class:"pr-2",size:"small"},{default:g(()=>P[7]||(P[7]=[_(" refresh ")])),_:1}),P[8]||(P[8]=_(" Batch reprint "))]),_:1},8,["disabled"])):ue("",!0),h(se,{color:u.value?"primary":"secondary",class:"ml-2",size:"x-small",onClick:P[2]||(P[2]=C=>p())},{default:g(()=>[h(Q,{class:"pr-2",size:"small"},{default:g(()=>P[9]||(P[9]=[_(" delete ")])),_:1}),_(" Clear all ("+re(c.value.length)+") ",1)]),_:1},8,["color"]),h(se,{class:"ml-2",color:"primary",size:"x-small",onClick:P[3]||(P[3]=C=>{var R;return(R=x.$refs.fileUpload)==null?void 0:R.click()})},{default:g(()=>P[10]||(P[10]=[_(" Select gcode file ")])),_:1}),h(se,{disabled:!a.value,class:"ml-2 mr-5",color:"green",size:"x-small",onClick:P[4]||(P[4]=C=>m())},{default:g(()=>P[11]||(P[11]=[_(" Upload gcode file ")])),_:1},8,["disabled"]),$("input",{ref_key:"fileUpload",ref:d,multiple:!1,accept:".gcode",style:{display:"none"},type:"file",onChange:P[5]||(P[5]=C=>y())},null,544)]),_:1})]),_:1})]),_:1})),[[S,{printers:c.value}]]),h(NX,{class:"ma-2"})])}}}),QX=$e({name:"RefreshFilesAction",components:{},props:{printer:Object},setup:()=>({printersStore:Lt()}),methods:{async getFiles(){this.printer&&await this.printersStore.loadPrinterFiles(this.printer.id)}}});function JX(e,t,n,r,s,i){return D(),te(se,{color:"secondary",onClick:t[0]||(t[0]=o=>e.getFiles())},{default:g(()=>[h(Q,null,{default:g(()=>t[1]||(t[1]=[_("refresh")])),_:1}),t[2]||(t[2]=$("span",{class:"d-none d-lg-inline"}," Refresh files ",-1))]),_:1})}const lM=Zo(QX,[["render",JX]]),ZX=$e({name:"PrinterDetails",components:{RefreshFilesAction:lM},props:{printer:Object},setup:()=>({printersStore:Lt(),printerStateStore:nr()}),data:()=>({dragging:!1}),computed:{printerId(){var e;return(e=this.printer)==null?void 0:e.id},socketState(){var e;if(this.printerId)return(e=this.printerStateStore.socketStatesById[this.printerId])==null?void 0:e.socket},apiState(){var e;if(this.printerId)return(e=this.printerStateStore.socketStatesById[this.printerId])==null?void 0:e.api},printerTextState(){var e,t,n;if(this.printerId)return(n=(t=(e=this.printerStateStore.printerEventsById[this.printerId])==null?void 0:e.current)==null?void 0:t.payload)==null?void 0:n.state.text}}});function eQ(e,t,n,r,s,i){const o=lM,a=hr("drop-upload");return e.printer?Bt((D(),te(Bn,{key:0,style:os(e.dragging?"background-color:red":""),transition:"scale-transition"},{default:g(()=>[h(rt,null,{default:g(()=>[h(Ue,null,{default:g(()=>[_(" Name: "+re(e.printer.name)+" ",1),t[0]||(t[0]=$("br",null,null,-1)),_(" URL: "+re(e.printer.printerURL)+" ",1),t[1]||(t[1]=$("br",null,null,-1)),t[2]||(t[2]=_(" Host: ")),h(_n,{size:"small"},{default:g(()=>[_(re(e.apiState),1)]),_:1}),t[3]||(t[3]=$("br",null,null,-1)),t[4]||(t[4]=_(" WebSocket: ")),h(_n,{size:"small"},{default:g(()=>[_(re(e.socketState),1)]),_:1}),t[5]||(t[5]=$("br",null,null,-1)),t[6]||(t[6]=_(" Printer: ")),h(_n,{size:"small"},{default:g(()=>[_(re(e.printerTextState),1)]),_:1})]),_:1}),h(Ue,null,{default:g(()=>[h(o,{printer:e.printer,class:"d-flex justify-end"},null,8,["printer"])]),_:1})]),_:1})]),_:1},8,["style"])),[[a,{printers:[e.printer]}]]):ue("",!0)}const tQ=Zo(ZX,[["render",eQ]]),nQ=$e({__name:"PrinterUrlAction",props:{printer:{}},setup(e){const t=e;async function n(){Qt.openPrinterURL(t.printer.printerURL)}return(r,s)=>(D(),te(nt,{location:"top"},{activator:g(({props:i})=>[h(se,me(i,{color:"secondary",rounded:"",size:"small",onClickCapture:s[0]||(s[0]=Pt(o=>n(),["stop"]))}),{default:g(()=>[h(Q,null,{default:g(()=>s[1]||(s[1]=[_("directions")])),_:1})]),_:2},1040)]),default:g(()=>s[2]||(s[2]=[_("Visit printer service")])),_:1}))}}),rQ=$e({name:"PrinterSettingsAction",props:{printer:Object},computed:{printerId(){return this.printer.id}},methods:{openSettings(){this.$emit("update:show",this.printer.id)}}});function sQ(e,t,n,r,s,i){return D(),te(nt,{location:"top"},{activator:g(({props:o})=>[h(se,me(o,{color:"secondary",class:"ma-2",size:"small",rounded:"",onClickCapture:t[0]||(t[0]=Pt(a=>e.openSettings(),["stop"]))}),{default:g(()=>[h(Q,null,{default:g(()=>t[1]||(t[1]=[_("settings")])),_:1})]),_:2},1040)]),default:g(()=>t[2]||(t[2]=[_("Update printer settings")])),_:1})}const iQ=Zo(rQ,[["render",sQ]]),oQ=ce({bordered:Boolean,color:String,content:[Number,String],dot:Boolean,floating:Boolean,icon:ze,inline:Boolean,label:{type:String,default:"$vuetify.badge"},max:[Number,String],modelValue:{type:Boolean,default:!0},offsetX:[Number,String],offsetY:[Number,String],textColor:String,...Ve(),...Ko({location:"top end"}),...$n(),...vt(),...$t(),...Mu({transition:"scale-rotate-transition"})},"VBadge"),uM=_e()({name:"VBadge",inheritAttrs:!1,props:oQ(),setup(e,t){const{backgroundColorClasses:n,backgroundColorStyles:r}=fr(Re(e,"color")),{roundedClasses:s}=Vn(e),{t:i}=Kr(),{textColorClasses:o,textColorStyles:a}=As(Re(e,"textColor")),{themeClasses:l}=sN(),{locationStyles:u}=nl(e,!0,c=>(e.floating?e.dot?2:4:e.dot?8:12)+(["top","bottom"].includes(c)?Number(e.offsetY??0):["left","right"].includes(c)?Number(e.offsetX??0):0));return Ie(()=>{const c=Number(e.content),d=!e.max||isNaN(c)?e.content:c<=Number(e.max)?c:`${e.max}+`,[f,p]=Ev(t.attrs,["aria-atomic","aria-label","aria-live","role","title"]);return h(e.tag,me({class:["v-badge",{"v-badge--bordered":e.bordered,"v-badge--dot":e.dot,"v-badge--floating":e.floating,"v-badge--inline":e.inline},e.class]},p,{style:e.style}),{default:()=>{var v,m;return[h("div",{class:"v-badge__wrapper"},[(m=(v=t.slots).default)==null?void 0:m.call(v),h(ii,{transition:e.transition},{default:()=>{var y,b;return[Bt(h("span",me({class:["v-badge__badge",l.value,n.value,s.value,o.value],style:[r.value,a.value,e.inline?{}:u.value],"aria-atomic":"true","aria-label":i(e.label,c),"aria-live":"polite",role:"status"},f),[e.dot?void 0:t.slots.badge?(b=(y=t.slots).badge)==null?void 0:b.call(y):e.icon?h(Q,{icon:e.icon},null):d]),[[Xi,e.modelValue]])]}})])]}})}),{}}}),aQ=$e({__name:"PrinterConnectionAction",props:{printer:{}},setup(e){const t=e,n=nr();function r(){return t.printer.id?n.isPrinterOperational(t.printer.id):!1}function s(){return t.printer.id?n.isPrinterPrinting(t.printer.id):!1}async function i(){if(r())return Qt.sendPrinterDisconnectCommand(t.printer.id);await Qt.sendPrinterConnectCommand(t.printer.id)}return(o,a)=>(D(),te(nt,{location:"top"},{activator:g(({props:l})=>[o.printer.enabled?(D(),te(uM,{key:0,color:r()?"green":"red",class:"pa-2"},{badge:g(()=>[r()?(D(),te(Q,{key:0},{default:g(()=>a[0]||(a[0]=[_("check")])),_:1})):(D(),te(Q,{key:1},{default:g(()=>a[1]||(a[1]=[_("close")])),_:1}))]),default:g(()=>[h(se,me({disabled:s()},l,{color:"secondary",rounded:"",size:"small",onClick:Pt(i,["stop"])}),{default:g(()=>[h(Q,null,{default:g(()=>a[2]||(a[2]=[_("usb")])),_:1})]),_:2},1040,["disabled"])]),_:2},1032,["color"])):ue("",!0)]),default:g(()=>a[3]||(a[3]=[_("Connect USB (OctoPrint only)")])),_:1}))}}),lQ=$e({__name:"PrinterQuickStopAction",props:{printer:{}},setup(e){const t=e;async function n(){confirm("Are you sure to quick stop this printer?")&&await rM.postQuickStopM112Command(t.printer.id)}return(r,s)=>(D(),te(nt,{location:"top"},{activator:g(({props:i})=>[r.printer.enabled?(D(),te(uM,{key:0,class:"ma-2"},{badge:g(()=>[h(Q,null,{default:g(()=>s[0]||(s[0]=[_("bolt")])),_:1})]),default:g(()=>[h(se,me(i,{color:"secondary",size:"small",rounded:"",onClick:Pt(n,["stop"])}),{default:g(()=>[h(Q,null,{default:g(()=>s[1]||(s[1]=[_("dangerous")])),_:1})]),_:2},1040)]),_:2},1024)):ue("",!0)]),default:g(()=>s[2]||(s[2]=[_("Perform quick stop of printer")])),_:1}))}});class cM extends vr{static async getSettings(t){const n=`${Me.getPrinterSettingsRoute(t)}`;return await this.get(n)}static async setGCodeAnalysis(t,n=!1){const r=`${Me.setPrinterSettingsGCodeAnalysisRoute(t)}`;return await this.post(r,{enabled:n})}static async syncPrinterName(t){const n=`${Me.syncPrinterNameSettingRoute(t)}`;return await this.post(n)}}const uQ=$e({__name:"SyncPrinterNameAction",props:{printer:{}},setup(e){const t=e,n=Dt();async function r(){await cM.syncPrinterName(t.printer.id),n.openInfoMessage({title:"Synced printer name to OctoPrint"})}return(s,i)=>(D(),te(nt,{location:"top"},{activator:g(({props:o})=>[h(se,me(o,{color:"secondary",size:"small",rounded:"",onClickCapture:i[0]||(i[0]=Pt(a=>r(),["stop"]))}),{default:g(()=>[h(Q,null,{default:g(()=>i[1]||(i[1]=[_("badge")])),_:1})]),_:2},1040)]),default:g(()=>i[2]||(i[2]=[_(" Set OctoPrints name to the FDM Monster Name ")])),_:1}))}}),cQ=$e({__name:"PrinterDeleteAction",props:{printer:{}},setup(e){const t=e,n=Lt(),r=nr();async function s(){confirm("Are you sure to delete this printer?")&&(await n.deletePrinter(t.printer.id),r.deletePrinterEvents(t.printer.id))}return(i,o)=>(D(),te(nt,{location:"top"},{activator:g(({props:a})=>[h(se,me(a,{class:"ms-4",color:"secondary",size:"small",rounded:"",onClick:Pt(s,["prevent","stop"])}),{default:g(()=>[h(Q,null,{default:g(()=>o[0]||(o[0]=[_("delete")])),_:1})]),_:2},1040)]),default:g(()=>o[1]||(o[1]=[_("Delete printer")])),_:1}))}});class ml extends vr{static async createGroup(t){const n=`${Me.createGroupRoute}`,r={name:t};return await this.post(n,r)}static async deleteGroup(t){const n=`${Me.deleteGroupRoute(t)}`;return await this.delete(n)}static async getGroupsWithPrinters(){const t=`${Me.printerGroupRoute}`;return await this.get(t)}static async addPrinterToGroup(t,n){const r=`${Me.addPrinterToGroupRoute(t)}`,s={printerId:n};return await this.post(r,s)}static async deletePrinterFromGroup(t,n){const r=`${Me.deletePrinterFromGroupRoute(t)}`,s={printerId:n};return await this.delete(r,s)}static async updateGroupName(t,n){const r=`${Me.updateGroupNameRoute(t)}`,s={name:n};return await this.patch(r,s)}}const dQ=(e,t,n)=>e==null||t==null?-1:e.toString().toLocaleLowerCase().indexOf(t.toString().toLocaleLowerCase()),fQ=ce({customFilter:Function,customKeyFilter:Object,filterKeys:[Array,String],filterMode:{type:String,default:"intersection"},noFilter:Boolean},"filter");function hQ(e,t,n){var a;const r=[],s=(n==null?void 0:n.default)??dQ,i=n!=null&&n.filterKeys?On(n.filterKeys):!1,o=Object.keys((n==null?void 0:n.customKeyFilter)??{}).length;if(!(e!=null&&e.length))return r;e:for(let l=0;l<e.length;l++){const[u,c=u]=On(e[l]),d={},f={};let p=-1;if((t||o>0)&&!(n!=null&&n.noFilter)){if(typeof u=="object"){const y=i||Object.keys(c);for(const b of y){const w=Xn(c,b),x=(a=n==null?void 0:n.customKeyFilter)==null?void 0:a[b];if(p=x?x(w,t,u):s(w,t,u),p!==-1&&p!==!1)x?d[b]=p:f[b]=p;else if((n==null?void 0:n.filterMode)==="every")continue e}}else p=s(u,t,u),p!==-1&&p!==!1&&(f.title=p);const v=Object.keys(f).length,m=Object.keys(d).length;if(!v&&!m||(n==null?void 0:n.filterMode)==="union"&&m!==o&&!v||(n==null?void 0:n.filterMode)==="intersection"&&(m!==o||!v))continue}r.push({index:l,matches:{...f,...d}})}return r}function pQ(e,t,n,r){const s=Ae([]),i=Ae(new Map),o=T(()=>r!=null&&r.transform?Z(t).map(l=>[l,r.transform(l)]):Z(t));Mn(()=>{const l=typeof n=="function"?n():Z(n),u=typeof l!="string"&&typeof l!="number"?"":String(l),c=hQ(o.value,u,{customKeyFilter:{...e.customKeyFilter,...Z(r==null?void 0:r.customKeyFilter)},default:e.customFilter,filterKeys:e.filterKeys,filterMode:e.filterMode,noFilter:e.noFilter}),d=Z(t),f=[],p=new Map;c.forEach(v=>{let{index:m,matches:y}=v;const b=d[m];f.push(b),p.set(b.value,y)}),s.value=f,i.value=p});function a(l){return i.value.get(l.value)}return{filteredItems:s,filteredMatches:i,getMatches:a}}const mQ=ce({expandOnClick:Boolean,showExpand:Boolean,expanded:{type:Array,default:()=>[]}},"DataTable-expand"),dM=Symbol.for("vuetify:datatable:expanded");function gQ(e){const t=Re(e,"expandOnClick"),n=st(e,"expanded",e.expanded,a=>new Set(a),a=>[...a.values()]);function r(a,l){const u=new Set(n.value);l?u.add(a.value):u.delete(a.value),n.value=u}function s(a){return n.value.has(a.value)}function i(a){r(a,!s(a))}const o={expand:r,expanded:n,expandOnClick:t,isExpanded:s,toggleExpand:i};return Gt(dM,o),o}function fM(){const e=Xe(dM);if(!e)throw new Error("foo");return e}const vQ=ce({groupBy:{type:Array,default:()=>[]}},"DataTable-group"),hM=Symbol.for("vuetify:data-table-group");function yQ(e){return{groupBy:st(e,"groupBy")}}function bQ(e){const{disableSort:t,groupBy:n,sortBy:r}=e,s=V(new Set),i=T(()=>n.value.map(c=>({...c,order:c.order??!1})).concat(t!=null&&t.value?[]:r.value));function o(c){return s.value.has(c.id)}function a(c){const d=new Set(s.value);o(c)?d.delete(c.id):d.add(c.id),s.value=d}function l(c){function d(f){const p=[];for(const v of f.items)"type"in v&&v.type==="group"?p.push(...d(v)):p.push(v);return[...new Set(p)]}return d({type:"group",items:c,id:"dummy",key:"dummy",value:"dummy",depth:0})}const u={sortByWithGroups:i,toggleGroup:a,opened:s,groupBy:n,extractRows:l,isGroupOpen:o};return Gt(hM,u),u}function pM(){const e=Xe(hM);if(!e)throw new Error("Missing group!");return e}function wQ(e,t){if(!e.length)return[];const n=new Map;for(const r of e){const s=Ua(r.raw,t);n.has(s)||n.set(s,[]),n.get(s).push(r)}return n}function mM(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"root";if(!t.length)return[];const s=wQ(e,t[0]),i=[],o=t.slice(1);return s.forEach((a,l)=>{const u=t[0],c=`${r}_${u}_${l}`;i.push({depth:n,id:c,key:u,value:l,items:o.length?mM(a,o,n+1,c):a,type:"group"})}),i}function gM(e,t){const n=[];for(const r of e)"type"in r&&r.type==="group"?(r.value!=null&&n.push(r),(t.has(r.id)||r.value==null)&&n.push(...gM(r.items,t))):n.push(r);return n}function SQ(e,t,n){return{flatItems:T(()=>{if(!t.value.length)return e.value;const s=mM(e.value,t.value.map(i=>i.key));return gM(s,n.value)})}}function _Q(e){let{page:t,itemsPerPage:n,sortBy:r,groupBy:s,search:i}=e;const o=on("VDataTable"),a=T(()=>({page:t.value,itemsPerPage:n.value,sortBy:r.value,groupBy:s.value,search:i.value}));let l=null;ke(a,()=>{Rs(l,a.value)||(l&&l.search!==a.value.search&&(t.value=1),o.emit("update:options",a.value),l=a.value)},{deep:!0,immediate:!0})}const kQ=ce({page:{type:[Number,String],default:1},itemsPerPage:{type:[Number,String],default:10}},"DataTable-paginate"),vM=Symbol.for("vuetify:data-table-pagination");function xQ(e){const t=st(e,"page",void 0,r=>Number(r??1)),n=st(e,"itemsPerPage",void 0,r=>Number(r??10));return{page:t,itemsPerPage:n}}function EQ(e){const{page:t,itemsPerPage:n,itemsLength:r}=e,s=T(()=>n.value===-1?0:n.value*(t.value-1)),i=T(()=>n.value===-1?r.value:Math.min(r.value,s.value+n.value)),o=T(()=>n.value===-1||r.value===0?1:Math.ceil(r.value/n.value));ke([t,o],()=>{t.value>o.value&&(t.value=o.value)});function a(f){n.value=f,t.value=1}function l(){t.value=Pr(t.value+1,1,o.value)}function u(){t.value=Pr(t.value-1,1,o.value)}function c(f){t.value=Pr(f,1,o.value)}const d={page:t,itemsPerPage:n,startIndex:s,stopIndex:i,pageCount:o,itemsLength:r,nextPage:l,prevPage:u,setPage:c,setItemsPerPage:a};return Gt(vM,d),d}function CQ(){const e=Xe(vM);if(!e)throw new Error("Missing pagination!");return e}function PQ(e){const t=on("usePaginatedItems"),{items:n,startIndex:r,stopIndex:s,itemsPerPage:i}=e,o=T(()=>i.value<=0?n.value:n.value.slice(r.value,s.value));return ke(o,a=>{t.emit("update:currentItems",a)},{immediate:!0}),{paginatedItems:o}}const TQ={showSelectAll:!1,allSelected:()=>[],select:e=>{var r;let{items:t,value:n}=e;return new Set(n?[(r=t[0])==null?void 0:r.value]:[])},selectAll:e=>{let{selected:t}=e;return t}},yM={showSelectAll:!0,allSelected:e=>{let{currentPage:t}=e;return t},select:e=>{let{items:t,value:n,selected:r}=e;for(const s of t)n?r.add(s.value):r.delete(s.value);return r},selectAll:e=>{let{value:t,currentPage:n,selected:r}=e;return yM.select({items:n,value:t,selected:r})}},bM={showSelectAll:!0,allSelected:e=>{let{allItems:t}=e;return t},select:e=>{let{items:t,value:n,selected:r}=e;for(const s of t)n?r.add(s.value):r.delete(s.value);return r},selectAll:e=>{let{value:t,allItems:n,selected:r}=e;return bM.select({items:n,value:t,selected:r})}},RQ=ce({showSelect:Boolean,selectStrategy:{type:[String,Object],default:"page"},modelValue:{type:Array,default:()=>[]},valueComparator:{type:Function,default:Rs}},"DataTable-select"),wM=Symbol.for("vuetify:data-table-selection");function IQ(e,t){let{allItems:n,currentPage:r}=t;const s=st(e,"modelValue",e.modelValue,b=>new Set(On(b).map(w=>{var x;return((x=n.value.find(P=>e.valueComparator(w,P.value)))==null?void 0:x.value)??w})),b=>[...b.values()]),i=T(()=>n.value.filter(b=>b.selectable)),o=T(()=>r.value.filter(b=>b.selectable)),a=T(()=>{if(typeof e.selectStrategy=="object")return e.selectStrategy;switch(e.selectStrategy){case"single":return TQ;case"all":return bM;case"page":default:return yM}});function l(b){return On(b).every(w=>s.value.has(w.value))}function u(b){return On(b).some(w=>s.value.has(w.value))}function c(b,w){const x=a.value.select({items:b,value:w,selected:new Set(s.value)});s.value=x}function d(b){c([b],!l([b]))}function f(b){const w=a.value.selectAll({value:b,allItems:i.value,currentPage:o.value,selected:new Set(s.value)});s.value=w}const p=T(()=>s.value.size>0),v=T(()=>{const b=a.value.allSelected({allItems:i.value,currentPage:o.value});return!!b.length&&l(b)}),m=T(()=>a.value.showSelectAll),y={toggleSelect:d,select:c,selectAll:f,isSelected:l,isSomeSelected:u,someSelected:p,allSelected:v,showSelectAll:m};return Gt(wM,y),y}function Tm(){const e=Xe(wM);if(!e)throw new Error("Missing selection!");return e}const AQ=ce({sortBy:{type:Array,default:()=>[]},customKeySort:Object,multiSort:Boolean,mustSort:Boolean},"DataTable-sort"),SM=Symbol.for("vuetify:data-table-sort");function OQ(e){const t=st(e,"sortBy"),n=Re(e,"mustSort"),r=Re(e,"multiSort");return{sortBy:t,mustSort:n,multiSort:r}}function MQ(e){const{sortBy:t,mustSort:n,multiSort:r,page:s}=e,i=l=>{if(l.key==null)return;let u=t.value.map(d=>({...d}))??[];const c=u.find(d=>d.key===l.key);c?c.order==="desc"?n.value&&u.length===1?c.order="asc":u=u.filter(d=>d.key!==l.key):c.order="desc":r.value?u.push({key:l.key,order:"asc"}):u=[{key:l.key,order:"asc"}],t.value=u,s&&(s.value=1)};function o(l){return!!t.value.find(u=>u.key===l.key)}const a={sortBy:t,toggleSort:i,isSorted:o};return Gt(SM,a),a}function _M(){const e=Xe(SM);if(!e)throw new Error("Missing sort!");return e}function DQ(e,t,n,r){const s=Kr();return{sortedItems:T(()=>{var o,a;return n.value.length?$Q(t.value,n.value,s.current.value,{transform:r==null?void 0:r.transform,sortFunctions:{...e.customKeySort,...(o=r==null?void 0:r.sortFunctions)==null?void 0:o.value},sortRawFunctions:(a=r==null?void 0:r.sortRawFunctions)==null?void 0:a.value}):t.value})}}function $Q(e,t,n,r){const s=new Intl.Collator(n,{sensitivity:"accent",usage:"sort"});return e.map(o=>[o,r!=null&&r.transform?r.transform(o):o]).sort((o,a)=>{var l,u;for(let c=0;c<t.length;c++){let d=!1;const f=t[c].key,p=t[c].order??"asc";if(p===!1)continue;let v=Ua(o[1],f),m=Ua(a[1],f),y=o[0].raw,b=a[0].raw;if(p==="desc"&&([v,m]=[m,v],[y,b]=[b,y]),(l=r==null?void 0:r.sortRawFunctions)!=null&&l[f]){const w=r.sortRawFunctions[f](y,b);if(w==null)continue;if(d=!0,w)return w}if((u=r==null?void 0:r.sortFunctions)!=null&&u[f]){const w=r.sortFunctions[f](v,m);if(w==null)continue;if(d=!0,w)return w}if(!d){if(v instanceof Date&&m instanceof Date)return v.getTime()-m.getTime();if([v,m]=[v,m].map(w=>w!=null?w.toString().toLocaleLowerCase():w),v!==m)return tf(v)&&tf(m)?0:tf(v)?-1:tf(m)?1:!isNaN(v)&&!isNaN(m)?Number(v)-Number(m):s.compare(v,m)}}return 0}).map(o=>{let[a]=o;return a})}function FQ(){const e=V([]);CC(()=>e.value=[]);function t(n,r){e.value[r]=n}return{refs:e,updateRef:t}}const LQ=ce({activeColor:String,start:{type:[Number,String],default:1},modelValue:{type:Number,default:e=>e.start},disabled:Boolean,length:{type:[Number,String],default:1,validator:e=>e%1===0},totalVisible:[Number,String],firstIcon:{type:ze,default:"$first"},prevIcon:{type:ze,default:"$prev"},nextIcon:{type:ze,default:"$next"},lastIcon:{type:ze,default:"$last"},ariaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.root"},pageAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.page"},currentPageAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.currentPage"},firstAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.first"},previousAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.previous"},nextAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.next"},lastAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.last"},ellipsis:{type:String,default:"..."},showFirstLastPage:Boolean,...ms(),...Ve(),...Ar(),...vs(),...$n(),...Tu(),...vt({tag:"nav"}),...$t(),...Fs({variant:"text"})},"VPagination"),Vk=_e()({name:"VPagination",props:LQ(),emits:{"update:modelValue":e=>!0,first:e=>!0,prev:e=>!0,next:e=>!0,last:e=>!0},setup(e,t){let{slots:n,emit:r}=t;const s=st(e,"modelValue"),{t:i,n:o}=Kr(),{isRtl:a}=Dr(),{themeClasses:l}=Yt(e),{width:u}=pi(),c=Ae(-1);Ir(void 0,{scoped:!0});const{resizeRef:d}=za(k=>{if(!k.length)return;const{target:E,contentRect:I}=k[0],A=E.querySelector(".v-pagination__list > *");if(!A)return;const O=I.width,L=A.offsetWidth+parseFloat(getComputedStyle(A).marginRight)*2;c.value=m(O,L)}),f=T(()=>parseInt(e.length,10)),p=T(()=>parseInt(e.start,10)),v=T(()=>e.totalVisible!=null?parseInt(e.totalVisible,10):c.value>=0?c.value:m(u.value,58));function m(k,E){const I=e.showFirstLastPage?5:3;return Math.max(0,Math.floor(Number(((k-E*I)/E).toFixed(2))))}const y=T(()=>{if(f.value<=0||isNaN(f.value)||f.value>Number.MAX_SAFE_INTEGER)return[];if(v.value<=0)return[];if(v.value===1)return[s.value];if(f.value<=v.value)return El(f.value,p.value);const k=v.value%2===0,E=k?v.value/2:Math.floor(v.value/2),I=k?E:E+1,A=f.value-E;if(I-s.value>=0)return[...El(Math.max(1,v.value-1),p.value),e.ellipsis,f.value];if(s.value-A>=(k?1:0)){const O=v.value-1,L=f.value-O+p.value;return[p.value,e.ellipsis,...El(O,L)]}else{const O=Math.max(1,v.value-2),L=O===1?s.value:s.value-Math.ceil(O/2)+p.value;return[p.value,e.ellipsis,...El(O,L),e.ellipsis,f.value]}});function b(k,E,I){k.preventDefault(),s.value=E,I&&r(I,E)}const{refs:w,updateRef:x}=FQ();Ir({VPaginationBtn:{color:Re(e,"color"),border:Re(e,"border"),density:Re(e,"density"),size:Re(e,"size"),variant:Re(e,"variant"),rounded:Re(e,"rounded"),elevation:Re(e,"elevation")}});const P=T(()=>y.value.map((k,E)=>{const I=A=>x(A,E);if(typeof k=="string")return{isActive:!1,key:`ellipsis-${E}`,page:k,props:{ref:I,ellipsis:!0,icon:!0,disabled:!0}};{const A=k===s.value;return{isActive:A,key:k,page:o(k),props:{ref:I,ellipsis:!1,icon:!0,disabled:!!e.disabled||Number(e.length)<2,color:A?e.activeColor:e.color,"aria-current":A,"aria-label":i(A?e.currentPageAriaLabel:e.pageAriaLabel,k),onClick:O=>b(O,k)}}}})),S=T(()=>{const k=!!e.disabled||s.value<=p.value,E=!!e.disabled||s.value>=p.value+f.value-1;return{first:e.showFirstLastPage?{icon:a.value?e.lastIcon:e.firstIcon,onClick:I=>b(I,p.value,"first"),disabled:k,"aria-label":i(e.firstAriaLabel),"aria-disabled":k}:void 0,prev:{icon:a.value?e.nextIcon:e.prevIcon,onClick:I=>b(I,s.value-1,"prev"),disabled:k,"aria-label":i(e.previousAriaLabel),"aria-disabled":k},next:{icon:a.value?e.prevIcon:e.nextIcon,onClick:I=>b(I,s.value+1,"next"),disabled:E,"aria-label":i(e.nextAriaLabel),"aria-disabled":E},last:e.showFirstLastPage?{icon:a.value?e.firstIcon:e.lastIcon,onClick:I=>b(I,p.value+f.value-1,"last"),disabled:E,"aria-label":i(e.lastAriaLabel),"aria-disabled":E}:void 0}});function C(){var E;const k=s.value-p.value;(E=w.value[k])==null||E.$el.focus()}function R(k){k.key===__.left&&!e.disabled&&s.value>Number(e.start)?(s.value=s.value-1,Mt(C)):k.key===__.right&&!e.disabled&&s.value<p.value+f.value-1&&(s.value=s.value+1,Mt(C))}return Ie(()=>h(e.tag,{ref:d,class:["v-pagination",l.value,e.class],style:e.style,role:"navigation","aria-label":i(e.ariaLabel),onKeydown:R,"data-test":"v-pagination-root"},{default:()=>[h("ul",{class:"v-pagination__list"},[e.showFirstLastPage&&h("li",{key:"first",class:"v-pagination__first","data-test":"v-pagination-first"},[n.first?n.first(S.value.first):h(se,me({_as:"VPaginationBtn"},S.value.first),null)]),h("li",{key:"prev",class:"v-pagination__prev","data-test":"v-pagination-prev"},[n.prev?n.prev(S.value.prev):h(se,me({_as:"VPaginationBtn"},S.value.prev),null)]),P.value.map((k,E)=>h("li",{key:k.key,class:["v-pagination__item",{"v-pagination__item--is-active":k.isActive}],"data-test":"v-pagination-item"},[n.item?n.item(k):h(se,me({_as:"VPaginationBtn"},k.props),{default:()=>[k.page]})])),h("li",{key:"next",class:"v-pagination__next","data-test":"v-pagination-next"},[n.next?n.next(S.value.next):h(se,me({_as:"VPaginationBtn"},S.value.next),null)]),e.showFirstLastPage&&h("li",{key:"last",class:"v-pagination__last","data-test":"v-pagination-last"},[n.last?n.last(S.value.last):h(se,me({_as:"VPaginationBtn"},S.value.last),null)])])]})),{}}}),kM=ce({prevIcon:{type:ze,default:"$prev"},nextIcon:{type:ze,default:"$next"},firstIcon:{type:ze,default:"$first"},lastIcon:{type:ze,default:"$last"},itemsPerPageText:{type:String,default:"$vuetify.dataFooter.itemsPerPageText"},pageText:{type:String,default:"$vuetify.dataFooter.pageText"},firstPageLabel:{type:String,default:"$vuetify.dataFooter.firstPage"},prevPageLabel:{type:String,default:"$vuetify.dataFooter.prevPage"},nextPageLabel:{type:String,default:"$vuetify.dataFooter.nextPage"},lastPageLabel:{type:String,default:"$vuetify.dataFooter.lastPage"},itemsPerPageOptions:{type:Array,default:()=>[{value:10,title:"10"},{value:25,title:"25"},{value:50,title:"50"},{value:100,title:"100"},{value:-1,title:"$vuetify.dataFooter.itemsPerPageAll"}]},showCurrentPage:Boolean},"VDataTableFooter"),Uk=_e()({name:"VDataTableFooter",props:kM(),setup(e,t){let{slots:n}=t;const{t:r}=Kr(),{page:s,pageCount:i,startIndex:o,stopIndex:a,itemsLength:l,itemsPerPage:u,setItemsPerPage:c}=CQ(),d=T(()=>e.itemsPerPageOptions.map(f=>typeof f=="number"?{value:f,title:f===-1?r("$vuetify.dataFooter.itemsPerPageAll"):String(f)}:{...f,title:isNaN(Number(f.title))?r(f.title):f.title}));return Ie(()=>{var p;const f=Vk.filterProps(e);return h("div",{class:"v-data-table-footer"},[(p=n.prepend)==null?void 0:p.call(n),h("div",{class:"v-data-table-footer__items-per-page"},[h("span",null,[r(e.itemsPerPageText)]),h(Vo,{items:d.value,modelValue:u.value,"onUpdate:modelValue":v=>c(Number(v)),density:"compact",variant:"outlined","hide-details":!0},null)]),h("div",{class:"v-data-table-footer__info"},[h("div",null,[r(e.pageText,l.value?o.value+1:0,a.value,l.value)])]),h("div",{class:"v-data-table-footer__pagination"},[h(Vk,me({modelValue:s.value,"onUpdate:modelValue":v=>s.value=v,density:"comfortable","first-aria-label":e.firstPageLabel,"last-aria-label":e.lastPageLabel,length:i.value,"next-aria-label":e.nextPageLabel,"previous-aria-label":e.prevPageLabel,rounded:!0,"show-first-last-page":!0,"total-visible":e.showCurrentPage?1:0,variant:"plain"},f),null)])])}),{}}}),cp=XL({align:{type:String,default:"start"},fixed:Boolean,fixedOffset:[Number,String],height:[Number,String],lastFixed:Boolean,noPadding:Boolean,tag:String,width:[Number,String],maxWidth:[Number,String],nowrap:Boolean},(e,t)=>{let{slots:n}=t;const r=e.tag??"td";return h(r,{class:["v-data-table__td",{"v-data-table-column--fixed":e.fixed,"v-data-table-column--last-fixed":e.lastFixed,"v-data-table-column--no-padding":e.noPadding,"v-data-table-column--nowrap":e.nowrap},`v-data-table-column--align-${e.align}`],style:{height:Le(e.height),width:Le(e.width),maxWidth:Le(e.maxWidth),left:Le(e.fixedOffset||null)}},{default:()=>{var s;return[(s=n.default)==null?void 0:s.call(n)]}})}),NQ=ce({headers:Array},"DataTable-header"),xM=Symbol.for("vuetify:data-table-headers"),EM={title:"",sortable:!1},BQ={...EM,width:48};function VQ(){const t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).map(n=>({element:n,priority:0}));return{enqueue:(n,r)=>{let s=!1;for(let i=0;i<t.length;i++)if(t[i].priority>r){t.splice(i,0,{element:n,priority:r}),s=!0;break}s||t.push({element:n,priority:r})},size:()=>t.length,count:()=>{let n=0;if(!t.length)return 0;const r=Math.floor(t[0].priority);for(let s=0;s<t.length;s++)Math.floor(t[s].priority)===r&&(n+=1);return n},dequeue:()=>t.shift()}}function Jy(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(!e.children)t.push(e);else for(const n of e.children)Jy(n,t);return t}function CM(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Set;for(const n of e)n.key&&t.add(n.key),n.children&&CM(n.children,t);return t}function UQ(e){if(e.key){if(e.key==="data-table-group")return EM;if(["data-table-expand","data-table-select"].includes(e.key))return BQ}}function sS(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.children?Math.max(t,...e.children.map(n=>sS(n,t+1))):t}function zQ(e){let t=!1;function n(i){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(i)if(o&&(i.fixed=!0),i.fixed)if(i.children)for(let a=i.children.length-1;a>=0;a--)n(i.children[a],!0);else t?isNaN(Number(i.width))?(`${i.key}`,void 0):i.minWidth=Math.max(Number(i.width)||0,Number(i.minWidth)||0):i.lastFixed=!0,t=!0;else if(i.children)for(let a=i.children.length-1;a>=0;a--)n(i.children[a]);else t=!1}for(let i=e.length-1;i>=0;i--)n(e[i]);function r(i){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!i)return o;if(i.children){i.fixedOffset=o;for(const a of i.children)o=r(a,o)}else i.fixed&&(i.fixedOffset=o,o+=parseFloat(i.width||"0")||0);return o}let s=0;for(const i of e)s=r(i,s)}function HQ(e,t){const n=[];let r=0;const s=VQ(e);for(;s.size()>0;){let o=s.count();const a=[];let l=1;for(;o>0;){const{element:u,priority:c}=s.dequeue(),d=t-r-sS(u);if(a.push({...u,rowspan:d??1,colspan:u.children?Jy(u).length:1}),u.children)for(const f of u.children){const p=c%1+l/Math.pow(10,r+2);s.enqueue(f,r+d+p)}l+=1,o-=1}r+=1,n.push(a)}return{columns:e.map(o=>Jy(o)).flat(),headers:n}}function PM(e){const t=[];for(const n of e){const r={...UQ(n),...n},s=r.key??(typeof r.value=="string"?r.value:null),i=r.value??s??null,o={...r,key:s,value:i,sortable:r.sortable??(r.key!=null||!!r.sort),children:r.children?PM(r.children):void 0};t.push(o)}return t}function jQ(e,t){const n=V([]),r=V([]),s=V({}),i=V({}),o=V({});Mn(()=>{var m,y,b;const u=(e.headers||Object.keys(e.items[0]??{}).map(w=>({key:w,title:fi(w)}))).slice(),c=CM(u);(m=t==null?void 0:t.groupBy)!=null&&m.value.length&&!c.has("data-table-group")&&u.unshift({key:"data-table-group",title:"Group"}),(y=t==null?void 0:t.showSelect)!=null&&y.value&&!c.has("data-table-select")&&u.unshift({key:"data-table-select"}),(b=t==null?void 0:t.showExpand)!=null&&b.value&&!c.has("data-table-expand")&&u.push({key:"data-table-expand"});const d=PM(u);zQ(d);const f=Math.max(...d.map(w=>sS(w)))+1,p=HQ(d,f);n.value=p.headers,r.value=p.columns;const v=p.headers.flat(1);for(const w of v)w.key&&(w.sortable&&(w.sort&&(s.value[w.key]=w.sort),w.sortRaw&&(i.value[w.key]=w.sortRaw)),w.filter&&(o.value[w.key]=w.filter))});const a={headers:n,columns:r,sortFunctions:s,sortRawFunctions:i,filterFunctions:o};return Gt(xM,a),a}function Rm(){const e=Xe(xM);if(!e)throw new Error("Missing headers!");return e}const TM=ce({color:String,disableSort:Boolean,fixedHeader:Boolean,multiSort:Boolean,sortAscIcon:{type:ze,default:"$sortAsc"},sortDescIcon:{type:ze,default:"$sortDesc"},headerProps:{type:Object},sticky:Boolean,...rl(),...Bp()},"VDataTableHeaders"),zk=_e()({name:"VDataTableHeaders",props:TM(),setup(e,t){let{slots:n}=t;const{t:r}=Kr(),{toggleSort:s,sortBy:i,isSorted:o}=_M(),{someSelected:a,allSelected:l,selectAll:u,showSelectAll:c}=Tm(),{columns:d,headers:f}=Rm(),{loaderClasses:p}=Id(e);function v(k,E){if(!(!(e.sticky||e.fixedHeader)&&!k.fixed))return{position:"sticky",left:k.fixed?Le(k.fixedOffset):void 0,top:e.sticky||e.fixedHeader?`calc(var(--v-table-header-height) * ${E})`:void 0}}function m(k){const E=i.value.find(I=>I.key===k.key);return E?E.order==="asc"?e.sortAscIcon:e.sortDescIcon:e.sortAscIcon}const{backgroundColorClasses:y,backgroundColorStyles:b}=fr(e,"color"),{displayClasses:w,mobile:x}=pi(e),P=T(()=>({headers:f.value,columns:d.value,toggleSort:s,isSorted:o,sortBy:i.value,someSelected:a.value,allSelected:l.value,selectAll:u,getSortIcon:m})),S=T(()=>["v-data-table__th",{"v-data-table__th--sticky":e.sticky||e.fixedHeader},w.value,p.value]),C=k=>{let{column:E,x:I,y:A}=k;const O=E.key==="data-table-select"||E.key==="data-table-expand",L=me(e.headerProps??{},E.headerProps??{});return h(cp,me({tag:"th",align:E.align,class:[{"v-data-table__th--sortable":E.sortable&&!e.disableSort,"v-data-table__th--sorted":o(E),"v-data-table__th--fixed":E.fixed},...S.value],style:{width:Le(E.width),minWidth:Le(E.minWidth),maxWidth:Le(E.maxWidth),...v(E,A)},colspan:E.colspan,rowspan:E.rowspan,onClick:E.sortable?()=>s(E):void 0,fixed:E.fixed,nowrap:E.nowrap,lastFixed:E.lastFixed,noPadding:O},L),{default:()=>{var H;const M=`header.${E.key}`,z={column:E,selectAll:u,isSorted:o,toggleSort:s,sortBy:i.value,someSelected:a.value,allSelected:l.value,getSortIcon:m};return n[M]?n[M](z):E.key==="data-table-select"?((H=n["header.data-table-select"])==null?void 0:H.call(n,z))??(c.value&&h(yu,{modelValue:l.value,indeterminate:a.value&&!l.value,"onUpdate:modelValue":u},null)):h("div",{class:"v-data-table-header__content"},[h("span",null,[E.title]),E.sortable&&!e.disableSort&&h(Q,{key:"icon",class:"v-data-table-header__sort-icon",icon:m(E)},null),e.multiSort&&o(E)&&h("div",{key:"badge",class:["v-data-table-header__sort-badge",...y.value],style:b.value},[i.value.findIndex(G=>G.key===E.key)+1])])}})},R=()=>{const k=me(e.headerProps??{}??{}),E=T(()=>d.value.filter(A=>(A==null?void 0:A.sortable)&&!e.disableSort)),I=T(()=>{if(d.value.find(O=>O.key==="data-table-select")!=null)return l.value?"$checkboxOn":a.value?"$checkboxIndeterminate":"$checkboxOff"});return h(cp,me({tag:"th",class:[...S.value],colspan:f.value.length+1},k),{default:()=>[h("div",{class:"v-data-table-header__content"},[h(Vo,{chips:!0,class:"v-data-table__td-sort-select",clearable:!0,density:"default",items:E.value,label:r("$vuetify.dataTable.sortBy"),multiple:e.multiSort,variant:"underlined","onClick:clear":()=>i.value=[],appendIcon:I.value,"onClick:append":()=>u(!l.value)},{...n,chip:A=>{var O;return h(_n,{onClick:(O=A.item.raw)!=null&&O.sortable?()=>s(A.item.raw):void 0,onMousedown:L=>{L.preventDefault(),L.stopPropagation()}},{default:()=>[A.item.title,h(Q,{class:["v-data-table__td-sort-icon",o(A.item.raw)&&"v-data-table__td-sort-icon-active"],icon:m(A.item.raw),size:"small"},null)]})}})])]})};Ie(()=>x.value?h("tr",null,[h(R,null,null)]):h(Pe,null,[n.headers?n.headers(P.value):f.value.map((k,E)=>h("tr",null,[k.map((I,A)=>h(C,{column:I,x:A,y:E},null))])),e.loading&&h("tr",{class:"v-data-table-progress"},[h("th",{colspan:d.value.length},[h(Vp,{name:"v-data-table-progress",absolute:!0,active:!0,color:typeof e.loading=="boolean"?void 0:e.loading,indeterminate:!0},{default:n.loader})])])]))}}),qQ=ce({item:{type:Object,required:!0}},"VDataTableGroupHeaderRow"),WQ=_e()({name:"VDataTableGroupHeaderRow",props:qQ(),setup(e,t){let{slots:n}=t;const{isGroupOpen:r,toggleGroup:s,extractRows:i}=pM(),{isSelected:o,isSomeSelected:a,select:l}=Tm(),{columns:u}=Rm(),c=T(()=>i([e.item]));return()=>h("tr",{class:"v-data-table-group-header-row",style:{"--v-data-table-group-header-row-depth":e.item.depth}},[u.value.map(d=>{var f,p;if(d.key==="data-table-group"){const v=r(e.item)?"$expand":"$next",m=()=>s(e.item);return((f=n["data-table-group"])==null?void 0:f.call(n,{item:e.item,count:c.value.length,props:{icon:v,onClick:m}}))??h(cp,{class:"v-data-table-group-header-row__column"},{default:()=>[h(se,{size:"small",variant:"text",icon:v,onClick:m},null),h("span",null,[e.item.value]),h("span",null,[_("("),c.value.length,_(")")])]})}if(d.key==="data-table-select"){const v=o(c.value),m=a(c.value)&&!v,y=b=>l(c.value,b);return((p=n["data-table-select"])==null?void 0:p.call(n,{props:{modelValue:v,indeterminate:m,"onUpdate:modelValue":y}}))??h("td",null,[h(yu,{modelValue:v,indeterminate:m,"onUpdate:modelValue":y},null)])}return h("td",null,null)})])}}),GQ=ce({index:Number,item:Object,cellProps:[Object,Function],onClick:Nn(),onContextmenu:Nn(),onDblclick:Nn(),...rl()},"VDataTableRow"),KQ=_e()({name:"VDataTableRow",props:GQ(),setup(e,t){let{slots:n}=t;const{displayClasses:r,mobile:s}=pi(e,"v-data-table__tr"),{isSelected:i,toggleSelect:o,someSelected:a,allSelected:l,selectAll:u}=Tm(),{isExpanded:c,toggleExpand:d}=fM(),{toggleSort:f,sortBy:p,isSorted:v}=_M(),{columns:m}=Rm();Ie(()=>h("tr",{class:["v-data-table__tr",{"v-data-table__tr--clickable":!!(e.onClick||e.onContextmenu||e.onDblclick)},r.value],onClick:e.onClick,onContextmenu:e.onContextmenu,onDblclick:e.onDblclick},[e.item&&m.value.map((y,b)=>{const w=e.item,x=`item.${y.key}`,P=`header.${y.key}`,S={index:e.index,item:w.raw,internalItem:w,value:Ua(w.columns,y.key),column:y,isSelected:i,toggleSelect:o,isExpanded:c,toggleExpand:d},C={column:y,selectAll:u,isSorted:v,toggleSort:f,sortBy:p.value,someSelected:a.value,allSelected:l.value,getSortIcon:()=>""},R=typeof e.cellProps=="function"?e.cellProps({index:S.index,item:S.item,internalItem:S.internalItem,value:S.value,column:y}):e.cellProps,k=typeof y.cellProps=="function"?y.cellProps({index:S.index,item:S.item,internalItem:S.internalItem,value:S.value}):y.cellProps;return h(cp,me({align:y.align,class:{"v-data-table__td--expanded-row":y.key==="data-table-expand","v-data-table__td--select-row":y.key==="data-table-select"},fixed:y.fixed,fixedOffset:y.fixedOffset,lastFixed:y.lastFixed,maxWidth:s.value?void 0:y.maxWidth,noPadding:y.key==="data-table-select"||y.key==="data-table-expand",nowrap:y.nowrap,width:s.value?void 0:y.width},R,k),{default:()=>{var I,A,O,L,M;if(n[x]&&!s.value)return(I=n[x])==null?void 0:I.call(n,S);if(y.key==="data-table-select")return((A=n["item.data-table-select"])==null?void 0:A.call(n,S))??h(yu,{disabled:!w.selectable,modelValue:i([w]),onClick:Pt(()=>o(w),["stop"])},null);if(y.key==="data-table-expand")return((O=n["item.data-table-expand"])==null?void 0:O.call(n,S))??h(se,{icon:c(w)?"$collapse":"$expand",size:"small",variant:"text",onClick:Pt(()=>d(w),["stop"])},null);const E=re(S.value);return s.value?h(Pe,null,[h("div",{class:"v-data-table__td-title"},[((L=n[P])==null?void 0:L.call(n,C))??y.title]),h("div",{class:"v-data-table__td-value"},[((M=n[x])==null?void 0:M.call(n,S))??E])]):E}})})]))}}),RM=ce({loading:[Boolean,String],loadingText:{type:String,default:"$vuetify.dataIterator.loadingText"},hideNoData:Boolean,items:{type:Array,default:()=>[]},noDataText:{type:String,default:"$vuetify.noDataText"},rowProps:[Object,Function],cellProps:[Object,Function],...rl()},"VDataTableRows"),Hk=_e()({name:"VDataTableRows",inheritAttrs:!1,props:RM(),setup(e,t){let{attrs:n,slots:r}=t;const{columns:s}=Rm(),{expandOnClick:i,toggleExpand:o,isExpanded:a}=fM(),{isSelected:l,toggleSelect:u}=Tm(),{toggleGroup:c,isGroupOpen:d}=pM(),{t:f}=Kr(),{mobile:p}=pi(e);return Ie(()=>{var v,m;return e.loading&&(!e.items.length||r.loading)?h("tr",{class:"v-data-table-rows-loading",key:"loading"},[h("td",{colspan:s.value.length},[((v=r.loading)==null?void 0:v.call(r))??f(e.loadingText)])]):!e.loading&&!e.items.length&&!e.hideNoData?h("tr",{class:"v-data-table-rows-no-data",key:"no-data"},[h("td",{colspan:s.value.length},[((m=r["no-data"])==null?void 0:m.call(r))??f(e.noDataText)])]):h(Pe,null,[e.items.map((y,b)=>{var P;if(y.type==="group"){const S={index:b,item:y,columns:s.value,isExpanded:a,toggleExpand:o,isSelected:l,toggleSelect:u,toggleGroup:c,isGroupOpen:d};return r["group-header"]?r["group-header"](S):h(WQ,me({key:`group-header_${y.id}`,item:y},U_(n,":group-header",()=>S)),r)}const w={index:b,item:y.raw,internalItem:y,columns:s.value,isExpanded:a,toggleExpand:o,isSelected:l,toggleSelect:u},x={...w,props:me({key:`item_${y.key??y.index}`,onClick:i.value?()=>{o(y)}:void 0,index:b,item:y,cellProps:e.cellProps,mobile:p.value},U_(n,":row",()=>w),typeof e.rowProps=="function"?e.rowProps({item:w.item,index:w.index,internalItem:w.internalItem}):e.rowProps)};return h(Pe,{key:x.props.key},[r.item?r.item(x):h(KQ,x.props,r),a(y)&&((P=r["expanded-row"])==null?void 0:P.call(r,w))])})])}),{}}}),IM=ce({fixedHeader:Boolean,fixedFooter:Boolean,height:[Number,String],hover:Boolean,...Ve(),...Ar(),...vt(),...$t()},"VTable"),Zy=_e()({name:"VTable",props:IM(),setup(e,t){let{slots:n,emit:r}=t;const{themeClasses:s}=Yt(e),{densityClasses:i}=gs(e);return Ie(()=>h(e.tag,{class:["v-table",{"v-table--fixed-height":!!e.height,"v-table--fixed-header":e.fixedHeader,"v-table--fixed-footer":e.fixedFooter,"v-table--has-top":!!n.top,"v-table--has-bottom":!!n.bottom,"v-table--hover":e.hover},s.value,i.value,e.class],style:e.style},{default:()=>{var o,a,l;return[(o=n.top)==null?void 0:o.call(n),n.default?h("div",{class:"v-table__wrapper",style:{height:Le(e.height)}},[h("table",null,[n.default()])]):(a=n.wrapper)==null?void 0:a.call(n),(l=n.bottom)==null?void 0:l.call(n)]}})),{}}}),YQ=ce({items:{type:Array,default:()=>[]},itemValue:{type:[String,Array,Function],default:"id"},itemSelectable:{type:[String,Array,Function],default:null},rowProps:[Object,Function],cellProps:[Object,Function],returnObject:Boolean},"DataTable-items");function XQ(e,t,n,r){const s=e.returnObject?t:Xn(t,e.itemValue),i=Xn(t,e.itemSelectable,!0),o=r.reduce((a,l)=>(l.key!=null&&(a[l.key]=Xn(t,l.value)),a),{});return{type:"item",key:e.returnObject?Xn(t,e.itemValue):s,index:n,value:s,selectable:i,columns:o,raw:t}}function QQ(e,t,n){return t.map((r,s)=>XQ(e,r,s,n))}function JQ(e,t){return{items:T(()=>QQ(e,e.items,t.value))}}const ZQ=ce({...RM(),hideDefaultBody:Boolean,hideDefaultFooter:Boolean,hideDefaultHeader:Boolean,width:[String,Number],search:String,...mQ(),...vQ(),...NQ(),...YQ(),...RQ(),...AQ(),...TM(),...IM()},"DataTable"),eJ=ce({...kQ(),...ZQ(),...fQ(),...kM()},"VDataTable"),tJ=_e()({name:"VDataTable",props:eJ(),emits:{"update:modelValue":e=>!0,"update:page":e=>!0,"update:itemsPerPage":e=>!0,"update:sortBy":e=>!0,"update:options":e=>!0,"update:groupBy":e=>!0,"update:expanded":e=>!0,"update:currentItems":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const{groupBy:s}=yQ(e),{sortBy:i,multiSort:o,mustSort:a}=OQ(e),{page:l,itemsPerPage:u}=xQ(e),{disableSort:c}=Wo(e),{columns:d,headers:f,sortFunctions:p,sortRawFunctions:v,filterFunctions:m}=jQ(e,{groupBy:s,showSelect:Re(e,"showSelect"),showExpand:Re(e,"showExpand")}),{items:y}=JQ(e,d),b=Re(e,"search"),{filteredItems:w}=pQ(e,y,b,{transform:ee=>ee.columns,customKeyFilter:m}),{toggleSort:x}=MQ({sortBy:i,multiSort:o,mustSort:a,page:l}),{sortByWithGroups:P,opened:S,extractRows:C,isGroupOpen:R,toggleGroup:k}=bQ({groupBy:s,sortBy:i,disableSort:c}),{sortedItems:E}=DQ(e,w,P,{transform:ee=>({...ee.raw,...ee.columns}),sortFunctions:p,sortRawFunctions:v}),{flatItems:I}=SQ(E,s,S),A=T(()=>I.value.length),{startIndex:O,stopIndex:L,pageCount:M,setItemsPerPage:z}=EQ({page:l,itemsPerPage:u,itemsLength:A}),{paginatedItems:H}=PQ({items:I,startIndex:O,stopIndex:L,itemsPerPage:u}),G=T(()=>C(H.value)),{isSelected:W,select:Y,selectAll:X,toggleSelect:J,someSelected:N,allSelected:K}=IQ(e,{allItems:y,currentPage:G}),{isExpanded:he,toggleExpand:oe}=gQ(e);_Q({page:l,itemsPerPage:u,sortBy:i,groupBy:s,search:b}),Ir({VDataTableRows:{hideNoData:Re(e,"hideNoData"),noDataText:Re(e,"noDataText"),loading:Re(e,"loading"),loadingText:Re(e,"loadingText")}});const we=T(()=>({page:l.value,itemsPerPage:u.value,sortBy:i.value,pageCount:M.value,toggleSort:x,setItemsPerPage:z,someSelected:N.value,allSelected:K.value,isSelected:W,select:Y,selectAll:X,toggleSelect:J,isExpanded:he,toggleExpand:oe,isGroupOpen:R,toggleGroup:k,items:G.value.map(ee=>ee.raw),internalItems:G.value,groupedItems:H.value,columns:d.value,headers:f.value}));return Ie(()=>{const ee=Uk.filterProps(e),de=zk.filterProps(e),ne=Hk.filterProps(e),U=Zy.filterProps(e);return h(Zy,me({class:["v-data-table",{"v-data-table--show-select":e.showSelect,"v-data-table--loading":e.loading},e.class],style:e.style},U,{fixedHeader:e.fixedHeader||e.sticky}),{top:()=>{var De;return(De=r.top)==null?void 0:De.call(r,we.value)},default:()=>{var De,He,F,B,q,fe;return r.default?r.default(we.value):h(Pe,null,[(De=r.colgroup)==null?void 0:De.call(r,we.value),!e.hideDefaultHeader&&h("thead",{key:"thead"},[h(zk,de,r)]),(He=r.thead)==null?void 0:He.call(r,we.value),!e.hideDefaultBody&&h("tbody",null,[(F=r["body.prepend"])==null?void 0:F.call(r,we.value),r.body?r.body(we.value):h(Hk,me(n,ne,{items:H.value}),r),(B=r["body.append"])==null?void 0:B.call(r,we.value)]),(q=r.tbody)==null?void 0:q.call(r,we.value),(fe=r.tfoot)==null?void 0:fe.call(r,we.value)])},bottom:()=>r.bottom?r.bottom(we.value):!e.hideDefaultFooter&&h(Pe,null,[h(dn,null,null),h(Uk,ee,{prepend:r["footer.prepend"]})])})}),{}}}),nJ=ce({...Ve(),...rG()},"VForm"),iS=_e()({name:"VForm",props:nJ(),emits:{"update:modelValue":e=>!0,submit:e=>!0},setup(e,t){let{slots:n,emit:r}=t;const s=sG(e),i=V();function o(l){l.preventDefault(),s.reset()}function a(l){const u=l,c=s.validate();u.then=c.then.bind(c),u.catch=c.catch.bind(c),u.finally=c.finally.bind(c),r("submit",u),u.defaultPrevented||c.then(d=>{var p;let{valid:f}=d;f&&((p=i.value)==null||p.submit())}),u.preventDefault()}return Ie(()=>{var l;return h("form",{ref:i,class:["v-form",e.class],style:e.style,novalidate:!0,onReset:o,onSubmit:a},[(l=n.default)==null?void 0:l.call(n,s)])}),Qi(s,i)}}),rJ=ce({disabled:Boolean,modelValue:{type:Boolean,default:null},...zb()},"VHover"),jk=_e()({name:"VHover",props:rJ(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=st(e,"modelValue"),{runOpenDelay:s,runCloseDelay:i}=Hb(e,o=>!e.disabled&&(r.value=o));return()=>{var o;return(o=n.default)==null?void 0:o.call(n,{isHovering:r.value,props:{onMouseenter:s,onMouseleave:i}})}}}),sJ={class:"mt-4 mb-4"},iJ={key:0},oJ={key:1},aJ={key:0},lJ={key:1},uJ=["colspan"],cJ=$e({__name:"PrintersView",setup(e){const t=Dt(),n=Lt(),r=V(!1),s=nr(),i=eo(),o=Zi(),a=tn(nn.AddOrUpdatePrinterDialog),l=V([]),u=V([]),c=V(""),d=V(""),f=V(),p=V(""),v=V([]),m=T(()=>o.hasFeature("printerGroupsApi")),y=T(()=>[{title:"Enabled",key:"enabled"},{title:"Type",key:"printerType"},{title:"Printer Name",align:"start",sortable:!0,key:"name"},{title:"Floor",key:"floor",sortable:!1},...o.hasFeature("printerGroupsApi")?[{title:"Group(s)",key:"group",sortable:!0}]:[],{title:"Actions",key:"actions",sortable:!1},{title:"Socket Update",key:"socketupdate",sortable:!1},{title:"",key:"data-table-expand"}]);async function b(){return r.value=!0,await o.loadFeatures(),o.hasFeature("printerGroupsApi")&&(l.value=await ml.getGroupsWithPrinters()),r.value=!1,l}const w=Sm({queryKey:["printerGroups"],queryFn:b}),x=T(()=>{var K;if(!o.hasFeature("printerGroupsApi")||!((K=u.value)!=null&&K.length))return n.printers;const N=u.value.flatMap(he=>he.printers.map(oe=>oe.printerId))||[];return n.printers.filter(he=>N.includes(he.id))}),P=T(()=>s.printerCurrentEventReceivedAtById),S=T(()=>{if(!(!f.value&&f.value!==0))return l.value[f.value]}),C=N=>N?(Date.now()-N)/1e3:void 0,R=N=>l.value.filter(K=>K.printers.find(he=>he.printerId===N)),k=N=>l.value.filter(K=>!K.printers.find(he=>he.printerId===N)),E=N=>i.floorOfPrinter(N),I=N=>{n.setUpdateDialogPrinter(N),a.openDialog(N)},A=()=>{a.openDialog()},O=(N,K)=>{if(console.log(N,K),K.isExpanded){const he=v.value.findIndex(oe=>oe===N.id);v.value.splice(he,1)}else v.value.push(N.id.toString())},L=()=>{tn(nn.ImportOctoFarmDialog).openDialog()},M=()=>{tn(nn.YamlImportExport).openDialog()},z=async()=>{var N,K;if(!((K=(N=c.value)==null?void 0:N.trim())!=null&&K.length))throw new Error("Please set a non-empty group name");await ml.createGroup(c.value.trim()),await w.refetch(),c.value="",t.info("Created group")},H=()=>{var N;S.value&&(d.value=(N=S.value)==null?void 0:N.name)},G=async N=>{var he,oe;if(!(N!=null&&N.id))throw new Error("Group id was not defined");if(!l.value.find(we=>we.id===N.id))throw new Error("Group was not found, please reload the page");if(!((oe=(he=d.value)==null?void 0:he.trim())!=null&&oe.length))throw new Error("Please set a non-empty group name");await ml.updateGroupName(N.id,d.value.trim()),await w.refetch()},W=async N=>{const K=l.value.find(oe=>oe.id===N);if(!K)throw new Error("Group was not found, please reload the page");const he=K.printers.length;he>0&&!confirm(`This group contains ${he} printers, are you sure to delete it?`)||(await ml.deleteGroup(N),await w.refetch(),t.info("Deleted group"))},Y=async(N,K)=>{await ml.addPrinterToGroup(N,K),await w.refetch(),t.info("Added printer to group")},X=async(N,K)=>{await ml.deletePrinterFromGroup(N,K),await w.refetch(),t.info("Removed printer from group")},J=async N=>{if(!N.id)throw new Error("Printer ID not set, cant toggle enabled");N.enabled=!N.enabled,await Qt.toggleEnabled(N.id,N.enabled)};return(N,K)=>{const he=An("v-list-item-group");return D(),ge("div",null,[h(gt,null,{default:g(()=>[h(an,null,{default:g(()=>[K[11]||(K[11]=_(" Printers ")),h(wn),m.value&&l.value.length?(D(),te(Vo,{key:0,modelValue:u.value,"onUpdate:modelValue":K[0]||(K[0]=oe=>u.value=oe),multiple:"",items:l.value,"item-title":"name","return-object":!0,placeholder:"Select group to filter by","prepend-icon":"filter_list",label:"Filter by groups"},null,8,["modelValue","items"])):ue("",!0),h(ut,{modelValue:p.value,"onUpdate:modelValue":K[1]||(K[1]=oe=>p.value=oe),class:"p-2",clearable:"",label:"Printer search","prepend-icon":"search","single-line":""},null,8,["modelValue"])]),_:1}),h(Z(tJ),{expanded:v.value,headers:y.value,items:x.value,search:p.value,"single-expand":"",class:"elevation-1","item-key":"id","show-expand":"","onClick:row":O},PC({"no-data":g(()=>[$("div",sJ,[x.value.length===0?(D(),ge("h3",iJ," No printer has been created yet. Create one here: ")):(D(),ge("h3",oJ," No printer has been found. Adjust your filters or search criteria. ")),h(nM)])]),top:g(()=>[h(mr,{flat:""},{default:g(()=>[h(En,null,{default:g(()=>[_(" Showing "+re(x.value.length||0)+" printers ",1)]),_:1}),h(se,{class:"ml-3",variant:"outlined",type:"button",onClick:K[2]||(K[2]=oe=>L())},{default:g(()=>[h(Q,null,{default:g(()=>K[12]||(K[12]=[_("publish")])),_:1}),K[13]||(K[13]=_(" Import OctoFarm Printers "))]),_:1}),h(se,{class:"ml-3",variant:"outlined",type:"button",onClick:K[3]||(K[3]=oe=>A())},{default:g(()=>[h(Q,null,{default:g(()=>K[14]||(K[14]=[_("add")])),_:1}),K[15]||(K[15]=_(" Create Printer "))]),_:1}),h(se,{class:"ml-3",color:"primary",type:"button",onClick:K[4]||(K[4]=oe=>M())},{default:g(()=>[h(Q,null,{default:g(()=>K[16]||(K[16]=[_("publish")])),_:1}),K[17]||(K[17]=_(" Import/Export YAML "))]),_:1}),h(wn)]),_:1})]),"item.enabled":g(({item:oe})=>[h(up,{modelValue:oe.enabled,"onUpdate:modelValue":we=>oe.enabled=we,color:"primary",inset:"",onClickCapture:Pt(we=>J(oe),["stop"])},{default:g(()=>[_(re(oe.enabled),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onClickCapture"])]),"item.printerType":g(({item:oe})=>[_(re(Z(DA)(oe.printerType)),1)]),"item.name":g(({item:oe})=>[h(_n,null,{default:g(()=>[_(re(oe.name||oe.printerURL),1)]),_:2},1024)]),"item.floor":g(({item:oe})=>[oe.id?(D(),te(_n,{key:0},{default:g(()=>{var we;return[_(re((we=E(oe.id))==null?void 0:we.name),1)]}),_:2},1024)):ue("",!0)]),"item.actions":g(({item:oe})=>[h(nQ,{printer:oe},null,8,["printer"]),h(aQ,{printer:oe},null,8,["printer"]),h(lQ,{printer:oe},null,8,["printer"]),h(uQ,{printer:oe},null,8,["printer"]),h(cQ,{printer:oe},null,8,["printer"]),h(iQ,{printer:oe,"onUpdate:show":we=>I(oe)},null,8,["printer","onUpdate:show"])]),"item.socketupdate":g(({item:oe})=>[P.value[oe.id]?(D(),ge("span",aJ," Updated "+re(C(P.value[oe.id]))+" seconds ago ",1)):(D(),ge("span",lJ," No update received (silence) "))]),"expanded-row":g(({item:oe,columns:we})=>[$("td",{colspan:we.length},[h(tQ,{printer:oe},null,8,["printer"])],8,uJ)]),_:2},[m.value?{name:"item.group",fn:g(({item:oe})=>[(D(!0),ge(Pe,null,Wt(R(oe.id),we=>(D(),te(_n,{key:we.id,closable:"",size:"small",class:"ml-2","onClick:close":ee=>X(we.id,oe.id)},{default:g(()=>[_(re(we.name),1)]),_:2},1032,["onClick:close"]))),128)),h(wm,{"offset-y":""},{activator:g(({props:we})=>[h(_n,me({disabled:!l.value.length,class:"ml-2",size:"small"},we),{default:g(()=>[h(Q,{size:"small"},{default:g(()=>K[18]||(K[18]=[_("add")])),_:1})]),_:2},1040,["disabled"])]),default:g(()=>[h(Vt,{density:"compact",style:{border:"1px solid dimgray"}},{default:g(()=>[h(Wr,null,{default:g(()=>K[19]||(K[19]=[_(" ADD TO GROUP ")])),_:1}),h(he,null,{default:g(()=>[(D(!0),ge(Pe,null,Wt(k(oe.id),(we,ee)=>(D(),te(Be,{key:ee,onClick:de=>Y(we.id,oe.id)},{default:g(()=>[h(dt,null,{default:g(()=>[_(re(we.name),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:2},1024)]),_:2},1024)]),_:2},1024)]),key:"0"}:void 0]),1032,["expanded","headers","items","search"])]),_:1}),m.value?(D(),te(gt,{key:0,class:"mt-4"},{default:g(()=>[h(an,null,{default:g(()=>K[20]||(K[20]=[_(" Printer Groups ")])),_:1}),h(en,null,{default:g(()=>[K[26]||(K[26]=$("h3",null,"Existing groups:",-1)),h(Bn,null,{default:g(()=>[h(np,{modelValue:f.value,"onUpdate:modelValue":[K[5]||(K[5]=oe=>f.value=oe),K[6]||(K[6]=oe=>H())],"selected-class":"primary--text",column:""},{default:g(()=>[(D(!0),ge(Pe,null,Wt(l.value,oe=>(D(),te(_n,{key:oe.id,size:"small",closable:"",class:"mr-3","onClick:close":we=>W(oe.id)},{default:g(()=>[_(re(oe.name),1)]),_:2},1032,["onClick:close"]))),128))]),_:1},8,["modelValue"])]),_:1}),K[27]||(K[27]=$("h3",{class:"mt-3"},"Update group name",-1)),h(Bn,null,{default:g(()=>[S.value?ue("",!0):(D(),te(rn,{key:0},{default:g(()=>K[21]||(K[21]=[_(" Select a group to update its name. ")])),_:1})),h(ut,{modelValue:d.value,"onUpdate:modelValue":K[7]||(K[7]=oe=>d.value=oe),disabled:!S.value,label:"Group Name",placeholder:"Type group name here"},{default:g(()=>K[22]||(K[22]=[_(" Name ")])),_:1},8,["modelValue","disabled"]),h(se,{onClick:K[8]||(K[8]=oe=>G(S.value))},{default:g(()=>K[23]||(K[23]=[_(" Update name ")])),_:1})]),_:1}),K[28]||(K[28]=$("h3",{class:"mt-3"},"Add group",-1)),h(Bn,null,{default:g(()=>[h(ut,{modelValue:c.value,"onUpdate:modelValue":K[9]||(K[9]=oe=>c.value=oe),label:"Group Name",placeholder:"Type group name here"},{default:g(()=>K[24]||(K[24]=[_(" Name ")])),_:1},8,["modelValue"]),h(se,{onClick:K[10]||(K[10]=oe=>z())},{default:g(()=>K[25]||(K[25]=[_(" Create new group ")])),_:1})]),_:1})]),_:1})]),_:1})):ue("",!0)])}}}),qs={grid:"grid",floors:"floors",octoprint:"octoprint",emergencyCommands:"emergencyCommands",users:"users",account:"account",serverProtection:"serverProtection",softwareUpgrade:"softwareUpgrade",diagnostics:"diagnostics",experimental:"experimental"},dJ={[qs.grid]:{title:"Grid",icon:"grid_on",path:"/settings/grid",divider:!1},[qs.floors]:{title:"Floors",icon:"house_siding",path:"/settings/floors",divider:!0},[qs.octoprint]:{title:"OctoPrint",icon:"image",path:"/settings/octoprint",divider:!1},[qs.emergencyCommands]:{title:"Emergency Commands",icon:"warning",path:"/settings/emergency-commands",divider:!0},[qs.users]:{title:"Users",icon:"group",path:"/settings/user-management",divider:!1},[qs.account]:{title:"Account",icon:"account_circle",path:"/settings/account",divider:!1},[qs.serverProtection]:{title:"Server Protection",icon:"security",path:"/settings/server-protection",divider:!0},[qs.softwareUpgrade]:{title:"Software Upgrade",icon:"upgrade",path:"/settings/software-upgrade",divider:!1},[qs.diagnostics]:{title:"Diagnostics",icon:"bug_report",path:"/settings/diagnostics",divider:!1},[qs.experimental]:{title:"Experimental",icon:"settings_applications",path:"/settings/experimental",divider:!1}},fJ=$e({__name:"SettingsView",setup(e){const t=V(dJ);return(n,r)=>{const s=An("router-view");return D(),ge("div",null,[h(rt,{"no-gutters":""},{default:g(()=>[h(Mw,{permanent:!0},{default:g(()=>[h(Be,null,{default:g(()=>[h(dt,{class:"text-h6"},{default:g(()=>r[0]||(r[0]=[_(" Settings ")])),_:1}),h(yt,null,{default:g(()=>r[1]||(r[1]=[_(" Adjust your FDM Monster ")])),_:1})]),_:1}),h(dn),h(Vt,{density:"compact",nav:""},{default:g(()=>[(D(!0),ge(Pe,null,Wt(Z(t),i=>(D(),te(Be,{key:i.title,to:i.path,link:"","prepend-icon":i.icon,title:i.title,"router-link":"",style:os(i.divider?"border-bottom: 1px solid gray":"")},null,8,["to","prepend-icon","title","style"]))),128))]),_:1})]),_:1}),h(Ue,null,{default:g(()=>[h(s)]),_:1})]),_:1})])}}});function hJ(e){const t=new Date(e);return new Intl.DateTimeFormat("default",{dateStyle:"long"}).format(t)}const pJ={key:0,class:"text--primary float-end mr-5 mt-2"},mJ={class:"text-grey-darken-4"},gJ={key:0,class:"text-success"},vJ={key:1,class:"text-error"},yJ={key:0},bJ={key:0},wJ={key:0},SJ={key:1},_J={key:0},kJ={key:1},xJ=$e({__name:"UserManagementSettings",setup(e){const t=Dt(),n=V(!1),r=V(),s=V([]),i=V([]);async function o(){n.value=!0;try{r.value=await ns.getProfile(),i.value=await ns.listRoles(),s.value=await ns.listUsers()}catch(m){throw n.value=!1,console.error(m),m}return n.value=!1,{users:s,roles:i,profile:r}}const a=Sm({queryKey:["userRolesProfile"],queryFn:o});function l(m){return m.map(y=>{var b;return(b=i.value.find(w=>w.id==y))==null?void 0:b.name})}function u(m){var y;return m.id==((y=r.value)==null?void 0:y.id)}async function c(m){if(confirm(`Are you sure you want to delete ${m.username}?`)){try{n.value=!0,await ns.deleteUser(m.id),await a.refetch()}catch(y){throw n.value=!1,console.error(y),y}n.value=!1,t.info(`User ${m.username} deleted`)}}async function d(m,y=!0){if(m.isRootUser){t.error("You are not allowed to do perform this action on an owner");return}if(confirm(`Are you sure you want to ${y?"verify":"unverify"} ${m.username}?`)){try{n.value=!0,await ns.setUserVerified(m.id,y),await a.refetch()}catch(b){throw n.value=!1,console.error(b),b}n.value=!1,t.info(y?`User ${m.username} verified`:`User ${m.username} unverified`)}}async function f(m,y=!0){var b;if((b=r.value)!=null&&b.isRootUser||t.error("You are not allowed to do perform this action as you're not an owner"),!!confirm(`You are about to ${y?"set":"remove"} owner rights on ${m.username}. Are you sure?`)){try{n.value=!0,await ns.setRootUser(m.id,y),await a.refetch()}catch(w){throw n.value=!1,console.error(w),w}n.value=!1,t.info(y?`User ${m.username} set to owner`:`User ${m.username} is no longer owner`)}}async function p(m){try{n.value=!0,console.log(m.roles),console.log(m.roles.map(y=>typeof y)),await ns.setUserRoles(m.id,m.roles),await a.refetch(),t.info(`Roles updated for ${m.username}`)}catch(y){throw n.value=!1,console.error(y),t.error(`Failed to update roles for ${m.username}`),y}n.value=!1}async function v(){await tn(nn.CreateUserDialog).openDialog()}return(m,y)=>{const b=An("v-list-item-content");return D(),te(gt,null,{default:g(()=>[h(mr,{color:"primary"},{default:g(()=>{var w;return[h(lt,null,{default:g(()=>[h(Q,null,{default:g(()=>y[1]||(y[1]=[_("settings")])),_:1})]),_:1}),h(En,null,{default:g(()=>y[2]||(y[2]=[_(" Users ")])),_:1}),h(wn),h(se,{disabled:!((w=r.value)!=null&&w.isRootUser),class:"mt-2",color:"primary",onClick:y[0]||(y[0]=x=>v())},{default:g(()=>[h(Q,{class:"mr-2"},{default:g(()=>y[3]||(y[3]=[_("verified_user")])),_:1}),y[4]||(y[4]=$("span",null,"Create verified user",-1))]),_:1},8,["disabled"])]}),_:1}),n.value?(D(),te(eM,{key:0,size:20,color:"#a70015",style:{margin:"250px",position:"absolute"}})):ue("",!0),h(Vt,{lines:"three"},{default:g(()=>[h(Wr,null,{default:g(()=>y[5]||(y[5]=[_(" Showing all users ")])),_:1}),(D(!0),ge(Pe,null,Wt(s.value,(w,x)=>(D(),te(Be,{key:x,class:"pl-6",style:{"max-width":"800px","border-top":"1px solid grey","border-bottom":"1px solid grey"}},{default:g(()=>[h(b,{class:Ho(u(w)?"pl-6 grey darken-3":"pl-6 grey darken-4")},{default:g(()=>[h(dt,null,{default:g(()=>[_(" User '"+re(w.username)+"' ",1),u(w)?(D(),ge("strong",pJ," Your account ")):ue("",!0)]),_:2},1024),h(yt),$("span",mJ,[$("ul",null,[$("li",null,[w.isVerified?(D(),ge("span",gJ," Account verified ")):(D(),ge("span",vJ," Account not verified "))]),$("li",null,"Created at "+re(Z(hJ)(w.createdAt)),1),w.isDemoUser?(D(),ge("li",yJ,"Demo user account")):ue("",!0),$("li",null,[y[7]||(y[7]=_(" Role(s) ")),$("ul",null,[w.isRootUser?(D(),ge("li",bJ,[h(_n,{class:"mb-2 mt-2",size:"small"},{default:g(()=>y[6]||(y[6]=[_(" OWNER ")])),_:1})])):ue("",!0),(D(!0),ge(Pe,null,Wt(l(w.roles),P=>(D(),ge("li",{key:P},[h(_n,{class:"mb-2 mt-2",size:"small"},{default:g(()=>[_(re(P),1)]),_:2},1024)]))),128))])])])])]),_:2},1032,["class"]),h(vu,null,{default:g(()=>{var P,S;return[h(se,{disabled:u(w)||w.isRootUser,color:w.isVerified?"error darken-4":"success",onClick:C=>d(w,!w.isVerified)},{default:g(()=>[h(Q,{class:"mr-2"},{default:g(()=>y[8]||(y[8]=[_("shield")])),_:1}),w.isVerified?ue("",!0):(D(),ge("span",wJ," Verify account ")),w.isVerified?(D(),ge("span",SJ," Un-verify account ")):ue("",!0)]),_:2},1032,["disabled","color","onClick"]),h(se,{color:w.isRootUser?"error darken-4":"success",disabled:u(w)||!((P=r.value)!=null&&P.isRootUser),class:"mt-2",onClick:C=>f(w,!w.isRootUser)},{default:g(()=>[h(Q,{class:"mr-2"},{default:g(()=>y[9]||(y[9]=[_("key")])),_:1}),w.isRootUser?(D(),ge("span",_J," Remove owner ")):ue("",!0),w.isRootUser?ue("",!0):(D(),ge("span",kJ," Set owner "))]),_:2},1032,["color","disabled","onClick"]),(S=r.value)!=null&&S.isRootUser?(D(),te(Vo,{key:0,items:i.value.map(C=>({text:C.name,value:C.id})),modelValue:w.roles,"onUpdate:modelValue":C=>w.roles=C,multiple:"",label:"Select roles",onChange:C=>p(w),class:"pt-6",style:{width:"15rem"}},null,8,["items","modelValue","onUpdate:modelValue","onChange"])):ue("",!0),h(se,{disabled:u(w)||w.isRootUser,class:"mt-2",color:"error-darken-2",onClick:C=>c(w)},{default:g(()=>[h(Q,{class:"mr-2"},{default:g(()=>y[10]||(y[10]=[_("delete")])),_:1}),y[11]||(y[11]=_(" Delete "))]),_:2},1032,["disabled","onClick"])]}),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})}}}),EJ=$e({name:"FdmSettings",props:{},setup:()=>({settingsStore:Ns(),printersStore:Lt(),snackbar:Dt(),printerStateStore:nr()}),data:()=>({fileHandlingSettings:{autoRemoveOldFilesBeforeUpload:!1,autoRemoveOldFilesAtBoot:!1,autoRemoveOldFilesCriteriumDays:7}}),computed:{},watch:{},async created(){const e=await Rn.getSettings();this.fileHandlingSettings=e.printerFileClean},mounted(){},methods:{async updateTimeoutSettings(){var e,t,n;if(!((t=(e=this.settingsStore.settings)==null?void 0:e.timeout)!=null&&t.apiTimeout)){this.snackbar.error("Timeout not set");return}this.settingsStore.settings.timeout.apiTimeout<1e3?this.snackbar.error("Timeout is too low - please set it to at least 1000 milliseconds"):(await this.settingsStore.updateTimeoutSettings((n=this.settingsStore.settings)==null?void 0:n.timeout),this.snackbar.info("Timeout settings updated"))},async setFileCleanSettings(){const e=await Rn.setFileCleanSettings(this.fileHandlingSettings);this.fileHandlingSettings=e.printerFileClean},async purgeFiles(){await Li.purgeFiles(),this.snackbar.openInfoMessage({title:"Successfully purged all references to printer files!"})},async bulkDisableGCodeAnalysis(){const e=this.printerStateStore.onlinePrinters;this.snackbar.openInfoMessage({title:`Trying to disable gcode analysis for ${e.length} online printers.`});for(const t of Object.values(e))await cM.setGCodeAnalysis(t.id,!1);this.snackbar.openInfoMessage({title:`Finished disabling gcode analysis for ${e.length} online printers.`})}}});function CJ(e,t,n,r,s,i){return D(),te(gt,null,{default:g(()=>[h(mr,{color:"primary"},{default:g(()=>[h(lt,null,{default:g(()=>[h(Q,null,{default:g(()=>t[8]||(t[8]=[_("settings")])),_:1})]),_:1}),h(En,null,{default:g(()=>t[9]||(t[9]=[_(" OctoPrint Settings ")])),_:1})]),_:1}),h(Vt,{lines:"three"},{default:g(()=>[h(Be,null,{default:g(()=>[h(dt,null,{default:g(()=>t[10]||(t[10]=[_(" Pre-upload file cleanup ")])),_:1}),h(yt,null,{default:g(()=>[t[12]||(t[12]=_(" Automatically cleanup old files to ensure the SD card has enough space. ")),t[13]||(t[13]=$("br",null,null,-1)),h(yn,{modelValue:e.fileHandlingSettings.autoRemoveOldFilesBeforeUpload,"onUpdate:modelValue":t[0]||(t[0]=o=>e.fileHandlingSettings.autoRemoveOldFilesBeforeUpload=o),label:"Remove old file before upload"},null,8,["modelValue"]),h(ut,{modelValue:e.fileHandlingSettings.autoRemoveOldFilesCriteriumDays,"onUpdate:modelValue":t[1]||(t[1]=o=>e.fileHandlingSettings.autoRemoveOldFilesCriteriumDays=o),disabled:!e.fileHandlingSettings.autoRemoveOldFilesBeforeUpload,label:"Amount of days to keep files",min:"0",variant:"outlined",type:"number"},null,8,["modelValue","disabled"]),h(yn,{modelValue:e.fileHandlingSettings.autoRemoveOldFilesAtBoot,"onUpdate:modelValue":t[2]||(t[2]=o=>e.fileHandlingSettings.autoRemoveOldFilesAtBoot=o),label:"Remove old files when (re)booting the server"},null,8,["modelValue"]),h(se,{color:"primary",onClick:t[3]||(t[3]=o=>e.setFileCleanSettings())},{default:g(()=>t[11]||(t[11]=[_(" save file clean settings ")])),_:1})]),_:1})]),_:1}),h(Be,null,{default:g(()=>{var o;return[h(dt,null,{default:g(()=>t[14]||(t[14]=[_(" Connection Timeout ")])),_:1}),(o=e.settingsStore.settings)!=null&&o.timeout?(D(),te(yt,{key:0},{default:g(()=>[t[16]||(t[16]=_(" The connection timeout is the amount of time in milliseconds that the server will wait for OctoPrint to respond before giving up ")),h(ut,{modelValue:e.settingsStore.settings.timeout.apiTimeout,"onUpdate:modelValue":t[4]||(t[4]=a=>e.settingsStore.settings.timeout.apiTimeout=a),label:"Connection Timeout",min:"0",variant:"outlined",type:"number"},null,8,["modelValue"]),h(se,{color:"primary",onClick:t[5]||(t[5]=a=>e.updateTimeoutSettings())},{default:g(()=>t[15]||(t[15]=[_(" save connection timeout ")])),_:1})]),_:1})):ue("",!0)]}),_:1}),h(Be,null,{default:g(()=>[h(dt,null,{default:g(()=>t[17]||(t[17]=[_(" Clean file references ")])),_:1}),h(yt,null,{default:g(()=>[t[19]||(t[19]=_(" Clear out the file references for all printers - this does not remove them from OctoPrint! ")),t[20]||(t[20]=$("br",null,null,-1)),h(se,{color:"primary",onClick:t[6]||(t[6]=o=>e.purgeFiles())},{default:g(()=>t[18]||(t[18]=[_(" Purge file references ")])),_:1})]),_:1})]),_:1}),h(Be,null,{default:g(()=>[h(dt,null,{default:g(()=>t[21]||(t[21]=[_(" Disable inefficient GCode analysis ")])),_:1}),h(yt,null,{default:g(()=>[t[23]||(t[23]=_(" Disable GCode analysis on all printers at once, preventing CPU intensive and inaccurate time/size estimates. ")),t[24]||(t[24]=$("br",null,null,-1)),h(se,{color:"primary",onClick:t[7]||(t[7]=o=>e.bulkDisableGCodeAnalysis())},{default:g(()=>t[22]||(t[22]=[_(" Bulk disable GCode Analysis ")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}const PJ=Zo(EJ,[["render",CJ]]),AM=$e({__name:"SettingsToolbar",props:["icon","title"],setup(e){const t=e;return(n,r)=>(D(),te(mr,null,{default:g(()=>[h(lt,null,{default:g(()=>[h(Q,null,{default:g(()=>[_(re(t.icon),1)]),_:1})]),_:1}),h(En,null,{default:g(()=>[_(re(t.title),1)]),_:1}),Op(n.$slots,"default")]),_:3}))}}),TJ=$e({name:"FloorSettings",props:{},setup:()=>({printersStore:Lt(),floorStore:eo(),addOrUpdateFloorDialog:tn(nn.AddOrUpdateFloorDialog),snackbar:Dt()}),data:()=>({selectedItem:0,editedFloorName:"",editedFloorNumber:0}),computed:{floors(){return this.floorStore.floors},selectedFloor(){return this.floorStore.floors[this.selectedItem]},showAddedPrinters(){var e;return((e=this.selectedFloor.printers)==null?void 0:e.length)+1}},methods:{printerInFloor(e,t){if(!(e!=null&&e.printers))return;const n=e.printers[t-1];if(n)return this.printersStore.printer(n.printerId)},async createFloor(){await this.addOrUpdateFloorDialog.openDialog()},setEditedPrinterFloorName(){this.editedFloorName=this.selectedFloor.name},setEditedPrinterFloorNumber(){this.editedFloorNumber=this.selectedFloor.floor},async updatePrinterFloorName(){var t;if(!((t=this.selectedFloor)!=null&&t.id))return;const{id:e}=this.selectedFloor;await this.floorStore.updateFloorName({floorId:e,name:this.editedFloorName}),this.snackbar.info("Floor name updated")},async updatePrinterFloorNumber(){var t;if(!((t=this.selectedFloor)!=null&&t.id))return;const{id:e}=this.selectedFloor;await this.floorStore.updateFloorNumber({floorId:e,floorNumber:this.editedFloorNumber}),this.snackbar.info("Floor level updated"),this.selectedItem=-1},async clickDeleteFloor(){var e;(e=this.selectedFloor)!=null&&e.id&&(await this.floorStore.deleteFloor(this.selectedFloor.id),this.snackbar.info("Floor deleted"))},async deletePrinterFromFloor(e,t){const n=this.printerInFloor(e,t);!(e!=null&&e.id)||!(n!=null&&n.id)||(await this.floorStore.deletePrinterFromFloor({floorId:e.id,printerId:n.id}),this.snackbar.info("Printer removed from floor"))}}}),RJ={key:1};function IJ(e,t,n,r,s,i){const o=AM,a=An("v-list-item-action-text"),l=An("v-list-item-group"),u=An("v-edit-dialog"),c=An("v-list-item-content");return D(),te(gt,null,{default:g(()=>[h(o,{icon:"house_siding",title:"Floors"}),h(Vt,{subheader:"",lines:"three"},{default:g(()=>[h(Wr,null,{default:g(()=>t[7]||(t[7]=[_("Floors")])),_:1}),h(Be,null,{default:g(()=>[h(dt,null,{default:g(()=>t[8]||(t[8]=[_(" Create new floor ")])),_:1}),h(yt,null,{default:g(()=>[t[10]||(t[10]=_(" Creates an empty department/floor to view printer groups ")),t[11]||(t[11]=$("br",null,null,-1)),h(se,{color:"primary",onClick:t[0]||(t[0]=d=>e.createFloor())},{default:g(()=>t[9]||(t[9]=[_(" Create floor ")])),_:1})]),_:1})]),_:1})]),_:1}),h(dn),h(rt,{"no-gutters":""},{default:g(()=>[h(Ue,null,{default:g(()=>[h(Vt,{density:"compact"},{default:g(()=>[h(l,{modelValue:e.selectedItem,"onUpdate:modelValue":t[1]||(t[1]=d=>e.selectedItem=d)},{default:g(()=>[(D(!0),ge(Pe,null,Wt(e.floors,d=>(D(),te(Be,{key:d.id},{default:g(()=>[h(dt,null,{default:g(()=>[_(re(d.name),1)]),_:2},1024),h(yt,null,{default:g(()=>[_(re(d.printers.length||0)+" assigned ",1)]),_:2},1024),h(a,null,{default:g(()=>[_(" Floor number: "+re(d.floor),1)]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),h(Ue,null,{default:g(()=>[h(mr,null,{default:g(()=>[h(jk,null,{default:g(({isHovering:d,props:f})=>[h(En,av(Ch(f)),{default:g(()=>[e.selectedFloor?(D(),te(u,{key:0,onOpen:e.setEditedPrinterFloorName,onSave:e.updatePrinterFloorName},{input:g(()=>[h(ut,{modelValue:e.editedFloorName,"onUpdate:modelValue":t[2]||(t[2]=p=>e.editedFloorName=p),"return-value":e.editedFloorName,"onUpdate:returnValue":t[3]||(t[3]=p=>e.editedFloorName=p),counter:"",label:"Edit","single-line":""},null,8,["modelValue","return-value"])]),default:g(()=>[h(se,{color:"secondary"},{default:g(()=>[d?(D(),te(Q,{key:0,size:"small"},{default:g(()=>t[12]||(t[12]=[_(" edit ")])),_:1})):ue("",!0),_(" "+re(e.selectedFloor.name),1)]),_:2},1024)]),_:2},1032,["onOpen","onSave"])):(D(),ge("span",RJ," Select a floor on the left "))]),_:2},1040)]),_:1}),h(jk,null,{default:g(({isHovering:d,props:f})=>[h(En,av(Ch(f)),{default:g(()=>[e.selectedFloor?(D(),te(u,{key:0,onOpen:e.setEditedPrinterFloorNumber,onSave:e.updatePrinterFloorNumber},{input:g(()=>[h(ut,{modelValue:e.editedFloorNumber,"onUpdate:modelValue":t[4]||(t[4]=p=>e.editedFloorNumber=p),"return-value":e.editedFloorNumber,"onUpdate:returnValue":t[5]||(t[5]=p=>e.editedFloorNumber=p),label:"Edit","single-line":"",type:"number"},null,8,["modelValue","return-value"])]),default:g(()=>[h(se,{color:"secondary"},{default:g(()=>[d?(D(),te(Q,{key:0,size:"small"},{default:g(()=>t[13]||(t[13]=[_(" edit ")])),_:1})):ue("",!0),_(" "+re(e.selectedFloor.floor),1)]),_:2},1024)]),_:2},1032,["onOpen","onSave"])):ue("",!0)]),_:2},1040)]),_:1}),h(wn),e.selectedFloor?(D(),te(se,{key:0,color:"primary",onClick:t[6]||(t[6]=d=>e.clickDeleteFloor())},{default:g(()=>[h(Q,null,{default:g(()=>t[14]||(t[14]=[_("delete")])),_:1}),t[15]||(t[15]=_(" Delete floor "))]),_:1})):ue("",!0)]),_:1}),e.selectedFloor?(D(),te(Vt,{key:0},{default:g(()=>[(D(!0),ge(Pe,null,Wt(e.showAddedPrinters,d=>(D(),te(Be,{key:d},{default:g(()=>[e.printerInFloor(e.selectedFloor,d)?(D(),te(c,{key:0},{default:g(()=>[h(dt,null,{default:g(()=>{var f;return[_(re((f=e.printerInFloor(e.selectedFloor,d))==null?void 0:f.name),1)]}),_:2},1024)]),_:2},1024)):ue("",!0),e.printerInFloor(e.selectedFloor,d)?(D(),te(vu,{key:1},{default:g(()=>[h(se,{onClick:f=>e.deletePrinterFromFloor(e.selectedFloor,d)},{default:g(()=>[h(Q,null,{default:g(()=>t[16]||(t[16]=[_("close")])),_:1}),t[17]||(t[17]=_(" Clear "))]),_:2},1032,["onClick"])]),_:2},1024)):ue("",!0)]),_:2},1024))),128))]),_:1})):ue("",!0)]),_:1})]),_:1})]),_:1})}const AJ=Zo(TJ,[["render",IJ]]),OJ="/img/DavidZwart.jpg",OM="0.0.18",MJ={key:0},DJ={key:1},$J=$e({__name:"AboutView",setup(e){const t=V(""),n=V(""),r=V(OM);return wt(async()=>{const s=await xo.getVersion();t.value=s.version,n.value=s.monsterPi}),(s,i)=>(D(),te(gt,null,{default:g(()=>[h(an,null,{default:g(()=>i[0]||(i[0]=[_(" About FDM Monster"),$("strong",null," © ",-1)])),_:1}),h(en,null,{default:g(()=>i[1]||(i[1]=[_(" The first prototype of FDM Monster"),$("strong",null," © ",-1),_(" was created by David Zwart in 2021 in collaboration with "),$("strong",null,[$("a",{href:"https://mtb3d.com"}," MTB3D ")],-1),_(". This open-source prototype proved a strong factor in process and logistics optimization for a 3D Printing company with 100+ printers. Due to it's success, we decided to keep it open-source and free! ")])),_:1}),h(en,null,{default:g(()=>[i[4]||(i[4]=_(" The latest 3D Printing Farm server named FDM Monster has been tested for 2 years using a custom image for running 4 OctoPrint images on a Raspberry Pi. ")),i[5]||(i[5]=$("br",null,null,-1)),i[6]||(i[6]=_(" This version uses the famous ")),i[7]||(i[7]=$("a",{href:"https://nodejs.org/en",target:"_blank"},[$("strong",null," Node.js framework ")],-1)),i[8]||(i[8]=_(" together with Awilix and ExpressJS for its server, and ")),i[9]||(i[9]=$("a",{href:"https://vuejs.org/",target:"_blank"},[$("strong",null," Vue 2 ")],-1)),i[10]||(i[10]=_(" and ")),i[11]||(i[11]=$("a",{href:"https://next.vuetifyjs.com/",target:"_blank"},[$("strong",null," Vuetify 2 ")],-1)),i[12]||(i[12]=_(" to set a base for FDM Monster Client")),i[13]||(i[13]=$("strong",null," © ",-1)),i[14]||(i[14]=_(" - the webapp. ")),i[15]||(i[15]=$("br",null,null,-1)),i[16]||(i[16]=$("br",null,null,-1)),$("strong",null," Your server's version is: "+re(t.value),1),i[17]||(i[17]=$("br",null,null,-1)),$("strong",null," Your clients's version is: "+re(r.value),1),i[18]||(i[18]=$("br",null,null,-1)),n.value?(D(),ge("strong",MJ,[_(" Your MonsterPi version is: "+re(n.value),1),i[2]||(i[2]=$("br",null,null,-1))])):(D(),ge("strong",DJ," No MonsterPi distro detected. ")),i[19]||(i[19]=$("br",null,null,-1)),h(se,{class:"mt-3",variant:"outlined",to:"/settings/software-upgrade"},{default:g(()=>i[3]||(i[3]=[_(" Visit Upgrade Settings ")])),_:1})]),_:1}),h(an,null,{default:g(()=>i[20]||(i[20]=[_(" Documentation ")])),_:1}),h(en,null,{default:g(()=>[$("strong",null,[h(se,{color:"primary",href:"https://docs.fdm-monster.net",style:{color:"white"},target:"_blank"},{default:g(()=>[h(Q,{class:"mr-2"},{default:g(()=>i[21]||(i[21]=[_("menu_book")])),_:1}),i[22]||(i[22]=_(" FDM Monster documentation site "))]),_:1})]),i[23]||(i[23]=$("br",null,null,-1))]),_:1}),h(an,null,{default:g(()=>[i[25]||(i[25]=_(" Bug reports ")),h(Q,null,{default:g(()=>i[24]||(i[24]=[_("bug")])),_:1})]),_:1}),h(en,null,{default:g(()=>i[26]||(i[26]=[_(" Did you find a bug, or a feature that needs work? We would love to hear about it! "),$("br",null,null,-1),$("strong",null," We have multiple ways to report it: ",-1),$("h3",null,[$("ul",{class:"ml-5"},[$("li",null,"Mail to davidzwa@gmail.com"),$("li",null,[$("a",{href:"https://discord.gg/mwA8uP8CMc",style:{color:"white"},target:"_blank"}," Discord server ")]),$("li",null,[$("strong",null,[$("a",{href:"https://github.com/fdm-monster/fdm-monster/issues",style:{color:"white"},target:"_blank"},[_(" FDM Monster "),$("strong",null," © "),_(" Github Issues ")])])]),$("li",null,[$("a",{href:"https://fdm-monster.net",style:{color:"white"},target:"_blank"}," Website ")])])],-1)])),_:1}),h(an,null,{default:g(()=>i[27]||(i[27]=[_(" About me ")])),_:1}),h(en,null,{default:g(()=>i[28]||(i[28]=[$("img",{src:OJ,width:"150px"},null,-1),$("h4",{class:"mt-2"},[$("a",{href:"https://www.linkedin.com/in/david-zwart-88514083/",style:{color:"white"},target:"_blank"}," LinkedIn "),$("a",{class:"ml-2",href:"https://github.com/davidzwa",style:{color:"white"},target:"_blank"}," Github Profile ")],-1),_(" David Zwart MSc., post-graduate from the TU Delft (Embedded Systems), author of FDM Monster"),$("strong",null," © ",-1)])),_:1})]),_:1}))}});/*!
|
|
68
|
-
* @kurkle/color v0.3.2
|
|
69
|
-
* https://github.com/kurkle/color#readme
|
|
70
|
-
* (c) 2023 Jukka Kurkela
|
|
71
|
-
* Released under the MIT License
|
|
72
|
-
*/function qd(e){return e+.5|0}const Eo=(e,t,n)=>Math.max(Math.min(e,n),t);function yc(e){return Eo(qd(e*2.55),0,255)}function Mo(e){return Eo(qd(e*255),0,255)}function Ri(e){return Eo(qd(e/2.55)/100,0,1)}function qk(e){return Eo(qd(e*100),0,100)}const Zr={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},eb=[..."0123456789ABCDEF"],FJ=e=>eb[e&15],LJ=e=>eb[(e&240)>>4]+eb[e&15],xf=e=>(e&240)>>4===(e&15),NJ=e=>xf(e.r)&&xf(e.g)&&xf(e.b)&&xf(e.a);function BJ(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Zr[e[1]]*17,g:255&Zr[e[2]]*17,b:255&Zr[e[3]]*17,a:t===5?Zr[e[4]]*17:255}:(t===7||t===9)&&(n={r:Zr[e[1]]<<4|Zr[e[2]],g:Zr[e[3]]<<4|Zr[e[4]],b:Zr[e[5]]<<4|Zr[e[6]],a:t===9?Zr[e[7]]<<4|Zr[e[8]]:255})),n}const VJ=(e,t)=>e<255?t(e):"";function UJ(e){var t=NJ(e)?FJ:LJ;return e?"#"+t(e.r)+t(e.g)+t(e.b)+VJ(e.a,t):void 0}const zJ=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function MM(e,t,n){const r=t*Math.min(n,1-n),s=(i,o=(i+e/30)%12)=>n-r*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function HJ(e,t,n){const r=(s,i=(s+e/60)%6)=>n-n*t*Math.max(Math.min(i,4-i,1),0);return[r(5),r(3),r(1)]}function jJ(e,t,n){const r=MM(e,1,.5);let s;for(t+n>1&&(s=1/(t+n),t*=s,n*=s),s=0;s<3;s++)r[s]*=1-t-n,r[s]+=t;return r}function qJ(e,t,n,r,s){return e===s?(t-n)/r+(t<n?6:0):t===s?(n-e)/r+2:(e-t)/r+4}function oS(e){const n=e.r/255,r=e.g/255,s=e.b/255,i=Math.max(n,r,s),o=Math.min(n,r,s),a=(i+o)/2;let l,u,c;return i!==o&&(c=i-o,u=a>.5?c/(2-i-o):c/(i+o),l=qJ(n,r,s,c,i),l=l*60+.5),[l|0,u||0,a]}function aS(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(Mo)}function lS(e,t,n){return aS(MM,e,t,n)}function WJ(e,t,n){return aS(jJ,e,t,n)}function GJ(e,t,n){return aS(HJ,e,t,n)}function DM(e){return(e%360+360)%360}function KJ(e){const t=zJ.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?yc(+t[5]):Mo(+t[5]));const s=DM(+t[2]),i=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?r=WJ(s,i,o):t[1]==="hsv"?r=GJ(s,i,o):r=lS(s,i,o),{r:r[0],g:r[1],b:r[2],a:n}}function YJ(e,t){var n=oS(e);n[0]=DM(n[0]+t),n=lS(n),e.r=n[0],e.g=n[1],e.b=n[2]}function XJ(e){if(!e)return;const t=oS(e),n=t[0],r=qk(t[1]),s=qk(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${s}%, ${Ri(e.a)})`:`hsl(${n}, ${r}%, ${s}%)`}const Wk={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"},Gk={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 QJ(){const e={},t=Object.keys(Gk),n=Object.keys(Wk);let r,s,i,o,a;for(r=0;r<t.length;r++){for(o=a=t[r],s=0;s<n.length;s++)i=n[s],a=a.replace(i,Wk[i]);i=parseInt(Gk[o],16),e[a]=[i>>16&255,i>>8&255,i&255]}return e}let Ef;function JJ(e){Ef||(Ef=QJ(),Ef.transparent=[0,0,0,0]);const t=Ef[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const ZJ=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function eZ(e){const t=ZJ.exec(e);let n=255,r,s,i;if(t){if(t[7]!==r){const o=+t[7];n=t[8]?yc(o):Eo(o*255,0,255)}return r=+t[1],s=+t[3],i=+t[5],r=255&(t[2]?yc(r):Eo(r,0,255)),s=255&(t[4]?yc(s):Eo(s,0,255)),i=255&(t[6]?yc(i):Eo(i,0,255)),{r,g:s,b:i,a:n}}}function tZ(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Ri(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Bg=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,gl=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function nZ(e,t,n){const r=gl(Ri(e.r)),s=gl(Ri(e.g)),i=gl(Ri(e.b));return{r:Mo(Bg(r+n*(gl(Ri(t.r))-r))),g:Mo(Bg(s+n*(gl(Ri(t.g))-s))),b:Mo(Bg(i+n*(gl(Ri(t.b))-i))),a:e.a+n*(t.a-e.a)}}function Cf(e,t,n){if(e){let r=oS(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=lS(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function $M(e,t){return e&&Object.assign(t||{},e)}function Kk(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=Mo(e[3]))):(t=$M(e,{r:0,g:0,b:0,a:1}),t.a=Mo(t.a)),t}function rZ(e){return e.charAt(0)==="r"?eZ(e):KJ(e)}class dd{constructor(t){if(t instanceof dd)return t;const n=typeof t;let r;n==="object"?r=Kk(t):n==="string"&&(r=BJ(t)||JJ(t)||rZ(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=$M(this._rgb);return t&&(t.a=Ri(t.a)),t}set rgb(t){this._rgb=Kk(t)}rgbString(){return this._valid?tZ(this._rgb):void 0}hexString(){return this._valid?UJ(this._rgb):void 0}hslString(){return this._valid?XJ(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,s=t.rgb;let i;const o=n===i?.5:n,a=2*o-1,l=r.a-s.a,u=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;i=1-u,r.r=255&u*r.r+i*s.r+.5,r.g=255&u*r.g+i*s.g+.5,r.b=255&u*r.b+i*s.b+.5,r.a=o*r.a+(1-o)*s.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=nZ(this._rgb,t._rgb,n)),this}clone(){return new dd(this.rgb)}alpha(t){return this._rgb.a=Mo(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=qd(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Cf(this._rgb,2,t),this}darken(t){return Cf(this._rgb,2,-t),this}saturate(t){return Cf(this._rgb,1,t),this}desaturate(t){return Cf(this._rgb,1,-t),this}rotate(t){return YJ(this._rgb,t),this}}/*!
|
|
73
|
-
* Chart.js v4.4.8
|
|
74
|
-
* https://www.chartjs.org
|
|
75
|
-
* (c) 2025 Chart.js Contributors
|
|
76
|
-
* Released under the MIT License
|
|
77
|
-
*/function Si(){}const sZ=(()=>{let e=0;return()=>e++})();function Nt(e){return e==null}function kn(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function St(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function fs(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Ws(e,t){return fs(e)?e:t}function At(e,t){return typeof e>"u"?t:e}const iZ=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Xt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function It(e,t,n,r){let s,i,o;if(kn(e))for(i=e.length,s=0;s<i;s++)t.call(n,e[s],s);else if(St(e))for(o=Object.keys(e),i=o.length,s=0;s<i;s++)t.call(n,e[o[s]],o[s])}function dp(e,t){let n,r,s,i;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(s=e[n],i=t[n],s.datasetIndex!==i.datasetIndex||s.index!==i.index)return!1;return!0}function fp(e){if(kn(e))return e.map(fp);if(St(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let s=0;for(;s<r;++s)t[n[s]]=fp(e[n[s]]);return t}return e}function FM(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function oZ(e,t,n,r){if(!FM(e))return;const s=t[e],i=n[e];St(s)&&St(i)?fd(s,i,r):t[e]=fp(i)}function fd(e,t,n){const r=kn(t)?t:[t],s=r.length;if(!St(e))return e;n=n||{};const i=n.merger||oZ;let o;for(let a=0;a<s;++a){if(o=r[a],!St(o))continue;const l=Object.keys(o);for(let u=0,c=l.length;u<c;++u)i(l[u],e,o,n)}return e}function Lc(e,t){return fd(e,t,{merger:aZ})}function aZ(e,t,n){if(!FM(e))return;const r=t[e],s=n[e];St(r)&&St(s)?Lc(r,s):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=fp(s))}const Yk={"":e=>e,x:e=>e.x,y:e=>e.y};function lZ(e){const t=e.split("."),n=[];let r="";for(const s of t)r+=s,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function uZ(e){const t=lZ(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function Su(e,t){return(Yk[t]||(Yk[t]=uZ(t)))(e)}function uS(e){return e.charAt(0).toUpperCase()+e.slice(1)}const hd=e=>typeof e<"u",Uo=e=>typeof e=="function",Xk=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function cZ(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const rr=Math.PI,Do=2*rr,hp=Number.POSITIVE_INFINITY,dZ=rr/180,Cs=rr/2,oa=rr/4,Qk=rr*2/3,tb=Math.log10,$o=Math.sign;function mh(e,t,n){return Math.abs(e-t)<n}function Jk(e){const t=Math.round(e);e=mh(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(tb(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function fZ(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((s,i)=>s-i).pop(),t}function hZ(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function pp(e){return!hZ(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function pZ(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function mZ(e,t,n){let r,s,i;for(r=0,s=e.length;r<s;r++)i=e[r][n],isNaN(i)||(t.min=Math.min(t.min,i),t.max=Math.max(t.max,i))}function ba(e){return e*(rr/180)}function gZ(e){return e*(180/rr)}function Zk(e){if(!fs(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function vZ(e,t){const n=t.x-e.x,r=t.y-e.y,s=Math.sqrt(n*n+r*r);let i=Math.atan2(r,n);return i<-.5*rr&&(i+=Do),{angle:i,distance:s}}function yZ(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function aa(e){return(e%Do+Do)%Do}function bZ(e,t,n,r){const s=aa(e),i=aa(t),o=aa(n),a=aa(i-s),l=aa(o-s),u=aa(s-i),c=aa(s-o);return s===i||s===o||r&&i===o||a>l&&u<c}function Ps(e,t,n){return Math.max(t,Math.min(n,e))}function wZ(e){return Ps(e,-32768,32767)}function Dl(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function cS(e,t,n){n=n||(o=>e[o]<t);let r=e.length-1,s=0,i;for(;r-s>1;)i=s+r>>1,n(i)?s=i:r=i;return{lo:s,hi:r}}const nb=(e,t,n,r)=>cS(e,n,r?s=>{const i=e[s][t];return i<n||i===n&&e[s+1][t]===n}:s=>e[s][t]<n),SZ=(e,t,n)=>cS(e,n,r=>e[r][t]>=n);function _Z(e,t,n){let r=0,s=e.length;for(;r<s&&e[r]<t;)r++;for(;s>r&&e[s-1]>n;)s--;return r>0||s<e.length?e.slice(r,s):e}const LM=["push","pop","shift","splice","unshift"];function kZ(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),LM.forEach(n=>{const r="_onData"+uS(n),s=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...i){const o=s.apply(this,i);return e._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...i)}),o}})})}function ex(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,s=r.indexOf(t);s!==-1&&r.splice(s,1),!(r.length>0)&&(LM.forEach(i=>{delete e[i]}),delete e._chartjs)}function NM(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const BM=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function VM(e,t){let n=[],r=!1;return function(...s){n=s,r||(r=!0,BM.call(window,()=>{r=!1,e.apply(t,n)}))}}function xZ(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const dS=e=>e==="start"?"left":e==="end"?"right":"center",qn=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,EZ=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t,Pf=e=>e===0||e===1,tx=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Do/n)),nx=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Do/n)+1,Nc={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Cs)+1,easeOutSine:e=>Math.sin(e*Cs),easeInOutSine:e=>-.5*(Math.cos(rr*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Pf(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Pf(e)?e:tx(e,.075,.3),easeOutElastic:e=>Pf(e)?e:nx(e,.075,.3),easeInOutElastic(e){return Pf(e)?e:e<.5?.5*tx(e*2,.1125,.45):.5+.5*nx(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Nc.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Nc.easeInBounce(e*2)*.5:Nc.easeOutBounce(e*2-1)*.5+.5};function UM(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function rx(e){return UM(e)?e:new dd(e)}function Vg(e){return UM(e)?e:new dd(e).saturate(.5).darken(.1).hexString()}const CZ=["x","y","borderWidth","radius","tension"],PZ=["color","borderColor","backgroundColor"];function TZ(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:PZ},numbers:{type:"number",properties:CZ}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function RZ(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const sx=new Map;function IZ(e,t){t=t||{};const n=e+JSON.stringify(t);let r=sx.get(n);return r||(r=new Intl.NumberFormat(e,t),sx.set(n,r)),r}function zM(e,t,n){return IZ(t,n).format(e)}const HM={values(e){return kn(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let s,i=e;if(n.length>1){const u=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(u<1e-4||u>1e15)&&(s="scientific"),i=AZ(e,n)}const o=tb(Math.abs(i)),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),zM(e,r,l)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(tb(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?HM.numeric.call(this,e,t,n):""}};function AZ(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var jM={formatters:HM};function OZ(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:jM.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Za=Object.create(null),rb=Object.create(null);function Bc(e,t){if(!t)return e;const n=t.split(".");for(let r=0,s=n.length;r<s;++r){const i=n[r];e=e[i]||(e[i]=Object.create(null))}return e}function Ug(e,t,n){return typeof t=="string"?fd(Bc(e,t),n):fd(Bc(e,""),t)}class MZ{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.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=(r,s)=>Vg(s.backgroundColor),this.hoverBorderColor=(r,s)=>Vg(s.borderColor),this.hoverColor=(r,s)=>Vg(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(t),this.apply(n)}set(t,n){return Ug(this,t,n)}get(t){return Bc(this,t)}describe(t,n){return Ug(rb,t,n)}override(t,n){return Ug(Za,t,n)}route(t,n,r,s){const i=Bc(this,t),o=Bc(this,r),a="_"+n;Object.defineProperties(i,{[a]:{value:i[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],u=o[s];return St(l)?Object.assign({},u,l):At(l,u)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var pn=new MZ({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[TZ,RZ,OZ]);function DZ(e){return!e||Nt(e.size)||Nt(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function ix(e,t,n,r,s){let i=t[s];return i||(i=t[s]=e.measureText(s).width,n.push(s)),i>r&&(r=i),r}function la(e,t,n){const r=e.currentDevicePixelRatio,s=n!==0?Math.max(n/2,.5):0;return Math.round((t-s)*r)/r+s}function ox(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function ax(e,t,n,r){qM(e,t,n,r,null)}function qM(e,t,n,r,s){let i,o,a,l,u,c,d,f;const p=t.pointStyle,v=t.rotation,m=t.radius;let y=(v||0)*dZ;if(p&&typeof p=="object"&&(i=p.toString(),i==="[object HTMLImageElement]"||i==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(y),e.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),e.restore();return}if(!(isNaN(m)||m<=0)){switch(e.beginPath(),p){default:s?e.ellipse(n,r,s/2,m,0,0,Do):e.arc(n,r,m,0,Do),e.closePath();break;case"triangle":c=s?s/2:m,e.moveTo(n+Math.sin(y)*c,r-Math.cos(y)*m),y+=Qk,e.lineTo(n+Math.sin(y)*c,r-Math.cos(y)*m),y+=Qk,e.lineTo(n+Math.sin(y)*c,r-Math.cos(y)*m),e.closePath();break;case"rectRounded":u=m*.516,l=m-u,o=Math.cos(y+oa)*l,d=Math.cos(y+oa)*(s?s/2-u:l),a=Math.sin(y+oa)*l,f=Math.sin(y+oa)*(s?s/2-u:l),e.arc(n-d,r-a,u,y-rr,y-Cs),e.arc(n+f,r-o,u,y-Cs,y),e.arc(n+d,r+a,u,y,y+Cs),e.arc(n-f,r+o,u,y+Cs,y+rr),e.closePath();break;case"rect":if(!v){l=Math.SQRT1_2*m,c=s?s/2:l,e.rect(n-c,r-l,2*c,2*l);break}y+=oa;case"rectRot":d=Math.cos(y)*(s?s/2:m),o=Math.cos(y)*m,a=Math.sin(y)*m,f=Math.sin(y)*(s?s/2:m),e.moveTo(n-d,r-a),e.lineTo(n+f,r-o),e.lineTo(n+d,r+a),e.lineTo(n-f,r+o),e.closePath();break;case"crossRot":y+=oa;case"cross":d=Math.cos(y)*(s?s/2:m),o=Math.cos(y)*m,a=Math.sin(y)*m,f=Math.sin(y)*(s?s/2:m),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o);break;case"star":d=Math.cos(y)*(s?s/2:m),o=Math.cos(y)*m,a=Math.sin(y)*m,f=Math.sin(y)*(s?s/2:m),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o),y+=oa,d=Math.cos(y)*(s?s/2:m),o=Math.cos(y)*m,a=Math.sin(y)*m,f=Math.sin(y)*(s?s/2:m),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o);break;case"line":o=s?s/2:Math.cos(y)*m,a=Math.sin(y)*m,e.moveTo(n-o,r-a),e.lineTo(n+o,r+a);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(y)*(s?s/2:m),r+Math.sin(y)*m);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function WM(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function fS(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function hS(e){e.restore()}function $Z(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Nt(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function FZ(e,t,n,r,s){if(s.strikethrough||s.underline){const i=e.measureText(r),o=t-i.actualBoundingBoxLeft,a=t+i.actualBoundingBoxRight,l=n-i.actualBoundingBoxAscent,u=n+i.actualBoundingBoxDescent,c=s.strikethrough?(l+u)/2:u;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=s.decorationWidth||2,e.moveTo(o,c),e.lineTo(a,c),e.stroke()}}function LZ(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function pd(e,t,n,r,s,i={}){const o=kn(t)?t:[t],a=i.strokeWidth>0&&i.strokeColor!=="";let l,u;for(e.save(),e.font=s.string,$Z(e,i),l=0;l<o.length;++l)u=o[l],i.backdrop&&LZ(e,i.backdrop),a&&(i.strokeColor&&(e.strokeStyle=i.strokeColor),Nt(i.strokeWidth)||(e.lineWidth=i.strokeWidth),e.strokeText(u,n,r,i.maxWidth)),e.fillText(u,n,r,i.maxWidth),FZ(e,n,r,u,i),r+=Number(s.lineHeight);e.restore()}function mp(e,t){const{x:n,y:r,w:s,h:i,radius:o}=t;e.arc(n+o.topLeft,r+o.topLeft,o.topLeft,1.5*rr,rr,!0),e.lineTo(n,r+i-o.bottomLeft),e.arc(n+o.bottomLeft,r+i-o.bottomLeft,o.bottomLeft,rr,Cs,!0),e.lineTo(n+s-o.bottomRight,r+i),e.arc(n+s-o.bottomRight,r+i-o.bottomRight,o.bottomRight,Cs,0,!0),e.lineTo(n+s,r+o.topRight),e.arc(n+s-o.topRight,r+o.topRight,o.topRight,0,-Cs,!0),e.lineTo(n+o.topLeft,r)}const NZ=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,BZ=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function VZ(e,t){const n=(""+e).match(NZ);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const UZ=e=>+e||0;function GM(e,t){const n={},r=St(t),s=r?Object.keys(t):t,i=St(e)?r?o=>At(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of s)n[o]=UZ(i(o));return n}function KM(e){return GM(e,{top:"y",right:"x",bottom:"y",left:"x"})}function zl(e){return GM(e,["topLeft","topRight","bottomLeft","bottomRight"])}function hs(e){const t=KM(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Zn(e,t){e=e||{},t=t||pn.font;let n=At(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=At(e.style,t.style);r&&!(""+r).match(BZ)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const s={family:At(e.family,t.family),lineHeight:VZ(At(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:At(e.weight,t.weight),string:""};return s.string=DZ(s),s}function Tf(e,t,n,r){let s,i,o;for(s=0,i=e.length;s<i;++s)if(o=e[s],o!==void 0&&o!==void 0)return o}function zZ(e,t,n){const{min:r,max:s}=e,i=iZ(t,(s-r)/2),o=(a,l)=>n&&a===0?0:a+l;return{min:o(r,-Math.abs(i)),max:o(s,i)}}function Gu(e,t){return Object.assign(Object.create(e),t)}function pS(e,t=[""],n,r,s=()=>e[0]){const i=n||e;typeof r>"u"&&(r=JM("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:i,_fallback:r,_getTarget:s,override:a=>pS([a,...e],t,i,r)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return XM(a,l,()=>XZ(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return ux(a).includes(l)},ownKeys(a){return ux(a)},set(a,l,u){const c=a._storage||(a._storage=s());return a[l]=c[l]=u,delete a._keys,!0}})}function _u(e,t,n,r){const s={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:YM(e,r),setContext:i=>_u(e,i,n,r),override:i=>_u(e.override(i),t,n,r)};return new Proxy(s,{deleteProperty(i,o){return delete i[o],delete e[o],!0},get(i,o,a){return XM(i,o,()=>jZ(i,o,a))},getOwnPropertyDescriptor(i,o){return i._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(i,o){return Reflect.has(e,o)},ownKeys(){return Reflect.ownKeys(e)},set(i,o,a){return e[o]=a,delete i[o],!0}})}function YM(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:s=t.allKeys}=e;return{allKeys:s,scriptable:n,indexable:r,isScriptable:Uo(n)?n:()=>n,isIndexable:Uo(r)?r:()=>r}}const HZ=(e,t)=>e?e+uS(t):t,mS=(e,t)=>St(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function XM(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function jZ(e,t,n){const{_proxy:r,_context:s,_subProxy:i,_descriptors:o}=e;let a=r[t];return Uo(a)&&o.isScriptable(t)&&(a=qZ(t,a,e,n)),kn(a)&&a.length&&(a=WZ(t,a,e,o.isIndexable)),mS(t,a)&&(a=_u(a,s,i&&i[t],o)),a}function qZ(e,t,n,r){const{_proxy:s,_context:i,_subProxy:o,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(i,o||r);return a.delete(e),mS(e,l)&&(l=gS(s._scopes,s,e,l)),l}function WZ(e,t,n,r){const{_proxy:s,_context:i,_subProxy:o,_descriptors:a}=n;if(typeof i.index<"u"&&r(e))return t[i.index%t.length];if(St(t[0])){const l=t,u=s._scopes.filter(c=>c!==l);t=[];for(const c of l){const d=gS(u,s,e,c);t.push(_u(d,i,o&&o[e],a))}}return t}function QM(e,t,n){return Uo(e)?e(t,n):e}const GZ=(e,t)=>e===!0?t:typeof e=="string"?Su(t,e):void 0;function KZ(e,t,n,r,s){for(const i of t){const o=GZ(n,i);if(o){e.add(o);const a=QM(o._fallback,n,s);if(typeof a<"u"&&a!==n&&a!==r)return a}else if(o===!1&&typeof r<"u"&&n!==r)return null}return!1}function gS(e,t,n,r){const s=t._rootScopes,i=QM(t._fallback,n,r),o=[...e,...s],a=new Set;a.add(r);let l=lx(a,o,n,i||n,r);return l===null||typeof i<"u"&&i!==n&&(l=lx(a,o,i,l,r),l===null)?!1:pS(Array.from(a),[""],s,i,()=>YZ(t,n,r))}function lx(e,t,n,r,s){for(;n;)n=KZ(e,t,n,r,s);return n}function YZ(e,t,n){const r=e._getTarget();t in r||(r[t]={});const s=r[t];return kn(s)&&St(n)?n:s||{}}function XZ(e,t,n,r){let s;for(const i of t)if(s=JM(HZ(i,e),n),typeof s<"u")return mS(e,s)?gS(n,r,e,s):s}function JM(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function ux(e){let t=e._keys;return t||(t=e._keys=QZ(e._scopes)),t}function QZ(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(s=>!s.startsWith("_")))t.add(r);return Array.from(t)}function vS(){return typeof window<"u"&&typeof document<"u"}function yS(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function gp(e,t,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*t.parentNode[n])):r=e,r}const Im=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function JZ(e,t){return Im(e).getPropertyValue(t)}const ZZ=["top","right","bottom","left"];function Na(e,t,n){const r={};n=n?"-"+n:"";for(let s=0;s<4;s++){const i=ZZ[s];r[i]=parseFloat(e[t+"-"+i+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const eee=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function tee(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:s,offsetY:i}=r;let o=!1,a,l;if(eee(s,i,e.target))a=s,l=i;else{const u=t.getBoundingClientRect();a=r.clientX-u.left,l=r.clientY-u.top,o=!0}return{x:a,y:l,box:o}}function ha(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,s=Im(n),i=s.boxSizing==="border-box",o=Na(s,"padding"),a=Na(s,"border","width"),{x:l,y:u,box:c}=tee(e,n),d=o.left+(c&&a.left),f=o.top+(c&&a.top);let{width:p,height:v}=t;return i&&(p-=o.width+a.width,v-=o.height+a.height),{x:Math.round((l-d)/p*n.width/r),y:Math.round((u-f)/v*n.height/r)}}function nee(e,t,n){let r,s;if(t===void 0||n===void 0){const i=e&&yS(e);if(!i)t=e.clientWidth,n=e.clientHeight;else{const o=i.getBoundingClientRect(),a=Im(i),l=Na(a,"border","width"),u=Na(a,"padding");t=o.width-u.width-l.width,n=o.height-u.height-l.height,r=gp(a.maxWidth,i,"clientWidth"),s=gp(a.maxHeight,i,"clientHeight")}}return{width:t,height:n,maxWidth:r||hp,maxHeight:s||hp}}const Rf=e=>Math.round(e*10)/10;function ree(e,t,n,r){const s=Im(e),i=Na(s,"margin"),o=gp(s.maxWidth,e,"clientWidth")||hp,a=gp(s.maxHeight,e,"clientHeight")||hp,l=nee(e,t,n);let{width:u,height:c}=l;if(s.boxSizing==="content-box"){const f=Na(s,"border","width"),p=Na(s,"padding");u-=p.width+f.width,c-=p.height+f.height}return u=Math.max(0,u-i.width),c=Math.max(0,r?u/r:c-i.height),u=Rf(Math.min(u,o,l.maxWidth)),c=Rf(Math.min(c,a,l.maxHeight)),u&&!c&&(c=Rf(u/2)),(t!==void 0||n!==void 0)&&r&&l.height&&c>l.height&&(c=l.height,u=Rf(Math.floor(c*r))),{width:u,height:c}}function cx(e,t,n){const r=t||1,s=Math.floor(e.height*r),i=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||o.height!==s||o.width!==i?(e.currentDevicePixelRatio=r,o.height=s,o.width=i,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const see=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};vS()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function dx(e,t){const n=JZ(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}const iee=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},oee=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Hl(e,t,n){return e?iee(t,n):oee()}function ZM(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function eD(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}/*!
|
|
78
|
-
* Chart.js v4.4.8
|
|
79
|
-
* https://www.chartjs.org
|
|
80
|
-
* (c) 2025 Chart.js Contributors
|
|
81
|
-
* Released under the MIT License
|
|
82
|
-
*/class aee{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,s){const i=n.listeners[s],o=n.duration;i.forEach(a=>a({chart:t,initial:n.initial,numSteps:o,currentStep:Math.min(r-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=BM.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,s)=>{if(!r.running||!r.items.length)return;const i=r.items;let o=i.length-1,a=!1,l;for(;o>=0;--o)l=i[o],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),a=!0):(i[o]=i[i.length-1],i.pop());a&&(s.draw(),this._notify(s,r,t,"progress")),i.length||(r.running=!1,this._notify(s,r,t,"complete"),r.initial=!1),n+=i.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,s)=>Math.max(r,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let s=r.length-1;for(;s>=0;--s)r[s].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var xi=new aee;const fx="transparent",lee={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=rx(e||fx),s=r.valid&&rx(t||fx);return s&&s.valid?s.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class uee{constructor(t,n,r,s){const i=n[r];s=Tf([t.to,s,i,t.from]);const o=Tf([t.from,i,s]);this._active=!0,this._fn=t.fn||lee[t.type||typeof o],this._easing=Nc[t.easing]||Nc.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const s=this._target[this._prop],i=r-this._start,o=this._duration-i;this._start=r,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=i,this._loop=!!t.loop,this._to=Tf([t.to,n,s,t.from]),this._from=Tf([t.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,s=this._prop,i=this._from,o=this._loop,a=this._to;let l;if(this._active=i!==a&&(o||n<r),!this._active){this._target[s]=a,this._notify(!0);return}if(n<0){this._target[s]=i;return}l=n/r%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(i,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let s=0;s<r.length;s++)r[s][n]()}}class tD{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!St(t))return;const n=Object.keys(pn.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const i=t[s];if(!St(i))return;const o={};for(const a of n)o[a]=i[a];(kn(i.properties)&&i.properties||[s]).forEach(a=>{(a===s||!r.has(a))&&r.set(a,o)})})}_animateOptions(t,n){const r=n.options,s=dee(t,r);if(!s)return[];const i=this._createAnimations(s,r);return r.$shared&&cee(t.options.$animations,r).then(()=>{t.options=r},()=>{}),i}_createAnimations(t,n){const r=this._properties,s=[],i=t.$animations||(t.$animations={}),o=Object.keys(n),a=Date.now();let l;for(l=o.length-1;l>=0;--l){const u=o[l];if(u.charAt(0)==="$")continue;if(u==="options"){s.push(...this._animateOptions(t,n));continue}const c=n[u];let d=i[u];const f=r.get(u);if(d)if(f&&d.active()){d.update(f,c,a);continue}else d.cancel();if(!f||!f.duration){t[u]=c;continue}i[u]=d=new uee(f,t,u,c),s.push(d)}return s}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return xi.add(this._chart,r),!0}}function cee(e,t){const n=[],r=Object.keys(t);for(let s=0;s<r.length;s++){const i=e[r[s]];i&&i.active()&&n.push(i.wait())}return Promise.all(n)}function dee(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function hx(e,t){const n=e&&e.options||{},r=n.reverse,s=n.min===void 0?t:0,i=n.max===void 0?t:0;return{start:r?i:s,end:r?s:i}}function fee(e,t,n){if(n===!1)return!1;const r=hx(e,n),s=hx(t,n);return{top:s.end,right:r.end,bottom:s.start,left:r.start}}function hee(e){let t,n,r,s;return St(e)?(t=e.top,n=e.right,r=e.bottom,s=e.left):t=n=r=s=e,{top:t,right:n,bottom:r,left:s,disabled:e===!1}}function nD(e,t){const n=[],r=e._getSortedDatasetMetas(t);let s,i;for(s=0,i=r.length;s<i;++s)n.push(r[s].index);return n}function px(e,t,n,r={}){const s=e.keys,i=r.mode==="single";let o,a,l,u;if(t===null)return;let c=!1;for(o=0,a=s.length;o<a;++o){if(l=+s[o],l===n){if(c=!0,r.all)continue;break}u=e.values[l],fs(u)&&(i||t===0||$o(t)===$o(u))&&(t+=u)}return!c&&!r.all?0:t}function pee(e,t){const{iScale:n,vScale:r}=t,s=n.axis==="x"?"x":"y",i=r.axis==="x"?"x":"y",o=Object.keys(e),a=new Array(o.length);let l,u,c;for(l=0,u=o.length;l<u;++l)c=o[l],a[l]={[s]:c,[i]:e[c]};return a}function zg(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function mee(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function gee(e){const{min:t,max:n,minDefined:r,maxDefined:s}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:s?n:Number.POSITIVE_INFINITY}}function vee(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function mx(e,t,n,r){for(const s of t.getMatchingVisibleMetas(r).reverse()){const i=e[s.index];if(n&&i>0||!n&&i<0)return s.index}return null}function gx(e,t){const{chart:n,_cachedMeta:r}=e,s=n._stacks||(n._stacks={}),{iScale:i,vScale:o,index:a}=r,l=i.axis,u=o.axis,c=mee(i,o,r),d=t.length;let f;for(let p=0;p<d;++p){const v=t[p],{[l]:m,[u]:y}=v,b=v._stacks||(v._stacks={});f=b[u]=vee(s,c,m),f[a]=y,f._top=mx(f,o,!0,r.type),f._bottom=mx(f,o,!1,r.type);const w=f._visualValues||(f._visualValues={});w[a]=y}}function Hg(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function yee(e,t){return Gu(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function bee(e,t,n){return Gu(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function ac(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const s of t){const i=s._stacks;if(!i||i[r]===void 0||i[r][n]===void 0)return;delete i[r][n],i[r]._visualValues!==void 0&&i[r]._visualValues[n]!==void 0&&delete i[r]._visualValues[n]}}}const jg=e=>e==="reset"||e==="none",vx=(e,t)=>t?e:Object.assign({},e),wee=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:nD(n,!0),values:null};class Vc{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=zg(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&&ac(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),s=(d,f,p,v)=>d==="x"?f:d==="r"?v:p,i=n.xAxisID=At(r.xAxisID,Hg(t,"x")),o=n.yAxisID=At(r.yAxisID,Hg(t,"y")),a=n.rAxisID=At(r.rAxisID,Hg(t,"r")),l=n.indexAxis,u=n.iAxisID=s(l,i,o,a),c=n.vAxisID=s(l,o,i,a);n.xScale=this.getScaleForId(i),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(u),n.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&ex(this._data,this),t._stacked&&ac(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(St(n)){const s=this._cachedMeta;this._data=pee(n,s)}else if(r!==n){if(r){ex(r,this);const s=this._cachedMeta;ac(s),s._parsed=[]}n&&Object.isExtensible(n)&&kZ(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let s=!1;this._dataCheck();const i=n._stacked;n._stacked=zg(n.vScale,n),n.stack!==r.stack&&(s=!0,ac(n),n.stack=r.stack),this._resyncElements(t),(s||i!==n._stacked)&&(gx(this,n._parsed),n._stacked=zg(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:s}=this,{iScale:i,_stacked:o}=r,a=i.axis;let l=t===0&&n===s.length?!0:r._sorted,u=t>0&&r._parsed[t-1],c,d,f;if(this._parsing===!1)r._parsed=s,r._sorted=!0,f=s;else{kn(s[t])?f=this.parseArrayData(r,s,t,n):St(s[t])?f=this.parseObjectData(r,s,t,n):f=this.parsePrimitiveData(r,s,t,n);const p=()=>d[a]===null||u&&d[a]<u[a];for(c=0;c<n;++c)r._parsed[c+t]=d=f[c],l&&(p()&&(l=!1),u=d);r._sorted=l}o&&gx(this,f)}parsePrimitiveData(t,n,r,s){const{iScale:i,vScale:o}=t,a=i.axis,l=o.axis,u=i.getLabels(),c=i===o,d=new Array(s);let f,p,v;for(f=0,p=s;f<p;++f)v=f+r,d[f]={[a]:c||i.parse(u[v],v),[l]:o.parse(n[v],v)};return d}parseArrayData(t,n,r,s){const{xScale:i,yScale:o}=t,a=new Array(s);let l,u,c,d;for(l=0,u=s;l<u;++l)c=l+r,d=n[c],a[l]={x:i.parse(d[0],c),y:o.parse(d[1],c)};return a}parseObjectData(t,n,r,s){const{xScale:i,yScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,u=new Array(s);let c,d,f,p;for(c=0,d=s;c<d;++c)f=c+r,p=n[f],u[c]={x:i.parse(Su(p,a),f),y:o.parse(Su(p,l),f)};return u}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const s=this.chart,i=this._cachedMeta,o=n[t.axis],a={keys:nD(s,!0),values:n._stacks[t.axis]._visualValues};return px(a,o,i.index,{mode:r})}updateRangeFromParsed(t,n,r,s){const i=r[n.axis];let o=i===null?NaN:i;const a=s&&r._stacks[n.axis];s&&a&&(s.values=a,o=px(s,i,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,n){const r=this._cachedMeta,s=r._parsed,i=r._sorted&&t===r.iScale,o=s.length,a=this._getOtherScale(t),l=wee(n,r,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=gee(a);let f,p;function v(){p=s[f];const m=p[a.axis];return!fs(p[t.axis])||c>m||d<m}for(f=0;f<o&&!(!v()&&(this.updateRangeFromParsed(u,t,p,l),i));++f);if(i){for(f=o-1;f>=0;--f)if(!v()){this.updateRangeFromParsed(u,t,p,l);break}}return u}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let s,i,o;for(s=0,i=n.length;s<i;++s)o=n[s][t.axis],fs(o)&&r.push(o);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,s=n.vScale,i=this.getParsed(t);return{label:r?""+r.getLabelForValue(i[r.axis]):"",value:s?""+s.getLabelForValue(i[s.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=hee(At(this.options.clip,fee(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,s=r.data||[],i=n.chartArea,o=[],a=this._drawStart||0,l=this._drawCount||s.length-a,u=this.options.drawActiveElementsOnTop;let c;for(r.dataset&&r.dataset.draw(t,i,a,l),c=a;c<a+l;++c){const d=s[c];d.hidden||(d.active&&u?o.push(d):d.draw(t,i))}for(c=0;c<o.length;++c)o[c].draw(t,i)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const s=this.getDataset();let i;if(t>=0&&t<this._cachedMeta.data.length){const o=this._cachedMeta.data[t];i=o.$context||(o.$context=bee(this.getContext(),t,o)),i.parsed=this.getParsed(t),i.raw=s.data[t],i.index=i.dataIndex=t}else i=this.$context||(this.$context=yee(this.chart.getContext(),this.index)),i.dataset=s,i.index=i.datasetIndex=this.index;return i.active=!!n,i.mode=r,i}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const s=n==="active",i=this._cachedDataOpts,o=t+"-"+n,a=i[o],l=this.enableOptionSharing&&hd(r);if(a)return vx(a,l);const u=this.chart.config,c=u.datasetElementScopeKeys(this._type,t),d=s?[`${t}Hover`,"hover",t,""]:[t,""],f=u.getOptionScopes(this.getDataset(),c),p=Object.keys(pn.elements[t]),v=()=>this.getContext(r,s,n),m=u.resolveNamedOptions(f,p,v,d);return m.$shared&&(m.$shared=l,i[o]=Object.freeze(vx(m,l))),m}_resolveAnimations(t,n,r){const s=this.chart,i=this._cachedDataOpts,o=`animation-${n}`,a=i[o];if(a)return a;let l;if(s.options.animation!==!1){const c=this.chart.config,d=c.datasetAnimationScopeKeys(this._type,n),f=c.getOptionScopes(this.getDataset(),d);l=c.createResolver(f,this.getContext(t,r,n))}const u=new tD(s,l&&l.animations);return l&&l._cacheable&&(i[o]=Object.freeze(u)),u}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||jg(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),s=this._sharedOptions,i=this.getSharedOptions(r),o=this.includeOptions(n,i)||i!==s;return this.updateSharedOptions(i,n,r),{sharedOptions:i,includeOptions:o}}updateElement(t,n,r,s){jg(s)?Object.assign(t,r):this._resolveAnimations(n,s).update(t,r)}updateSharedOptions(t,n,r){t&&!jg(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,s){t.active=s;const i=this.getStyle(n,s);this._resolveAnimations(n,r,s).update(t,{options:!s&&this.getSharedOptions(i)||i})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[a,l,u]of this._syncList)this[a](l,u);this._syncList=[];const s=r.length,i=n.length,o=Math.min(i,s);o&&this.parse(0,o),i>s?this._insertElements(s,i-s,t):i<s&&this._removeElements(i,s-i)}_insertElements(t,n,r=!0){const s=this._cachedMeta,i=s.data,o=t+n;let a;const l=u=>{for(u.length+=n,a=u.length-1;a>=o;a--)u[a]=u[a-n]};for(l(i),a=t;a<o;++a)i[a]=new this.dataElementType;this._parsing&&l(s._parsed),this.parse(t,n),r&&this.updateElements(i,t,n,"reset")}updateElements(t,n,r,s){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const s=r._parsed.splice(t,n);r._stacked&&ac(r,s)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,s]=t;this[n](r,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}ve(Vc,"defaults",{}),ve(Vc,"datasetElementType",null),ve(Vc,"dataElementType",null);function See(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let s=0,i=n.length;s<i;s++)r=r.concat(n[s].controller.getAllParsedValues(e));e._cache.$bar=NM(r.sort((s,i)=>s-i))}return e._cache.$bar}function _ee(e){const t=e.iScale,n=See(t,e.type);let r=t._length,s,i,o,a;const l=()=>{o===32767||o===-32768||(hd(a)&&(r=Math.min(r,Math.abs(o-a)||r)),a=o)};for(s=0,i=n.length;s<i;++s)o=t.getPixelForValue(n[s]),l();for(a=void 0,s=0,i=t.ticks.length;s<i;++s)o=t.getPixelForTick(s),l();return r}function kee(e,t,n,r){const s=n.barThickness;let i,o;return Nt(s)?(i=t.min*n.categoryPercentage,o=n.barPercentage):(i=s*r,o=1),{chunk:i/r,ratio:o,start:t.pixels[e]-i/2}}function xee(e,t,n,r){const s=t.pixels,i=s[e];let o=e>0?s[e-1]:null,a=e<s.length-1?s[e+1]:null;const l=n.categoryPercentage;o===null&&(o=i-(a===null?t.end-t.start:a-i)),a===null&&(a=i+i-o);const u=i-(i-Math.min(o,a))/2*l;return{chunk:Math.abs(a-o)/2*l/r,ratio:n.barPercentage,start:u}}function Eee(e,t,n,r){const s=n.parse(e[0],r),i=n.parse(e[1],r),o=Math.min(s,i),a=Math.max(s,i);let l=o,u=a;Math.abs(o)>Math.abs(a)&&(l=a,u=o),t[n.axis]=u,t._custom={barStart:l,barEnd:u,start:s,end:i,min:o,max:a}}function rD(e,t,n,r){return kn(e)?Eee(e,t,n,r):t[n.axis]=n.parse(e,r),t}function yx(e,t,n,r){const s=e.iScale,i=e.vScale,o=s.getLabels(),a=s===i,l=[];let u,c,d,f;for(u=n,c=n+r;u<c;++u)f=t[u],d={},d[s.axis]=a||s.parse(o[u],u),l.push(rD(f,d,i,u));return l}function qg(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function Cee(e,t,n){return e!==0?$o(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function Pee(e){let t,n,r,s,i;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(s="end",i="start"):(s="start",i="end"),{start:n,end:r,reverse:t,top:s,bottom:i}}function Tee(e,t,n,r){let s=t.borderSkipped;const i={};if(!s){e.borderSkipped=i;return}if(s===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:a,reverse:l,top:u,bottom:c}=Pee(e);s==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?s=u:(n._bottom||0)===r?s=c:(i[bx(c,o,a,l)]=!0,s=u)),i[bx(s,o,a,l)]=!0,e.borderSkipped=i}function bx(e,t,n,r){return r?(e=Ree(e,t,n),e=wx(e,n,t)):e=wx(e,t,n),e}function Ree(e,t,n){return e===t?n:e===n?t:e}function wx(e,t,n){return e==="start"?t:e==="end"?n:e}function Iee(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class gh extends Vc{parsePrimitiveData(t,n,r,s){return yx(t,n,r,s)}parseArrayData(t,n,r,s){return yx(t,n,r,s)}parseObjectData(t,n,r,s){const{iScale:i,vScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,u=i.axis==="x"?a:l,c=o.axis==="x"?a:l,d=[];let f,p,v,m;for(f=r,p=r+s;f<p;++f)m=n[f],v={},v[i.axis]=i.parse(Su(m,u),f),d.push(rD(Su(m,c),v,o,f));return d}updateRangeFromParsed(t,n,r,s){super.updateRangeFromParsed(t,n,r,s);const i=r._custom;i&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,i.min),t.max=Math.max(t.max,i.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:s}=n,i=this.getParsed(t),o=i._custom,a=qg(o)?"["+o.start+", "+o.end+"]":""+s.getLabelForValue(i[s.axis]);return{label:""+r.getLabelForValue(i[r.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,s){const i=s==="reset",{index:o,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),u=a.isHorizontal(),c=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,s);for(let p=n;p<n+r;p++){const v=this.getParsed(p),m=i||Nt(v[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),y=this._calculateBarIndexPixels(p,c),b=(v._stacks||{})[a.axis],w={horizontal:u,base:m.base,enableBorderRadius:!b||qg(v._custom)||o===b._top||o===b._bottom,x:u?m.head:y.center,y:u?y.center:m.head,height:u?y.size:Math.abs(m.size),width:u?Math.abs(m.size):y.size};f&&(w.options=d||this.resolveDataElementOptions(p,t[p].active?"active":s));const x=w.options||t[p].options;Tee(w,x,b,o),Iee(w,x,c.ratio),this.updateElement(t[p],p,w,s)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,s=r.getMatchingVisibleMetas(this._type).filter(c=>c.controller.options.grouped),i=r.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(n),l=a&&a[r.axis],u=c=>{const d=c._parsed.find(p=>p[r.axis]===l),f=d&&d[c.vScale.axis];if(Nt(f)||isNaN(f))return!0};for(const c of s)if(!(n!==void 0&&u(c))&&((i===!1||o.indexOf(c.stack)===-1||i===void 0&&c.stack===void 0)&&o.push(c.stack),c.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const s=this._getStacks(t,r),i=n!==void 0?s.indexOf(n):-1;return i===-1?s.length-1:i}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,s=[];let i,o;for(i=0,o=n.data.length;i<o;++i)s.push(r.getPixelForValue(this.getParsed(i)[r.axis],i));const a=t.barThickness;return{min:a||_ee(n),pixels:s,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r,index:s},options:{base:i,minBarLength:o}}=this,a=i||0,l=this.getParsed(t),u=l._custom,c=qg(u);let d=l[n.axis],f=0,p=r?this.applyStack(n,l,r):d,v,m;p!==d&&(f=p-d,p=d),c&&(d=u.barStart,p=u.barEnd-u.barStart,d!==0&&$o(d)!==$o(u.barEnd)&&(f=0),f+=d);const y=!Nt(i)&&!c?i:f;let b=n.getPixelForValue(y);if(this.chart.getDataVisibility(t)?v=n.getPixelForValue(f+p):v=b,m=v-b,Math.abs(m)<o){m=Cee(m,n,a)*o,d===a&&(b-=m/2);const w=n.getPixelForDecimal(0),x=n.getPixelForDecimal(1),P=Math.min(w,x),S=Math.max(w,x);b=Math.max(Math.min(b,S),P),v=b+m,r&&!c&&(l._stacks[n.axis]._visualValues[s]=n.getValueForPixel(v)-n.getValueForPixel(b))}if(b===n.getPixelForValue(a)){const w=$o(m)*n.getLineWidthForValue(a)/2;b+=w,m-=w}return{size:m,base:b,head:v,center:v+m/2}}_calculateBarIndexPixels(t,n){const r=n.scale,s=this.options,i=s.skipNull,o=At(s.maxBarThickness,1/0);let a,l;if(n.grouped){const u=i?this._getStackCount(t):n.stackCount,c=s.barThickness==="flex"?xee(t,n,s,u):kee(t,n,s,u),d=this._getStackIndex(this.index,this._cachedMeta.stack,i?t:void 0);a=c.start+c.chunk*d+c.chunk/2,l=Math.min(o,c.chunk*c.ratio)}else a=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(o,n.min*n.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,s=r.length;let i=0;for(;i<s;++i)this.getParsed(i)[n.axis]!==null&&!r[i].hidden&&r[i].draw(this._ctx)}}ve(gh,"id","bar"),ve(gh,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),ve(gh,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function ua(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class bS{constructor(t){ve(this,"options");this.options=t||{}}static override(t){Object.assign(bS.prototype,t)}init(){}formats(){return ua()}parse(){return ua()}format(){return ua()}add(){return ua()}diff(){return ua()}startOf(){return ua()}endOf(){return ua()}}var Aee={_date:bS};function Oee(e,t,n,r){const{controller:s,data:i,_sorted:o}=e,a=s._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&o&&i.length){const u=a._reversePixels?SZ:nb;if(r){if(s._sharedOptions){const c=i[0],d=typeof c.getRange=="function"&&c.getRange(t);if(d){const f=u(i,t,n-d),p=u(i,t,n+d);return{lo:f.lo,hi:p.hi}}}}else{const c=u(i,t,n);if(l){const{vScale:d}=s._cachedMeta,{_parsed:f}=e,p=f.slice(0,c.lo+1).reverse().findIndex(m=>!Nt(m[d.axis]));c.lo-=Math.max(0,p);const v=f.slice(c.hi).findIndex(m=>!Nt(m[d.axis]));c.hi+=Math.max(0,v)}return c}}return{lo:0,hi:i.length-1}}function Wd(e,t,n,r,s){const i=e.getSortedVisibleDatasetMetas(),o=n[t];for(let a=0,l=i.length;a<l;++a){const{index:u,data:c}=i[a],{lo:d,hi:f}=Oee(i[a],t,o,s);for(let p=d;p<=f;++p){const v=c[p];v.skip||r(v,u,p)}}}function Mee(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,s){const i=t?Math.abs(r.x-s.x):0,o=n?Math.abs(r.y-s.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(o,2))}}function Wg(e,t,n,r,s){const i=[];return!s&&!e.isPointInArea(t)||Wd(e,n,t,function(a,l,u){!s&&!WM(a,e.chartArea,0)||a.inRange(t.x,t.y,r)&&i.push({element:a,datasetIndex:l,index:u})},!0),i}function Dee(e,t,n,r){let s=[];function i(o,a,l){const{startAngle:u,endAngle:c}=o.getProps(["startAngle","endAngle"],r),{angle:d}=vZ(o,{x:t.x,y:t.y});bZ(d,u,c)&&s.push({element:o,datasetIndex:a,index:l})}return Wd(e,n,t,i),s}function $ee(e,t,n,r,s,i){let o=[];const a=Mee(n);let l=Number.POSITIVE_INFINITY;function u(c,d,f){const p=c.inRange(t.x,t.y,s);if(r&&!p)return;const v=c.getCenterPoint(s);if(!(!!i||e.isPointInArea(v))&&!p)return;const y=a(t,v);y<l?(o=[{element:c,datasetIndex:d,index:f}],l=y):y===l&&o.push({element:c,datasetIndex:d,index:f})}return Wd(e,n,t,u),o}function Gg(e,t,n,r,s,i){return!i&&!e.isPointInArea(t)?[]:n==="r"&&!r?Dee(e,t,n,s):$ee(e,t,n,r,s,i)}function Sx(e,t,n,r,s){const i=[],o=n==="x"?"inXRange":"inYRange";let a=!1;return Wd(e,n,t,(l,u,c)=>{l[o]&&l[o](t[n],s)&&(i.push({element:l,datasetIndex:u,index:c}),a=a||l.inRange(t.x,t.y,s))}),r&&!a?[]:i}var Fee={evaluateInteractionItems:Wd,modes:{index(e,t,n,r){const s=ha(t,e),i=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?Wg(e,s,i,r,o):Gg(e,s,i,!1,r,o),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(u=>{const c=a[0].index,d=u.data[c];d&&!d.skip&&l.push({element:d,datasetIndex:u.index,index:c})}),l):[]},dataset(e,t,n,r){const s=ha(t,e),i=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?Wg(e,s,i,r,o):Gg(e,s,i,!1,r,o);if(a.length>0){const l=a[0].datasetIndex,u=e.getDatasetMeta(l).data;a=[];for(let c=0;c<u.length;++c)a.push({element:u[c],datasetIndex:l,index:c})}return a},point(e,t,n,r){const s=ha(t,e),i=n.axis||"xy",o=n.includeInvisible||!1;return Wg(e,s,i,r,o)},nearest(e,t,n,r){const s=ha(t,e),i=n.axis||"xy",o=n.includeInvisible||!1;return Gg(e,s,i,n.intersect,r,o)},x(e,t,n,r){const s=ha(t,e);return Sx(e,s,"x",n.intersect,r)},y(e,t,n,r){const s=ha(t,e);return Sx(e,s,"y",n.intersect,r)}}};const sD=["left","top","right","bottom"];function lc(e,t){return e.filter(n=>n.pos===t)}function _x(e,t){return e.filter(n=>sD.indexOf(n.pos)===-1&&n.box.axis===t)}function uc(e,t){return e.sort((n,r)=>{const s=t?r:n,i=t?n:r;return s.weight===i.weight?s.index-i.index:s.weight-i.weight})}function Lee(e){const t=[];let n,r,s,i,o,a;for(n=0,r=(e||[]).length;n<r;++n)s=e[n],{position:i,options:{stack:o,stackWeight:a=1}}=s,t.push({index:n,box:s,pos:i,horizontal:s.isHorizontal(),weight:s.weight,stack:o&&i+o,stackWeight:a});return t}function Nee(e){const t={};for(const n of e){const{stack:r,pos:s,stackWeight:i}=n;if(!r||!sD.includes(s))continue;const o=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=i}return t}function Bee(e,t){const n=Nee(e),{vBoxMaxWidth:r,hBoxMaxHeight:s}=t;let i,o,a;for(i=0,o=e.length;i<o;++i){a=e[i];const{fullSize:l}=a.box,u=n[a.stack],c=u&&a.stackWeight/u.weight;a.horizontal?(a.width=c?c*r:l&&t.availableWidth,a.height=s):(a.width=r,a.height=c?c*s:l&&t.availableHeight)}return n}function Vee(e){const t=Lee(e),n=uc(t.filter(u=>u.box.fullSize),!0),r=uc(lc(t,"left"),!0),s=uc(lc(t,"right")),i=uc(lc(t,"top"),!0),o=uc(lc(t,"bottom")),a=_x(t,"x"),l=_x(t,"y");return{fullSize:n,leftAndTop:r.concat(i),rightAndBottom:s.concat(l).concat(o).concat(a),chartArea:lc(t,"chartArea"),vertical:r.concat(s).concat(l),horizontal:i.concat(o).concat(a)}}function kx(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function iD(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function Uee(e,t,n,r){const{pos:s,box:i}=n,o=e.maxPadding;if(!St(s)){n.size&&(e[s]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?i.height:i.width),n.size=d.size/d.count,e[s]+=n.size}i.getPadding&&iD(o,i.getPadding());const a=Math.max(0,t.outerWidth-kx(o,e,"left","right")),l=Math.max(0,t.outerHeight-kx(o,e,"top","bottom")),u=a!==e.w,c=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:u,other:c}:{same:c,other:u}}function zee(e){const t=e.maxPadding;function n(r){const s=Math.max(t[r]-e[r],0);return e[r]+=s,s}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function Hee(e,t){const n=t.maxPadding;function r(s){const i={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{i[o]=Math.max(t[o],n[o])}),i}return r(e?["left","right"]:["top","bottom"])}function bc(e,t,n,r){const s=[];let i,o,a,l,u,c;for(i=0,o=e.length,u=0;i<o;++i){a=e[i],l=a.box,l.update(a.width||t.w,a.height||t.h,Hee(a.horizontal,t));const{same:d,other:f}=Uee(t,n,a,r);u|=d&&s.length,c=c||f,l.fullSize||s.push(a)}return u&&bc(s,t,n,r)||c}function If(e,t,n,r,s){e.top=n,e.left=t,e.right=t+r,e.bottom=n+s,e.width=r,e.height=s}function xx(e,t,n,r){const s=n.padding;let{x:i,y:o}=t;for(const a of e){const l=a.box,u=r[a.stack]||{count:1,placed:0,weight:1},c=a.stackWeight/u.weight||1;if(a.horizontal){const d=t.w*c,f=u.size||l.height;hd(u.start)&&(o=u.start),l.fullSize?If(l,s.left,o,n.outerWidth-s.right-s.left,f):If(l,t.left+u.placed,o,d,f),u.start=o,u.placed+=d,o=l.bottom}else{const d=t.h*c,f=u.size||l.width;hd(u.start)&&(i=u.start),l.fullSize?If(l,i,s.top,f,n.outerHeight-s.bottom-s.top):If(l,i,t.top+u.placed,f,d),u.start=i,u.placed+=d,i=l.right}}t.x=i,t.y=o}var is={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const s=hs(e.options.layout.padding),i=Math.max(t-s.width,0),o=Math.max(n-s.height,0),a=Vee(e.boxes),l=a.vertical,u=a.horizontal;It(e.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});const c=l.reduce((m,y)=>y.box.options&&y.box.options.display===!1?m:m+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:s,availableWidth:i,availableHeight:o,vBoxMaxWidth:i/2/c,hBoxMaxHeight:o/2}),f=Object.assign({},s);iD(f,hs(r));const p=Object.assign({maxPadding:f,w:i,h:o,x:s.left,y:s.top},s),v=Bee(l.concat(u),d);bc(a.fullSize,p,d,v),bc(l,p,d,v),bc(u,p,d,v)&&bc(l,p,d,v),zee(p),xx(a.leftAndTop,p,d,v),p.x+=p.w,p.y+=p.h,xx(a.rightAndBottom,p,d,v),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},It(a.chartArea,m=>{const y=m.box;Object.assign(y,e.chartArea),y.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class oD{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,s){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,s?Math.floor(n/s):r)}}isAttached(t){return!0}updateConfig(t){}}class jee extends oD{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const vh="$chartjs",qee={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ex=e=>e===null||e==="";function Wee(e,t){const n=e.style,r=e.getAttribute("height"),s=e.getAttribute("width");if(e[vh]={initial:{height:r,width:s,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Ex(s)){const i=dx(e,"width");i!==void 0&&(e.width=i)}if(Ex(r))if(e.style.height==="")e.height=e.width/(t||2);else{const i=dx(e,"height");i!==void 0&&(e.height=i)}return e}const aD=see?{passive:!0}:!1;function Gee(e,t,n){e&&e.addEventListener(t,n,aD)}function Kee(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,aD)}function Yee(e,t){const n=qee[e.type]||e.type,{x:r,y:s}=ha(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:s!==void 0?s:null}}function vp(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function Xee(e,t,n){const r=e.canvas,s=new MutationObserver(i=>{let o=!1;for(const a of i)o=o||vp(a.addedNodes,r),o=o&&!vp(a.removedNodes,r);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function Qee(e,t,n){const r=e.canvas,s=new MutationObserver(i=>{let o=!1;for(const a of i)o=o||vp(a.removedNodes,r),o=o&&!vp(a.addedNodes,r);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const md=new Map;let Cx=0;function lD(){const e=window.devicePixelRatio;e!==Cx&&(Cx=e,md.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function Jee(e,t){md.size||window.addEventListener("resize",lD),md.set(e,t)}function Zee(e){md.delete(e),md.size||window.removeEventListener("resize",lD)}function ete(e,t,n){const r=e.canvas,s=r&&yS(r);if(!s)return;const i=VM((a,l)=>{const u=s.clientWidth;n(a,l),u<s.clientWidth&&n()},window),o=new ResizeObserver(a=>{const l=a[0],u=l.contentRect.width,c=l.contentRect.height;u===0&&c===0||i(u,c)});return o.observe(s),Jee(e,i),o}function Kg(e,t,n){n&&n.disconnect(),t==="resize"&&Zee(e)}function tte(e,t,n){const r=e.canvas,s=VM(i=>{e.ctx!==null&&n(Yee(i,e))},e);return Gee(r,t,s),s}class nte extends oD{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(Wee(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[vh])return!1;const r=n[vh].initial;["height","width"].forEach(i=>{const o=r[i];Nt(o)?n.removeAttribute(i):n.setAttribute(i,o)});const s=r.style||{};return Object.keys(s).forEach(i=>{n.style[i]=s[i]}),n.width=n.width,delete n[vh],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const s=t.$proxies||(t.$proxies={}),o={attach:Xee,detach:Qee,resize:ete}[n]||tte;s[n]=o(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),s=r[n];if(!s)return;({attach:Kg,detach:Kg,resize:Kg}[n]||Kee)(t,n,s),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,s){return ree(t,n,r,s)}isAttached(t){const n=t&&yS(t);return!!(n&&n.isConnected)}}function rte(e){return!vS()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?jee:nte}var zf;let Ku=(zf=class{constructor(){ve(this,"x");ve(this,"y");ve(this,"active",!1);ve(this,"options");ve(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return pp(this.x)&&pp(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const s={};return t.forEach(i=>{s[i]=r[i]&&r[i].active()?r[i]._to:this[i]}),s}},ve(zf,"defaults",{}),ve(zf,"defaultRoutes"),zf);function ste(e,t){const n=e.options.ticks,r=ite(e),s=Math.min(n.maxTicksLimit||r,r),i=n.major.enabled?ate(t):[],o=i.length,a=i[0],l=i[o-1],u=[];if(o>s)return lte(t,u,i,o/s),u;const c=ote(i,t,s);if(o>0){let d,f;const p=o>1?Math.round((l-a)/(o-1)):null;for(Af(t,u,c,Nt(p)?0:a-p,a),d=0,f=o-1;d<f;d++)Af(t,u,c,i[d],i[d+1]);return Af(t,u,c,l,Nt(p)?t.length:l+p),u}return Af(t,u,c),u}function ite(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),s=e._maxLength/n;return Math.floor(Math.min(r,s))}function ote(e,t,n){const r=ute(e),s=t.length/n;if(!r)return Math.max(s,1);const i=fZ(r);for(let o=0,a=i.length-1;o<a;o++){const l=i[o];if(l>s)return l}return Math.max(s,1)}function ate(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function lte(e,t,n,r){let s=0,i=n[0],o;for(r=Math.ceil(r),o=0;o<e.length;o++)o===i&&(t.push(e[o]),s++,i=n[s*r])}function Af(e,t,n,r,s){const i=At(r,0),o=Math.min(At(s,e.length),e.length);let a=0,l,u,c;for(n=Math.ceil(n),s&&(l=s-r,n=l/Math.floor(l/n)),c=i;c<0;)a++,c=Math.round(i+a*n);for(u=Math.max(i,0);u<o;u++)u===c&&(t.push(e[u]),a++,c=Math.round(i+a*n))}function ute(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const cte=e=>e==="left"?"right":e==="right"?"left":e,Px=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Tx=(e,t)=>Math.min(t||e,e);function Rx(e,t){const n=[],r=e.length/t,s=e.length;let i=0;for(;i<s;i+=r)n.push(e[Math.floor(i)]);return n}function dte(e,t,n){const r=e.ticks.length,s=Math.min(t,r-1),i=e._startPixel,o=e._endPixel,a=1e-6;let l=e.getPixelForTick(s),u;if(!(n&&(r===1?u=Math.max(l-i,o-l):t===0?u=(e.getPixelForTick(1)-l)/2:u=(l-e.getPixelForTick(s-1))/2,l+=s<t?u:-u,l<i-a||l>o+a)))return l}function fte(e,t){It(e,n=>{const r=n.gc,s=r.length/2;let i;if(s>t){for(i=0;i<s;++i)delete n.data[r[i]];r.splice(0,s)}})}function cc(e){return e.drawTicks?e.tickLength:0}function Ix(e,t){if(!e.display)return 0;const n=Zn(e.font,t),r=hs(e.padding);return(kn(e.text)?e.text.length:1)*n.lineHeight+r.height}function hte(e,t){return Gu(e,{scale:t,type:"scale"})}function pte(e,t,n){return Gu(e,{tick:n,index:t,type:"tick"})}function mte(e,t,n){let r=dS(e);return(n&&t!=="right"||!n&&t==="right")&&(r=cte(r)),r}function gte(e,t,n,r){const{top:s,left:i,bottom:o,right:a,chart:l}=e,{chartArea:u,scales:c}=l;let d=0,f,p,v;const m=o-s,y=a-i;if(e.isHorizontal()){if(p=qn(r,i,a),St(n)){const b=Object.keys(n)[0],w=n[b];v=c[b].getPixelForValue(w)+m-t}else n==="center"?v=(u.bottom+u.top)/2+m-t:v=Px(e,n,t);f=a-i}else{if(St(n)){const b=Object.keys(n)[0],w=n[b];p=c[b].getPixelForValue(w)-y+t}else n==="center"?p=(u.left+u.right)/2-y+t:p=Px(e,n,t);v=qn(r,o,s),d=n==="left"?-Cs:Cs}return{titleX:p,titleY:v,maxWidth:f,rotation:d}}class Yu extends Ku{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:s}=this;return t=Ws(t,Number.POSITIVE_INFINITY),n=Ws(n,Number.NEGATIVE_INFINITY),r=Ws(r,Number.POSITIVE_INFINITY),s=Ws(s,Number.NEGATIVE_INFINITY),{min:Ws(t,r),max:Ws(n,s),minDefined:fs(t),maxDefined:fs(n)}}getMinMax(t){let{min:n,max:r,minDefined:s,maxDefined:i}=this.getUserBounds(),o;if(s&&i)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let l=0,u=a.length;l<u;++l)o=a[l].controller.getMinMax(this,t),s||(n=Math.min(n,o.min)),i||(r=Math.max(r,o.max));return n=i&&n>r?r:n,r=s&&n>r?n:r,{min:Ws(n,Ws(r,n)),max:Ws(r,Ws(n,r))}}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(){Xt(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:s,grace:i,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=zZ(this,i,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?Rx(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=ste(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Xt(this.options.afterUpdate,[this])}beforeSetDimensions(){Xt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Xt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Xt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Xt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,s,i;for(r=0,s=t.length;r<s;r++)i=t[r],i.label=Xt(n.callback,[i.value,r,t],this)}afterTickToLabelConversion(){Xt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Xt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=Tx(this.ticks.length,t.ticks.maxTicksLimit),s=n.minRotation||0,i=n.maxRotation;let o=s,a,l,u;if(!this._isVisible()||!n.display||s>=i||r<=1||!this.isHorizontal()){this.labelRotation=s;return}const c=this._getLabelSizes(),d=c.widest.width,f=c.highest.height,p=Ps(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/r:p/(r-1),d+6>a&&(a=p/(r-(t.offset?.5:1)),l=this.maxHeight-cc(t.grid)-n.padding-Ix(t.title,this.chart.options.font),u=Math.sqrt(d*d+f*f),o=gZ(Math.min(Math.asin(Ps((c.highest.height+6)/a,-1,1)),Math.asin(Ps(l/u,-1,1))-Math.asin(Ps(f/u,-1,1)))),o=Math.max(s,Math.min(i,o))),this.labelRotation=o}afterCalculateLabelRotation(){Xt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Xt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:s,grid:i}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=Ix(s,n.options.font);if(a?(t.width=this.maxWidth,t.height=cc(i)+l):(t.height=this.maxHeight,t.width=cc(i)+l),r.display&&this.ticks.length){const{first:u,last:c,widest:d,highest:f}=this._getLabelSizes(),p=r.padding*2,v=ba(this.labelRotation),m=Math.cos(v),y=Math.sin(v);if(a){const b=r.mirror?0:y*d.width+m*f.height;t.height=Math.min(this.maxHeight,t.height+b+p)}else{const b=r.mirror?0:m*d.width+y*f.height;t.width=Math.min(this.maxWidth,t.width+b+p)}this._calculatePadding(u,c,y,m)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,s){const{ticks:{align:i,padding:o},position:a}=this.options,l=this.labelRotation!==0,u=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,p=0;l?u?(f=s*t.width,p=r*n.height):(f=r*t.height,p=s*n.width):i==="start"?p=n.width:i==="end"?f=t.width:i!=="inner"&&(f=t.width/2,p=n.width/2),this.paddingLeft=Math.max((f-c+o)*this.width/(this.width-c),0),this.paddingRight=Math.max((p-d+o)*this.width/(this.width-d),0)}else{let c=n.height/2,d=t.height/2;i==="start"?(c=0,d=t.height):i==="end"&&(c=n.height,d=0),this.paddingTop=c+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(){Xt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)Nt(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=Rx(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:s,_longestTextCache:i}=this,o=[],a=[],l=Math.floor(n/Tx(n,r));let u=0,c=0,d,f,p,v,m,y,b,w,x,P,S;for(d=0;d<n;d+=l){if(v=t[d].label,m=this._resolveTickFontOptions(d),s.font=y=m.string,b=i[y]=i[y]||{data:{},gc:[]},w=m.lineHeight,x=P=0,!Nt(v)&&!kn(v))x=ix(s,b.data,b.gc,x,v),P=w;else if(kn(v))for(f=0,p=v.length;f<p;++f)S=v[f],!Nt(S)&&!kn(S)&&(x=ix(s,b.data,b.gc,x,S),P+=w);o.push(x),a.push(P),u=Math.max(x,u),c=Math.max(P,c)}fte(i,n);const C=o.indexOf(u),R=a.indexOf(c),k=E=>({width:o[E]||0,height:a[E]||0});return{first:k(0),last:k(n-1),widest:k(C),highest:k(R),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return wZ(this._alignToPixels?la(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=pte(this.getContext(),t,r))}return this.$context||(this.$context=hte(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=ba(this.labelRotation),r=Math.abs(Math.cos(n)),s=Math.abs(Math.sin(n)),i=this._getLabelSizes(),o=t.autoSkipPadding||0,a=i?i.widest.width+o:0,l=i?i.highest.height+o:0;return this.isHorizontal()?l*r>a*s?a/r:l/s:l*s<a*r?l/r:a/s}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,s=this.options,{grid:i,position:o,border:a}=s,l=i.offset,u=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=cc(i),p=[],v=a.setContext(this.getContext()),m=v.display?v.width:0,y=m/2,b=function(H){return la(r,H,m)};let w,x,P,S,C,R,k,E,I,A,O,L;if(o==="top")w=b(this.bottom),R=this.bottom-f,E=w-y,A=b(t.top)+y,L=t.bottom;else if(o==="bottom")w=b(this.top),A=t.top,L=b(t.bottom)-y,R=w+y,E=this.top+f;else if(o==="left")w=b(this.right),C=this.right-f,k=w-y,I=b(t.left)+y,O=t.right;else if(o==="right")w=b(this.left),I=t.left,O=b(t.right)-y,C=w+y,k=this.left+f;else if(n==="x"){if(o==="center")w=b((t.top+t.bottom)/2+.5);else if(St(o)){const H=Object.keys(o)[0],G=o[H];w=b(this.chart.scales[H].getPixelForValue(G))}A=t.top,L=t.bottom,R=w+y,E=R+f}else if(n==="y"){if(o==="center")w=b((t.left+t.right)/2);else if(St(o)){const H=Object.keys(o)[0],G=o[H];w=b(this.chart.scales[H].getPixelForValue(G))}C=w-y,k=C-f,I=t.left,O=t.right}const M=At(s.ticks.maxTicksLimit,d),z=Math.max(1,Math.ceil(d/M));for(x=0;x<d;x+=z){const H=this.getContext(x),G=i.setContext(H),W=a.setContext(H),Y=G.lineWidth,X=G.color,J=W.dash||[],N=W.dashOffset,K=G.tickWidth,he=G.tickColor,oe=G.tickBorderDash||[],we=G.tickBorderDashOffset;P=dte(this,x,l),P!==void 0&&(S=la(r,P,Y),u?C=k=I=O=S:R=E=A=L=S,p.push({tx1:C,ty1:R,tx2:k,ty2:E,x1:I,y1:A,x2:O,y2:L,width:Y,color:X,borderDash:J,borderDashOffset:N,tickWidth:K,tickColor:he,tickBorderDash:oe,tickBorderDashOffset:we}))}return this._ticksLength=d,this._borderValue=w,p}_computeLabelItems(t){const n=this.axis,r=this.options,{position:s,ticks:i}=r,o=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:u,padding:c,mirror:d}=i,f=cc(r.grid),p=f+c,v=d?-c:p,m=-ba(this.labelRotation),y=[];let b,w,x,P,S,C,R,k,E,I,A,O,L="middle";if(s==="top")C=this.bottom-v,R=this._getXAxisLabelAlignment();else if(s==="bottom")C=this.top+v,R=this._getXAxisLabelAlignment();else if(s==="left"){const z=this._getYAxisLabelAlignment(f);R=z.textAlign,S=z.x}else if(s==="right"){const z=this._getYAxisLabelAlignment(f);R=z.textAlign,S=z.x}else if(n==="x"){if(s==="center")C=(t.top+t.bottom)/2+p;else if(St(s)){const z=Object.keys(s)[0],H=s[z];C=this.chart.scales[z].getPixelForValue(H)+p}R=this._getXAxisLabelAlignment()}else if(n==="y"){if(s==="center")S=(t.left+t.right)/2-p;else if(St(s)){const z=Object.keys(s)[0],H=s[z];S=this.chart.scales[z].getPixelForValue(H)}R=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?L="top":l==="end"&&(L="bottom"));const M=this._getLabelSizes();for(b=0,w=a.length;b<w;++b){x=a[b],P=x.label;const z=i.setContext(this.getContext(b));k=this.getPixelForTick(b)+i.labelOffset,E=this._resolveTickFontOptions(b),I=E.lineHeight,A=kn(P)?P.length:1;const H=A/2,G=z.color,W=z.textStrokeColor,Y=z.textStrokeWidth;let X=R;o?(S=k,R==="inner"&&(b===w-1?X=this.options.reverse?"left":"right":b===0?X=this.options.reverse?"right":"left":X="center"),s==="top"?u==="near"||m!==0?O=-A*I+I/2:u==="center"?O=-M.highest.height/2-H*I+I:O=-M.highest.height+I/2:u==="near"||m!==0?O=I/2:u==="center"?O=M.highest.height/2-H*I:O=M.highest.height-A*I,d&&(O*=-1),m!==0&&!z.showLabelBackdrop&&(S+=I/2*Math.sin(m))):(C=k,O=(1-A)*I/2);let J;if(z.showLabelBackdrop){const N=hs(z.backdropPadding),K=M.heights[b],he=M.widths[b];let oe=O-N.top,we=0-N.left;switch(L){case"middle":oe-=K/2;break;case"bottom":oe-=K;break}switch(R){case"center":we-=he/2;break;case"right":we-=he;break;case"inner":b===w-1?we-=he:b>0&&(we-=he/2);break}J={left:we,top:oe,width:he+N.width,height:K+N.height,color:z.backdropColor}}y.push({label:P,font:E,textOffset:O,options:{rotation:m,color:G,strokeColor:W,strokeWidth:Y,textAlign:X,textBaseline:L,translation:[S,C],backdrop:J}})}return y}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-ba(this.labelRotation))return t==="top"?"left":"right";let s="center";return n.align==="start"?s="left":n.align==="end"?s="right":n.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:s,padding:i}}=this.options,o=this._getLabelSizes(),a=t+i,l=o.widest.width;let u,c;return n==="left"?s?(c=this.right+i,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c+=l)):(c=this.right-a,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c=this.left)):n==="right"?s?(c=this.left+i,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c-=l)):(c=this.left+a,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c=this.right)):u="right",{textAlign:u,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:s,width:i,height:o}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,s,i,o),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const s=this.ticks.findIndex(i=>i.value===t);return s>=0?n.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let i,o;const a=(l,u,c)=>{!c.width||!c.color||(r.save(),r.lineWidth=c.width,r.strokeStyle=c.color,r.setLineDash(c.borderDash||[]),r.lineDashOffset=c.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(u.x,u.y),r.stroke(),r.restore())};if(n.display)for(i=0,o=s.length;i<o;++i){const l=s[i];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:r,grid:s}}=this,i=r.setContext(this.getContext()),o=r.display?i.width:0;if(!o)return;const a=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let u,c,d,f;this.isHorizontal()?(u=la(t,this.left,o)-o/2,c=la(t,this.right,a)+a/2,d=f=l):(d=la(t,this.top,o)-o/2,f=la(t,this.bottom,a)+a/2,u=c=l),n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.beginPath(),n.moveTo(u,d),n.lineTo(c,f),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,s=this._computeLabelArea();s&&fS(r,s);const i=this.getLabelItems(t);for(const o of i){const a=o.options,l=o.font,u=o.label,c=o.textOffset;pd(r,u,0,c,l,a)}s&&hS(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:s}}=this;if(!r.display)return;const i=Zn(r.font),o=hs(r.padding),a=r.align;let l=i.lineHeight/2;n==="bottom"||n==="center"||St(n)?(l+=o.bottom,kn(r.text)&&(l+=i.lineHeight*(r.text.length-1))):l+=o.top;const{titleX:u,titleY:c,maxWidth:d,rotation:f}=gte(this,l,n,a);pd(t,r.text,0,0,i,{color:r.color,maxWidth:d,rotation:f,textAlign:mte(a,n,s),textBaseline:"middle",translation:[u,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=At(t.grid&&t.grid.z,-1),s=At(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Yu.prototype.draw?[{z:n,draw:i=>{this.draw(i)}}]:[{z:r,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:n,draw:i=>{this.drawLabels(i)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",s=[];let i,o;for(i=0,o=n.length;i<o;++i){const a=n[i];a[r]===this.id&&(!t||a.type===t)&&s.push(a)}return s}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return Zn(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Of{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;bte(n)&&(r=this.register(n));const s=this.items,i=t.id,o=this.scope+"."+i;if(!i)throw new Error("class does not have id: "+t);return i in s||(s[i]=t,vte(t,o,r),this.override&&pn.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,s=this.scope;r in n&&delete n[r],s&&r in pn[s]&&(delete pn[s][r],this.override&&delete Za[r])}}function vte(e,t,n){const r=fd(Object.create(null),[n?pn.get(n):{},pn.get(t),e.defaults]);pn.set(t,r),e.defaultRoutes&&yte(t,e.defaultRoutes),e.descriptors&&pn.describe(t,e.descriptors)}function yte(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),s=r.pop(),i=[e].concat(r).join("."),o=t[n].split("."),a=o.pop(),l=o.join(".");pn.route(i,s,l,a)})}function bte(e){return"id"in e&&"defaults"in e}class wte{constructor(){this.controllers=new Of(Vc,"datasets",!0),this.elements=new Of(Ku,"elements"),this.plugins=new Of(Object,"plugins"),this.scales=new Of(Yu,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(s=>{const i=r||this._getRegistryForType(s);r||i.isForType(s)||i===this.plugins&&s.id?this._exec(t,i,s):It(s,o=>{const a=r||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,n,r){const s=uS(t);Xt(r["before"+s],[],r),n[t](r),Xt(r["after"+s],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const s=n.get(t);if(s===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return s}}var Qs=new wte;class Ste{constructor(){this._init=[]}notify(t,n,r,s){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const i=s?this._descriptors(t).filter(s):this._descriptors(t),o=this._notify(i,t,n,r);return n==="afterDestroy"&&(this._notify(i,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,n,r,s){s=s||{};for(const i of t){const o=i.plugin,a=o[r],l=[n,s,i.options];if(Xt(a,l,o)===!1&&s.cancelable)return!1}return!0}invalidate(){Nt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,s=At(r.options&&r.options.plugins,{}),i=_te(r);return s===!1&&!n?[]:xte(t,i,s,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,s=(i,o)=>i.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(s(n,r),t,"stop"),this._notify(s(r,n),t,"start")}}function _te(e){const t={},n=[],r=Object.keys(Qs.plugins.items);for(let i=0;i<r.length;i++)n.push(Qs.getPlugin(r[i]));const s=e.plugins||[];for(let i=0;i<s.length;i++){const o=s[i];n.indexOf(o)===-1&&(n.push(o),t[o.id]=!0)}return{plugins:n,localIds:t}}function kte(e,t){return!t&&e===!1?null:e===!0?{}:e}function xte(e,{plugins:t,localIds:n},r,s){const i=[],o=e.getContext();for(const a of t){const l=a.id,u=kte(r[l],s);u!==null&&i.push({plugin:a,options:Ete(e.config,{plugin:a,local:n[l]},u,o)})}return i}function Ete(e,{plugin:t,local:n},r,s){const i=e.pluginScopeKeys(t),o=e.getOptionScopes(r,i);return n&&t.defaults&&o.push(t.defaults),e.createResolver(o,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function sb(e,t){const n=pn.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function Cte(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function Pte(e,t){return e===t?"_index_":"_value_"}function Ax(e){if(e==="x"||e==="y"||e==="r")return e}function Tte(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function ib(e,...t){if(Ax(e))return e;for(const n of t){const r=n.axis||Tte(n.position)||e.length>1&&Ax(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Ox(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function Rte(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return Ox(e,"x",n[0])||Ox(e,"y",n[0])}return{}}function Ite(e,t){const n=Za[e.type]||{scales:{}},r=t.scales||{},s=sb(e.type,t),i=Object.create(null);return Object.keys(r).forEach(o=>{const a=r[o];if(!St(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=ib(o,a,Rte(o,e),pn.scales[a.type]),u=Pte(l,s),c=n.scales||{};i[o]=Lc(Object.create(null),[{axis:l},a,c[l],c[u]])}),e.data.datasets.forEach(o=>{const a=o.type||e.type,l=o.indexAxis||sb(a,t),c=(Za[a]||{}).scales||{};Object.keys(c).forEach(d=>{const f=Cte(d,l),p=o[f+"AxisID"]||f;i[p]=i[p]||Object.create(null),Lc(i[p],[{axis:f},r[p],c[d]])})}),Object.keys(i).forEach(o=>{const a=i[o];Lc(a,[pn.scales[a.type],pn.scale])}),i}function uD(e){const t=e.options||(e.options={});t.plugins=At(t.plugins,{}),t.scales=Ite(e,t)}function cD(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Ate(e){return e=e||{},e.data=cD(e.data),uD(e),e}const Mx=new Map,dD=new Set;function Mf(e,t){let n=Mx.get(e);return n||(n=t(),Mx.set(e,n),dD.add(n)),n}const dc=(e,t,n)=>{const r=Su(t,n);r!==void 0&&e.add(r)};class Ote{constructor(t){this._config=Ate(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=cD(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(),uD(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Mf(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Mf(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Mf(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return Mf(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let s=r.get(t);return(!s||n)&&(s=new Map,r.set(t,s)),s}getOptionScopes(t,n,r){const{options:s,type:i}=this,o=this._cachedScopes(t,r),a=o.get(n);if(a)return a;const l=new Set;n.forEach(c=>{t&&(l.add(t),c.forEach(d=>dc(l,t,d))),c.forEach(d=>dc(l,s,d)),c.forEach(d=>dc(l,Za[i]||{},d)),c.forEach(d=>dc(l,pn,d)),c.forEach(d=>dc(l,rb,d))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),dD.has(n)&&o.set(n,u),u}chartOptionScopes(){const{options:t,type:n}=this;return[t,Za[n]||{},pn.datasets[n]||{},{type:n},pn,rb]}resolveNamedOptions(t,n,r,s=[""]){const i={$shared:!0},{resolver:o,subPrefixes:a}=Dx(this._resolverCache,t,s);let l=o;if(Dte(o,n)){i.$shared=!1,r=Uo(r)?r():r;const u=this.createResolver(t,r,a);l=_u(o,r,u)}for(const u of n)i[u]=l[u];return i}createResolver(t,n,r=[""],s){const{resolver:i}=Dx(this._resolverCache,t,r);return St(n)?_u(i,n,void 0,s):i}}function Dx(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const s=n.join();let i=r.get(s);return i||(i={resolver:pS(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(s,i)),i}const Mte=e=>St(e)&&Object.getOwnPropertyNames(e).some(t=>Uo(e[t]));function Dte(e,t){const{isScriptable:n,isIndexable:r}=YM(e);for(const s of t){const i=n(s),o=r(s),a=(o||i)&&e[s];if(i&&(Uo(a)||Mte(a))||o&&kn(a))return!0}return!1}var $te="4.4.8";const Fte=["top","bottom","left","right","chartArea"];function $x(e,t){return e==="top"||e==="bottom"||Fte.indexOf(e)===-1&&t==="x"}function Fx(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function Lx(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Xt(n&&n.onComplete,[e],t)}function Lte(e){const t=e.chart,n=t.options.animation;Xt(n&&n.onProgress,[e],t)}function fD(e){return vS()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const yh={},Nx=e=>{const t=fD(e);return Object.values(yh).filter(n=>n.canvas===t).pop()};function Nte(e,t,n){const r=Object.keys(e);for(const s of r){const i=+s;if(i>=t){const o=e[s];delete e[s],(n>0||i>t)&&(e[i+n]=o)}}}function Bte(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function Df(e,t,n){return e.options.clip?e[n]:t[n]}function Vte(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:Df(n,t,"left"),right:Df(n,t,"right"),top:Df(r,t,"top"),bottom:Df(r,t,"bottom")}:t}var ro;let Am=(ro=class{static register(...t){Qs.add(...t),Bx()}static unregister(...t){Qs.remove(...t),Bx()}constructor(t,n){const r=this.config=new Ote(n),s=fD(t),i=Nx(s);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const o=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||rte(s)),this.platform.updateConfig(r);const a=this.platform.acquireContext(s,o.aspectRatio),l=a&&a.canvas,u=l&&l.height,c=l&&l.width;if(this.id=sZ(),this.ctx=a,this.canvas=l,this.width=c,this.height=u,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 Ste,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=xZ(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],yh[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}xi.listen(this,"complete",Lx),xi.listen(this,"progress",Lte),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:s,_aspectRatio:i}=this;return Nt(t)?n&&i?i:s?r/s: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 Qs}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():cx(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ox(this.canvas,this.ctx),this}stop(){return xi.stop(this),this}resize(t,n){xi.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,s=this.canvas,i=r.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,t,n,i),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,cx(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),Xt(r.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};It(n,(r,s)=>{r.id=s})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,s=Object.keys(r).reduce((o,a)=>(o[a]=!1,o),{});let i=[];n&&(i=i.concat(Object.keys(n).map(o=>{const a=n[o],l=ib(o,a),u=l==="r",c=l==="x";return{options:a,dposition:u?"chartArea":c?"bottom":"left",dtype:u?"radialLinear":c?"category":"linear"}}))),It(i,o=>{const a=o.options,l=a.id,u=ib(l,a),c=At(a.type,o.dtype);(a.position===void 0||$x(a.position,u)!==$x(o.dposition))&&(a.position=o.dposition),s[l]=!0;let d=null;if(l in r&&r[l].type===c)d=r[l];else{const f=Qs.getScale(c);d=new f({id:l,type:c,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(a,t)}),It(s,(o,a)=>{o||delete r[a]}),It(r,o=>{is.configure(this,o,o.options),is.addBox(this,o)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((s,i)=>s.index-i.index),r>n){for(let s=n;s<r;++s)this._destroyDatasetMeta(s);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(Fx("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,s)=>{n.filter(i=>i===r._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,s;for(this._removeUnreferencedMetasets(),r=0,s=n.length;r<s;r++){const i=n[r];let o=this.getDatasetMeta(r);const a=i.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(r),o=this.getDatasetMeta(r)),o.type=a,o.indexAxis=i.indexAxis||sb(a,this.options),o.order=i.order||0,o.index=r,o.label=""+i.label,o.visible=this.isDatasetVisible(r),o.controller)o.controller.updateIndex(r),o.controller.linkScales();else{const l=Qs.getController(a),{datasetElementType:u,dataElementType:c}=pn.datasets[a];Object.assign(l,{dataElementType:Qs.getElement(c),datasetElementType:u&&Qs.getElement(u)}),o.controller=new l(this,r),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){It(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,c=this.data.datasets.length;u<c;u++){const{controller:d}=this.getDatasetMeta(u),f=!s&&i.indexOf(d)===-1;d.buildOrUpdateElements(f),o=Math.max(+d.getMaxOverflow(),o)}o=this._minPadding=r.layout.autoPadding?o:0,this._updateLayout(o),s||It(i,u=>{u.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Fx("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){It(this.scales,t=>{is.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!Xk(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:s,count:i}of n){const o=r==="_removeElements"?-i:i;Nte(t,s,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=i=>new Set(t.filter(o=>o[0]===i).map((o,a)=>a+","+o.splice(1).join(","))),s=r(0);for(let i=1;i<n;i++)if(!Xk(s,r(i)))return;return Array.from(s).map(i=>i.split(",")).map(i=>({method:i[1],start:+i[2],count:+i[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;is.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],It(this.boxes,s=>{r&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,i)=>{s._idx=i}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,Uo(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),s={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(r.controller._update(n),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(xi.has(this)?this.attached&&!xi.running(this)&&xi.start(this):(this.draw(),Lx({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:s}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,s)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let s,i;for(s=0,i=n.length;s<i;++s){const o=n[s];(!t||o.visible)&&r.push(o)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r=t._clip,s=!r.disabled,i=Vte(t,this.chartArea),o={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(s&&fS(n,{left:r.left===!1?0:i.left-r.left,right:r.right===!1?this.width:i.right+r.right,top:r.top===!1?0:i.top-r.top,bottom:r.bottom===!1?this.height:i.bottom+r.bottom}),t.controller.draw(),s&&hS(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return WM(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,s){const i=Fee.modes[n];return typeof i=="function"?i(this,t,r,s):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let s=r.filter(i=>i&&i._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:t,_dataset:n,_parsed:[],_sorted:!1},r.push(s)),s}getContext(){return this.$context||(this.$context=Gu(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const s=r?"show":"hide",i=this.getDatasetMeta(t),o=i.controller._resolveAnimations(void 0,s);hd(n)?(i.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),o.update(i,{visible:r}),this.update(a=>a.datasetIndex===t?s:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),xi.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ox(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete yh[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(i,o)=>{n.addEventListener(this,i,o),t[i]=o},s=(i,o,a)=>{i.offsetX=o,i.offsetY=a,this._eventHandler(i)};It(this.options.events,i=>r(i,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,u)=>{n.addEventListener(this,l,u),t[l]=u},s=(l,u)=>{t[l]&&(n.removeEventListener(this,l,u),delete t[l])},i=(l,u)=>{this.canvas&&this.resize(l,u)};let o;const a=()=>{s("attach",a),this.attached=!0,this.resize(),r("resize",i),r("detach",o)};o=()=>{this.attached=!1,s("resize",i),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){It(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},It(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const s=r?"set":"remove";let i,o,a,l;for(n==="dataset"&&(i=this.getDatasetMeta(t[0].datasetIndex),i.controller["_"+s+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){o=t[a];const u=o&&this.getDatasetMeta(o.datasetIndex).controller;u&&u[s+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:i,index:o})=>{const a=this.getDatasetMeta(i);if(!a)throw new Error("No dataset found at index "+i);return{datasetIndex:i,element:a.data[o],index:o}});!dp(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const s=this.options.hover,i=(l,u)=>l.filter(c=>!u.some(d=>c.datasetIndex===d.datasetIndex&&c.index===d.index)),o=i(n,t),a=r?t:i(t,n);o.length&&this.updateHoverStyle(o,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},s=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,s)===!1)return;const i=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,s),(i||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:s=[],options:i}=this,o=n,a=this._getActiveElements(t,s,r,o),l=cZ(t),u=Bte(t,this._lastEvent,r,l);r&&(this._lastEvent=null,Xt(i.onHover,[t,a,this],this),l&&Xt(i.onClick,[t,a,this],this));const c=!dp(a,s);return(c||n)&&(this._active=a,this._updateHoverStyles(a,s,n)),this._lastEvent=u,c}_getActiveElements(t,n,r,s){if(t.type==="mouseout")return[];if(!r)return n;const i=this.options.hover;return this.getElementsAtEventForMode(t,i.mode,i,s)}},ve(ro,"defaults",pn),ve(ro,"instances",yh),ve(ro,"overrides",Za),ve(ro,"registry",Qs),ve(ro,"version",$te),ve(ro,"getChart",Nx),ro);function Bx(){return It(Am.instances,e=>e._plugins.invalidate())}function hD(e,t){const{x:n,y:r,base:s,width:i,height:o}=e.getProps(["x","y","base","width","height"],t);let a,l,u,c,d;return e.horizontal?(d=o/2,a=Math.min(n,s),l=Math.max(n,s),u=r-d,c=r+d):(d=i/2,a=n-d,l=n+d,u=Math.min(r,s),c=Math.max(r,s)),{left:a,top:u,right:l,bottom:c}}function Co(e,t,n,r){return e?0:Ps(t,n,r)}function Ute(e,t,n){const r=e.options.borderWidth,s=e.borderSkipped,i=KM(r);return{t:Co(s.top,i.top,0,n),r:Co(s.right,i.right,0,t),b:Co(s.bottom,i.bottom,0,n),l:Co(s.left,i.left,0,t)}}function zte(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),s=e.options.borderRadius,i=zl(s),o=Math.min(t,n),a=e.borderSkipped,l=r||St(s);return{topLeft:Co(!l||a.top||a.left,i.topLeft,0,o),topRight:Co(!l||a.top||a.right,i.topRight,0,o),bottomLeft:Co(!l||a.bottom||a.left,i.bottomLeft,0,o),bottomRight:Co(!l||a.bottom||a.right,i.bottomRight,0,o)}}function Hte(e){const t=hD(e),n=t.right-t.left,r=t.bottom-t.top,s=Ute(e,n/2,r/2),i=zte(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:i},inner:{x:t.left+s.l,y:t.top+s.t,w:n-s.l-s.r,h:r-s.t-s.b,radius:{topLeft:Math.max(0,i.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,i.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,i.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,i.bottomRight-Math.max(s.b,s.r))}}}}function Yg(e,t,n,r){const s=t===null,i=n===null,a=e&&!(s&&i)&&hD(e,r);return a&&(s||Dl(t,a.left,a.right))&&(i||Dl(n,a.top,a.bottom))}function jte(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function qte(e,t){e.rect(t.x,t.y,t.w,t.h)}function Xg(e,t,n={}){const r=e.x!==n.x?-t:0,s=e.y!==n.y?-t:0,i=(e.x+e.w!==n.x+n.w?t:0)-r,o=(e.y+e.h!==n.y+n.h?t:0)-s;return{x:e.x+r,y:e.y+s,w:e.w+i,h:e.h+o,radius:e.radius}}class bh extends Ku{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:r,backgroundColor:s}}=this,{inner:i,outer:o}=Hte(this),a=jte(o.radius)?mp:qte;t.save(),(o.w!==i.w||o.h!==i.h)&&(t.beginPath(),a(t,Xg(o,n,i)),t.clip(),a(t,Xg(i,-n,o)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),a(t,Xg(i,n)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,n,r){return Yg(this,t,n,r)}inXRange(t,n){return Yg(this,t,null,n)}inYRange(t,n){return Yg(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:s,horizontal:i}=this.getProps(["x","y","base","horizontal"],t);return{x:i?(n+s)/2:n,y:i?r:(r+s)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}ve(bh,"id","bar"),ve(bh,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),ve(bh,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});const Vx=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},Wte=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Ux extends Ku{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=Xt(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,s)=>t.sort(r,s,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,s=Zn(r.font),i=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=Vx(r,i);let u,c;n.font=s.string,this.isHorizontal()?(u=this.maxWidth,c=this._fitRows(o,i,a,l)+10):(c=this.maxHeight,u=this._fitCols(o,s,a,l)+10),this.width=Math.min(u,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,s){const{ctx:i,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],u=this.lineWidths=[0],c=s+a;let d=t;i.textAlign="left",i.textBaseline="middle";let f=-1,p=-c;return this.legendItems.forEach((v,m)=>{const y=r+n/2+i.measureText(v.text).width;(m===0||u[u.length-1]+y+2*a>o)&&(d+=c,u[u.length-(m>0?0:1)]=0,p+=c,f++),l[m]={left:0,top:p,row:f,width:y,height:s},u[u.length-1]+=y+a}),d}_fitCols(t,n,r,s){const{ctx:i,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],u=this.columnSizes=[],c=o-t;let d=a,f=0,p=0,v=0,m=0;return this.legendItems.forEach((y,b)=>{const{itemWidth:w,itemHeight:x}=Gte(r,n,i,y,s);b>0&&p+x+2*a>c&&(d+=f+a,u.push({width:f,height:p}),v+=f+a,m++,f=p=0),l[b]={left:v,top:p,col:m,width:w,height:x},f=Math.max(f,w),p+=x+a}),d+=f,u.push({width:f,height:p}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:s},rtl:i}}=this,o=Hl(i,this.left,this.width);if(this.isHorizontal()){let a=0,l=qn(r,this.left+s,this.right-this.lineWidths[a]);for(const u of n)a!==u.row&&(a=u.row,l=qn(r,this.left+s,this.right-this.lineWidths[a])),u.top+=this.top+t+s,u.left=o.leftForLtr(o.x(l),u.width),l+=u.width+s}else{let a=0,l=qn(r,this.top+t+s,this.bottom-this.columnSizes[a].height);for(const u of n)u.col!==a&&(a=u.col,l=qn(r,this.top+t+s,this.bottom-this.columnSizes[a].height)),u.top=l,u.left+=this.left+s,u.left=o.leftForLtr(o.x(u.left),u.width),l+=u.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;fS(t,this),this._draw(),hS(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:s}=this,{align:i,labels:o}=t,a=pn.color,l=Hl(t.rtl,this.left,this.width),u=Zn(o.font),{padding:c}=o,d=u.size,f=d/2;let p;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=u.string;const{boxWidth:v,boxHeight:m,itemHeight:y}=Vx(o,d),b=function(C,R,k){if(isNaN(v)||v<=0||isNaN(m)||m<0)return;s.save();const E=At(k.lineWidth,1);if(s.fillStyle=At(k.fillStyle,a),s.lineCap=At(k.lineCap,"butt"),s.lineDashOffset=At(k.lineDashOffset,0),s.lineJoin=At(k.lineJoin,"miter"),s.lineWidth=E,s.strokeStyle=At(k.strokeStyle,a),s.setLineDash(At(k.lineDash,[])),o.usePointStyle){const I={radius:m*Math.SQRT2/2,pointStyle:k.pointStyle,rotation:k.rotation,borderWidth:E},A=l.xPlus(C,v/2),O=R+f;qM(s,I,A,O,o.pointStyleWidth&&v)}else{const I=R+Math.max((d-m)/2,0),A=l.leftForLtr(C,v),O=zl(k.borderRadius);s.beginPath(),Object.values(O).some(L=>L!==0)?mp(s,{x:A,y:I,w:v,h:m,radius:O}):s.rect(A,I,v,m),s.fill(),E!==0&&s.stroke()}s.restore()},w=function(C,R,k){pd(s,k.text,C,R+y/2,u,{strikethrough:k.hidden,textAlign:l.textAlign(k.textAlign)})},x=this.isHorizontal(),P=this._computeTitleHeight();x?p={x:qn(i,this.left+c,this.right-r[0]),y:this.top+c+P,line:0}:p={x:this.left+c,y:qn(i,this.top+P+c,this.bottom-n[0].height),line:0},ZM(this.ctx,t.textDirection);const S=y+c;this.legendItems.forEach((C,R)=>{s.strokeStyle=C.fontColor,s.fillStyle=C.fontColor;const k=s.measureText(C.text).width,E=l.textAlign(C.textAlign||(C.textAlign=o.textAlign)),I=v+f+k;let A=p.x,O=p.y;l.setWidth(this.width),x?R>0&&A+I+c>this.right&&(O=p.y+=S,p.line++,A=p.x=qn(i,this.left+c,this.right-r[p.line])):R>0&&O+S>this.bottom&&(A=p.x=A+n[p.line].width+c,p.line++,O=p.y=qn(i,this.top+P+c,this.bottom-n[p.line].height));const L=l.x(A);if(b(L,O,C),A=EZ(E,A+v+f,x?A+I:this.right,t.rtl),w(l.x(A),O,C),x)p.x+=I+c;else if(typeof C.text!="string"){const M=u.lineHeight;p.y+=pD(C,M)+c}else p.y+=S}),eD(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=Zn(n.font),s=hs(n.padding);if(!n.display)return;const i=Hl(t.rtl,this.left,this.width),o=this.ctx,a=n.position,l=r.size/2,u=s.top+l;let c,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),c=this.top+u,d=qn(t.align,d,this.right-f);else{const v=this.columnSizes.reduce((m,y)=>Math.max(m,y.height),0);c=u+qn(t.align,this.top,this.bottom-v-t.labels.padding-this._computeTitleHeight())}const p=qn(a,d,d+f);o.textAlign=i.textAlign(dS(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=r.string,pd(o,n.text,p,c,r)}_computeTitleHeight(){const t=this.options.title,n=Zn(t.font),r=hs(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,s,i;if(Dl(t,this.left,this.right)&&Dl(n,this.top,this.bottom)){for(i=this.legendHitBoxes,r=0;r<i.length;++r)if(s=i[r],Dl(t,s.left,s.left+s.width)&&Dl(n,s.top,s.top+s.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!Xte(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const s=this._hoveredItem,i=Wte(s,r);s&&!i&&Xt(n.onLeave,[t,s,this],this),this._hoveredItem=r,r&&!i&&Xt(n.onHover,[t,r,this],this)}else r&&Xt(n.onClick,[t,r,this],this)}}function Gte(e,t,n,r,s){const i=Kte(r,e,t,n),o=Yte(s,r,t.lineHeight);return{itemWidth:i,itemHeight:o}}function Kte(e,t,n,r){let s=e.text;return s&&typeof s!="string"&&(s=s.reduce((i,o)=>i.length>o.length?i:o)),t+n.size/2+r.measureText(s).width}function Yte(e,t,n){let r=e;return typeof t.text!="string"&&(r=pD(t,n)),r}function pD(e,t){const n=e.text?e.text.length:0;return t*n}function Xte(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Qte={id:"legend",_element:Ux,start(e,t,n){const r=e.legend=new Ux({ctx:e.ctx,options:n,chart:e});is.configure(e,r,n),is.addBox(e,r)},stop(e){is.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;is.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,s=n.chart;s.isDatasetVisible(r)?(s.hide(r),t.hidden=!0):(s.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:s,color:i,useBorderRadius:o,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const u=l.controller.getStyle(n?0:void 0),c=hs(u.borderWidth);return{text:t[l.index].label,fillStyle:u.backgroundColor,fontColor:i,hidden:!l.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:u.borderColor,pointStyle:r||u.pointStyle,rotation:u.rotation,textAlign:s||u.textAlign,borderRadius:o&&(a||u.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class mD extends Ku{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const s=kn(r.text)?r.text.length:1;this._padding=hs(r.padding);const i=s*Zn(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=i:this.width=i}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:s,right:i,options:o}=this,a=o.align;let l=0,u,c,d;return this.isHorizontal()?(c=qn(a,r,i),d=n+t,u=i-r):(o.position==="left"?(c=r+t,d=qn(a,s,n),l=rr*-.5):(c=i-t,d=qn(a,n,s),l=rr*.5),u=s-n),{titleX:c,titleY:d,maxWidth:u,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=Zn(n.font),i=r.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:u}=this._drawArgs(i);pd(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:u,textAlign:dS(n.align),textBaseline:"middle",translation:[o,a]})}}function Jte(e,t){const n=new mD({ctx:e.ctx,options:t,chart:e});is.configure(e,n,t),is.addBox(e,n),e.titleBlock=n}var Zte={id:"title",_element:mD,start(e,t,n){Jte(e,n)},stop(e){const t=e.titleBlock;is.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;is.configure(e,r,n),r.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 wc={average(e){if(!e.length)return!1;let t,n,r=new Set,s=0,i=0;for(t=0,n=e.length;t<n;++t){const a=e[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();r.add(l.x),s+=l.y,++i}}return i===0||r.size===0?!1:{x:[...r].reduce((a,l)=>a+l)/r.size,y:s/i}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,s=Number.POSITIVE_INFINITY,i,o,a;for(i=0,o=e.length;i<o;++i){const l=e[i].element;if(l&&l.hasValue()){const u=l.getCenterPoint(),c=yZ(t,u);c<s&&(s=c,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function Ks(e,t){return t&&(kn(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Ei(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
83
|
-
`)>-1?e.split(`
|
|
84
|
-
`):e}function ene(e,t){const{element:n,datasetIndex:r,index:s}=t,i=e.getDatasetMeta(r).controller,{label:o,value:a}=i.getLabelAndValue(s);return{chart:e,label:o,parsed:i.getParsed(s),raw:e.data.datasets[r].data[s],formattedValue:a,dataset:i.getDataset(),dataIndex:s,datasetIndex:r,element:n}}function zx(e,t){const n=e.chart.ctx,{body:r,footer:s,title:i}=e,{boxWidth:o,boxHeight:a}=t,l=Zn(t.bodyFont),u=Zn(t.titleFont),c=Zn(t.footerFont),d=i.length,f=s.length,p=r.length,v=hs(t.padding);let m=v.height,y=0,b=r.reduce((P,S)=>P+S.before.length+S.lines.length+S.after.length,0);if(b+=e.beforeBody.length+e.afterBody.length,d&&(m+=d*u.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){const P=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=p*P+(b-p)*l.lineHeight+(b-1)*t.bodySpacing}f&&(m+=t.footerMarginTop+f*c.lineHeight+(f-1)*t.footerSpacing);let w=0;const x=function(P){y=Math.max(y,n.measureText(P).width+w)};return n.save(),n.font=u.string,It(e.title,x),n.font=l.string,It(e.beforeBody.concat(e.afterBody),x),w=t.displayColors?o+2+t.boxPadding:0,It(r,P=>{It(P.before,x),It(P.lines,x),It(P.after,x)}),w=0,n.font=c.string,It(e.footer,x),n.restore(),y+=v.width,{width:y,height:m}}function tne(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function nne(e,t,n,r){const{x:s,width:i}=r,o=n.caretSize+n.caretPadding;if(e==="left"&&s+i+o>t.width||e==="right"&&s-i-o<0)return!0}function rne(e,t,n,r){const{x:s,width:i}=n,{width:o,chartArea:{left:a,right:l}}=e;let u="center";return r==="center"?u=s<=(a+l)/2?"left":"right":s<=i/2?u="left":s>=o-i/2&&(u="right"),nne(u,e,t,n)&&(u="center"),u}function Hx(e,t,n){const r=n.yAlign||t.yAlign||tne(e,n);return{xAlign:n.xAlign||t.xAlign||rne(e,t,n,r),yAlign:r}}function sne(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function ine(e,t,n){let{y:r,height:s}=e;return t==="top"?r+=n:t==="bottom"?r-=s+n:r-=s/2,r}function jx(e,t,n,r){const{caretSize:s,caretPadding:i,cornerRadius:o}=e,{xAlign:a,yAlign:l}=n,u=s+i,{topLeft:c,topRight:d,bottomLeft:f,bottomRight:p}=zl(o);let v=sne(t,a);const m=ine(t,l,u);return l==="center"?a==="left"?v+=u:a==="right"&&(v-=u):a==="left"?v-=Math.max(c,f)+s:a==="right"&&(v+=Math.max(d,p)+s),{x:Ps(v,0,r.width-t.width),y:Ps(m,0,r.height-t.height)}}function $f(e,t,n){const r=hs(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function qx(e){return Ks([],Ei(e))}function one(e,t,n){return Gu(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function Wx(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const gD={beforeTitle:Si,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:Si,beforeBody:Si,beforeLabel:Si,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return Nt(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Si,afterBody:Si,beforeFooter:Si,footer:Si,afterFooter:Si};function br(e,t,n,r){const s=e[t].call(n,r);return typeof s>"u"?gD[t].call(n,r):s}var iv;let Gx=(iv=class extends Ku{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),s=r.enabled&&n.options.animation&&r.animations,i=new tD(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=one(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,s=br(r,"beforeTitle",this,t),i=br(r,"title",this,t),o=br(r,"afterTitle",this,t);let a=[];return a=Ks(a,Ei(s)),a=Ks(a,Ei(i)),a=Ks(a,Ei(o)),a}getBeforeBody(t,n){return qx(br(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,s=[];return It(t,i=>{const o={before:[],lines:[],after:[]},a=Wx(r,i);Ks(o.before,Ei(br(a,"beforeLabel",this,i))),Ks(o.lines,br(a,"label",this,i)),Ks(o.after,Ei(br(a,"afterLabel",this,i))),s.push(o)}),s}getAfterBody(t,n){return qx(br(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,s=br(r,"beforeFooter",this,t),i=br(r,"footer",this,t),o=br(r,"afterFooter",this,t);let a=[];return a=Ks(a,Ei(s)),a=Ks(a,Ei(i)),a=Ks(a,Ei(o)),a}_createItems(t){const n=this._active,r=this.chart.data,s=[],i=[],o=[];let a=[],l,u;for(l=0,u=n.length;l<u;++l)a.push(ene(this.chart,n[l]));return t.filter&&(a=a.filter((c,d,f)=>t.filter(c,d,f,r))),t.itemSort&&(a=a.sort((c,d)=>t.itemSort(c,d,r))),It(a,c=>{const d=Wx(t.callbacks,c);s.push(br(d,"labelColor",this,c)),i.push(br(d,"labelPointStyle",this,c)),o.push(br(d,"labelTextColor",this,c))}),this.labelColors=s,this.labelPointStyles=i,this.labelTextColors=o,this.dataPoints=a,a}update(t,n){const r=this.options.setContext(this.getContext()),s=this._active;let i,o=[];if(!s.length)this.opacity!==0&&(i={opacity:0});else{const a=wc[r.position].call(this,s,this._eventPosition);o=this._createItems(r),this.title=this.getTitle(o,r),this.beforeBody=this.getBeforeBody(o,r),this.body=this.getBody(o,r),this.afterBody=this.getAfterBody(o,r),this.footer=this.getFooter(o,r);const l=this._size=zx(this,r),u=Object.assign({},a,l),c=Hx(this.chart,r,u),d=jx(r,u,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,i={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,i&&this._resolveAnimations().update(this,i),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,s){const i=this.getCaretPosition(t,r,s);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)}getCaretPosition(t,n,r){const{xAlign:s,yAlign:i}=this,{caretSize:o,cornerRadius:a}=r,{topLeft:l,topRight:u,bottomLeft:c,bottomRight:d}=zl(a),{x:f,y:p}=t,{width:v,height:m}=n;let y,b,w,x,P,S;return i==="center"?(P=p+m/2,s==="left"?(y=f,b=y-o,x=P+o,S=P-o):(y=f+v,b=y+o,x=P-o,S=P+o),w=y):(s==="left"?b=f+Math.max(l,c)+o:s==="right"?b=f+v-Math.max(u,d)-o:b=this.caretX,i==="top"?(x=p,P=x-o,y=b-o,w=b+o):(x=p+m,P=x+o,y=b+o,w=b-o),S=x),{x1:y,x2:b,x3:w,y1:x,y2:P,y3:S}}drawTitle(t,n,r){const s=this.title,i=s.length;let o,a,l;if(i){const u=Hl(r.rtl,this.x,this.width);for(t.x=$f(this,r.titleAlign,r),n.textAlign=u.textAlign(r.titleAlign),n.textBaseline="middle",o=Zn(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=o.string,l=0;l<i;++l)n.fillText(s[l],u.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+a,l+1===i&&(t.y+=r.titleMarginBottom-a)}}_drawColorBox(t,n,r,s,i){const o=this.labelColors[r],a=this.labelPointStyles[r],{boxHeight:l,boxWidth:u}=i,c=Zn(i.bodyFont),d=$f(this,"left",i),f=s.x(d),p=l<c.lineHeight?(c.lineHeight-l)/2:0,v=n.y+p;if(i.usePointStyle){const m={radius:Math.min(u,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},y=s.leftForLtr(f,u)+u/2,b=v+l/2;t.strokeStyle=i.multiKeyBackground,t.fillStyle=i.multiKeyBackground,ax(t,m,y,b),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,ax(t,m,y,b)}else{t.lineWidth=St(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const m=s.leftForLtr(f,u),y=s.leftForLtr(s.xPlus(f,1),u-2),b=zl(o.borderRadius);Object.values(b).some(w=>w!==0)?(t.beginPath(),t.fillStyle=i.multiKeyBackground,mp(t,{x:m,y:v,w:u,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),mp(t,{x:y,y:v+1,w:u-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=i.multiKeyBackground,t.fillRect(m,v,u,l),t.strokeRect(m,v,u,l),t.fillStyle=o.backgroundColor,t.fillRect(y,v+1,u-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:s}=this,{bodySpacing:i,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:u,boxPadding:c}=r,d=Zn(r.bodyFont);let f=d.lineHeight,p=0;const v=Hl(r.rtl,this.x,this.width),m=function(k){n.fillText(k,v.x(t.x+p),t.y+f/2),t.y+=f+i},y=v.textAlign(o);let b,w,x,P,S,C,R;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,t.x=$f(this,y,r),n.fillStyle=r.bodyColor,It(this.beforeBody,m),p=a&&y!=="right"?o==="center"?u/2+c:u+2+c:0,P=0,C=s.length;P<C;++P){for(b=s[P],w=this.labelTextColors[P],n.fillStyle=w,It(b.before,m),x=b.lines,a&&x.length&&(this._drawColorBox(n,t,P,v,r),f=Math.max(d.lineHeight,l)),S=0,R=x.length;S<R;++S)m(x[S]),f=d.lineHeight;It(b.after,m)}p=0,f=d.lineHeight,It(this.afterBody,m),t.y-=i}drawFooter(t,n,r){const s=this.footer,i=s.length;let o,a;if(i){const l=Hl(r.rtl,this.x,this.width);for(t.x=$f(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",o=Zn(r.footerFont),n.fillStyle=r.footerColor,n.font=o.string,a=0;a<i;++a)n.fillText(s[a],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+r.footerSpacing}}drawBackground(t,n,r,s){const{xAlign:i,yAlign:o}=this,{x:a,y:l}=t,{width:u,height:c}=r,{topLeft:d,topRight:f,bottomLeft:p,bottomRight:v}=zl(s.cornerRadius);n.fillStyle=s.backgroundColor,n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.beginPath(),n.moveTo(a+d,l),o==="top"&&this.drawCaret(t,n,r,s),n.lineTo(a+u-f,l),n.quadraticCurveTo(a+u,l,a+u,l+f),o==="center"&&i==="right"&&this.drawCaret(t,n,r,s),n.lineTo(a+u,l+c-v),n.quadraticCurveTo(a+u,l+c,a+u-v,l+c),o==="bottom"&&this.drawCaret(t,n,r,s),n.lineTo(a+p,l+c),n.quadraticCurveTo(a,l+c,a,l+c-p),o==="center"&&i==="left"&&this.drawCaret(t,n,r,s),n.lineTo(a,l+d),n.quadraticCurveTo(a,l,a+d,l),n.closePath(),n.fill(),s.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,s=r&&r.x,i=r&&r.y;if(s||i){const o=wc[t.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=zx(this,t),l=Object.assign({},o,this._size),u=Hx(n,t,l),c=jx(t,l,u,n);(s._to!==c.x||i._to!==c.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const s={width:this.width,height:this.height},i={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const o=hs(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=r,this.drawBackground(i,t,s,n),ZM(t,n.textDirection),i.y+=o.top,this.drawTitle(i,t,n),this.drawBody(i,t,n),this.drawFooter(i,t,n),eD(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,s=t.map(({datasetIndex:a,index:l})=>{const u=this.chart.getDatasetMeta(a);if(!u)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:u.data[l],index:l}}),i=!dp(r,s),o=this._positionChanged(s,n);(i||o)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,i=this._active||[],o=this._getActiveElements(t,i,n,r),a=this._positionChanged(o,t),l=n||!dp(o,i)||a;return l&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,s){const i=this.options;if(t.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(t,i.mode,i,r);return i.reverse&&o.reverse(),o}_positionChanged(t,n){const{caretX:r,caretY:s,options:i}=this,o=wc[i.position].call(this,t,n);return o!==!1&&(r!==o.x||s!==o.y)}},ve(iv,"positioners",wc),iv);var ane={id:"tooltip",_element:Gx,positioners:wc,afterInit(e,t,n){n&&(e.tooltip=new Gx({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:gD},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const lne=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function une(e,t,n,r){const s=e.indexOf(t);if(s===-1)return lne(e,t,n,r);const i=e.lastIndexOf(t);return s!==i?n:s}const cne=(e,t)=>e===null?null:Ps(Math.round(e),0,t);function Kx(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class ob extends Yu{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:s,label:i}of n)r[s]===i&&r.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Nt(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:une(r,t,At(n,t),this._addedLabels),cne(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(s=this.getLabels().length-1)),this.min=r,this.max=s}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,s=[];let i=this.getLabels();i=t===0&&n===i.length-1?i:i.slice(t,n+1),this._valueRange=Math.max(i.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let o=t;o<=n;o++)s.push({value:o});return s}getLabelForValue(t){return Kx.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}ve(ob,"id","category"),ve(ob,"defaults",{ticks:{callback:Kx}});function dne(e,t){const n=[],{bounds:s,step:i,min:o,max:a,precision:l,count:u,maxTicks:c,maxDigits:d,includeBounds:f}=e,p=i||1,v=c-1,{min:m,max:y}=t,b=!Nt(o),w=!Nt(a),x=!Nt(u),P=(y-m)/(d+1);let S=Jk((y-m)/v/p)*p,C,R,k,E;if(S<1e-14&&!b&&!w)return[{value:m},{value:y}];E=Math.ceil(y/S)-Math.floor(m/S),E>v&&(S=Jk(E*S/v/p)*p),Nt(l)||(C=Math.pow(10,l),S=Math.ceil(S*C)/C),s==="ticks"?(R=Math.floor(m/S)*S,k=Math.ceil(y/S)*S):(R=m,k=y),b&&w&&i&&pZ((a-o)/i,S/1e3)?(E=Math.round(Math.min((a-o)/S,c)),S=(a-o)/E,R=o,k=a):x?(R=b?o:R,k=w?a:k,E=u-1,S=(k-R)/E):(E=(k-R)/S,mh(E,Math.round(E),S/1e3)?E=Math.round(E):E=Math.ceil(E));const I=Math.max(Zk(S),Zk(R));C=Math.pow(10,Nt(l)?I:l),R=Math.round(R*C)/C,k=Math.round(k*C)/C;let A=0;for(b&&(f&&R!==o?(n.push({value:o}),R<o&&A++,mh(Math.round((R+A*S)*C)/C,o,Yx(o,P,e))&&A++):R<o&&A++);A<E;++A){const O=Math.round((R+A*S)*C)/C;if(w&&O>a)break;n.push({value:O})}return w&&f&&k!==a?n.length&&mh(n[n.length-1].value,a,Yx(a,P,e))?n[n.length-1].value=a:n.push({value:a}):(!w||k===a)&&n.push({value:k}),n}function Yx(e,t,{horizontal:n,minRotation:r}){const s=ba(r),i=(n?Math.sin(s):Math.cos(s))||.001,o=.75*t*(""+e).length;return Math.min(t/i,o)}class fne extends Yu{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return Nt(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:s,max:i}=this;const o=l=>s=n?s:l,a=l=>i=r?i:l;if(t){const l=$o(s),u=$o(i);l<0&&u<0?a(0):l>0&&u>0&&o(0)}if(s===i){let l=i===0?1:Math.abs(i*.05);a(i+l),t||o(s-l)}this.min=s,this.max=i}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,s;return r?(s=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} 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 t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const s={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},i=this._range||this,o=dne(s,i);return t.bounds==="ticks"&&mZ(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const s=(r-n)/Math.max(t.length-1,1)/2;n-=s,r+=s}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return zM(t,this.chart.options.locale,this.options.ticks.format)}}class ab extends fne{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=fs(t)?t:0,this.max=fs(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=ba(this.options.ticks.minRotation),s=(t?Math.sin(r):Math.cos(r))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,i.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}ve(ab,"id","linear"),ve(ab,"defaults",{ticks:{callback:jM.formatters.numeric}});const Om={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}},Er=Object.keys(Om);function Xx(e,t){return e-t}function Qx(e,t){if(Nt(t))return null;const n=e._adapter,{parser:r,round:s,isoWeekday:i}=e._parseOpts;let o=t;return typeof r=="function"&&(o=r(o)),fs(o)||(o=typeof r=="string"?n.parse(o,r):n.parse(o)),o===null?null:(s&&(o=s==="week"&&(pp(i)||i===!0)?n.startOf(o,"isoWeek",i):n.startOf(o,s)),+o)}function Jx(e,t,n,r){const s=Er.length;for(let i=Er.indexOf(e);i<s-1;++i){const o=Om[Er[i]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(a*o.size))<=r)return Er[i]}return Er[s-1]}function hne(e,t,n,r,s){for(let i=Er.length-1;i>=Er.indexOf(n);i--){const o=Er[i];if(Om[o].common&&e._adapter.diff(s,r,o)>=t-1)return o}return Er[n?Er.indexOf(n):0]}function pne(e){for(let t=Er.indexOf(e)+1,n=Er.length;t<n;++t)if(Om[Er[t]].common)return Er[t]}function Zx(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:s}=cS(n,t),i=n[r]>=t?n[r]:n[s];e[i]=!0}}function mne(e,t,n,r){const s=e._adapter,i=+s.startOf(t[0].value,r),o=t[t.length-1].value;let a,l;for(a=i;a<=o;a=+s.add(a,1,r))l=n[a],l>=0&&(t[l].major=!0);return t}function eE(e,t,n){const r=[],s={},i=t.length;let o,a;for(o=0;o<i;++o)a=t[o],s[a]=o,r.push({value:a,major:!1});return i===0||!n?r:mne(e,r,s,n)}class yp extends Yu{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),s=this._adapter=new Aee._date(t.adapters.date);s.init(n),Lc(r.displayFormats,s.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:Qx(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:s,max:i,minDefined:o,maxDefined:a}=this.getUserBounds();function l(u){!o&&!isNaN(u.min)&&(s=Math.min(s,u.min)),!a&&!isNaN(u.max)&&(i=Math.max(i,u.max))}(!o||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),s=fs(s)&&!isNaN(s)?s:+n.startOf(Date.now(),r),i=fs(i)&&!isNaN(i)?i:+n.endOf(Date.now(),r)+1,this.min=Math.min(s,i-1),this.max=Math.max(s+1,i)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,s=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const i=this.min,o=this.max,a=_Z(s,i,o);return this._unit=n.unit||(r.autoSkip?Jx(n.minUnit,this.min,this.max,this._getLabelCapacity(i)):hne(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:pne(this._unit),this.initOffsets(s),t.reverse&&a.reverse(),eE(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,s,i;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?n=1-s:n=(this.getDecimalForValue(t[1])-s)/2,i=this.getDecimalForValue(t[t.length-1]),t.length===1?r=i:r=(i-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=Ps(n,0,o),r=Ps(r,0,o),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,s=this.options,i=s.time,o=i.unit||Jx(i.minUnit,n,r,this._getLabelCapacity(n)),a=At(s.ticks.stepSize,1),l=o==="week"?i.isoWeekday:!1,u=pp(l)||l===!0,c={};let d=n,f,p;if(u&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,u?"day":o),t.diff(r,n,o)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+o);const v=s.ticks.source==="data"&&this.getDataTimestamps();for(f=d,p=0;f<r;f=+t.add(f,a,o),p++)Zx(c,f,v);return(f===r||s.bounds==="ticks"||p===1)&&Zx(c,f,v),Object.keys(c).sort(Xx).map(m=>+m)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const s=this.options.time.displayFormats,i=this._unit,o=n||s[i];return this._adapter.format(t,o)}_tickFormatFunction(t,n,r,s){const i=this.options,o=i.ticks.callback;if(o)return Xt(o,[t,n,r],this);const a=i.time.displayFormats,l=this._unit,u=this._majorUnit,c=l&&a[l],d=u&&a[u],f=r[n],p=u&&d&&f&&f.major;return this._adapter.format(t,s||(p?d:c))}generateTickLabels(t){let n,r,s;for(n=0,r=t.length;n<r;++n)s=t[n],s.label=this._tickFormatFunction(s.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,s=ba(this.isHorizontal()?n.maxRotation:n.minRotation),i=Math.cos(s),o=Math.sin(s),a=this._resolveTickFontOptions(0).size;return{w:r*i+a*o,h:r*o+a*i}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,s=r[n.unit]||r.millisecond,i=this._tickFormatFunction(t,0,eE(this,[t],this._majorUnit),s),o=this._getLabelSize(i),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,r=s.length;n<r;++n)t=t.concat(s[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const s=this.getLabels();for(n=0,r=s.length;n<r;++n)t.push(Qx(this,s[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return NM(t.sort(Xx))}}ve(yp,"id","time"),ve(yp,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Ff(e,t,n){let r=0,s=e.length-1,i,o,a,l;n?(t>=e[r].pos&&t<=e[s].pos&&({lo:r,hi:s}=nb(e,"pos",t)),{pos:i,time:a}=e[r],{pos:o,time:l}=e[s]):(t>=e[r].time&&t<=e[s].time&&({lo:r,hi:s}=nb(e,"time",t)),{time:i,pos:a}=e[r],{time:o,pos:l}=e[s]);const u=o-i;return u?a+(l-a)*(t-i)/u:a}class tE extends yp{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=Ff(n,this.min),this._tableRange=Ff(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,s=[],i=[];let o,a,l,u,c;for(o=0,a=t.length;o<a;++o)u=t[o],u>=n&&u<=r&&s.push(u);if(s.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(o=0,a=s.length;o<a;++o)c=s[o+1],l=s[o-1],u=s[o],Math.round((c+l)/2)!==u&&i.push({time:u,pos:o/(a-1)});return i}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((s,i)=>s-i)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(Ff(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Ff(this._table,r*this._tableRange+this._minPos,!0)}}ve(tE,"id","timeseries"),ve(tE,"defaults",yp.defaults);const vD={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},gne={ariaLabel:{type:String},ariaDescribedby:{type:String}},vne={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...vD,...gne},yne=YC[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function vl(e){return _d(e)?Ne(e):e}function bne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return _d(t)?new Proxy(e,{}):e}function wne(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function yD(e,t){e.labels=t}function bD(e,t,n){const r=[];e.datasets=t.map(s=>{const i=e.datasets.find(o=>o[n]===s[n]);return!i||!s.data||r.includes(i)?{...s}:(r.push(i),Object.assign(i,s),i)})}function Sne(e,t){const n={labels:[],datasets:[]};return yD(n,e.labels),bD(n,e.datasets,t),n}const _ne=$e({props:vne,setup(e,t){let{expose:n,slots:r}=t;const s=V(null),i=Ae(null);n({chart:i});const o=()=>{if(!s.value)return;const{type:u,data:c,options:d,plugins:f,datasetIdKey:p}=e,v=Sne(c,p),m=bne(v,c);i.value=new Am(s.value,{type:u,data:m,options:{...d},plugins:f})},a=()=>{const u=Ne(i.value);u&&(e.destroyDelay>0?setTimeout(()=>{u.destroy(),i.value=null},e.destroyDelay):(u.destroy(),i.value=null))},l=u=>{u.update(e.updateMode)};return wt(o),Ap(a),ke([()=>e.options,()=>e.data],(u,c)=>{let[d,f]=u,[p,v]=c;const m=Ne(i.value);if(!m)return;let y=!1;if(d){const b=vl(d),w=vl(p);b&&b!==w&&(wne(m,b),y=!0)}if(f){const b=vl(f.labels),w=vl(v.labels),x=vl(f.datasets),P=vl(v.datasets);b!==w&&(yD(m.config.data,b),y=!0),x&&x!==P&&(bD(m.config.data,x,e.datasetIdKey),y=!0)}y&&Mt(()=>{l(m)})},{deep:!0}),()=>pr("canvas",{role:"img",ariaLabel:e.ariaLabel,ariaDescribedby:e.ariaDescribedby,ref:s},[pr("p",{},[r.default?r.default():""])])}});function kne(e,t){return Am.register(t),$e({props:vD,setup(n,r){let{expose:s}=r;const i=Ae(null),o=a=>{i.value=a==null?void 0:a.chart};return s({chart:i}),()=>pr(_ne,yne({ref:o},{type:e,...n}))}})}const xne=kne("bar",gh);function Ene(e,t){const n=typeof e=="string"?An(e):e,r=Cne(n,t);return{mounted:r,updated:r,unmounted(s){iP(null,s)}}}function Cne(e,t){return function(n,r,s){var d,f,p;const i=typeof t=="function"?t(r):t,o=((d=r.value)==null?void 0:d.text)??r.value??(i==null?void 0:i.text),a=Mb(r.value)?r.value:{},l=()=>o??n.textContent,u=(s.ctx===r.instance.$?(f=Pne(s,r.instance.$))==null?void 0:f.provides:(p=s.ctx)==null?void 0:p.provides)??r.instance.$.provides,c=pr(e,me(i,a),l);c.appContext=Object.assign(Object.create(null),r.instance.$.appContext,{provides:u}),iP(c,n)}}function Pne(e,t){const n=new Set,r=i=>{var o,a;for(const l of i){if(!l)continue;if(l===e||l.el&&e.el&&l.el===e.el)return!0;n.add(l);let u;if(l.suspense?u=r([l.ssContent]):Array.isArray(l.children)?u=r(l.children):(o=l.component)!=null&&o.vnode&&(u=r([(a=l.component)==null?void 0:a.subTree])),u)return u;n.delete(l)}return!1};if(!r([t.subTree]))return t;const s=Array.from(n).reverse();for(const i of s)if(i.component)return i.component;return t}const Tne=Ene(nt,e=>{var t;return{activator:"parent",location:(t=e.arg)==null?void 0:t.replace("-"," "),text:typeof e.value=="boolean"?void 0:e.value}}),Rne={class:"ma-3"},Ine={class:"ml-6"},Ane={class:"ml-7 mt-3"},One={key:0},Mne={key:2},Dne=$e({__name:"EmergencyCommands",setup(e){Am.register(ob,ab,bh,Zte,ane,Qte);const t=Lt(),n=Zi(),r=V(!1),s=V(!1),i=V([]),o=V([]),a=V(NaN),l=V(NaN),u=V(NaN),c=V({labels:[],datasets:[{label:"OctoPrint Settings response times (ms)",data:[],borderColor:"#FF6384",backgroundColor:"#ffffff"}]}),d={color:"white",plugins:{title:{color:"red",text:"Response times (ms)",display:!0}},responsive:!0},f=T(()=>t.printers.length===0||t.printers.every(P=>!P.enabled)),p=T(()=>t.printers.length===0||t.printers.every(P=>!!P.enabled)),v=T(()=>n.hasFeature("batchConnectUsbCalls")),m=T(()=>n.hasFeature("batchConnectSocketCalls"));async function y(){try{r.value=!0;const P=t.printers.map(E=>E.id),S=await Ml.batchSettingsGet(P),C=S.map(E=>{var I,A;return((A=(I=E.value)==null?void 0:I.appearance)==null?void 0:A.name)||"ERROR"});o.value=S.filter(E=>!E.success).map(E=>({message:E.error}));const R=S.map(E=>E.time),k=S.map(E=>{var I,A;return((A=(I=E.value)==null?void 0:I.appearance)==null?void 0:A.name)??""});a.value=R.reduce((E,I)=>E+I,0)/R.length,u.value=Math.min(...R),l.value=Math.max(...R),c.value={labels:k,datasets:[{label:"OctoPrint Settings response times (ms)",data:R,borderColor:"#FF6384",backgroundColor:"#ffffff"}]},s.value=!0,i.value=C}finally{r.value=!1}}async function b(P){if(confirm("Are you sure you want to toggle all printers?")){r.value=!0;try{await Ml.batchToggleEnabled(t.printers.map(S=>S.id),P)}finally{r.value=!1}}}async function w(){if(confirm("Are you sure you want to connect all USBs?"))try{await Ml.batchConnectUsb(t.printers.map(P=>P.id))}finally{r.value=!1}}async function x(){confirm("Are you sure you want to connect all sockets?")&&(r.value=!0,await Ml.batchConnectSocket(t.printers.map(P=>P.id)),r.value=!1)}return(P,S)=>(D(),te(gt,null,{default:g(()=>[h(mr,{color:"primary"},{default:g(()=>[h(lt,null,{default:g(()=>[h(Q,null,{default:g(()=>S[3]||(S[3]=[_("settings")])),_:1})]),_:1}),h(En,null,{default:g(()=>S[4]||(S[4]=[_(" Emergency Commands ")])),_:1})]),_:1}),h(Vt,{subheader:"",lines:"three"},{default:g(()=>[h(Wr,null,{default:g(()=>S[5]||(S[5]=[_(" Emergency Commands to rectify problematic situations ")])),_:1}),h(Be,null,{default:g(()=>[h(dt,null,{default:g(()=>S[6]||(S[6]=[_(" Batch disabling ")])),_:1}),h(yt,null,{default:g(()=>[S[9]||(S[9]=_(" Disable all printers in batch (will not affect print) ")),S[10]||(S[10]=$("br",null,null,-1)),h(se,{disabled:r.value||f.value,color:"primary",onClick:S[0]||(S[0]=C=>b(!1)),class:"ml-4"},{default:g(()=>S[7]||(S[7]=[_(" Batch disable ")])),_:1},8,["disabled"]),r.value?(D(),te(ri,{key:0,indeterminate:"",size:"30",width:"4",class:"ml-2"})):ue("",!0),f.value?(D(),te(Q,{key:1,color:"warning",class:"ml-2"},{default:g(()=>S[8]||(S[8]=[_(" warning ")])),_:1})):ue("",!0)]),_:1})]),_:1}),h(Be,null,{default:g(()=>[h(dt,null,{default:g(()=>S[11]||(S[11]=[_(" Batch enabling ")])),_:1}),h(yt,null,{default:g(()=>[S[14]||(S[14]=_(" Enabling all printers in batch (will not affect print and it will skip printers in maintenance mode) ")),S[15]||(S[15]=$("br",null,null,-1)),h(se,{disabled:r.value||p.value,color:"primary",onClick:S[1]||(S[1]=C=>b(!0)),class:"ml-4"},{default:g(()=>S[12]||(S[12]=[_(" Batch enable ")])),_:1},8,["disabled"]),r.value?(D(),te(ri,{key:0,indeterminate:"",size:"30",width:"4",class:"ml-2"})):ue("",!0),p.value?Bt((D(),te(Q,{key:1,color:"warning",class:"ml-2"},{default:g(()=>S[13]||(S[13]=[_("warning")])),_:1})),[[Tne,"No printers available",void 0,{bottom:!0}]]):ue("",!0)]),_:1})]),_:1}),h(Be,null,{default:g(()=>[h(dt,null,{default:g(()=>S[16]||(S[16]=[_(" Batch USB connect ")])),_:1}),h(yt,null,{default:g(()=>[S[21]||(S[21]=_(" Connect all USB devices ")),S[22]||(S[22]=$("br",null,null,-1)),h(se,{disabled:!v.value||r.value||f.value,color:"primary",onClick:w,class:"ml-4"},{default:g(()=>[h(Q,{class:"mr-2"},{default:g(()=>S[17]||(S[17]=[_("usb")])),_:1}),S[18]||(S[18]=_(" Connect USBs "))]),_:1},8,["disabled"]),v.value?ue("",!0):(D(),te(rn,{key:0,class:"ml-4 mt-2",type:"warning",color:"orange"},{default:g(()=>[h(Q,{class:"mr-2"},{default:g(()=>S[19]||(S[19]=[_("warning")])),_:1}),S[20]||(S[20]=_(" This feature requires an FDM Monster server update. "))]),_:1})),r.value?(D(),te(ri,{key:1,indeterminate:"",size:"30",width:"4",class:"ml-2"})):ue("",!0)]),_:1}),h(yt,{class:"mt-2"},{default:g(()=>[S[25]||(S[25]=_(" Connect all Sockets ")),S[26]||(S[26]=$("br",null,null,-1)),h(se,{disabled:!m.value||r.value||f.value,color:"primary",onClick:x,class:"ml-4"},{default:g(()=>[h(Q,{class:"mr-2"},{default:g(()=>S[23]||(S[23]=[_("hub")])),_:1}),S[24]||(S[24]=_(" Connect Sockets "))]),_:1},8,["disabled"])]),_:1}),m.value?ue("",!0):(D(),te(rn,{key:0,class:"ml-4 mt-2",type:"warning",color:"orange"},{default:g(()=>[h(Q,{class:"mr-2"},{default:g(()=>S[27]||(S[27]=[_("warning")])),_:1}),S[28]||(S[28]=_(" This feature requires an FDM Monster server update. "))]),_:1})),r.value?(D(),te(ri,{key:1,indeterminate:"",size:"30",width:"4",class:"ml-2"})):ue("",!0)]),_:1})]),_:1}),$("div",Rne,[h(rn,null,{default:g(()=>S[29]||(S[29]=[_(" Test all OctoPrint response times ")])),_:1}),$("div",Ine,[h(se,{color:"primary",onClick:S[2]||(S[2]=C=>y()),loading:r.value},{default:g(()=>S[30]||(S[30]=[_(" Measure network response times ")])),_:1},8,["loading"])]),$("div",Ane,[s.value?(D(),ge("span",One," Response times: ")):ue("",!0),s.value?(D(),te(Z(xne),{key:1,style:{"background-color":"#272727"},data:c.value,options:d,height:"100"},null,8,["data"])):(D(),ge("span",Mne,"A graph will be shown, presenting the times in milliseconds (ms)")),r.value?(D(),te(ri,{key:3,indeterminate:"",size:"30",width:"4",class:"ml-2"})):ue("",!0)])])]),_:1}))}}),$ne={class:"text-center"},Fne=$e({__name:"NotFoundView",setup(e){const t=Jo(),n=()=>{t.go(-1)};return(r,s)=>(D(),te(Bn,null,{default:g(()=>[s[6]||(s[6]=$("h2",{class:"text-center mt-lg-12"},"This page was not found.",-1)),s[7]||(s[7]=$("h1",{class:"text-center"},": (",-1)),s[8]||(s[8]=$("br",null,null,-1)),$("h4",$ne,[h(se,{class:"align-center",color:"primary",to:"/",variant:"elevated"},{default:g(()=>[h(Q,{class:"mr-2"},{default:g(()=>s[1]||(s[1]=[_("home")])),_:1}),s[2]||(s[2]=_(" Go home "))]),_:1}),s[5]||(s[5]=$("span",{class:"pa-5"}," or ",-1)),h(se,{class:"align-center",variant:"elevated",onClick:s[0]||(s[0]=i=>n())},{default:g(()=>[h(Q,{class:"mr-2"},{default:g(()=>s[3]||(s[3]=[_("arrow_left")])),_:1}),s[4]||(s[4]=_(" Go back "))]),_:1})])]),_:1}))}}),Lne={key:0},Nne={key:1},Bne={key:2},Vne={key:3},Une={key:4},zne=$e({__name:"PermissionDenied",setup(e){const t=NO(),n=T(()=>t.query);return(r,s)=>(D(),te(Bn,{"fill-height":"",fluid:""},{default:g(()=>[h(ZO,{color:"primary"},{default:g(()=>[h(En,{class:"text-uppercase text-white"},{default:g(()=>s[0]||(s[0]=[$("span",{class:"font-weight-light"}," FDM ",-1),$("strong",null," Monster ",-1)])),_:1})]),_:1}),s[11]||(s[11]=$("img",{alt:"FDM Monster Background",class:"grid-bg-img align-content-center",src:rS,style:{opacity:"0.06"}},null,-1)),h(_m,{"align-center":"",column:"","justify-center":""},{default:g(()=>[h(gt,{class:"flex align-center justify-center pa-lg-16 pa-sm-10",style:{width:"80%"}},{default:g(()=>[h(an,null,{default:g(()=>[h(Q,{class:"mr-4",size:"50"},{default:g(()=>s[1]||(s[1]=[_(" lock ")])),_:1}),s[2]||(s[2]=$("h3",null,"Permission Denied",-1))]),_:1}),h(mm,{class:"mt-1"},{default:g(()=>s[3]||(s[3]=[_(" You do not have permission to access a specific resource on this page. ")])),_:1}),n.value?(D(),te(en,{key:0},{default:g(()=>{var i,o;return[n.value.page?(D(),ge("div",Lne,[s[4]||(s[4]=_(" Page: ")),$("strong",null,re((i=n.value)==null?void 0:i.page),1)])):ue("",!0),n.value.permissions?(D(),ge("div",Nne,[s[5]||(s[5]=_(" Required permission(s): ")),(D(!0),ge(Pe,null,Wt(n.value.permissions,a=>(D(),ge("strong",{key:a},re(a),1))),128))])):ue("",!0),n.value.roles?(D(),ge("div",Bne,[s[6]||(s[6]=_(" Usable roles: ")),$("strong",null,re((o=n.value.roles)==null?void 0:o.join(", ")),1)])):ue("",!0),n.value.url?(D(),ge("div",Vne,[s[7]||(s[7]=_(" Problematic API path: ")),$("strong",null,re(n.value.url),1)])):ue("",!0),n.value.error?(D(),ge("div",Une,[s[8]||(s[8]=_(" Error: ")),$("strong",null,re(n.value.error),1)])):ue("",!0)]}),_:1})):ue("",!0),h(Dn,{class:"mt-6"},{default:g(()=>[h(se,{class:"align-center",color:"primary",to:"/",variant:"elevated"},{default:g(()=>[h(Q,{class:"mr-2"},{default:g(()=>s[9]||(s[9]=[_("home")])),_:1}),s[10]||(s[10]=_(" Go home "))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}}),Hne=$e({__name:"Logo",setup(e){return(t,n)=>(D(),te(cs,{src:Z(eS),class:"shrink mr-1 pt-3 ml-1",contain:"",style:{opacity:"0.85"},width:"150"},null,8,["src"]))}}),jne=$e({__name:"LoginForm",setup(e){const t=us(),n=V(""),r=V(""),s=V(!1),i=V(""),o=Jo(),a=NO(),l=V(!1),u=Br("auth:login"),c=Dt(),d=T(()=>{var m;return((m=r.value??"")==null?void 0:m.length)<3||(i.value??"").length<3});wt(async()=>{if(t.loadTokens(),await t.checkAuthenticationRequirements(),t.loginRequired===!1)return console.debug("LoginView, no login required, redirecting to",a.query.redirect,"or home"),u.emit(!0),await v();if(!t.hasRefreshToken)return;await t.verifyOrRefreshLoginOnceOrLogout()&&await v()});async function f(){return await o.push({name:qt.Registration})}async function p(){var m,y,b,w;try{l.value=!0,await t.login(r.value,i.value),t.lastLogoutReason=null,i.value="",l.value=!1}catch(x){if(l.value=!1,((m=x==null?void 0:x.response)==null?void 0:m.status)===401){i.value="";const P=(b=(y=x==null?void 0:x.response)==null?void 0:y.data)==null?void 0:b.reasonCode,S=Gb(P);P===xr.AccountNotVerified?c.error(S,"Please ask your administrator to verify your account and try again."):P===xr.PasswordChangeRequired&&c.error(S,"Your password needs to be changed. This feature is sadly not finished"),n.value=S;return}c.openErrorMessage({title:"Error logging in",subtitle:"Please test your connection and try again."}),n.value="Error logging in - status code "+((w=x==null?void 0:x.response)==null?void 0:w.status),i.value="";return}return n.value="",u.emit(!0),await v()}async function v(){const m=a.query.redirect;if(m){console.debug("[LoginForm] Redirecting to ",m),await o.push({path:m});return}else{console.debug("[LoginForm] Redirecting to home"),await o.push({name:qt.Home});return}}return(m,y)=>(D(),te(gt,{class:"pa-4",elevation:"10",style:{"border-radius":"10px"}},{default:g(()=>[h(en,null,{default:g(()=>[h(iS,null,{default:g(()=>[y[7]||(y[7]=$("label",null," Username ",-1)),h(ut,{modelValue:r.value,"onUpdate:modelValue":y[0]||(y[0]=b=>r.value=b),"prepend-icon":"person",autofocus:"",label:"Username",name:"login",type:"text",variant:"underlined",onKeyup:y[1]||(y[1]=wv(b=>d.value||p(),["enter"]))},null,8,["modelValue"]),h(ut,{modelValue:i.value,"onUpdate:modelValue":y[2]||(y[2]=b=>i.value=b),"append-inner-icon":s.value?"visibility_off":"visibility","onClick:appendInner":y[3]||(y[3]=b=>s.value=!s.value),type:s.value?"text":"password",label:"Password",name:"password",password:"","prepend-icon":"lock",variant:"underlined",onKeyup:y[4]||(y[4]=wv(b=>d.value||p(),["enter"]))},null,8,["modelValue","append-inner-icon","type"]),n.value?(D(),te(rn,{key:0,class:"mt-6",color:"error",density:"compact",variant:"outlined"},{default:g(()=>[_(re(n.value),1)]),_:1})):ue("",!0),Z(t).lastLogoutReason?(D(),te(rn,{key:1,class:"mt-6",color:"error-darken-1",density:"compact",variant:"outlined"},{default:g(()=>[_(" Reason for automatic logout: "+re(Z(t).lastLogoutReason),1)]),_:1})):ue("",!0)]),_:1})]),_:1}),h(Dn,null,{default:g(()=>[h(se,{loading:l.value,class:"pa-4",color:"primary",size:"lg",variant:"flat",style:{width:"100%"},onClick:y[5]||(y[5]=b=>p())},{default:g(()=>y[8]||(y[8]=[_(" Login ")])),_:1},8,["loading"])]),_:1}),h(Dn,null,{default:g(()=>[h(se,{disabled:!Z(t).registration,class:"pa-4",size:"lg",variant:"flat",style:{width:"100%"},onClick:y[6]||(y[6]=b=>f())},{default:g(()=>[_(" Register new account "+re(Z(t).registration?"":"(not enabled)")+" ",1),h(Q,{class:"pl-5",icon:"right"})]),_:1},8,["disabled"])]),_:1})]),_:1}))}}),qne={class:"d-flex align-center",style:{"min-height":"calc(100vh - 148px)"}},Wne={class:"pt-6 pl-6 d-flex flex-column align-center"},Gne=$e({__name:"LoginView",setup(e){return(t,n)=>{const r=Hne;return D(),te(rt,{class:"position-relative","no-gutters":""},{default:g(()=>[h(Ue,{cols:"12",lg:"12"},{default:g(()=>[h(Bn,null,{default:g(()=>[$("div",qne,[h(rt,{justify:"center",class:"align-content-center"},{default:g(()=>[$("div",Wne,[h(r),h(En,{class:"text-uppercase text-red"},{default:g(()=>n[0]||(n[0]=[$("strong",null," FDM ",-1),$("strong",null," Monster ",-1)])),_:1}),h(En,{class:"mt-lg-6 mt-sm-5 mb-md-5"},{default:g(()=>n[1]||(n[1]=[_(" Login to your account ")])),_:1}),h(mm,{class:"text-grey mb-md-5"},{default:g(()=>n[2]||(n[2]=[_(" Welcome back! Please enter your details ")])),_:1})]),h(Ue,{cols:"12",md:"12"},{default:g(()=>[h(jne,{class:"login-card"})]),_:1})]),_:1})])]),_:1})]),_:1})]),_:1})}}}),Kne={class:"d-flex flex-column align-center"},Yne=$e({__name:"RegistrationForm",setup(e){const t=us(),n=Jo(),r=V(""),s=V(""),i=V(!1),o=V(!1),a=V(""),l=V(""),u=V(!1),c=Dt();async function d(){return await n.push({name:qt.Login})}const f=T(()=>{var v;return((v=s.value??"")==null?void 0:v.length)<3||(a.value??"").length<3||a.value!=l.value});wt(async()=>{await t.logout(),await t.checkAuthenticationRequirements(),t.registration||(c.info("Registration is disabled, please contact your administrator"),await n.push({name:qt.Login}))});async function p(){var v;try{u.value=!0,await da.registerAccount(s.value,a.value),u.value=!1}catch(m){if(u.value=!1,((v=m==null?void 0:m.response)==null?void 0:v.status)===401){r.value="Invalid credentials";return}c.openErrorMessage({title:"Error logging in",subtitle:"Please test your connection and try again."});return}r.value="",c.info("Account created, please login"),await d()}return(v,m)=>{const y=An("v-flex");return D(),te(Bn,{"fill-height":"",fluid:""},{default:g(()=>[h(_m,{"align-content-center":"","justify-center":""},{default:g(()=>[h(y,{class:"d-flex flex-column align-content-center",md4:"",sm8:"",style:{"max-width":"450px","margin-top":"10%"},xs12:""},{default:g(()=>[$("div",Kne,[h(cs,{src:require("@/assets/logo.png"),class:"shrink mr-1 pt-3 ml-1",contain:"",style:{opacity:"0.85"},width:"150"},null,8,["src"]),h(En,{class:"text-uppercase text-red"},{default:g(()=>m[8]||(m[8]=[$("strong",null," FDM ",-1),$("strong",null," Monster ",-1)])),_:1}),h(En,{class:"mt-lg-6 mt-sm-5"},{default:g(()=>m[9]||(m[9]=[_(" Register new account ")])),_:1}),h(mm,{class:"text-grey"},{default:g(()=>m[10]||(m[10]=[_(" Welcome! Please register your guest account ")])),_:1})]),h(gt,{class:"elevation-4 pa-4",style:{"border-radius":"10px"}},{default:g(()=>[h(en,null,{default:g(()=>[h(iS,null,{default:g(()=>[m[11]||(m[11]=$("label",null," Username ",-1)),h(ut,{modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=b=>s.value=b),rules:[b=>!!b||"Username is required",b=>((b==null?void 0:b.length)??0)>=3||"Username must be of length 3 or greater",b=>!b.toLowerCase().includes("admin")||"Username may not contain the word admin",b=>!b.toLowerCase().includes("root")||"Username may not contain the word root",b=>b.toLowerCase()!=="demo"||"Username may not equal the word demo"],autofocus:"",name:"login",label:"Username","prepend-icon":"person",type:"text"},null,8,["modelValue","rules"]),h(ut,{id:"password",modelValue:a.value,"onUpdate:modelValue":m[1]||(m[1]=b=>a.value=b),"append-icon":i.value?"visibility":"visibility_off",type:i.value?"text":"password",label:"Password",name:"password",rules:[b=>!!b||"Password is required",b=>!!b&&(b==null?void 0:b.length)>=8||"Password must be of length 8 or greater"],password:"","prepend-icon":"lock","onClick:append":m[2]||(m[2]=b=>i.value=!i.value)},null,8,["modelValue","append-icon","type","rules"]),h(ut,{id:"password",modelValue:l.value,"onUpdate:modelValue":m[3]||(m[3]=b=>l.value=b),"append-icon":o.value?"visibility":"visibility_off",type:o.value?"text":"password",rules:[b=>!!b||"Repeated password is required",b=>b===a.value||"Passwords are not equal"],label:"Repeated Password",name:"password",password:"","prepend-icon":"lock","onClick:append":m[4]||(m[4]=b=>o.value=!o.value),onKeyup:m[5]||(m[5]=wv(b=>f.value||p(),["enter"]))},null,8,["modelValue","append-icon","type","rules"]),r.value?(D(),te(rn,{key:0,class:"mt-6",color:"error",density:"compact",variant:"outlined"},{default:g(()=>[_(re(r.value),1)]),_:1})):ue("",!0)]),_:1})]),_:1}),h(Dn,null,{default:g(()=>[h(se,{loading:u.value,class:"pa-4",color:"primary",size:"large",style:{width:"100%"},onClick:m[6]||(m[6]=b=>p())},{default:g(()=>m[12]||(m[12]=[_(" Register account ")])),_:1},8,["loading"])]),_:1}),h(Dn,null,{default:g(()=>[h(se,{style:{width:"100%"},class:"pa-4",size:"large",onClick:m[7]||(m[7]=b=>d())},{default:g(()=>[h(Q,{class:"mr-2"},{default:g(()=>m[13]||(m[13]=[_("arrow_left")])),_:1}),m[14]||(m[14]=_("Back to Login "))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}}}),Xne=$e({__name:"RegistrationView",setup(e){return(t,n)=>(D(),te(Bn,{"fill-height":"",fluid:""},{default:g(()=>[h(_m,{"align-center":"","justify-center":""},{default:g(()=>[h(Yne)]),_:1})]),_:1}))}}),Qne=["src"],Jne=$e({__name:"CameraGridView",setup(e){const t=Lt(),n=tn(nn.AddOrUpdateCameraDialog),s=Sm({queryKey:["cameraStream"],queryFn:async()=>(await op.listCameraStreams()).map(c=>({printer:t.printers.find(d=>d.id===c.printerId),cameraStream:c}))}),i=iK({mutationFn:u=>op.deleteCameraStream(u),onSuccess:()=>s.refetch()});function o(){n.openDialog({addOrUpdate:"add"})}function a(u){u&&n.openDialog({addOrUpdate:"update",cameraId:u})}function l(u){u&&i.mutateAsync(u)}return(u,c)=>(D(),ge("div",null,[h(mr,null,{default:g(()=>[h(En,{class:"mr-4"},{default:g(()=>c[1]||(c[1]=[_(" Camera Overview ")])),_:1}),h(se,{color:"primary",onClick:c[0]||(c[0]=d=>o())},{default:g(()=>[h(Q,{class:"mr-2"},{default:g(()=>c[2]||(c[2]=[_("add")])),_:1}),c[3]||(c[3]=_(" Add camera "))]),_:1})]),_:1}),h(rt,{class:"ma-0"},{default:g(()=>[(D(!0),ge(Pe,null,Wt(Z(s).data.value,d=>(D(),ge("div",{key:d.cameraStream.id,class:"ma-4",style:{border:"1px solid grey",margin:"0"},width:"300"},[h(gt,{class:"pb-2 pl-2 pr-2",width:"300"},{default:g(()=>{var f;return[h(an,null,{default:g(()=>{var p;return[d.cameraStream.printerId?(D(),te(Q,{key:0,class:"mr-2",size:"small"},{default:g(()=>c[4]||(c[4]=[_(" print ")])),_:1})):(D(),te(Q,{key:1,class:"mr-2",size:"small"},{default:g(()=>c[5]||(c[5]=[_(" camera_alt ")])),_:1})),_(" "+re((d==null?void 0:d.cameraStream.name)??((p=d==null?void 0:d.printer)==null?void 0:p.name)??"Camera"),1)]}),_:2},1024),$("img",{src:(f=d.cameraStream)==null?void 0:f.streamURL,width:"100%"},null,8,Qne),c[10]||(c[10]=$("br",null,null,-1)),h(se,{class:"mr-1",size:"small",onClick:p=>a(d.cameraStream.id)},{default:g(()=>[h(Q,{class:"mr-2"},{default:g(()=>c[6]||(c[6]=[_("edit")])),_:1}),c[7]||(c[7]=_(" Update "))]),_:2},1032,["onClick"]),h(se,{size:"small",onClick:p=>l(d.cameraStream.id)},{default:g(()=>[h(Q,{class:"mr-2"},{default:g(()=>c[8]||(c[8]=[_("delete")])),_:1}),c[9]||(c[9]=_(" Delete "))]),_:2},1032,["onClick"])]}),_:2},1024)]))),128))]),_:1})]))}}),Zne="/img/OIG.jpg";class ere extends vr{static async postFirstTimeSetup(t){const n=Me.completeFirstTimeSetupRoute;return await this.post(n,t)}}const tre={class:"mt-6 border_all"},nre={class:"d-flex flex-row align-center"},rre={class:"d-flex flex-row align-center"},sre={class:"d-flex flex-row align-center"},ire={class:"d-flex flex-row align-center"},ore={class:"mt-4"},are={class:"mt-4"},lre={class:"mt-14"},ure={class:"mb-5 mt-10"},cre={class:"mt-14"},dre=$e({__name:"FirstTimeSetupView",setup(e){const t=Jo(),n=Dt(),r=V(!1),s=us(),i=V({loginRequired:!0,registration:!1}),o=V({rootUsername:"admin",rootPassword:"",rootPassword2:""}),a=V(1);wt(async()=>{var c;await s.checkAuthenticationRequirements(),(c=s.wizardState)!=null&&c.wizardCompleted&&(n.info("Setup already completed."),s.loginRequired?await t.push({name:"Login"}):await t.push({name:"Home"}))});async function l(){if(!r.value){n.error("Please fill out all required fields.");return}const c=i.value,d=o.value;await ere.postFirstTimeSetup({loginRequired:c.loginRequired,registration:c.registration,rootUsername:d.rootUsername,rootPassword:d.rootPassword}),n.openInfoMessage({title:"Setup completed"}),a.value=3}async function u(){await t.push({name:"Login"})}return(c,d)=>{const f=An("v-stepper-step"),p=An("v-stepper-content"),v=An("v-stepper-items");return D(),te(Bn,null,{default:g(()=>[d[46]||(d[46]=$("img",{alt:"FDM Monster Background",class:"grid-bg-img align-content-center",src:rS,style:{opacity:"0.08"}},null,-1)),h(lO,{modelValue:a.value,"onUpdate:modelValue":d[10]||(d[10]=m=>a.value=m),class:"bg-grey-darken-4"},{default:g(()=>[h(Bw,null,{default:g(()=>[h(f,{complete:a.value>1,step:"1"},{default:g(()=>d[11]||(d[11]=[_(" Introduction ")])),_:1},8,["complete"]),h(dn),h(f,{complete:a.value>2,step:"2"},{default:g(()=>d[12]||(d[12]=[_(" Login and registration ")])),_:1},8,["complete"]),h(dn),h(f,{step:"3"},{default:g(()=>d[13]||(d[13]=[_(" Summary ")])),_:1})]),_:1}),h(v,null,{default:g(()=>[h(p,{class:"align-content-center align-center text-center",step:"1"},{default:g(()=>[d[17]||(d[17]=$("div",{class:"align-content-center align-center text-center"},[$("img",{class:"rounded-pill ma-4",src:Zne,style:{opacity:"0.7"},width:"400"}),_(" /> "),$("h1",null,"FDM Monster"),$("small",null," This server is still unconfigured. ")],-1)),h(se,{class:"mt-14 mb-14",color:"primary",onClick:d[0]||(d[0]=m=>a.value=2)},{default:g(()=>d[14]||(d[14]=[_(" Start Setup ")])),_:1}),$("div",tre,[h(Q,{class:"mr-6"},{default:g(()=>d[15]||(d[15]=[_("question_mark")])),_:1}),d[16]||(d[16]=$("small",null,[_(" If you have questions at any point, reach out on "),$("a",{href:"https://github.com/fdm-monster/fdm-monster/issues"}," Github "),_(" or on "),$("a",{href:"https://discord.gg/mwA8uP8CMc"}," Discord "),_(". ")],-1))])]),_:1}),h(p,{class:"align-content-center align-center text-center",step:"2"},{default:g(()=>[$("h4",null,[h(Q,{class:"mr-2"},{default:g(()=>d[18]||(d[18]=[_("settings")])),_:1}),d[19]||(d[19]=_(" Login"))]),h(iS,{modelValue:r.value,"onUpdate:modelValue":d[6]||(d[6]=m=>r.value=m)},{default:g(()=>[h(up,{modelValue:i.value.loginRequired,"onUpdate:modelValue":d[1]||(d[1]=m=>i.value.loginRequired=m),class:"mt-5"},{message:g(()=>[$("span",nre,[h(Q,{color:i.value.loginRequired?"success":"",disabled:!i.value.loginRequired,class:"ml-3 mr-3"},{default:g(()=>d[20]||(d[20]=[_(" check ")])),_:1},8,["color","disabled"]),d[21]||(d[21]=_(" Login is required. "))]),$("span",rre,[h(Q,{color:i.value.loginRequired?"":"error",disabled:i.value.loginRequired,class:"ml-3 mr-3"},{default:g(()=>d[22]||(d[22]=[_(" close ")])),_:1},8,["color","disabled"]),d[23]||(d[23]=_(" No login is required. The admin role is assumed. "))])]),label:g(()=>d[24]||(d[24]=[_(" Enable Login ")])),_:1},8,["modelValue"]),i.value.loginRequired?ue("",!0):(D(),te(rn,{key:0,color:"error-darken-4"},{default:g(()=>d[25]||(d[25]=[_(" You might be exposing your FDM Monster server publicly. Please take care evaluating the "),$("strong",null," Enable Login ",-1),_(" option. ")])),_:1})),h(up,{modelValue:i.value.registration,"onUpdate:modelValue":d[2]||(d[2]=m=>i.value.registration=m),class:"mt-10 mb-10"},{message:g(()=>[$("span",sre,[h(Q,{color:i.value.registration?"success":"",disabled:!i.value.registration,class:"ml-3 mr-3"},{default:g(()=>d[26]||(d[26]=[_(" check ")])),_:1},8,["color","disabled"]),d[27]||(d[27]=_(" Accounts can be registered with a guest role. "))]),$("span",ire,[h(Q,{color:i.value.registration?"":"error",disabled:i.value.registration,class:"ml-3 mr-3"},{default:g(()=>d[28]||(d[28]=[_(" close ")])),_:1},8,["color","disabled"]),d[29]||(d[29]=_(" No other accounts can be registered. "))])]),label:g(()=>d[30]||(d[30]=[_(" Enable Registration ")])),_:1},8,["modelValue"]),h(dn),$("h4",ore,[h(Q,{class:"mr-2"},{default:g(()=>d[31]||(d[31]=[_("shield")])),_:1}),d[32]||(d[32]=_(" Admin account "))]),h(ut,{modelValue:o.value.rootUsername,"onUpdate:modelValue":d[3]||(d[3]=m=>o.value.rootUsername=m),rules:[m=>!!m||"Username is required"],class:"mt-5",label:"Username","prepend-icon":"person"},{prepend:g(()=>[h(Q,null,{default:g(()=>d[33]||(d[33]=[_("person")])),_:1})]),_:1},8,["modelValue","rules"]),h(ut,{modelValue:o.value.rootPassword,"onUpdate:modelValue":d[4]||(d[4]=m=>o.value.rootPassword=m),type:"password","prepend-icon":"lock",rules:[m=>!!m||"Password is required",m=>!!m&&(m==null?void 0:m.length)>=8||"Password must be of length 8 or greater"],class:"mt-5",label:"Password"},{prepend:g(()=>[h(Q,null,{default:g(()=>d[34]||(d[34]=[_("password")])),_:1})]),_:1},8,["modelValue","rules"]),h(ut,{modelValue:o.value.rootPassword2,"onUpdate:modelValue":d[5]||(d[5]=m=>o.value.rootPassword2=m),type:"password","prepend-icon":"lock",rules:[m=>!!m||"Repeated password is required",m=>m===o.value.rootPassword||"Passwords are not equal"],class:"mt-5",label:"Repeated Password"},{prepend:g(()=>[h(Q,null,{default:g(()=>d[35]||(d[35]=[_("password")])),_:1})]),_:1},8,["modelValue","rules"])]),_:1},8,["modelValue"]),$("div",are,[h(se,{class:"mr-4",onClick:d[7]||(d[7]=m=>a.value=1)},{default:g(()=>d[36]||(d[36]=[_(" Back ")])),_:1}),h(se,{disabled:!r.value,color:"primary",onClick:d[8]||(d[8]=m=>l())},{default:g(()=>d[37]||(d[37]=[_(" Verify & Submit ")])),_:1},8,["disabled"])]),h(dn,{class:"mt-4"}),$("div",lre,[h(Q,{class:"mr-6"},{default:g(()=>d[38]||(d[38]=[_("question_mark")])),_:1}),d[39]||(d[39]=$("small",null,[_(" If you have questions at any point, reach out on "),$("a",{href:"https://github.com/fdm-monster/fdm-monster/issues"}," Github "),_(" or on "),$("a",{href:"https://discord.gg/mwA8uP8CMc"}," Discord "),_(". ")],-1))])]),_:1}),h(p,{class:"align-content-center align-center text-center",step:"3"},{default:g(()=>[$("div",ure,[h(Q,{size:"100",class:"mr-5",color:"green circle"},{default:g(()=>d[40]||(d[40]=[_(" check_circle ")])),_:1}),d[41]||(d[41]=_(" Setup Completed "))]),d[45]||(d[45]=$("br",null,null,-1)),h(se,{color:"primary",class:"mr-4",onClick:d[9]||(d[9]=m=>u())},{default:g(()=>d[42]||(d[42]=[_(" Let's continue ")])),_:1}),$("div",cre,[h(Q,{class:"mr-6"},{default:g(()=>d[43]||(d[43]=[_("question_mark")])),_:1}),d[44]||(d[44]=$("small",null,[_(" If you have questions at any point, reach out on "),$("a",{href:"https://github.com/fdm-monster/fdm-monster/issues"}," Github "),_(" or on "),$("a",{href:"https://discord.gg/mwA8uP8CMc"}," Discord "),_(". ")],-1))])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}}}),fre={class:"ml-4 mb-4"},hre={class:"ml-4 mb-4"},pre=$e({__name:"AccountSettings",setup(e){const t=Ns(),n=Kw(),r=us(),s=Jo(),i=Dt(),o=V(),a=V(""),l=V({username:"",newPassword:"",oldPassword:"",repeatPassword:""});wt(async()=>{var d;await t.loadSettings(),o.value=(d=t.settings)==null?void 0:d.server.loginRequired,await n.getProfile(),l.value.username=n.username,a.value=n.userId});async function u(){var d,f;if(!((f=(d=a.value)==null?void 0:d.toString())!=null&&f.length)){i.openErrorMessage({title:"User not loaded"});return}await ns.changeUsername(a.value,l.value.username),await n.getProfile(),l.value.username=n.username,i.openInfoMessage({title:"Username changed"})}async function c(){var d,f;if(!((f=(d=a.value)==null?void 0:d.toString())!=null&&f.length)){i.openErrorMessage({title:"User not loaded"});return}if(l.value.newPassword!==l.value.repeatPassword){i.openErrorMessage({title:"Passwords do not match"});return}await ns.changePassword(a.value,l.value.oldPassword,l.value.newPassword),l.value.oldPassword="",l.value.newPassword="",l.value.repeatPassword="",i.openInfoMessage({title:"Password changed"}),await r.logout(!0),await BO(s)}return(d,f)=>{const p=An("v-list-item-content"),v=An("v-list-item-action-text");return D(),te(gt,null,{default:g(()=>[h(mr,{color:"primary"},{default:g(()=>[h(lt,null,{default:g(()=>[h(Q,null,{default:g(()=>f[6]||(f[6]=[_("account_circle")])),_:1})]),_:1}),h(En,null,{default:g(()=>f[7]||(f[7]=[_(" Account Settings ")])),_:1})]),_:1}),h(Vt,{subheader:"",lines:"three"},{default:g(()=>[h(Be,null,{default:g(()=>[o.value?ue("",!0):(D(),te(p,{key:0},{default:g(()=>[h(rn,{color:"primary"},{default:g(()=>f[8]||(f[8]=[_(" Login is currently disabled. To adjust your username and password, please enable that setting at the Server Protection settings page. Then log in and visit this page. ")])),_:1})]),_:1}))]),_:1})]),_:1}),h(Vt,{subheader:"",lines:"three"},{default:g(()=>[h(Be,null,{default:g(()=>[h(dt,null,{default:g(()=>f[9]||(f[9]=[_(" Username ")])),_:1}),h(v,null,{default:g(()=>[h(ut,{modelValue:l.value.username,"onUpdate:modelValue":f[0]||(f[0]=m=>l.value.username=m),disabled:!o.value,label:"Fill in your username"},null,8,["modelValue","disabled"])]),_:1})]),_:1}),$("div",fre,[h(se,{disabled:!o.value,color:"primary",onClick:f[1]||(f[1]=m=>u())},{default:g(()=>f[10]||(f[10]=[_(" Change username ")])),_:1},8,["disabled"])]),h(dn),f[14]||(f[14]=$("br",null,null,-1)),h(Be,null,{default:g(()=>[h(dt,null,{default:g(()=>f[11]||(f[11]=[_(" Old Password ")])),_:1}),h(v,null,{default:g(()=>[h(ut,{modelValue:l.value.oldPassword,"onUpdate:modelValue":f[2]||(f[2]=m=>l.value.oldPassword=m),disabled:!o.value,placeholder:"Old password",type:"password"},null,8,["modelValue","disabled"])]),_:1})]),_:1}),h(Be,null,{default:g(()=>[h(dt,null,{default:g(()=>f[12]||(f[12]=[_(" New Password ")])),_:1}),h(v,null,{default:g(()=>[h(ut,{modelValue:l.value.newPassword,"onUpdate:modelValue":f[3]||(f[3]=m=>l.value.newPassword=m),disabled:!o.value,placeholder:"New password",type:"password"},null,8,["modelValue","disabled"])]),_:1})]),_:1}),h(Be,null,{default:g(()=>[h(dt,null,{default:g(()=>f[13]||(f[13]=[_(" Repeat New Password ")])),_:1}),h(v,null,{default:g(()=>[h(ut,{modelValue:l.value.repeatPassword,"onUpdate:modelValue":f[4]||(f[4]=m=>l.value.repeatPassword=m),disabled:!o.value,placeholder:"Repeat new password",type:"password"},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),$("div",hre,[h(se,{disabled:!o.value,color:"primary",onClick:f[5]||(f[5]=m=>c())},{default:g(()=>f[15]||(f[15]=[_(" Change password ")])),_:1},8,["disabled"])]),h(dn)]),_:1})}}}),mre=$e({__name:"GridSettings",setup(e){return(t,n)=>(D(),te(rt,null,{default:g(()=>[h(Ue,{cols:"12"},{default:g(()=>[h(gt,null,{default:g(()=>[h(AM,{icon:"grid_on",title:"Grid"}),h(uO)]),_:1})]),_:1})]),_:1}))}}),gre=$e({__name:"ServerProtectionSettings",setup(e){const t=Jo(),n=Dt(),r=us(),s=V(""),i=V(!1),o=V(!1),a=V(3200),l=V(!1),u=V(-1),c=V(14);async function d(){var x;const b=await Rn.getSettings();i.value=b.server.loginRequired,o.value=b.server.registration,s.value=((x=b.connection)==null?void 0:x.clientIp)??"127.0.0.1";const w=await Rn.getSettingsSensitive();a.value=w.credentials.jwtExpiresIn/60,l.value=w.credentials.refreshTokenAttempts!==-1,u.value=w.credentials.refreshTokenAttempts,c.value=w.credentials.refreshTokenExpiry/24/3600}wt(async()=>{await d()});function f(){l.value||(u.value=-1)}async function p(){const b=i.value;!b&&!confirm("Disabling login will expose your server. Continue?")||(await Rn.updateLoginRequiredSettings(b),await r.logout(!0),await r.checkAuthenticationRequirements(),b?await t.push({name:qt.Login}):await t.push({name:qt.Home}),n.info("Login Required settings updated"))}async function v(){await Rn.updateRegistrationEnabledSettings(o.value),await r.checkAuthenticationRequirements(),n.info("Registration settings updated")}async function m(){a.value=120,l.value=!1,u.value=-1,c.value=14,await y(),n.info("Login expiry settings reset to default")}async function y(b=!0){if(a.value<2||a.value>120)throw new Error("JWT Expiry must be between 2 and 120 minutes");if(l.value&&(u.value<50||u.value>1e3))throw new Error("Refresh Token Attempts must be between 50 and 1000");if(c.value<1||c.value>30)throw new Error("Refresh Token Expiry must be between 1 and 30 days");await Rn.updateCredentialSettings(a.value*60,u.value,c.value*24*3600),n.info("Login expiry settings updated")}return(b,w)=>(D(),te(gt,null,{default:g(()=>[h(mr,{color:"primary"},{default:g(()=>[h(lt,null,{default:g(()=>[h(Q,null,{default:g(()=>w[11]||(w[11]=[_("settings")])),_:1})]),_:1}),h(En,null,{default:g(()=>w[12]||(w[12]=[_(" Server Protection Settings ")])),_:1})]),_:1}),h(Vt,{lines:"three"},{default:g(()=>[h(Be,null,{default:g(()=>[h(dt,null,{default:g(()=>w[13]||(w[13]=[_(" Login Required ")])),_:1}),h(yt,null,{default:g(()=>[h(rt,null,{default:g(()=>[h(Ue,{cols:"12",md:"2"},{default:g(()=>[h(yn,{modelValue:i.value,"onUpdate:modelValue":w[0]||(w[0]=x=>i.value=x),label:"Require Login"},null,8,["modelValue"])]),_:1})]),_:1}),h(rt,null,{default:g(()=>[h(Ue,null,{default:g(()=>[h(se,{color:"primary",onClick:w[1]||(w[1]=x=>p())},{default:g(()=>w[14]||(w[14]=[_(" save login required setting ")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),h(Be,null,{default:g(()=>[h(dt,null,{default:g(()=>w[15]||(w[15]=[_(" Registration Enabled ")])),_:1}),h(yt,null,{default:g(()=>[h(rt,null,{default:g(()=>[h(Ue,{cols:"12",md:"2"},{default:g(()=>[h(yn,{modelValue:o.value,"onUpdate:modelValue":w[2]||(w[2]=x=>o.value=x),label:"Enable Registration"},null,8,["modelValue"])]),_:1})]),_:1}),h(rt,null,{default:g(()=>[h(Ue,null,{default:g(()=>[h(se,{color:"primary",onClick:w[3]||(w[3]=x=>v())},{default:g(()=>w[16]||(w[16]=[_(" save registration enabled setting ")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),h(Be,null,{default:g(()=>[h(dt,null,{default:g(()=>w[17]||(w[17]=[_(" Login Expiry Settings (advanced) ")])),_:1}),h(yt,null,{default:g(()=>[h(rt,null,{default:g(()=>[h(Ue,{cols:"12",md:"2"},{default:g(()=>[h(ut,{modelValue:a.value,"onUpdate:modelValue":w[4]||(w[4]=x=>a.value=x),rules:[x=>!!x&&x>=2&&x<=120],label:"JWT Expiry (minutes)"},null,8,["modelValue","rules"])]),_:1})]),_:1}),h(rt,null,{default:g(()=>[h(Ue,{cols:"12",md:"2"},{default:g(()=>[h(yn,{modelValue:l.value,"onUpdate:modelValue":[w[5]||(w[5]=x=>l.value=x),w[6]||(w[6]=x=>f())],label:"Enable Refresh Token Attempts"},null,8,["modelValue"])]),_:1})]),_:1}),h(rt,null,{default:g(()=>[h(Ue,{cols:"12",md:"2"},{default:g(()=>[h(ut,{modelValue:u.value,"onUpdate:modelValue":w[7]||(w[7]=x=>u.value=x),disabled:!l.value,rules:[x=>!!x&&x>=50],label:"Refresh Token Attempts (disabled: -1)",type:"number"},null,8,["modelValue","disabled","rules"])]),_:1})]),_:1}),h(rt,null,{default:g(()=>[h(Ue,{cols:"12",md:"2"},{default:g(()=>[h(ut,{modelValue:c.value,"onUpdate:modelValue":w[8]||(w[8]=x=>c.value=x),rules:[x=>!!x&&x>=1&&x<=30],label:"Refresh Token Expiry (days)"},null,8,["modelValue","rules"])]),_:1})]),_:1}),h(rn,{color:"secondary"},{default:g(()=>[h(Q,null,{default:g(()=>w[18]||(w[18]=[_("info")])),_:1}),w[19]||(w[19]=_(" Be cautious, setting the wrong expiry could make you lose access to the server or make your user experience highly degraded! "))]),_:1}),h(rt,null,{default:g(()=>[h(Ue,null,{default:g(()=>[h(se,{color:"primary",onClick:w[9]||(w[9]=x=>y())},{default:g(()=>w[20]||(w[20]=[_(" save login expiry settings ")])),_:1}),h(se,{color:"default",onClick:w[10]||(w[10]=x=>m())},{default:g(()=>w[21]||(w[21]=[_(" reset to default ")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}});var lb={exports:{}};const vre="2.0.0",wD=256,yre=Number.MAX_SAFE_INTEGER||9007199254740991,bre=16,wre=wD-6,Sre=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var Mm={MAX_LENGTH:wD,MAX_SAFE_COMPONENT_LENGTH:bre,MAX_SAFE_BUILD_LENGTH:wre,MAX_SAFE_INTEGER:yre,RELEASE_TYPES:Sre,SEMVER_SPEC_VERSION:vre,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Qg={};const _re=typeof process=="object"&&Qg&&Qg.NODE_DEBUG&&/\bsemver\b/i.test(Qg.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Dm=_re;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:s}=Mm,i=Dm;t=e.exports={};const o=t.re=[],a=t.safeRe=[],l=t.src=[],u=t.safeSrc=[],c=t.t={};let d=0;const f="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",s],[f,r]],v=y=>{for(const[b,w]of p)y=y.split(`${b}*`).join(`${b}{0,${w}}`).split(`${b}+`).join(`${b}{1,${w}}`);return y},m=(y,b,w)=>{const x=v(b),P=d++;i(y,P,b),c[y]=P,l[P]=b,u[P]=x,o[P]=new RegExp(b,w?"g":void 0),a[P]=new RegExp(x,w?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),m("MAINVERSION",`(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${l[c.NUMERICIDENTIFIER]}|${l[c.NONNUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NUMERICIDENTIFIERLOOSE]}|${l[c.NONNUMERICIDENTIFIER]})`),m("PRERELEASE",`(?:-(${l[c.PRERELEASEIDENTIFIER]}(?:\\.${l[c.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${l[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[c.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${f}+`),m("BUILD",`(?:\\+(${l[c.BUILDIDENTIFIER]}(?:\\.${l[c.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${l[c.MAINVERSION]}${l[c.PRERELEASE]}?${l[c.BUILD]}?`),m("FULL",`^${l[c.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${l[c.MAINVERSIONLOOSE]}${l[c.PRERELEASELOOSE]}?${l[c.BUILD]}?`),m("LOOSE",`^${l[c.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${l[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${l[c.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:${l[c.PRERELEASE]})?${l[c.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:${l[c.PRERELEASELOOSE]})?${l[c.BUILD]}?)?)?`),m("XRANGE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),m("COERCE",`${l[c.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",l[c.COERCEPLAIN]+`(?:${l[c.PRERELEASE]})?(?:${l[c.BUILD]})?(?:$|[^\\d])`),m("COERCERTL",l[c.COERCE],!0),m("COERCERTLFULL",l[c.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${l[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${l[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${l[c.LONECARET]}${l[c.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${l[c.LONECARET]}${l[c.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${l[c.GTLT]}\\s*(${l[c.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]}|${l[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${l[c.XRANGEPLAIN]})\\s+-\\s+(${l[c.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${l[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[c.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(lb,lb.exports);var Gd=lb.exports;const kre=Object.freeze({loose:!0}),xre=Object.freeze({}),Ere=e=>e?typeof e!="object"?kre:e:xre;var wS=Ere;const nE=/^[0-9]+$/,SD=(e,t)=>{const n=nE.test(e),r=nE.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1},Cre=(e,t)=>SD(t,e);var _D={compareIdentifiers:SD,rcompareIdentifiers:Cre};const Lf=Dm,{MAX_LENGTH:rE,MAX_SAFE_INTEGER:Nf}=Mm,{safeRe:sE,safeSrc:iE,t:Bf}=Gd,Pre=wS,{compareIdentifiers:yl}=_D;let Tre=class Ys{constructor(t,n){if(n=Pre(n),t instanceof Ys){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>rE)throw new TypeError(`version is longer than ${rE} characters`);Lf("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const r=t.trim().match(n.loose?sE[Bf.LOOSE]:sE[Bf.FULL]);if(!r)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Nf||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Nf||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Nf||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){const i=+s;if(i>=0&&i<Nf)return i}return s}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Lf("SemVer.compare",this.version,this.options,t),!(t instanceof Ys)){if(typeof t=="string"&&t===this.version)return 0;t=new Ys(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof Ys||(t=new Ys(t,this.options)),yl(this.major,t.major)||yl(this.minor,t.minor)||yl(this.patch,t.patch)}comparePre(t){if(t instanceof Ys||(t=new Ys(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const r=this.prerelease[n],s=t.prerelease[n];if(Lf("prerelease compare",n,r,s),r===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(r===void 0)return-1;if(r===s)continue;return yl(r,s)}while(++n)}compareBuild(t){t instanceof Ys||(t=new Ys(t,this.options));let n=0;do{const r=this.build[n],s=t.build[n];if(Lf("build compare",n,r,s),r===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(r===void 0)return-1;if(r===s)continue;return yl(r,s)}while(++n)}inc(t,n,r){if(t.startsWith("pre")){if(!n&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(n){const s=new RegExp(`^${this.options.loose?iE[Bf.PRERELEASELOOSE]:iE[Bf.PRERELEASE]}$`),i=`-${n}`.match(s);if(!i||i[1]!==n)throw new Error(`invalid identifier: ${n}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,r),this.inc("pre",n,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,r),this.inc("pre",n,r);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const s=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[s];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(n===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(n){let i=[n,s];r===!1&&(i=[n]),yl(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var yr=Tre;const oE=yr,Rre=(e,t,n=!1)=>{if(e instanceof oE)return e;try{return new oE(e,t)}catch(r){if(!n)return null;throw r}};var Xu=Rre;const Ire=Xu,Are=(e,t)=>{const n=Ire(e,t);return n?n.version:null};var Ore=Are;const Mre=Xu,Dre=(e,t)=>{const n=Mre(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};var $re=Dre;const aE=yr,Fre=(e,t,n,r,s)=>{typeof n=="string"&&(s=r,r=n,n=void 0);try{return new aE(e instanceof aE?e.version:e,n).inc(t,r,s).version}catch{return null}};var Lre=Fre;const lE=Xu,Nre=(e,t)=>{const n=lE(e,null,!0),r=lE(t,null,!0),s=n.compare(r);if(s===0)return null;const i=s>0,o=i?n:r,a=i?r:n,l=!!o.prerelease.length;if(!!a.prerelease.length&&!l){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}const c=l?"pre":"";return n.major!==r.major?c+"major":n.minor!==r.minor?c+"minor":n.patch!==r.patch?c+"patch":"prerelease"};var Bre=Nre;const Vre=yr,Ure=(e,t)=>new Vre(e,t).major;var zre=Ure;const Hre=yr,jre=(e,t)=>new Hre(e,t).minor;var qre=jre;const Wre=yr,Gre=(e,t)=>new Wre(e,t).patch;var Kre=Gre;const Yre=Xu,Xre=(e,t)=>{const n=Yre(e,t);return n&&n.prerelease.length?n.prerelease:null};var Qre=Xre;const uE=yr,Jre=(e,t,n)=>new uE(e,n).compare(new uE(t,n));var Bs=Jre;const Zre=Bs,ese=(e,t,n)=>Zre(t,e,n);var tse=ese;const nse=Bs,rse=(e,t)=>nse(e,t,!0);var sse=rse;const cE=yr,ise=(e,t,n)=>{const r=new cE(e,n),s=new cE(t,n);return r.compare(s)||r.compareBuild(s)};var SS=ise;const ose=SS,ase=(e,t)=>e.sort((n,r)=>ose(n,r,t));var lse=ase;const use=SS,cse=(e,t)=>e.sort((n,r)=>use(r,n,t));var dse=cse;const fse=Bs,hse=(e,t,n)=>fse(e,t,n)>0;var $m=hse;const pse=Bs,mse=(e,t,n)=>pse(e,t,n)<0;var _S=mse;const gse=Bs,vse=(e,t,n)=>gse(e,t,n)===0;var kD=vse;const yse=Bs,bse=(e,t,n)=>yse(e,t,n)!==0;var xD=bse;const wse=Bs,Sse=(e,t,n)=>wse(e,t,n)>=0;var kS=Sse;const _se=Bs,kse=(e,t,n)=>_se(e,t,n)<=0;var xS=kse;const xse=kD,Ese=xD,Cse=$m,Pse=kS,Tse=_S,Rse=xS,Ise=(e,t,n,r)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e===n;case"!==":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e!==n;case"":case"=":case"==":return xse(e,n,r);case"!=":return Ese(e,n,r);case">":return Cse(e,n,r);case">=":return Pse(e,n,r);case"<":return Tse(e,n,r);case"<=":return Rse(e,n,r);default:throw new TypeError(`Invalid operator: ${t}`)}};var ED=Ise;const Ase=yr,Ose=Xu,{safeRe:Vf,t:Uf}=Gd,Mse=(e,t)=>{if(e instanceof Ase)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let n=null;if(!t.rtl)n=e.match(t.includePrerelease?Vf[Uf.COERCEFULL]:Vf[Uf.COERCE]);else{const l=t.includePrerelease?Vf[Uf.COERCERTLFULL]:Vf[Uf.COERCERTL];let u;for(;(u=l.exec(e))&&(!n||n.index+n[0].length!==e.length);)(!n||u.index+u[0].length!==n.index+n[0].length)&&(n=u),l.lastIndex=u.index+u[1].length+u[2].length;l.lastIndex=-1}if(n===null)return null;const r=n[2],s=n[3]||"0",i=n[4]||"0",o=t.includePrerelease&&n[5]?`-${n[5]}`:"",a=t.includePrerelease&&n[6]?`+${n[6]}`:"";return Ose(`${r}.${s}.${i}${o}${a}`,t)};var Dse=Mse;class $se{constructor(){this.max=1e3,this.map=new Map}get(t){const n=this.map.get(t);if(n!==void 0)return this.map.delete(t),this.map.set(t,n),n}delete(t){return this.map.delete(t)}set(t,n){if(!this.delete(t)&&n!==void 0){if(this.map.size>=this.max){const s=this.map.keys().next().value;this.delete(s)}this.map.set(t,n)}return this}}var Fse=$se,Jg,dE;function Vs(){if(dE)return Jg;dE=1;const e=/\s+/g;class t{constructor(z,H){if(H=s(H),z instanceof t)return z.loose===!!H.loose&&z.includePrerelease===!!H.includePrerelease?z:new t(z.raw,H);if(z instanceof i)return this.raw=z.value,this.set=[[z]],this.formatted=void 0,this;if(this.options=H,this.loose=!!H.loose,this.includePrerelease=!!H.includePrerelease,this.raw=z.trim().replace(e," "),this.set=this.raw.split("||").map(G=>this.parseRange(G.trim())).filter(G=>G.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const G=this.set[0];if(this.set=this.set.filter(W=>!m(W[0])),this.set.length===0)this.set=[G];else if(this.set.length>1){for(const W of this.set)if(W.length===1&&y(W[0])){this.set=[W];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let z=0;z<this.set.length;z++){z>0&&(this.formatted+="||");const H=this.set[z];for(let G=0;G<H.length;G++)G>0&&(this.formatted+=" "),this.formatted+=H[G].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(z){const G=((this.options.includePrerelease&&p)|(this.options.loose&&v))+":"+z,W=r.get(G);if(W)return W;const Y=this.options.loose,X=Y?l[u.HYPHENRANGELOOSE]:l[u.HYPHENRANGE];z=z.replace(X,O(this.options.includePrerelease)),o("hyphen replace",z),z=z.replace(l[u.COMPARATORTRIM],c),o("comparator trim",z),z=z.replace(l[u.TILDETRIM],d),o("tilde trim",z),z=z.replace(l[u.CARETTRIM],f),o("caret trim",z);let J=z.split(" ").map(oe=>w(oe,this.options)).join(" ").split(/\s+/).map(oe=>A(oe,this.options));Y&&(J=J.filter(oe=>(o("loose invalid filter",oe,this.options),!!oe.match(l[u.COMPARATORLOOSE])))),o("range list",J);const N=new Map,K=J.map(oe=>new i(oe,this.options));for(const oe of K){if(m(oe))return[oe];N.set(oe.value,oe)}N.size>1&&N.has("")&&N.delete("");const he=[...N.values()];return r.set(G,he),he}intersects(z,H){if(!(z instanceof t))throw new TypeError("a Range is required");return this.set.some(G=>b(G,H)&&z.set.some(W=>b(W,H)&&G.every(Y=>W.every(X=>Y.intersects(X,H)))))}test(z){if(!z)return!1;if(typeof z=="string")try{z=new a(z,this.options)}catch{return!1}for(let H=0;H<this.set.length;H++)if(L(this.set[H],z,this.options))return!0;return!1}}Jg=t;const n=Fse,r=new n,s=wS,i=Fm(),o=Dm,a=yr,{safeRe:l,t:u,comparatorTrimReplace:c,tildeTrimReplace:d,caretTrimReplace:f}=Gd,{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:v}=Mm,m=M=>M.value==="<0.0.0-0",y=M=>M.value==="",b=(M,z)=>{let H=!0;const G=M.slice();let W=G.pop();for(;H&&G.length;)H=G.every(Y=>W.intersects(Y,z)),W=G.pop();return H},w=(M,z)=>(o("comp",M,z),M=C(M,z),o("caret",M),M=P(M,z),o("tildes",M),M=k(M,z),o("xrange",M),M=I(M,z),o("stars",M),M),x=M=>!M||M.toLowerCase()==="x"||M==="*",P=(M,z)=>M.trim().split(/\s+/).map(H=>S(H,z)).join(" "),S=(M,z)=>{const H=z.loose?l[u.TILDELOOSE]:l[u.TILDE];return M.replace(H,(G,W,Y,X,J)=>{o("tilde",M,G,W,Y,X,J);let N;return x(W)?N="":x(Y)?N=`>=${W}.0.0 <${+W+1}.0.0-0`:x(X)?N=`>=${W}.${Y}.0 <${W}.${+Y+1}.0-0`:J?(o("replaceTilde pr",J),N=`>=${W}.${Y}.${X}-${J} <${W}.${+Y+1}.0-0`):N=`>=${W}.${Y}.${X} <${W}.${+Y+1}.0-0`,o("tilde return",N),N})},C=(M,z)=>M.trim().split(/\s+/).map(H=>R(H,z)).join(" "),R=(M,z)=>{o("caret",M,z);const H=z.loose?l[u.CARETLOOSE]:l[u.CARET],G=z.includePrerelease?"-0":"";return M.replace(H,(W,Y,X,J,N)=>{o("caret",M,W,Y,X,J,N);let K;return x(Y)?K="":x(X)?K=`>=${Y}.0.0${G} <${+Y+1}.0.0-0`:x(J)?Y==="0"?K=`>=${Y}.${X}.0${G} <${Y}.${+X+1}.0-0`:K=`>=${Y}.${X}.0${G} <${+Y+1}.0.0-0`:N?(o("replaceCaret pr",N),Y==="0"?X==="0"?K=`>=${Y}.${X}.${J}-${N} <${Y}.${X}.${+J+1}-0`:K=`>=${Y}.${X}.${J}-${N} <${Y}.${+X+1}.0-0`:K=`>=${Y}.${X}.${J}-${N} <${+Y+1}.0.0-0`):(o("no pr"),Y==="0"?X==="0"?K=`>=${Y}.${X}.${J}${G} <${Y}.${X}.${+J+1}-0`:K=`>=${Y}.${X}.${J}${G} <${Y}.${+X+1}.0-0`:K=`>=${Y}.${X}.${J} <${+Y+1}.0.0-0`),o("caret return",K),K})},k=(M,z)=>(o("replaceXRanges",M,z),M.split(/\s+/).map(H=>E(H,z)).join(" ")),E=(M,z)=>{M=M.trim();const H=z.loose?l[u.XRANGELOOSE]:l[u.XRANGE];return M.replace(H,(G,W,Y,X,J,N)=>{o("xRange",M,G,W,Y,X,J,N);const K=x(Y),he=K||x(X),oe=he||x(J),we=oe;return W==="="&&we&&(W=""),N=z.includePrerelease?"-0":"",K?W===">"||W==="<"?G="<0.0.0-0":G="*":W&&we?(he&&(X=0),J=0,W===">"?(W=">=",he?(Y=+Y+1,X=0,J=0):(X=+X+1,J=0)):W==="<="&&(W="<",he?Y=+Y+1:X=+X+1),W==="<"&&(N="-0"),G=`${W+Y}.${X}.${J}${N}`):he?G=`>=${Y}.0.0${N} <${+Y+1}.0.0-0`:oe&&(G=`>=${Y}.${X}.0${N} <${Y}.${+X+1}.0-0`),o("xRange return",G),G})},I=(M,z)=>(o("replaceStars",M,z),M.trim().replace(l[u.STAR],"")),A=(M,z)=>(o("replaceGTE0",M,z),M.trim().replace(l[z.includePrerelease?u.GTE0PRE:u.GTE0],"")),O=M=>(z,H,G,W,Y,X,J,N,K,he,oe,we)=>(x(G)?H="":x(W)?H=`>=${G}.0.0${M?"-0":""}`:x(Y)?H=`>=${G}.${W}.0${M?"-0":""}`:X?H=`>=${H}`:H=`>=${H}${M?"-0":""}`,x(K)?N="":x(he)?N=`<${+K+1}.0.0-0`:x(oe)?N=`<${K}.${+he+1}.0-0`:we?N=`<=${K}.${he}.${oe}-${we}`:M?N=`<${K}.${he}.${+oe+1}-0`:N=`<=${N}`,`${H} ${N}`.trim()),L=(M,z,H)=>{for(let G=0;G<M.length;G++)if(!M[G].test(z))return!1;if(z.prerelease.length&&!H.includePrerelease){for(let G=0;G<M.length;G++)if(o(M[G].semver),M[G].semver!==i.ANY&&M[G].semver.prerelease.length>0){const W=M[G].semver;if(W.major===z.major&&W.minor===z.minor&&W.patch===z.patch)return!0}return!1}return!0};return Jg}var Zg,fE;function Fm(){if(fE)return Zg;fE=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(c,d){if(d=n(d),c instanceof t){if(c.loose===!!d.loose)return c;c=c.value}c=c.trim().split(/\s+/).join(" "),o("comparator",c,d),this.options=d,this.loose=!!d.loose,this.parse(c),this.semver===e?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(c){const d=this.options.loose?r[s.COMPARATORLOOSE]:r[s.COMPARATOR],f=c.match(d);if(!f)throw new TypeError(`Invalid comparator: ${c}`);this.operator=f[1]!==void 0?f[1]:"",this.operator==="="&&(this.operator=""),f[2]?this.semver=new a(f[2],this.options.loose):this.semver=e}toString(){return this.value}test(c){if(o("Comparator.test",c,this.options.loose),this.semver===e||c===e)return!0;if(typeof c=="string")try{c=new a(c,this.options)}catch{return!1}return i(c,this.operator,this.semver,this.options)}intersects(c,d){if(!(c instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(c.value,d).test(this.value):c.operator===""?c.value===""?!0:new l(this.value,d).test(c.semver):(d=n(d),d.includePrerelease&&(this.value==="<0.0.0-0"||c.value==="<0.0.0-0")||!d.includePrerelease&&(this.value.startsWith("<0.0.0")||c.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&c.operator.startsWith(">")||this.operator.startsWith("<")&&c.operator.startsWith("<")||this.semver.version===c.semver.version&&this.operator.includes("=")&&c.operator.includes("=")||i(this.semver,"<",c.semver,d)&&this.operator.startsWith(">")&&c.operator.startsWith("<")||i(this.semver,">",c.semver,d)&&this.operator.startsWith("<")&&c.operator.startsWith(">")))}}Zg=t;const n=wS,{safeRe:r,t:s}=Gd,i=ED,o=Dm,a=yr,l=Vs();return Zg}const Lse=Vs(),Nse=(e,t,n)=>{try{t=new Lse(t,n)}catch{return!1}return t.test(e)};var Lm=Nse;const Bse=Vs(),Vse=(e,t)=>new Bse(e,t).set.map(n=>n.map(r=>r.value).join(" ").trim().split(" "));var Use=Vse;const zse=yr,Hse=Vs(),jse=(e,t,n)=>{let r=null,s=null,i=null;try{i=new Hse(t,n)}catch{return null}return e.forEach(o=>{i.test(o)&&(!r||s.compare(o)===-1)&&(r=o,s=new zse(r,n))}),r};var qse=jse;const Wse=yr,Gse=Vs(),Kse=(e,t,n)=>{let r=null,s=null,i=null;try{i=new Gse(t,n)}catch{return null}return e.forEach(o=>{i.test(o)&&(!r||s.compare(o)===1)&&(r=o,s=new Wse(r,n))}),r};var Yse=Kse;const ev=yr,Xse=Vs(),hE=$m,Qse=(e,t)=>{e=new Xse(e,t);let n=new ev("0.0.0");if(e.test(n)||(n=new ev("0.0.0-0"),e.test(n)))return n;n=null;for(let r=0;r<e.set.length;++r){const s=e.set[r];let i=null;s.forEach(o=>{const a=new ev(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!i||hE(a,i))&&(i=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!n||hE(n,i))&&(n=i)}return n&&e.test(n)?n:null};var Jse=Qse;const Zse=Vs(),eie=(e,t)=>{try{return new Zse(e,t).range||"*"}catch{return null}};var tie=eie;const nie=yr,CD=Fm(),{ANY:rie}=CD,sie=Vs(),iie=Lm,pE=$m,mE=_S,oie=xS,aie=kS,lie=(e,t,n,r)=>{e=new nie(e,r),t=new sie(t,r);let s,i,o,a,l;switch(n){case">":s=pE,i=oie,o=mE,a=">",l=">=";break;case"<":s=mE,i=aie,o=pE,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(iie(e,t,r))return!1;for(let u=0;u<t.set.length;++u){const c=t.set[u];let d=null,f=null;if(c.forEach(p=>{p.semver===rie&&(p=new CD(">=0.0.0")),d=d||p,f=f||p,s(p.semver,d.semver,r)?d=p:o(p.semver,f.semver,r)&&(f=p)}),d.operator===a||d.operator===l||(!f.operator||f.operator===a)&&i(e,f.semver))return!1;if(f.operator===l&&o(e,f.semver))return!1}return!0};var ES=lie;const uie=ES,cie=(e,t,n)=>uie(e,t,">",n);var die=cie;const fie=ES,hie=(e,t,n)=>fie(e,t,"<",n);var pie=hie;const gE=Vs(),mie=(e,t,n)=>(e=new gE(e,n),t=new gE(t,n),e.intersects(t,n));var gie=mie;const vie=Lm,yie=Bs;var bie=(e,t,n)=>{const r=[];let s=null,i=null;const o=e.sort((c,d)=>yie(c,d,n));for(const c of o)vie(c,t,n)?(i=c,s||(s=c)):(i&&r.push([s,i]),i=null,s=null);s&&r.push([s,null]);const a=[];for(const[c,d]of r)c===d?a.push(c):!d&&c===o[0]?a.push("*"):d?c===o[0]?a.push(`<=${d}`):a.push(`${c} - ${d}`):a.push(`>=${c}`);const l=a.join(" || "),u=typeof t.raw=="string"?t.raw:String(t);return l.length<u.length?l:t};const vE=Vs(),CS=Fm(),{ANY:tv}=CS,fc=Lm,PS=Bs,wie=(e,t,n={})=>{if(e===t)return!0;e=new vE(e,n),t=new vE(t,n);let r=!1;e:for(const s of e.set){for(const i of t.set){const o=_ie(s,i,n);if(r=r||o!==null,o)continue e}if(r)return!1}return!0},Sie=[new CS(">=0.0.0-0")],yE=[new CS(">=0.0.0")],_ie=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===tv){if(t.length===1&&t[0].semver===tv)return!0;n.includePrerelease?e=Sie:e=yE}if(t.length===1&&t[0].semver===tv){if(n.includePrerelease)return!0;t=yE}const r=new Set;let s,i;for(const p of e)p.operator===">"||p.operator===">="?s=bE(s,p,n):p.operator==="<"||p.operator==="<="?i=wE(i,p,n):r.add(p.semver);if(r.size>1)return null;let o;if(s&&i){if(o=PS(s.semver,i.semver,n),o>0)return null;if(o===0&&(s.operator!==">="||i.operator!=="<="))return null}for(const p of r){if(s&&!fc(p,String(s),n)||i&&!fc(p,String(i),n))return null;for(const v of t)if(!fc(p,String(v),n))return!1;return!0}let a,l,u,c,d=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:!1,f=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;d&&d.prerelease.length===1&&i.operator==="<"&&d.prerelease[0]===0&&(d=!1);for(const p of t){if(c=c||p.operator===">"||p.operator===">=",u=u||p.operator==="<"||p.operator==="<=",s){if(f&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===f.major&&p.semver.minor===f.minor&&p.semver.patch===f.patch&&(f=!1),p.operator===">"||p.operator===">="){if(a=bE(s,p,n),a===p&&a!==s)return!1}else if(s.operator===">="&&!fc(s.semver,String(p),n))return!1}if(i){if(d&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===d.major&&p.semver.minor===d.minor&&p.semver.patch===d.patch&&(d=!1),p.operator==="<"||p.operator==="<="){if(l=wE(i,p,n),l===p&&l!==i)return!1}else if(i.operator==="<="&&!fc(i.semver,String(p),n))return!1}if(!p.operator&&(i||s)&&o!==0)return!1}return!(s&&u&&!i&&o!==0||i&&c&&!s&&o!==0||f||d)},bE=(e,t,n)=>{if(!e)return t;const r=PS(e.semver,t.semver,n);return r>0?e:r<0||t.operator===">"&&e.operator===">="?t:e},wE=(e,t,n)=>{if(!e)return t;const r=PS(e.semver,t.semver,n);return r<0?e:r>0||t.operator==="<"&&e.operator==="<="?t:e};var kie=wie;const nv=Gd,SE=Mm,xie=yr,_E=_D,Eie=Xu,Cie=Ore,Pie=$re,Tie=Lre,Rie=Bre,Iie=zre,Aie=qre,Oie=Kre,Mie=Qre,Die=Bs,$ie=tse,Fie=sse,Lie=SS,Nie=lse,Bie=dse,Vie=$m,Uie=_S,zie=kD,Hie=xD,jie=kS,qie=xS,Wie=ED,Gie=Dse,Kie=Fm(),Yie=Vs(),Xie=Lm,Qie=Use,Jie=qse,Zie=Yse,eoe=Jse,toe=tie,noe=ES,roe=die,soe=pie,ioe=gie,ooe=bie,aoe=kie;var hc={parse:Eie,valid:Cie,clean:Pie,inc:Tie,diff:Rie,major:Iie,minor:Aie,patch:Oie,prerelease:Mie,compare:Die,rcompare:$ie,compareLoose:Fie,compareBuild:Lie,sort:Nie,rsort:Bie,gt:Vie,lt:Uie,eq:zie,neq:Hie,gte:jie,lte:qie,cmp:Wie,coerce:Gie,Comparator:Kie,Range:Yie,satisfies:Xie,toComparators:Qie,maxSatisfying:Jie,minSatisfying:Zie,minVersion:eoe,validRange:toe,outside:noe,gtr:roe,ltr:soe,intersects:ioe,simplifyRange:ooe,subset:aoe,SemVer:xie,re:nv.re,src:nv.src,tokens:nv.t,SEMVER_SPEC_VERSION:SE.SEMVER_SPEC_VERSION,RELEASE_TYPES:SE.RELEASE_TYPES,compareIdentifiers:_E.compareIdentifiers,rcompareIdentifiers:_E.rcompareIdentifiers};const loe={key:0},uoe={key:1},coe={key:0},doe=$e({__name:"SoftwareUpgradeSettings",setup(e){const t=V(""),n=V(!0),r=V(!1),s=V(!1),i=V(""),o=V(""),a=V(OM),l=V(),u=V(),c=V(),d=V(!1),f=V([]),p=Zi();wt(async()=>{var I;await v();const E=await xo.getVersion();i.value=E.version,o.value=((I=E.monsterPi)==null?void 0:I.trim())||""});async function v(){if(n.value=!0,t.value="",r.value=!1,p.hasFeature("githubRateLimitApi"))try{const E=await xo.getGithubRateLimit();if(E.rate.remaining===0){const A=new Date(E.rate.reset).toLocaleTimeString(),O=E.rate.reset*1e3-Date.now(),L=Math.ceil(O/6e4);t.value=`Server has reached a rate limit of the Github API. This limit will be reset at ${A} (in ${L} minutes)`,n.value=!1,r.value=!0;return}}catch{n.value=!1;return}try{const E=await xo.getClientReleases();l.value=E.current,u.value=E.minimum,f.value=E.releases}catch(E){t.value="An error occurred loading the releases: "+E.message}finally{n.value=!1}}const m=T(()=>f.value.filter(E=>{const I=hc.minor(E.tag_name)===hc.minor(u.value.tag_name),A=P(E),O=E.draft;return I&&(b()||d.value||!A)&&!O})),y=T(()=>b());function b(){const E=l.value;return P(E)}function w(E){return R(E)||!C(E,l.value)||S(E)}function x(E){const I=P(E)?`${E.tag_name}, unstable`:E.tag_name;return R(E)?`${I}, currently installed`:S(E)?`${I}, below minimum`:C(E,l.value)?I:`${I}, downgrade not allowed`}function P(E){var I;return(I=E==null?void 0:E.tag_name)!=null&&I.length?E.prerelease||E.tag_name.includes("rc")||E.tag_name.includes("unstable"):!1}function S(E){return hc.compare(E.tag_name,u.value.tag_name)===-1}function C(E,I){if(!I)throw new Error("No current release is known, cannot compare.");return s.value?!0:hc.compare(E.tag_name,I.tag_name)!==-1&&hc.compare(E.tag_name,u.value.tag_name)!==-1}function R(E){var I;return E.tag_name===((I=l.value)==null?void 0:I.tag_name)}async function k(E){confirm("Are you sure? This might cause breaking changes, if the server is outdated")&&(await xo.updateClientDistGithub(E,s.value),location.reload())}return(E,I)=>(D(),te(gt,null,{default:g(()=>[h(mr,{color:"primary"},{default:g(()=>[h(lt,null,{default:g(()=>[h(Q,null,{default:g(()=>I[5]||(I[5]=[_("upgrade")])),_:1})]),_:1}),h(En,null,{default:g(()=>I[6]||(I[6]=[_(" Software Upgrade ")])),_:1})]),_:1}),h(Vt,{lines:"three"},{default:g(()=>[h(Be,null,{default:g(()=>[h(dt,null,{default:g(()=>I[7]||(I[7]=[_(" Current versions in use: ")])),_:1}),h(yt,null,{default:g(()=>[_(" Your server's version is: "+re(i.value),1)]),_:1}),h(yt,null,{default:g(()=>[_(" Your client's version is: "+re(a.value),1)]),_:1}),h(yt,null,{default:g(()=>[o.value?(D(),ge("div",loe,[I[8]||(I[8]=_(" MonsterPi: ")),I[9]||(I[9]=$("div",null,"Your MonsterPi version is:",-1)),_(" "+re(o.value),1)])):(D(),ge("div",uoe,I[10]||(I[10]=[_(" MonsterPi: "),$("div",null,"No MonsterPi distro was detected.",-1)])))]),_:1})]),_:1})]),_:1}),h(dn),h(Vt,{subheader:"",lines:"three"},{default:g(()=>[h(Be,null,{default:g(()=>[h(dt,null,{default:g(()=>I[11]||(I[11]=[_(" Server upgrade ")])),_:1}),h(yt,null,{default:g(()=>I[12]||(I[12]=[_(" Please visit "),$("a",{href:"https://docs.fdm-monster.net/docs/installing/"}," the installation documentation ",-1),_(" for instructions on how to upgrade the server. ")])),_:1})]),_:1})]),_:1}),h(dn),h(Vt,{lines:"three"},{default:g(()=>[h(Be,null,{default:g(()=>[h(dt,null,{default:g(()=>I[13]||(I[13]=[_(" Client upgrade ")])),_:1}),h(yt,null,{default:g(()=>I[14]||(I[14]=[_(" Please visit "),$("a",{href:"https://docs.fdm-monster.net/docs/configuration/updating_client_bundle"}," the installation documentation ",-1),_(" for instructions on how to upgrade the client bundle. ")])),_:1}),h(yt,null,{default:g(()=>I[15]||(I[15]=[_(" Upgrade the client webapp for quickly retrieving small fixes and features ")])),_:1})]),_:1}),h(Be,null,{default:g(()=>{var A,O,L;return[h(dt,null,{default:g(()=>I[16]||(I[16]=[_(" Select a release to upgrade to: ")])),_:1}),h(yt,{class:"mt-2"},{default:g(()=>{var M;return[_(" Minimum required version: "+re((M=u.value)==null?void 0:M.tag_name),1)]}),_:1}),n.value?(D(),ge("span",coe,[h(rn,null,{default:g(()=>I[17]||(I[17]=[_(" Loading releases... ")])),_:1})])):ue("",!0),!n.value&&!((A=m.value)!=null&&A.length)?(D(),te(rn,{key:1},{default:g(()=>I[18]||(I[18]=[_(" No releases to show. ")])),_:1})):ue("",!0),h(JA,{modelValue:c.value,"onUpdate:modelValue":I[0]||(I[0]=M=>c.value=M)},{default:g(()=>[(D(!0),ge(Pe,null,Wt(m.value,M=>(D(),te(Cy,{key:M.tag_name,disabled:w(M),label:x(M),value:M.tag_name},null,8,["disabled","label","value"]))),128))]),_:1},8,["modelValue"]),$("div",null,[d.value?(D(),te(rn,{key:0,color:"primary","max-width":"500px"},{default:g(()=>I[19]||(I[19]=[_(" You are viewing prereleases, please install such versions at your own risk! ")])),_:1})):ue("",!0)]),$("div",null,[h(yn,{modelValue:s.value,"onUpdate:modelValue":I[1]||(I[1]=M=>s.value=M),label:"Allow downgrade"},null,8,["modelValue"]),h(yn,{modelValue:d.value,"onUpdate:modelValue":I[2]||(I[2]=M=>d.value=M),disabled:y.value,label:y.value?"Show prerelease versions (Currently already on prerelease version)":"Show prerelease versions"},null,8,["modelValue","disabled","label"])]),h(se,{class:"mt-2 mr-4",color:"secondary",onClick:I[3]||(I[3]=M=>v())},{default:g(()=>I[20]||(I[20]=[_(" Reload release version list ")])),_:1}),h(se,{disabled:!((O=c.value)!=null&&O.length)||c.value===((L=l.value)==null?void 0:L.tag_name),class:"mt-2",color:"primary",variant:"flat",onClick:I[4]||(I[4]=M=>k(c.value))},{default:g(()=>[h(Q,null,{default:g(()=>I[21]||(I[21]=[_("upgrade")])),_:1}),I[22]||(I[22]=_(" Upgrade/downgrade client "))]),_:1},8,["disabled"])]}),_:1})]),_:1})]),_:1}))}}),foe=$e({__name:"DiagnosticsSettings",setup(e){const t=Dt(),n=Ns(),r=V(!1),s=V(!1),i=V(!1),o=V(!1);wt(async()=>{var f,p,v,m;const d=await xo.getFeatures();r.value=((f=d.anonymousDiagnosticsToggle)==null?void 0:f.available)||!1,s.value=((p=d.logDumpZip)==null?void 0:p.available)||!1,i.value=((v=d.clearLogFiles)==null?void 0:v.available)||!1,await n.loadSettings(),o.value=((m=n.serverSettings)==null?void 0:m.sentryDiagnosticsEnabled)||!1});async function a(){await Rn.setSentryDiagnosticsSettings(o.value),tM(o.value)}async function l(){const d=`Test Error ${Date.now()} Sentry enabled: ${o.value}`;try{throw new Error(d)}catch(f){li(f),t.openInfoMessage({title:"Test report was sent",subtitle:`Content: ${d}`})}}async function u(){await sp.downloadLogDump()}async function c(){await sp.clearLogFilesOlderThanWeek(),t.openInfoMessage({title:"Action success",subtitle:"Log files older than a week have been deleted"})}return(d,f)=>(D(),te(gt,null,{default:g(()=>[h(mr,{color:"primary"},{default:g(()=>[h(lt,null,{default:g(()=>[h(Q,null,{default:g(()=>f[5]||(f[5]=[_("bug_report")])),_:1})]),_:1}),h(En,null,{default:g(()=>f[6]||(f[6]=[_(" Diagnostics ")])),_:1})]),_:1}),h(Vt,{subheader:"",lines:"three"},{default:g(()=>[h(Wr,null,{default:g(()=>f[7]||(f[7]=[_(" Diagnostics to provide bug reports to the developers of this software ")])),_:1}),r.value?(D(),te(Be,{key:0},{default:g(()=>[h(dt,null,{default:g(()=>f[8]||(f[8]=[_(" Remote Sentry diagnostic reports: ")])),_:1}),h(yt,null,{default:g(()=>[h(yn,{modelValue:o.value,"onUpdate:modelValue":f[0]||(f[0]=p=>o.value=p),label:"Enable remote Sentry diagnostic reports"},null,8,["modelValue"])]),_:1}),h(yt,null,{default:g(()=>[h(se,{color:"primary",onClick:f[1]||(f[1]=p=>a())},{default:g(()=>[h(Q,{class:"pr-2"},{default:g(()=>f[9]||(f[9]=[_("save")])),_:1}),f[10]||(f[10]=_(" Save "))]),_:1}),h(se,{color:"secondary",onClick:f[2]||(f[2]=p=>l())},{default:g(()=>[h(Q,{class:"pr-2"},{default:g(()=>f[11]||(f[11]=[_("bug_report")])),_:1}),f[12]||(f[12]=_(" Test Error "))]),_:1})]),_:1})]),_:1})):ue("",!0),h(dn),s.value?(D(),te(Be,{key:1},{default:g(()=>[h(dt,null,{default:g(()=>f[13]||(f[13]=[_(" Logs Dump ")])),_:1}),h(yt,null,{default:g(()=>f[14]||(f[14]=[_(" Download a .zip file containing all logs from the server ")])),_:1}),h(yt,null,{default:g(()=>[f[17]||(f[17]=$("br",null,null,-1)),h(se,{color:"primary",onClick:f[3]||(f[3]=p=>u())},{default:g(()=>[h(Q,null,{default:g(()=>f[15]||(f[15]=[_("download")])),_:1}),f[16]||(f[16]=_(" Download Log Files (.zip) "))]),_:1})]),_:1})]),_:1})):ue("",!0),s.value?(D(),te(Be,{key:2},{default:g(()=>[h(dt,null,{default:g(()=>f[18]||(f[18]=[_(" Clear log files ")])),_:1}),h(yt,null,{default:g(()=>[f[21]||(f[21]=$("br",null,null,-1)),h(se,{color:"default",onClick:f[4]||(f[4]=p=>c())},{default:g(()=>[h(Q,null,{default:g(()=>f[19]||(f[19]=[_("download")])),_:1}),f[20]||(f[20]=_(" Clear log files older than a week "))]),_:1})]),_:1})]),_:1})):ue("",!0)]),_:1})]),_:1}))}});class hoe extends vr{static async getCompletions(){const t=`${Me.printCompletionRoute}`;return await this.get(t)}}const PD=$e({__name:"PrintStatistics",setup(e){const t=V([]),n=V([]),r=V(""),s=Lt(),i=eo();wt(async()=>{await o()}),ke([()=>r.value],()=>{u()});const o=async()=>{t.value=[],n.value=[],t.value=await hoe.getCompletions(),u()},a=c=>s.printer(c),l=c=>i.floorOfPrinter(c),u=()=>{var p;const c=s.printers.map(v=>v.id),d=c.length?t.value.filter(v=>c.includes(v.printerId)):t.value,f=(p=r.value)!=null&&p.length?d.filter(v=>{const m=s.printers.find(y=>y.id===v.printerId);return m?(m.name+m.printerURL).toLowerCase().includes(r.value.toLowerCase()):!1}):d;n.value=f.sort((v,m)=>v.failureCount===m.failureCount?v.printCount>m.printCount?-1:1:v.failureCount>m.failureCount?-1:1)};return(c,d)=>(D(),te(ip,{height:"100%",width:"100%"},{default:g(()=>[h(Bn,null,{default:g(()=>[h(rt,null,{default:g(()=>[h(Ue,null,{default:g(()=>[h(Q,null,{default:g(()=>d[2]||(d[2]=[_("filter_list")])),_:1}),d[3]||(d[3]=_(" Filter by printer name (optional) "))]),_:1}),h(Ue,null,{default:g(()=>[h(ut,{modelValue:r.value,"onUpdate:modelValue":d[0]||(d[0]=f=>r.value=f),class:"p-2",clearable:"",label:"Search","prepend-icon":"search","single-line":""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(rn,null,{default:g(()=>[d[5]||(d[5]=_(" Please reload here if you want updated results: ")),h(se,{color:"primary",size:"x-small",onClick:d[1]||(d[1]=f=>o())},{default:g(()=>d[4]||(d[4]=[_(" Reload ")])),_:1})]),_:1}),h(Zy,{dark:""},{default:g(()=>[d[11]||(d[11]=$("thead",null,[$("tr",null,[$("th",{class:"text-left"},"Printer name"),$("th",{class:"text-left"},"Floor"),$("th",{class:"text-left"},"Fail/ Success/ Total"),$("th",{class:"text-left"},"Last success"),$("th",{class:"text-left"},"Last failure"),$("th",{class:"text-left"},"Successes (week/48H/24H)"),$("th",{class:"text-left"},"Failures (week/48H/24H)")])],-1)),$("tbody",null,[(D(!0),ge(Pe,null,Wt(n.value,f=>{var p,v,m,y;return D(),ge("tr",{key:f.printerId},[$("td",null,re(((p=a(f.printerId))==null?void 0:p.name)??"?"),1),$("td",null,re(((v=l(f.printerId))==null?void 0:v.name)??"?"),1),$("td",null,[_(" × "+re(f.failureCount)+" / 🗸 "+re(f.successCount)+" ",1),$("strong",null," ~"+re(f.printCount),1)]),$("td",null,re(Date.now()-((m=f.lastSuccess)==null?void 0:m.createdAt)||"-"),1),$("td",null,[h(nt,{location:"bottom"},PC({default:g(()=>{var b,w,x,P;return[$("span",null,[_(re(((b=f.lastFailure)==null?void 0:b.status)||"-")+" ",1),d[7]||(d[7]=$("br",null,null,-1)),_(" "+re((w=f.lastFailure)==null?void 0:w.createdAt)+" ",1),d[8]||(d[8]=$("br",null,null,-1)),$("small",null,re((x=f.lastFailure)==null?void 0:x.fileName),1),d[9]||(d[9]=$("br",null,null,-1)),$("strong",null,re((P=f.lastFailure)==null?void 0:P.completionLog),1),d[10]||(d[10]=$("br",null,null,-1))])]}),_:2},[(y=f.lastFailure)!=null&&y.status?{name:"activator",fn:g(({props:b})=>[h(Q,me({ref_for:!0},b),{default:g(()=>d[6]||(d[6]=[_("info")])),_:2},1040)]),key:"0"}:void 0]),1024)]),$("td",null,re(f.successEventsLastWeek)+" "+re(f.successEventsLast48H)+" "+re(f.successEventsLast24H),1),$("td",null,re(f.failureEventsLastWeek)+" "+re(f.failureEventsLast48H)+" "+re(f.failureEventsLast24H),1)])}),128))])]),_:1})]),_:1}))}}),poe=$e({name:"PrintStatisticsView",components:{PrintStatistics:PD}});function moe(e,t,n,r,s,i){const o=PD;return D(),te(Bn,null,{default:g(()=>[h(o)]),_:1})}const goe=Zo(poe,[["render",moe]]),voe=$e({__name:"ExperimentalSettings",setup(e){const t=V(!1),n=V(!1),r=V(!1);async function s(){const l=await Rn.getSettings();t.value=l.server.experimentalMoonrakerSupport,n.value=l.server.experimentalTypeormSupport,r.value=l.server.experimentalClientSupport}wt(async()=>{await s()});const i=async()=>{await Rn.updateExperimentalMoonrakerSupport(t.value),await Rn.updateExperimentalClientSupport(r.value),await s()},o=async()=>{await Rn.updateExperimentalMoonrakerSupport(!1),await Rn.updateExperimentalClientSupport(!1),await s()},a=async()=>{await Rn.updateExperimentalClientSupport(r.value),window.location.reload()};return(l,u)=>(D(),te(rt,null,{default:g(()=>[h(Ue,{cols:"12"},{default:g(()=>[h(gt,null,{default:g(()=>[h(an,null,{default:g(()=>u[3]||(u[3]=[$("h2",null,"Settings",-1)])),_:1}),h(en,null,{default:g(()=>[h(rt,null,{default:g(()=>[h(Ue,{cols:"12",md:"6"},{default:g(()=>[h(gt,null,{default:g(()=>[h(an,null,{default:g(()=>[$("h3",null,[u[6]||(u[6]=_(" Experimental Features ")),h(nt,{bottom:""},{activator:g(({props:c})=>[h(Q,me({class:"help-icon"},c),{default:g(()=>u[4]||(u[4]=[_("help_outline")])),_:2},1040)]),default:g(()=>[u[5]||(u[5]=$("span",{class:"tooltip-content"}," Moonraker support is currently in beta, use at your own risk. ",-1))]),_:1})])]),_:1}),h(en,null,{default:g(()=>[h(yn,{modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=c=>t.value=c),label:"Enable Experimental Moonraker Support","hide-details":""},{label:g(()=>u[7]||(u[7]=[$("span",null,"Enable Experimental Moonraker Support",-1)])),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(Ue,{cols:"12",md:"6"},{default:g(()=>[h(gt,null,{default:g(()=>[h(an,null,{default:g(()=>[$("h3",null,[u[10]||(u[10]=_(" Database Settings ")),h(nt,{bottom:""},{activator:g(({props:c})=>[h(Q,av(Ch(c)),{default:g(()=>u[8]||(u[8]=[_("help_outline")])),_:2},1040)]),default:g(()=>[u[9]||(u[9]=$("span",{class:"tooltip-content"}," By enabling this setting you will set FDM Monster to SQLite as a database source (standalone mode). Please set 'ENABLE_EXPERIMENTAL_TYPEORM' to 'true' to enable this feature. ",-1))]),_:1})])]),_:1}),h(en,null,{default:g(()=>[h(yn,{modelValue:n.value,"onUpdate:modelValue":u[1]||(u[1]=c=>n.value=c),label:"Enable TypeORM Support","hide-details":"",disabled:""},{label:g(()=>u[11]||(u[11]=[$("span",null,"Enable TypeORM Support",-1)])),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(Ue,{cols:"12",md:"6"},{default:g(()=>[h(gt,null,{default:g(()=>[h(an,null,{default:g(()=>[$("h3",null,[u[14]||(u[14]=_(" Experimental Features ")),h(nt,{bottom:""},{activator:g(({props:c})=>[h(Q,me({class:"help-icon"},c),{default:g(()=>u[12]||(u[12]=[_("help_outline")])),_:2},1040)]),default:g(()=>[u[13]||(u[13]=$("span",{class:"tooltip-content"}," Enables the next version of the FDM Monster UI (experimental). ",-1))]),_:1})])]),_:1}),h(en,null,{default:g(()=>[h(yn,{modelValue:r.value,"onUpdate:modelValue":u[2]||(u[2]=c=>r.value=c),label:"Enable Next Client Version (Experimental)","hide-details":"",onChange:a},{label:g(()=>u[15]||(u[15]=[$("span",null,"Enable Next Client Version (Experimental)",-1)])),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),h(Dn,null,{default:g(()=>[h(wn),h(se,{color:"primary",onClick:i},{default:g(()=>u[16]||(u[16]=[_("Save Settings")])),_:1}),h(se,{onClick:o},{default:g(()=>u[17]||(u[17]=[_("Reset to Default")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}}),Hn={requiresAuth:!0},rv={requiresAuth:!1},TS=T9({history:r9("/"),routes:[{path:"/",name:qt.Home,meta:Hn,component:XX},{path:"/first-time-setup",name:qt.FirstTimeSetup,meta:rv,component:dre},{path:"/login",name:qt.Login,meta:rv,component:Gne},{path:"/registration",name:qt.Registration,meta:rv,component:Xne},{path:"/printers",name:qt.PrintersView,meta:Hn,component:cJ},{path:"/cameras",name:qt.CameraGridView,component:Jne},{path:"/settings",component:fJ,meta:Hn,children:[{path:"",meta:Hn,redirect:"/settings/grid"},{path:"account",meta:Hn,component:pre},{path:"server-protection",meta:Hn,component:gre},{path:"grid",meta:Hn,component:mre},{path:"floors",meta:Hn,component:AJ},{path:"user-management",meta:Hn,component:xJ},{path:"octoprint",meta:Hn,component:PJ},{path:"emergency-commands",meta:Hn,component:Dne},{path:"software-upgrade",meta:Hn,component:doe},{path:"diagnostics",meta:Hn,component:foe},{path:"experimental",meta:Hn,component:voe}]},{path:"/statistics",name:qt.PrintStatistics,meta:Hn,component:goe},{path:"/about",name:"About",component:$J},{path:"/permission-denied",name:qt.PermissionDenied,meta:Hn,component:zne},{path:"/:pathMatch(.*)*",name:"NotFound",component:Fne}]});TS.beforeEach(async(e,t,n)=>{var s,i;const r=us();if(!((s=e==null?void 0:e.meta)!=null&&s.requiresAuth)||r.loginRequired===!1)return console.debug(`No auth required on route ${e.fullPath}`),n();if(console.debug(`Auth required on route ${e.fullPath} (loginRequired=${r.loginRequired}, registration=${r.registration}, wizardState=${r.wizardState}, requiresAuth=${(i=e==null?void 0:e.meta)==null?void 0:i.requiresAuth})`),r.loadTokens(),!r.hasAuthToken&&!r.hasRefreshToken){if(console.debug("Not logged in, redirecting to login page"),t.path=="/login")throw new Error("Already on login page, cannot redirect");return n({path:"/login",query:{redirect:e.fullPath}})}return n()});const yoe={collapse:"keyboard_arrow_up",complete:"check",cancel:"cancel",close:"close",delete:"cancel",clear:"cancel",success:"check_circle",info:"info",warning:"priority_high",error:"warning",prev:"chevron_left",next:"chevron_right",checkboxOn:"check_box",checkboxOff:"check_box_outline_blank",checkboxIndeterminate:"indeterminate_check_box",delimiter:"fiber_manual_record",sortAsc:"arrow_upward",sortDesc:"arrow_downward",expand:"keyboard_arrow_down",menu:"menu",subgroup:"arrow_drop_down",dropdown:"arrow_drop_down",radioOn:"radio_button_checked",radioOff:"radio_button_unchecked",edit:"edit",ratingEmpty:"star_border",ratingFull:"star",ratingHalf:"star_half",loading:"cached",first:"first_page",last:"last_page",unfold:"unfold_more",file:"attach_file",plus:"add",minus:"remove",calendar:"event",treeviewCollapse:"arrow_drop_down",treeviewExpand:"arrow_right",eyeDropper:"colorize"},boe={component:e=>pr(fN,{...e,class:"material-icons"})};function TD(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{blueprint:t,...n}=e,r=Jn(t,n),{aliases:s={},components:i={},directives:o={}}=r,a=GL(r.defaults),l=t2(r.display,r.ssr),u=rN(r.theme),c=pN(r.icons),d=_N(r.locale),f=W6(r.date,d),p=Zq(r.goTo,d);return{install:m=>{for(const y in o)m.directive(y,o[y]);for(const y in i)m.component(y,i[y]);for(const y in s)m.component(y,Eu({...s[y],name:y,aliasName:s[y].name}));if(u.install(m),m.provide(iu,a),m.provide(Fv,l),m.provide(Yc,u),m.provide(Iv,c),m.provide($h,d),m.provide(q6,f.options),m.provide(rk,f.instance),m.provide(sA,p),_t&&r.ssr)if(m.$nuxt)m.$nuxt.hook("app:suspense:resolve",()=>{l.update()});else{const{mount:y}=m;m.mount=function(){const b=y(...arguments);return Mt(()=>l.update()),m.mount=y,b}}gr.reset(),m.mixin({computed:{$vuetify(){return gn({defaults:bl.call(this,iu),display:bl.call(this,Fv),theme:bl.call(this,Yc),icons:bl.call(this,Iv),locale:bl.call(this,$h),date:bl.call(this,rk)})}}})},defaults:a,display:l,theme:u,icons:c,locale:d,date:f,goTo:p}}const woe="3.7.16";TD.version=woe;function bl(e){var r,s;const t=this.$,n=((r=t.parent)==null?void 0:r.provides)??((s=t.vnode.appContext)==null?void 0:s.provides);if(n&&e in n)return n[e]}const Soe=TD({theme:{defaultTheme:"dark",themes:{dark:{dark:!0,colors:{primary:"#1eb6c3",secondary:"#424242",accent:"#82B1FF",error:"#FF5252",info:"#2196F3",success:"#4CAF50",warning:"#FFC107"}},light:{dark:!1,colors:{primary:"#9B0505",secondary:"#424242",accent:"#82B1FF",error:"#FF5252",info:"#2196F3",success:"#4CAF50",warning:"#FFC107"}}}},icons:{defaultSet:"md",aliases:yoe,sets:{md:boe}}}),_oe=JF();function koe(e){e.use(Soe).use(rK).use(_oe)}const kE=(e,t,n)=>{const r=Lt(),s=nS(),i=Dt();if(t!=null&&t.length){const o=t.length===1,a=t[0];e.ondrop=async l=>{var f;l.preventDefault(),e.style.border=bp;const u=(f=l.dataTransfer)==null?void 0:f.files;if(!(u!=null&&u.length))return;const c=[...Array.from(u)];let d=[];if(o){const p=c.length===1?c[0].name:null;console.debug("Single printer upload mode",t.length,c.length,p),d=BX(a,c)}else{if(c.length>1)throw"Cannot upload multiple files to multiple printers";console.debug("Multi printer upload mode",t.length,c.length);const p=c[0];d=aM(t,p)}s.queueUploads(d),r.clearSelectedPrinters()}}else e.ondrop=async o=>{o.preventDefault(),e.style.border=bp,i.openInfoMessage({title:"No action performed",subtitle:"Please select one or more printers",warning:!0})}},bp="1px solid #2b2a27",xoe="background-color 0.5s ease",xE="1px solid red";function Eoe(){return{mounted:(e,t,n)=>{var r;e.style.border=bp,e.style.transition=xoe,e.ondragenter=s=>{s.preventDefault(),e.style.border=xE},e.ondragover=s=>{s.preventDefault(),e.style.border=xE},e.ondragleave=s=>{s.preventDefault(),e.style.border=bp},kE(e,(r=t.value)==null?void 0:r.printers,n.appContext)},beforeUpdate:(e,t,n)=>{kE(e,t.value,n.appContext)}}}const sv="1px solid #2b2a27",Coe="1px solid gray",EE=(e,t,n)=>{const r=t==null?void 0:t.printerSet,s=eo();if(r){e.ondrop=null,e.ondragover=null,e.ondragleave=null;return}e.style.border=sv,e.ondrop=async i=>{var d;if(e.style.border=sv,i.preventDefault(),!i.dataTransfer)return;const o=i.dataTransfer.getData("text"),a=JSON.parse(o);if(!RX(a)){console.debug("Drop not recognized",a);return}const u=(d=s.selectedFloor)==null?void 0:d.id;if(!u)throw new Error("Floor is not set");const c=a.printerId;if(!c)throw new Error("PrinterId was not provided");await rs.addPrinterToFloor(u,{printerId:c,x:t.x,y:t.y})},e.ondragover=i=>{i!=null&&i.dataTransfer&&(i.dataTransfer&&Array.from(i.dataTransfer.items).filter(o=>o.kind==="file").length||(e.style.border=Coe,i.preventDefault()))},e.ondragleave=i=>{e.style.border=sv,i.preventDefault()}};function Poe(){return{mounted:(e,t,n)=>{EE(e,t.value,n.appContext)},beforeUpdate:(e,t,n)=>{EE(e,t.value,n.appContext)}}}const ea=KF(vX);console.log("[DEV: false][PROD: true]","0.0.18");Aq({app:ea,dsn:"https://f64683e8d1cb4ac291434993cff1bf9b@o4503975545733120.ingest.sentry.io/4503975546912768",integrations:[Dq({router:TS}),nq()],release:"0.0.18",environment:"production",enabled:!0,tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1});ea.config.errorHandler=e=>{var t;if(e instanceof DT){console.error(`An error was caught [${e.name}]:
|
|
85
|
-
${e.message}
|
|
86
|
-
${(t=e.config)==null?void 0:t.url}
|
|
87
|
-
${e.stack}`),Dt().openErrorMessage({title:"An error occurred",subtitle:e.message,timeout:5e3});return}else console.error(`An error was caught [${e.name}]:
|
|
88
|
-
${e.message}
|
|
89
|
-
${e.stack}`);Dt().openErrorMessage({title:"An error occurred",subtitle:e.message,timeout:5e3}),li(e)};ea.directive("drop-upload",Eoe());ea.directive("drop-printer-position",Poe());koe(ea);ea.provide("appConstants",D9());ea.use(TS);ea.mount("#app");
|
|
90
|
-
//# sourceMappingURL=index-DxmHK0SK.js.map
|