@fdm-monster/client-next 0.0.18 → 0.0.19

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.
@@ -0,0 +1,89 @@
1
+ var VD=Object.defineProperty;var PS=e=>{throw TypeError(e)};var UD=(e,t,n)=>t in e?VD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ye=(e,t,n)=>UD(e,typeof t!="symbol"?t+"":t,n),Fm=(e,t,n)=>t.has(e)||PS("Cannot "+n);var j=(e,t,n)=>(Fm(e,t,"read from private field"),n?n.call(e):t.get(e)),je=(e,t,n)=>t.has(e)?PS("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Me=(e,t,n,r)=>(Fm(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),tt=(e,t,n)=>(Fm(e,t,"access private method"),n);var Gd=(e,t,n,r)=>({set _(s){Me(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]="7af8f961-c256-420e-b783-2112a217db18",e._sentryDebugIdIdentifier="sentry-dbid-7af8f961-c256-420e-b783-2112a217db18")}catch{}{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"731f2330176321d5f40dc4cef4d18d8f8fc15d9e"}}(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 cb(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Lt={},Ml=[],oi=()=>{},zD=()=>!1,yp=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),db=e=>e.startsWith("onUpdate:"),mn=Object.assign,fb=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},HD=Object.prototype.hasOwnProperty,Tt=(e,t)=>HD.call(e,t),qe=Array.isArray,Dl=e=>bp(e)==="[object Map]",NE=e=>bp(e)==="[object Set]",Ye=e=>typeof e=="function",rn=e=>typeof e=="string",qi=e=>typeof e=="symbol",Kt=e=>e!==null&&typeof e=="object",BE=e=>(Kt(e)||Ye(e))&&Ye(e.then)&&Ye(e.catch),VE=Object.prototype.toString,bp=e=>VE.call(e),jD=e=>bp(e).slice(8,-1),UE=e=>bp(e)==="[object Object]",hb=e=>rn(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,yc=cb(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),wp=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},qD=/-(\w)/g,Tr=wp(e=>e.replace(qD,(t,n)=>n?n.toUpperCase():"")),WD=/\B([A-Z])/g,Lo=wp(e=>e.replace(WD,"-$1").toLowerCase()),ci=wp(e=>e.charAt(0).toUpperCase()+e.slice(1)),Nm=wp(e=>e?`on${ci(e)}`:""),So=(e,t)=>!Object.is(e,t),zf=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},zE=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},lv=e=>{const t=parseFloat(e);return isNaN(t)?e:t},GD=e=>{const t=rn(e)?Number(e):NaN;return isNaN(t)?e:t};let RS;const Sp=()=>RS||(RS=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ss(e){if(qe(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],s=rn(r)?QD(r):ss(r);if(s)for(const i in s)t[i]=s[i]}return t}else if(rn(e)||Kt(e))return e}const KD=/;(?![^(]*\))/g,YD=/:([^]+)/,XD=/\/\*[^]*?\*\//g;function QD(e){const t={};return e.replace(XD,"").split(KD).forEach(n=>{if(n){const r=n.split(YD);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Fo(e){let t="";if(rn(e))t=e;else if(qe(e))for(let n=0;n<e.length;n++){const r=Fo(e[n]);r&&(t+=r+" ")}else if(Kt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function uv(e){if(!e)return null;let{class:t,style:n}=e;return t&&!rn(t)&&(e.class=Fo(t)),n&&(e.style=ss(n)),e}const JD="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",ZD=cb(JD);function HE(e){return!!e||e===""}const jE=e=>!!(e&&e.__v_isRef===!0),re=e=>rn(e)?e:e==null?"":qe(e)||Kt(e)&&(e.toString===VE||!Ye(e.toString))?jE(e)?re(e.value):JSON.stringify(e,qE,2):String(e),qE=(e,t)=>jE(t)?qE(e,t.value):Dl(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],i)=>(n[Bm(r,i)+" =>"]=s,n),{})}:NE(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Bm(n))}:qi(t)?Bm(t):Kt(t)&&!qe(t)&&!UE(t)?String(t):t,Bm=(e,t="")=>{var n;return qi(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 lr;class WE{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=lr,!t&&lr&&(this.index=(lr.scopes||(lr.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=lr;try{return lr=this,t()}finally{lr=n}}}on(){lr=this}off(){lr=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 La(e){return new WE(e)}function _p(){return lr}function gn(e,t=!1){lr&&lr.cleanups.push(e)}let Ht;const Vm=new WeakSet;class GE{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,lr&&lr.active&&lr.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Vm.has(this)&&(Vm.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||YE(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,IS(this),XE(this);const t=Ht,n=Ts;Ht=this,Ts=!0;try{return this.fn()}finally{QE(this),Ht=t,Ts=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)gb(t);this.deps=this.depsTail=void 0,IS(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Vm.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){cv(this)&&this.run()}get dirty(){return cv(this)}}let KE=0,bc,wc;function YE(e,t=!1){if(e.flags|=8,t){e.next=wc,wc=e;return}e.next=bc,bc=e}function pb(){KE++}function mb(){if(--KE>0)return;if(wc){let t=wc;for(wc=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;bc;){let t=bc;for(bc=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 XE(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function QE(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),gb(r),e$(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function cv(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(JE(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function JE(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Nc))return;e.globalVersion=Nc;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!cv(e)){e.flags&=-3;return}const n=Ht,r=Ts;Ht=e,Ts=!0;try{XE(e);const s=e.fn(e._value);(t.version===0||So(s,e._value))&&(e._value=s,t.version++)}catch(s){throw t.version++,s}finally{Ht=n,Ts=r,QE(e),e.flags&=-3}}function gb(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)gb(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function e$(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 ZE=[];function No(){ZE.push(Ts),Ts=!1}function Bo(){const e=ZE.pop();Ts=e===void 0?!0:e}function IS(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ht;Ht=void 0;try{t()}finally{Ht=n}}}let Nc=0;class t${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 vb{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 t$(Ht,this),Ht.deps?(n.prevDep=Ht.depsTail,Ht.depsTail.nextDep=n,Ht.depsTail=n):Ht.deps=Ht.depsTail=n,eC(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++,Nc++,this.notify(t)}notify(t){pb();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{mb()}}}function eC(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)eC(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const yh=new WeakMap,xa=Symbol(""),dv=Symbol(""),Bc=Symbol("");function Kn(e,t,n){if(Ts&&Ht){let r=yh.get(e);r||yh.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new vb),s.map=r,s.key=n),s.track()}}function Ii(e,t,n,r,s,i){const o=yh.get(e);if(!o){Nc++;return}const a=l=>{l&&l.trigger()};if(pb(),t==="clear")o.forEach(a);else{const l=qe(e),u=l&&hb(n);if(l&&n==="length"){const c=Number(r);o.forEach((d,f)=>{(f==="length"||f===Bc||!qi(f)&&f>=c)&&a(d)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),u&&a(o.get(Bc)),t){case"add":l?u&&a(o.get("length")):(a(o.get(xa)),Dl(e)&&a(o.get(dv)));break;case"delete":l||(a(o.get(xa)),Dl(e)&&a(o.get(dv)));break;case"set":Dl(e)&&a(o.get(xa));break}}mb()}function n$(e,t){const n=yh.get(e);return n&&n.get(t)}function ol(e){const t=Be(e);return t===e?t:(Kn(t,"iterate",Bc),is(e)?t:t.map(Yn))}function kp(e){return Kn(e=Be(e),"iterate",Bc),e}const r$={__proto__:null,[Symbol.iterator](){return Um(this,Symbol.iterator,Yn)},concat(...e){return ol(this).concat(...e.map(t=>qe(t)?ol(t):t))},entries(){return Um(this,"entries",e=>(e[1]=Yn(e[1]),e))},every(e,t){return mi(this,"every",e,t,void 0,arguments)},filter(e,t){return mi(this,"filter",e,t,n=>n.map(Yn),arguments)},find(e,t){return mi(this,"find",e,t,Yn,arguments)},findIndex(e,t){return mi(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return mi(this,"findLast",e,t,Yn,arguments)},findLastIndex(e,t){return mi(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return mi(this,"forEach",e,t,void 0,arguments)},includes(...e){return zm(this,"includes",e)},indexOf(...e){return zm(this,"indexOf",e)},join(e){return ol(this).join(e)},lastIndexOf(...e){return zm(this,"lastIndexOf",e)},map(e,t){return mi(this,"map",e,t,void 0,arguments)},pop(){return Yu(this,"pop")},push(...e){return Yu(this,"push",e)},reduce(e,...t){return AS(this,"reduce",e,t)},reduceRight(e,...t){return AS(this,"reduceRight",e,t)},shift(){return Yu(this,"shift")},some(e,t){return mi(this,"some",e,t,void 0,arguments)},splice(...e){return Yu(this,"splice",e)},toReversed(){return ol(this).toReversed()},toSorted(e){return ol(this).toSorted(e)},toSpliced(...e){return ol(this).toSpliced(...e)},unshift(...e){return Yu(this,"unshift",e)},values(){return Um(this,"values",Yn)}};function Um(e,t,n){const r=kp(e),s=r[t]();return r!==e&&!is(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.value&&(i.value=n(i.value)),i}),s}const s$=Array.prototype;function mi(e,t,n,r,s,i){const o=kp(e),a=o!==e&&!is(e),l=o[t];if(l!==s$[t]){const d=l.apply(e,i);return a?Yn(d):d}let u=n;o!==e&&(a?u=function(d,f){return n.call(this,Yn(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 AS(e,t,n,r){const s=kp(e);let i=n;return s!==e&&(is(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,Yn(a),l,e)}),s[t](i,...r)}function zm(e,t,n){const r=Be(e);Kn(r,"iterate",Bc);const s=r[t](...n);return(s===-1||s===!1)&&bd(n[0])?(n[0]=Be(n[0]),r[t](...n)):s}function Yu(e,t,n=[]){No(),pb();const r=Be(e)[t].apply(e,n);return mb(),Bo(),r}const i$=cb("__proto__,__v_isRef,__isVue"),tC=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(qi));function o$(e){qi(e)||(e=String(e));const t=Be(this);return Kn(t,"has",e),t.hasOwnProperty(e)}class nC{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?lC:aC:i?oC:iC).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const o=qe(t);if(!s){let l;if(o&&(l=r$[n]))return l;if(n==="hasOwnProperty")return o$}const a=Reflect.get(t,n,Je(t)?t:r);return(qi(n)?tC.has(n):i$(n))||(s||Kn(t,"get",n),i)?a:Je(a)?o&&hb(n)?a:a.value:Kt(a)?s?wu(a):vn(a):a}}class rC extends nC{constructor(t=!1){super(!1,t)}set(t,n,r,s){let i=t[n];if(!this._isShallow){const l=Fa(i);if(!is(r)&&!Fa(r)&&(i=Be(i),r=Be(r)),!qe(t)&&Je(i)&&!Je(r))return l?!1:(i.value=r,!0)}const o=qe(t)&&hb(n)?Number(n)<t.length:Tt(t,n),a=Reflect.set(t,n,r,Je(t)?t:s);return t===Be(s)&&(o?So(r,i)&&Ii(t,"set",n,r):Ii(t,"add",n,r)),a}deleteProperty(t,n){const r=Tt(t,n);t[n];const s=Reflect.deleteProperty(t,n);return s&&r&&Ii(t,"delete",n,void 0),s}has(t,n){const r=Reflect.has(t,n);return(!qi(n)||!tC.has(n))&&Kn(t,"has",n),r}ownKeys(t){return Kn(t,"iterate",qe(t)?"length":xa),Reflect.ownKeys(t)}}class sC extends nC{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const a$=new rC,l$=new sC,u$=new rC(!0),c$=new sC(!0),fv=e=>e,Kd=e=>Reflect.getPrototypeOf(e);function d$(e,t,n){return function(...r){const s=this.__v_raw,i=Be(s),o=Dl(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,u=s[e](...r),c=n?fv:t?hv:Yn;return!t&&Kn(i,"iterate",l?dv:xa),{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 Yd(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function f$(e,t){const n={get(s){const i=this.__v_raw,o=Be(i),a=Be(s);e||(So(s,a)&&Kn(o,"get",s),Kn(o,"get",a));const{has:l}=Kd(o),u=t?fv:e?hv:Yn;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&&Kn(Be(s),"iterate",xa),Reflect.get(s,"size",s)},has(s){const i=this.__v_raw,o=Be(i),a=Be(s);return e||(So(s,a)&&Kn(o,"has",s),Kn(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=Be(a),u=t?fv:e?hv:Yn;return!e&&Kn(l,"iterate",xa),a.forEach((c,d)=>s.call(i,u(c),u(d),o))}};return mn(n,e?{add:Yd("add"),set:Yd("set"),delete:Yd("delete"),clear:Yd("clear")}:{add(s){!t&&!is(s)&&!Fa(s)&&(s=Be(s));const i=Be(this);return Kd(i).has.call(i,s)||(i.add(s),Ii(i,"add",s,s)),this},set(s,i){!t&&!is(i)&&!Fa(i)&&(i=Be(i));const o=Be(this),{has:a,get:l}=Kd(o);let u=a.call(o,s);u||(s=Be(s),u=a.call(o,s));const c=l.call(o,s);return o.set(s,i),u?So(i,c)&&Ii(o,"set",s,i):Ii(o,"add",s,i),this},delete(s){const i=Be(this),{has:o,get:a}=Kd(i);let l=o.call(i,s);l||(s=Be(s),l=o.call(i,s)),a&&a.call(i,s);const u=i.delete(s);return l&&Ii(i,"delete",s,void 0),u},clear(){const s=Be(this),i=s.size!==0,o=s.clear();return i&&Ii(s,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=d$(s,e,t)}),n}function xp(e,t){const n=f$(e,t);return(r,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(Tt(n,s)&&s in r?n:r,s,i)}const h$={get:xp(!1,!1)},p$={get:xp(!1,!0)},m$={get:xp(!0,!1)},g$={get:xp(!0,!0)},iC=new WeakMap,oC=new WeakMap,aC=new WeakMap,lC=new WeakMap;function v$(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function y$(e){return e.__v_skip||!Object.isExtensible(e)?0:v$(jD(e))}function vn(e){return Fa(e)?e:Cp(e,!1,a$,h$,iC)}function Ep(e){return Cp(e,!1,u$,p$,oC)}function wu(e){return Cp(e,!0,l$,m$,aC)}function b$(e){return Cp(e,!0,c$,g$,lC)}function Cp(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=y$(e);if(o===0)return e;const a=new Proxy(e,o===2?r:n);return s.set(e,a),a}function _o(e){return Fa(e)?_o(e.__v_raw):!!(e&&e.__v_isReactive)}function Fa(e){return!!(e&&e.__v_isReadonly)}function is(e){return!!(e&&e.__v_isShallow)}function bd(e){return e?!!e.__v_raw:!1}function Be(e){const t=e&&e.__v_raw;return t?Be(t):e}function Tp(e){return!Tt(e,"__v_skip")&&Object.isExtensible(e)&&zE(e,"__v_skip",!0),e}const Yn=e=>Kt(e)?vn(e):e,hv=e=>Kt(e)?wu(e):e;function Je(e){return e?e.__v_isRef===!0:!1}function U(e){return uC(e,!1)}function Ie(e){return uC(e,!0)}function uC(e,t){return Je(e)?e:new w$(e,t)}class w${constructor(t,n){this.dep=new vb,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Be(t),this._value=n?t:Yn(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||is(t)||Fa(t);t=r?t:Be(t),So(t,n)&&(this._rawValue=t,this._value=r?t:Yn(t),this.dep.trigger())}}function Z(e){return Je(e)?e.value:e}function ko(e){return Ye(e)?e():Z(e)}const S$={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 cC(e){return _o(e)?e:new Proxy(e,S$)}function Vo(e){const t=qe(e)?new Array(e.length):{};for(const n in e)t[n]=dC(e,n);return t}class _${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 n$(Be(this._object),this._key)}}class k${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 Te(e,t,n){return Je(e)?e:Ye(e)?new k$(e):Kt(e)&&arguments.length>1?dC(e,t,n):U(e)}function dC(e,t,n){const r=e[t];return Je(r)?r:new _$(e,t,n)}class x${constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new vb(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Nc-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 YE(this,!0),!0}get value(){const t=this.dep.track();return JE(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function E$(e,t,n=!1){let r,s;return Ye(e)?r=e:(r=e.get,s=e.set),new x$(r,s,n)}const Xd={},bh=new WeakMap;let sa;function C$(e,t=!1,n=sa){if(n){let r=bh.get(n);r||bh.set(n,r=[]),r.push(e)}}function T$(e,t,n=Lt){const{immediate:r,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=n,u=T=>s?T:is(T)||s===!1||s===0?Ai(T,1):Ai(T);let c,d,f,p,g=!1,m=!1;if(Je(e)?(d=()=>e.value,g=is(e)):_o(e)?(d=()=>u(e),g=!0):qe(e)?(m=!0,g=e.some(T=>_o(T)||is(T)),d=()=>e.map(T=>{if(Je(T))return T.value;if(_o(T))return u(T);if(Ye(T))return l?l(T,2):T()})):Ye(e)?t?d=l?()=>l(e,2):e:d=()=>{if(f){No();try{f()}finally{Bo()}}const T=sa;sa=c;try{return l?l(e,3,[p]):e(p)}finally{sa=T}}:d=oi,t&&s){const T=d,x=s===!0?1/0:s;d=()=>Ai(T(),x)}const y=_p(),w=()=>{c.stop(),y&&y.active&&fb(y.effects,c)};if(i&&t){const T=t;t=(...x)=>{T(...x),w()}}let b=m?new Array(e.length).fill(Xd):Xd;const _=T=>{if(!(!(c.flags&1)||!c.dirty&&!T))if(t){const x=c.run();if(s||g||(m?x.some((C,I)=>So(C,b[I])):So(x,b))){f&&f();const C=sa;sa=c;try{const I=[x,b===Xd?void 0:m&&b[0]===Xd?[]:b,p];l?l(t,3,I):t(...I),b=x}finally{sa=C}}}else c.run()};return a&&a(_),c=new GE(d),c.scheduler=o?()=>o(_,!1):_,p=T=>C$(T,!1,c),f=c.onStop=()=>{const T=bh.get(c);if(T){if(l)l(T,4);else for(const x of T)x();bh.delete(c)}},t?r?_(!0):b=c.run():o?o(_.bind(null,!0),!0):c.run(),w.pause=c.pause.bind(c),w.resume=c.resume.bind(c),w.stop=w,w}function Ai(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))Ai(e.value,t,n);else if(qe(e))for(let r=0;r<e.length;r++)Ai(e[r],t,n);else if(NE(e)||Dl(e))e.forEach(r=>{Ai(r,t,n)});else if(UE(e)){for(const r in e)Ai(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Ai(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 wd(e,t,n,r){try{return r?e(...r):e()}catch(s){Pp(s,t,n)}}function Rs(e,t,n,r){if(Ye(e)){const s=wd(e,t,n,r);return s&&BE(s)&&s.catch(i=>{Pp(i,t,n)}),s}if(qe(e)){const s=[];for(let i=0;i<e.length;i++)s.push(Rs(e[i],t,n,r));return s}}function Pp(e,t,n,r=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Lt;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){No(),wd(i,null,10,[e,l,u]),Bo();return}}P$(e,n,s,r,o)}function P$(e,t,n,r=!0,s=!1){if(s)throw e;console.error(e)}const ur=[];let Ys=-1;const $l=[];let ro=null,yl=0;const fC=Promise.resolve();let wh=null;function Mt(e){const t=wh||fC;return e?t.then(this?e.bind(this):e):t}function R$(e){let t=Ys+1,n=ur.length;for(;t<n;){const r=t+n>>>1,s=ur[r],i=Vc(s);i<e||i===e&&s.flags&2?t=r+1:n=r}return t}function yb(e){if(!(e.flags&1)){const t=Vc(e),n=ur[ur.length-1];!n||!(e.flags&2)&&t>=Vc(n)?ur.push(e):ur.splice(R$(t),0,e),e.flags|=1,hC()}}function hC(){wh||(wh=fC.then(mC))}function I$(e){qe(e)?$l.push(...e):ro&&e.id===-1?ro.splice(yl+1,0,e):e.flags&1||($l.push(e),e.flags|=1),hC()}function OS(e,t,n=Ys+1){for(;n<ur.length;n++){const r=ur[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;ur.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function pC(e){if($l.length){const t=[...new Set($l)].sort((n,r)=>Vc(n)-Vc(r));if($l.length=0,ro){ro.push(...t);return}for(ro=t,yl=0;yl<ro.length;yl++){const n=ro[yl];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}ro=null,yl=0}}const Vc=e=>e.id==null?e.flags&2?-1:1/0:e.id;function mC(e){try{for(Ys=0;Ys<ur.length;Ys++){const t=ur[Ys];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),wd(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ys<ur.length;Ys++){const t=ur[Ys];t&&(t.flags&=-2)}Ys=-1,ur.length=0,pC(),wh=null,(ur.length||$l.length)&&mC()}}let kn=null,gC=null;function Sh(e){const t=kn;return kn=e,gC=e&&e.type.__scopeId||null,t}function v(e,t=kn,n){if(!t||e._n)return e;const r=(...s)=>{r._d&&qS(-1);const i=Sh(t);let o;try{o=e(...s)}finally{Sh(i),r._d&&qS(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function Bt(e,t){if(kn===null)return e;const n=$p(kn),r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,o,a,l=Lt]=t[s];i&&(Ye(i)&&(i={mounted:i,updated:i}),i.deep&&Ai(o),r.push({dir:i,instance:n,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function Yo(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&&(No(),Rs(l,n,8,[e.el,a,e,t]),Bo())}}const vC=Symbol("_vte"),yC=e=>e.__isTeleport,Sc=e=>e&&(e.disabled||e.disabled===""),MS=e=>e&&(e.defer||e.defer===""),DS=e=>typeof SVGElement<"u"&&e instanceof SVGElement,$S=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,pv=(e,t)=>{const n=e&&e.to;return rn(n)?t?t(n):null:n},bC={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:g,createText:m,createComment:y}}=u,w=Sc(t.props);let{shapeFlag:b,children:_,dynamicChildren:T}=t;if(e==null){const x=t.el=m(""),C=t.anchor=m("");p(x,n,r),p(C,n,r);const I=(E,O)=>{b&16&&(s&&s.isCE&&(s.ce._teleportTarget=E),c(_,E,O,s,i,o,a,l))},S=()=>{const E=t.target=pv(t.props,g),O=wC(E,t,m,p);E&&(o!=="svg"&&DS(E)?o="svg":o!=="mathml"&&$S(E)&&(o="mathml"),w||(I(E,O),Hf(t,!1)))};w&&(I(n,C),Hf(t,!0)),MS(t.props)?ar(()=>{S(),t.el.__isMounted=!0},i):S()}else{if(MS(t.props)&&!e.el.__isMounted){ar(()=>{bC.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 x=t.anchor=e.anchor,C=t.target=e.target,I=t.targetAnchor=e.targetAnchor,S=Sc(e.props),E=S?n:C,O=S?x:I;if(o==="svg"||DS(C)?o="svg":(o==="mathml"||$S(C))&&(o="mathml"),T?(f(e.dynamicChildren,T,E,s,i,o,a),Cb(e,t,!0)):l||d(e,t,E,O,s,i,o,a,!1),w)S?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Qd(t,n,x,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const R=t.target=pv(t.props,g);R&&Qd(t,R,null,u,0)}else S&&Qd(t,C,I,u,1);Hf(t,w)}},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||!Sc(f);for(let g=0;g<a.length;g++){const m=a[g];r(m,t,n,p,!!m.dynamicChildren)}}},move:Qd,hydrate:A$};function Qd(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||Sc(c))&&l&16)for(let f=0;f<u.length;f++)s(u[f],t,n,2);d&&r(a,t,n)}function A$(e,t,n,r,s,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:u,createText:c}},d){const f=t.target=pv(t.props,l);if(f){const p=Sc(t.props),g=f._lpa||f.firstChild;if(t.shapeFlag&16)if(p)t.anchor=d(o(e),t,a(e),n,r,s,i),t.targetStart=g,t.targetAnchor=g&&o(g);else{t.anchor=o(e);let m=g;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||wC(f,t,c,u),d(g&&o(g),t,f,n,r,s,i)}Hf(t,p)}return t.anchor&&o(t.anchor)}const O$=bC;function Hf(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 wC(e,t,n,r){const s=t.targetStart=n(""),i=t.targetAnchor=n("");return s[vC]=i,e&&(r(s,e),r(i,e)),i}const so=Symbol("_leaveCb"),Jd=Symbol("_enterCb");function SC(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return _t(()=>{e.isMounted=!0}),En(()=>{e.isUnmounting=!0}),e}const Yr=[Function,Array],_C={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Yr,onEnter:Yr,onAfterEnter:Yr,onEnterCancelled:Yr,onBeforeLeave:Yr,onLeave:Yr,onAfterLeave:Yr,onLeaveCancelled:Yr,onBeforeAppear:Yr,onAppear:Yr,onAfterAppear:Yr,onAppearCancelled:Yr},kC=e=>{const t=e.subTree;return t.component?kC(t.component):t},M$={name:"BaseTransition",props:_C,setup(e,{slots:t}){const n=Dp(),r=SC();return()=>{const s=t.default&&bb(t.default(),!0);if(!s||!s.length)return;const i=xC(s),o=Be(e),{mode:a}=o;if(r.isLeaving)return Hm(i);const l=LS(i);if(!l)return Hm(i);let u=Uc(l,o,r,n,d=>u=d);l.type!==Xn&&Na(l,u);let c=n.subTree&&LS(n.subTree);if(c&&c.type!==Xn&&!la(l,c)&&kC(n).type!==Xn){let d=Uc(c,o,r,n);if(Na(c,d),a==="out-in"&&l.type!==Xn)return r.isLeaving=!0,d.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},Hm(i);a==="in-out"&&l.type!==Xn?d.delayLeave=(f,p,g)=>{const m=EC(r,c);m[String(c.key)]=c,f[so]=()=>{p(),f[so]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{g(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function xC(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Xn){t=n;break}}return t}const D$=M$;function EC(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 Uc(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:g,onLeaveCancelled:m,onBeforeAppear:y,onAppear:w,onAfterAppear:b,onAppearCancelled:_}=t,T=String(e.key),x=EC(n,e),C=(E,O)=>{E&&Rs(E,r,9,O)},I=(E,O)=>{const R=O[1];C(E,O),qe(E)?E.every(A=>A.length<=1)&&R():E.length<=1&&R()},S={mode:o,persisted:a,beforeEnter(E){let O=l;if(!n.isMounted)if(i)O=y||l;else return;E[so]&&E[so](!0);const R=x[T];R&&la(e,R)&&R.el[so]&&R.el[so](),C(O,[E])},enter(E){let O=u,R=c,A=d;if(!n.isMounted)if(i)O=w||u,R=b||c,A=_||d;else return;let D=!1;const L=E[Jd]=W=>{D||(D=!0,W?C(A,[E]):C(R,[E]),S.delayedLeave&&S.delayedLeave(),E[Jd]=void 0)};O?I(O,[E,L]):L()},leave(E,O){const R=String(e.key);if(E[Jd]&&E[Jd](!0),n.isUnmounting)return O();C(f,[E]);let A=!1;const D=E[so]=L=>{A||(A=!0,O(),L?C(m,[E]):C(g,[E]),E[so]=void 0,x[R]===e&&delete x[R])};x[R]=e,p?I(p,[E,D]):D()},clone(E){const O=Uc(E,t,n,r,s);return s&&s(O),O}};return S}function Hm(e){if(Rp(e))return e=Li(e),e.children=null,e}function LS(e){if(!Rp(e))return yC(e.type)&&e.children?xC(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 Na(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Na(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 bb(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(bb(o.children,t,a))):(t||o.type!==Xn)&&r.push(a!=null?Li(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 hs(){const e=Dp();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function CC(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function _h(e,t,n,r,s=!1){if(qe(e)){e.forEach((g,m)=>_h(g,t&&(qe(t)?t[m]:t),n,r,s));return}if(Ll(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&_h(e,t,n,r.component.subTree);return}const i=r.shapeFlag&4?$p(r.component):r.el,o=s?null:i,{i:a,r:l}=e,u=t&&t.r,c=a.refs===Lt?a.refs={}:a.refs,d=a.setupState,f=Be(d),p=d===Lt?()=>!1:g=>Tt(f,g);if(u!=null&&u!==l&&(rn(u)?(c[u]=null,p(u)&&(d[u]=null)):Je(u)&&(u.value=null)),Ye(l))wd(l,a,12,[o,c]);else{const g=rn(l),m=Je(l);if(g||m){const y=()=>{if(e.f){const w=g?p(l)?d[l]:c[l]:l.value;s?qe(w)&&fb(w,i):qe(w)?w.includes(i)||w.push(i):g?(c[l]=[i],p(l)&&(d[l]=c[l])):(l.value=[i],e.k&&(c[e.k]=l.value))}else g?(c[l]=o,p(l)&&(d[l]=o)):m&&(l.value=o,e.k&&(c[e.k]=o))};o?(y.id=-1,ar(y,n)):y()}}}Sp().requestIdleCallback;Sp().cancelIdleCallback;const Ll=e=>!!e.type.__asyncLoader,Rp=e=>e.type.__isKeepAlive;function TC(e,t){PC(e,"a",t)}function wb(e,t){PC(e,"da",t)}function PC(e,t,n=Rn){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)&&$$(r,t,n,s),s=s.parent}}function $$(e,t,n,r){const s=Ip(t,e,r,!0);Ap(()=>{fb(r[t],s)},n)}function Ip(e,t,n=Rn,r=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{No();const a=_d(n),l=Rs(t,n,e,o);return a(),Bo(),l});return r?s.unshift(i):s.push(i),i}}const Wi=e=>(t,n=Rn)=>{(!Hc||e==="sp")&&Ip(e,(...r)=>t(...r),n)},Su=Wi("bm"),_t=Wi("m"),RC=Wi("bu"),Sb=Wi("u"),En=Wi("bum"),Ap=Wi("um"),L$=Wi("sp"),F$=Wi("rtg"),N$=Wi("rtc");function B$(e,t=Rn){Ip("ec",e,t)}const _b="components",V$="directives";function In(e,t){return kb(_b,e,!0,t)||e}const U$=Symbol.for("v-ndc");function z$(e){return rn(e)&&kb(_b,e,!1)||e}function fr(e){return kb(V$,e)}function kb(e,t,n=!0,r=!1){const s=kn||Rn;if(s){const i=s.type;if(e===_b){const a=CL(i,!1);if(a&&(a===t||a===Tr(t)||a===ci(Tr(t))))return i}const o=FS(s[e]||i[e],t)||FS(s.appContext[e],t);return!o&&r?i:o}}function FS(e,t){return e&&(e[t]||e[Tr(t)]||e[ci(Tr(t))])}function Wt(e,t,n,r){let s;const i=n,o=qe(e);if(o||rn(e)){const a=o&&_o(e);let l=!1;a&&(l=!is(e),e=kp(e)),s=new Array(e.length);for(let u=0,c=e.length;u<c;u++)s[u]=t(l?Yn(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 IC(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(kn.ce||kn.parent&&Ll(kn.parent)&&kn.parent.ce)return $(),te(Pe,null,[h("slot",n,r&&r())],64);let i=e[t];i&&i._c&&(i._d=!1),$();const o=i&&AC(i(n)),a=n.key||o&&o.key,l=te(Pe,{key:(a&&!qi(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 AC(e){return e.some(t=>eu(t)?!(t.type===Xn||t.type===Pe&&!AC(t.children)):!0)?e:null}const mv=e=>e?XC(e)?$p(e):mv(e.parent):null,_c=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=>mv(e.parent),$root:e=>mv(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>xb(e),$forceUpdate:e=>e.f||(e.f=()=>{yb(e.update)}),$nextTick:e=>e.n||(e.n=Mt.bind(e.proxy)),$watch:e=>uL.bind(e)}),jm=(e,t)=>e!==Lt&&!e.__isScriptSetup&&Tt(e,t),H$={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(jm(r,t))return o[t]=1,r[t];if(s!==Lt&&Tt(s,t))return o[t]=2,s[t];if((u=e.propsOptions[0])&&Tt(u,t))return o[t]=3,i[t];if(n!==Lt&&Tt(n,t))return o[t]=4,n[t];gv&&(o[t]=0)}}const c=_c[t];let d,f;if(c)return t==="$attrs"&&Kn(e.attrs,"get",""),c(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==Lt&&Tt(n,t))return o[t]=4,n[t];if(f=l.config.globalProperties,Tt(f,t))return f[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:i}=e;return jm(s,t)?(s[t]=n,!0):r!==Lt&&Tt(r,t)?(r[t]=n,!0):Tt(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!==Lt&&Tt(e,o)||jm(t,o)||(a=i[0])&&Tt(a,o)||Tt(r,o)||Tt(_c,o)||Tt(s.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Tt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function NS(e){return qe(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let gv=!0;function j$(e){const t=xb(e),n=e.proxy,r=e.ctx;gv=!1,t.beforeCreate&&BS(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:g,activated:m,deactivated:y,beforeDestroy:w,beforeUnmount:b,destroyed:_,unmounted:T,render:x,renderTracked:C,renderTriggered:I,errorCaptured:S,serverPrefetch:E,expose:O,inheritAttrs:R,components:A,directives:D,filters:L}=t;if(u&&q$(u,r,null),o)for(const K in o){const G=o[K];Ye(G)&&(r[K]=G.bind(n))}if(s){const K=s.call(n,n);Kt(K)&&(e.data=vn(K))}if(gv=!0,i)for(const K in i){const G=i[K],H=Ye(G)?G.bind(n,n):Ye(G.get)?G.get.bind(n,n):oi,B=!Ye(G)&&Ye(G.set)?G.set.bind(n):oi,ne=P({get:H,set:B});Object.defineProperty(r,K,{enumerable:!0,configurable:!0,get:()=>ne.value,set:q=>ne.value=q})}if(a)for(const K in a)OC(a[K],r,n,K);if(l){const K=Ye(l)?l.call(n):l;Reflect.ownKeys(K).forEach(G=>{Gt(G,K[G])})}c&&BS(c,e,"c");function z(K,G){qe(G)?G.forEach(H=>K(H.bind(n))):G&&K(G.bind(n))}if(z(Su,d),z(_t,f),z(RC,p),z(Sb,g),z(TC,m),z(wb,y),z(B$,S),z(N$,C),z(F$,I),z(En,b),z(Ap,T),z(L$,E),qe(O))if(O.length){const K=e.exposed||(e.exposed={});O.forEach(G=>{Object.defineProperty(K,G,{get:()=>n[G],set:H=>n[G]=H})})}else e.exposed||(e.exposed={});x&&e.render===oi&&(e.render=x),R!=null&&(e.inheritAttrs=R),A&&(e.components=A),D&&(e.directives=D),E&&CC(e)}function q$(e,t,n=oi){qe(e)&&(e=vv(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 BS(e,t,n){Rs(qe(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function OC(e,t,n,r){let s=r.includes(".")?qC(n,r):()=>n[r];if(rn(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=>OC(i,t,n,r));else{const i=Ye(e.handler)?e.handler.bind(n):t[e.handler];Ye(i)&&ke(s,i,e)}}function xb(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=>kh(l,u,o,!0)),kh(l,t,o)),Kt(t)&&i.set(t,l),l}function kh(e,t,n,r=!1){const{mixins:s,extends:i}=t;i&&kh(e,i,n,!0),s&&s.forEach(o=>kh(e,o,n,!0));for(const o in t)if(!(r&&o==="expose")){const a=W$[o]||n&&n[o];e[o]=a?a(e[o],t[o]):t[o]}return e}const W$={data:VS,props:US,emits:US,methods:dc,computed:dc,beforeCreate:rr,created:rr,beforeMount:rr,mounted:rr,beforeUpdate:rr,updated:rr,beforeDestroy:rr,beforeUnmount:rr,destroyed:rr,unmounted:rr,activated:rr,deactivated:rr,errorCaptured:rr,serverPrefetch:rr,components:dc,directives:dc,watch:K$,provide:VS,inject:G$};function VS(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 G$(e,t){return dc(vv(e),vv(t))}function vv(e){if(qe(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function rr(e,t){return e?[...new Set([].concat(e,t))]:t}function dc(e,t){return e?mn(Object.create(null),e,t):t}function US(e,t){return e?qe(e)&&qe(t)?[...new Set([...e,...t])]:mn(Object.create(null),NS(e),NS(t??{})):t}function K$(e,t){if(!e)return t;if(!t)return e;const n=mn(Object.create(null),e);for(const r in t)n[r]=rr(e[r],t[r]);return n}function MC(){return{app:null,config:{isNativeTag:zD,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 Y$=0;function X$(e,t){return function(r,s=null){Ye(r)||(r=mn({},r)),s!=null&&!Kt(s)&&(s=null);const i=MC(),o=new WeakSet,a=[];let l=!1;const u=i.app={_uid:Y$++,_component:r,_props:s,_container:null,_context:i,_instance:null,version:JC,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,$p(p.component)}},onUnmount(c){a.push(c)},unmount(){l&&(Rs(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=Ea;Ea=u;try{return c()}finally{Ea=d}}};return u}}let Ea=null;function Gt(e,t){if(Rn){let n=Rn.provides;const r=Rn.parent&&Rn.parent.provides;r===n&&(n=Rn.provides=Object.create(r)),n[e]=t}}function Xe(e,t,n=!1){const r=Rn||kn;if(r||Ea){const s=Ea?Ea._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 DC(){return!!(Rn||kn||Ea)}const $C={},LC=()=>Object.create($C),FC=e=>Object.getPrototypeOf(e)===$C;function Q$(e,t,n,r=!1){const s={},i=LC();e.propsDefaults=Object.create(null),NC(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);n?e.props=r?s:Ep(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function J$(e,t,n,r){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=Be(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(Tt(i,f))p!==i[f]&&(i[f]=p,u=!0);else{const g=Tr(f);s[g]=yv(l,a,g,p,e,!1)}else p!==i[f]&&(i[f]=p,u=!0)}}}else{NC(e,t,s,i)&&(u=!0);let c;for(const d in a)(!t||!Tt(t,d)&&((c=Lo(d))===d||!Tt(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(s[d]=yv(l,a,d,void 0,e,!0)):delete s[d]);if(i!==a)for(const d in i)(!t||!Tt(t,d))&&(delete i[d],u=!0)}u&&Ii(e.attrs,"set","")}function NC(e,t,n,r){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(yc(l))continue;const u=t[l];let c;s&&Tt(s,c=Tr(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=Be(n),u=a||Lt;for(let c=0;c<i.length;c++){const d=i[c];n[d]=yv(s,l,d,u[d],e,!Tt(u,d))}}return o}function yv(e,t,n,r,s,i){const o=e[n];if(o!=null){const a=Tt(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=_d(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===Lo(n))&&(r=!0))}return r}const Z$=new WeakMap;function BC(e,t,n=!1){const r=n?Z$: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]=BC(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,Ml),Ml;if(qe(i))for(let c=0;c<i.length;c++){const d=Tr(i[c]);zS(d)&&(o[d]=Lt)}else if(i)for(const c in i){const d=Tr(c);if(zS(d)){const f=i[c],p=o[d]=qe(f)||Ye(f)?{type:f}:mn({},f),g=p.type;let m=!1,y=!0;if(qe(g))for(let w=0;w<g.length;++w){const b=g[w],_=Ye(b)&&b.name;if(_==="Boolean"){m=!0;break}else _==="String"&&(y=!1)}else m=Ye(g)&&g.name==="Boolean";p[0]=m,p[1]=y,(m||Tt(p,"default"))&&a.push(d)}}const u=[o,a];return Kt(e)&&r.set(e,u),u}function zS(e){return e[0]!=="$"&&!yc(e)}const VC=e=>e[0]==="_"||e==="$stable",Eb=e=>qe(e)?e.map(ti):[ti(e)],eL=(e,t,n)=>{if(t._n)return t;const r=v((...s)=>Eb(t(...s)),n);return r._c=!1,r},UC=(e,t,n)=>{const r=e._ctx;for(const s in e){if(VC(s))continue;const i=e[s];if(Ye(i))t[s]=eL(s,i,r);else if(i!=null){const o=Eb(i);t[s]=()=>o}}},zC=(e,t)=>{const n=Eb(t);e.slots.default=()=>n},HC=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},tL=(e,t,n)=>{const r=e.slots=LC();if(e.vnode.shapeFlag&32){const s=t._;s?(HC(r,t,n),n&&zE(r,"_",s,!0)):UC(t,r)}else t&&zC(e,t)},nL=(e,t,n)=>{const{vnode:r,slots:s}=e;let i=!0,o=Lt;if(r.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:HC(s,t,n):(i=!t.$stable,UC(t,s)),o=t}else t&&(zC(e,t),o={default:1});if(i)for(const a in s)!VC(a)&&o[a]==null&&delete s[a]},ar=gL;function rL(e){return sL(e)}function sL(e,t){const n=Sp();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=oi,insertStaticContent:g}=e,m=(N,F,ee,pe=null,ce=null,we=null,Re=void 0,ve=null,Se=!!F.dynamicChildren)=>{if(N===F)return;N&&!la(N,F)&&(pe=Q(N),q(N,ce,we,!0),N=null),F.patchFlag===-2&&(Se=!1,F.dynamicChildren=null);const{type:de,ref:Le,shapeFlag:Ee}=F;switch(de){case Sd:y(N,F,ee,pe);break;case Xn:w(N,F,ee,pe);break;case Gm:N==null&&b(F,ee,pe,Re);break;case Pe:A(N,F,ee,pe,ce,we,Re,ve,Se);break;default:Ee&1?x(N,F,ee,pe,ce,we,Re,ve,Se):Ee&6?D(N,F,ee,pe,ce,we,Re,ve,Se):(Ee&64||Ee&128)&&de.process(N,F,ee,pe,ce,we,Re,ve,Se,ge)}Le!=null&&ce&&_h(Le,N&&N.ref,we,F||N,!F)},y=(N,F,ee,pe)=>{if(N==null)r(F.el=a(F.children),ee,pe);else{const ce=F.el=N.el;F.children!==N.children&&u(ce,F.children)}},w=(N,F,ee,pe)=>{N==null?r(F.el=l(F.children||""),ee,pe):F.el=N.el},b=(N,F,ee,pe)=>{[N.el,N.anchor]=g(N.children,F,ee,pe,N.el,N.anchor)},_=({el:N,anchor:F},ee,pe)=>{let ce;for(;N&&N!==F;)ce=f(N),r(N,ee,pe),N=ce;r(F,ee,pe)},T=({el:N,anchor:F})=>{let ee;for(;N&&N!==F;)ee=f(N),s(N),N=ee;s(F)},x=(N,F,ee,pe,ce,we,Re,ve,Se)=>{F.type==="svg"?Re="svg":F.type==="math"&&(Re="mathml"),N==null?C(F,ee,pe,ce,we,Re,ve,Se):E(N,F,ce,we,Re,ve,Se)},C=(N,F,ee,pe,ce,we,Re,ve)=>{let Se,de;const{props:Le,shapeFlag:Ee,transition:xe,dirs:We}=N;if(Se=N.el=o(N.type,we,Le&&Le.is,Le),Ee&8?c(Se,N.children):Ee&16&&S(N.children,Se,null,pe,ce,qm(N,we),Re,ve),We&&Yo(N,null,pe,"created"),I(Se,N,N.scopeId,Re,pe),Le){for(const Ut in Le)Ut!=="value"&&!yc(Ut)&&i(Se,Ut,null,Le[Ut],we,pe);"value"in Le&&i(Se,"value",null,Le.value,we),(de=Le.onVnodeBeforeMount)&&Us(de,pe,N)}We&&Yo(N,null,pe,"beforeMount");const pt=iL(ce,xe);pt&&xe.beforeEnter(Se),r(Se,F,ee),((de=Le&&Le.onVnodeMounted)||pt||We)&&ar(()=>{de&&Us(de,pe,N),pt&&xe.enter(Se),We&&Yo(N,null,pe,"mounted")},ce)},I=(N,F,ee,pe,ce)=>{if(ee&&p(N,ee),pe)for(let we=0;we<pe.length;we++)p(N,pe[we]);if(ce){let we=ce.subTree;if(F===we||GC(we.type)&&(we.ssContent===F||we.ssFallback===F)){const Re=ce.vnode;I(N,Re,Re.scopeId,Re.slotScopeIds,ce.parent)}}},S=(N,F,ee,pe,ce,we,Re,ve,Se=0)=>{for(let de=Se;de<N.length;de++){const Le=N[de]=ve?io(N[de]):ti(N[de]);m(null,Le,F,ee,pe,ce,we,Re,ve)}},E=(N,F,ee,pe,ce,we,Re)=>{const ve=F.el=N.el;let{patchFlag:Se,dynamicChildren:de,dirs:Le}=F;Se|=N.patchFlag&16;const Ee=N.props||Lt,xe=F.props||Lt;let We;if(ee&&Xo(ee,!1),(We=xe.onVnodeBeforeUpdate)&&Us(We,ee,F,N),Le&&Yo(F,N,ee,"beforeUpdate"),ee&&Xo(ee,!0),(Ee.innerHTML&&xe.innerHTML==null||Ee.textContent&&xe.textContent==null)&&c(ve,""),de?O(N.dynamicChildren,de,ve,ee,pe,qm(F,ce),we):Re||G(N,F,ve,null,ee,pe,qm(F,ce),we,!1),Se>0){if(Se&16)R(ve,Ee,xe,ee,ce);else if(Se&2&&Ee.class!==xe.class&&i(ve,"class",null,xe.class,ce),Se&4&&i(ve,"style",Ee.style,xe.style,ce),Se&8){const pt=F.dynamicProps;for(let Ut=0;Ut<pt.length;Ut++){const Rt=pt[Ut],Mr=Ee[Rt],Hn=xe[Rt];(Hn!==Mr||Rt==="value")&&i(ve,Rt,Mr,Hn,ce,ee)}}Se&1&&N.children!==F.children&&c(ve,F.children)}else!Re&&de==null&&R(ve,Ee,xe,ee,ce);((We=xe.onVnodeUpdated)||Le)&&ar(()=>{We&&Us(We,ee,F,N),Le&&Yo(F,N,ee,"updated")},pe)},O=(N,F,ee,pe,ce,we,Re)=>{for(let ve=0;ve<F.length;ve++){const Se=N[ve],de=F[ve],Le=Se.el&&(Se.type===Pe||!la(Se,de)||Se.shapeFlag&70)?d(Se.el):ee;m(Se,de,Le,null,pe,ce,we,Re,!0)}},R=(N,F,ee,pe,ce)=>{if(F!==ee){if(F!==Lt)for(const we in F)!yc(we)&&!(we in ee)&&i(N,we,F[we],null,ce,pe);for(const we in ee){if(yc(we))continue;const Re=ee[we],ve=F[we];Re!==ve&&we!=="value"&&i(N,we,ve,Re,ce,pe)}"value"in ee&&i(N,"value",F.value,ee.value,ce)}},A=(N,F,ee,pe,ce,we,Re,ve,Se)=>{const de=F.el=N?N.el:a(""),Le=F.anchor=N?N.anchor:a("");let{patchFlag:Ee,dynamicChildren:xe,slotScopeIds:We}=F;We&&(ve=ve?ve.concat(We):We),N==null?(r(de,ee,pe),r(Le,ee,pe),S(F.children||[],ee,Le,ce,we,Re,ve,Se)):Ee>0&&Ee&64&&xe&&N.dynamicChildren?(O(N.dynamicChildren,xe,ee,ce,we,Re,ve),(F.key!=null||ce&&F===ce.subTree)&&Cb(N,F,!0)):G(N,F,ee,Le,ce,we,Re,ve,Se)},D=(N,F,ee,pe,ce,we,Re,ve,Se)=>{F.slotScopeIds=ve,N==null?F.shapeFlag&512?ce.ctx.activate(F,ee,pe,Re,Se):L(F,ee,pe,ce,we,Re,Se):W(N,F,Se)},L=(N,F,ee,pe,ce,we,Re)=>{const ve=N.component=SL(N,pe,ce);if(Rp(N)&&(ve.ctx.renderer=ge),_L(ve,!1,Re),ve.asyncDep){if(ce&&ce.registerDep(ve,z,Re),!N.el){const Se=ve.subTree=h(Xn);w(null,Se,F,ee)}}else z(ve,N,F,ee,ce,we,Re)},W=(N,F,ee)=>{const pe=F.component=N.component;if(pL(N,F,ee))if(pe.asyncDep&&!pe.asyncResolved){K(pe,F,ee);return}else pe.next=F,pe.update();else F.el=N.el,pe.vnode=F},z=(N,F,ee,pe,ce,we,Re)=>{const ve=()=>{if(N.isMounted){let{next:Ee,bu:xe,u:We,parent:pt,vnode:Ut}=N;{const Dr=jC(N);if(Dr){Ee&&(Ee.el=Ut.el,K(N,Ee,Re)),Dr.asyncDep.then(()=>{N.isUnmounted||ve()});return}}let Rt=Ee,Mr;Xo(N,!1),Ee?(Ee.el=Ut.el,K(N,Ee,Re)):Ee=Ut,xe&&zf(xe),(Mr=Ee.props&&Ee.props.onVnodeBeforeUpdate)&&Us(Mr,pt,Ee,Ut),Xo(N,!0);const Hn=Wm(N),ys=N.subTree;N.subTree=Hn,m(ys,Hn,d(ys.el),Q(ys),N,ce,we),Ee.el=Hn.el,Rt===null&&mL(N,Hn.el),We&&ar(We,ce),(Mr=Ee.props&&Ee.props.onVnodeUpdated)&&ar(()=>Us(Mr,pt,Ee,Ut),ce)}else{let Ee;const{el:xe,props:We}=F,{bm:pt,m:Ut,parent:Rt,root:Mr,type:Hn}=N,ys=Ll(F);if(Xo(N,!1),pt&&zf(pt),!ys&&(Ee=We&&We.onVnodeBeforeMount)&&Us(Ee,Rt,F),Xo(N,!0),xe&&Ne){const Dr=()=>{N.subTree=Wm(N),Ne(xe,N.subTree,N,ce,null)};ys&&Hn.__asyncHydrate?Hn.__asyncHydrate(xe,N,Dr):Dr()}else{Mr.ce&&Mr.ce._injectChildStyle(Hn);const Dr=N.subTree=Wm(N);m(null,Dr,ee,pe,N,ce,we),F.el=Dr.el}if(Ut&&ar(Ut,ce),!ys&&(Ee=We&&We.onVnodeMounted)){const Dr=F;ar(()=>Us(Ee,Rt,Dr),ce)}(F.shapeFlag&256||Rt&&Ll(Rt.vnode)&&Rt.vnode.shapeFlag&256)&&N.a&&ar(N.a,ce),N.isMounted=!0,F=ee=pe=null}};N.scope.on();const Se=N.effect=new GE(ve);N.scope.off();const de=N.update=Se.run.bind(Se),Le=N.job=Se.runIfDirty.bind(Se);Le.i=N,Le.id=N.uid,Se.scheduler=()=>yb(Le),Xo(N,!0),de()},K=(N,F,ee)=>{F.component=N;const pe=N.vnode.props;N.vnode=F,N.next=null,J$(N,F.props,pe,ee),nL(N,F.children,ee),No(),OS(N),Bo()},G=(N,F,ee,pe,ce,we,Re,ve,Se=!1)=>{const de=N&&N.children,Le=N?N.shapeFlag:0,Ee=F.children,{patchFlag:xe,shapeFlag:We}=F;if(xe>0){if(xe&128){B(de,Ee,ee,pe,ce,we,Re,ve,Se);return}else if(xe&256){H(de,Ee,ee,pe,ce,we,Re,ve,Se);return}}We&8?(Le&16&&be(de,ce,we),Ee!==de&&c(ee,Ee)):Le&16?We&16?B(de,Ee,ee,pe,ce,we,Re,ve,Se):be(de,ce,we,!0):(Le&8&&c(ee,""),We&16&&S(Ee,ee,pe,ce,we,Re,ve,Se))},H=(N,F,ee,pe,ce,we,Re,ve,Se)=>{N=N||Ml,F=F||Ml;const de=N.length,Le=F.length,Ee=Math.min(de,Le);let xe;for(xe=0;xe<Ee;xe++){const We=F[xe]=Se?io(F[xe]):ti(F[xe]);m(N[xe],We,ee,null,ce,we,Re,ve,Se)}de>Le?be(N,ce,we,!0,!1,Ee):S(F,ee,pe,ce,we,Re,ve,Se,Ee)},B=(N,F,ee,pe,ce,we,Re,ve,Se)=>{let de=0;const Le=F.length;let Ee=N.length-1,xe=Le-1;for(;de<=Ee&&de<=xe;){const We=N[de],pt=F[de]=Se?io(F[de]):ti(F[de]);if(la(We,pt))m(We,pt,ee,null,ce,we,Re,ve,Se);else break;de++}for(;de<=Ee&&de<=xe;){const We=N[Ee],pt=F[xe]=Se?io(F[xe]):ti(F[xe]);if(la(We,pt))m(We,pt,ee,null,ce,we,Re,ve,Se);else break;Ee--,xe--}if(de>Ee){if(de<=xe){const We=xe+1,pt=We<Le?F[We].el:pe;for(;de<=xe;)m(null,F[de]=Se?io(F[de]):ti(F[de]),ee,pt,ce,we,Re,ve,Se),de++}}else if(de>xe)for(;de<=Ee;)q(N[de],ce,we,!0),de++;else{const We=de,pt=de,Ut=new Map;for(de=pt;de<=xe;de++){const $r=F[de]=Se?io(F[de]):ti(F[de]);$r.key!=null&&Ut.set($r.key,de)}let Rt,Mr=0;const Hn=xe-pt+1;let ys=!1,Dr=0;const Ku=new Array(Hn);for(de=0;de<Hn;de++)Ku[de]=0;for(de=We;de<=Ee;de++){const $r=N[de];if(Mr>=Hn){q($r,ce,we,!0);continue}let Vs;if($r.key!=null)Vs=Ut.get($r.key);else for(Rt=pt;Rt<=xe;Rt++)if(Ku[Rt-pt]===0&&la($r,F[Rt])){Vs=Rt;break}Vs===void 0?q($r,ce,we,!0):(Ku[Vs-pt]=de+1,Vs>=Dr?Dr=Vs:ys=!0,m($r,F[Vs],ee,null,ce,we,Re,ve,Se),Mr++)}const CS=ys?oL(Ku):Ml;for(Rt=CS.length-1,de=Hn-1;de>=0;de--){const $r=pt+de,Vs=F[$r],TS=$r+1<Le?F[$r+1].el:pe;Ku[de]===0?m(null,Vs,ee,TS,ce,we,Re,ve,Se):ys&&(Rt<0||de!==CS[Rt]?ne(Vs,ee,TS,2):Rt--)}}},ne=(N,F,ee,pe,ce=null)=>{const{el:we,type:Re,transition:ve,children:Se,shapeFlag:de}=N;if(de&6){ne(N.component.subTree,F,ee,pe);return}if(de&128){N.suspense.move(F,ee,pe);return}if(de&64){Re.move(N,F,ee,ge);return}if(Re===Pe){r(we,F,ee);for(let Ee=0;Ee<Se.length;Ee++)ne(Se[Ee],F,ee,pe);r(N.anchor,F,ee);return}if(Re===Gm){_(N,F,ee);return}if(pe!==2&&de&1&&ve)if(pe===0)ve.beforeEnter(we),r(we,F,ee),ar(()=>ve.enter(we),ce);else{const{leave:Ee,delayLeave:xe,afterLeave:We}=ve,pt=()=>r(we,F,ee),Ut=()=>{Ee(we,()=>{pt(),We&&We()})};xe?xe(we,pt,Ut):Ut()}else r(we,F,ee)},q=(N,F,ee,pe=!1,ce=!1)=>{const{type:we,props:Re,ref:ve,children:Se,dynamicChildren:de,shapeFlag:Le,patchFlag:Ee,dirs:xe,cacheIndex:We}=N;if(Ee===-2&&(ce=!1),ve!=null&&_h(ve,null,ee,N,!0),We!=null&&(F.renderCache[We]=void 0),Le&256){F.ctx.deactivate(N);return}const pt=Le&1&&xe,Ut=!Ll(N);let Rt;if(Ut&&(Rt=Re&&Re.onVnodeBeforeUnmount)&&Us(Rt,F,N),Le&6)ie(N.component,ee,pe);else{if(Le&128){N.suspense.unmount(ee,pe);return}pt&&Yo(N,null,F,"beforeUnmount"),Le&64?N.type.remove(N,F,ee,ge,pe):de&&!de.hasOnce&&(we!==Pe||Ee>0&&Ee&64)?be(de,F,ee,!1,!0):(we===Pe&&Ee&384||!ce&&Le&16)&&be(Se,F,ee),pe&&Y(N)}(Ut&&(Rt=Re&&Re.onVnodeUnmounted)||pt)&&ar(()=>{Rt&&Us(Rt,F,N),pt&&Yo(N,null,F,"unmounted")},ee)},Y=N=>{const{type:F,el:ee,anchor:pe,transition:ce}=N;if(F===Pe){oe(ee,pe);return}if(F===Gm){T(N);return}const we=()=>{s(ee),ce&&!ce.persisted&&ce.afterLeave&&ce.afterLeave()};if(N.shapeFlag&1&&ce&&!ce.persisted){const{leave:Re,delayLeave:ve}=ce,Se=()=>Re(ee,we);ve?ve(N.el,we,Se):Se()}else we()},oe=(N,F)=>{let ee;for(;N!==F;)ee=f(N),s(N),N=ee;s(F)},ie=(N,F,ee)=>{const{bum:pe,scope:ce,job:we,subTree:Re,um:ve,m:Se,a:de}=N;HS(Se),HS(de),pe&&zf(pe),ce.stop(),we&&(we.flags|=8,q(Re,N,F,ee)),ve&&ar(ve,F),ar(()=>{N.isUnmounted=!0},F),F&&F.pendingBranch&&!F.isUnmounted&&N.asyncDep&&!N.asyncResolved&&N.suspenseId===F.pendingId&&(F.deps--,F.deps===0&&F.resolve())},be=(N,F,ee,pe=!1,ce=!1,we=0)=>{for(let Re=we;Re<N.length;Re++)q(N[Re],F,ee,pe,ce)},Q=N=>{if(N.shapeFlag&6)return Q(N.component.subTree);if(N.shapeFlag&128)return N.suspense.next();const F=f(N.anchor||N.el),ee=F&&F[vC];return ee?f(ee):F};let X=!1;const V=(N,F,ee)=>{N==null?F._vnode&&q(F._vnode,null,null,!0):m(F._vnode||null,N,F,null,null,null,ee),F._vnode=N,X||(X=!0,OS(),pC(),X=!1)},ge={p:m,um:q,m:ne,r:Y,mt:L,mc:S,pc:G,pbc:O,n:Q,o:e};let Oe,Ne;return{render:V,hydrate:Oe,createApp:X$(V,Oe)}}function qm({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 Xo({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function iL(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Cb(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]=io(s[i]),a.el=o.el),!n&&a.patchFlag!==-2&&Cb(o,a)),a.type===Sd&&(a.el=o.el)}}function oL(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 jC(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:jC(t)}function HS(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const aL=Symbol.for("v-scx"),lL=()=>Xe(aL);function On(e,t){return Tb(e,null,t)}function ke(e,t,n){return Tb(e,t,n)}function Tb(e,t,n=Lt){const{immediate:r,deep:s,flush:i,once:o}=n,a=mn({},n),l=t&&r||!t&&i!=="post";let u;if(Hc){if(i==="sync"){const p=lL();u=p.__watcherHandles||(p.__watcherHandles=[])}else if(!l){const p=()=>{};return p.stop=oi,p.resume=oi,p.pause=oi,p}}const c=Rn;a.call=(p,g,m)=>Rs(p,c,g,m);let d=!1;i==="post"?a.scheduler=p=>{ar(p,c&&c.suspense)}:i!=="sync"&&(d=!0,a.scheduler=(p,g)=>{g?p():yb(p)}),a.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const f=T$(e,t,a);return Hc&&(u?u.push(f):l&&f()),f}function uL(e,t,n){const r=this.proxy,s=rn(e)?e.includes(".")?qC(r,e):()=>r[e]:e.bind(r,r);let i;Ye(t)?i=t:(i=t.handler,n=t);const o=_d(this),a=Tb(s,i.bind(r),n);return o(),a}function qC(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 cL=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Tr(t)}Modifiers`]||e[`${Lo(t)}Modifiers`];function dL(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Lt;let s=n;const i=t.startsWith("update:"),o=i&&cL(r,t.slice(7));o&&(o.trim&&(s=n.map(c=>rn(c)?c.trim():c)),o.number&&(s=n.map(lv)));let a,l=r[a=Nm(t)]||r[a=Nm(Tr(t))];!l&&i&&(l=r[a=Nm(Lo(t))]),l&&Rs(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,Rs(u,e,6,s)}}function WC(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=WC(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||!yp(t)?!1:(t=t.slice(2).replace(/Once$/,""),Tt(e,t[0].toLowerCase()+t.slice(1))||Tt(e,Lo(t))||Tt(e,t))}function Wm(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:g,inheritAttrs:m}=e,y=Sh(e);let w,b;try{if(n.shapeFlag&4){const T=s||r,x=T;w=ti(u.call(x,T,c,d,p,f,g)),b=a}else{const T=t;w=ti(T.length>1?T(d,{attrs:a,slots:o,emit:l}):T(d,null)),b=t.props?a:fL(a)}}catch(T){kc.length=0,Pp(T,e,1),w=h(Xn)}let _=w;if(b&&m!==!1){const T=Object.keys(b),{shapeFlag:x}=_;T.length&&x&7&&(i&&T.some(db)&&(b=hL(b,i)),_=Li(_,b,!1,!0))}return n.dirs&&(_=Li(_,null,!1,!0),_.dirs=_.dirs?_.dirs.concat(n.dirs):n.dirs),n.transition&&Na(_,n.transition),w=_,Sh(y),w}const fL=e=>{let t;for(const n in e)(n==="class"||n==="style"||yp(n))&&((t||(t={}))[n]=e[n]);return t},hL=(e,t)=>{const n={};for(const r in e)(!db(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function pL(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?jS(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?jS(r,o,u):!0:!!o;return!1}function jS(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 mL({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 GC=e=>e.__isSuspense;function gL(e,t){t&&t.pendingBranch?qe(e)?t.effects.push(...e):t.effects.push(e):I$(e)}const Pe=Symbol.for("v-fgt"),Sd=Symbol.for("v-txt"),Xn=Symbol.for("v-cmt"),Gm=Symbol.for("v-stc"),kc=[];let Br=null;function $(e=!1){kc.push(Br=e?null:[])}function vL(){kc.pop(),Br=kc[kc.length-1]||null}let zc=1;function qS(e,t=!1){zc+=e,e<0&&Br&&t&&(Br.hasOnce=!0)}function KC(e){return e.dynamicChildren=zc>0?Br||Ml:null,vL(),zc>0&&Br&&Br.push(e),e}function me(e,t,n,r,s,i){return KC(M(e,t,n,r,s,i,!0))}function te(e,t,n,r,s){return KC(h(e,t,n,r,s,!0))}function eu(e){return e?e.__v_isVNode===!0:!1}function la(e,t){return e.type===t.type&&e.key===t.key}const YC=({key:e})=>e??null,jf=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?rn(e)||Je(e)||Ye(e)?{i:kn,r:e,k:t,f:!!n}:e:null);function M(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&&YC(t),ref:t&&jf(t),scopeId:gC,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:kn};return a?(Pb(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=rn(n)?8:16),zc>0&&!o&&Br&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Br.push(l),l}const h=yL;function yL(e,t=null,n=null,r=0,s=null,i=!1){if((!e||e===U$)&&(e=Xn),eu(e)){const a=Li(e,t,!0);return n&&Pb(a,n),zc>0&&!i&&Br&&(a.shapeFlag&6?Br[Br.indexOf(e)]=a:Br.push(a)),a.patchFlag=-2,a}if(TL(e)&&(e=e.__vccOpts),t){t=xh(t);let{class:a,style:l}=t;a&&!rn(a)&&(t.class=Fo(a)),Kt(l)&&(bd(l)&&!qe(l)&&(l=mn({},l)),t.style=ss(l))}const o=rn(e)?1:GC(e)?128:yC(e)?64:Kt(e)?4:Ye(e)?2:0;return M(e,t,n,r,s,o,i,!0)}function xh(e){return e?bd(e)||FC(e)?mn({},e):e:null}function Li(e,t,n=!1,r=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,u=t?he(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&YC(u),ref:t&&t.ref?n&&i?qe(i)?i.concat(jf(t)):[i,jf(t)]:jf(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&&Li(e.ssContent),ssFallback:e.ssFallback&&Li(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&Na(c,l.clone(c)),c}function k(e=" ",t=0){return h(Sd,null,e,t)}function fe(e="",t=!1){return t?($(),te(Xn,null,e)):h(Xn,null,e)}function ti(e){return e==null||typeof e=="boolean"?h(Xn):qe(e)?h(Pe,null,e.slice()):eu(e)?io(e):h(Sd,null,String(e))}function io(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Li(e)}function Pb(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),Pb(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!FC(t)?t._ctx=kn:s===3&&kn&&(kn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ye(t)?(t={default:t,_ctx:kn},n=32):(t=String(t),r&64?(n=16,t=[k(t)]):n=8);e.children=t,e.shapeFlag|=n}function he(...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=Fo([t.class,r.class]));else if(s==="style")t.style=ss([t.style,r.style]);else if(yp(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 Us(e,t,n,r=null){Rs(e,t,7,[n,r])}const bL=MC();let wL=0;function SL(e,t,n){const r=e.type,s=(t?t.appContext:e.appContext)||bL,i={uid:wL++,vnode:e,type:r,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new WE(!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:BC(r,s),emitsOptions:WC(r,s),emit:null,emitted:null,propsDefaults:Lt,inheritAttrs:r.inheritAttrs,ctx:Lt,data:Lt,props:Lt,attrs:Lt,slots:Lt,refs:Lt,setupState:Lt,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=dL.bind(null,i),e.ce&&e.ce(i),i}let Rn=null;const Dp=()=>Rn||kn;let Eh,bv;{const e=Sp(),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)}};Eh=t("__VUE_INSTANCE_SETTERS__",n=>Rn=n),bv=t("__VUE_SSR_SETTERS__",n=>Hc=n)}const _d=e=>{const t=Rn;return Eh(e),e.scope.on(),()=>{e.scope.off(),Eh(t)}},WS=()=>{Rn&&Rn.scope.off(),Eh(null)};function XC(e){return e.vnode.shapeFlag&4}let Hc=!1;function _L(e,t=!1,n=!1){t&&bv(t);const{props:r,children:s}=e.vnode,i=XC(e);Q$(e,r,i,t),tL(e,s,n);const o=i?kL(e,t):void 0;return t&&bv(!1),o}function kL(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,H$);const{setup:r}=n;if(r){No();const s=e.setupContext=r.length>1?EL(e):null,i=_d(e),o=wd(r,e,0,[e.props,s]),a=BE(o);if(Bo(),i(),(a||e.sp)&&!Ll(e)&&CC(e),a){if(o.then(WS,WS),t)return o.then(l=>{GS(e,l,t)}).catch(l=>{Pp(l,e,0)});e.asyncDep=o}else GS(e,o,t)}else QC(e,t)}function GS(e,t,n){Ye(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Kt(t)&&(e.setupState=cC(t)),QC(e,n)}let KS;function QC(e,t,n){const r=e.type;if(!e.render){if(!t&&KS&&!r.render){const s=r.template||xb(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=KS(s,u)}}e.render=r.render||oi}{const s=_d(e);No();try{j$(e)}finally{Bo(),s()}}}const xL={get(e,t){return Kn(e,"get",""),e[t]}};function EL(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,xL),slots:e.slots,emit:e.emit,expose:t}}function $p(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(cC(Tp(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in _c)return _c[n](e)},has(t,n){return n in t||n in _c}})):e.proxy}function CL(e,t=!0){return Ye(e)?e.displayName||e.name:e.name||t&&e.__name}function TL(e){return Ye(e)&&"__vccOpts"in e}const P=(e,t)=>E$(e,t,Hc);function hr(e,t,n){const r=arguments.length;return r===2?Kt(t)&&!qe(t)?eu(t)?h(e,null,[t]):h(e,t):h(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&eu(n)&&(n=[n]),h(e,t,n))}const JC="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 wv;const YS=typeof window<"u"&&window.trustedTypes;if(YS)try{wv=YS.createPolicy("vue",{createHTML:e=>e})}catch{}const ZC=wv?e=>wv.createHTML(e):e=>e,PL="http://www.w3.org/2000/svg",RL="http://www.w3.org/1998/Math/MathML",xi=typeof document<"u"?document:null,XS=xi&&xi.createElement("template"),IL={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"?xi.createElementNS(PL,e):t==="mathml"?xi.createElementNS(RL,e):n?xi.createElement(e,{is:n}):xi.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>xi.createTextNode(e),createComment:e=>xi.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>xi.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{XS.innerHTML=ZC(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=XS.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]}},Qi="transition",Xu="animation",tu=Symbol("_vtc"),eT={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},tT=mn({},_C,eT),AL=e=>(e.displayName="Transition",e.props=tT,e),Io=AL((e,{slots:t})=>hr(D$,nT(e),t)),Qo=(e,t=[])=>{qe(e)?e.forEach(n=>n(...t)):e&&e(...t)},QS=e=>e?qe(e)?e.some(t=>t.length>1):e.length>1:!1;function nT(e){const t={};for(const A in e)A in eT||(t[A]=e[A]);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,g=OL(s),m=g&&g[0],y=g&&g[1],{onBeforeEnter:w,onEnter:b,onEnterCancelled:_,onLeave:T,onLeaveCancelled:x,onBeforeAppear:C=w,onAppear:I=b,onAppearCancelled:S=_}=t,E=(A,D,L,W)=>{A._enterCancelled=W,eo(A,D?c:a),eo(A,D?u:o),L&&L()},O=(A,D)=>{A._isLeaving=!1,eo(A,d),eo(A,p),eo(A,f),D&&D()},R=A=>(D,L)=>{const W=A?I:b,z=()=>E(D,A,L);Qo(W,[D,z]),JS(()=>{eo(D,A?l:i),Ws(D,A?c:a),QS(W)||ZS(D,r,m,z)})};return mn(t,{onBeforeEnter(A){Qo(w,[A]),Ws(A,i),Ws(A,o)},onBeforeAppear(A){Qo(C,[A]),Ws(A,l),Ws(A,u)},onEnter:R(!1),onAppear:R(!0),onLeave(A,D){A._isLeaving=!0;const L=()=>O(A,D);Ws(A,d),A._enterCancelled?(Ws(A,f),Sv()):(Sv(),Ws(A,f)),JS(()=>{A._isLeaving&&(eo(A,d),Ws(A,p),QS(T)||ZS(A,r,y,L))}),Qo(T,[A,L])},onEnterCancelled(A){E(A,!1,void 0,!0),Qo(_,[A])},onAppearCancelled(A){E(A,!0,void 0,!0),Qo(S,[A])},onLeaveCancelled(A){O(A),Qo(x,[A])}})}function OL(e){if(e==null)return null;if(Kt(e))return[Km(e.enter),Km(e.leave)];{const t=Km(e);return[t,t]}}function Km(e){return GD(e)}function Ws(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[tu]||(e[tu]=new Set)).add(t)}function eo(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[tu];n&&(n.delete(t),n.size||(e[tu]=void 0))}function JS(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let ML=0;function ZS(e,t,n,r){const s=e._endId=++ML,i=()=>{s===e._endId&&r()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:a,propCount:l}=rT(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 rT(e,t){const n=window.getComputedStyle(e),r=g=>(n[g]||"").split(", "),s=r(`${Qi}Delay`),i=r(`${Qi}Duration`),o=e_(s,i),a=r(`${Xu}Delay`),l=r(`${Xu}Duration`),u=e_(a,l);let c=null,d=0,f=0;t===Qi?o>0&&(c=Qi,d=o,f=i.length):t===Xu?u>0&&(c=Xu,d=u,f=l.length):(d=Math.max(o,u),c=d>0?o>u?Qi:Xu:null,f=c?c===Qi?i.length:l.length:0);const p=c===Qi&&/\b(transform|all)(,|$)/.test(r(`${Qi}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:p}}function e_(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>t_(n)+t_(e[r])))}function t_(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Sv(){return document.body.offsetHeight}function DL(e,t,n){const r=e[tu];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Ch=Symbol("_vod"),sT=Symbol("_vsh"),Gi={beforeMount(e,{value:t},{transition:n}){e[Ch]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Qu(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),Qu(e,!0),r.enter(e)):r.leave(e,()=>{Qu(e,!1)}):Qu(e,t))},beforeUnmount(e,{value:t}){Qu(e,t)}};function Qu(e,t){e.style.display=t?e[Ch]:"none",e[sT]=!t}const $L=Symbol(""),LL=/(^|;)\s*display\s*:/;function FL(e,t,n){const r=e.style,s=rn(n);let i=!1;if(n&&!s){if(t)if(rn(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&qf(r,a,"")}else for(const o in t)n[o]==null&&qf(r,o,"");for(const o in n)o==="display"&&(i=!0),qf(r,o,n[o])}else if(s){if(t!==n){const o=r[$L];o&&(n+=";"+o),r.cssText=n,i=LL.test(n)}}else t&&e.removeAttribute("style");Ch in e&&(e[Ch]=i?r.display:"",e[sT]&&(r.display="none"))}const n_=/\s*!important$/;function qf(e,t,n){if(qe(n))n.forEach(r=>qf(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=NL(e,t);n_.test(n)?e.setProperty(Lo(r),n.replace(n_,""),"important"):e[r]=n}}const r_=["Webkit","Moz","ms"],Ym={};function NL(e,t){const n=Ym[t];if(n)return n;let r=Tr(t);if(r!=="filter"&&r in e)return Ym[t]=r;r=ci(r);for(let s=0;s<r_.length;s++){const i=r_[s]+r;if(i in e)return Ym[t]=i}return t}const s_="http://www.w3.org/1999/xlink";function i_(e,t,n,r,s,i=ZD(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(s_,t.slice(6,t.length)):e.setAttributeNS(s_,t,n):n==null||i&&!HE(n)?e.removeAttribute(t):e.setAttribute(t,i?"":qi(n)?String(n):n)}function o_(e,t,n,r,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?ZC(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=HE(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 bl(e,t,n,r){e.addEventListener(t,n,r)}function BL(e,t,n,r){e.removeEventListener(t,n,r)}const a_=Symbol("_vei");function VL(e,t,n,r,s=null){const i=e[a_]||(e[a_]={}),o=i[t];if(r&&o)o.value=r;else{const[a,l]=UL(t);if(r){const u=i[t]=jL(r,s);bl(e,a,u,l)}else o&&(BL(e,a,o,l),i[t]=void 0)}}const l_=/(?:Once|Passive|Capture)$/;function UL(e){let t;if(l_.test(e)){t={};let r;for(;r=e.match(l_);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Lo(e.slice(2)),t]}let Xm=0;const zL=Promise.resolve(),HL=()=>Xm||(zL.then(()=>Xm=0),Xm=Date.now());function jL(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Rs(qL(r,n.value),t,5,[r])};return n.value=e,n.attached=HL(),n}function qL(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 u_=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,WL=(e,t,n,r,s,i)=>{const o=s==="svg";t==="class"?DL(e,r,o):t==="style"?FL(e,n,r):yp(t)?db(t)||VL(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):GL(e,t,r,o))?(o_(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&i_(e,t,r,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!rn(r))?o_(e,Tr(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),i_(e,t,r,o))};function GL(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&u_(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 u_(t)&&rn(n)?!1:t in e}const iT=new WeakMap,oT=new WeakMap,Th=Symbol("_moveCb"),c_=Symbol("_enterCb"),KL=e=>(delete e.props.mode,e),YL=KL({name:"TransitionGroup",props:mn({},tT,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Dp(),r=SC();let s,i;return Sb(()=>{if(!s.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!ZL(s[0].el,n.vnode.el,o))return;s.forEach(XL),s.forEach(QL);const a=s.filter(JL);Sv(),a.forEach(l=>{const u=l.el,c=u.style;Ws(u,o),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[Th]=f=>{f&&f.target!==u||(!f||/transform$/.test(f.propertyName))&&(u.removeEventListener("transitionend",d),u[Th]=null,eo(u,o))};u.addEventListener("transitionend",d)})}),()=>{const o=Be(e),a=nT(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),Na(c,Uc(c,a,r,n)),iT.set(c,c.el.getBoundingClientRect()))}i=t.default?bb(t.default()):[];for(let u=0;u<i.length;u++){const c=i[u];c.key!=null&&Na(c,Uc(c,a,r,n))}return h(l,null,i)}}}),Rb=YL;function XL(e){const t=e.el;t[Th]&&t[Th](),t[c_]&&t[c_]()}function QL(e){oT.set(e,e.el.getBoundingClientRect())}function JL(e){const t=iT.get(e),n=oT.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 ZL(e,t,n){const r=e.cloneNode(),s=e[tu];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}=rT(r);return i.removeChild(r),o}const d_=e=>{const t=e.props["onUpdate:modelValue"]||!1;return qe(t)?n=>zf(t,n):t};function eF(e){e.target.composing=!0}function f_(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Qm=Symbol("_assign"),tF={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[Qm]=d_(s);const i=r||s.props&&s.props.type==="number";bl(e,t?"change":"input",o=>{if(o.target.composing)return;let a=e.value;n&&(a=a.trim()),i&&(a=lv(a)),e[Qm](a)}),n&&bl(e,"change",()=>{e.value=e.value.trim()}),t||(bl(e,"compositionstart",eF),bl(e,"compositionend",f_),bl(e,"change",f_))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:i}},o){if(e[Qm]=d_(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?lv(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))}},nF=["ctrl","shift","alt","meta"],rF={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)=>nF.some(n=>e[`${n}Key`]&&!t.includes(n))},kt=(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=rF[t[o]];if(a&&a(s,t))return}return e(s,...i)})},sF={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},_v=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=s=>{if(!("key"in s))return;const i=Lo(s.key);if(t.some(o=>o===i||sF[o]===i))return e(s)})},iF=mn({patchProp:WL},IL);let h_;function aT(){return h_||(h_=rL(iF))}const lT=(...e)=>{aT().render(...e)},oF=(...e)=>{const t=aT().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=lF(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,aF(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t};function aF(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function lF(e){return rn(e)?document.querySelector(e):e}/*!
18
+ * pinia v3.0.2
19
+ * (c) 2025 Eduardo San Martin Morote
20
+ * @license MIT
21
+ */let uT;const Lp=e=>uT=e,cT=Symbol();function kv(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var xc;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(xc||(xc={}));function uF(){const e=La(!0),t=e.run(()=>U({}));let n=[],r=[];const s=Tp({install(i){Lp(s),s._a=i,i.provide(cT,s),i.config.globalProperties.$pinia=s,r.forEach(o=>n.push(o)),r=[]},use(i){return this._a?n.push(i):r.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return s}const dT=()=>{};function p_(e,t,n,r=dT){e.push(t);const s=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),r())};return!n&&_p()&&gn(s),s}function al(e,...t){e.slice().forEach(n=>{n(...t)})}const cF=e=>e(),m_=Symbol(),Jm=Symbol();function xv(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];kv(s)&&kv(r)&&e.hasOwnProperty(n)&&!Je(r)&&!_o(r)?e[n]=xv(s,r):e[n]=r}return e}const dF=Symbol();function fF(e){return!kv(e)||!Object.prototype.hasOwnProperty.call(e,dF)}const{assign:to}=Object;function hF(e){return!!(Je(e)&&e.effect)}function pF(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=Vo(n.state.value[e]);return to(c,i,Object.keys(o||{}).reduce((d,f)=>(d[f]=Tp(P(()=>{Lp(n);const p=n._s.get(e);return o[f].call(p,p)})),d),{}))}return l=fT(e,u,t,n,r,!0),l}function fT(e,t,n={},r,s,i){let o;const a=to({actions:{}},n),l={deep:!0};let u,c,d=[],f=[],p;const g=r.state.value[e];!i&&!g&&(r.state.value[e]={}),U({});let m;function y(S){let E;u=c=!1,typeof S=="function"?(S(r.state.value[e]),E={type:xc.patchFunction,storeId:e,events:p}):(xv(r.state.value[e],S),E={type:xc.patchObject,payload:S,storeId:e,events:p});const O=m=Symbol();Mt().then(()=>{m===O&&(u=!0)}),c=!0,al(d,E,r.state.value[e])}const w=i?function(){const{state:E}=n,O=E?E():{};this.$patch(R=>{to(R,O)})}:dT;function b(){o.stop(),d=[],f=[],r._s.delete(e)}const _=(S,E="")=>{if(m_ in S)return S[Jm]=E,S;const O=function(){Lp(r);const R=Array.from(arguments),A=[],D=[];function L(K){A.push(K)}function W(K){D.push(K)}al(f,{args:R,name:O[Jm],store:x,after:L,onError:W});let z;try{z=S.apply(this&&this.$id===e?this:x,R)}catch(K){throw al(D,K),K}return z instanceof Promise?z.then(K=>(al(A,K),K)).catch(K=>(al(D,K),Promise.reject(K))):(al(A,z),z)};return O[m_]=!0,O[Jm]=E,O},T={_p:r,$id:e,$onAction:p_.bind(null,f),$patch:y,$reset:w,$subscribe(S,E={}){const O=p_(d,S,E.detached,()=>R()),R=o.run(()=>ke(()=>r.state.value[e],A=>{(E.flush==="sync"?c:u)&&S({storeId:e,type:xc.direct,events:p},A)},to({},l,E)));return O},$dispose:b},x=vn(T);r._s.set(e,x);const I=(r._a&&r._a.runWithContext||cF)(()=>r._e.run(()=>(o=La()).run(()=>t({action:_}))));for(const S in I){const E=I[S];if(Je(E)&&!hF(E)||_o(E))i||(g&&fF(E)&&(Je(E)?E.value=g[S]:xv(E,g[S])),r.state.value[e][S]=E);else if(typeof E=="function"){const O=_(E,S);I[S]=O,a.actions[S]=E}}return to(x,I),to(Be(x),I),Object.defineProperty(x,"$state",{get:()=>r.state.value[e],set:S=>{y(E=>{to(E,S)})}}),r._p.forEach(S=>{to(x,o.run(()=>S({store:x,app:r._a,pinia:r,options:a})))}),g&&i&&n.hydrate&&n.hydrate(x.$state,g),u=!0,c=!0,x}/*! #__NO_SIDE_EFFECTS__ */function ps(e,t,n){let r;const s=typeof t=="function";r=s?n:t;function i(o,a){const l=DC();return o=o||(l?Xe(cT,null):null),o&&Lp(o),o=uT,o._s.has(e)||(s?fT(e,t,r,o):pF(e,r,o)),o._s.get(e)}return i.$id=e,i}const hT=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 Ev(e){return _p()?(gn(e),!0):!1}const Cv=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const mF=Object.prototype.toString,gF=e=>mF.call(e)==="[object Object]";function Zm(e){return Array.isArray(e)?e:[e]}function vF(e,t=1e3,n={}){const{immediate:r=!0,immediateCallback:s=!1}=n;let i=null;const o=Ie(!1);function a(){i&&(clearInterval(i),i=null)}function l(){o.value=!1,a()}function u(){const c=ko(t);c<=0||(o.value=!0,s&&e(),a(),o.value&&(i=setInterval(e,c)))}if(r&&Cv&&u(),Je(t)||typeof t=="function"){const c=ke(t,()=>{o.value&&Cv&&u()});Ev(c)}return Ev(l),{isActive:b$(o),pause:l,resume:u}}function yF(e,t,n){return ke(e,t,{...n,immediate:!0})}const pT=Cv?window:void 0;function bF(e){var t;const n=ko(e);return(t=n==null?void 0:n.$el)!=null?t:n}function wF(...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=P(()=>{const a=Zm(ko(e[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),i=yF(()=>{var a,l;return[(l=(a=s.value)==null?void 0:a.map(u=>bF(u)))!=null?l:[pT].filter(u=>u!=null),Zm(ko(s.value?e[1]:e[0])),Zm(Z(s.value?e[2]:e[1])),ko(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=gF(c)?{...c}:c;t.push(...a.flatMap(f=>l.flatMap(p=>u.map(g=>r(f,p,g,d)))))},{flush:"post"}),o=()=>{i(),n()};return Ev(n),o}function SF(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function _F(...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=pT,eventName:i="keydown",passive:o=!1,dedupe:a=!1}=r,l=SF(t);return wF(s,i,c=>{c.repeat&&ko(a)||l(c)&&n(c)},o)}const Ju=new Map;function Fr(e){const t=_p();function n(a){var l;const u=Ju.get(e)||new Set;u.add(a),Ju.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=Ju.get(e);l&&(l.delete(a),l.size||i())}function i(){Ju.delete(e)}function o(a,l){var u;(u=Ju.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=hT();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=>{On(()=>{t.isDialogOpened(e)||s(t.getOutput(e))})}))}}const Et=typeof window<"u",Ib=Et&&"IntersectionObserver"in window,kF=Et&&("ontouchstart"in window||window.navigator.maxTouchPoints>0);function g_(e,t,n){xF(e,t),t.set(e,n)}function xF(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function EF(e,t,n){return e.set(mT(e,t),n),n}function Jo(e,t){return e.get(mT(e,t))}function mT(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 gT(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 Ps(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=>Ps(e[r],t[r]))}function Ba(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(/^\./,""),gT(e,t.split("."),n))}function Fn(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 Ba(e,t,n);if(Array.isArray(t))return gT(e,t,n);if(typeof t!="function")return n;const r=t(e,n);return typeof r>"u"?n:r}function kl(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Array.from({length:e},(n,r)=>t+r)}function Fe(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 vT(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function v_(e){let t;return e!==null&&typeof e=="object"&&((t=Object.getPrototypeOf(e))===Object.prototype||t===null)}function Ab(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 y_=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}),b_=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 yT(e){return Object.keys(e)}function eg(e,t){return t.every(n=>e.hasOwnProperty(n))}function kd(e,t){const n={};for(const r of t)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function Tv(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 Os(e,t){const n={...e};return t.forEach(r=>delete n[r]),n}const bT=/^on[^a-z]/,Ob=e=>bT.test(e),CF=["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 Qa(e){const[t,n]=Tv(e,[bT]),r=Os(t,CF),[s,i]=Tv(n,["class","style","id",/^data-/]);return Object.assign(s,t),Object.assign(i,r),[s,i]}function An(e){return e==null?[]:Array.isArray(e)?e:[e]}function TF(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 Er(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 w_(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 S_(e,t){return(arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0").repeat(Math.max(0,t-e.length))+e}function PF(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){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(v_(i)&&v_(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 wT(e){return e.map(t=>t.type===Pe?wT(t.children):t).flat()}function Ca(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(Ca.cache.has(e))return Ca.cache.get(e);const t=e.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return Ca.cache.set(e,t),t}Ca.cache=new Map;function xl(e,t){if(!t||typeof t!="object")return[];if(Array.isArray(t))return t.map(n=>xl(e,n)).flat(1);if(t.suspense)return xl(e,t.ssContent);if(Array.isArray(t.children))return t.children.map(n=>xl(e,n)).flat(1);if(t.component){if(Object.getOwnPropertySymbols(t.component.provides).includes(e))return[t.component];if(t.component.subTree)return xl(e,t.component.subTree).flat(1)}return[]}var Zd=new WeakMap,ll=new WeakMap;class RF{constructor(t){g_(this,Zd,[]),g_(this,ll,0),this.size=t}push(t){Jo(Zd,this)[Jo(ll,this)]=t,EF(ll,this,(Jo(ll,this)+1)%this.size)}values(){return Jo(Zd,this).slice(Jo(ll,this)).concat(Jo(Zd,this).slice(0,Jo(ll,this)))}}function Mb(e){const t=vn({}),n=P(e);return On(()=>{for(const r in n.value)t[r]=n.value[r]},{flush:"sync"}),Vo(t)}function Ph(e,t){return e.includes(t)}function ST(e){return e[2].toLowerCase()+e.slice(3)}const Nn=()=>[Function,Array];function k_(e,t){return t="on"+ci(t),!!(e[t]||e[`${t}Once`]||e[`${t}Capture`]||e[`${t}OnceCapture`]||e[`${t}CaptureOnce`])}function Fp(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 jc(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 _T(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 Ec(e,t){var r,s,i,o;const n=jc(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=_T(n,t);a?a.focus():Ec(e,t==="next"?"first":"last")}}function ef(e){return e==null||typeof e=="string"&&e.trim()===""}function Rh(e,t){if(!(Et&&typeof CSS<"u"&&typeof CSS.supports<"u"&&CSS.supports(`selector(${t})`)))return null;try{return!!e&&e.matches(t)}catch{return null}}function kT(e){return e.some(t=>eu(t)?t.type===Xn?!1:t.type!==Pe||kT(t.children):!0)?e:null}function IF(e,t){if(!Et||e===0)return t(),()=>{};const n=window.setTimeout(t,e);return()=>window.clearTimeout(n)}function AF(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 Pv(){const e=Ie(),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:()=>Ab(e.value)}),t}function x_(e){const t=e.key.length===1,n=!e.ctrlKey&&!e.metaKey&&!e.altKey;return t&&n}function xT(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="bigint"}const ET=["top","bottom"],OF=["start","end","left","right"];function Rv(e,t){let[n,r]=e.split(" ");return r||(r=Ph(ET,n)?"start":Ph(OF,n)?"top":"center"),{side:Iv(n,t),align:Iv(r,t)}}function Iv(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function tg(e){return{side:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.side],align:e.align}}function ng(e){return{side:e.side,align:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.align]}}function E_(e){return{side:e.align,align:e.side}}function C_(e){return Ph(ET,e.side)?"y":"x"}class Ta{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 T_(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 CT(e){return Array.isArray(e)?new Ta({x:e[0],y:e[1],width:0,height:0}):e.getBoundingClientRect()}function Db(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 Ta(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 Ta({x:c,y:d,width:f,height:p})}else return new Ta(t)}function El(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 Wf=new WeakMap;function MF(e,t){Object.keys(t).forEach(n=>{if(Ob(n)){const r=ST(n),s=Wf.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]]),Wf.has(e)||Wf.set(e,i)}}else t[n]==null?e.removeAttribute(n):e.setAttribute(n,t[n])})}function DF(e,t){Object.keys(t).forEach(n=>{if(Ob(n)){const r=ST(n),s=Wf.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 ul=2.4,P_=.2126729,R_=.7151522,I_=.072175,$F=.55,LF=.58,FF=.57,NF=.62,tf=.03,A_=1.45,BF=5e-4,VF=1.25,UF=1.25,O_=.078,M_=12.82051282051282,nf=.06,D_=.001;function $_(e,t){const n=(e.r/255)**ul,r=(e.g/255)**ul,s=(e.b/255)**ul,i=(t.r/255)**ul,o=(t.g/255)**ul,a=(t.b/255)**ul;let l=n*P_+r*R_+s*I_,u=i*P_+o*R_+a*I_;if(l<=tf&&(l+=(tf-l)**A_),u<=tf&&(u+=(tf-u)**A_),Math.abs(u-l)<BF)return 0;let c;if(u>l){const d=(u**$F-l**LF)*VF;c=d<D_?0:d<O_?d-d*M_*nf:d-nf}else{const d=(u**NF-l**FF)*UF;c=d>-D_?0:d>-O_?d-d*M_*nf:d+nf}return c*100}function zF(e,t){t=Array.isArray(t)?t.slice(0,-1).map(n=>`'${n}'`).join(", ")+` or '${t.at(-1)}'`:`'${t}'`}const Ih=.20689655172413793,HF=e=>e>Ih**3?Math.cbrt(e):e/(3*Ih**2)+4/29,jF=e=>e>Ih?e**3:3*Ih**2*(e-4/29);function TT(e){const t=HF,n=t(e[1]);return[116*n-16,500*(t(e[0]/.95047)-n),200*(n-t(e[2]/1.08883))]}function PT(e){const t=jF,n=(e[0]+16)/116;return[t(n+e[1]/500)*.95047,t(n),t(n-e[2]/200)*1.08883]}const qF=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]],WF=e=>e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055,GF=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],KF=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4;function RT(e){const t=Array(3),n=WF,r=qF;for(let s=0;s<3;++s)t[s]=Math.round(Er(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 $b(e){let{r:t,g:n,b:r}=e;const s=[0,0,0],i=KF,o=GF;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 Av(e){return!!e&&/^(#|var\(--|(rgb|hsl)a?\()/.test(e)}function YF(e){return Av(e)&&!/^((rgb|hsl)a?\()?var\(--/.test(e)}const L_=/^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/,XF={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)=>F_({h:e,s:t,l:n,a:r}),hsla:(e,t,n,r)=>F_({h:e,s:t,l:n,a:r}),hsv:(e,t,n,r)=>qc({h:e,s:t,v:n,a:r}),hsva:(e,t,n,r)=>qc({h:e,s:t,v:n,a:r})};function ri(e){if(typeof e=="number")return{r:(e&16711680)>>16,g:(e&65280)>>8,b:e&255};if(typeof e=="string"&&L_.test(e)){const{groups:t}=e.match(L_),{fn:n,values:r}=t,s=r.split(/,\s*|\s*\/\s*|\s+/).map((i,o)=>i.endsWith("%")||o>0&&o<3&&["hsl","hsla","hsv","hsva"].includes(n)?parseFloat(i)/100:parseFloat(i));return XF[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),JF(t)}else if(typeof e=="object"){if(eg(e,["r","g","b"]))return e;if(eg(e,["h","s","l"]))return qc(IT(e));if(eg(e,["h","s","v"]))return qc(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 qc(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 F_(e){return qc(IT(e))}function IT(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 rf(e){const t=Math.round(e).toString(16);return("00".substr(0,2-t.length)+t).toUpperCase()}function QF(e){let{r:t,g:n,b:r,a:s}=e;return`#${[rf(t),rf(n),rf(r),s!==void 0?rf(Math.round(s*255)):""].join("")}`}function JF(e){e=ZF(e);let[t,n,r,s]=PF(e,2).map(i=>parseInt(i,16));return s=s===void 0?s:s/255,{r:t,g:n,b:r,a:s}}function ZF(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=w_(w_(e,6),8,"F")),e}function eN(e,t){const n=TT($b(e));return n[0]=n[0]+t*10,RT(PT(n))}function tN(e,t){const n=TT($b(e));return n[0]=n[0]-t*10,RT(PT(n))}function nN(e){const t=ri(e);return $b(t)[1]}function AT(e){const t=Math.abs($_(ri(0),ri(e)));return Math.abs($_(ri(16777215),ri(e)))>Math.min(t,50)?"#fff":"#000"}function ue(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 Ue=ue({class:[String,Array,Object],style:{type:[String,Array,Object],default:null}},"component");function an(e,t){const n=Dp();if(!n)throw new Error(`[Vuetify] ${e} must be called from inside a setup function`);return n}function di(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"composables";const t=an(e).type;return Ca((t==null?void 0:t.aliasName)||(t==null?void 0:t.name))}function rN(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:an("injectSelf");const{provides:n}=t;if(n&&e in n)return n[e]}const nu=Symbol.for("vuetify:defaults");function sN(e){return U(e)}function Lb(){const e=Xe(nu);if(!e)throw new Error("[Vuetify] Could not find defaults instance");return e}function Pr(e,t){const n=Lb(),r=U(e),s=P(()=>{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(nu,s),s}function iN(e,t){var n,r;return typeof((n=e.props)==null?void 0:n[t])<"u"||typeof((r=e.props)==null?void 0:r[Ca(t)])<"u"}function oN(){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]:Lb();const r=an("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const s=P(()=>{var l;return(l=n.value)==null?void 0:l[e._as??t]}),i=new Proxy(e,{get(l,u){var d,f,p,g,m,y,w;const c=Reflect.get(l,u);return u==="class"||u==="style"?[(d=s.value)==null?void 0:d[u],c].filter(b=>b!=null):typeof u=="string"&&!iN(r.vnode,u)?((f=s.value)==null?void 0:f[u])!==void 0?(p=s.value)==null?void 0:p[u]:((m=(g=n.value)==null?void 0:g.global)==null?void 0:m[u])!==void 0?(w=(y=n.value)==null?void 0:y.global)==null?void 0:w[u]:c:c}}),o=Ie();On(()=>{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=rN(nu,r);Gt(nu,P(()=>o.value?Jn((l==null?void 0:l.value)??{},o.value):l==null?void 0:l.value))}return{props:i,provideSubDefaults:a}}function _u(e){if(e._setup=e._setup??e.setup,!e.name)return e;if(e._setup){e.props=ue(e.props??{},e.name)();const t=Object.keys(e.props).filter(n=>n!=="class"&&n!=="style");e.filterProps=function(r){return kd(r,t)},e.props._as=String,e.setup=function(r,s){const i=Lb();if(!i.value)return e._setup(r,s);const{props:o,provideSubDefaults:a}=oN(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?_u:$e)(t)}function aN(e,t){return t.props=e,t}function ku(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??ci(Tr(e.replace(/__/g,"-"))),props:{tag:{type:String,default:t},...Ue()},setup(r,s){let{slots:i}=s;return()=>{var o;return hr(r.tag,{class:[e,r.class],style:r.style},(o=i.default)==null?void 0:o.call(i))}}})}function OT(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 Ah="cubic-bezier(0.4, 0, 0.2, 1)",lN="cubic-bezier(0.0, 0, 0.2, 1)",uN="cubic-bezier(0.4, 0, 1, 1)";function N_(e,t,n){return Object.keys(e).filter(r=>Ob(r)&&r.endsWith(t)).reduce((r,s)=>(r[s.slice(0,-t.length)]=i=>e[s](i,n(i)),r),{})}function MT(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(;e;){if(t?cN(e):Fb(e))return e;e=e.parentElement}return document.scrollingElement}function Oh(e,t){const n=[];if(t&&e&&!t.contains(e))return n;for(;e&&(Fb(e)&&n.push(e),e!==t);)e=e.parentElement;return n}function Fb(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 cN(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return["scroll","auto"].includes(t.overflowY)}function dN(e){for(;e;){if(window.getComputedStyle(e).position==="fixed")return!0;e=e.offsetParent}return!1}function Ae(e){const t=an("useRender");t.render=e}const ms=ue({border:[Boolean,Number,String]},"border");function Ms(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:di();return{borderClasses:P(()=>{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 fN=[null,"default","comfortable","compact"],Rr=ue({density:{type:String,default:"default",validator:e=>fN.includes(e)}},"density");function gs(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:di();return{densityClasses:P(()=>`${t}--density-${e.density}`)}}const vs=ue({elevation:{type:[Number,String],validator(e){const t=parseInt(e);return!isNaN(t)&&t>=0&&t<=24}}},"elevation");function Ds(e){return{elevationClasses:P(()=>{const n=Je(e)?e.value:e.elevation,r=[];return n==null||r.push(`elevation-${n}`),r})}}const Dn=ue({rounded:{type:[Boolean,Number,String],default:void 0},tile:Boolean},"rounded");function Un(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:di();return{roundedClasses:P(()=>{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=ue({tag:{type:[String,Object,Function],default:"div"}},"tag"),Wc=Symbol.for("vuetify:theme"),$t=ue({theme:String},"theme");function B_(){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"}}},stylesheetId:"vuetify-theme-stylesheet"}}function hN(){var r,s;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:B_();const t=B_();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 Zo(e,t,n,r){e.push(`${vN(t,r)} {
23
+ `,...n.map(s=>` ${s};
24
+ `),`}
25
+ `)}function V_(e){const t=e.dark?2:1,n=e.dark?1:2,r=[];for(const[s,i]of Object.entries(e.colors)){const o=ri(i);r.push(`--v-theme-${s}: ${o.r},${o.g},${o.b}`),s.startsWith("on-")||r.push(`--v-theme-${s}-overlay-multiplier: ${nN(i)>.18?t:n}`)}for(const[s,i]of Object.entries(e.variables)){const o=typeof i=="string"&&i.startsWith("#")?ri(i):void 0,a=o?`${o.r}, ${o.g}, ${o.b}`:void 0;r.push(`--v-${s}: ${a??i}`)}return r}function pN(e,t,n){const r={};if(n)for(const s of["lighten","darken"]){const i=s==="lighten"?eN:tN;for(const o of kl(n[s],1))r[`${e}-${s}-${o}`]=QF(i(ri(t),o))}return r}function mN(e,t){if(!t)return{};let n={};for(const r of t.colors){const s=e[r];s&&(n={...n,...pN(r,s,t)})}return n}function gN(e){const t={};for(const n of Object.keys(e)){if(n.startsWith("on-")||e[`on-${n}`])continue;const r=`on-${n}`,s=ri(e[n]);t[r]=AT(s)}return t}function vN(e,t){if(!t)return e;const n=`:where(${t})`;return e===":root"?n:`${n} ${e}`}function yN(e,t){e&&(e.innerHTML=t)}function bN(e,t){if(!Et)return null;let n=document.getElementById(e);return n||(n=document.createElement("style"),n.id=e,n.type="text/css",t&&n.setAttribute("nonce",t),document.head.appendChild(n)),n}function wN(e){const t=hN(e),n=Ie(t.defaultTheme),r=U(t.themes),s=P(()=>{const u={};for(const[c,d]of Object.entries(r.value)){const f={...d.colors,...mN(d.colors,t.variations)};u[c]={...d,colors:{...f,...gN(f)}}}return u}),i=P(()=>s.value[n.value]),o=P(()=>{var p;const u=[];(p=i.value)!=null&&p.dark&&Zo(u,":root",["color-scheme: dark"],t.scope),Zo(u,":root",V_(i.value),t.scope);for(const[g,m]of Object.entries(s.value))Zo(u,`.v-theme--${g}`,[`color-scheme: ${m.dark?"dark":"normal"}`,...V_(m)],t.scope);const c=[],d=[],f=new Set(Object.values(s.value).flatMap(g=>Object.keys(g.colors)));for(const g of f)g.startsWith("on-")?Zo(d,`.${g}`,[`color: rgb(var(--v-theme-${g})) !important`],t.scope):(Zo(c,`.bg-${g}`,[`--v-theme-overlay-multiplier: var(--v-theme-${g}-overlay-multiplier)`,`background-color: rgb(var(--v-theme-${g})) !important`,`color: rgb(var(--v-theme-on-${g})) !important`],t.scope),Zo(d,`.text-${g}`,[`color: rgb(var(--v-theme-${g})) !important`],t.scope),Zo(d,`.border-${g}`,[`--v-border-color: var(--v-theme-${g})`],t.scope));return u.push(...c,...d),u.map((g,m)=>m===0?g:` ${g}`).join("")});function a(u){if(t.isDisabled)return;const c=u._context.provides.usehead;if(c){let p=function(){return{style:[{textContent:o.value,id:t.stylesheetId,nonce:t.cspNonce||!1}]}};var d=p;if(c.push){const g=c.push(p);Et&&ke(o,()=>{g.patch(p)})}else Et?(c.addHeadObjs(P(p)),On(()=>c.updateDOM())):c.addHeadObjs(p())}else{let p=function(){yN(bN(t.stylesheetId,t.cspNonce),o.value)};var f=p;Et?ke(o,p,{immediate:!0}):p()}}const l=P(()=>t.isDisabled?void 0:`v-theme--${n.value}`);return{install:a,isDisabled:t.isDisabled,name:n,themes:r,current:i,computedThemes:s,themeClasses:l,styles:o,global:{name:n,current:i}}}function Zt(e){an("provideTheme");const t=Xe(Wc,null);if(!t)throw new Error("Could not find Vuetify theme injection");const n=P(()=>e.theme??t.name.value),r=P(()=>t.themes.value[n.value]),s=P(()=>t.isDisabled?void 0:`v-theme--${n.value}`),i={...t,name:n,current:r,themeClasses:s};return Gt(Wc,i),i}function DT(){an("useTheme");const e=Xe(Wc,null);if(!e)throw new Error("Could not find Vuetify theme injection");return e}function Nb(e){return Mb(()=>{const t=[],n={};if(e.value.background)if(Av(e.value.background)){if(n.backgroundColor=e.value.background,!e.value.text&&YF(e.value.background)){const r=ri(e.value.background);if(r.a==null||r.a===1){const s=AT(r);n.color=s,n.caretColor=s}}}else t.push(`bg-${e.value.background}`);return e.value.text&&(Av(e.value.text)?(n.color=e.value.text,n.caretColor=e.value.text):t.push(`text-${e.value.text}`)),{colorClasses:t,colorStyles:n}})}function Is(e,t){const n=P(()=>({text:Je(e)?e.value:t?e[t]:null})),{colorClasses:r,colorStyles:s}=Nb(n);return{textColorClasses:r,textColorStyles:s}}function dr(e,t){const n=P(()=>({background:Je(e)?e.value:t?e[t]:null})),{colorClasses:r,colorStyles:s}=Nb(n);return{backgroundColorClasses:r,backgroundColorStyles:s}}const SN=["elevated","flat","tonal","outlined","text","plain"];function Uo(e,t){return h(Pe,null,[e&&h("span",{key:"overlay",class:`${t}__overlay`},null),h("span",{key:"underlay",class:`${t}__underlay`},null)])}const $s=ue({color:String,variant:{type:String,default:"elevated",validator:e=>SN.includes(e)}},"variant");function Ja(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:di();const n=P(()=>{const{variant:i}=Z(e);return`${t}--variant-${i}`}),{colorClasses:r,colorStyles:s}=Nb(P(()=>{const{variant:i,color:o}=Z(e);return{[["elevated","flat"].includes(i)?"background":"text"]:o}}));return{colorClasses:r,colorStyles:s,variantClasses:n}}const $T=ue({baseColor:String,divided:Boolean,...ms(),...Ue(),...Rr(),...vs(),...Dn(),...vt(),...$t(),...$s()},"VBtnGroup"),U_=_e()({name:"VBtnGroup",props:$T(),setup(e,t){let{slots:n}=t;const{themeClasses:r}=Zt(e),{densityClasses:s}=gs(e),{borderClasses:i}=Ms(e),{elevationClasses:o}=Ds(e),{roundedClasses:a}=Un(e);Pr({VBtn:{height:"auto",baseColor:Te(e,"baseColor"),color:Te(e,"color"),density:Te(e,"density"),flat:!0,variant:Te(e,"variant")}}),Ae(()=>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 Ur(e,t){let n;function r(){n=La(),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}),gn(()=>{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=an("useProxiedModel"),o=U(e[t]!==void 0?e[t]:n),a=Ca(t),u=P(a!==t?()=>{var d,f,p,g;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}`)||(g=i.vnode.props)!=null&&g.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}`)))});Ur(()=>!u.value,()=>{ke(()=>e[t],d=>{o.value=d})});const c=P({get(){const d=e[t];return r(u.value?d:o.value)},set(d){const f=s(d),p=Be(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 xd=ue({modelValue:{type:null,default:void 0},multiple:Boolean,mandatory:[Boolean,String],max:Number,selectedClass:String,disabled:Boolean},"group"),Ed=ue({value:null,disabled:Boolean,selectedClass:String},"group-item");function Cd(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const r=an("useGroupItem");if(!r)throw new Error("[Vuetify] useGroupItem composable must be used inside a component setup function");const s=hs();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=Te(e,"value"),a=P(()=>!!(i.disabled.value||e.disabled));i.register({id:s,value:o,disabled:a},r),En(()=>{i.unregister(s)});const l=P(()=>i.isSelected(s)),u=P(()=>i.items.value[0].id===s),c=P(()=>i.items.value[i.items.value.length-1].id===s),d=P(()=>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 xu(e,t){let n=!1;const r=vn([]),s=st(e,"modelValue",[],f=>f==null?[]:LT(r,An(f)),f=>{const p=kN(r,f);return e.multiple?p:p[0]}),i=an("useGroup");function o(f,p){const g=f,m=Symbol.for(`${t.description}:id`),w=xl(m,i==null?void 0:i.vnode).indexOf(p);Z(g.value)==null&&(g.value=w,g.useIndexAsValue=!0),w>-1?r.splice(w,0,g):r.push(g)}function a(f){if(n)return;l();const p=r.findIndex(g=>g.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])}_t(()=>{l()}),En(()=>{n=!0}),Sb(()=>{for(let f=0;f<r.length;f++)r[f].useIndexAsValue&&(r[f].value=f)});function u(f,p){const g=r.find(m=>m.id===f);if(!(p&&(g!=null&&g.disabled)))if(e.multiple){const m=s.value.slice(),y=m.findIndex(b=>b===f),w=~y;if(p=p??!w,w&&e.mandatory&&m.length<=1||!w&&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],g=r.findIndex(w=>w.id===p);let m=(g+f)%r.length,y=r[m];for(;y.disabled&&m!==g;)m=(m+f)%r.length,y=r[m];if(y.disabled)return;s.value=[r[m].id]}else{const p=r.find(g=>!g.disabled);p&&(s.value=[p.id])}}const d={register:o,unregister:a,selected:s,select:u,disabled:Te(e,"disabled"),prev:()=>c(r.length-1),next:()=>c(1),isSelected:f=>s.value.includes(f),selectedClass:P(()=>e.selectedClass),items:P(()=>r),getItemIndex:f=>_N(r,f)};return Gt(t,d),d}function _N(e,t){const n=LT(e,[t]);return n.length?e.findIndex(r=>r.id===n[0]):-1}function LT(e,t){const n=[];return t.forEach(r=>{const s=e.find(o=>Ps(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 kN(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 FT=Symbol.for("vuetify:v-btn-toggle"),xN=ue({...$T(),...xd()},"VBtnToggle"),NT=_e()({name:"VBtnToggle",props:xN(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{isSelected:r,next:s,prev:i,select:o,selected:a}=xu(e,FT);return Ae(()=>{const l=U_.filterProps(e);return h(U_,he({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}}}),EN=ue({defaults:Object,disabled:Boolean,reset:[Number,String],root:[Boolean,String],scoped:Boolean},"VDefaultsProvider"),Ot=_e(!1)({name:"VDefaultsProvider",props:EN(),setup(e,t){let{slots:n}=t;const{defaults:r,disabled:s,reset:i,root:o,scoped:a}=Vo(e);return Pr(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"},TN={component:e=>hr(VT,{...e,class:"mdi"})},He=[String,Function,Object,Array],Ov=Symbol.for("vuetify:icons"),Np=ue({icon:{type:He},tag:{type:[String,Object,Function],required:!0}},"icon"),z_=_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)]}})}}}),BT=_u({name:"VSvgIcon",inheritAttrs:!1,props:Np(),setup(e,t){let{attrs:n}=t;return()=>h(e.tag,he(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)])]})}}),PN=_u({name:"VLigatureIcon",props:Np(),setup(e){return()=>h(e.tag,null,{default:()=>[e.icon]})}}),VT=_u({name:"VClassIcon",props:Np(),setup(e){return()=>h(e.tag,{class:e.icon},null)}});function RN(){return{svg:{component:BT},class:{component:VT}}}function IN(e){const t=RN(),n=(e==null?void 0:e.defaultSet)??"mdi";return n==="mdi"&&!t.mdi&&(t.mdi=TN),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 AN=e=>{const t=Xe(Ov);if(!t)throw new Error("Missing Vuetify Icons provide!");return{iconData:P(()=>{var l;const r=Z(e);if(!r)return{component:z_};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:BT,icon:s};if(typeof s!="string")return{component:z_,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}})}},ON=["x-small","small","default","large","x-large"],Eu=ue({size:{type:[String,Number],default:"default"}},"size");function Td(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:di();return Mb(()=>{let n,r;return Ph(ON,e.size)?n=`${t}--size-${e.size}`:e.size&&(r={width:Fe(e.size),height:Fe(e.size)}),{sizeClasses:n,sizeStyles:r}})}const MN=ue({color:String,disabled:Boolean,start:Boolean,end:Boolean,icon:He,opacity:[String,Number],...Ue(),...Eu(),...vt({tag:"i"}),...$t()},"VIcon"),J=_e()({name:"VIcon",props:MN(),setup(e,t){let{attrs:n,slots:r}=t;const s=U(),{themeClasses:i}=DT(),{iconData:o}=AN(P(()=>s.value||e.icon)),{sizeClasses:a}=Td(e),{textColorClasses:l,textColorStyles:u}=Is(Te(e,"color"));return Ae(()=>{var f,p;const c=(f=r.default)==null?void 0:f.call(r);c&&(s.value=(p=wT(c).filter(g=>g.type===Sd&&g.children&&typeof g.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:[{"--v-icon-opacity":e.opacity},a.value?void 0:{fontSize:Fe(e.size),height:Fe(e.size),width:Fe(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 UT(e,t){const n=U(),r=Ie(!1);if(Ib){const s=new IntersectionObserver(i=>{r.value=!!i.find(o=>o.isIntersecting)},t);En(()=>{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 Va(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"content";const n=Pv(),r=U();if(Et){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())});En(()=>{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:wu(r)}}const DN=ue({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},...Ue(),...Eu(),...vt({tag:"div"}),...$t()},"VProgressCircular"),ni=_e()({name:"VProgressCircular",props:DN(),setup(e,t){let{slots:n}=t;const r=20,s=2*Math.PI*r,i=U(),{themeClasses:o}=Zt(e),{sizeClasses:a,sizeStyles:l}=Td(e),{textColorClasses:u,textColorStyles:c}=Is(Te(e,"color")),{textColorClasses:d,textColorStyles:f}=Is(Te(e,"bgColor")),{intersectionRef:p,isIntersecting:g}=UT(),{resizeRef:m,contentRect:y}=Va(),w=P(()=>Math.max(0,Math.min(100,parseFloat(e.modelValue)))),b=P(()=>Number(e.width)),_=P(()=>l.value?Number(e.size):y.value?y.value.width:Math.max(b.value,32)),T=P(()=>r/(1-b.value/_.value)*2),x=P(()=>b.value/_.value*T.value),C=P(()=>Fe((100-w.value)/100*s));return On(()=>{p.value=i.value,m.value=i.value}),Ae(()=>h(e.tag,{ref:i,class:["v-progress-circular",{"v-progress-circular--indeterminate":!!e.indeterminate,"v-progress-circular--visible":g.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:w.value},{default:()=>[h("svg",{style:{transform:`rotate(calc(-90deg + ${Number(e.rotate)}deg))`},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${T.value} ${T.value}`},[h("circle",{class:["v-progress-circular__underlay",d.value],style:f.value,fill:"transparent",cx:"50%",cy:"50%",r,"stroke-width":x.value,"stroke-dasharray":s,"stroke-dashoffset":0},null),h("circle",{class:"v-progress-circular__overlay",fill:"transparent",cx:"50%",cy:"50%",r,"stroke-width":x.value,"stroke-dasharray":s,"stroke-dashoffset":C.value},null)]),n.default&&h("div",{class:"v-progress-circular__content"},[n.default({value:w.value})])]})),{}}}),Ir=ue({height:[Number,String],maxHeight:[Number,String],maxWidth:[Number,String],minHeight:[Number,String],minWidth:[Number,String],width:[Number,String]},"dimension");function Ar(e){return{dimensionStyles:P(()=>{const n={},r=Fe(e.height),s=Fe(e.maxHeight),i=Fe(e.maxWidth),o=Fe(e.minHeight),a=Fe(e.minWidth),l=Fe(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 $N={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"},rules:{required:"This field is required",email:"Please enter a valid email",number:"This field can only contain numbers",integer:"This field can only contain integer values",capital:"This field can only contain uppercase letters",maxLength:"You must enter a maximum of {0} characters",minLength:"You must enter a minimum of {0} characters",strictLength:"The length of the entered field is invalid",exclude:"The {0} character is not allowed",notEmpty:"Please choose at least one value",pattern:"Invalid format"}},H_="$vuetify.",j_=(e,t)=>e.replace(/\{(\d+)\}/g,(n,r)=>String(t[Number(r)])),zT=(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(H_))return j_(r,i);const a=r.replace(H_,""),l=e.value&&n.value[e.value],u=t.value&&n.value[t.value];let c=Ba(l,a,null);return c||(`${r}${e.value}`,c=Ba(u,a,null)),c||(c=r),typeof c!="string"&&(c=r),j_(c,i)};function HT(e,t){return(n,r)=>new Intl.NumberFormat([e.value,t.value],r).format(n)}function rg(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 jT(e){return t=>{const n=rg(t,"locale",e.current),r=rg(t,"fallback",e.fallback),s=rg(t,"messages",e.messages);return{name:"vuetify",current:n,fallback:r,messages:s,t:zT(n,r,s),n:HT(n,r),provide:jT({current:n,fallback:r,messages:s})}}}function LN(e){const t=Ie((e==null?void 0:e.locale)??"en"),n=Ie((e==null?void 0:e.fallback)??"en"),r=U({en:$N,...e==null?void 0:e.messages});return{name:"vuetify",current:t,fallback:n,messages:r,t:zT(t,n,r),n:HT(t,n),provide:jT({current:t,fallback:n,messages:r})}}const Mh=Symbol.for("vuetify:locale");function FN(e){return e.name!=null}function NN(e){const t=e!=null&&e.adapter&&FN(e==null?void 0:e.adapter)?e==null?void 0:e.adapter:LN(e),n=VN(t,e);return{...t,...n}}function Wr(){const e=Xe(Mh);if(!e)throw new Error("[Vuetify] Could not find injected locale instance");return e}function BN(){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 VN(e,t){const n=U((t==null?void 0:t.rtl)??BN()),r=P(()=>n.value[e.current.value]??!1);return{isRtl:r,rtl:n,rtlClasses:P(()=>`v-locale--is-${r.value?"rtl":"ltr"}`)}}function Or(){const e=Xe(Mh);if(!e)throw new Error("[Vuetify] Could not find injected rtl instance");return{isRtl:e.isRtl,rtlClasses:e.rtlClasses}}const q_={center:"center",top:"bottom",bottom:"top",left:"right",right:"left"},zo=ue({location:String},"location");function Za(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2?arguments[2]:void 0;const{isRtl:r}=Or();return{locationStyles:P(()=>{if(!e.location)return{};const{side:i,align:o}=Rv(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[q_[i]]=`calc(100% - ${a(i)}px)`:l[i]=0),o!=="center"?t?l[q_[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 UN=ue({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,...Ue(),...zo({location:"top"}),...Dn(),...vt(),...$t()},"VProgressLinear"),ru=_e()({name:"VProgressLinear",props:UN(),emits:{"update:modelValue":e=>!0},setup(e,t){var R;let{slots:n}=t;const r=st(e,"modelValue"),{isRtl:s,rtlClasses:i}=Or(),{themeClasses:o}=Zt(e),{locationStyles:a}=Za(e),{textColorClasses:l,textColorStyles:u}=Is(e,"color"),{backgroundColorClasses:c,backgroundColorStyles:d}=dr(P(()=>e.bgColor||e.color)),{backgroundColorClasses:f,backgroundColorStyles:p}=dr(P(()=>e.bufferColor||e.bgColor||e.color)),{backgroundColorClasses:g,backgroundColorStyles:m}=dr(e,"color"),{roundedClasses:y}=Un(e),{intersectionRef:w,isIntersecting:b}=UT(),_=P(()=>parseFloat(e.max)),T=P(()=>parseFloat(e.height)),x=P(()=>Er(parseFloat(e.bufferValue)/_.value*100,0,100)),C=P(()=>Er(parseFloat(r.value)/_.value*100,0,100)),I=P(()=>s.value!==e.reverse),S=P(()=>e.indeterminate?"fade-transition":"slide-x-transition"),E=Et&&((R=window.matchMedia)==null?void 0:R.call(window,"(forced-colors: active)").matches);function O(A){if(!w.value)return;const{left:D,right:L,width:W}=w.value.getBoundingClientRect(),z=I.value?W-A.clientX+(L-W):A.clientX-D;r.value=Math.round(z/W*_.value)}return Ae(()=>h(e.tag,{ref:w,class:["v-progress-linear",{"v-progress-linear--absolute":e.absolute,"v-progress-linear--active":e.active&&b.value,"v-progress-linear--reverse":I.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?Fe(T.value):0,"--v-progress-linear-height":Fe(T.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),_.value),onClick:e.clickable&&O},{default:()=>[e.stream&&h("div",{key:"stream",class:["v-progress-linear__stream",l.value],style:{...u.value,[I.value?"left":"right"]:Fe(-T.value),borderTop:`${Fe(T.value/2)} dotted`,opacity:parseFloat(e.bufferOpacity),top:`calc(50% - ${Fe(T.value/4)})`,width:Fe(100-x.value,"%"),"--v-progress-linear-stream-to":Fe(T.value*(I.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:Fe(x.value,"%")}]},null),h(Io,{name:S.value},{default:()=>[e.indeterminate?h("div",{class:"v-progress-linear__indeterminate"},[["long","short"].map(A=>h("div",{key:A,class:["v-progress-linear__indeterminate",A,E?void 0:g.value],style:m.value},null))]):h("div",{class:["v-progress-linear__determinate",E?void 0:g.value],style:[m.value,{width:Fe(C.value,"%")}]},null)]}),n.default&&h("div",{class:"v-progress-linear__content"},[n.default({value:C.value,buffer:x.value})])]})),{}}}),Bp=ue({loading:[Boolean,String]},"loader");function Pd(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:di();return{loaderClasses:P(()=>({[`${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(ru,{absolute:e.absolute,active:e.active,color:e.color,height:"2",indeterminate:!0},null)])}const zN=["static","relative","fixed","absolute","sticky"],Cu=ue({position:{type:String,validator:e=>zN.includes(e)}},"position");function Tu(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:di();return{positionClasses:P(()=>e.position?`${t}--${e.position}`:void 0)}}function HN(){const e=an("useRoute");return P(()=>{var t;return(t=e==null?void 0:e.proxy)==null?void 0:t.$route})}function qT(){var e,t;return(t=(e=an("useRouter"))==null?void 0:e.proxy)==null?void 0:t.$router}function Up(e,t){var d,f;const n=z$("RouterLink"),r=P(()=>!!(e.href||e.to)),s=P(()=>(r==null?void 0:r.value)||k_(t,"click")||k_(e,"click"));if(typeof n=="string"||!("useLink"in n)){const p=Te(e,"href");return{isLink:r,isClickable:s,href:p,linkProps:vn({href:p})}}const i=P(()=>({...e,to:Te(()=>e.to||"")})),o=n.useLink(i.value),a=P(()=>e.to?o:void 0),l=HN(),u=P(()=>{var p,g,m;return a.value?e.exact?l.value?((m=a.value.isExactActive)==null?void 0:m.value)&&Ps(a.value.route.value.query,l.value.query):((g=a.value.isExactActive)==null?void 0:g.value)??!1:((p=a.value.isActive)==null?void 0:p.value)??!1:!1}),c=P(()=>{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:vn({href:c,"aria-current":P(()=>u.value?"page":void 0)})}}const zp=ue({href:String,replace:Boolean,to:[String,Object],exact:Boolean},"router");let sg=!1;function jN(e,t){let n=!1,r,s;Et&&(e!=null&&e.beforeEach)&&(Mt(()=>{window.addEventListener("popstate",i),r=e.beforeEach((o,a,l)=>{sg?n?t(l):l():setTimeout(()=>n?t(l):l()),sg=!0}),s=e==null?void 0:e.afterEach(()=>{sg=!1})}),gn(()=>{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 qN(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 Mv=Symbol("rippleStop"),WN=80;function W_(e,t){e.style.transform=t,e.style.webkitTransform=t}function Dv(e){return e.constructor.name==="TouchEvent"}function WT(e){return e.constructor.name==="KeyboardEvent"}const GN=function(e,t){var d;let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=0,s=0;if(!WT(e)){const f=t.getBoundingClientRect(),p=Dv(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}},Dh={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}=GN(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"),W_(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"),W_(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 GT(e){return typeof e>"u"||!!e}function Gc(e){const t={},n=e.currentTarget;if(!(!(n!=null&&n._ripple)||n._ripple.touched||e[Mv])){if(e[Mv]=!0,Dv(e))n._ripple.touched=!0,n._ripple.isTouch=!0;else if(n._ripple.isTouch)return;if(t.center=n._ripple.centered||WT(e),n._ripple.class&&(t.class=n._ripple.class),Dv(e)){if(n._ripple.showTimerCommit)return;n._ripple.showTimerCommit=()=>{Dh.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)},WN)}else Dh.show(e,n,t)}}function G_(e){e[Mv]=!0}function Nr(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(()=>{Nr(e)});return}window.setTimeout(()=>{t._ripple&&(t._ripple.touched=!1)}),Dh.hide(t)}}function KT(e){const t=e.currentTarget;t!=null&&t._ripple&&(t._ripple.showTimerCommit&&(t._ripple.showTimerCommit=null),window.clearTimeout(t._ripple.showTimer))}let Kc=!1;function YT(e){!Kc&&(e.keyCode===y_.enter||e.keyCode===y_.space)&&(Kc=!0,Gc(e))}function XT(e){Kc=!1,Nr(e)}function QT(e){Kc&&(Kc=!1,Nr(e))}function JT(e,t,n){const{value:r,modifiers:s}=t,i=GT(r);if(i||Dh.hide(e),e._ripple=e._ripple??{},e._ripple.enabled=i,e._ripple.centered=s.center,e._ripple.circle=s.circle,vT(r)&&r.class&&(e._ripple.class=r.class),i&&!n){if(s.stop){e.addEventListener("touchstart",G_,{passive:!0}),e.addEventListener("mousedown",G_);return}e.addEventListener("touchstart",Gc,{passive:!0}),e.addEventListener("touchend",Nr,{passive:!0}),e.addEventListener("touchmove",KT,{passive:!0}),e.addEventListener("touchcancel",Nr),e.addEventListener("mousedown",Gc),e.addEventListener("mouseup",Nr),e.addEventListener("mouseleave",Nr),e.addEventListener("keydown",YT),e.addEventListener("keyup",XT),e.addEventListener("blur",QT),e.addEventListener("dragstart",Nr,{passive:!0})}else!i&&n&&ZT(e)}function ZT(e){e.removeEventListener("mousedown",Gc),e.removeEventListener("touchstart",Gc),e.removeEventListener("touchend",Nr),e.removeEventListener("touchmove",KT),e.removeEventListener("touchcancel",Nr),e.removeEventListener("mouseup",Nr),e.removeEventListener("mouseleave",Nr),e.removeEventListener("keydown",YT),e.removeEventListener("keyup",XT),e.removeEventListener("dragstart",Nr),e.removeEventListener("blur",QT)}function KN(e,t){JT(e,t,!1)}function YN(e){delete e._ripple,ZT(e)}function XN(e,t){if(t.value===t.oldValue)return;const n=GT(t.oldValue);JT(e,t,n)}const Pu={mounted:KN,unmounted:YN,updated:XN},eP=ue({active:{type:Boolean,default:void 0},activeColor:String,baseColor:String,symbol:{type:null,default:FT},flat:Boolean,icon:[Boolean,String,Function,Object],prependIcon:He,appendIcon:He,block:Boolean,readonly:Boolean,slim:Boolean,stacked:Boolean,ripple:{type:[Boolean,Object],default:!0},text:{type:[String,Number,Boolean],default:void 0},...ms(),...Ue(),...Rr(),...Ir(),...vs(),...Ed(),...Bp(),...zo(),...Cu(),...Dn(),...zp(),...Eu(),...vt({tag:"button"}),...$t(),...$s({variant:"elevated"})},"VBtn"),se=_e()({name:"VBtn",props:eP(),emits:{"group:selected":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const{themeClasses:s}=Zt(e),{borderClasses:i}=Ms(e),{densityClasses:o}=gs(e),{dimensionStyles:a}=Ar(e),{elevationClasses:l}=Ds(e),{loaderClasses:u}=Pd(e),{locationStyles:c}=Za(e),{positionClasses:d}=Tu(e),{roundedClasses:f}=Un(e),{sizeClasses:p,sizeStyles:g}=Td(e),m=Cd(e,e.symbol,!1),y=Up(e,n),w=P(()=>{var R;return e.active!==void 0?e.active:y.isLink.value?(R=y.isActive)==null?void 0:R.value:m==null?void 0:m.isSelected.value}),b=P(()=>w.value?e.activeColor??e.color:e.color),_=P(()=>{var A,D;return{color:(m==null?void 0:m.isSelected.value)&&(!y.isLink.value||((A=y.isActive)==null?void 0:A.value))||!m||((D=y.isActive)==null?void 0:D.value)?b.value??e.baseColor:e.baseColor,variant:e.variant}}),{colorClasses:T,colorStyles:x,variantClasses:C}=Ja(_),I=P(()=>(m==null?void 0:m.disabled.value)||e.disabled),S=P(()=>e.variant==="elevated"&&!(e.disabled||e.flat||e.border)),E=P(()=>{if(!(e.value===void 0||typeof e.value=="symbol"))return Object(e.value)===e.value?JSON.stringify(e.value,null,0):e.value});function O(R){var A;I.value||y.isLink.value&&(R.metaKey||R.ctrlKey||R.shiftKey||R.button!==0||n.target==="_blank")||((A=y.navigate)==null||A.call(y,R),m==null||m.toggle())}return qN(y,m==null?void 0:m.select),Ae(()=>{const R=y.isLink.value?"a":e.tag,A=!!(e.prependIcon||r.prepend),D=!!(e.appendIcon||r.append),L=!!(e.icon&&e.icon!==!0);return Bt(h(R,he({type:R==="a"?void 0:"button",class:["v-btn",m==null?void 0:m.selectedClass.value,{"v-btn--active":w.value,"v-btn--block":e.block,"v-btn--disabled":I.value,"v-btn--elevated":S.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,T.value,o.value,l.value,u.value,d.value,f.value,p.value,C.value,e.class],style:[x.value,a.value,c.value,g.value,e.style],"aria-busy":e.loading?!0:void 0,disabled:I.value||void 0,tabindex:e.loading||e.readonly?-1:void 0,onClick:O,value:E.value},y.linkProps),{default:()=>{var W;return[Uo(!0,"v-btn"),!e.icon&&A&&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(J,{key:"prepend-icon",icon:e.prependIcon},null)]),h("span",{class:"v-btn__content","data-no-activator":""},[!r.default&&L?h(J,{key:"content-icon",icon:e.icon},null):h(Ot,{key:"content-defaults",disabled:!L,defaults:{VIcon:{icon:e.icon}}},{default:()=>{var z;return[((z=r.default)==null?void 0:z.call(r))??re(e.text)]}})]),!e.icon&&D&&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(J,{key:"append-icon",icon:e.appendIcon},null)]),!!e.loading&&h("span",{key:"loader",class:"v-btn__loader"},[((W=r.loader)==null?void 0:W.call(r))??h(ni,{color:typeof e.loading=="boolean"?void 0:e.loading,indeterminate:!0,width:"2"},null)])]}}),[[Pu,!I.value&&e.ripple,"",{center:!!e.icon}]])}),{group:m}}}),QN=ue({disabled:Boolean,group:Boolean,hideOnLeave:Boolean,leaveAbsolute:Boolean,mode:String,origin:String},"transition");function Gr(e,t,n){return _e()({name:e,props:QN({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?Rb:Io;return hr(a,{name:r.disabled?"":e,css:!r.disabled,...r.group?void 0:{mode:r.mode},...r.disabled?{}:o},i.default)}}})}function tP(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?Rb:Io;return()=>hr(o,{name:r.disabled?"":e,css:!r.disabled,...r.disabled?{}:t},i.default)}})}function nP(){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=Tr(`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 JN=ue({target:[Object,Array]},"v-dialog-transition"),Bb=_e()({name:"VDialogTransition",props:JN(),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}=Y_(e.target,s),d=El(s,[{transform:`translate(${o}px, ${a}px) scale(${l}, ${u})`,opacity:0},{}],{duration:225*c,easing:lN});(f=K_(s))==null||f.forEach(p=>{El(p,[{opacity:0},{opacity:0,offset:.33},{}],{duration:225*2*c,easing:Ah})}),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}=Y_(e.target,s);El(s,[{},{transform:`translate(${o}px, ${a}px) scale(${l}, ${u})`,opacity:0}],{duration:125*c,easing:uN}).finished.then(()=>i()),(f=K_(s))==null||f.forEach(p=>{El(p,[{},{opacity:0,offset:.2},{opacity:0}],{duration:125*2*c,easing:Ah})})},onAfterLeave(s){s.style.removeProperty("pointer-events")}};return()=>e.target?h(Io,he({name:"dialog-transition"},r,{css:!1}),n):h(Io,{name:"dialog-transition"},n)}});function K_(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 Y_(e,t){const n=CT(e),r=Db(t),[s,i]=getComputedStyle(t).transformOrigin.split(" ").map(w=>parseFloat(w)),[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,g=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:g,speed:y}}Gr("fab-transition","center center","out-in");Gr("dialog-bottom-transition");Gr("dialog-top-transition");const X_=Gr("fade-transition"),ZN=Gr("scale-transition");Gr("scroll-x-transition");Gr("scroll-x-reverse-transition");const e2=Gr("scroll-y-transition");Gr("scroll-y-reverse-transition");Gr("slide-x-transition");Gr("slide-x-reverse-transition");const rP=Gr("slide-y-transition");Gr("slide-y-reverse-transition");const sP=tP("expand-transition",nP()),iP=tP("expand-x-transition",nP("",!0));function ig(e,t){return{x:e.x+t.x,y:e.y+t.y}}function t2(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Q_(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 ig({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 ig({x:s,y:i},t)}return ig({x:t.width/2,y:t.height/2},t)}const oP={static:s2,connected:o2},n2=ue({locationStrategy:{type:[String,Function],default:"static",validator:e=>typeof e=="function"||e in oP},location:{type:String,default:"bottom"},origin:{type:String,default:"auto"},offset:[Number,String,Array]},"VOverlay-location-strategies");function r2(e,t){const n=U({}),r=U();Et&&Ur(()=>!!(t.isActive.value&&e.locationStrategy),i=>{var o,a;ke(()=>e.locationStrategy,i),gn(()=>{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=oP[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 s2(){}function i2(e,t){const n=Db(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 o2(e,t,n){(Array.isArray(e.target.value)||dN(e.target.value))&&Object.assign(n.value,{position:"fixed",top:0,[e.isRtl.value?"right":"left"]:0});const{preferredAnchor:s,preferredOrigin:i}=Mb(()=>{const g=Rv(t.location,e.isRtl.value),m=t.origin==="overlap"?g:t.origin==="auto"?tg(g):Rv(t.origin,e.isRtl.value);return g.side===m.side&&g.align===ng(m).align?{preferredAnchor:E_(g),preferredOrigin:E_(m)}:{preferredAnchor:g,preferredOrigin:m}}),[o,a,l,u]=["minWidth","minHeight","maxWidth","maxHeight"].map(g=>P(()=>{const m=parseFloat(t[g]);return isNaN(m)?1/0:m})),c=P(()=>{if(Array.isArray(t.offset))return t.offset;if(typeof t.offset=="string"){const g=t.offset.split(" ").map(parseFloat);return g.length<2&&g.push(0),g}return typeof t.offset=="number"?[t.offset,0]:[0,0]});let d=!1;const f=new ResizeObserver(()=>{d&&p()});ke([e.target,e.contentEl],(g,m)=>{let[y,w]=g,[b,_]=m;b&&!Array.isArray(b)&&f.unobserve(b),y&&!Array.isArray(y)&&f.observe(y),_&&f.unobserve(_),w&&f.observe(w)},{immediate:!0}),gn(()=>{f.disconnect()});function p(){if(d=!1,requestAnimationFrame(()=>d=!0),!e.target.value||!e.contentEl.value)return;const g=CT(e.target.value),m=i2(e.contentEl.value,e.isRtl.value),y=Oh(e.contentEl.value),w=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 b=y.reduce((R,A)=>{const D=A.getBoundingClientRect(),L=new Ta({x:A===document.documentElement?0:D.x,y:A===document.documentElement?0:D.y,width:A.clientWidth,height:A.clientHeight});return R?new Ta({x:Math.max(R.left,L.left),y:Math.max(R.top,L.top),width:Math.min(R.right,L.right)-Math.max(R.left,L.left),height:Math.min(R.bottom,L.bottom)-Math.max(R.top,L.top)}):L},void 0);b.x+=w,b.y+=w,b.width-=w*2,b.height-=w*2;let _={anchor:s.value,origin:i.value};function T(R){const A=new Ta(m),D=Q_(R.anchor,g),L=Q_(R.origin,A);let{x:W,y:z}=t2(D,L);switch(R.anchor.side){case"top":z-=c.value[0];break;case"bottom":z+=c.value[0];break;case"left":W-=c.value[0];break;case"right":W+=c.value[0];break}switch(R.anchor.align){case"top":z-=c.value[1];break;case"bottom":z+=c.value[1];break;case"left":W-=c.value[1];break;case"right":W+=c.value[1];break}return A.x+=W,A.y+=z,A.width=Math.min(A.width,l.value),A.height=Math.min(A.height,u.value),{overflows:T_(A,b),x:W,y:z}}let x=0,C=0;const I={x:0,y:0},S={x:!1,y:!1};let E=-1;for(;!(E++>10);){const{x:R,y:A,overflows:D}=T(_);x+=R,C+=A,m.x+=R,m.y+=A;{const L=C_(_.anchor),W=D.x.before||D.x.after,z=D.y.before||D.y.after;let K=!1;if(["x","y"].forEach(G=>{if(G==="x"&&W&&!S.x||G==="y"&&z&&!S.y){const H={anchor:{..._.anchor},origin:{..._.origin}},B=G==="x"?L==="y"?ng:tg:L==="y"?tg:ng;H.anchor=B(H.anchor),H.origin=B(H.origin);const{overflows:ne}=T(H);(ne[G].before<=D[G].before&&ne[G].after<=D[G].after||ne[G].before+ne[G].after<(D[G].before+D[G].after)/2)&&(_=H,K=S[G]=!0)}}),K)continue}D.x.before&&(x+=D.x.before,m.x+=D.x.before),D.x.after&&(x-=D.x.after,m.x-=D.x.after),D.y.before&&(C+=D.y.before,m.y+=D.y.before),D.y.after&&(C-=D.y.after,m.y-=D.y.after);{const L=T_(m,b);I.x=b.width-L.x.before-L.x.after,I.y=b.height-L.y.before-L.y.after,x+=L.x.before,m.x+=L.x.before,C+=L.y.before,m.y+=L.y.before}break}const O=C_(_.anchor);return Object.assign(n.value,{"--v-overlay-anchor-origin":`${_.anchor.side} ${_.anchor.align}`,transformOrigin:`${_.origin.side} ${_.origin.align}`,top:Fe(og(C)),left:e.isRtl.value?void 0:Fe(og(x)),right:e.isRtl.value?Fe(og(-x)):void 0,minWidth:Fe(O==="y"?Math.min(o.value,g.width):o.value),maxWidth:Fe(J_(Er(I.x,o.value===1/0?0:o.value,l.value))),maxHeight:Fe(J_(Er(I.y,a.value===1/0?0:a.value,u.value)))}),{available:I,contentBox:m}}return ke(()=>[s.value,i.value,t.offset,t.minWidth,t.minHeight,t.maxWidth,t.maxHeight],()=>p()),Mt(()=>{const g=p();if(!g)return;const{available:m,contentBox:y}=g;y.height>m.y&&requestAnimationFrame(()=>{p(),requestAnimationFrame(()=>{p()})})}),{updateLocation:p}}function og(e){return Math.round(e*devicePixelRatio)/devicePixelRatio}function J_(e){return Math.ceil(e*devicePixelRatio)/devicePixelRatio}let $v=!0;const $h=[];function a2(e){!$v||$h.length?($h.push(e),Lv()):($v=!1,e(),Lv())}let Z_=-1;function Lv(){cancelAnimationFrame(Z_),Z_=requestAnimationFrame(()=>{const e=$h.shift();e&&e(),$h.length?Lv():$v=!0})}const Gf={none:null,close:c2,block:d2,reposition:f2},l2=ue({scrollStrategy:{type:[String,Function],default:"block",validator:e=>typeof e=="function"||e in Gf}},"VOverlay-scroll-strategies");function u2(e,t){if(!Et)return;let n;On(async()=>{n==null||n.stop(),t.isActive.value&&e.scrollStrategy&&(n=La(),await new Promise(r=>setTimeout(r)),n.active&&n.run(()=>{var r;typeof e.scrollStrategy=="function"?e.scrollStrategy(t,e,n):(r=Gf[e.scrollStrategy])==null||r.call(Gf,t,e,n)}))}),gn(()=>{n==null||n.stop()})}function c2(e){function t(n){e.isActive.value=!1}aP(e.targetEl.value??e.contentEl.value,t)}function d2(e,t){var o;const n=(o=e.root.value)==null?void 0:o.offsetParent,r=[...new Set([...Oh(e.targetEl.value,t.contained?n:void 0),...Oh(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=>Fb(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",Fe(-a.scrollLeft)),a.style.setProperty("--v-body-scroll-y",Fe(-a.scrollTop)),a!==document.documentElement&&a.style.setProperty("--v-scrollbar-offset",Fe(s)),a.classList.add("v-overlay-scroll-blocked")}),gn(()=>{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 f2(e,t,n){let r=!1,s=-1,i=-1;function o(a){a2(()=>{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(()=>{aP(e.targetEl.value??e.contentEl.value,a=>{r?(cancelAnimationFrame(s),s=requestAnimationFrame(()=>{s=requestAnimationFrame(()=>{o(a)})})):o(a)})})}),gn(()=>{typeof cancelIdleCallback<"u"&&cancelIdleCallback(i),cancelAnimationFrame(s)})}function aP(e,t){const n=[document,...Oh(e)];n.forEach(r=>{r.addEventListener("scroll",t,{passive:!0})}),gn(()=>{n.forEach(r=>{r.removeEventListener("scroll",t)})})}const Fv=Symbol.for("vuetify:v-menu"),Vb=ue({closeDelay:[Number,String],openDelay:[Number,String]},"delay");function Ub(e,t){let n=()=>{};function r(o){n==null||n();const a=Number(o?e.openDelay:e.closeDelay);return new Promise(l=>{n=IF(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 h2=ue({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,...Vb()},"VOverlay-activator");function p2(e,t){let{isActive:n,isTop:r,contentEl:s}=t;const i=an("useActivator"),o=U();let a=!1,l=!1,u=!0;const c=P(()=>e.openOnFocus||e.openOnFocus==null&&e.openOnHover),d=P(()=>e.openOnClick||e.openOnClick==null&&!e.openOnHover&&!c.value),{runOpenDelay:f,runCloseDelay:p}=Ub(e,S=>{S===(e.openOnHover&&a||c.value&&l)&&!(e.openOnHover&&n.value&&!r.value)&&(n.value!==S&&(u=!0),n.value=S)}),g=U(),m={onClick:S=>{S.stopPropagation(),o.value=S.currentTarget||S.target,n.value||(g.value=[S.clientX,S.clientY]),n.value=!n.value},onMouseenter:S=>{var E;(E=S.sourceCapabilities)!=null&&E.firesTouchEvents||(a=!0,o.value=S.currentTarget||S.target,f())},onMouseleave:S=>{a=!1,p()},onFocus:S=>{Rh(S.target,":focus-visible")!==!1&&(l=!0,S.stopPropagation(),o.value=S.currentTarget||S.target,f())},onBlur:S=>{l=!1,S.stopPropagation(),p()}},y=P(()=>{const S={};return d.value&&(S.onClick=m.onClick),e.openOnHover&&(S.onMouseenter=m.onMouseenter,S.onMouseleave=m.onMouseleave),c.value&&(S.onFocus=m.onFocus,S.onBlur=m.onBlur),S}),w=P(()=>{const S={};if(e.openOnHover&&(S.onMouseenter=()=>{a=!0,f()},S.onMouseleave=()=>{a=!1,p()}),c.value&&(S.onFocusin=()=>{l=!0,f()},S.onFocusout=()=>{l=!1,p()}),e.closeOnContentClick){const E=Xe(Fv,null);S.onClick=()=>{n.value=!1,E==null||E.closeParents()}}return S}),b=P(()=>{const S={};return e.openOnHover&&(S.onMouseenter=()=>{u&&(a=!0,u=!1,f())},S.onMouseleave=()=>{a=!1,p()}),S});ke(r,S=>{var E;S&&(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,S=>{S||setTimeout(()=>{g.value=void 0})},{flush:"post"});const _=Pv();On(()=>{_.value&&Mt(()=>{o.value=_.el})});const T=Pv(),x=P(()=>e.target==="cursor"&&g.value?g.value:T.value?T.el:lP(e.target,i)||o.value),C=P(()=>Array.isArray(x.value)?void 0:x.value);let I;return ke(()=>!!e.activator,S=>{S&&Et?(I=La(),I.run(()=>{m2(e,i,{activatorEl:o,activatorEvents:y})})):I&&I.stop()},{flush:"post",immediate:!0}),gn(()=>{I==null||I.stop()}),{activatorEl:o,activatorRef:_,target:x,targetEl:C,targetRef:T,activatorEvents:y,contentEvents:w,scrimEvents:b}}function m2(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()}),gn(()=>{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&&MF(l,he(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&&DF(l,he(s.value,u))}function a(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.activator;const u=lP(l,t);return r.value=(u==null?void 0:u.nodeType)===Node.ELEMENT_NODE?u:void 0,r.value}}function lP(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"],Nv=Symbol.for("vuetify:display"),e0={mobileBreakpoint:"lg",thresholds:{xs:0,sm:600,md:960,lg:1280,xl:1920,xxl:2560}},g2=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e0;return Jn(e0,e)};function t0(e){return Et&&!e?window.innerWidth:typeof e=="object"&&e.clientWidth||0}function n0(e){return Et&&!e?window.innerHeight:typeof e=="object"&&e.clientHeight||0}function r0(e){const t=Et&&!e?window.navigator.userAgent:"ssr";function n(g){return!!t.match(g)}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:kF,ssr:t==="ssr"}}function v2(e,t){const{thresholds:n,mobileBreakpoint:r}=g2(e),s=Ie(n0(t)),i=Ie(r0(t)),o=vn({}),a=Ie(t0(t));function l(){s.value=n0(),a.value=t0()}function u(){l(),i.value=r0()}return On(()=>{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),g=a.value<n.xxl&&!(p||f||d||c),m=a.value>=n.xxl,y=c?"xs":d?"sm":f?"md":p?"lg":g?"xl":"xxl",w=typeof r=="number"?r:n[r],b=a.value<w;o.xs=c,o.sm=d,o.md=f,o.lg=p,o.xl=g,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||g||m),o.mdAndDown=!(p||g||m),o.lgAndDown=!(g||m),o.xlAndDown=!m,o.name=y,o.height=s.value,o.width=a.value,o.mobile=b,o.mobileBreakpoint=r,o.platform=i.value,o.thresholds=n}),Et&&(window.addEventListener("resize",l,{passive:!0}),gn(()=>{window.removeEventListener("resize",l)},!0)),{...Vo(o),update:u,ssr:!!t}}const el=ue({mobile:{type:Boolean,default:!1},mobileBreakpoint:[Number,String]},"display");function fi(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{mobile:null},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:di();const n=Xe(Nv);if(!n)throw new Error("Could not find Vuetify display injection");const r=P(()=>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=P(()=>t?{[`${t}--mobile`]:r.value}:{});return{...n,displayClasses:s,mobile:r}}function y2(){if(!Et)return Ie(!1);const{ssr:e}=fi();if(e){const t=Ie(!1);return _t(()=>{t.value=!0}),t}else return Ie(!0)}const uP=ue({eager:Boolean},"lazy");function cP(e,t){const n=Ie(!1),r=P(()=>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 Ru(){const t=an("useScopeId").vnode.scopeId;return{scopeId:t?{[t]:""}:void 0}}const s0=Symbol.for("vuetify:stack"),Zu=vn([]);function b2(e,t,n){const r=an("useStack"),s=!n,i=Xe(s0,void 0),o=vn({activeChildren:new Set});Gt(s0,o);const a=Ie(Number(t.value));Ur(e,()=>{var d;const c=(d=Zu.at(-1))==null?void 0:d[1];a.value=c?c+10:Number(t.value),s&&Zu.push([r.uid,a.value]),i==null||i.activeChildren.add(r.uid),gn(()=>{if(s){const f=Be(Zu).findIndex(p=>p[0]===r.uid);Zu.splice(f,1)}i==null||i.activeChildren.delete(r.uid)})});const l=Ie(!0);s&&On(()=>{var d;const c=((d=Zu.at(-1))==null?void 0:d[0])===r.uid;setTimeout(()=>l.value=c)});const u=P(()=>!o.activeChildren.size);return{globalTop:wu(l),localTop:u,stackStyles:P(()=>({zIndex:a.value}))}}function w2(e){return{teleportTarget:P(()=>{const n=e();if(n===!0||!Et)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 Iu=ue({transition:{type:[Boolean,String,Object],default:"fade-transition",validator:e=>e!==!0}},"transition"),si=(e,t)=>{let{slots:n}=t;const{transition:r,disabled:s,group:i,...o}=e,{component:a=i?Rb:Io,...l}=typeof r=="object"?r:{};return hr(a,he(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 S2(){return!0}function dP(e,t,n){if(!e||fP(e,n)===!1)return!1;const r=OT(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 fP(e,t){return(typeof t.value=="object"&&t.value.closeConditional||S2)(e)}function _2(e,t,n){const r=typeof n.value=="function"?n.value:n.value.handler;e.shadowTarget=e.target,t._clickOutside.lastMousedownWasOutside&&dP(e,t,n)&&setTimeout(()=>{fP(e,n)&&r&&r(e)},0)}function i0(e,t){const n=OT(e);t(document),typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&t(n)}const k2={mounted(e,t){const n=s=>_2(s,e,t),r=s=>{e._clickOutside.lastMousedownWasOutside=dP(s,e,t)};i0(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&&(i0(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 x2(e){const{modelValue:t,color:n,...r}=e;return h(Io,{name:"fade-transition",appear:!0},{default:()=>[e.modelValue&&h("div",he({class:["v-overlay__scrim",e.color.backgroundColorClasses.value],style:e.color.backgroundColorStyles.value},r),null)]})}const Rd=ue({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},...h2(),...Ue(),...Ir(),...uP(),...n2(),...l2(),...$t(),...Iu()},"VOverlay"),Fi=_e()({name:"VOverlay",directives:{ClickOutside:k2},inheritAttrs:!1,props:{_disableGlobalStack:Boolean,...Rd()},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=an("VOverlay"),o=U(),a=U(),l=U(),u=st(e,"modelValue"),c=P({get:()=>u.value,set:Q=>{Q&&e.disabled||(u.value=Q)}}),{themeClasses:d}=Zt(e),{rtlClasses:f,isRtl:p}=Or(),{hasContent:g,onAfterLeave:m}=cP(e,c),y=dr(P(()=>typeof e.scrim=="string"?e.scrim:null)),{globalTop:w,localTop:b,stackStyles:_}=b2(c,Te(e,"zIndex"),e._disableGlobalStack),{activatorEl:T,activatorRef:x,target:C,targetEl:I,targetRef:S,activatorEvents:E,contentEvents:O,scrimEvents:R}=p2(e,{isActive:c,isTop:b,contentEl:l}),{teleportTarget:A}=w2(()=>{var V,ge,Oe;const Q=e.attach||e.contained;if(Q)return Q;const X=((V=T==null?void 0:T.value)==null?void 0:V.getRootNode())||((Oe=(ge=i.proxy)==null?void 0:ge.$el)==null?void 0:Oe.getRootNode());return X instanceof ShadowRoot?X:!1}),{dimensionStyles:D}=Ar(e),L=y2(),{scopeId:W}=Ru();ke(()=>e.disabled,Q=>{Q&&(c.value=!1)});const{contentStyles:z,updateLocation:K}=r2(e,{isRtl:p,contentEl:l,target:C,isActive:c});u2(e,{root:o,contentEl:l,targetEl:I,isActive:c,updateLocation:K});function G(Q){s("click:outside",Q),e.persistent?oe():c.value=!1}function H(Q){return c.value&&w.value&&(!e.scrim||Q.target===a.value||Q instanceof MouseEvent&&Q.shadowTarget===a.value)}Et&&ke(c,Q=>{Q?window.addEventListener("keydown",B):window.removeEventListener("keydown",B)},{immediate:!0}),En(()=>{Et&&window.removeEventListener("keydown",B)});function B(Q){var X,V,ge;Q.key==="Escape"&&w.value&&((X=l.value)!=null&&X.contains(document.activeElement)||s("keydown",Q),e.persistent?oe():(c.value=!1,(V=l.value)!=null&&V.contains(document.activeElement)&&((ge=T.value)==null||ge.focus())))}function ne(Q){Q.key==="Escape"&&!w.value||s("keydown",Q)}const q=qT();Ur(()=>e.closeOnBack,()=>{jN(q,Q=>{w.value&&c.value?(Q(!1),e.persistent?oe():c.value=!1):Q()})});const Y=U();ke(()=>c.value&&(e.absolute||e.contained)&&A.value==null,Q=>{if(Q){const X=MT(o.value);X&&X!==document.scrollingElement&&(Y.value=X.scrollTop)}});function oe(){e.noClickAnimation||l.value&&El(l.value,[{transformOrigin:"center"},{transform:"scale(1.03)"},{transformOrigin:"center"}],{duration:150,easing:Ah})}function ie(){s("afterEnter")}function be(){m(),s("afterLeave")}return Ae(()=>{var Q;return h(Pe,null,[(Q=n.activator)==null?void 0:Q.call(n,{isActive:c.value,targetRef:S,props:he({ref:x},E.value,e.activatorProps)}),L.value&&g.value&&h(O$,{disabled:!A.value,to:A.value},{default:()=>[h("div",he({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:[_.value,{"--v-overlay-opacity":e.opacity,top:Fe(Y.value)},e.style],ref:o,onKeydown:ne},W,r),[h(x2,he({color:y,modelValue:c.value&&!!e.scrim,ref:a},R.value),null),h(si,{appear:!0,persisted:!0,transition:e.transition,target:C.value,onAfterEnter:ie,onAfterLeave:be},{default:()=>{var X;return[Bt(h("div",he({ref:l,class:["v-overlay__content",e.contentClass],style:[D.value,z.value]},O.value,e.contentProps),[(X=n.default)==null?void 0:X.call(n,{isActive:c})]),[[Gi,c.value],[fr("click-outside"),{handler:G,closeConditional:H,include:()=>[T.value]}]])]}})])]})])}),{activatorEl:T,scrimEl:a,target:C,animateClick:oe,contentEl:l,globalTop:w,localTop:b,updateLocation:K}}}),ag=Symbol("Forwarded refs");function lg(e,t){let n=e;for(;n;){const r=Reflect.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Ki(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[ag]=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=lg(l.value,i)??("_"in l.value?lg((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[ag];if(!u)continue;const c=u.slice();for(;c.length;){const d=c.shift(),f=lg(d.value,i);if(f)return f;const p=d.value&&d.value[ag];p&&c.push(...p)}}}}})}const E2=ue({fullscreen:Boolean,retainFocus:{type:Boolean,default:!0},scrollable:Boolean,...Rd({origin:"center center",scrollStrategy:"block",transition:{component:Bb},zIndex:2400})},"VDialog"),hP=_e()({name:"VDialog",props:E2(),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}=Ru(),o=U();function a(c){var p,g;const d=c.relatedTarget,f=c.target;if(d!==f&&((p=o.value)!=null&&p.contentEl)&&((g=o.value)!=null&&g.globalTop)&&![document,o.value.contentEl].includes(f)&&!o.value.contentEl.contains(f)){const m=jc(o.value.contentEl);if(!m.length)return;const y=m[0],w=m[m.length-1];d===y?w.focus():y.focus()}}En(()=>{document.removeEventListener("focusin",a)}),Et&&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}))}),Ae(()=>{const c=Fi.filterProps(e),d=he({"aria-haspopup":"dialog"},e.activatorProps),f=he({tabindex:-1},e.contentProps);return h(Fi,he({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,g=new Array(p),m=0;m<p;m++)g[m]=arguments[m];return h(Ot,{root:"VDialog"},{default:()=>{var y;return[(y=r.default)==null?void 0:y.call(r,...g)]}})}})}),Ki({},o)}}),C2={class:"pa-3 text--primary"},hi=$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=hT(),s=t,i=tn(n.id);function o(c){return s("opened",c)}function a(c){return s("beforeOpened",c)}_t(async()=>{_F("Escape",c=>{l.value&&(c.preventDefault(),u())}),r.registerDialogReference(n.id,{beforeOpenedCallback:a,openedCallback:o})}),En(()=>{r.unregisterDialogReference(n.id)});const l=P(()=>{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)=>($(),te(hP,{"max-width":e.maxWidth,"retain-focus":!1,"model-value":l.value,persistent:"",onClose:d[1]||(d[1]=f=>u())},{default:v(()=>[Op(c.$slots,"default",{},()=>[M("div",C2,[d[4]||(d[4]=k(" No content defined in dialog. ")),h(se,{onClick:d[0]||(d[0]=f=>Z(i).closeDialog())},{default:v(()=>[h(J,{class:"mr-3"},{default:v(()=>d[2]||(d[2]=[k("close")])),_:1}),d[3]||(d[3]=k("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 pP(e,t){return function(){return e.apply(t,arguments)}}const{toString:T2}=Object.prototype,{getPrototypeOf:zb}=Object,jp=(e=>t=>{const n=T2.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:Au}=Array,Yc=qp("undefined");function P2(e){return e!==null&&!Yc(e)&&e.constructor!==null&&!Yc(e.constructor)&&zr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const mP=Ls("ArrayBuffer");function R2(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&mP(e.buffer),t}const I2=qp("string"),zr=qp("function"),gP=qp("number"),Wp=e=>e!==null&&typeof e=="object",A2=e=>e===!0||e===!1,Kf=e=>{if(jp(e)!=="object")return!1;const t=zb(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},O2=Ls("Date"),M2=Ls("File"),D2=Ls("Blob"),$2=Ls("FileList"),L2=e=>Wp(e)&&zr(e.pipe),F2=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||zr(e.append)&&((t=jp(e))==="formdata"||t==="object"&&zr(e.toString)&&e.toString()==="[object FormData]"))},N2=Ls("URLSearchParams"),[B2,V2,U2,z2]=["ReadableStream","Request","Response","Headers"].map(Ls),H2=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Id(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Au(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 vP(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 ca=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,yP=e=>!Yc(e)&&e!==ca;function Bv(){const{caseless:e}=yP(this)&&this||{},t={},n=(r,s)=>{const i=e&&vP(t,s)||s;Kf(t[i])&&Kf(r)?t[i]=Bv(t[i],r):Kf(r)?t[i]=Bv({},r):Au(r)?t[i]=r.slice():t[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&Id(arguments[r],n);return t}const j2=(e,t,n,{allOwnKeys:r}={})=>(Id(t,(s,i)=>{n&&zr(s)?e[i]=pP(s,n):e[i]=s},{allOwnKeys:r}),e),q2=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),W2=(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)},G2=(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&&zb(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},K2=(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},Y2=e=>{if(!e)return null;if(Au(e))return e;let t=e.length;if(!gP(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},X2=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&zb(Uint8Array)),Q2=(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])}},J2=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Z2=Ls("HTMLFormElement"),eB=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),o0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),tB=Ls("RegExp"),bP=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Id(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},nB=e=>{bP(e,(t,n)=>{if(zr(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(zr(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+"'")})}})},rB=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return Au(e)?r(e):r(String(e).split(t)),n},sB=()=>{},iB=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function oB(e){return!!(e&&zr(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const aB=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=Au(r)?[]:{};return Id(r,(o,a)=>{const l=n(o,s+1);!Yc(l)&&(i[a]=l)}),t[s]=void 0,i}}return r};return n(e,0)},lB=Ls("AsyncFunction"),uB=e=>e&&(Wp(e)||zr(e))&&zr(e.then)&&zr(e.catch),wP=((e,t)=>e?setImmediate:t?((n,r)=>(ca.addEventListener("message",({source:s,data:i})=>{s===ca&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),ca.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",zr(ca.postMessage)),cB=typeof queueMicrotask<"u"?queueMicrotask.bind(ca):typeof process<"u"&&process.nextTick||wP,le={isArray:Au,isArrayBuffer:mP,isBuffer:P2,isFormData:F2,isArrayBufferView:R2,isString:I2,isNumber:gP,isBoolean:A2,isObject:Wp,isPlainObject:Kf,isReadableStream:B2,isRequest:V2,isResponse:U2,isHeaders:z2,isUndefined:Yc,isDate:O2,isFile:M2,isBlob:D2,isRegExp:tB,isFunction:zr,isStream:L2,isURLSearchParams:N2,isTypedArray:X2,isFileList:$2,forEach:Id,merge:Bv,extend:j2,trim:H2,stripBOM:q2,inherits:W2,toFlatObject:G2,kindOf:jp,kindOfTest:Ls,endsWith:K2,toArray:Y2,forEachEntry:Q2,matchAll:J2,isHTMLForm:Z2,hasOwnProperty:o0,hasOwnProp:o0,reduceDescriptors:bP,freezeMethods:nB,toObjectSet:rB,toCamelCase:eB,noop:sB,toFiniteNumber:iB,findKey:vP,global:ca,isContextDefined:yP,isSpecCompliantForm:oB,toJSONObject:aB,isAsyncFn:lB,isThenable:uB,setImmediate:wP,asap:cB};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 SP=et.prototype,_P={};["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=>{_P[e]={value:e}});Object.defineProperties(et,_P);Object.defineProperty(SP,"isAxiosError",{value:!0});et.from=(e,t,n,r,s,i)=>{const o=Object.create(SP);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 dB=null;function Vv(e){return le.isPlainObject(e)||le.isArray(e)}function kP(e){return le.endsWith(e,"[]")?e.slice(0,-2):e}function a0(e,t,n){return e?e.concat(t).map(function(s,i){return s=kP(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function fB(e){return le.isArray(e)&&!e.some(Vv)}const hB=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(g){if(g===null)return"";if(le.isDate(g))return g.toISOString();if(!l&&le.isBlob(g))throw new et("Blob is not supported. Use a Buffer instead.");return le.isArrayBuffer(g)||le.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,m,y){let w=g;if(g&&!y&&typeof g=="object"){if(le.endsWith(m,"{}"))m=r?m:m.slice(0,-2),g=JSON.stringify(g);else if(le.isArray(g)&&fB(g)||(le.isFileList(g)||le.endsWith(m,"[]"))&&(w=le.toArray(g)))return m=kP(m),w.forEach(function(_,T){!(le.isUndefined(_)||_===null)&&t.append(o===!0?a0([m],T,i):o===null?m:m+"[]",u(_))}),!1}return Vv(g)?!0:(t.append(a0(y,m,i),u(g)),!1)}const d=[],f=Object.assign(hB,{defaultVisitor:c,convertValue:u,isVisitable:Vv});function p(g,m){if(!le.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(g),le.forEach(g,function(w,b){(!(le.isUndefined(w)||w===null)&&s.call(t,w,le.isString(b)?b.trim():b,m,f))===!0&&p(w,m?m.concat(b):[b])}),d.pop()}}if(!le.isObject(e))throw new TypeError("data must be an object");return p(e),t}function l0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Hb(e,t){this._pairs=[],e&&Gp(e,this,t)}const xP=Hb.prototype;xP.append=function(t,n){this._pairs.push([t,n])};xP.toString=function(t){const n=t?function(r){return t.call(this,r,l0)}:l0;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function pB(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function EP(e,t,n){if(!t)return e;const r=n&&n.encode||pB;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 Hb(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class u0{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 CP={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},mB=typeof URLSearchParams<"u"?URLSearchParams:Hb,gB=typeof FormData<"u"?FormData:null,vB=typeof Blob<"u"?Blob:null,yB={isBrowser:!0,classes:{URLSearchParams:mB,FormData:gB,Blob:vB},protocols:["http","https","file","blob","url","data"]},jb=typeof window<"u"&&typeof document<"u",Uv=typeof navigator=="object"&&navigator||void 0,bB=jb&&(!Uv||["ReactNative","NativeScript","NS"].indexOf(Uv.product)<0),wB=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",SB=jb&&window.location.href||"http://localhost",_B=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:jb,hasStandardBrowserEnv:bB,hasStandardBrowserWebWorkerEnv:wB,navigator:Uv,origin:SB},Symbol.toStringTag,{value:"Module"})),Qn={..._B,...yB};function kB(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 xB(e){return le.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function EB(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 TP(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]=EB(s[o])),!a)}if(le.isFormData(e)&&le.isFunction(e.entries)){const n={};return le.forEachEntry(e,(r,s)=>{t(xB(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 Ad={transitional:CP,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(TP(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 kB(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||Ad.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=>{Ad.headers[e]={}});const TB=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"]),PB=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]&&TB[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},c0=Symbol("internals");function ec(e){return e&&String(e).trim().toLowerCase()}function Yf(e){return e===!1||e==null?e:le.isArray(e)?e.map(Yf):String(e)}function RB(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 IB=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ug(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 AB(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function OB(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 Cr=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(a,l,u){const c=ec(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]=Yf(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())&&!IB(t))o(PB(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=ec(t),t){const r=le.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return RB(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=ec(t),t){const r=le.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ug(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=ec(o),o){const a=le.findKey(r,o);a&&(!n||ug(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||ug(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]=Yf(s),delete n[i];return}const a=t?AB(i):String(i).trim();a!==i&&delete n[i],n[a]=Yf(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[c0]=this[c0]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=ec(o);r[a]||(OB(s,o),r[a]=!0)}return le.isArray(t)?t.forEach(i):i(t),this}};Cr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);le.reduceDescriptors(Cr.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});le.freezeMethods(Cr);function cg(e,t){const n=this||Ad,r=t||n,s=Cr.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 PP(e){return!!(e&&e.__CANCEL__)}function Ou(e,t,n){et.call(this,e??"canceled",et.ERR_CANCELED,t,n),this.name="CanceledError"}le.inherits(Ou,et,{__CANCEL__:!0});function RP(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 MB(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function DB(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 $B(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 Lh=(e,t,n=3)=>{let r=0;const s=DB(50,250);return $B(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)},d0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},f0=e=>(...t)=>le.asap(()=>e(...t)),LB=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,FB=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 NB(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function BB(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function IP(e,t,n){let r=!NB(t);return e&&(r||n==!1)?BB(e,t):t}const h0=e=>e instanceof Cr?{...e}:e;function Ua(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(h0(u),h0(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 AP=e=>{const t=Ua({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=t;t.headers=o=Cr.from(o),t.url=EP(IP(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&&LB(t.url))){const u=s&&i&&FB.read(i);u&&o.set(s,u)}return t},VB=typeof XMLHttpRequest<"u",UB=VB&&function(e){return new Promise(function(n,r){const s=AP(e);let i=s.data;const o=Cr.from(s.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=s,c,d,f,p,g;function m(){p&&p(),g&&g(),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 w(){if(!y)return;const _=Cr.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),x={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:_,config:e,request:y};RP(function(I){n(I),m()},function(I){r(I),m()},x),y=null}"onloadend"in y?y.onloadend=w:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(w)},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 T=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const x=s.transitional||CP;s.timeoutErrorMessage&&(T=s.timeoutErrorMessage),r(new et(T,x.clarifyTimeoutError?et.ETIMEDOUT:et.ECONNABORTED,e,y)),y=null},i===void 0&&o.setContentType(null),"setRequestHeader"in y&&le.forEach(o.toJSON(),function(T,x){y.setRequestHeader(x,T)}),le.isUndefined(s.withCredentials)||(y.withCredentials=!!s.withCredentials),a&&a!=="json"&&(y.responseType=s.responseType),u&&([f,g]=Lh(u,!0),y.addEventListener("progress",f)),l&&y.upload&&([d,p]=Lh(l),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",p)),(s.cancelToken||s.signal)&&(c=_=>{y&&(r(!_||_.type?new Ou(null,e,y):_),y.abort(),y=null)},s.cancelToken&&s.cancelToken.subscribe(c),s.signal&&(s.signal.aborted?c():s.signal.addEventListener("abort",c)));const b=MB(s.url);if(b&&Qn.protocols.indexOf(b)===-1){r(new et("Unsupported protocol "+b+":",et.ERR_BAD_REQUEST,e));return}y.send(i||null)})},zB=(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 Ou(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}},HB=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},jB=async function*(e,t){for await(const n of qB(e))yield*HB(n,t)},qB=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()}},p0=(e,t,n,r)=>{const s=jB(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",OP=Kp&&typeof ReadableStream=="function",WB=Kp&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),MP=(e,...t)=>{try{return!!e(...t)}catch{return!1}},GB=OP&&MP(()=>{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}),m0=64*1024,zv=OP&&MP(()=>le.isReadableStream(new Response("").body)),Fh={stream:zv&&(e=>e.body)};Kp&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Fh[t]&&(Fh[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 KB=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 WB(e)).byteLength},YB=async(e,t)=>{const n=le.toFiniteNumber(e.getContentLength());return n??KB(t)},XB=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}=AP(e);u=u?(u+"").toLowerCase():"text";let p=zB([s,i&&i.toAbortSignal()],o),g;const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(l&&GB&&n!=="get"&&n!=="head"&&(y=await YB(c,r))!==0){let x=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(le.isFormData(r)&&(C=x.headers.get("content-type"))&&c.setContentType(C),x.body){const[I,S]=d0(y,Lh(f0(l)));r=p0(x.body,m0,I,S)}}le.isString(d)||(d=d?"include":"omit");const w="credentials"in Request.prototype;g=new Request(t,{...f,signal:p,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:w?d:void 0});let b=await fetch(g);const _=zv&&(u==="stream"||u==="response");if(zv&&(a||_&&m)){const x={};["status","statusText","headers"].forEach(E=>{x[E]=b[E]});const C=le.toFiniteNumber(b.headers.get("content-length")),[I,S]=a&&d0(C,Lh(f0(a),!0))||[];b=new Response(p0(b.body,m0,I,()=>{S&&S(),m&&m()}),x)}u=u||"text";let T=await Fh[le.findKey(Fh,u)||"text"](b,e);return!_&&m&&m(),await new Promise((x,C)=>{RP(x,C,{data:T,headers:Cr.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:g})})}catch(w){throw m&&m(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new et("Network Error",et.ERR_NETWORK,e,g),{cause:w.cause||w}):et.from(w,w&&w.code,e,g)}}),Hv={http:dB,xhr:UB,fetch:XB};le.forEach(Hv,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const g0=e=>`- ${e}`,QB=e=>le.isFunction(e)||e===null||e===!1,DP={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,!QB(n)&&(r=Hv[(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(g0).join(`
29
+ `):" "+g0(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:Hv};function dg(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ou(null,e)}function v0(e){return dg(e),e.headers=Cr.from(e.headers),e.data=cg.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),DP.getAdapter(e.adapter||Ad.adapter)(e).then(function(r){return dg(e),r.data=cg.call(e,e.transformResponse,r),r.headers=Cr.from(r.headers),r},function(r){return PP(r)||(dg(e),r&&r.response&&(r.response.data=cg.call(e,e.transformResponse,r.response),r.response.headers=Cr.from(r.response.headers))),Promise.reject(r)})}const $P="1.8.4",Yp={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Yp[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const y0={};Yp.transitional=function(t,n,r){function s(i,o){return"[Axios v"+$P+"] 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&&!y0[o]&&(y0[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 JB(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 Xf={assertOptions:JB,validators:Yp},zs=Xf.validators;let Pa=class{constructor(t){this.defaults=t,this.interceptors={request:new u0,response:new u0}}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=Ua(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&Xf.assertOptions(r,{silentJSONParsing:zs.transitional(zs.boolean),forcedJSONParsing:zs.transitional(zs.boolean),clarifyTimeoutError:zs.transitional(zs.boolean)},!1),s!=null&&(le.isFunction(s)?n.paramsSerializer={serialize:s}:Xf.assertOptions(s,{encode:zs.function,serialize:zs.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Xf.assertOptions(n,{baseUrl:zs.spelling("baseURL"),withXsrfToken:zs.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"],g=>{delete i[g]}),n.headers=Cr.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 g=[v0.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,u),f=g.length,c=Promise.resolve(n);d<f;)c=c.then(g[d++],g[d++]);return c}f=a.length;let p=n;for(d=0;d<f;){const g=a[d++],m=a[d++];try{p=g(p)}catch(y){m.call(this,y);break}}try{c=v0.call(this,p)}catch(g){return Promise.reject(g)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=Ua(this.defaults,t);const n=IP(t.baseURL,t.url,t.allowAbsoluteUrls);return EP(n,t.params,t.paramsSerializer)}};le.forEach(["delete","get","head","options"],function(t){Pa.prototype[t]=function(n,r){return this.request(Ua(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(Ua(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Pa.prototype[t]=n(),Pa.prototype[t+"Form"]=n(!0)});let ZB=class LP{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 Ou(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 LP(function(s){t=s}),cancel:t}}};function eV(e){return function(n){return e.apply(null,n)}}function tV(e){return le.isObject(e)&&e.isAxiosError===!0}const jv={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(jv).forEach(([e,t])=>{jv[t]=e});function FP(e){const t=new Pa(e),n=pP(Pa.prototype.request,t);return le.extend(n,Pa.prototype,t,{allOwnKeys:!0}),le.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return FP(Ua(e,s))},n}const fn=FP(Ad);fn.Axios=Pa;fn.CanceledError=Ou;fn.CancelToken=ZB;fn.isCancel=PP;fn.VERSION=$P;fn.toFormData=Gp;fn.AxiosError=et;fn.Cancel=fn.CanceledError;fn.all=function(t){return Promise.all(t)};fn.spread=eV;fn.isAxiosError=tV;fn.mergeConfig=Ua;fn.AxiosHeaders=Cr;fn.formToJSON=e=>TP(le.isHTMLForm(e)?new FormData(e):e);fn.getAdapter=DP.getAdapter;fn.HttpStatusCode=jv;fn.default=fn;const{Axios:rae,AxiosError:NP,CanceledError:sae,isCancel:iae,CancelToken:oae,VERSION:aae,all:lae,Cancel:uae,isAxiosError:cae,spread:dae,toFormData:fae,AxiosHeaders:hae,HttpStatusCode:da,formToJSON:pae,getAdapter:mae,mergeConfig:gae}=fn;class fc extends Error{}fc.prototype.name="InvalidTokenError";function nV(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 rV(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 nV(t)}catch{return atob(t)}}function sV(e,t){if(typeof e!="string")throw new fc("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 fc(`Invalid token specified: missing part #${n+1}`);let s;try{s=rV(r)}catch(i){throw new fc(`Invalid token specified: invalid base64 for part #${n+1} (${i.message})`)}try{return JSON.parse(s)}catch(i){throw new fc(`Invalid token specified: invalid json for part #${n+1} (${i.message})`)}}function iV(e,t={}){const{onError:n,fallbackValue:r=null}=t,s=(a,l)=>{try{return sV(a,l)}catch(u){return n==null||n(u),r}},i=P(()=>s(ko(e),{header:!0})),o=P(()=>s(ko(e)));return{header:i,payload:o}}class ia{static async getLoginRequired(){return await(await Gn(!1,!1)).get("/api/auth/login-required")}static async postLogin(t,n){return await(await Gn(!1,!1)).post("/api/auth/login",{username:t,password:n})}static async logout(){return await(await Gn(!0,!1)).post("/api/auth/logout")}static async refreshLogin(t){return await(await Gn(!1,!1)).post("/api/auth/refresh",{refreshToken:t})}static async verifyLogin(){return await(await Gn(!0,!1)).post("/api/auth/verify")}static async registerAccount(t,n){return await(await Gn(!0,!1)).post("/api/auth/register",{username:t,password:n})}}const _r={IncorrectCredentials:"IncorrectCredentials",InvalidOrExpiredRefreshToken:"InvalidOrExpiredRefreshToken",InvalidOrExpiredAuthToken:"InvalidOrExpiredAuthToken",PasswordChangeRequired:"PasswordChangeRequired",LoginRequired:"LoginRequired",AccountNotVerified:"AccountNotVerified"};function qb(e){switch(e){case _r.IncorrectCredentials:return"Incorrect credentials";case _r.InvalidOrExpiredRefreshToken:return"Invalid or expired refresh token";case _r.InvalidOrExpiredAuthToken:return"Invalid or expired auth token";case _r.PasswordChangeRequired:return"Password change required";case _r.LoginRequired:return"Login required";case _r.AccountNotVerified:return"Account not verified";default:return"Authentication error"}}const as=ps("auth",{state:()=>({isDemoMode:null,token:null,refreshToken:null,loginRequired:null,registration:null,wizardState:null,lastLogoutReason:null}),actions:{async checkAuthenticationRequirements(){return await ia.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 ia.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 ia.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 ia.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)!==da.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,qb(s)),console.error(`[AuthStore] 401 Unauthorized - emitting 'auth:${s}' with reason ${s}`),Fr(`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 ia.verifyLogin()}catch(o){const a=o;if(((t=a.response)==null?void 0:t.status)===da.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===_r.AccountNotVerified||t===_r.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 ia.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)==da.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=iV(this.token,{fallbackValue:null});return e?e.payload.value:null}}}),Ze=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,St=globalThis,Ho=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ra="9.12.0";function tl(){return Xp(St),St}function Xp(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Ra,t[Ra]=t[Ra]||{}}function Qp(e,t,n=St){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[Ra]=r[Ra]||{};return s[e]||(s[e]=t())}const oV="Sentry Logger ",qv=["debug","info","warn","error","log","assert","trace"],Nh={};function Yi(e){if(!("console"in St))return e();const t=St.console,n={},r=Object.keys(Nh);r.forEach(s=>{const i=Nh[s];n[s]=t[s],t[s]=i});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function aV(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Ho?qv.forEach(n=>{t[n]=(...r)=>{e&&Yi(()=>{St.console[n](`${oV}[${n}]:`,...r)})}}):qv.forEach(n=>{t[n]=()=>{}}),t}const Ce=Qp("logger",aV),BP=50,za="?",b0=/\(error: (.*)\)/,w0=/captureMessage|captureException/;function VP(...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=b0.test(l)?l.replace(b0,"$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>=BP+s)break}}return uV(i.slice(s))}}function lV(e){return Array.isArray(e)?VP(...e):e}function uV(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(sf(t).function||"")&&t.pop(),t.reverse(),w0.test(sf(t).function||"")&&(t.pop(),w0.test(sf(t).function||"")&&t.pop()),t.slice(0,BP).map(n=>({...n,filename:n.filename||sf(t).filename,function:n.function||za}))}function sf(e){return e[e.length-1]||{}}const fg="<anonymous>";function Ni(e){try{return!e||typeof e!="function"?fg:e.name||fg}catch{return fg}}function S0(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 Qf={},_0={};function jo(e,t){Qf[e]=Qf[e]||[],Qf[e].push(t)}function qo(e,t){if(!_0[e]){_0[e]=!0;try{t()}catch(n){Ho&&Ce.error(`Error while instrumenting ${e}`,n)}}}function os(e,t){const n=e&&Qf[e];if(n)for(const r of n)try{r(t)}catch(s){Ho&&Ce.error(`Error while triggering instrumentation handler.
32
+ Type: ${e}
33
+ Name: ${Ni(r)}
34
+ Error:`,s)}}let hg=null;function UP(e){const t="error";jo(t,e),qo(t,cV)}function cV(){hg=St.onerror,St.onerror=function(e,t,n,r,s){return os("error",{column:r,error:s,line:n,msg:e,url:t}),hg?hg.apply(this,arguments):!1},St.onerror.__SENTRY_INSTRUMENTED__=!0}let pg=null;function zP(e){const t="unhandledrejection";jo(t,e),qo(t,dV)}function dV(){pg=St.onunhandledrejection,St.onunhandledrejection=function(e){return os("unhandledrejection",e),pg?pg.apply(this,arguments):!0},St.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const HP=1e3;function Od(){return Date.now()/HP}function fV(){const{performance:e}=St;if(!(e!=null&&e.now))return Od;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/HP}const er=fV();let mg;function hV(){var c;const{performance:e}=St;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 Kr(){return mg||(mg=hV()),mg[0]}const jP=Object.prototype.toString;function Wb(e){switch(jP.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Bi(e,Error)}}function Mu(e,t){return jP.call(e)===`[object ${t}]`}function qP(e){return Mu(e,"ErrorEvent")}function k0(e){return Mu(e,"DOMError")}function pV(e){return Mu(e,"DOMException")}function Oi(e){return Mu(e,"String")}function Gb(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Kb(e){return e===null||Gb(e)||typeof e!="object"&&typeof e!="function"}function Xc(e){return Mu(e,"Object")}function Jp(e){return typeof Event<"u"&&Bi(e,Event)}function mV(e){return typeof Element<"u"&&Bi(e,Element)}function gV(e){return Mu(e,"RegExp")}function Zp(e){return!!(e!=null&&e.then&&typeof e.then=="function")}function vV(e){return Xc(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Bi(e,t){try{return e instanceof t}catch{return!1}}function WP(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function GP(e){return typeof Request<"u"&&Bi(e,Request)}const Yb=St,yV=80;function Vi(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||yV;for(;n&&i++<r&&(u=bV(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 bV(e,t){const n=e,r=[];if(!(n!=null&&n.tagName))return"";if(Yb.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&&Oi(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 Du(){try{return Yb.document.location.href}catch{return""}}function KP(e){if(!Yb.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 Bh(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function x0(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const s=e[r];try{WP(s)?n.push("[VueViewModel]"):n.push(String(s))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function wV(e,t,n=!1){return Oi(e)?gV(t)?t.test(e):Oi(t)?n?e===t:e.includes(t):!1:!1}function xo(e,t=[],n=!1){return t.some(r=>wV(e,r,n))}function xr(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const s=n(r);typeof s=="function"&&YP(s,r);try{e[t]=s}catch{Ho&&Ce.log(`Failed to replace method "${t}" in object`,e)}}function qr(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Ho&&Ce.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function YP(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,qr(e,"__sentry_original__",t)}catch{}}function Xb(e){return e.__sentry_original__}function XP(e){if(Wb(e))return{message:e.message,name:e.name,stack:e.stack,...C0(e)};if(Jp(e)){const t={type:e.type,target:E0(e.target),currentTarget:E0(e.currentTarget),...C0(e)};return typeof CustomEvent<"u"&&Bi(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function E0(e){try{return mV(e)?Vi(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function C0(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 SV(e,t=40){const n=Object.keys(XP(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return Bh(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:Bh(i,t)}return""}function _V(){const e=St;return e.crypto||e.msCrypto}function Hr(e=_V()){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 QP(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)==null?void 0:n[0]}function ua(e){const{message:t,event_id:n}=e;if(t)return t;const r=QP(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Wv(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 su(e,t){const n=QP(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 T0(e){if(kV(e))return!0;try{qr(e,"__sentry_captured__",!0)}catch{}return!1}function kV(e){try{return e.__sentry_captured__}catch{}}var Ei;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})(Ei||(Ei={}));function Ui(e){return new Ao(t=>{t(e)})}function Vh(e){return new Ao((t,n)=>{n(e)})}class Ao{constructor(t){this._state=Ei.PENDING,this._handlers=[],this._runExecutor(t)}then(t,n){return new Ao((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 Ao((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===Ei.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Ei.RESOLVED&&n[1](this._value),this._state===Ei.REJECTED&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(i,o)=>{if(this._state===Ei.PENDING){if(Zp(o)){o.then(r,s);return}this._state=i,this._value=o,this._executeHandlers()}},r=i=>{n(Ei.RESOLVED,i)},s=i=>{n(Ei.REJECTED,i)};try{t(r,s)}catch(i){s(i)}}}function xV(e){const t=er(),n={sid:Hr(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>CV(n)};return e&&iu(n,e),n}function iu(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:Hr()),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 EV(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),iu(e,n)}function CV(e){return{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 Oo(){return Hr()}function Md(){return Hr().substring(16)}function Dd(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]=Dd(r[s],t[s],n-1));return r}const Gv="_sentrySpan";function Qc(e,t){t?qr(e,Gv,t):delete e[Gv]}function Uh(e){return e[Gv]}const TV=100;class li{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:Oo(),sampleRand:Math.random()}}clone(){const t=new li;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,Qc(t,Uh(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&&iu(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 li?n.getScopeData():Xc(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,Qc(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Oo(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){var i;const r=typeof n=="number"?n:TV;if(r<=0)return this;const s={timestamp:Od(),...t,message:t.message?Bh(t.message,2048):t.message};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:Uh(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Dd(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)||Hr();if(!this._client)return Ce.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)||Hr();if(!this._client)return Ce.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)||Hr();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(Ce.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 PV(){return Qp("defaultCurrentScope",()=>new li)}function RV(){return Qp("defaultIsolationScope",()=>new li)}class IV{constructor(t,n){let r;t?r=t:r=new li;let s;n?s=n:s=new li,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 ou(){const e=tl(),t=Xp(e);return t.stack=t.stack||new IV(PV(),RV())}function AV(e){return ou().withScope(e)}function OV(e,t){const n=ou();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function P0(e){return ou().withScope(()=>e(ou().getIsolationScope()))}function MV(){return{withIsolationScope:P0,withScope:AV,withSetScope:OV,withSetIsolationScope:(e,t)=>P0(t),getCurrentScope:()=>ou().getScope(),getIsolationScope:()=>ou().getIsolationScope()}}function $u(e){const t=Xp(e);return t.acs?t.acs:MV()}function Jt(){const e=tl();return $u(e).getCurrentScope()}function pi(){const e=tl();return $u(e).getIsolationScope()}function DV(){return Qp("globalScope",()=>new li)}function Qb(...e){const t=tl(),n=$u(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 Jt().getClient()}function $V(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=t,i={trace_id:n,span_id:s||Md()};return r&&(i.parent_span_id=r),i}const Vr="sentry.source",JP="sentry.sample_rate",Ha="sentry.op",on="sentry.origin",Kv="sentry.idle_span_finish_reason",em="sentry.measurement_unit",tm="sentry.measurement_value",R0="sentry.custom_span_name",Jb="sentry.profile_id",$d="sentry.exclusive_time",LV="sentry.link.type",FV=0,ZP=1,Cn=2;function NV(e){if(e<400&&e>=100)return{code:ZP};if(e>=400&&e<500)switch(e){case 401:return{code:Cn,message:"unauthenticated"};case 403:return{code:Cn,message:"permission_denied"};case 404:return{code:Cn,message:"not_found"};case 409:return{code:Cn,message:"already_exists"};case 413:return{code:Cn,message:"failed_precondition"};case 429:return{code:Cn,message:"resource_exhausted"};case 499:return{code:Cn,message:"cancelled"};default:return{code:Cn,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:Cn,message:"unimplemented"};case 503:return{code:Cn,message:"unavailable"};case 504:return{code:Cn,message:"deadline_exceeded"};default:return{code:Cn,message:"internal_error"}}return{code:Cn,message:"unknown_error"}}function eR(e,t){e.setAttribute("http.response.status_code",t);const n=NV(t);n.message!=="unknown_error"&&e.setStatus(n)}const tR="_sentryScope",nR="_sentryIsolationScope";function BV(e,t,n){e&&(qr(e,nR,n),qr(e,tR,t))}function zh(e){return{scope:e[tR],isolationScope:e[nR]}}function ja(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 Zb="sentry-",VV=/^sentry-/,UV=8192;function rR(e){const t=HV(e);if(!t)return;const n=Object.entries(t).reduce((r,[s,i])=>{if(s.match(VV)){const o=s.slice(Zb.length);r[o]=i}return r},{});if(Object.keys(n).length>0)return n}function zV(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,s])=>(s&&(n[`${Zb}${r}`]=s),n),{});return jV(t)}function HV(e){if(!(!e||!Oi(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=I0(n);return Object.entries(r).forEach(([s,i])=>{t[s]=i}),t},{}):I0(e)}function I0(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function jV(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>UV?(Ho&&Ce.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):o},"")}const sR=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function qV(e){if(!e)return;const t=e.match(sR);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 WV(e,t){const n=qV(e),r=rR(t);if(!(n!=null&&n.traceId))return{traceId:Oo(),sampleRand:Math.random()};const s=GV(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 iR(e=Oo(),t=Md(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function GV(e,t){const n=ja(t==null?void 0:t.sample_rand);if(n!==void 0)return n;const r=ja(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 oR=0,ew=1;let A0=!1;function KV(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:i,status:o,origin:a,links:l}=bt(e);return{parent_span_id:i,span_id:t,trace_id:n,data:r,op:s,status:o,origin:a,links:l}}function YV(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),s=r?t:bt(e).parent_span_id,i=zh(e).scope,o=r?(i==null?void 0:i.getPropagationContext().propagationSpanId)||Md():t;return{parent_span_id:s,span_id:o,trace_id:n}}function XV(e){const{traceId:t,spanId:n}=e.spanContext(),r=nl(e);return iR(t,n,r)}function aR(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===ew,attributes:i,...s}))}function Ia(e){return typeof e=="number"?O0(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?O0(e.getTime()):er()}function O0(e){return e>9999999999?e/1e3:e}function bt(e){if(JV(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(QV(e)){const{attributes:r,startTime:s,name:i,endTime:o,parentSpanId:a,status:l,links:u}=e;return{span_id:t,trace_id:n,data:r,description:i,parent_span_id:a,start_timestamp:Ia(s),timestamp:Ia(o)||void 0,status:lR(l),op:r[Ha],origin:r[on],links:aR(u)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function QV(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function JV(e){return typeof e.getSpanJSON=="function"}function nl(e){const{traceFlags:t}=e.spanContext();return t===ew}function lR(e){if(!(!e||e.code===FV))return e.code===ZP?"ok":e.message||"unknown_error"}const Aa="_sentryChildSpans",Yv="_sentryRootSpan";function uR(e,t){const n=e[Yv]||e;qr(t,Yv,n),e[Aa]?e[Aa].add(t):qr(e,Aa,new Set([t]))}function ZV(e,t){e[Aa]&&e[Aa].delete(t)}function Jf(e){const t=new Set;function n(r){if(!t.has(r)&&nl(r)){t.add(r);const s=r[Aa]?Array.from(r[Aa]):[];for(const i of s)n(i)}}return n(e),Array.from(t)}function Bn(e){return e[Yv]||e}function zn(){const e=tl(),t=$u(e);return t.getActiveSpan?t.getActiveSpan():Uh(Jt())}function Xv(){A0||(Yi(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),A0=!0)}let M0=!1;function eU(){M0||(M0=!0,UP(Qv),zP(Qv))}function Qv(){const e=zn(),t=e&&Bn(e);if(t){const n="internal_error";Ze&&Ce.log(`[Tracing] Root span: ${n} -> Global error occurred`),t.setStatus({code:Cn,message:n})}}Qv.tag="sentry_tracingErrorCallback";function zi(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 tw="production",cR="_frozenDsc";function Zf(e,t){qr(e,cR,t)}function dR(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s={environment:n.environment||tw,release:n.release,public_key:r,trace_id:e};return t.emit("createDsc",s),s}function fR(e,t){const n=t.getPropagationContext();return n.dsc||dR(n.traceId,e)}function Hi(e){var g;const t=ct();if(!t)return{};const n=Bn(e),r=bt(n),s=r.data,i=n.spanContext().traceState,o=(i==null?void 0:i.get("sentry.sample_rate"))??s[JP];function a(m){return(typeof o=="number"||typeof o=="string")&&(m.sample_rate=`${o}`),m}const l=n[cR];if(l)return a(l);const u=i==null?void 0:i.get("sentry.dsc"),c=u&&rR(u);if(c)return a(c);const d=dR(e.spanContext().traceId,t),f=s[Vr],p=r.description;return f!=="url"&&p&&(d.transaction=p),zi()&&(d.sampled=String(nl(n)),d.sample_rand=(i==null?void 0:i.get("sentry.sample_rand"))??((g=zh(n).scope)==null?void 0:g.getPropagationContext().sampleRand.toString())),a(d),t.emit("createDsc",d,n),d}class qa{constructor(t={}){this._traceId=t.traceId||Oo(),this._spanId=t.spanId||Md()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:oR}}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 tU(e){if(!Ze)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=bt(e),{spanId:s}=e.spanContext(),i=nl(e),o=Bn(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}=bt(o);u.push(`root ID: ${o.spanContext().spanId}`),c&&u.push(`root op: ${c}`),d&&u.push(`root description: ${d}`)}Ce.log(`${l}
35
+ ${u.join(`
36
+ `)}`)}function nU(e){if(!Ze)return;const{description:t="< unknown name >",op:n="< unknown op >"}=bt(e),{spanId:r}=e.spanContext(),i=Bn(e)===e,o=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${t}" with ID ${r}`;Ce.log(o)}function rU(e,t,n){if(!zi(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=ja(s);if(i===void 0)return Ze&&Ce.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&&Ce.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&&Ce.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),[o,i,r]}const sU=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function iU(e){return e==="http"||e==="https"}function Ld(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 oU(e){const t=sU.exec(e);if(!t){Yi(()=>{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 hR({host:i,pass:s,path:l,projectId:u,port:o,protocol:n,publicKey:r})}function hR(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function aU(e){if(!Ho)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(Ce.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?iU(r)?t&&isNaN(parseInt(t,10))?(Ce.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(Ce.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(Ce.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function lU(e){const t=typeof e=="string"?oU(e):hR(e);if(!(!t||!aU(t)))return t}function _s(e,t=100,n=1/0){try{return Jv("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function pR(e,t=3,n=100*1024){const r=_s(e,t);return fU(r)>n?pR(e,t-1,n):r}function Jv(e,t,n=1/0,r=1/0,s=hU()){const[i,o]=s;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=uU(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 Jv("",p,l-1,r,s)}catch{}const c=Array.isArray(t)?[]:{};let d=0;const f=XP(t);for(const p in f){if(!Object.prototype.hasOwnProperty.call(f,p))continue;if(d>=r){c[p]="[MaxProperties ~]";break}const g=f[p];c[p]=Jv(p,g,l-1,r,s),d++}return o(t),c}function uU(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(WP(t))return"[VueViewModel]";if(vV(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Ni(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=cU(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function cU(e){const t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:"null prototype"}function dU(e){return~-encodeURI(e).split(/%..|./).length}function fU(e){return dU(JSON.stringify(e))}function hU(){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 rl(e,t=[]){return[e,t]}function pU(e,t){const[n,r]=e;return[n,[...r,t]]}function D0(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 Zv(e){const t=Xp(St);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function mU(e){const[t,n]=e;let r=JSON.stringify(t);function s(i){typeof r=="string"?r=typeof i=="string"?r+i:[Zv(r),i]:r.push(typeof i=="string"?Zv(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:gU(r)}function gU(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 vU(e){return[{type:"span"},e]}function yU(e){const t=typeof e.data=="string"?Zv(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const bU={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 $0(e){return bU[e]}function nw(e){if(!(e!=null&&e.sdk))return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function mR(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:Ld(r)},...s&&{trace:s}}}function wU(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 SU(e,t,n,r){const s=nw(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:Ld(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return rl(i,[o])}function _U(e,t,n,r){const s=nw(n),i=e.type&&e.type!=="replay_event"?e.type:"event";wU(e,n==null?void 0:n.sdk);const o=mR(e,s,r,t);return delete e.sdkProcessingMetadata,rl(o,[[{type:i},e]])}function kU(e,t){function n(c){return!!c.trace_id&&!!c.public_key}const r=Hi(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:Ld(s)}},a=t==null?void 0:t.getOptions().beforeSendSpan,l=a?c=>{const d=bt(c),f=a(d);return f||(Xv(),d)}:bt,u=[];for(const c of e){const d=l(c);d&&u.push(vU(d))}return rl(o,u)}function xU(e,t,n,r=zn()){const s=r&&Bn(r);s&&(Ze&&Ce.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),s.addEvent(e,{[tm]:t,[em]:n}))}function L0(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 F0=1e3;class rw{constructor(t={}){this._traceId=t.traceId||Oo(),this._spanId=t.spanId||Md(),this._startTime=t.startTimestamp||er(),this._links=t.links,this._attributes={},this.setAttributes({[on]:"manual",[Ha]: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?ew:oR}}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=Ia(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(Vr,"custom"),this}end(t){this._endTime||(this._endTime=Ia(t),nU(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Ha],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:lR(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[on],profile_id:this._attributes[Jb],exclusive_time:this._attributes[$d],measurements:L0(this._events),is_segment:this._isStandaloneSpan&&Bn(this)===this||void 0,segment_id:this._isStandaloneSpan?Bn(this).spanContext().spanId:void 0,links:aR(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){Ze&&Ce.log("[Tracing] Adding an event to span:",t);const s=N0(n)?n:r||er(),i=N0(n)?{}:n||{},o={name:t,time:Ia(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===Bn(this)))return;if(this._isStandaloneSpan){this._sampled?CU(kU([this],t)):(Ze&&Ce.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&&(zh(this).scope||Jt()).captureEvent(r)}_convertSpanToTransaction(){if(!B0(bt(this)))return;this._name||(Ze&&Ce.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=zh(this);if(this._sampled!==!0)return;const s=Jf(this).filter(u=>u!==this&&!EU(u)).map(u=>bt(u)).filter(B0),i=this._attributes[Vr];delete this._attributes[R0],s.forEach(u=>{delete u.data[R0]});const o={contexts:{trace:KV(this)},spans:s.length>F0?s.sort((u,c)=>u.start_timestamp-c.start_timestamp).slice(0,F0):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:Hi(this)},...i&&{transaction_info:{source:i}}},a=L0(this._events);return a&&Object.keys(a).length&&(Ze&&Ce.log("[Measurements] Adding measurements to transaction event",JSON.stringify(a,void 0,2)),o.measurements=a),o}}function N0(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function B0(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function EU(e){return e instanceof rw&&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 gR="__SENTRY_SUPPRESS_TRACING__";function Wa(e){const t=yR();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=PU(e),{forceTransaction:r,parentSpan:s}=e;return(e.scope?o=>Qb(e.scope,o):s!==void 0?o=>vR(s,o):o=>o())(()=>{const o=Jt(),a=IU(o);return e.onlyIfParent&&!a?new qa:TU({parentSpan:a,spanArguments:n,forceTransaction:r,scope:o})})}function vR(e,t){const n=yR();return n.withActiveSpan?n.withActiveSpan(e,t):Qb(r=>(Qc(r,e||void 0),t(r)))}function TU({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!zi()){const o=new qa;if(n||!e){const a={sampled:"false",sample_rate:"0",transaction:t.name,...Hi(o)};Zf(o,a)}return o}const s=pi();let i;if(e&&!n)i=RU(e,r,t),uR(e,i);else if(e){const o=Hi(e),{traceId:a,spanId:l}=e.spanContext(),u=nl(e);i=V0({traceId:a,parentSpanId:l,...t},r,u),Zf(i,o)}else{const{traceId:o,dsc:a,parentSpanId:l,sampled:u}={...s.getPropagationContext(),...r.getPropagationContext()};i=V0({traceId:o,parentSpanId:l,...t},r,u),a&&Zf(i,a)}return tU(i),BV(i,r,s),i}function PU(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=Ia(e.startTime),delete r.startTime,r}return n}function yR(){const e=tl();return $u(e)}function V0(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[gR]?[!1]:rU(s,{name:i,parentSampled:n,attributes:o,parentSampleRate:ja((f=a.dsc)==null?void 0:f.sample_rate)},a.sampleRand),d=new rw({...e,attributes:{[Vr]:"custom",[JP]:u!==void 0&&c?u:void 0,...e.attributes},sampled:l});return!l&&r&&(Ze&&Ce.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 RU(e,t,n){const{spanId:r,traceId:s}=e.spanContext(),i=t.getScopeData().sdkProcessingMetadata[gR]?!1:nl(e),o=i?new rw({...n,parentSpanId:r,traceId:s,sampled:i}):new qa({traceId:s});uR(e,o);const a=ct();return a&&(a.emit("spanStart",o),n.endTimestamp&&a.emit("spanEnd",o)),o}function IU(e){const t=Uh(e);if(!t)return;const n=ct();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?Bn(t):t}const eh={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},AU="heartbeatFailed",OU="idleTimeout",MU="finalTimeout",DU="externalFinish";function bR(e,t={}){const n=new Map;let r=!1,s,i=DU,o=!t.disableAutoFinish;const a=[],{idleTimeout:l=eh.idleTimeout,finalTimeout:u=eh.finalTimeout,childSpanTimeout:c=eh.childSpanTimeout,beforeSpanEnd:d}=t,f=ct();if(!f||!zi()){const C=new qa,I={sample_rate:"0",sampled:"false",...Hi(C)};return Zf(C,I),C}const p=Jt(),g=zn(),m=$U(e);m.end=new Proxy(m.end,{apply(C,I,S){if(d&&d(m),I instanceof qa)return;const[E,...O]=S,R=E||er(),A=Ia(R),D=Jf(m).filter(G=>G!==m);if(!D.length)return x(A),Reflect.apply(C,I,[A,...O]);const L=D.map(G=>bt(G).timestamp).filter(G=>!!G),W=L.length?Math.max(...L):void 0,z=bt(m).start_timestamp,K=Math.min(z?z+u/1e3:1/0,Math.max(z||-1/0,Math.min(A,W||1/0)));return x(K),Reflect.apply(C,I,[K,...O])}});function y(){s&&(clearTimeout(s),s=void 0)}function w(C){y(),s=setTimeout(()=>{!r&&n.size===0&&o&&(i=OU,m.end(C))},l)}function b(C){s=setTimeout(()=>{!r&&o&&(i=AU,m.end(C))},c)}function _(C){y(),n.set(C,!0);const I=er();b(I+c/1e3)}function T(C){if(n.has(C)&&n.delete(C),n.size===0){const I=er();w(I+l/1e3)}}function x(C){r=!0,n.clear(),a.forEach(A=>A()),Qc(p,g);const I=bt(m),{start_timestamp:S}=I;if(!S)return;I.data[Kv]||m.setAttribute(Kv,i),Ce.log(`[Tracing] Idle span "${I.op}" finished`);const O=Jf(m).filter(A=>A!==m);let R=0;O.forEach(A=>{A.isRecording()&&(A.setStatus({code:Cn,message:"cancelled"}),A.end(C),Ze&&Ce.log("[Tracing] Cancelling span since span ended early",JSON.stringify(A,void 0,2)));const D=bt(A),{timestamp:L=0,start_timestamp:W=0}=D,z=W<=C,K=(u+l)/1e3,G=L-W<=K;if(Ze){const H=JSON.stringify(A,void 0,2);z?G||Ce.log("[Tracing] Discarding span since it finished after idle span final timeout",H):Ce.log("[Tracing] Discarding span since it happened after idle span was finished",H)}(!G||!z)&&(ZV(m,A),R++)}),R>0&&m.setAttribute("sentry.idle_span_discarded_spans",R)}return a.push(f.on("spanStart",C=>{if(r||C===m||bt(C).timestamp)return;Jf(m).includes(C)&&_(C.spanContext().spanId)})),a.push(f.on("spanEnd",C=>{r||T(C.spanContext().spanId)})),a.push(f.on("idleSpanEnableAutoFinish",C=>{C===m&&(o=!0,w(),n.size&&b())})),t.disableAutoFinish||w(),setTimeout(()=>{r||(m.setStatus({code:Cn,message:"deadline_exceeded"}),i=MU,m.end())},u),m}function $U(e){const t=Wa(e);return Qc(Jt(),t),Ze&&Ce.log("[Tracing] Started span is an idle span"),t}function ey(e,t,n,r=0){return new Ao((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&&Ce.log(`Event processor "${o.id}" dropped event`),Zp(a)?a.then(l=>ey(e,l,n,r+1).then(s)).then(null,i):ey(e,a,n,r+1).then(s).then(null,i)}})}let of,U0,af;function LU(e){const t=St._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return af&&n.length===U0||(U0=n.length,af=n.reduce((r,s)=>{of||(of={});const i=of[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,of[s]=[u,c];break}}}return r},{})),af}function FU(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=t;NU(e,t),r&&UU(e,r),zU(e,n),BU(e,s),VU(e,i)}function z0(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:g}=t;lf(e,"extra",n),lf(e,"tags",r),lf(e,"user",s),lf(e,"contexts",i),e.sdkProcessingMetadata=Dd(e.sdkProcessingMetadata,a,2),o&&(e.level=o),p&&(e.transactionName=p),g&&(e.span=g),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 lf(e,t,n){e[t]=Dd(e[t],n,1)}function NU(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(s).length&&(e.user={...s,...e.user}),Object.keys(i).length&&(e.contexts={...i,...e.contexts}),o&&(e.level=o),a&&e.type!=="transaction"&&(e.transaction=a)}function BU(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function VU(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function UU(e,t){e.contexts={trace:YV(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Hi(t),...e.sdkProcessingMetadata};const n=Bn(t),r=bt(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function zU(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 wR(e,t,n,r,s,i){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,l={...t,event_id:t.event_id||n.event_id||Hr(),timestamp:t.timestamp||Od()},u=n.integrations||e.integrations.map(y=>y.name);HU(l,e),WU(l,u),s&&s.emit("applyFrameMetadata",t),t.type===void 0&&jU(l,e.stackParser);const c=KU(r,n.captureContext);n.mechanism&&su(l,n.mechanism);const d=s?s.getEventProcessors():[],f=DV().getScopeData();if(i){const y=i.getScopeData();z0(f,y)}if(c){const y=c.getScopeData();z0(f,y)}const p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),FU(l,f);const g=[...d,...f.eventProcessors];return ey(g,l,n).then(y=>(y&&qU(y),typeof o=="number"&&o>0?GU(y,o,a):y))}function HU(e,t){const{environment:n,release:r,dist:s,maxValueLength:i=250}=t;e.environment=e.environment||n||tw,!e.release&&r&&(e.release=r),!e.dist&&s&&(e.dist=s);const o=e.request;o!=null&&o.url&&(o.url=Bh(o.url,i))}function jU(e,t){var r,s;const n=LU(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 qU(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 WU(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function GU(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 KU(e,t){if(!t)return e;const n=e?e.clone():new li;return n.update(t),n}function YU(e){if(e)return XU(e)?{captureContext:e}:JU(e)?{captureContext:e}:e}function XU(e){return e instanceof li||typeof e=="function"}const QU=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function JU(e){return Object.keys(e).some(t=>QU.includes(t))}function ai(e,t){return Jt().captureException(e,YU(t))}function SR(e,t){return Jt().captureEvent(e,t)}function ZU(e,t){pi().setContext(e,t)}function ez(){const e=ct();return(e==null?void 0:e.getOptions().enabled)!==!1&&!!(e!=null&&e.getTransport())}function tz(e){pi().addEventProcessor(e)}function H0(e){const t=pi(),n=Jt(),{userAgent:r}=St.navigator||{},s=xV({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),i=t.getSession();return(i==null?void 0:i.status)==="ok"&&iu(i,{status:"exited"}),_R(),t.setSession(s),s}function _R(){const e=pi(),n=Jt().getSession()||e.getSession();n&&EV(n),kR(),e.setSession()}function kR(){const e=pi(),t=ct(),n=e.getSession();n&&t&&t.captureSession(n)}function j0(e=!1){if(e){_R();return}kR()}const nz="7";function rz(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function sz(e){return`${rz(e)}${e.projectId}/envelope/`}function iz(e,t){const n={sentry_version:nz};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function oz(e,t,n){return t||`${sz(e)}?${iz(e,n)}`}const q0=[];function az(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 lz(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 az(r)}function uz(e,t){const n={};return t.forEach(r=>{r&&xR(e,r,n)}),n}function W0(e,t){for(const n of t)n!=null&&n.afterAllSetup&&n.afterAllSetup(e)}function xR(e,t,n){if(n[t.name]){Ze&&Ce.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,q0.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),q0.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&&Ce.log(`Integration installed: ${t.name}`)}function cz(e,t,n){const r=[{type:"client_report"},{timestamp:Od(),discarded_events:e}];return rl(t?{dsn:t}:{},[r])}function ER(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 dz(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{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[Jb],exclusive_time:o==null?void 0:o[$d],measurements:e.measurements,is_segment:!0}}function fz(e){return{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&&{[Jb]:e.profile_id},...e.exclusive_time&&{[$d]:e.exclusive_time}}}},measurements:e.measurements}}const G0="Not capturing exception because it's already been captured.",K0="Discarded session because of missing or non-string release",CR=Symbol.for("SentryInternalError"),TR=Symbol.for("SentryDoNotSendEventError");function th(e){return{message:e,[CR]:!0}}function gg(e){return{message:e,[TR]:!0}}function Y0(e){return!!e&&typeof e=="object"&&CR in e}function X0(e){return!!e&&typeof e=="object"&&TR in e}class hz{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=lU(t.dsn):Ze&&Ce.warn("No DSN provided, client will not send events."),this._dsn){const n=oz(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=Hr();if(T0(t))return Ze&&Ce.log(G0),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:Hr(),...r},o=Gb(t)?t:String(t),a=Kb(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=Hr();if(n!=null&&n.originalException&&T0(n.originalException))return Ze&&Ce.log(G0),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),iu(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))):Ui(!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];xR(this,t,this._integrations),n||W0(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=_U(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=pU(r,yU(i));const s=this.sendEnvelope(r);s&&s.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){const{release:n,environment:r=tw}=this._options;if("aggregates"in t){const i=t.attrs||{};if(!i.release&&!n){Ze&&Ce.warn(K0);return}i.release=i.release||n,i.environment=i.environment||r,t.attrs=i}else{if(!t.release&&!n){Ze&&Ce.warn(K0);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const s=SU(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&&Ce.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&&Ce.error("Error while sending envelope:",n),n)):(Ze&&Ce.error("Transport disabled"),Ui({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=uz(this,t),W0(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)&&(iu(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Ao(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),wR(i,t,n,r,this,s).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:$V(r),...a.contexts};const l=fR(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:l,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=Jt(),s=pi()){return Ze&&ty(t)&&Ce.log(`Captured error event \`${ER(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,s).then(i=>i.event_id,i=>{Ze&&(X0(i)?Ce.log(i.message):Y0(i)?Ce.warn(i.message):Ce.warn(i))})}_processEvent(t,n,r,s){const i=this.getOptions(),{sampleRate:o}=i,a=PR(t),l=ty(t),u=t.type||"error",c=`before send for type \`${u}\``,d=typeof o>"u"?void 0:ja(o);if(l&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error"),Vh(gg(`Discarding event because it's not included in the random sample (sampling rate = ${o})`));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),gg("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return p;const m=mz(this,i,p,n);return pz(m,c)}).then(p=>{var y;if(p===null){if(this.recordDroppedEvent("before_send",f),a){const b=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",b)}throw gg(`${c} returned \`null\`, will not send event.`)}const g=r.getSession()||s.getSession();if(l&&g&&this._updateSessionFromEvent(g,p),a){const w=((y=p.sdkProcessingMetadata)==null?void 0:y.spanCountBeforeProcessing)||0,b=p.spans?p.spans.length:0,_=w-b;_>0&&this.recordDroppedEvent("before_send","span",_)}const m=p.transaction_info;if(a&&m&&p.transaction!==t.transaction){const w="custom";p.transaction_info={...m,source:w}}return this.sendEvent(p,n),p}).then(null,p=>{throw X0(p)||Y0(p)?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),th(`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&&Ce.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){Ze&&Ce.log("No outcomes to send");return}if(!this._dsn){Ze&&Ce.log("No dsn provided, will not send outcomes");return}Ze&&Ce.log("Sending outcomes:",t);const n=cz(t,this._options.tunnel&&Ld(this._dsn));this.sendEnvelope(n)}}function pz(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Zp(e))return e.then(r=>{if(!Xc(r)&&r!==null)throw th(n);return r},r=>{throw th(`${t} rejected with ${r}`)});if(!Xc(e)&&e!==null)throw th(n);return e}function mz(e,t,n,r){const{beforeSend:s,beforeSendTransaction:i,beforeSendSpan:o}=t;let a=n;if(ty(a)&&s)return s(a,r);if(PR(a)){if(o){const l=o(dz(a));if(l?a=Dd(n,fz(l)):Xv(),a.spans){const u=[];for(const c of a.spans){const d=o(c);d?u.push(d):(Xv(),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 ty(e){return e.type===void 0}function PR(e){return e.type==="transaction"}function gz(e){return[{type:"otel_log"},e]}function vz(e,t,n,r){const s={};return t!=null&&t.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=Ld(r)),rl(s,e.map(gz))}const yz=new WeakMap;function vg(e,t){const n=yz.get(e)??[];if(n.length===0)return;const r=e.getOptions(),s=vz(n,r._metadata,r.tunnel,e.getDsn());n.length=0,e.emit("flushLogs"),e.sendEnvelope(s)}function bz(e,t){t.debug===!0&&(Ze?Ce.enable():Yi(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Jt().update(t.initialScope);const r=new e(t);return wz(r),r.init(),r}function wz(e){Jt().setClient(e)}const RR=Symbol.for("SentryBufferFullError");function Sz(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 Vh(RR);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 Ao((a,l)=>{let u=t.length;if(!u)return a(!0);const c=setTimeout(()=>{o&&o>0&&a(!1)},o);t.forEach(d=>{Ui(d).then(()=>{--u||(clearTimeout(c),a(!0))},l)})})}return{$:t,add:s,drain:i}}const _z=60*1e3;function kz(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?_z:r-t}function xz(e,t){return e[t]||e.all||0}function IR(e,t,n=Date.now()){return xz(e,t)>n}function AR(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+kz(o,r):t===429&&(s.all=r+60*1e3);return s}const Ez=64;function Cz(e,t,n=Sz(e.bufferSize||Ez)){let r={};const s=o=>n.drain(o);function i(o){const a=[];if(D0(o,(d,f)=>{const p=$0(f);IR(r,p)?e.recordDroppedEvent("ratelimit_backoff",p):a.push(d)}),a.length===0)return Ui({});const l=rl(o[0],a),u=d=>{D0(l,(f,p)=>{e.recordDroppedEvent(d,$0(p))})},c=()=>t({body:mU(l)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&Ze&&Ce.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=AR(r,d),d),d=>{throw u("network_error"),Ze&&Ce.error("Encountered error running transport request:",d),d});return n.add(c).then(d=>d,d=>{if(d===RR)return Ze&&Ce.error("Skipped sending event because buffer is full."),u("queue_overflow"),Ui({});throw d})}return{send:i,flush:s}}function Tz(e,t){const n=t==null?void 0:t.getDsn(),r=t==null?void 0:t.getOptions().tunnel;return Rz(e,n)||Pz(e,r)}function Pz(e,t){return t?Q0(e)===Q0(t):!1}function Rz(e,t){return t?e.includes(t.host):!1}function Q0(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function Iz(e){var t;((t=e.user)==null?void 0:t.ip_address)===void 0&&(e.user={...e.user,ip_address:"{{auto}}"})}function Az(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 OR(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:Ra})),version:Ra}),e._metadata=s}function MR(e={}){const t=ct();if(!ez()||!t)return{};const n=tl(),r=$u(n);if(r.getTraceData)return r.getTraceData(e);const s=Jt(),i=e.span||zn(),o=i?XV(i):Oz(s),a=i?Hi(i):fR(t,s),l=zV(a);return sR.test(o)?{"sentry-trace":o,baggage:l}:(Ce.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function Oz(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return iR(t,r,n)}const Mz=100;function Mo(e,t){const n=ct(),r=pi();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=Mz}=n.getOptions();if(i<=0)return;const a={timestamp:Od(),...e},l=s?Yi(()=>s(a,t)):a;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,t),r.addBreadcrumb(l,i))}let J0;const Dz="FunctionToString",Z0=new WeakMap,$z=()=>({name:Dz,setupOnce(){J0=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Xb(this),n=Z0.has(ct())&&t!==void 0?t:this;return J0.apply(n,e)}}catch{}},setup(e){Z0.set(e,!0)}}),Lz=$z,Fz=[/^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$/],Nz="EventFilters",Bz=(e={})=>{let t;return{name:Nz,setup(n){const r=n.getOptions();t=e1(e,r)},processEvent(n,r,s){if(!t){const i=s.getOptions();t=e1(e,i)}return Uz(n,t)?null:n}}},Vz=(e={})=>({...Bz(e),name:"InboundFilters"});function e1(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Fz],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Uz(e,t){if(e.type){if(e.type==="transaction"&&Hz(e,t.ignoreTransactions))return Ze&&Ce.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
40
+ Event: ${ua(e)}`),!0}else{if(zz(e,t.ignoreErrors))return Ze&&Ce.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
41
+ Event: ${ua(e)}`),!0;if(Gz(e))return Ze&&Ce.warn(`Event dropped due to not having an error message, error type or stacktrace.
42
+ Event: ${ua(e)}`),!0;if(jz(e,t.denyUrls))return Ze&&Ce.warn(`Event dropped due to being matched by \`denyUrls\` option.
43
+ Event: ${ua(e)}.
44
+ Url: ${Hh(e)}`),!0;if(!qz(e,t.allowUrls))return Ze&&Ce.warn(`Event dropped due to not being matched by \`allowUrls\` option.
45
+ Event: ${ua(e)}.
46
+ Url: ${Hh(e)}`),!0}return!1}function zz(e,t){return t!=null&&t.length?ER(e).some(n=>xo(n,t)):!1}function Hz(e,t){if(!(t!=null&&t.length))return!1;const n=e.transaction;return n?xo(n,t):!1}function jz(e,t){if(!(t!=null&&t.length))return!1;const n=Hh(e);return n?xo(n,t):!1}function qz(e,t){if(!(t!=null&&t.length))return!0;const n=Hh(e);return n?xo(n,t):!0}function Wz(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 Hh(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?Wz(s):null}catch{return Ze&&Ce.error(`Cannot extract url for event ${ua(e)}`),null}}function Gz(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)!=null&&n.length?!e.message&&!e.exception.values.some(r=>r.stacktrace||r.type&&r.type!=="Error"||r.value):!1}function Kz(e,t,n,r,s,i){var a;if(!((a=s.exception)!=null&&a.values)||!i||!Bi(i.originalException,Error))return;const o=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;o&&(s.exception.values=ny(e,t,r,i.originalException,n,s.exception.values,o,0))}function ny(e,t,n,r,s,i,o,a){if(i.length>=n+1)return i;let l=[...i];if(Bi(r[s],Error)){t1(o,a);const u=e(t,r[s]),c=l.length;n1(u,s,c,a),l=ny(e,t,n,r[s],s,[u,...l],u,c)}return Array.isArray(r.errors)&&r.errors.forEach((u,c)=>{if(Bi(u,Error)){t1(o,a);const d=e(t,u),f=l.length;n1(d,`errors[${c}]`,f,a),l=ny(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 Yz(e){const t="console";jo(t,e),qo(t,Xz)}function Xz(){"console"in St&&qv.forEach(function(e){e in St.console&&xr(St.console,e,function(t){return Nh[e]=t,function(...n){os("console",{args:n,level:e});const s=Nh[e];s==null||s.apply(St.console,n)}})})}function DR(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const Qz="Dedupe",Jz=()=>{let e;return{name:Qz,processEvent(t){if(t.type)return t;try{if(eH(t,e))return Ze&&Ce.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Zz=Jz;function eH(e,t){return t?!!(tH(e,t)||nH(e,t)):!1}function tH(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!LR(e,t)||!$R(e,t))}function nH(e,t){const n=r1(t),r=r1(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!LR(e,t)||!$R(e,t))}function $R(e,t){let n=S0(e),r=S0(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 LR(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]}const rH="thismessage:/";function FR(e){return"isRelative"in e}function sH(e,t){const n=e.startsWith("/"),r=n?rH:void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const s=new URL(e,r);return n?{isRelative:n,pathname:s.pathname,search:s.search,hash:s.hash}:s}catch{}}function iH(e){if(FR(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function Oa(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 oH(e){return e.split(/[?#]/,1)[0]}function aH(e,t,n,r,s="auto.http.browser"){if(!e.fetchData)return;const{method:i,url:o}=e.fetchData,a=zi()&&t(o);if(e.endTimestamp&&a){const d=e.fetchData.__span;if(!d)return;const f=r[d];f&&(uH(f,e),delete r[d]);return}const l=!!zn(),u=a&&l?Wa(dH(o,i,s)):new qa;if(e.fetchData.__span=u.spanContext().spanId,r[u.spanContext().spanId]=u,n(e.fetchData.url)){const d=e.args[0],f=e.args[1]||{},p=lH(d,f,zi()&&l?u:void 0);p&&(e.args[1]=f,f.headers=p)}const c=ct();if(c){const d={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};c.emit("beforeOutgoingRequestSpan",u,d)}return u}function lH(e,t,n){const r=MR({span:n}),s=r["sentry-trace"],i=r.baggage;if(!s)return;const o=t.headers||(GP(e)?e.headers:void 0);if(o)if(cH(o)){const a=new Headers(o);if(a.set("sentry-trace",s),i){const l=a.get("baggage");if(l){const u=uf(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,uf(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"?uf(u):u).filter(u=>u===""):a&&l.push(uf(a)),i&&l.push(i),{...o,"sentry-trace":s,baggage:l.length>0?l.join(","):void 0}}else return{...r}}function uH(e,t){var n;if(t.response){eR(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:Cn,message:"internal_error"});e.end()}function uf(e){return e.split(",").filter(t=>!t.split("=")[0].startsWith(Zb)).join(",")}function cH(e){return typeof Headers<"u"&&Bi(e,Headers)}function dH(e,t,n){const r=sH(e);return{name:r?`${t} ${iH(r)}`:t,attributes:fH(e,r,t,n)}}function fH(e,t,n,r){const s={url:e,type:"fetch","http.method":n,[on]:r,[Ha]:"http.client"};return t&&(FR(t)||(s["http.url"]=t.href,s["server.address"]=t.host),t.search&&(s["http.query"]=t.search),t.hash&&(s["http.fragment"]=t.hash)),s}function NR(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const Jc=St;function hH(){return"history"in Jc&&!!Jc.history}function BR(){if(!("fetch"in Jc))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function ry(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function pH(){var n;if(typeof EdgeRuntime=="string")return!0;if(!BR())return!1;if(ry(Jc.fetch))return!0;let e=!1;const t=Jc.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=ry(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){Ho&&Ce.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function VR(e,t){const n="fetch";jo(n,e),qo(n,()=>UR(void 0,t))}function mH(e){const t="fetch-body-resolved";jo(t,e),qo(t,()=>UR(vH))}function UR(e,t=!1){t&&!pH()||xr(St,"fetch",function(n){return function(...r){const s=new Error,{method:i,url:o}=yH(r),a={args:r,fetchData:{method:i,url:o},startTimestamp:er()*1e3,virtualError:s,headers:bH(r)};return e||os("fetch",{...a}),n.apply(St,r).then(async l=>(e?e(l):os("fetch",{...a,endTimestamp:er()*1e3,response:l}),l),l=>{if(os("fetch",{...a,endTimestamp:er()*1e3,error:l}),Wb(l)&&l.stack===void 0&&(l.stack=s.stack,qr(l,"framesToPop",1)),l instanceof TypeError&&(l.message==="Failed to fetch"||l.message==="Load failed"||l.message==="NetworkError when attempting to fetch resource."))try{const u=new URL(a.fetchData.url);l.message=`${l.message} (${u.host})`}catch{}throw l})}})}async function gH(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 vH(e){let t;try{t=e.clone()}catch{return}gH(t,()=>{os("fetch-body-resolved",{endTimestamp:er()*1e3,response:e})})}function sy(e,t){return!!e&&typeof e=="object"&&!!e[t]}function s1(e){return typeof e=="string"?e:e?sy(e,"url")?e.url:e.toString?e.toString():"":""}function yH(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:s1(n),method:sy(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:s1(t),method:sy(t,"method")?String(t.method).toUpperCase():"GET"}}function bH(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(GP(t))return new Headers(t.headers)}catch{}}function wH(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function SH(){return"npm"}function _H(){return!wH()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function i1(){return typeof window<"u"&&(!_H()||kH())}function kH(){const e=St.process;return(e==null?void 0:e.type)==="renderer"}const wt=St;let iy=0;function zR(){return iy>0}function xH(){iy++,setTimeout(()=>{iy--})}function au(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(Xb(e))return e}catch{return e}const r=function(...s){try{const i=s.map(o=>au(o,t));return e.apply(this,i)}catch(i){throw xH(),Qb(o=>{o.addEventProcessor(a=>(t.mechanism&&(Wv(a,void 0),su(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),ai(i)}),i}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}YP(r,e),qr(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function sw(e,t){const n=iw(e,t),r={type:RH(t),value:IH(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function EH(e,t,n,r){const s=ct(),i=s==null?void 0:s.getOptions().normalizeDepth,o=$H(t),a={__serialized__:pR(t,i)};if(o)return{exception:{values:[sw(e,o)]},extra:a};const l={exception:{values:[{type:Jp(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:MH(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=iw(e,n);u.length&&(l.exception.values[0].stacktrace={frames:u})}return l}function yg(e,t){return{exception:{values:[sw(e,t)]}}}function iw(e,t){const n=t.stacktrace||t.stack||"",r=TH(t),s=PH(t);try{return e(n,r,s)}catch{}return[]}const CH=/Minified React error #\d+;/i;function TH(e){return e&&CH.test(e.message)?1:0}function PH(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function HR(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function RH(e){const t=e==null?void 0:e.name;return!t&&HR(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function IH(e){const t=e==null?void 0:e.message;return HR(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 AH(e,t,n,r){const s=(n==null?void 0:n.syntheticException)||void 0,i=ow(e,t,s,r);return su(i),i.level="error",n!=null&&n.event_id&&(i.event_id=n.event_id),Ui(i)}function OH(e,t,n="info",r,s){const i=(r==null?void 0:r.syntheticException)||void 0,o=oy(e,t,i,s);return o.level=n,r!=null&&r.event_id&&(o.event_id=r.event_id),Ui(o)}function ow(e,t,n,r,s){let i;if(qP(t)&&t.error)return yg(e,t.error);if(k0(t)||pV(t)){const o=t;if("stack"in t)i=yg(e,t);else{const a=o.name||(k0(o)?"DOMError":"DOMException"),l=o.message?`${a}: ${o.message}`:a;i=oy(e,l,n,r),Wv(i,l)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Wb(t)?yg(e,t):Xc(t)||Jp(t)?(i=EH(e,t,n,s),su(i,{synthetic:!0}),i):(i=oy(e,t,n,r),Wv(i,`${t}`),su(i,{synthetic:!0}),i)}function oy(e,t,n,r){const s={};if(r&&n){const i=iw(e,n);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]}),su(s,{synthetic:!0})}if(Gb(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 MH(e,{isUnhandledRejection:t}){const n=SV(e),r=t?"promise rejection":"exception";return qP(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Jp(e)?`Event \`${DH(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function DH(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function $H(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}const LH=5e3;class FH extends hz{constructor(t){const n={parentSpanIsAlwaysRootSpan:!0,...t},r=wt.SENTRY_SDK_SOURCE||SH();OR(n,"browser",["browser"],r),super(n);const s=this,{sendDefaultPii:i,_experiments:o}=s._options,a=o==null?void 0:o.enableLogs;n.sendClientReports&&wt.document&&wt.document.addEventListener("visibilitychange",()=>{wt.document.visibilityState==="hidden"&&(this._flushOutcomes(),a&&vg(s))}),a&&(s.on("flush",()=>{vg(s)}),s.on("afterCaptureLog",()=>{s._logFlushIdleTimeout&&clearTimeout(s._logFlushIdleTimeout),s._logFlushIdleTimeout=setTimeout(()=>{vg(s)},LH)})),i&&(s.on("postprocessEvent",Iz),s.on("beforeSendSession",Az))}eventFromException(t,n){return AH(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return OH(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 Zc=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,NH=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Lu=(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=NH(t.value,n),e(t)))}},at=St,BH=()=>`v4-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Fd=(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},Nd=()=>{const e=Fd();return(e==null?void 0:e.activationStart)||0},Fu=(e,t)=>{var i,o;const n=Fd();let r="navigate";return n&&((i=at.document)!=null&&i.prerendering||Nd()>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:BH(),navigationType:r}},sl=(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{}},Nu=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))},nm=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let Cc=-1;const VH=()=>at.document.visibilityState==="hidden"&&!at.document.prerendering?0:1/0,jh=e=>{at.document.visibilityState==="hidden"&&Cc>-1&&(Cc=e.type==="visibilitychange"?e.timeStamp:0,zH())},UH=()=>{addEventListener("visibilitychange",jh,!0),addEventListener("prerenderingchange",jh,!0)},zH=()=>{removeEventListener("visibilitychange",jh,!0),removeEventListener("prerenderingchange",jh,!0)},rm=()=>(at.document&&Cc<0&&(Cc=VH(),UH()),{get firstHiddenTime(){return Cc}}),Bd=e=>{var t;(t=at.document)!=null&&t.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},HH=[1800,3e3],jH=(e,t={})=>{Bd(()=>{const n=rm(),r=Fu("FCP");let s;const o=sl("paint",a=>{a.forEach(l=>{l.name==="first-contentful-paint"&&(o.disconnect(),l.startTime<n.firstHiddenTime&&(r.value=Math.max(l.startTime-Nd(),0),r.entries.push(l),s(!0)))})});o&&(s=Lu(e,r,HH,t.reportAllChanges))})},qH=[.1,.25],WH=(e,t={})=>{jH(nm(()=>{const n=Fu("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=sl("layout-shift",o);a&&(r=Lu(e,n,qH,t.reportAllChanges),Nu(()=>{o(a.takeRecords()),r(!0)}),setTimeout(r,0))}))},GH=[100,300],KH=(e,t={})=>{Bd(()=>{const n=rm(),r=Fu("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=sl("first-input",o);s=Lu(e,r,GH,t.reportAllChanges),a&&Nu(nm(()=>{o(a.takeRecords()),a.disconnect()}))})};let jR=0,bg=1/0,cf=0;const YH=e=>{e.forEach(t=>{t.interactionId&&(bg=Math.min(bg,t.interactionId),cf=Math.max(cf,t.interactionId),jR=cf?(cf-bg)/7+1:0)})};let ay;const XH=()=>ay?jR:performance.interactionCount||0,QH=()=>{"interactionCount"in performance||ay||(ay=sl("event",YH,{type:"event",buffered:!0,durationThreshold:0}))},Ci=[],wg=new Map,JH=40;let ZH=0;const e3=()=>XH()-ZH,t3=()=>{const e=Math.min(Ci.length-1,Math.floor(e3()/50));return Ci[e]},Sg=10,n3=[],r3=e=>{var r;if(n3.forEach(s=>s(e)),!(e.interactionId||e.entryType==="first-input"))return;const t=Ci[Ci.length-1],n=wg.get(e.interactionId);if(n||Ci.length<Sg||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]};wg.set(s.id,s),Ci.push(s)}Ci.sort((s,i)=>i.latency-s.latency),Ci.length>Sg&&Ci.splice(Sg).forEach(s=>wg.delete(s.id))}},qR=e=>{var r;const t=at.requestIdleCallback||at.setTimeout;let n=-1;return e=nm(e),((r=at.document)==null?void 0:r.visibilityState)==="hidden"?e():(n=t(e),Nu(e)),n},s3=[200,500],i3=(e,t={})=>{"PerformanceEventTiming"in at&&"interactionId"in PerformanceEventTiming.prototype&&Bd(()=>{QH();const n=Fu("INP");let r;const s=o=>{qR(()=>{o.forEach(r3);const a=t3();a&&a.latency!==n.value&&(n.value=a.latency,n.entries=a.entries,r())})},i=sl("event",s,{durationThreshold:t.durationThreshold!=null?t.durationThreshold:JH});r=Lu(e,n,s3,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),Nu(()=>{s(i.takeRecords()),r(!0)}))})},o3=[2500,4e3],o1={},a3=(e,t={})=>{Bd(()=>{const n=rm(),r=Fu("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-Nd(),0),r.entries=[l],s())})},o=sl("largest-contentful-paint",i);if(o){s=Lu(e,r,o3,t.reportAllChanges);const a=nm(()=>{o1[r.id]||(i(o.takeRecords()),o.disconnect(),o1[r.id]=!0,s(!0))});["keydown","click"].forEach(l=>{at.document&&addEventListener(l,()=>qR(a),{once:!0,capture:!0})}),Nu(a)}})},l3=[800,1800],ly=e=>{var t,n;(t=at.document)!=null&&t.prerendering?Bd(()=>ly(e)):((n=at.document)==null?void 0:n.readyState)!=="complete"?addEventListener("load",()=>ly(e),!0):setTimeout(e,0)},u3=(e,t={})=>{const n=Fu("TTFB"),r=Lu(e,n,l3,t.reportAllChanges);ly(()=>{const s=Fd();s&&(n.value=Math.max(s.responseStart-Nd(),0),n.entries=[s],r(!0))})},Tc={},qh={};let WR,GR,KR,YR,XR;function aw(e,t=!1){return Vd("cls",e,d3,WR,t)}function QR(e,t=!1){return Vd("lcp",e,h3,KR,t)}function JR(e){return Vd("fid",e,f3,GR)}function c3(e){return Vd("ttfb",e,p3,YR)}function ZR(e){return Vd("inp",e,m3,XR)}function lu(e,t){return eI(e,t),qh[e]||(g3(e),qh[e]=!0),tI(e,t)}function Bu(e,t){const n=Tc[e];if(n!=null&&n.length)for(const r of n)try{r(t)}catch(s){Zc&&Ce.error(`Error while triggering instrumentation handler.
47
+ Type: ${e}
48
+ Name: ${Ni(r)}
49
+ Error:`,s)}}function d3(){return WH(e=>{Bu("cls",{metric:e}),WR=e},{reportAllChanges:!0})}function f3(){return KH(e=>{Bu("fid",{metric:e}),GR=e})}function h3(){return a3(e=>{Bu("lcp",{metric:e}),KR=e},{reportAllChanges:!0})}function p3(){return u3(e=>{Bu("ttfb",{metric:e}),YR=e})}function m3(){return i3(e=>{Bu("inp",{metric:e}),XR=e})}function Vd(e,t,n,r,s=!1){eI(e,t);let i;return qh[e]||(i=n(),qh[e]=!0),r&&t({metric:r}),tI(e,t,s?i:void 0)}function g3(e){const t={};e==="event"&&(t.durationThreshold=0),sl(e,n=>{Bu(e,{entries:n})},t)}function eI(e,t){Tc[e]=Tc[e]||[],Tc[e].push(t)}function tI(e,t,n){return()=>{n&&n();const r=Tc[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function v3(e){return"duration"in e}function _g(e){return typeof e=="number"&&isFinite(e)}function ji(e,t,n,{...r}){const s=bt(e).start_timestamp;return s&&s>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),vR(e,()=>{const i=Wa({startTime:t,...r});return i&&i.end(n),i})}function nI(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=Jt(),f=d.getUser(),p=f!==void 0?f.email||f.id||f.ip_address:void 0;let g;try{g=d.getScopeData().contexts.profile.profile_id}catch{}const m={release:o,environment:a,user:p||void 0,profile_id:g||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 Wa({name:n,attributes:m,startTime:i,experimental:{standalone:!0}})}function lw(){return at.addEventListener&&at.performance}function hn(e){return e/1e3}function rI(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 y3(){let e=0,t,n;if(!w3())return;let r=!1;function s(){r||(r=!0,n&&b3(e,t,n),i())}const i=aw(({metric:o})=>{const a=o.entries[o.entries.length-1];a&&(e=o.value,t=a)},!0);Nu(()=>{s()}),setTimeout(()=>{const o=ct();if(!o)return;const a=o.on("startNavigationSpan",()=>{s(),a==null||a()}),l=zn();if(l){const u=Bn(l);bt(u).op==="pageload"&&(n=u.spanContext().spanId)}},0)}function b3(e,t,n){var l;Zc&&Ce.log(`Sending CLS span (${e})`);const r=hn((Kr()||0)+((t==null?void 0:t.startTime)||0)),s=Jt().getScopeData().transactionName,i=t?Vi((l=t.sources[0])==null?void 0:l.node):"Layout shift",o={[on]:"auto.http.browser.cls",[Ha]:"ui.webvital.cls",[$d]:(t==null?void 0:t.duration)||0,"sentry.pageload.span_id":n},a=nI({name:i,transaction:s,attributes:o,startTime:r});a&&(a.addEvent("cls",{[em]:"",[tm]:e}),a.end(r))}function w3(){try{return PerformanceObserver.supportedEntryTypes.includes("layout-shift")}catch{return!1}}const S3=2147483647;let a1=0,$n={},yr,Cl;function _3({recordClsStandaloneSpans:e}){const t=lw();if(t&&Kr()){t.mark&&at.performance.mark("sentry-tracing-init");const n=P3(),r=T3(),s=R3(),i=e?y3():C3();return()=>{n(),r(),s(),i==null||i()}}return()=>{}}function k3(){lu("longtask",({entries:e})=>{const t=zn();if(!t)return;const{op:n,start_timestamp:r}=bt(t);for(const s of e){const i=hn(Kr()+s.startTime),o=hn(s.duration);n==="navigation"&&r&&i<r||ji(t,i,i+o,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[on]:"auto.ui.browser.metrics"}})}})}function x3(){new PerformanceObserver(t=>{const n=zn();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const s=hn(Kr()+r.startTime),{start_timestamp:i,op:o}=bt(n);if(o==="navigation"&&i&&s<i)continue;const a=hn(r.duration),l={[on]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:c,invokerType:d,sourceURL:f,sourceFunctionName:p,sourceCharPosition:g}=u;l["browser.script.invoker"]=c,l["browser.script.invoker_type"]=d,f&&(l["code.filepath"]=f),p&&(l["code.function"]=p),g!==-1&&(l["browser.script.source_char_position"]=g),ji(n,s,s+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:l})}}).observe({type:"long-animation-frame",buffered:!0})}function E3(){lu("event",({entries:e})=>{const t=zn();if(t){for(const n of e)if(n.name==="click"){const r=hn(Kr()+n.startTime),s=hn(n.duration),i={name:Vi(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[on]:"auto.ui.browser.metrics"}},o=KP(n.target);o&&(i.attributes["ui.component_name"]=o),ji(t,r,r+s,i)}}})}function C3(){return aw(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&($n.cls={value:e.value,unit:""},Cl=t)},!0)}function T3(){return QR(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&($n.lcp={value:e.value,unit:"millisecond"},yr=t)},!0)}function P3(){return JR(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=hn(Kr()),r=hn(t.startTime);$n.fid={value:e.value,unit:"millisecond"},$n["mark.fid"]={value:n+r,unit:"second"}})}function R3(){return c3(({metric:e})=>{e.entries[e.entries.length-1]&&($n.ttfb={value:e.value,unit:"millisecond"})})}function I3(e,t){const n=lw(),r=Kr();if(!(n!=null&&n.getEntries)||!r)return;const s=hn(r),i=n.getEntries(),{op:o,start_timestamp:a}=bt(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":{O3(e,l,s);break}case"mark":case"paint":case"measure":{A3(e,l,u,c,s);const d=rm(),f=l.startTime<d.firstHiddenTime;l.name==="first-paint"&&f&&($n.fp={value:l.startTime,unit:"millisecond"}),l.name==="first-contentful-paint"&&f&&($n.fcp={value:l.startTime,unit:"millisecond"});break}case"resource":{$3(e,l,l.name,u,c,s);break}}}),a1=Math.max(i.length-1,0),L3(e),o==="pageload"){N3($n);const l=$n["mark.fid"];l&&$n.fid&&(ji(e,l.value,l.value+hn($n.fid.value),{name:"first input delay",op:"ui.action",attributes:{[on]:"auto.ui.browser.metrics"}}),delete $n["mark.fid"]),(!("fcp"in $n)||!t.recordClsOnPageloadSpan)&&delete $n.cls,Object.entries($n).forEach(([u,c])=>{xU(u,c.value,c.unit)}),e.setAttribute("performance.timeOrigin",s),e.setAttribute("performance.activationStart",Nd()),F3(e)}yr=void 0,Cl=void 0,$n={}}function A3(e,t,n,r,s){const i=Fd(!1),o=hn(i?i.requestStart:0),a=s+Math.max(n,o),l=s+n,u=l+r,c={[on]:"auto.resource.browser.metrics"};a!==l&&(c["sentry.browser.measure_happened_before_request"]=!0,c["sentry.browser.measure_start_time"]=a),a<=u&&ji(e,a,u,{name:t.name,op:t.entryType,attributes:c})}function O3(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{df(e,t,r,n)}),df(e,t,"secureConnection",n,"TLS/SSL"),df(e,t,"fetch",n,"cache"),df(e,t,"domainLookup",n,"DNS"),D3(e,t,n)}function df(e,t,n,r,s=n){const i=M3(n),o=t[i],a=t[`${n}Start`];!a||!o||ji(e,r+hn(a),r+hn(o),{op:`browser.${s}`,name:t.name,attributes:{[on]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function M3(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function D3(e,t,n){const r=n+hn(t.requestStart),s=n+hn(t.responseEnd),i=n+hn(t.responseStart);t.responseEnd&&(ji(e,r,s,{op:"browser.request",name:t.name,attributes:{[on]:"auto.ui.browser.metrics"}}),ji(e,i,s,{op:"browser.response",name:t.name,attributes:{[on]:"auto.ui.browser.metrics"}}))}function $3(e,t,n,r,s,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const o=Oa(n),a={[on]:"auto.resource.browser.metrics"};kg(a,t,"transferSize","http.response_transfer_size"),kg(a,t,"encodedBodySize","http.response_content_length"),kg(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}=rI(t.nextHopProtocol);a["network.protocol.name"]=c,a["network.protocol.version"]=d;const f=i+r,p=f+s;ji(e,f,p,{name:n.replace(at.location.origin,""),op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",attributes:a})}function L3(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),_g(n.rtt)&&($n["connection.rtt"]={value:n.rtt,unit:"millisecond"})),_g(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),_g(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function F3(e){yr&&(yr.element&&e.setAttribute("lcp.element",Vi(yr.element)),yr.id&&e.setAttribute("lcp.id",yr.id),yr.url&&e.setAttribute("lcp.url",yr.url.trim().slice(0,200)),yr.loadTime!=null&&e.setAttribute("lcp.loadTime",yr.loadTime),yr.renderTime!=null&&e.setAttribute("lcp.renderTime",yr.renderTime),e.setAttribute("lcp.size",yr.size)),Cl!=null&&Cl.sources&&Cl.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,Vi(t.node)))}function kg(e,t,n,r){const s=t[n];s!=null&&s<S3&&(e[r]=s)}function N3(e){const t=Fd(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const B3=1e3;let l1,uy,cy;function sI(e){const t="dom";jo(t,e),qo(t,V3)}function V3(){if(!at.document)return;const e=os.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")&&(xr(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)}}),xr(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 U3(e){if(e.type!==uy)return!1;try{if(!e.target||e.target._sentryId!==cy)return!1}catch{}return!0}function z3(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=H3(n);if(z3(n.type,r))return;qr(n,"_sentryCaptured",!0),r&&!r._sentryId&&qr(r,"_sentryId",Hr());const s=n.type==="keypress"?"input":n.type;U3(n)||(e({event:n,name:s,global:t}),uy=n.type,cy=r?r._sentryId:void 0),clearTimeout(l1),l1=at.setTimeout(()=>{cy=void 0,uy=void 0},B3)}}function H3(e){try{return e.target}catch{return null}}let ff;function sm(e){const t="history";jo(t,e),qo(t,j3)}function j3(){if(at.addEventListener("popstate",()=>{const t=at.location.href,n=ff;if(ff=t,n===t)return;os("history",{from:n,to:t})}),!hH())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const s=ff,i=String(r);if(ff=i,s===i)return t.apply(this,n);os("history",{from:s,to:i})}return t.apply(this,n)}}xr(at.history,"pushState",e),xr(at.history,"replaceState",e)}const nh={};function iI(e){const t=nh[e];if(t)return t;let n=at[e];if(ry(n))return nh[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){Zc&&Ce.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,s)}return n&&(nh[e]=n.bind(at))}function c1(e){nh[e]=void 0}function uu(...e){return iI("setTimeout")(...e)}const fa="__sentry_xhr_v3__";function oI(e){const t="xhr";jo(t,e),qo(t,q3)}function q3(){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=Oi(r[0])?r[0].toUpperCase():void 0,a=W3(r[1]);if(!o||!a)return t.apply(n,r);n[fa]={method:o,url:a,request_headers:{}},o==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const l=()=>{const u=n[fa];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const c={endTimestamp:er()*1e3,startTimestamp:i,xhr:n,virtualError:s};os("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,g=c[fa];return g&&Oi(f)&&Oi(p)&&(g.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[fa];if(!s)return t.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const i={startTimestamp:er()*1e3,xhr:n};return os("xhr",i),t.apply(n,r)}})}function W3(e){if(Oi(e))return e;try{return e.toString()}catch{}}function aI(e){return new URLSearchParams(e).toString()}function lI(e,t=Ce){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[aI(e)];if(!e)return[void 0]}catch(n){return Zc&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Zc&&t.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function uI(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}const xg=[],rh=new Map;function G3(){if(lw()&&Kr()){const t=K3();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 K3(){return ZR(({metric:e})=>{if(e.value==null)return;const t=e.entries.find(g=>g.duration===e.value&&d1[g.name]);if(!t)return;const{interactionId:n}=t,r=d1[t.name],s=hn(Kr()+t.startTime),i=hn(e.value),o=zn(),a=o?Bn(o):void 0,u=(n!=null?rh.get(n):void 0)||a,c=u?bt(u).description:Jt().getScopeData().transactionName,d=Vi(t.target),f={[on]:"auto.http.browser.inp",[Ha]:`ui.interaction.${r}`,[$d]:t.duration},p=nI({name:d,transaction:c,attributes:f,startTime:s});p&&(p.addEvent("inp",{[em]:"millisecond",[tm]:e.value}),p.end(s+i))})}function Y3(){const e=({entries:t})=>{const n=zn(),r=n&&Bn(n);t.forEach(s=>{if(!v3(s)||!r)return;const i=s.interactionId;if(i!=null&&!rh.has(i)){if(xg.length>10){const o=xg.shift();rh.delete(o)}xg.push(i),rh.set(i,r)}})};lu("event",e),lu("first-input",e)}function X3(e,t=iI("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"),Vh("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--,Vh(l)}}return Cz(e,s)}const Q3=30,J3=50;function dy(e,t,n,r){const s={filename:e,function:t==="<anonymous>"?za:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const Z3=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,e4=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,t4=/\((\S*)(?::(\d+))(?::(\d+))\)/,n4=e=>{const t=Z3.exec(e);if(t){const[,r,s,i]=t;return dy(r,za,+s,+i)}const n=e4.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const o=t4.exec(n[2]);o&&(n[2]=o[1],n[3]=o[2],n[4]=o[3])}const[s,i]=cI(n[1]||za,n[2]);return dy(i,s,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},r4=[Q3,n4],s4=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,i4=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,o4=e=>{const t=s4.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=i4.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]||za;return[s,r]=cI(s,r),dy(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},a4=[J3,o4],l4=[r4,a4],u4=VP(...l4),cI=(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]:za,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},ls=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,hf=1024,c4="Breadcrumbs",d4=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:c4,setup(n){t.console&&Yz(m4(n)),t.dom&&sI(p4(n,t.dom)),t.xhr&&oI(g4(n)),t.fetch&&VR(v4(n)),t.history&&sm(y4(n)),t.sentry&&n.on("beforeSendEvent",h4(n))}}},f4=d4;function h4(e){return function(n){ct()===e&&Mo({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:ua(n)},{event:n})}}function p4(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>hf&&(ls&&Ce.warn(`\`dom.maxStringLength\` cannot exceed ${hf}, but a value of ${a} was configured. Sentry will use ${hf} instead.`),a=hf),typeof o=="string"&&(o=[o]);try{const u=r.event,c=b4(u)?u.target:u;s=Vi(c,{keyAttrs:o,maxStringLength:a}),i=KP(c)}catch{s="<unknown>"}if(s.length===0)return;const l={category:`ui.${r.name}`,message:s};i&&(l.data={"ui.component_name":i}),Mo(l,{event:r.event,name:r.name,global:r.global})}}function m4(e){return function(n){if(ct()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:DR(n.level),message:x0(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${x0(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Mo(r,{input:n.args,level:n.level})}}function g4(e){return function(n){if(ct()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[fa];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:NR(l)};e.emit("beforeOutgoingRequestBreadcrumb",f,d),Mo(f,d)}}function v4(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),Mo(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:NR(o.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",l,a),Mo(l,a)}}}function y4(e){return function(n){if(ct()!==e)return;let r=n.from,s=n.to;const i=Oa(wt.location.href);let o=r?Oa(r):void 0;const a=Oa(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),Mo({category:"navigation",data:{from:r,to:s}})}}function b4(e){return!!e&&!!e.target}const w4=["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"],S4="BrowserApiErrors",_4=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:S4,setupOnce(){t.setTimeout&&xr(wt,"setTimeout",f1),t.setInterval&&xr(wt,"setInterval",f1),t.requestAnimationFrame&&xr(wt,"requestAnimationFrame",x4),t.XMLHttpRequest&&"XMLHttpRequest"in wt&&xr(XMLHttpRequest.prototype,"send",E4);const n=t.eventTarget;n&&(Array.isArray(n)?n:w4).forEach(C4)}}},k4=_4;function f1(e){return function(...t){const n=t[0];return t[0]=au(n,{mechanism:{data:{function:Ni(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function x4(e){return function(t){return e.apply(this,[au(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Ni(e)},handled:!1,type:"instrument"}})])}}function E4(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&xr(n,s,function(i){const o={mechanism:{data:{function:s,handler:Ni(i)},handled:!1,type:"instrument"}},a=Xb(i);return a&&(o.mechanism.data.handler=Ni(a)),au(i,o)})}),e.apply(this,t)}}function C4(e){var r,s;const n=(r=wt[e])==null?void 0:r.prototype;(s=n==null?void 0:n.hasOwnProperty)!=null&&s.call(n,"addEventListener")&&(xr(n,"addEventListener",function(i){return function(o,a,l){try{T4(a)&&(a.handleEvent=au(a.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Ni(a),target:e},handled:!1,type:"instrument"}}))}catch{}return i.apply(this,[o,au(a,{mechanism:{data:{function:"addEventListener",handler:Ni(a),target:e},handled:!1,type:"instrument"}}),l])}}),xr(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 T4(e){return typeof e.handleEvent=="function"}const P4=()=>({name:"BrowserSession",setupOnce(){if(typeof wt.document>"u"){ls&&Ce.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}H0({ignoreDuration:!0}),j0(),sm(({from:e,to:t})=>{e!==void 0&&e!==t&&(H0({ignoreDuration:!0}),j0())})}}),R4="GlobalHandlers",I4=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:R4,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(O4(n),h1("onerror")),t.onunhandledrejection&&(M4(n),h1("onunhandledrejection"))}}},A4=I4;function O4(e){UP(t=>{const{stackParser:n,attachStacktrace:r}=dI();if(ct()!==e||zR())return;const{msg:s,url:i,line:o,column:a,error:l}=t,u=L4(ow(n,l||s,void 0,r,!1),i,o,a);u.level="error",SR(u,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function M4(e){zP(t=>{const{stackParser:n,attachStacktrace:r}=dI();if(ct()!==e||zR())return;const s=D4(t),i=Kb(s)?$4(s):ow(n,s,void 0,r,!0);i.level="error",SR(i,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function D4(e){if(Kb(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 $4(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function L4(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=Oi(t)&&t.length>0?t:Du();return l.length===0&&l.push({colno:u,filename:d,function:za,in_app:!0,lineno:c}),e}function h1(e){ls&&Ce.log(`Global Handler attached: ${e}`)}function dI(){const e=ct();return(e==null?void 0:e.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}const F4=()=>({name:"HttpContext",preprocessEvent(e){var o,a;if(!wt.navigator&&!wt.location&&!wt.document)return;const t=((o=e.request)==null?void 0:o.url)||Du(),{referrer:n}=wt.document||{},{userAgent:r}=wt.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}}),N4="cause",B4=5,V4="LinkedErrors",U4=(e={})=>{const t=e.limit||B4,n=e.key||N4;return{name:V4,preprocessEvent(r,s,i){const o=i.getOptions();Kz(sw,o.stackParser,n,t,r,s)}}},z4=U4;function fI(e){return[Vz(),Lz(),k4(),f4(),A4(),z4(),Zz(),F4(),P4()]}function H4(e={}){var n;return{...{defaultIntegrations:fI(),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(n=wt.SENTRY_RELEASE)==null?void 0:n.id,sendClientReports:!0},...j4(e)}}function j4(e){const t={};for(const n of Object.getOwnPropertyNames(e)){const r=n;e[r]!==void 0&&(t[r]=e[r])}return t}function q4(){var l;const e=typeof wt.window<"u"&&wt;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=Du()||"",i=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],o=!!r&&wt===wt.top&&i.some(u=>s.startsWith(`${u}//`)),a=typeof e.nw<"u";return!!r&&!o&&!a}function W4(e={}){const t=H4(e);if(!t.skipBrowserExtensionCheck&&q4()){ls&&Yi(()=>{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}ls&&!BR()&&Ce.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:lV(t.stackParser||u4),integrations:lz(t),transport:t.transport||X3};return bz(FH,n)}const jt=St,uw="sentryReplaySession",G4="replay_event",cw="Unable to send Replay",K4=3e5,Y4=9e5,X4=5e3,Q4=5500,J4=6e4,Z4=5e3,e5=3,p1=15e4,pf=5e3,t5=3e3,n5=300,dw=2e7,r5=4999,s5=15e3,m1=36e5;var i5=Object.defineProperty,o5=(e,t,n)=>t in e?i5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g1=(e,t,n)=>o5(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 a5(e){return e.nodeType===e.ELEMENT_NODE}function Pc(e){const t=e==null?void 0:e.host;return(t==null?void 0:t.shadowRoot)===e}function Rc(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function l5(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 u5(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 Wh(e){try{const t=e.rules||e.cssRules;return t?l5(Array.from(t,hI).join("")):null}catch{return null}}function c5(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 hI(e){let t;if(f5(e))try{t=Wh(e.styleSheet)||u5(e)}catch{}else if(h5(e)){let n=e.cssText;const r=e.selectorText.includes(":"),s=typeof e.style.all=="string"&&e.style.all;if(s&&(n=c5(e)),r&&(n=d5(n)),r||s)return n}return t||e.cssText}function d5(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function f5(e){return"styleSheet"in e}function h5(e){return"selectorText"in e}class pI{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 p5(){return new pI}function im({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 ed({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function cu(e){return e.toLowerCase()}function fy(e){return e.toUpperCase()}const v1="__rrweb_original__";function m5(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 fw(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?cu(t):null}function Gh(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function mI(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 gI(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 hy(...e){return gI("setTimeout")(...e)}function vI(...e){return gI("clearTimeout")(...e)}function yI(e){try{return e.contentDocument}catch{}}let g5=1;const v5=new RegExp("[^a-z0-9-_:]"),td=-2;function hw(){return g5++}function y5(e){if(e instanceof HTMLFormElement)return"form";const t=cu(e.tagName);return v5.test(t)?"div":t}function b5(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let cl,b1;const w5=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,S5=/^(?:[a-z+]+:)?\/\//i,_5=/^www\..*/i,k5=/^(data:)([^,]*),(.*)/i;function Kh(e,t){return(e||"").replace(w5,(n,r,s,i,o,a)=>{const l=s||o||a,u=r||i||"";if(!l)return n;if(S5.test(l)||_5.test(l))return`url(${u}${l}${u})`;if(k5.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${b5(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 x5=/^[^ \t\n\r\u000c]+/,E5=/^[, \t\n\r\u000c]+/;function C5(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(E5),!(n>=t.length);){let i=r(x5);if(i.slice(-1)===",")i=Tl(e,i.substring(0,i.length-1)),s.push(i);else{let o="";i=Tl(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 Tl(e,t){return!t||t.trim()===""?t:om(e,t)}function T5(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function om(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 bI(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")?Tl(e,r):n==="srcset"?C5(e,r):n==="style"?Kh(r,om(e)):t==="object"&&n==="data"?Tl(e,r):typeof i=="function"?i(n,r,s):r)}function wI(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function SI(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 P5(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function ha(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:ha(e.parentNode,t,n,r+1)}function Pl(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(P5(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function du(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=ha(o,Pl(r,s)),l<0)return!0;a=ha(o,Pl(t,n),l>=0?l:1/0)}else{if(a=ha(o,Pl(t,n)),a<0)return!1;l=ha(o,Pl(r,s),a>=0?a:1/0)}return a>=0?l>=0?a<=l:!0:l>=0?!1:!!i}catch{}return!!i}function R5(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=hy(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{vI(a),s=!0,t()});return}const o="about:blank";if(r.location.href!==o||e.src===o||e.src==="")return hy(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function I5(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;const i=hy(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{vI(i),r=!0,t()})}function A5(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:g={},maskTextFn:m,maskInputFn:y,dataURLOptions:w={},inlineImages:b,recordCanvas:_,keepIframeSrcFn:T,newlyAddedElement:x=!1}=t,C=O5(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 D5(e,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:l,maskInputOptions:g,maskInputFn:y,dataURLOptions:w,inlineImages:b,recordCanvas:_,keepIframeSrcFn:T,newlyAddedElement:x,rootId:C,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f});case e.TEXT_NODE:return M5(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:m,maskInputOptions:g,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 O5(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function M5(e,t){var w;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,g=d==="SCRIPT"?!0:void 0,m=d==="TEXTAREA"?!0:void 0;if(p&&f){try{e.nextSibling||e.previousSibling||(w=e.parentNode.sheet)!=null&&w.cssRules&&(f=Wh(e.parentNode.sheet))}catch(b){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${b}`,e)}f=Kh(f,om(t.doc))}g&&(f="SCRIPT_PLACEHOLDER");const y=du(e,r,i,s,o,n);if(!p&&!g&&!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 b=im({type:null,tagName:d,maskInputOptions:l});f=ed({isMasked:du(e,r,i,s,o,b),element:e,value:f,maskInputFn:u})}return{type:Tn.Text,textContent:f||"",isStyle:p,rootId:c}}function D5(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:g=!1,rootId:m,maskTextClass:y,unmaskTextClass:w,maskTextSelector:b,unmaskTextSelector:_}=t,T=SI(e,r,s,i),x=y5(e);let C={};const I=e.attributes.length;for(let E=0;E<I;E++){const O=e.attributes[E];O.name&&!wI(x,O.name,O.value)&&(C[O.name]=bI(n,x,cu(O.name),O.value,e,l))}if(x==="link"&&o){const E=Array.from(n.styleSheets).find(R=>R.href===e.href);let O=null;E&&(O=Wh(E)),O&&(C.rel=null,C.href=null,C.crossorigin=null,C._cssText=Kh(O,E.href))}if(x==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const E=Wh(e.sheet);E&&(C._cssText=Kh(E,om(n)))}if(x==="input"||x==="textarea"||x==="select"||x==="option"){const E=e,O=fw(E),R=Gh(E,fy(x),O),A=E.checked;if(O!=="submit"&&O!=="button"&&R){const D=du(E,y,b,w,_,im({type:O,tagName:fy(x),maskInputOptions:a}));C.value=ed({isMasked:D,element:E,value:R,maskInputFn:u})}A&&(C.checked=A)}if(x==="option"&&(e.selected&&!a.select?C.selected=!0:delete C.selected),x==="canvas"&&f){if(e.__context==="2d")m5(e)||(C.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){const E=e.toDataURL(c.type,c.quality),O=n.createElement("canvas");O.width=e.width,O.height=e.height;const R=O.toDataURL(c.type,c.quality);E!==R&&(C.rr_dataURL=E)}}if(x==="img"&&d){cl||(cl=n.createElement("canvas"),b1=cl.getContext("2d"));const E=e,O=E.currentSrc||E.getAttribute("src")||"<unknown-src>",R=E.crossOrigin,A=()=>{E.removeEventListener("load",A);try{cl.width=E.naturalWidth,cl.height=E.naturalHeight,b1.drawImage(E,0,0),C.rr_dataURL=cl.toDataURL(c.type,c.quality)}catch(D){if(E.crossOrigin!=="anonymous"){E.crossOrigin="anonymous",E.complete&&E.naturalWidth!==0?A():E.addEventListener("load",A);return}else console.warn(`Cannot inline img src=${O}! Error: ${D}`)}E.crossOrigin==="anonymous"&&(R?C.crossOrigin=R:E.removeAttribute("crossorigin"))};E.complete&&E.naturalWidth!==0?A():E.addEventListener("load",A)}if((x==="audio"||x==="video")&&(C.rr_mediaState=e.paused?"paused":"played",C.rr_mediaCurrentTime=e.currentTime),g||(e.scrollLeft&&(C.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(C.rr_scrollTop=e.scrollTop)),T){const{width:E,height:O}=e.getBoundingClientRect();C={class:C.class,rr_width:`${E}px`,rr_height:`${O}px`}}x==="iframe"&&!p(C.src)&&(!T&&!yI(e)&&(C.rr_src=C.src),delete C.src);let S;try{customElements.get(x)&&(S=!0)}catch{}return{type:Tn.Element,tagName:x,attributes:C,childNodes:[],isSVG:T5(e)||void 0,needBlock:T,rootId:m,isCustom:S}}function zt(e){return e==null?"":e.toLowerCase()}function $5(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"&&mI(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 Rl(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:g={},maskAttributeFn:m,maskTextFn:y,maskInputFn:w,slimDOMOptions:b,dataURLOptions:_={},inlineImages:T=!1,recordCanvas:x=!1,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:S=5e3,onStylesheetLoad:E,stylesheetLoadTimeout:O=5e3,keepIframeSrcFn:R=()=>!1,newlyAddedElement:A=!1}=t;let{preserveWhiteSpace:D=!0}=t;const L=A5(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:g,maskAttributeFn:m,maskTextFn:y,maskInputFn:w,dataURLOptions:_,inlineImages:T,recordCanvas:x,keepIframeSrcFn:R,newlyAddedElement:A});if(!L)return console.warn(e,"not serialized"),null;let W;r.hasNode(e)?W=r.getId(e):$5(L,b)||!D&&L.type===Tn.Text&&!L.isStyle&&!L.textContent.replace(/^\s+|\s+$/gm,"").length?W=td:W=hw();const z=Object.assign(L,{id:W});if(r.add(e,z),W===td)return null;C&&C(e);let K=!f;if(z.type===Tn.Element){K=K&&!z.needBlock,delete z.needBlock;const G=e.shadowRoot;G&&Rc(G)&&(z.isShadowHost=!0)}if((z.type===Tn.Document||z.type===Tn.Element)&&K){b.headWhitespace&&z.type===Tn.Element&&z.tagName==="head"&&(D=!1);const G={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:g,maskAttributeFn:m,maskTextFn:y,maskInputFn:w,slimDOMOptions:b,dataURLOptions:_,inlineImages:T,recordCanvas:x,preserveWhiteSpace:D,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:O,keepIframeSrcFn:R};for(const H of Array.from(e.childNodes)){const B=Rl(H,G);B&&z.childNodes.push(B)}if(a5(e)&&e.shadowRoot)for(const H of Array.from(e.shadowRoot.childNodes)){const B=Rl(H,G);B&&(Rc(e.shadowRoot)&&(B.isShadow=!0),z.childNodes.push(B))}}return e.parentNode&&Pc(e.parentNode)&&Rc(e.parentNode)&&(z.isShadow=!0),z.type===Tn.Element&&z.tagName==="iframe"&&!SI(e,s,i,o)&&R5(e,()=>{const G=yI(e);if(G&&I){const H=Rl(G,{doc:G,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:g,maskAttributeFn:m,maskTextFn:y,maskInputFn:w,slimDOMOptions:b,dataURLOptions:_,inlineImages:T,recordCanvas:x,preserveWhiteSpace:D,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:O,keepIframeSrcFn:R});H&&I(e,H)}},S),z.type===Tn.Element&&z.tagName==="link"&&typeof z.attributes.rel=="string"&&(z.attributes.rel==="stylesheet"||z.attributes.rel==="preload"&&typeof z.attributes.href=="string"&&mI(z.attributes.href)==="css")&&I5(e,()=>{if(E){const G=Rl(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:g,maskAttributeFn:m,maskTextFn:y,maskInputFn:w,slimDOMOptions:b,dataURLOptions:_,inlineImages:T,recordCanvas:x,preserveWhiteSpace:D,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:O,keepIframeSrcFn:R});G&&E(e,G)}},O),z}function L5(e,t){const{mirror:n=new pI,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:g=!1,maskAttributeFn:m,maskTextFn:y,maskInputFn:w,slimDOM:b=!1,dataURLOptions:_,preserveWhiteSpace:T,onSerialize:x,onIframeLoad:C,iframeLoadTimeout:I,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:O=()=>!1}=t||{};return Rl(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:g===!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}:g===!1?{}:g,maskAttributeFn:m,maskTextFn:y,maskInputFn:w,slimDOMOptions:b===!0||b==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:b==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:b===!1?{}:b,dataURLOptions:_,inlineImages:f,recordCanvas:p,preserveWhiteSpace:T,onSerialize:x,onIframeLoad:C,iframeLoadTimeout:I,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:O,newlyAddedElement:!1})}function cr(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const wl=`Please stop import mirror directly. Instead of that,\r
50
+ now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
51
+ or you can use record.mirror to access the mirror instance during recording.`;let S1={map:{},getId(){return console.error(wl),-1},getNode(){return console.error(wl),null},removeNodeFromMap(){console.error(wl)},has(){return console.error(wl),!1},reset(){console.error(wl)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(S1=new Proxy(S1,{get(e,t,n){return t==="map"&&console.error(wl),Reflect.get(e,t,n)}}));function nd(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&&(H5(r),r=null),s=o,e.apply(l,i)):!r&&n.trailing!==!1&&(r=am(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(l,i)},a))}}function _I(e,t,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(o){am(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>_I(e,t,i||{},!0)}function pw(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 Yh=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Yh=()=>new Date().getTime());function kI(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 xI(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function EI(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function CI(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Lr(e,t,n,r,s){if(!e)return!1;const i=CI(e);if(!i)return!1;const o=Pl(t,n);if(!s){const u=r&&i.matches(r);return o(i)&&!u}const a=ha(i,o);let l=-1;return a<0?!1:(r&&(l=ha(i,Pl(null,r))),a>-1&&l<0?!0:a<l)}function F5(e,t){return t.getId(e)!==-1}function Eg(e,t){return t.getId(e)===td}function TI(e,t){if(Pc(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?TI(e.parentNode,t):!0:!0}function py(e){return!!e.changedTouches}function N5(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 PI(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function RI(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function my(e){return!!(e!=null&&e.shadowRoot)}class B5{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 II(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 V5(e){let t=e,n;for(;n=II(t);)t=n;return t}function U5(e){const t=e.ownerDocument;if(!t)return!1;const n=V5(e);return t.contains(n)}function AI(e){const t=e.ownerDocument;return t?t.contains(e)||U5(e):!1}const _1={};function mw(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 z5(...e){return mw("requestAnimationFrame")(...e)}function am(...e){return mw("setTimeout")(...e)}function H5(...e){return mw("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||{}),sr=(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))(sr||{}),wi=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(wi||{}),Sl=(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))(Sl||{});function gw(e){try{return e.contentDocument}catch{}}function j5(e){try{return e.contentWindow}catch{}}function k1(e){return"__ln"in e}class q5{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 W5{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 q5,s=l=>{let u=l,c=td;for(;c===td;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},i=l=>{if(!l.parentNode||!AI(l))return;const u=Pc(l.parentNode)?this.mirror.getId(II(l)):this.mirror.getId(l.parentNode),c=s(l);if(u===-1||c===-1)return r.addNode(l);const d=Rl(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=>{PI(f,this.mirror)&&!Lr(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(f),RI(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),my(l)&&this.shadowDomManager.addShadowRoot(l.shadowRoot,this.doc)},onIframeLoad:(f,p)=>{Lr(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 g=p.parentNode.host;if(this.mirror.getId(g)!==-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(!Eg(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Lr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:du(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,CI(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=fw(n),a=n.tagName;s=Gh(n,a,o);const l=im({maskInputOptions:this.maskInputOptions,tagName:a,type:o}),u=du(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,l);s=ed({isMasked:u,element:n,value:s,maskInputFn:this.maskInputFn})}if(Lr(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(!gw(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"),!wI(n.tagName,r)&&(i.attributes[r]=bI(this.doc,cu(n.tagName),cu(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(Lr(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=Pc(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Lr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Eg(n,this.mirror)||!F5(n,this.mirror)||(this.addedSet.has(n)?(gy(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||TI(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[x1(r,s)]?gy(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:Pc(t.target)&&Rc(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(Eg(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);Lr(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach(r=>this.genAdds(r)),my(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 gy(e,t){e.delete(t),t.childNodes.forEach(n=>gy(e,n))}function E1(e,t,n){return e.length===0?!1:G5(e,t,n)}function G5(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:OI(e,t)}function OI(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:OI(e,n):!1}let Ic;function K5(e){Ic=e}function Y5(){Ic=void 0}const mt=e=>Ic?(...n)=>{try{return e(...n)}catch(r){if(Ic&&Ic(r)===!0)return()=>{};throw r}}:e,Il=[];function Ud(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 MI(e,t){var o,a;const n=new W5;Il.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 X5({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=nd(mt(d=>{const f=Date.now()-a;e(o.map(p=>(p.timeOffset-=f,p)),d),o=[],a=null}),i),u=mt(nd(mt(d=>{const f=Ud(d),{clientX:p,clientY:g}=py(d)?d.changedTouches[0]:d;a||(a=Yh()),o.push({x:p,y:g,id:r.getId(f),timeOffset:Yh()-a}),l(typeof DragEvent<"u"&&d instanceof DragEvent?Qe.Drag:d instanceof MouseEvent?Qe.MouseMove:Qe.TouchMove)}),s,{trailing:!1})),c=[cr("mousemove",u,n),cr("touchmove",u,n),cr("drag",u,n)];return mt(()=>{c.forEach(d=>d())})}function Q5({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=Ud(f);if(Lr(p,r,s,i,!0))return;let g=null,m=d;if("pointerType"in f){switch(f.pointerType){case"mouse":g=wi.Mouse;break;case"touch":g=wi.Touch;break;case"pen":g=wi.Pen;break}g===wi.Touch?sr[d]===sr.MouseDown?m="TouchStart":sr[d]===sr.MouseUp&&(m="TouchEnd"):wi.Pen}else py(f)&&(g=wi.Touch);g!==null?(u=g,(m.startsWith("Touch")&&g===wi.Touch||m.startsWith("Mouse")&&g===wi.Mouse)&&(g=null)):sr[d]===sr.Click&&(g=u,u=null);const y=py(f)?f.changedTouches[0]:f;if(!y)return;const w=n.getId(p),{clientX:b,clientY:_}=y;mt(e)({type:sr[m],id:w,x:b,y:_,...g!==null&&{pointerType:g}})};return Object.keys(sr).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let f=cu(d);const p=c(d);if(window.PointerEvent)switch(sr[d]){case sr.MouseDown:case sr.MouseUp:f=f.replace("mouse","pointer");break;case sr.TouchStart:case sr.TouchEnd:return}l.push(cr(f,p,t))}),mt(()=>{l.forEach(d=>d())})}function DI({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){const a=mt(nd(mt(l=>{const u=Ud(l);if(!u||Lr(u,r,s,i,!0))return;const c=n.getId(u);if(u===t&&t.defaultView){const d=kI(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 cr("scroll",a,t)}function J5({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const s=mt(nd(mt(()=>{const i=xI(),o=EI();(n!==i||r!==o)&&(e({width:Number(o),height:Number(i)}),n=i,r=o)}),200));return cr("resize",s,t)}const Z5=["INPUT","TEXTAREA","SELECT"],T1=new WeakMap;function ej({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:g,unmaskTextSelector:m}){function y(I){let S=Ud(I);const E=I.isTrusted,O=S&&fy(S.tagName);if(O==="OPTION"&&(S=S.parentElement),!S||!O||Z5.indexOf(O)<0||Lr(S,r,s,i,!0))return;const R=S;if(R.classList.contains(o)||a&&R.matches(a))return;const A=fw(S);let D=Gh(R,O,A),L=!1;const W=im({maskInputOptions:l,tagName:O,type:A}),z=du(S,f,g,p,m,W);(A==="radio"||A==="checkbox")&&(L=S.checked),D=ed({isMasked:z,element:S,value:D,maskInputFn:u}),w(S,d?{text:D,isChecked:L,userTriggered:E}:{text:D,isChecked:L});const K=S.name;A==="radio"&&K&&L&&t.querySelectorAll(`input[type="radio"][name="${K}"]`).forEach(G=>{if(G!==S){const H=ed({isMasked:z,element:G,value:Gh(G,O,A),maskInputFn:u});w(G,d?{text:H,isChecked:!L,userTriggered:!1}:{text:H,isChecked:!L})}})}function w(I,S){const E=T1.get(I);if(!E||E.text!==S.text||E.isChecked!==S.isChecked){T1.set(I,S);const O=n.getId(I);mt(e)({...S,id:O})}}const _=(c.input==="last"?["change"]:["input","change"]).map(I=>cr(I,mt(y),t)),T=t.defaultView;if(!T)return()=>{_.forEach(I=>I())};const x=T.Object.getOwnPropertyDescriptor(T.HTMLInputElement.prototype,"value"),C=[[T.HTMLInputElement.prototype,"value"],[T.HTMLInputElement.prototype,"checked"],[T.HTMLSelectElement.prototype,"value"],[T.HTMLTextAreaElement.prototype,"value"],[T.HTMLSelectElement.prototype,"selectedIndex"],[T.HTMLOptionElement.prototype,"selected"]];return x&&x.set&&_.push(...C.map(I=>_I(I[0],I[1],{set(){mt(y)({target:this,isTrusted:!1})}},!1,T))),mt(()=>{_.forEach(I=>I())})}function Xh(e){const t=[];function n(r,s){if(mf("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||mf("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||mf("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||mf("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 oo(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function tj({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,g]=f,{id:m,styleId:y}=oo(d,t,n.styleMirror);return(m&&m!==-1||y&&y!==-1)&&e({id:m,styleId:y,adds:[{rule:p,index:g}]}),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:g,styleId:m}=oo(d,t,n.styleMirror);return(g&&g!==-1||m&&m!==-1)&&e({id:g,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:g,styleId:m}=oo(d,t,n.styleMirror);return(g&&g!==-1||m&&m!==-1)&&e({id:g,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:g,styleId:m}=oo(d,t,n.styleMirror);return(g&&g!==-1||m&&m!==-1)&&e({id:g,styleId:m,replaceSync:p}),c.apply(d,f)})}));const l={};gf("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(gf("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),gf("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),gf("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,g)=>{const[m,y]=g,{id:w,styleId:b}=oo(p.parentStyleSheet,t,n.styleMirror);return(w&&w!==-1||b&&b!==-1)&&e({id:w,styleId:b,adds:[{rule:m,index:[...Xh(p),y||0]}]}),f.apply(p,g)})}),d.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:mt((f,p,g)=>{const[m]=g,{id:y,styleId:w}=oo(p.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||w&&w!==-1)&&e({id:y,styleId:w,removes:[{index:[...Xh(p),m]}]}),f.apply(p,g)})})}),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 $I({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 nj({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:g}=oo((m=l.parentRule)==null?void 0:m.parentStyleSheet,t,r.styleMirror);return(p&&p!==-1||g&&g!==-1)&&e({id:p,styleId:g,set:{property:c,value:d,priority:f},index:Xh(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}=oo((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:Xh(l.parentRule)}),a.apply(l,u)})}),mt(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}function rj({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const a=mt(u=>nd(mt(c=>{const d=Ud(c);if(!d||Lr(d,t,n,r,!0))return;const{currentTime:f,volume:p,muted:g,playbackRate:m}=d;e({type:u,id:s.getId(d),currentTime:f,volume:p,muted:g,playbackRate:m})}),i.media||500)),l=[cr("play",a(Sl.Play),o),cr("pause",a(Sl.Pause),o),cr("seeked",a(Sl.Seeked),o),cr("volumechange",a(Sl.VolumeChange),o),cr("ratechange",a(Sl.RateChange),o)];return mt(()=>{l.forEach(u=>u())})}function sj({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=pw(t.fonts,"add",function(a){return function(l){return am(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 ij(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:g,startOffset:m,endContainer:y,endOffset:w}=p;Lr(g,r,s,i,!0)||Lr(y,r,s,i,!0)||c.push({start:n.getId(g),startOffset:m,end:n.getId(y),endOffset:w})}o({ranges:c})});return l(),cr("selectionchange",l)}function oj({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:pw(n.customElements,"define",function(s){return function(i,o,a){try{t({define:{name:i}})}catch{}return s.apply(this,[i,o,a])}})}function aj(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=MI(e,e.doc));const s=X5(e),i=Q5(e),o=DI(e),a=J5(e,{win:n}),l=ej(e),u=rj(e);let c=()=>{},d=()=>{},f=()=>{},p=()=>{};e.recordDOM&&(c=tj(e,{win:n}),d=$I(e,e.doc),f=nj(e,{win:n}),e.collectFonts&&(p=sj(e)));const g=ij(e),m=oj(e),y=[];for(const w of e.plugins)y.push(w.observer(w.callback,n,w.options));return mt(()=>{Il.forEach(w=>w.reset()),r==null||r.disconnect(),s(),i(),o(),a(),l(),u(),c(),d(),f(),p(),g(),m(),y.forEach(w=>w())})}function mf(e){return typeof window[e]<"u"}function gf(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class vy{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 lj{constructor(){this.crossOriginIframeMirror=new vy(hw),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class uj{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new vy(hw),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new vy(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=gw(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 cj{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class dj{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(!Rc(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=MI({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(DI({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),am(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push($I({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=gw(t),r=j5(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(pw(t.prototype,"attachShadow",function(s){return function(i){const o=s.call(this,i);return this.shadowRoot&&AI(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 P1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fj=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var vf=0;vf<P1.length;vf++)fj[P1.charCodeAt(vf)]=vf;class R1{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class hj{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new B5,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:hI(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 pj{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,z5(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let ln,Qh;var TE;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((TE=e.contentWindow)==null?void 0:TE.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const bs=p5();function Mi(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:g=!0,maskAllInputs:m,maskInputOptions:y,slimDOMOptions:w,maskAttributeFn:b,maskInputFn:_,maskTextFn:T,maxCanvasSize:x=null,packFn:C,sampling:I={},dataURLOptions:S={},mousemoveWait:E,recordDOM:O=!0,recordCanvas:R=!1,recordCrossOriginIframes:A=!1,recordAfter:D=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:L=!1,collectFonts:W=!1,inlineImages:z=!1,plugins:K,keepIframeSrcFn:G=()=>!1,ignoreCSSAttributes:H=new Set([]),errorHandler:B,onMutation:ne,getCanvasManager:q}=e;K5(B);const Y=A?window.parent===window:!0;let oe=!1;if(!Y)try{window.parent.document&&(oe=!1)}catch{oe=!0}if(Y&&!t)throw new Error("emit function is required");if(!Y&&!oe)return()=>{};E!==void 0&&I.mousemove===void 0&&(I.mousemove=E),bs.reset();const ie=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:{},be=w===!0||w==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:w==="all",headMetaDescKeywords:w==="all"}:w||{};N5();let Q,X=0;const V=ve=>{for(const Se of K||[])Se.eventProcessor&&(ve=Se.eventProcessor(ve));return C&&!oe&&(ve=C(ve)),ve};ln=(ve,Se)=>{var Le;const de=ve;if(de.timestamp=Yh(),(Le=Il[0])!=null&&Le.isFrozen()&&de.type!==ot.FullSnapshot&&!(de.type===ot.IncrementalSnapshot&&de.data.source===Qe.Mutation)&&Il.forEach(Ee=>Ee.unfreeze()),Y)t==null||t(V(de),Se);else if(oe){const Ee={type:"rrweb",event:V(de),origin:window.location.origin,isCheckout:Se};window.parent.postMessage(Ee,"*")}if(de.type===ot.FullSnapshot)Q=de,X=0;else if(de.type===ot.IncrementalSnapshot){if(de.data.source===Qe.Mutation&&de.data.isAttachIframe)return;X++;const Ee=r&&X>=r,xe=n&&Q&&de.timestamp-Q.timestamp>n;(Ee||xe)&&Re(!0)}};const ge=ve=>{ln({type:ot.IncrementalSnapshot,data:{source:Qe.Mutation,...ve}})},Oe=ve=>ln({type:ot.IncrementalSnapshot,data:{source:Qe.Scroll,...ve}}),Ne=ve=>ln({type:ot.IncrementalSnapshot,data:{source:Qe.CanvasMutation,...ve}}),N=ve=>ln({type:ot.IncrementalSnapshot,data:{source:Qe.AdoptedStyleSheet,...ve}}),F=new hj({mutationCb:ge,adoptedStyleSheetCb:N}),ee=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new lj:new uj({mirror:bs,mutationCb:ge,stylesheetManager:F,recordCrossOriginIframes:A,wrappedEmit:ln});for(const ve of K||[])ve.getMirror&&ve.getMirror({nodeMirror:bs,crossOriginIframeMirror:ee.crossOriginIframeMirror,crossOriginIframeStyleMirror:ee.crossOriginIframeStyleMirror});const pe=new pj,ce=gj(q,{mirror:bs,win:window,mutationCb:ve=>ln({type:ot.IncrementalSnapshot,data:{source:Qe.CanvasMutation,...ve}}),recordCanvas:R,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:x,sampling:I.canvas,dataURLOptions:S,errorHandler:B}),we=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new cj:new dj({mutationCb:ge,scrollCb:Oe,bypassOptions:{onMutation:ne,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:g,maskInputOptions:ie,dataURLOptions:S,maskAttributeFn:b,maskTextFn:T,maskInputFn:_,recordCanvas:R,inlineImages:z,sampling:I,slimDOMOptions:be,iframeManager:ee,stylesheetManager:F,canvasManager:ce,keepIframeSrcFn:G,processedNodeManager:pe},mirror:bs}),Re=(ve=!1)=>{if(!O)return;ln({type:ot.Meta,data:{href:window.location.href,width:EI(),height:xI()}},ve),F.reset(),we.init(),Il.forEach(de=>de.lock());const Se=L5(document,{mirror:bs,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:g,maskAllInputs:ie,maskAttributeFn:b,maskInputFn:_,maskTextFn:T,slimDOM:be,dataURLOptions:S,recordCanvas:R,inlineImages:z,onSerialize:de=>{PI(de,bs)&&ee.addIframe(de),RI(de,bs)&&F.trackLinkElement(de),my(de)&&we.addShadowRoot(de.shadowRoot,document)},onIframeLoad:(de,Le)=>{ee.attachIframe(de,Le),de.contentWindow&&ce.addWindow(de.contentWindow),we.observeAttachShadow(de)},onStylesheetLoad:(de,Le)=>{F.attachLinkElement(de,Le)},keepIframeSrcFn:G});if(!Se)return console.warn("Failed to snapshot the document");ln({type:ot.FullSnapshot,data:{node:Se,initialOffset:kI(window)}}),Il.forEach(de=>de.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&F.adoptStyleSheets(document.adoptedStyleSheets,bs.getId(document))};Qh=Re;try{const ve=[],Se=Le=>{var Ee;return mt(aj)({onMutation:ne,mutationCb:ge,mousemoveCb:(xe,We)=>ln({type:ot.IncrementalSnapshot,data:{source:We,positions:xe}}),mouseInteractionCb:xe=>ln({type:ot.IncrementalSnapshot,data:{source:Qe.MouseInteraction,...xe}}),scrollCb:Oe,viewportResizeCb:xe=>ln({type:ot.IncrementalSnapshot,data:{source:Qe.ViewportResize,...xe}}),inputCb:xe=>ln({type:ot.IncrementalSnapshot,data:{source:Qe.Input,...xe}}),mediaInteractionCb:xe=>ln({type:ot.IncrementalSnapshot,data:{source:Qe.MediaInteraction,...xe}}),styleSheetRuleCb:xe=>ln({type:ot.IncrementalSnapshot,data:{source:Qe.StyleSheetRule,...xe}}),styleDeclarationCb:xe=>ln({type:ot.IncrementalSnapshot,data:{source:Qe.StyleDeclaration,...xe}}),canvasMutationCb:Ne,fontCb:xe=>ln({type:ot.IncrementalSnapshot,data:{source:Qe.Font,...xe}}),selectionCb:xe=>{ln({type:ot.IncrementalSnapshot,data:{source:Qe.Selection,...xe}})},customElementCb:xe=>{ln({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:ie,inlineStylesheet:g,sampling:I,recordDOM:O,recordCanvas:R,inlineImages:z,userTriggeredOnInput:L,collectFonts:W,doc:Le,maskAttributeFn:b,maskInputFn:_,maskTextFn:T,keepIframeSrcFn:G,blockSelector:i,unblockSelector:o,slimDOMOptions:be,dataURLOptions:S,mirror:bs,iframeManager:ee,stylesheetManager:F,shadowDomManager:we,processedNodeManager:pe,canvasManager:ce,ignoreCSSAttributes:H,plugins:((Ee=K==null?void 0:K.filter(xe=>xe.observer))==null?void 0:Ee.map(xe=>({observer:xe.observer,options:xe.options,callback:We=>ln({type:ot.Plugin,data:{plugin:xe.name,payload:We}})})))||[]},{})};ee.addLoadListener(Le=>{try{ve.push(Se(Le.contentDocument))}catch(Ee){console.warn(Ee)}});const de=()=>{Re(),ve.push(Se(document))};return document.readyState==="interactive"||document.readyState==="complete"?de():(ve.push(cr("DOMContentLoaded",()=>{ln({type:ot.DomContentLoaded,data:{}}),D==="DOMContentLoaded"&&de()})),ve.push(cr("load",()=>{ln({type:ot.Load,data:{}}),D==="load"&&de()},window))),()=>{ve.forEach(Le=>Le()),pe.destroy(),Qh=void 0,Y5()}}catch(ve){console.warn(ve)}}function mj(e){if(!Qh)throw new Error("please take full snapshot after start recording");Qh(e)}Mi.mirror=bs;Mi.takeFullSnapshot=mj;function gj(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 vj=3,yj=5;function vw(e){return e>9999999999?e:e*1e3}function Cg(e){return e>9999999999?e/1e3:e}function zd(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 bj="button,a";function LI(e){return e.closest(bj)||e}function FI(e){const t=NI(e);return!t||!(t instanceof Element)?t:LI(t)}function NI(e){return wj(e)?e.target:e}function wj(e){return typeof e=="object"&&!!e&&"target"in e}let ao;function Sj(e){return ao||(ao=[],_j()),ao.push(e),()=>{const t=ao?ao.indexOf(e):-1;t>-1&&ao.splice(t,1)}}function _j(){xr(jt,"open",function(e){return function(...t){if(ao)try{ao.forEach(n=>n())}catch{}return e.apply(jt,t)}})}const kj=new Set([Qe.Mutation,Qe.StyleSheetRule,Qe.StyleDeclaration,Qe.AdoptedStyleSheet,Qe.CanvasMutation,Qe.Selection,Qe.MediaInteraction]);function xj(e,t,n){e.handleClick(t,n)}class Ej{constructor(t,n,r=zd){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=Sj(()=>{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(Tj(n,this._ignoreSelector)||!Pj(t))return;const r={timestamp:Cg(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=Cg(t)}registerScroll(t=Date.now()){this._lastScroll=Cg(t)}registerClick(t){const n=LI(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=uu(()=>this._checkClicks(),1e3)}}const Cj=["A","BUTTON","INPUT"];function Tj(e,t){return!!(!Cj.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 Pj(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function A1(){return Date.now()/1e3}function Rj(e,t){try{if(!Ij(t))return;const{source:n}=t.data;if(kj.has(n)&&e.registerMutation(t.timestamp),n===Qe.Scroll&&e.registerScroll(t.timestamp),Aj(t)){const{type:r,id:s}=t.data,i=Mi.mirror.getNode(s);i instanceof HTMLElement&&r===sr.Click&&e.registerClick(i)}}catch{}}function Ij(e){return e.type===vj}function Aj(e){return e.data.source===Qe.MouseInteraction}function ii(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var yw=(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))(yw||{});const Oj=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Mj(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(Oj.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const Dj=e=>t=>{if(!e.isEnabled())return;const n=$j(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&&xj(e.clickDetector,n,FI(t.event)),zd(e,n)};function BI(e,t){const n=Mi.mirror.getId(e),r=n&&Mi.mirror.getNode(n),s=r&&Mi.mirror.getMeta(r),i=s&&Fj(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===yw.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:Mj(i.attributes)}}:{}}}function $j(e){const{target:t,message:n}=Lj(e);return ii({category:`ui.${e.name}`,...BI(t,n)})}function Lj(e){const t=e.name==="click";let n,r=null;try{r=t?FI(e.event):NI(e.event),n=Vi(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function Fj(e){return e.type===yw.Element}function Nj(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=Bj(t);n&&zd(e,n)}function Bj(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=e;if(!o||Vj(o)||!i)return null;const a=t||r||s,l=i.length===1;if(!a&&l)return null;const u=Vi(o,{maxStringLength:200})||"<unknown>",c=BI(o,u);return ii({category:"ui.keyDown",message:u,data:{...c.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}function Vj(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const Uj={resource:Wj,paint:jj,navigation:qj};function yf(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function zj(e){return e.map(Hj).filter(Boolean)}function Hj(e){const t=Uj[e.entryType];return t?t(e):null}function fu(e){return((Kr()||jt.performance.timeOrigin)+e)/1e3}function jj(e){const{duration:t,entryType:n,name:r,startTime:s}=e,i=fu(s);return{type:n,name:r,start:i,end:i+t,data:void 0}}function qj(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:g,type:m}=e;return s===0?null:{type:`${t}.${m}`,start:fu(p),end:fu(i),name:n,data:{size:g,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,loadEventStart:c,loadEventEnd:d,domComplete:i,redirectCount:f}}}function Wj(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:fu(i),end:fu(s),name:r,data:{size:u,statusCode:l,decodedBodySize:o,encodedBodySize:a}}}function Gj(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.element?[t.element]:void 0;return lm(e,"largest-contentful-paint",n)}function Kj(e){return e.sources!==void 0}function Yj(e){const t=[],n=[];for(const r of e.entries)if(Kj(r)){const s=[];for(const i of r.sources)if(i.node){n.push(i.node);const o=Mi.mirror.getId(i.node);o&&s.push(o)}t.push({value:r.value,nodeIds:s.length?s:void 0})}return lm(e,"cumulative-layout-shift",n,t)}function Xj(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.target?[t.target]:void 0;return lm(e,"first-input-delay",n)}function Qj(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.target?[t.target]:void 0;return lm(e,"interaction-to-next-paint",n)}function lm(e,t,n,r){const s=e.value,i=e.rating,o=fu(s);return{type:"web-vital",name:t,start:o,end:o,data:{value:s,size:s,rating:i,nodeIds:n?n.map(a=>Mi.mirror.getId(a)):void 0,attributions:r}}}function Jj(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(lu(s,n))}),r.push(QR(yf(Gj,e)),aw(yf(Yj,e)),JR(yf(Xj,e)),ZR(yf(Qj,e))),()=>{r.forEach(s=>s())}}const Ge=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Zj='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 e8(){const e=new Blob([Zj]);return URL.createObjectURL(e)}const O1=["info","warn","error","log"],sh="[Replay] ";function Tg(e,t="info"){Mo({category:"console",data:{logger:"replay"},level:t,message:`${sh}${e}`},{level:t})}function t8(){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)=>{Ce[r](sh,...s),t&&Tg(s.join(""),DR(r))}}),n.exception=(r,...s)=>{s.length&&n.error&&n.error(...s),Ce.error(sh,r),e?ai(r):t&&Tg(r,"error")},n.infoTick=(...r)=>{Ce.info(sh,...r),t&&setTimeout(()=>Tg(r[0]),0)}):O1.forEach(r=>{n[r]=()=>{}}),n}const Ke=t8();class bw extends Error{constructor(){super(`Event buffer exceeded maximum size of ${dw}.`)}}class VI{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>dw)throw new bw;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?vw(t):null}}class n8{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 r8{constructor(t){this._worker=new n8(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=vw(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>dw?Promise.reject(new bw):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 s8{constructor(t){this._fallback=new VI,this._compression=new r8(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 i8({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=o8(t);if(n)return n}return Ge&&Ke.info("Using simple buffer"),new VI}function o8(e){try{const t=e||a8();if(!t)return;Ge&&Ke.info(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new s8(n)}catch(t){Ge&&Ke.exception(t,"Failed to create compression worker")}}function a8(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?e8():""}function ww(){try{return"sessionStorage"in jt&&!!jt.sessionStorage}catch{return!1}}function l8(e){u8(),e.session=void 0}function u8(){if(ww())try{jt.sessionStorage.removeItem(uw)}catch{}}function UI(e){return e===void 0?!1:Math.random()<e}function zI(e){const t=Date.now(),n=e.id||Hr(),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 Sw(e){if(ww())try{jt.sessionStorage.setItem(uw,JSON.stringify(e))}catch{}}function c8(e,t){return UI(e)?"session":t?"buffer":!1}function M1({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=c8(e,t),i=zI({sampled:s,previousSessionId:r});return n&&Sw(i),i}function d8(){if(!ww())return null;try{const e=jt.sessionStorage.getItem(uw);if(!e)return null;const t=JSON.parse(e);return Ge&&Ke.infoTick("Loading existing session"),zI(t)}catch{return null}}function yy(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function HI(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return yy(e.started,t,r)||yy(e.lastActivity,n,r)}function jI(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!HI(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Pg({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const s=r.stickySession&&d8();return s?jI(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 f8(e){return e.type===ot.Custom}function _w(e,t,n){return WI(e,t)?(qI(e,t,n),!0):!1}function h8(e,t,n){return WI(e,t)?qI(e,t,n):Promise.resolve(null)}async function qI(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=p8(t,i.beforeAddRecordingEvent);return o?await r.addEvent(o):void 0}catch(i){const o=i&&i instanceof bw,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 WI(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=vw(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 p8(e,t){try{if(typeof t=="function"&&f8(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 kw(e){return!e.type}function by(e){return e.type==="transaction"}function m8(e){return e.type==="replay_event"}function D1(e){return e.type==="feedback"}function g8(e){return(t,n)=>{if(!e.isEnabled()||!kw(t)&&!by(t))return;const r=n==null?void 0:n.statusCode;if(!(!r||r<200||r>=300)){if(by(t)){v8(e,t);return}y8(e,t)}}}function v8(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 y8(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)||uu(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(s){e.handleException(s)}})}function b8(e){return t=>{!e.isEnabled()||!kw(t)||w8(e,t)}}function w8(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=ii({category:"replay.hydrate-error",data:{url:Du()}});zd(e,o)}}function S8(e){const t=ct();t&&t.on("beforeAddBreadcrumb",n=>_8(e,n))}function _8(e,t){if(!e.isEnabled()||!GI(t))return;const n=k8(t);n&&zd(e,n)}function k8(e){return!GI(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?x8(e):ii(e)}function x8(e){var s;const t=(s=e.data)==null?void 0:s.arguments;if(!Array.isArray(t)||t.length===0)return ii(e);let n=!1;const r=t.map(i=>{if(!i)return i;if(typeof i=="string")return i.length>pf?(n=!0,`${i.slice(0,pf)}…`):i;if(typeof i=="object")try{const o=_s(i,7);return JSON.stringify(o).length>pf?(n=!0,`${JSON.stringify(o,null,2).slice(0,pf)}…`):o}catch{}return i});return ii({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function GI(e){return!!e.category}function E8(e,t){var n;return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!((n=t.originalException)!=null&&n.__rrweb__)}function KI(){const e=Jt().getPropagationContext().dsc;e&&delete e.replay_id;const t=zn();if(t){const n=Hi(t);delete n.replay_id}}function C8(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 T8(e,t){return e.recordingMode!=="buffer"||t.message===cw||!t.exception||t.type?!1:UI(e.getOptions().errorSampleRate)}function P8(e){return Object.assign((t,n)=>!e.isEnabled()||e.isPaused()?t:m8(t)?(delete t.breadcrumbs,t):!kw(t)&&!by(t)&&!D1(t)?t:e.checkAndHandleExpiredSession()?D1(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),C8(e,t),t):E8(t,n)&&!e.getOptions()._experiments.captureExceptions?(Ge&&Ke.log("Ignoring error from rrweb internals",t),null):((T8(e,t)||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):(KI(),t),{id:"Replay"})}function um(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 R8(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 I8(e){return t=>{if(!e.isEnabled())return;const n=R8(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(um(e,[n]),!1)))}}function A8(e,t){return Ge&&e.getOptions()._experiments.traceInternals?!1:Tz(t,ct())}function YI(e,t){e.isEnabled()&&t!==null&&(A8(e,t.name)||e.addUpdate(()=>(um(e,[t]),!0)))}function cm(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=aI(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function XI(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Jh(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 QI(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:{method:i,statusCode:o,request:a,response:l}}}function rd(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Eo(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}=O8(n);return r.body=s,i!=null&&i.length&&(r._meta={warnings:i}),r}function wy(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 O8(e){if(!e||typeof e!="string")return{body:e};const t=e.length>p1,n=M8(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 M8(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Zh(e,t){const n=D8(e);return xo(n,t)}function D8(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 $8(e,t,n){try{const r=await F8(e,t,n),s=QI("resource.fetch",r);YI(n.replay,s)}catch(r){Ge&&Ke.exception(r,"Failed to capture fetch breadcrumb")}}function L8(e,t){const{input:n,response:r}=t,s=n?uI(n):void 0,i=cm(s),o=r?XI(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 F8(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=Zh(o,n.networkDetailAllowUrls)&&!Zh(o,n.networkDetailDenyUrls),f=d?N8(n,t.input,u):rd(u),p=await B8(d,n,t.response,c);return{startTimestamp:s,endTimestamp:i,url:o,method:a,statusCode:l,request:f,response:p}}function N8({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?z8(n,t):{};if(!e)return Eo(s,r,void 0);const i=uI(n),[o,a]=lI(i,Ke),l=Eo(s,r,o);return a?Jh(l,a):l}async function B8(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,s){if(!e&&s!==void 0)return rd(s);const i=r?JI(r.headers,n):{};if(!r||!t&&s!==void 0)return Eo(i,s,void 0);const[o,a]=await U8(r),l=V8(o,{networkCaptureBodies:t,responseBodySize:s,captureDetails:e,headers:i});return a?Jh(l,a):l}function V8(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:s}){try{const i=e!=null&&e.length&&n===void 0?cm(e):n;return r?t?Eo(s,i,e):Eo(s,i,void 0):rd(i)}catch(i){return Ge&&Ke.exception(i,"Failed to serialize response body"),Eo(s,n,void 0)}}async function U8(e){const t=H8(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await j8(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 z8(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)?{}:wy(n,t):{}}function H8(e){try{return e.clone()}catch(t){Ge&&Ke.exception(t,"Failed to clone response body")}}function j8(e){return new Promise((t,n)=>{const r=uu(()=>n(new Error("Timeout while trying to read response body")),500);q8(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function q8(e){return await e.text()}async function W8(e,t,n){try{const r=K8(e,t,n),s=QI("resource.xhr",r);YI(n.replay,s)}catch(r){Ge&&Ke.exception(r,"Failed to capture xhr breadcrumb")}}function G8(e,t){const{xhr:n,input:r}=t;if(!n)return;const s=cm(r),i=n.getResponseHeader("content-length")?XI(n.getResponseHeader("content-length")):J8(n.response,n.responseType);s!==void 0&&(e.data.request_body_size=s),i!==void 0&&(e.data.response_body_size=i)}function K8(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||!Zh(l,n.networkDetailAllowUrls)||Zh(l,n.networkDetailDenyUrls)){const C=rd(d),I=rd(f);return{startTimestamp:s,endTimestamp:i,url:l,method:u,statusCode:c,request:C,response:I}}const p=a[fa],g=p?wy(p.request_headers,n.networkRequestHeaders):{},m=wy(Y8(a),n.networkResponseHeaders),[y,w]=n.networkCaptureBodies?lI(o,Ke):[void 0],[b,_]=n.networkCaptureBodies?X8(a):[void 0],T=Eo(g,d,y),x=Eo(m,f,b);return{startTimestamp:s,endTimestamp:i,url:l,method:u,statusCode:c,request:w?Jh(T,w):T,response:_?Jh(x,_):x}}function Y8(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
52
+ `).reduce((n,r)=>{const[s,i]=r.split(": ");return i&&(n[s.toLowerCase()]=i),n},{}):{}}function X8(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return Q8(e.response,e.responseType)}catch(n){t.push(n)}return Ge&&Ke.warn("Failed to get xhr response body",...t),[void 0]}function Q8(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 J8(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return cm(n)}catch{return}}function Z8(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)=>eq(a,l,u))}catch{}}function eq(e,t,n){if(t.data)try{tq(t)&&rq(n)&&(G8(t,n),W8(t,n,e)),nq(t)&&sq(n)&&(L8(t,n),$8(t,n,e))}catch(r){Ge&&Ke.exception(r,"Error when enriching network breadcrumb")}}function tq(e){return e.category==="xhr"}function nq(e){return e.category==="fetch"}function rq(e){return e==null?void 0:e.xhr}function sq(e){return e==null?void 0:e.response}function iq(e,{autoFlushOnFeedback:t}){const n=ct();sI(Dj(e)),sm(I8(e)),S8(e),Z8(e);const r=P8(e);tz(r),n&&(n.on("beforeSendEvent",b8(e)),n.on("afterSendEvent",g8(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 oq(e){try{return Promise.all(um(e,[aq(jt.performance.memory)]))}catch{return[]}}function aq(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 lq(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=uu(a,t),o&&i===void 0&&(i=uu(a,o)),r}return c.cancel=l,c.flush=u,c}const Xr=St.navigator;function uq(){return/iPhone|iPad|iPod/i.test((Xr==null?void 0:Xr.userAgent)??"")||/Macintosh/i.test((Xr==null?void 0:Xr.userAgent)??"")&&(Xr!=null&&Xr.maxTouchPoints)&&(Xr==null?void 0:Xr.maxTouchPoints)>1?{sampling:{mousemove:!1}}:{}}function cq(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&&Rj(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!_w(e,n,s))return!0;if(!s)return!1;const i=e.session;if(fq(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&&Sw(i))}return i!=null&&i.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function dq(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 fq(e,t){!t||!e.session||e.session.segmentId!==0||_w(e,dq(e),!1)}function hq(e,t,n,r){return rl(mR(e,nw(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function pq({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
53
+ `;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 mq({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 wR(e.getOptions(),r,i,t,e,pi());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 gq({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=pq({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:l,traceIds:u,initialTimestamp:c}=r,d=ct(),f=Jt(),p=d==null?void 0:d.getTransport(),g=d==null?void 0:d.getDsn();if(!d||!p||!g||!i.sampled)return Ui({});const m={type:G4,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 mq({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."),Ui({});delete y.sdkProcessingMetadata;const w=hq(y,o,g,d.getOptions().tunnel);let b;try{b=await p.send(w)}catch(T){const x=new Error(cw);try{x.cause=T}catch{}throw x}if(typeof b.statusCode=="number"&&(b.statusCode<200||b.statusCode>=300))throw new ZI(b.statusCode);const _=AR({},b);if(IR(_,"replay"))throw new xw(_);return b}class ZI extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class xw extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function eA(e,t={count:0,interval:Z4}){const{recordingData:n,onError:r}=e;if(n.length)try{return await gq(e),!0}catch(s){if(s instanceof ZI||s instanceof xw)throw s;if(ZU("Replays",{_retryCount:t.count}),r&&r(s),t.count>=e5){const i=new Error(`${cw} - max retries exceeded`);try{i.cause=s}catch{}throw i}return t.interval*=++t.count,new Promise((i,o)=>{uu(async()=>{try{await eA(e,t),i(!0)}catch(a){o(a)}},t.interval)})}}const tA="__THROTTLED",vq="__SKIPPED";function yq(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?vq:tA}o=!1;const u=r.get(l)||0;return r.set(l,u+1),e(...a)}}class bq{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:K4,sessionIdleExpire:Y4},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=lq(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=yq((o,a)=>h8(this,o,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),i=r?{threshold:Math.min(t5,r),timeout:r,scrollTimeout:n5,ignoreSelector:s?s.join(","):""}:void 0;if(i&&(this.clickDetector=new Ej(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=ii({category:"ui.blur"});this._doChangeToBackgroundTasks(o)},this._handleWindowFocus=()=>{const o=ii({category:"ui.focus"});this._doChangeToForegroundTasks(o)},this._handleKeyboardEvent=o=>{Nj(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=Mi({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:J4}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:cq(this),...uq(),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}`:""}`),KI(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),(r=this.eventBuffer)==null||r.destroy(),this.eventBuffer=null,l8(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&&yy(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===tA){const s=ii({category:"replay.throttled"});this.addUpdate(()=>!_w(this,{type:yj,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||zn(),n=t&&Bn(t),s=(n&&bt(n).data||{})[Vr];if(!(!n||!s||!["route","custom"].includes(s)))return bt(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=i8({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 jI(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||(iq(this,{autoFlushOnFeedback:this._options._experiments.autoFlushOnFeedback}),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=Jj(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||HI(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=zj(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(um(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 oq(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 eA({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 xw?"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&&Sw(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=ii({category:"replay.mutations",data:{count:n,limit:i}});this._createCustomBreadcrumb(o)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function tc(e,t){return[...e,...t].join(",")}function wq({mask:e,unmask:t,block:n,unblock:r,ignore:s}){const i=["base","iframe[srcdoc]:not([src])"],o=tc(e,[".sentry-mask","[data-sentry-mask]"]),a=tc(t,[]);return{maskTextSelector:o,unmaskTextSelector:a,blockSelector:tc(n,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:tc(r,[]),ignoreSelector:tc(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function Sq({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 L1='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',_q=["content-length","content-type","accept"];let F1=!1;const kq=e=>new xq(e);class xq{constructor({flushMinDelay:t=X4,flushMaxDelay:n=Q4,minReplayDuration:r=r5,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:g=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:y=[],networkDetailDenyUrls:w=[],networkCaptureBodies:b=!0,networkRequestHeaders:_=[],networkResponseHeaders:T=[],mask:x=[],maskAttributes:C=["title","placeholder"],unmask:I=[],block:S=[],unblock:E=[],ignore:O=[],maskFn:R,beforeAddRecordingEvent:A,beforeErrorSampling:D,onError:L}={}){this.name="Replay";const W=wq({mask:x,unmask:I,block:S,unblock:E,ignore:O});if(this._recordingOptions={maskAllInputs:c,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:R,maskInputFn:R,maskAttributeFn:(z,K,G)=>Sq({maskAttributes:C,maskAllText:u,privacyOptions:W,key:z,value:K,el:G}),...W,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:z=>{try{z.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!l.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,s5),maxReplayDuration:Math.min(s,m1),stickySession:i,useCompression:o,workerUrl:a,blockAllMedia:d,maskAllInputs:c,maskAllText:u,mutationBreadcrumbLimit:f,mutationLimit:p,slowClickTimeout:g,slowClickIgnoreSelectors:m,networkDetailAllowUrls:y,networkDetailDenyUrls:w,networkCaptureBodies:b,networkRequestHeaders:N1(_),networkResponseHeaders:N1(T),beforeAddRecordingEvent:A,beforeErrorSampling:D,onError:L,_experiments:l},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${L1}`:L1),this._isInitialized&&i1())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return F1}set _isInitialized(t){F1=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=Eq(this._initialOptions,t);this._replay=new bq({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function Eq(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},s=ja(n.replaysSessionSampleRate),i=ja(n.replaysOnErrorSampleRate);return s==null&&i==null&&Yi(()=>{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[..._q,...e.map(t=>t.toLowerCase())]}const B1=new WeakMap,Rg=new Map,nA={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Cq(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:s,shouldCreateSpanForRequest:i,enableHTTPTimings:o,tracePropagationTargets:a,onRequestSpanStart:l}={...nA,...t},u=typeof i=="function"?i:f=>!0,c=f=>Rq(f,a),d={};n&&(e.addEventProcessor(f=>(f.type==="transaction"&&f.spans&&f.spans.forEach(p=>{if(p.op==="http.client"){const g=Rg.get(p.span_id);g&&(p.timestamp=g/1e3,Rg.delete(p.span_id))}}),f)),s&&mH(f=>{if(f.response){const p=B1.get(f.response);p&&f.endTimestamp&&Rg.set(p,f.endTimestamp)}}),VR(f=>{const p=aH(f,u,c,d);if(f.response&&f.fetchData.__span&&B1.set(f.response,f.fetchData.__span),p){const g=rA(f.fetchData.url),m=g?Oa(g).host:void 0;p.setAttributes({"http.url":g,"server.address":m}),o&&V1(p),l==null||l(p,{headers:f.headers})}})),r&&oI(f=>{var g;const p=Iq(f,u,c,d);if(p){o&&V1(p);let m;try{m=new Headers((g=f.xhr.__sentry_xhr_v3__)==null?void 0:g.request_headers)}catch{}l==null||l(p,{headers:m})}})}function Tq(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function V1(e){const{url:t}=bt(e).data;if(!t||typeof t!="string")return;const n=lu("resource",({entries:r})=>{r.forEach(s=>{Tq(s)&&s.name.endsWith(t)&&(Pq(s).forEach(o=>e.setAttribute(...o)),setTimeout(n))})})}function Hs(e=0){return((Kr()||performance.timeOrigin)+e)/1e3}function Pq(e){const{name:t,version:n}=rI(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),Kr()?[...r,["http.request.redirect_start",Hs(e.redirectStart)],["http.request.fetch_start",Hs(e.fetchStart)],["http.request.domain_lookup_start",Hs(e.domainLookupStart)],["http.request.domain_lookup_end",Hs(e.domainLookupEnd)],["http.request.connect_start",Hs(e.connectStart)],["http.request.secure_connection_start",Hs(e.secureConnectionStart)],["http.request.connection_end",Hs(e.connectEnd)],["http.request.request_start",Hs(e.requestStart)],["http.request.response_start",Hs(e.responseStart)],["http.request.response_end",Hs(e.responseEnd)]]:r}function Rq(e,t){const n=Du();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?xo(r.toString(),t)||i&&xo(r.pathname,t):i}else{const r=!!e.match(/^\/(?!\/)/);return t?xo(e,t):r}}function Iq(e,t,n,r){const s=e.xhr,i=s==null?void 0:s[fa];if(!s||s.__sentry_own_request__||!i)return;const{url:o,method:a}=i,l=zi()&&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&&(eR(y,i.status_code),y.end(),delete r[m]);return}const u=rA(o),c=Oa(u||o),d=oH(o),f=!!zn(),p=l&&f?Wa({name:`${a} ${d}`,attributes:{url:o,type:"xhr","http.method":a,"http.url":u,"server.address":c==null?void 0:c.host,[on]:"auto.http.browser",[Ha]:"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 qa;s.__sentry_xhr_span_id__=p.spanContext().spanId,r[s.__sentry_xhr_span_id__]=p,n(o)&&Aq(s,zi()&&f?p:void 0);const g=ct();return g&&g.emit("beforeOutgoingRequestSpan",p,e),p}function Aq(e,t){const{"sentry-trace":n,baggage:r}=MR({span:t});n&&Oq(e,n,r)}function Oq(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader("baggage",n)}catch{}}function rA(e){try{return new URL(e,wt.location.origin).href}catch{return}}function Mq(){wt.document?wt.document.addEventListener("visibilitychange",()=>{const e=zn();if(!e)return;const t=Bn(e);if(wt.document.hidden&&t){const n="cancelled",{op:r,status:s}=bt(t);ls&&Ce.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||t.setStatus({code:Cn,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):ls&&Ce.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const Dq=3600,sA="sentry_previous_trace",$q="sentry.previous_trace";function U1(e,t){const n=bt(t);if(!e)return{spanContext:t.spanContext(),startTimestamp:n.start_timestamp};const r=e.spanContext;return r.traceId===n.trace_id?e:(Date.now()/1e3-e.startTimestamp<=Dq&&(ls&&Ce.info(`Adding previous_trace ${r} link to span ${{op:n.op,...t.spanContext()}}`),t.addLink({context:r,attributes:{[LV]:"previous_trace"}}),t.setAttribute($q,`${r.traceId}-${r.spanId}-${r.traceFlags===1?1:0}`)),{spanContext:t.spanContext(),startTimestamp:bt(t).start_timestamp})}function Lq(e){try{wt.sessionStorage.setItem(sA,JSON.stringify(e))}catch(t){ls&&Ce.warn("Could not store previous trace in sessionStorage",t)}}function Fq(){var e;try{const t=(e=wt.sessionStorage)==null?void 0:e.getItem(sA);return JSON.parse(t)}catch{return}}const Nq="BrowserTracing",Bq={...eh,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,linkPreviousTrace:"in-memory",_experiments:{},...nA},z1=(e={})=>{const t=wt.document;eU();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:g,shouldCreateSpanForRequest:m,enableHTTPTimings:y,instrumentPageLoad:w,instrumentNavigation:b,linkPreviousTrace:_,onRequestSpanStart:T}={...Bq,...e},x=_3({recordClsStandaloneSpans:o||!1});n&&G3(),s&&St.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?x3():r&&k3(),i&&E3();const C={name:void 0,source:void 0};function I(S,E){const O=E.op==="pageload",R=a?a(E):E,A=R.attributes||{};E.name!==R.name&&(A[Vr]="custom",R.attributes=A),C.name=R.name,C.source=A[Vr];const D=bR(R,{idleTimeout:l,finalTimeout:u,childSpanTimeout:c,disableAutoFinish:O,beforeSpanEnd:W=>{x(),I3(W,{recordClsOnPageloadSpan:!o}),j1(S,void 0);const z=Jt(),K=z.getPropagationContext();z.setPropagationContext({...K,traceId:D.spanContext().traceId,sampled:nl(D),dsc:Hi(W)})}});j1(S,D);function L(){t&&["interactive","complete"].includes(t.readyState)&&S.emit("idleSpanEnableAutoFinish",D)}O&&t&&(t.addEventListener("readystatechange",()=>{L()}),L())}return{name:Nq,afterAllSetup(S){let E=Du();function O(){const R=dm(S);R&&!bt(R).timestamp&&(ls&&Ce.log(`[Tracing] Finishing current active span with op: ${bt(R).op}`),R.end())}if(S.on("startNavigationSpan",R=>{ct()===S&&(O(),pi().setPropagationContext({traceId:Oo(),sampleRand:Math.random()}),Jt().setPropagationContext({traceId:Oo(),sampleRand:Math.random()}),I(S,{op:"navigation",...R}))}),S.on("startPageLoadSpan",(R,A={})=>{if(ct()!==S)return;O();const D=A.sentryTrace||H1("sentry-trace"),L=A.baggage||H1("baggage"),W=WV(D,L);Jt().setPropagationContext(W),I(S,{op:"pageload",...R})}),_!=="off"){let R;S.on("spanStart",A=>{if(Bn(A)===A)if(_==="session-storage"){const D=U1(Fq(),A);Lq(D)}else R=U1(R,A)})}if(wt.location){if(w){const R=Kr();Vq(S,{name:wt.location.pathname,startTime:R?R/1e3:void 0,attributes:{[Vr]:"url",[on]:"auto.pageload.browser"}})}b&&sm(({to:R,from:A})=>{if(A===void 0&&(E==null?void 0:E.indexOf(R))!==-1){E=void 0;return}A!==R&&(E=void 0,iA(S,{name:wt.location.pathname,attributes:{[Vr]:"url",[on]:"auto.navigation.browser"}}))})}d&&Mq(),i&&Uq(S,l,u,c,C),n&&Y3(),Cq(S,{traceFetch:f,traceXHR:p,trackFetchStreamPerformance:g,tracePropagationTargets:S.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:m,enableHTTPTimings:y,onRequestSpanStart:T})}}};function Vq(e,t,n){return e.emit("startPageLoadSpan",t,n),Jt().setTransactionName(t.name),dm(e)}function iA(e,t){return e.emit("startNavigationSpan",t),Jt().setTransactionName(t.name),dm(e)}function H1(e){const t=wt.document,n=t==null?void 0:t.querySelector(`meta[name=${e}]`);return(n==null?void 0:n.getAttribute("content"))||void 0}function Uq(e,t,n,r,s){const i=wt.document;let o;const a=()=>{const l="ui.action.click",u=dm(e);if(u){const c=bt(u).op;if(["navigation","pageload"].includes(c)){ls&&Ce.warn(`[Tracing] Did not create ${l} span because a pageload or navigation span is in progress.`);return}}if(o&&(o.setAttribute(Kv,"interactionInterrupted"),o.end(),o=void 0),!s.name){ls&&Ce.warn(`[Tracing] Did not create ${l} transaction because _latestRouteName is missing.`);return}o=bR({name:s.name,op:l,attributes:{[Vr]:s.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};i&&addEventListener("click",a,{once:!1,capture:!0})}const oA="_sentry_idleSpan";function dm(e){return e[oA]}function j1(e,t){qr(e,oA,t)}const aA=["activate","mount"],lA=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,zq=/(?:^|[-_])(\w)/g,Hq=e=>e.replace(zq,t=>t.toUpperCase()).replace(/[-_]/g,""),jq="<Root>",Ig="<Anonymous>",qq=(e,t)=>e.repeat(t),Ac=(e,t)=>{if(!e)return Ig;if(e.$root===e)return jq;if(!e.$options)return Ig;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?`<${Hq(r)}>`:Ig)+(s&&t!==!1?` at ${s}`:"")},Wq=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`
54
+
55
+ found in
56
+
57
+ ${t.map((s,i)=>`${(i===0?"---> ":qq(" ",5+i*2))+(Array.isArray(s)?`${Ac(s[0])}... (${s[1]} recursive calls)`:Ac(s))}`).join(`
58
+ `)}`}return`
59
+
60
+ (found in ${Ac(e)})`},Gq=(e,t)=>{const{errorHandler:n}=e.config;e.config.errorHandler=(r,s,i)=>{var u;const o=Ac(s,!1),a=s?Wq(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(()=>{ai(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}},q1="ui.vue",Kq={activate:["activated","deactivated"],create:["beforeCreate","created"],unmount:["beforeUnmount","unmounted"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function Yq(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 Xq(e,t){function n(s){return s.replace(/^<([^\s]*)>(?: at [^\s]*)?$/,"$1")}return e.some(s=>n(t)===n(s))}const Qq=(e={})=>{const t=(e.hooks||[]).concat(aA).filter((r,s,i)=>i.indexOf(r)===s),n={};for(const r of t){const s=Kq[r];if(!s){lA&&Ce.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||Wa({name:"Application Render",op:`${q1}.render`,attributes:{[on]:"auto.ui.vue"},onlyIfParent:!0}));const a=Ac(this,!1),l=Array.isArray(e.trackComponents)?Xq(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)||zn()){const d=this.$_sentrySpans[r];d&&d.end(),this.$_sentrySpans[r]=Wa({name:`Vue ${a}`,op:`${q1}.${r}`,attributes:{[on]:"auto.ui.vue"},onlyIfParent:!0})}}else{const c=this.$_sentrySpans[r];if(!c)return;c.end(),Yq(this,er(),e.timeout||2e3)}}}return n},Jq=St,Zq={Vue:Jq.Vue,attachProps:!0,attachErrorHandler:!0,tracingOptions:{hooks:aA,timeout:2e3,trackComponents:!1}},eW="Vue",tW=(e={})=>({name:eW,setup(t){const n={...Zq,...t.getOptions(),...e};if(!n.Vue&&!n.app){Yi(()=>{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=>W1(s,n)):n.Vue&&W1(n.Vue,n)}}),W1=(e,t)=>{var n;lA&&((n=e._instance)==null?void 0:n.isMounted)===!0&&Yi(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`.")}),t.attachErrorHandler&&Gq(e,t),zi(t)&&e.mixin(Qq(t.tracingOptions))};function nW(e={}){const t={defaultIntegrations:[...fI(),tW()],...e};return OR(t,"vue"),W4(t)}function rW(e,t,n){let r=!0;e.onError(s=>ai(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={[on]:"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(Jt().setTransactionName(u),t.instrumentPageLoad&&a){const d=sW();d&&(bt(d).data[Vr]!=="custom"&&(d.updateName(u),d.setAttribute(Vr,c)),d.setAttributes({...l,[on]:"auto.pageload.vue"}))}t.instrumentNavigation&&!a&&(l[Vr]=c,l[on]="auto.navigation.vue",n({name:u,op:"navigation",attributes:l})),o&&o()})}function sW(){const e=zn(),t=e&&Bn(e);if(!t)return;const n=bt(t).op;return n==="navigation"||n==="pageload"?t:void 0}function iW(e={}){if(!e.router)return z1(e);const t=z1({...e,instrumentNavigation:!1}),{router:n,instrumentNavigation:r=!0,instrumentPageLoad:s=!0,routeLabel:i="name"}=e;return{...t,afterAllSetup(o){t.afterAllSetup(o),rW(n,{routeLabel:i,instrumentNavigation:r,instrumentPageLoad:s},l=>{iA(o,l)})}}}async function uA(){return"/"}async function Gn(e=!0,t=!0){const n=fn.create({baseURL:await uA()});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=as();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===da.FailedDependency)return Promise.reject(r);if(![da.Unauthorized,da.Forbidden].includes(s.status))return console.error("Error in axios response interceptor which is not 401 or 403",r),ai(r),Promise.reject({message:`${r.message} - URL ${i==null?void 0:i.url}`,stack:r.stack});if(s.status===da.Forbidden){const f=(d=r==null?void 0:r.response)==null?void 0:d.data;return console.error("[HttpClient] 403 Forbidden",f),Fr("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=as();o.loadTokens();const{reasonCode:a,url:l}=o.extractSpecialReasonCode(r);if(a)return await o.logout(!1,qb(a)),console.error(`[AuthStore] 401 Unauthorized - emitting 'auth:${a}' with reason ${a}`),Fr(`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'"),Fr("auth:failure").emit({url:i==null?void 0:i.url,error:r.message}),Promise.reject(r)}),n}class mr{static async get(t){return(await(await Gn(!0)).get(t)).data}static async put(t,n){return(await(await Gn(!0)).put(t,n)).data}static async post(t,n){return(await(await Gn(!0)).post(t,n)).data}static async postUpload(t,n,r){return await(await Gn(!0)).post(t,n,r)}static async getDownload(t,n){return await(await Gn(!0)).request({method:"GET",url:t,data:n,responseType:"arraybuffer"})}static async delete(t,n){return(await(await Gn(!0)).request({url:t,method:"delete",data:n})).data}static async patch(t,n){return(await(await Gn(!0)).patch(t,n)).data}}const ae=class ae{};ye(ae,"base","/api"),ye(ae,"firstTimeSetupRoute",`${ae.base}/first-time-setup`),ye(ae,"completeFirstTimeSetupRoute",`${ae.firstTimeSetupRoute}/complete`),ye(ae,"printerRoute",`${ae.base}/printer`),ye(ae,"printerBatchRoute",`${ae.printerRoute}/batch`),ye(ae,"printerTestConnectionRoute",`${ae.printerRoute}/test-connection`),ye(ae,"printerSettingsRoute",`${ae.base}/printer-settings`),ye(ae,"floorRoute",`${ae.base}/floor`),ye(ae,"batchRoute",`${ae.base}/batch`),ye(ae,"batchGetLastPrintedFilesRoute",`${ae.batchRoute}/reprint/list`),ye(ae,"batchReprintFilesRoute",`${ae.batchRoute}/reprint/execute`),ye(ae,"printCompletionRoute",`${ae.base}/print-completion`),ye(ae,"printerFilesRoute",`${ae.base}/printer-files`),ye(ae,"printerFilesPurgeRoute",`${ae.printerFilesRoute}/purge`),ye(ae,"printerGroupRoute",`${ae.base}/printer-group`),ye(ae,"createGroupRoute",`${ae.base}/printer-group`),ye(ae,"customGCodeRoute",`${ae.base}/custom-gcode`),ye(ae,"userRoute",`${ae.base}/user`),ye(ae,"rolesRoute",`${ae.base}/user/roles`),ye(ae,"userProfileRoute",`${ae.userRoute}/profile`),ye(ae,"settingsRoute",`${ae.base}/settings`),ye(ae,"settingsSensitiveRoute",`${ae.settingsRoute}/sensitive`),ye(ae,"updateLoginRequiredRoute",`${ae.settingsRoute}/login-required`),ye(ae,"updateRegistrationEnabledRoute",`${ae.settingsRoute}/registration-enabled`),ye(ae,"updateCredentialSettings",`${ae.settingsRoute}/credential`),ye(ae,"fileCleanSettingsRoute",`${ae.settingsRoute}/file-clean`),ye(ae,"updateFrontendSettingsRoute",`${ae.settingsRoute}/frontend`),ye(ae,"updateTimeoutSettingRoute",`${ae.settingsRoute}/timeout`),ye(ae,"serverSentryDiagnosticsSettingRoute",`${ae.settingsRoute}/sentry-diagnostics`),ye(ae,"updateExperimentalMoonrakerSupportRoute",`${ae.settingsRoute}/experimental-moonraker-support`),ye(ae,"updateExperimentalClientSupportRoute",`${ae.settingsRoute}/experimental-client-support`),ye(ae,"deleteGroupRoute",t=>`${ae.base}/printer-group/${t}`),ye(ae,"updateGroupNameRoute",t=>`${ae.base}/printer-group/${t}/name`),ye(ae,"addPrinterToGroupRoute",t=>`${ae.base}/printer-group/${t}/printer`),ye(ae,"deletePrinterFromGroupRoute",ae.addPrinterToGroupRoute),ye(ae,"getPrinterRoute",t=>`${ae.printerRoute}/${t}`),ye(ae,"postPrinterDisabledReasonRoute",t=>`${ae.printerRoute}/${t}/disabled-reason`),ye(ae,"getPrinterLoginDetailsRoute",t=>`${ae.getPrinterRoute(t)}/login-details`),ye(ae,"restartOctoPrintRoute",t=>`${ae.getPrinterRoute(t)}/restart-octoprint`),ye(ae,"refreshSocketRoute",t=>`${ae.getPrinterRoute(t)}/refresh-socket`),ye(ae,"getPrinterSettingsRoute",t=>`${ae.printerSettingsRoute}/${t}`),ye(ae,"setPrinterSettingsGCodeAnalysisRoute",t=>`${ae.getPrinterSettingsRoute(t)}/gcode-analysis`),ye(ae,"syncPrinterNameSettingRoute",t=>`${ae.getPrinterSettingsRoute(t)}/sync-printername`),ye(ae,"getFloorRoute",t=>`${ae.floorRoute}/${t}`),ye(ae,"addOrRemovePrinterFromFloorRoute",t=>`${ae.getFloorRoute(t)}/printer`),ye(ae,"sendQuickStopM112Route",t=>`${ae.customGCodeRoute}/send-emergency-m112/${t}`),ye(ae,"updatePrinterFloorNameRoute",t=>`${ae.getFloorRoute(t)}/name`),ye(ae,"updatePrinterFloorNumberRoute",t=>`${ae.getFloorRoute(t)}/floor-number`),ye(ae,"printerFilesClearRoute",t=>`${ae.printerFilesRoute}/${t}/clear`),ye(ae,"printerFilesSelectAndPrintRoute",t=>`${ae.printerFilesRoute}/${t}/select`),ye(ae,"printerFilesUploadRoute",t=>`${ae.printerFilesRoute}/${t}/upload`),ye(ae,"printerFilesCacheRoute",t=>`${ae.printerFilesRoute}/${t}/cache`),ye(ae,"printerEnabledRoute",t=>`${ae.getPrinterRoute(t)}/enabled`),ye(ae,"printerSerialConnectRoute",t=>`${ae.getPrinterRoute(t)}/serial-connect`),ye(ae,"printerJogCommandRoute",t=>`${ae.getPrinterRoute(t)}/jog`),ye(ae,"printerHomeCommandRoute",t=>`${ae.getPrinterRoute(t)}/home`),ye(ae,"printerSerialDisconnectRoute",t=>`${ae.getPrinterRoute(t)}/serial-disconnect`),ye(ae,"printerJobRoute",t=>`${ae.getPrinterRoute(t)}/job`),ye(ae,"printerStopJobRoute",t=>`${ae.printerJobRoute(t)}/stop`),ye(ae,"printerPauseJobRoute",t=>`${ae.printerJobRoute(t)}/pause`),ye(ae,"printerResumeJobRoute",t=>`${ae.printerJobRoute(t)}/resume`),ye(ae,"userChangeUsernameRoute",t=>`${ae.userRoute}/${t}/change-username`),ye(ae,"userChangePasswordRoute",t=>`${ae.userRoute}/${t}/change-password`),ye(ae,"userDeleteRoute",t=>`${ae.userRoute}/${t}`),ye(ae,"userSetVerifiedRoute",t=>`${ae.userRoute}/${t}/set-verified`),ye(ae,"userSetRootUserRoute",t=>`${ae.userRoute}/${t}/set-root-user`),ye(ae,"userSetUserRolesRoute",t=>`${ae.userRoute}/${t}/set-user-roles`);let De=ae;const oW=Symbol("Progress snackbar message event symbol"),aW=Symbol("Info snackbar message event symbol"),lW=Symbol("Error snackbar message event symbol");function Dt(){const{emit:e,on:t}=Fr(oW),{emit:n,on:r}=Fr(aW),{emit:s,on:i}=Fr(lW);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 Sy(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 Di extends mr{static async getFiles(t){const n=`${De.printerFilesRoute}/${t}`;return await this.get(n)}static async getThumbnail(t){const n=`${De.printerFilesRoute}/${t}/thumbnail`;return await this.get(n)}static async getFileCache(t){const n=`${De.printerFilesCacheRoute(t)}`;return await this.get(n)}static async selectAndPrintFile(t,n,r=!0){const s=De.printerFilesSelectAndPrintRoute(t);return await this.post(s,{filePath:n,print:r})}static async uploadFile(t,n){const r=De.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=`${De.printerFilesClearRoute(t)}`;return this.delete(n)}static async purgeFiles(){const t=`${De.printerFilesPurgeRoute}`;return this.post(t)}static async deleteFileOrFolder(t,n){const r=`${De.printerFilesRoute}/${t}?path=${encodeURIComponent(n)}`;return this.delete(r)}static async downloadFile(t,n){const r=`${De.printerFilesRoute}/${t}/download/${encodeURIComponent(n)}`,s=await this.getDownload(r);Sy(s.data,n)}}const uW=["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"],cW=["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 G1(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function Vu(){const e=Math.round(Math.random()*1124),t=Math.round(Math.random()*3260);return`${G1(uW[e])} ${G1(cW[t])}`}function fm(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 _y=()=>({id:void 0,name:Vu(),apiKey:"",printerURL:"",printerType:0,enabled:!0});class Xt extends mr{static convertPrinterToCreateForm(t){const n=_y();return n.id=t.id,n.printerURL=t.printerURL,n.name=t.name||Vu(),n.apiKey=t.apiKey,n.enabled=t.enabled,n}static openPrinterURL(t){t&&window.open(t)}static async getPrinters(){const t=De.printerRoute;return await this.get(t)}static async getPrinterLoginDetails(t){const n=De.getPrinterLoginDetailsRoute(t);return await this.get(n)}static async restartOctoPrint(t){const n=`${De.restartOctoPrintRoute(t)}`;return await this.post(n)}static async refreshSocket(t){const n=`${De.refreshSocketRoute(t)}`;return await this.post(n)}static async sendPrinterConnectCommand(t){const n=De.printerSerialConnectRoute(t);return await this.post(n)}static async sendPrinterDisconnectCommand(t){const n=De.printerSerialDisconnectRoute(t);return await this.post(n)}static async sendPrinterJogCommand(t,n){const r=De.printerJogCommandRoute(t);return await this.post(r,n)}static async sendPrinterHomeCommand(t,n){const r=De.printerHomeCommandRoute(t);return await this.post(r,n)}static async createPrinter(t,n){const r=`${De.printerRoute}?forceSave=${n}`;return await this.post(r,t)}static async batchImportPrinters(t){const n=De.printerBatchRoute;return await this.post(n,t)}static async deletePrinter(t){const n=De.getPrinterRoute(t);return await this.delete(n)}static async updatePrinter(t,n,r){const i=`${De.getPrinterRoute(t)}?forceSave=${r}`;return await this.patch(i,n)}static async updatePrinterMaintenance(t,n=null){const r=De.postPrinterDisabledReasonRoute(t);return await this.patch(r,{disabledReason:n})}static async testConnection(t){const n=De.printerTestConnectionRoute;return await this.post(n,t)}static async toggleEnabled(t,n){const r=De.printerEnabledRoute(t);return await this.patch(r,{enabled:n})}}class Pn extends mr{static async getSettings(){const t=De.settingsRoute;return await this.get(t)}static async getSettingsSensitive(){const t=De.settingsSensitiveRoute;return await this.get(t)}static async updateLoginRequiredSettings(t){const n=`${De.updateLoginRequiredRoute}`;return await this.put(n,{loginRequired:t})}static async updateRegistrationEnabledSettings(t){const n=`${De.updateRegistrationEnabledRoute}`;return await this.put(n,{registrationEnabled:t})}static async updateCredentialSettings(t,n,r){const s=`${De.updateCredentialSettings}`;return await this.put(s,{jwtExpiresIn:t,refreshTokenAttempts:n,refreshTokenExpiry:r})}static async updateFrontendSettings(t){const n=`${De.updateFrontendSettingsRoute}`;return await this.put(n,t)}static async setSentryDiagnosticsSettings(t){const n=`${De.serverSentryDiagnosticsSettingRoute}`;return await this.patch(n,{enabled:t})}static async updateTimeoutSettings(t){const n=`${De.updateTimeoutSettingRoute}`;return await this.put(n,t)}static async setFileCleanSettings(t){const n=`${De.fileCleanSettingsRoute}`;return await this.put(n,t)}static async updateExperimentalMoonrakerSupport(t){const n=De.updateExperimentalMoonrakerSupportRoute;return await this.put(n,{enabled:t})}static async updateExperimentalClientSupport(t){const n=De.updateExperimentalClientSupportRoute;return await this.put(n,{enabled:t})}}class Ma extends mr{static async stopPrintJob(t){const n=De.printerStopJobRoute(t);return await this.post(n)}static async pausePrintJob(t){const n=De.printerPauseJobRoute(t);return await this.post(n)}static async resumePrintJob(t){const n=De.printerResumeJobRoute(t);return await this.post(n)}}const Fs=ps("Settings",{state:()=>({settings:void 0,frontendDebugSettings:{showPrinterStateUpdateSideNav:!1,showInterpretedPrinterState:!1,showJobsRendered:!1}}),actions:{async loadSettings(){const e=await Pn.getSettings();return this.settings=e,e},async updateFrontendSettings(e){const t=await Pn.updateFrontendSettings(e);return this.settings=t,t},async saveFrontendSettings(){if(!this.settings)return;const e=await Pn.updateFrontendSettings(this.settings.frontend);this.settings=e},async updateTimeoutSettings(e){const t=await Pn.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}}}),gi={danger:"danger",dark:"dark",secondary:"secondary",success:"success"},vi={DarkBlue:"#050c2e",Black:"#000000",DarkGray:"#262626",LightBrown:"#583c0e",Brown:"#580e47",Red:"#2e0905"},dl={Disabled:"Disabled",Maintenance:"Maintenance",Offline:"Offline",Finding:"Finding",Disconnected:"Disconnected",Error:"Error",Paused:"Paused",Operational:"Operational",Printing:"Printing"};function cA(e,t,n){var f,p,g,m;const s=Fs().frontendDebugSettings.showInterpretedPrinterState,i={};if(!e.enabled)return(f=e.disabledReason)!=null&&f.length?{...i,color:gi.danger,rgb:vi.Black,text:dl.Maintenance}:{...i,color:gi.secondary,rgb:vi.DarkBlue,text:dl.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:gi.secondary,rgb:vi.Red,text:a?"API key wrong":y?"API unreachable":(t==null?void 0:t.api)||"-"}}if(!o)return{...i,color:gi.danger,rgb:vi.Red,text:a?"API key wrong":"No API connection"};const l=t.socket==="authenticated",u=t.socket==="authenticating",c=(g=(p=n==null?void 0:n.current)==null?void 0:p.payload)==null?void 0:g.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},
61
+ currentState: ${c}, FLAGS ${d}`),{...i,color:gi.danger,rgb:vi.Red,text:n?"Awaiting state":"No USB"};if(!d){console.error("No flags",d);return}return d.error||d.closedOrError?{...i,color:gi.danger,rgb:vi.Red,text:((m=c.text)==null?void 0:m.replace("Offline","Disconnected"))||dl.Error,description:c.error}:d.paused||d.pausing?{...i,color:gi.success,rgb:vi.Brown,text:dl.Paused}:d.printing?{...i,color:gi.success,rgb:vi.LightBrown,text:dl.Printing}:{...i,color:gi.dark,rgb:vi.DarkGray,text:dl.Operational,description:c.error}}const Da=e=>{var t,n;return(n=(t=e==null?void 0:e.current)==null?void 0:t.payload)==null?void 0:n.state},dW=e=>{var t;return(t=Da(e))==null?void 0:t.flags.printing},fW=(e,t)=>{var n,r,s;return!hm(e)&&(e==null?void 0:e.enabled)&&!((n=Da(t))!=null&&n.flags.operational)||((r=Da(t))==null?void 0:r.flags.error)||((s=Da(t))==null?void 0:s.flags.closedOrError)},dA=e=>!hm(e)&&!(e!=null&&e.enabled),hm=e=>{var t;return!(e!=null&&e.enabled)&&((t=e==null?void 0:e.disabledReason)==null?void 0:t.length)},hW=(e,t)=>{var n,r,s;return((n=Da(t))==null?void 0:n.flags)&&!((r=Da(t))!=null&&r.flags.printing)&&((s=Da(t))==null?void 0:s.flags.operational)&&!dA(e)&&!hm(e)},tr=ps("PrinterState",{state:()=>({printerIds:[],printerEventsById:{},socketStatesById:{}}),getters:{operationalPrintersById(){const e=Ft(),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=Ft(),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=tr();return Object.values(e.onlinePrintersWithStates).filter(t=>dW(t.printerState)).length},operationalNotPrintingCount(){return this.onlinePrintersWithStates.filter(e=>hW(e.printer,e.printerState)).length},isApiResponding(){return e=>Object.keys(this.onlinePrinters).includes(e.toString())},isPrinterNotOnline(){return e=>!this.isApiResponding(e)},printerJobsById(){const e=Ft(),t=Fs().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=Ft(),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||!Ft().printer(e))){if(this.isPrinterPrinting(e)){alert("This printer is printing or not connected! Either way printing is not an option.");return}await Di.selectAndPrintFile(e,t,!0)}}}}),Ft=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(dA).length},disconnectedCount(){const e=tr();return this.printers.filter(t=>fW(t,e.printerEventsById[t.id])).length},maintenanceCount(){return this.printers.filter(e=>hm(e)).length}},actions:{async createPrinter(e,t){const n=await Xt.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=tr(),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 Xt.updatePrinter(e,t,n);return this._replacePrinter({printerId:e,printer:r}),r},async loadPrinters(){const e=await Xt.getPrinters();return this.setPrinters(e),e},async deletePrinter(e){const t=await Xt.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 Di.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 Di.getFiles(e);return t.sort((n,r)=>n.date<r.date?1:-1),this.printerFileCache[e]=t,t},async deletePrinterFile(e,t){await Di.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=tr();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 Ma.stopPrintJob(n.id)}}}),Mn=_e()({name:"VCardActions",props:Ue(),setup(e,t){let{slots:n}=t;return Pr({VBtn:{slim:!0,variant:"text"}}),Ae(()=>{var r;return h("div",{class:["v-card-actions",e.class],style:e.style},[(r=n.default)==null?void 0:r.call(n)])}),{}}}),pW=ue({opacity:[Number,String],...Ue(),...vt()},"VCardSubtitle"),pm=_e()({name:"VCardSubtitle",props:pW(),setup(e,t){let{slots:n}=t;return Ae(()=>h(e.tag,{class:["v-card-subtitle",e.class],style:[{"--v-card-subtitle-opacity":e.opacity},e.style]},n)),{}}}),sn=ku("v-card-title");function mW(e){return{aspectStyles:P(()=>{const t=Number(e.aspectRatio);return t?{paddingBottom:String(1/t*100)+"%"}:void 0})}}const fA=ue({aspectRatio:[String,Number],contentClass:null,inline:Boolean,...Ue(),...Ir()},"VResponsive"),K1=_e()({name:"VResponsive",props:fA(),setup(e,t){let{slots:n}=t;const{aspectStyles:r}=mW(e),{dimensionStyles:s}=Ar(e);return Ae(()=>{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 gW(e,t){if(!Ib)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?hA(e,t):u.init=!0},i);e._observe=Object(e._observe),e._observe[t.instance.$.uid]={init:!1,observer:o},o.observe(e)}function hA(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 Ew={mounted:gW,unmounted:hA},vW=ue({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,...fA(),...Ue(),...Dn(),...Iu()},"VImg"),us=_e()({name:"VImg",directives:{intersect:Ew},props:vW(),emits:{loadstart:e=>!0,load:e=>!0,error:e=>!0},setup(e,t){let{emit:n,slots:r}=t;const{backgroundColorClasses:s,backgroundColorStyles:i}=dr(Te(e,"color")),{roundedClasses:o}=Un(e),a=an("VImg"),l=Ie(""),u=U(),c=Ie(e.eager?"loading":"idle"),d=Ie(),f=Ie(),p=P(()=>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)}),g=P(()=>p.value.aspect||d.value/f.value||0);ke(()=>e.src,()=>{m(c.value!=="idle")}),ke(g,(A,D)=>{!A&&D&&u.value&&T(u.value)}),Su(()=>m());function m(A){if(!(e.eager&&A)&&!(Ib&&!A&&!e.eager)){if(c.value="loading",p.value.lazySrc){const D=new Image;D.src=p.value.lazySrc,T(D,null)}p.value.src&&Mt(()=>{var D;n("loadstart",((D=u.value)==null?void 0:D.currentSrc)||p.value.src),setTimeout(()=>{var L;if(!a.isUnmounted)if((L=u.value)!=null&&L.complete){if(u.value.naturalWidth||w(),c.value==="error")return;g.value||T(u.value,null),c.value==="loading"&&y()}else g.value||T(u.value),b()})})}}function y(){var A;a.isUnmounted||(b(),T(u.value),c.value="loaded",n("load",((A=u.value)==null?void 0:A.currentSrc)||p.value.src))}function w(){var A;a.isUnmounted||(c.value="error",n("error",((A=u.value)==null?void 0:A.currentSrc)||p.value.src))}function b(){const A=u.value;A&&(l.value=A.currentSrc||A.src)}let _=-1;En(()=>{clearTimeout(_)});function T(A){let D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:100;const L=()=>{if(clearTimeout(_),a.isUnmounted)return;const{naturalHeight:W,naturalWidth:z}=A;W||z?(d.value=z,f.value=W):!A.complete&&c.value==="loading"&&D!=null?_=window.setTimeout(L,D):(A.currentSrc.endsWith(".svg")||A.currentSrc.startsWith("data:image/svg+xml"))&&(d.value=1,f.value=1)};L()}const x=P(()=>({"v-img__img--cover":e.cover,"v-img__img--contain":!e.cover})),C=()=>{var L;if(!p.value.src||c.value==="idle")return null;const A=h("img",{class:["v-img__img",x.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:w},null),D=(L=r.sources)==null?void 0:L.call(r);return h(si,{transition:e.transition,appear:!0},{default:()=>[Bt(D?h("picture",{class:"v-img__picture"},[D,A]):A,[[Gi,c.value==="loaded"]])]})},I=()=>h(si,{transition:e.transition},{default:()=>[p.value.lazySrc&&c.value!=="loaded"&&h("img",{class:["v-img__img","v-img__img--preload",x.value],style:{objectPosition:e.position},crossorigin:e.crossorigin,src:p.value.lazySrc,alt:e.alt,referrerpolicy:e.referrerpolicy,draggable:e.draggable},null)]}),S=()=>r.placeholder?h(si,{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(si,{transition:e.transition,appear:!0},{default:()=>[c.value==="error"&&h("div",{class:"v-img__error"},[r.error()])]}):null,O=()=>e.gradient?h("div",{class:"v-img__gradient",style:{backgroundImage:`linear-gradient(${e.gradient})`}},null):null,R=Ie(!1);{const A=ke(g,D=>{D&&(requestAnimationFrame(()=>{requestAnimationFrame(()=>{R.value=!0})}),A())})}return Ae(()=>{const A=K1.filterProps(e);return Bt(h(K1,he({class:["v-img",{"v-img--absolute":e.absolute,"v-img--booting":!R.value},s.value,o.value,e.class],style:[{width:Fe(e.width==="auto"?d.value:e.width)},i.value,e.style]},A,{aspectRatio:g.value,"aria-label":e.alt,role:e.alt?"img":void 0}),{additional:()=>h(Pe,null,[h(C,null,null),h(I,null,null),h(O,null,null),h(S,null,null),h(E,null,null)]),default:r.default}),[[fr("intersect"),{handler:m,options:e.options},null,{once:!0}]])}),{currentSrc:l,image:u,state:c,naturalWidth:d,naturalHeight:f}}}),yW=ue({start:Boolean,end:Boolean,icon:He,image:String,text:String,...ms(),...Ue(),...Rr(),...Dn(),...Eu(),...vt(),...$t(),...$s({variant:"flat"})},"VAvatar"),lt=_e()({name:"VAvatar",props:yW(),setup(e,t){let{slots:n}=t;const{themeClasses:r}=Zt(e),{borderClasses:s}=Ms(e),{colorClasses:i,colorStyles:o,variantClasses:a}=Ja(e),{densityClasses:l}=gs(e),{roundedClasses:u}=Un(e),{sizeClasses:c,sizeStyles:d}=Td(e);return Ae(()=>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(us,{key:"image",src:e.image,alt:"",cover:!0},null):e.icon?h(J,{key:"icon",icon:e.icon},null):e.text,Uo(!1,"v-avatar")]})),{}}}),bW=ue({appendAvatar:String,appendIcon:He,prependAvatar:String,prependIcon:He,subtitle:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},...Ue(),...Rr()},"VCardItem"),wW=_e()({name:"VCardItem",props:bW(),setup(e,t){let{slots:n}=t;return Ae(()=>{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(J,{key:"prepend-icon",density:e.density,icon:e.prependIcon},null)])]),h("div",{class:"v-card-item__content"},[a&&h(sn,{key:"title"},{default:()=>{var c;return[((c=n.title)==null?void 0:c.call(n))??re(e.title)]}}),l&&h(pm,{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(J,{key:"append-icon",density:e.density,icon:e.appendIcon},null),e.appendAvatar&&h(lt,{key:"append-avatar",density:e.density,image:e.appendAvatar},null)])])])}),{}}}),SW=ue({opacity:[Number,String],...Ue(),...vt()},"VCardText"),en=_e()({name:"VCardText",props:SW(),setup(e,t){let{slots:n}=t;return Ae(()=>h(e.tag,{class:["v-card-text",e.class],style:[{"--v-card-text-opacity":e.opacity},e.style]},n)),{}}}),_W=ue({appendAvatar:String,appendIcon:He,disabled:Boolean,flat:Boolean,hover:Boolean,image:String,link:{type:Boolean,default:void 0},prependAvatar:String,prependIcon:He,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(),...Ue(),...Rr(),...Ir(),...vs(),...Bp(),...zo(),...Cu(),...Dn(),...zp(),...vt(),...$t(),...$s({variant:"elevated"})},"VCard"),gt=_e()({name:"VCard",directives:{Ripple:Pu},props:_W(),setup(e,t){let{attrs:n,slots:r}=t;const{themeClasses:s}=Zt(e),{borderClasses:i}=Ms(e),{colorClasses:o,colorStyles:a,variantClasses:l}=Ja(e),{densityClasses:u}=gs(e),{dimensionStyles:c}=Ar(e),{elevationClasses:d}=Ds(e),{loaderClasses:f}=Pd(e),{locationStyles:p}=Za(e),{positionClasses:g}=Tu(e),{roundedClasses:m}=Un(e),y=Up(e,n),w=P(()=>e.link!==!1&&y.isLink.value),b=P(()=>!e.disabled&&e.link!==!1&&(e.link||y.isClickable.value));return Ae(()=>{const _=w.value?"a":e.tag,T=!!(r.title||e.title!=null),x=!!(r.subtitle||e.subtitle!=null),C=T||x,I=!!(r.append||e.appendAvatar||e.appendIcon),S=!!(r.prepend||e.prependAvatar||e.prependIcon),E=!!(r.image||e.image),O=C||S||I,R=!!(r.text||e.text!=null);return Bt(h(_,he({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":b.value},s.value,i.value,o.value,u.value,d.value,f.value,g.value,m.value,l.value,e.class],style:[a.value,c.value,p.value,e.style],onClick:b.value&&y.navigate,tabindex:e.disabled?-1:void 0},y.linkProps),{default:()=>{var A;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(us,{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}),O&&h(wW,{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}),R&&h(en,{key:"text"},{default:()=>{var D;return[((D=r.text)==null?void 0:D.call(r))??e.text]}}),(A=r.default)==null?void 0:A.call(r),r.actions&&h(Mn,null,{default:r.actions}),Uo(b.value,"v-card")]}}),[[fr("ripple"),b.value&&e.ripple]])}),{}}}),pA=Symbol.for("vuetify:goto");function mA(){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 kW(e){return Cw(e)??(document.scrollingElement||document.body)}function Cw(e){return typeof e=="string"?document.querySelector(e):Ab(e)}function Ag(e,t,n){if(typeof e=="number")return t&&n?-e:e;let r=Cw(e),s=0;for(;r;)s+=t?r.offsetLeft:r.offsetTop,r=r.offsetParent;return s}function xW(e,t){return{rtl:t.isRtl,options:Jn(mA(),e)}}async function Y1(e,t,n,r){const s=n?"scrollLeft":"scrollTop",i=Jn((r==null?void 0:r.options)??mA(),t),o=r==null?void 0:r.rtl.value,a=(typeof e=="number"?e:Cw(e))??0,l=i.container==="parent"&&a instanceof HTMLElement?a.parentElement:kW(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=Ag(a,n,o);else if(c=Ag(a,n,o)-Ag(l,n,o),i.layout){const g=window.getComputedStyle(a).getPropertyValue("--v-layout-top");g&&(c-=parseInt(g,10))}c+=i.offset,c=CW(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 g(m){const w=(m-f)/i.duration,b=Math.floor(d+(c-d)*u(Er(w,0,1)));if(l[s]=b,w>=1&&Math.abs(b-l[s])<10)return p(c);if(w>2)return p(l[s]);requestAnimationFrame(g)}))}function EW(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=Xe(pA),{isRtl:n}=Or();if(!t)throw new Error("[Vuetify] Could not find injected goto instance");const r={...t,rtl:P(()=>t.rtl.value||n.value)};async function s(i,o){return Y1(i,Jn(e,o),!1,r)}return s.horizontal=async(i,o)=>Y1(i,Jn(e,o),!0,r),s}function CW(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 TW(e){let{selectedElement:t,containerElement:n,isRtl:r,isHorizontal:s}=e;const i=sd(s,n),o=gA(s,r,n),a=sd(s,t),l=vA(s,t),u=a*.4;return o>l?l-u:o+i<l+a?l-i+a+u:o}function PW(e){let{selectedElement:t,containerElement:n,isHorizontal:r}=e;const s=sd(r,n),i=vA(r,t),o=sd(r,t);return i-s/2+o/2}function X1(e,t){const n=e?"scrollWidth":"scrollHeight";return(t==null?void 0:t[n])||0}function RW(e,t){const n=e?"clientWidth":"clientHeight";return(t==null?void 0:t[n])||0}function gA(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 sd(e,t){const n=e?"offsetWidth":"offsetHeight";return(t==null?void 0:t[n])||0}function vA(e,t){const n=e?"offsetLeft":"offsetTop";return(t==null?void 0:t[n])||0}const IW=Symbol.for("vuetify:v-slide-group"),yA=ue({centerActive:Boolean,direction:{type:String,default:"horizontal"},symbol:{type:null,default:IW},nextIcon:{type:He,default:"$next"},prevIcon:{type:He,default:"$prev"},showArrows:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["always","desktop","mobile"].includes(e)},...Ue(),...el({mobile:null}),...vt(),...xd({selectedClass:"v-slide-group-item--active"})},"VSlideGroup"),Q1=_e()({name:"VSlideGroup",props:yA(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{isRtl:r}=Or(),{displayClasses:s,mobile:i}=fi(e),o=xu(e,e.symbol),a=Ie(!1),l=Ie(0),u=Ie(0),c=Ie(0),d=P(()=>e.direction==="horizontal"),{resizeRef:f,contentRect:p}=Va(),{resizeRef:g,contentRect:m}=Va(),y=EW(),w=P(()=>({container:f.el,duration:200,easing:"easeOutQuart"})),b=P(()=>o.selected.value.length?o.items.value.findIndex(ne=>ne.id===o.selected.value[0]):-1),_=P(()=>o.selected.value.length?o.items.value.findIndex(ne=>ne.id===o.selected.value[o.selected.value.length-1]):-1);if(Et){let ne=-1;ke(()=>[o.selected.value,p.value,m.value,d.value],()=>{cancelAnimationFrame(ne),ne=requestAnimationFrame(()=>{if(p.value&&m.value){const q=d.value?"width":"height";u.value=p.value[q],c.value=m.value[q],a.value=u.value+1<c.value}if(b.value>=0&&g.el){const q=g.el.children[_.value];x(q,e.centerActive)}})})}const T=Ie(!1);function x(ne,q){let Y=0;q?Y=PW({containerElement:f.el,isHorizontal:d.value,selectedElement:ne}):Y=TW({containerElement:f.el,isHorizontal:d.value,isRtl:r.value,selectedElement:ne}),C(Y)}function C(ne){if(!Et||!f.el)return;const q=sd(d.value,f.el),Y=gA(d.value,r.value,f.el);if(!(X1(d.value,f.el)<=q||Math.abs(ne-Y)<16)){if(d.value&&r.value&&f.el){const{scrollWidth:ie,offsetWidth:be}=f.el;ne=ie-be-ne}d.value?y.horizontal(ne,w.value):y(ne,w.value)}}function I(ne){const{scrollTop:q,scrollLeft:Y}=ne.target;l.value=d.value?Y:q}function S(ne){if(T.value=!0,!(!a.value||!g.el)){for(const q of ne.composedPath())for(const Y of g.el.children)if(Y===q){x(Y);return}}}function E(ne){T.value=!1}let O=!1;function R(ne){var q;!O&&!T.value&&!(ne.relatedTarget&&((q=g.el)!=null&&q.contains(ne.relatedTarget)))&&W(),O=!1}function A(){O=!0}function D(ne){if(!g.el)return;function q(Y){ne.preventDefault(),W(Y)}d.value?ne.key==="ArrowRight"?q(r.value?"prev":"next"):ne.key==="ArrowLeft"&&q(r.value?"next":"prev"):ne.key==="ArrowDown"?q("next"):ne.key==="ArrowUp"&&q("prev"),ne.key==="Home"?q("first"):ne.key==="End"&&q("last")}function L(ne,q){if(!ne)return;let Y=ne;do Y=Y==null?void 0:Y[q==="next"?"nextElementSibling":"previousElementSibling"];while(Y!=null&&Y.hasAttribute("disabled"));return Y}function W(ne){if(!g.el)return;let q;if(!ne)q=jc(g.el)[0];else if(ne==="next"){if(q=L(g.el.querySelector(":focus"),ne),!q)return W("first")}else if(ne==="prev"){if(q=L(g.el.querySelector(":focus"),ne),!q)return W("last")}else ne==="first"?(q=g.el.firstElementChild,q!=null&&q.hasAttribute("disabled")&&(q=L(q,"next"))):ne==="last"&&(q=g.el.lastElementChild,q!=null&&q.hasAttribute("disabled")&&(q=L(q,"prev")));q&&q.focus({preventScroll:!0})}function z(ne){const q=d.value&&r.value?-1:1,Y=(ne==="prev"?-q:q)*u.value;let oe=l.value+Y;if(d.value&&r.value&&f.el){const{scrollWidth:ie,offsetWidth:be}=f.el;oe+=ie-be}C(oe)}const K=P(()=>({next:o.next,prev:o.prev,select:o.select,isSelected:o.isSelected})),G=P(()=>{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)}}),H=P(()=>Math.abs(l.value)>1),B=P(()=>{if(!f.value)return!1;const ne=X1(d.value,f.el),q=RW(d.value,f.el);return ne-q-Math.abs(l.value)>1});return Ae(()=>h(e.tag,{class:["v-slide-group",{"v-slide-group--vertical":!d.value,"v-slide-group--has-affixes":G.value,"v-slide-group--is-overflowing":a.value},s.value,e.class],style:e.style,tabindex:T.value||o.selected.value.length?-1:0,onFocus:R},{default:()=>{var ne,q,Y;return[G.value&&h("div",{key:"prev",class:["v-slide-group__prev",{"v-slide-group__prev--disabled":!H.value}],onMousedown:A,onClick:()=>H.value&&z("prev")},[((ne=n.prev)==null?void 0:ne.call(n,K.value))??h(X_,null,{default:()=>[h(J,{icon:r.value?e.nextIcon:e.prevIcon},null)]})]),h("div",{key:"container",ref:f,class:"v-slide-group__container",onScroll:I},[h("div",{ref:g,class:"v-slide-group__content",onFocusin:S,onFocusout:E,onKeydown:D},[(q=n.default)==null?void 0:q.call(n,K.value)])]),G.value&&h("div",{key:"next",class:["v-slide-group__next",{"v-slide-group__next--disabled":!B.value}],onMousedown:A,onClick:()=>B.value&&z("next")},[((Y=n.next)==null?void 0:Y.call(n,K.value))??h(X_,null,{default:()=>[h(J,{icon:r.value?e.prevIcon:e.nextIcon},null)]})])]}})),{selected:o.selected,scrollTo:z,scrollOffset:l,focus:W,hasPrev:H,hasNext:B}}}),bA=Symbol.for("vuetify:v-chip-group"),AW=ue({baseColor:String,column:Boolean,filter:Boolean,valueComparator:{type:Function,default:Ps},...yA(),...Ue(),...xd({selectedClass:"v-chip--selected"}),...vt(),...$t(),...$s({variant:"tonal"})},"VChipGroup"),ep=_e()({name:"VChipGroup",props:AW(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:r}=Zt(e),{isSelected:s,select:i,next:o,prev:a,selected:l}=xu(e,bA);return Pr({VChip:{baseColor:Te(e,"baseColor"),color:Te(e,"color"),disabled:Te(e,"disabled"),filter:Te(e,"filter"),variant:Te(e,"variant")}}),Ae(()=>{const u=Q1.filterProps(e);return h(Q1,he(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})]}})}),{}}}),OW=ue({activeClass:String,appendAvatar:String,appendIcon:He,baseColor:String,closable:Boolean,closeIcon:{type:He,default:"$delete"},closeLabel:{type:String,default:"$vuetify.close"},draggable:Boolean,filter:Boolean,filterIcon:{type:He,default:"$complete"},label:Boolean,link:{type:Boolean,default:void 0},pill:Boolean,prependAvatar:String,prependIcon:He,ripple:{type:[Boolean,Object],default:!0},text:{type:[String,Number,Boolean],default:void 0},modelValue:{type:Boolean,default:!0},onClick:Nn(),onClickOnce:Nn(),...ms(),...Ue(),...Rr(),...vs(),...Ed(),...Dn(),...zp(),...Eu(),...vt({tag:"span"}),...$t(),...$s({variant:"tonal"})},"VChip"),Sn=_e()({name:"VChip",directives:{Ripple:Pu},props:OW(),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}=Wr(),{borderClasses:o}=Ms(e),{densityClasses:a}=gs(e),{elevationClasses:l}=Ds(e),{roundedClasses:u}=Un(e),{sizeClasses:c}=Td(e),{themeClasses:d}=Zt(e),f=st(e,"modelValue"),p=Cd(e,bA,!1),g=Up(e,n),m=P(()=>e.link!==!1&&g.isLink.value),y=P(()=>!e.disabled&&e.link!==!1&&(!!p||e.link||g.isClickable.value)),w=P(()=>({"aria-label":i(e.closeLabel),onClick(S){S.preventDefault(),S.stopPropagation(),f.value=!1,r("click:close",S)}})),b=P(()=>({color:!p||p.isSelected.value?e.color??e.baseColor:e.baseColor,variant:e.variant})),{colorClasses:_,colorStyles:T,variantClasses:x}=Ja(b);function C(S){var E;r("click",S),y.value&&((E=g.navigate)==null||E.call(g,S),p==null||p.toggle())}function I(S){(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),C(S))}return()=>{var W;const S=g.isLink.value?"a":e.tag,E=!!(e.appendIcon||e.appendAvatar),O=!!(E||s.append),R=!!(s.close||e.closable),A=!!(s.filter||e.filter)&&p,D=!!(e.prependIcon||e.prependAvatar),L=!!(D||s.prepend);return f.value&&Bt(h(S,he({class:["v-chip",{"v-chip--disabled":e.disabled,"v-chip--label":e.label,"v-chip--link":y.value,"v-chip--filter":A,"v-chip--pill":e.pill,[`${e.activeClass}`]:e.activeClass&&((W=g.isActive)==null?void 0:W.value)},d.value,o.value,_.value,a.value,l.value,u.value,c.value,x.value,p==null?void 0:p.selectedClass.value,e.class],style:[T.value,e.style],disabled:e.disabled||void 0,draggable:e.draggable,tabindex:y.value?0:void 0,onClick:C,onKeydown:y.value&&!m.value&&I},g.linkProps),{default:()=>{var z;return[Uo(y.value,"v-chip"),A&&h(iP,{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(J,{key:"filter-icon",icon:e.filterIcon},null)]),[[Gi,p.isSelected.value]])]}),L&&h("div",{key:"prepend",class:"v-chip__prepend"},[s.prepend?h(Ot,{key:"prepend-defaults",disabled:!D,defaults:{VAvatar:{image:e.prependAvatar,start:!0},VIcon:{icon:e.prependIcon,start:!0}}},s.prepend):h(Pe,null,[e.prependIcon&&h(J,{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":""},[((z=s.default)==null?void 0:z.call(s,{isSelected:p==null?void 0:p.isSelected.value,selectedClass:p==null?void 0:p.selectedClass.value,select:p==null?void 0:p.select,toggle:p==null?void 0:p.toggle,value:p==null?void 0:p.value.value,disabled:e.disabled}))??re(e.text)]),O&&h("div",{key:"append",class:"v-chip__append"},[s.append?h(Ot,{key:"append-defaults",disabled:!E,defaults:{VAvatar:{end:!0,image:e.appendAvatar},VIcon:{end:!0,icon:e.appendIcon}}},s.append):h(Pe,null,[e.appendIcon&&h(J,{key:"append-icon",end:!0,icon:e.appendIcon},null),e.appendAvatar&&h(lt,{key:"append-avatar",end:!0,image:e.appendAvatar},null)])]),R&&h("button",he({key:"close",class:"v-chip__close",type:"button","data-testid":"close-chip"},w.value),[s.close?h(Ot,{key:"close-defaults",defaults:{VIcon:{icon:e.closeIcon,size:"x-small"}}},s.close):h(J,{key:"close-icon",icon:e.closeIcon,size:"x-small"},null)])]}}),[[fr("ripple"),y.value&&e.ripple,null]])}}}),MW=ue({fluid:{type:Boolean,default:!1},...Ue(),...Ir(),...vt()},"VContainer"),Vn=_e()({name:"VContainer",props:MW(),setup(e,t){let{slots:n}=t;const{rtlClasses:r}=Or(),{dimensionStyles:s}=Ar(e);return Ae(()=>h(e.tag,{class:["v-container",{"v-container--fluid":e.fluid},r.value,e.class],style:[s.value,e.style]},n)),{}}}),wA=Hp.reduce((e,t)=>(e[t]={type:[Boolean,String,Number],default:!1},e),{}),SA=Hp.reduce((e,t)=>{const n="offset"+ci(t);return e[n]={type:[String,Number],default:null},e},{}),_A=Hp.reduce((e,t)=>{const n="order"+ci(t);return e[n]={type:[String,Number],default:null},e},{}),J1={col:Object.keys(wA),offset:Object.keys(SA),order:Object.keys(_A)};function DW(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 $W=["auto","start","end","center","baseline","stretch"],LW=ue({cols:{type:[Boolean,String,Number],default:!1},...wA,offset:{type:[String,Number],default:null},...SA,order:{type:[String,Number],default:null},..._A,alignSelf:{type:String,default:null,validator:e=>$W.includes(e)},...Ue(),...vt()},"VCol"),ze=_e()({name:"VCol",props:LW(),setup(e,t){let{slots:n}=t;const r=P(()=>{const s=[];let i;for(i in J1)J1[i].forEach(a=>{const l=e[a],u=DW(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 hr(e.tag,{class:[r.value,e.class],style:e.style},(s=n.default)==null?void 0:s.call(n))}}}),Tw=["start","end","center"],kA=["space-between","space-around","space-evenly"];function Pw(e,t){return Hp.reduce((n,r)=>{const s=e+ci(r);return n[s]=t(),n},{})}const FW=[...Tw,"baseline","stretch"],xA=e=>FW.includes(e),EA=Pw("align",()=>({type:String,default:null,validator:xA})),NW=[...Tw,...kA],CA=e=>NW.includes(e),TA=Pw("justify",()=>({type:String,default:null,validator:CA})),BW=[...Tw,...kA,"stretch"],PA=e=>BW.includes(e),RA=Pw("alignContent",()=>({type:String,default:null,validator:PA})),Z1={align:Object.keys(EA),justify:Object.keys(TA),alignContent:Object.keys(RA)},VW={align:"align",justify:"justify",alignContent:"align-content"};function UW(e,t,n){let r=VW[e];if(n!=null){if(t){const s=t.replace(e,"");r+=`-${s}`}return r+=`-${n}`,r.toLowerCase()}}const zW=ue({dense:Boolean,noGutters:Boolean,align:{type:String,default:null,validator:xA},...EA,justify:{type:String,default:null,validator:CA},...TA,alignContent:{type:String,default:null,validator:PA},...RA,...Ue(),...vt()},"VRow"),rt=_e()({name:"VRow",props:zW(),setup(e,t){let{slots:n}=t;const r=P(()=>{const s=[];let i;for(i in Z1)Z1[i].forEach(o=>{const a=e[o],l=UW(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 hr(e.tag,{class:["v-row",r.value,e.class],style:e.style},(s=n.default)==null?void 0:s.call(n))}}}),wn=ku("v-spacer","div","VSpacer"),HW=$e({__name:"PrinterControlDialog",setup(e){const t=tn(nn.PrinterControlDialog),n=Ft(),r=tr(),s=P(()=>{var d;return(d=t.context())==null?void 0:d.printerId}),i=P(()=>{if(s.value)return n.printer(s.value)}),o=U(10),a=P(()=>{var f,p,g,m,y,w,b,_,T,x;const d=r.printerEventsById[s.value];return(g=(p=(f=d==null?void 0:d.current)==null?void 0:f.payload)==null?void 0:p.temps)!=null&&g.length&&((b=(w=(y=(m=d==null?void 0:d.current)==null?void 0:m.payload)==null?void 0:y.temps[0])==null?void 0:w.tool0)!=null&&b.actual)?(x=(T=(_=d==null?void 0:d.current)==null?void 0:_.payload)==null?void 0:T.temps[0])==null?void 0:x.tool0:null}),l=async(d,f,p)=>{await Xt.sendPrinterJogCommand(s.value,{x:d*o.value,y:f*o.value,z:p*o.value})},u=async d=>{await Xt.sendPrinterHomeCommand(s.value,d)},c=()=>{t.closeDialog()};return(d,f)=>{const p=hi;return $(),te(p,{id:Z(t).dialogId,"max-width":"700px",onEscape:f[14]||(f[14]=g=>c())},{default:v(()=>[h(gt,null,{default:v(()=>[h(sn,null,{default:v(()=>f[15]||(f[15]=[k(" Printer Controls ")])),_:1}),h(en,null,{default:v(()=>[i.value?($(),te(Vn,{key:0},{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:12},{default:v(()=>{var g;return[k(" Printer: "+re((g=i.value)==null?void 0:g.name)+" ",1),f[16]||(f[16]=M("br",null,null,-1)),h(Sn,{color:"primary"},{default:v(()=>{var m,y;return[k(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:v(()=>[h(ze,{cols:8},{default:v(()=>[f[26]||(f[26]=k(" X/Y ")),f[27]||(f[27]=M("br",null,null,-1)),h(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[0]||(f[0]=g=>l(-1,1,0))},{default:v(()=>[h(J,null,{default:v(()=>f[17]||(f[17]=[k("north_west")])),_:1})]),_:1}),h(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[1]||(f[1]=g=>l(0,1,0))},{default:v(()=>[h(J,null,{default:v(()=>f[18]||(f[18]=[k("north")])),_:1})]),_:1}),h(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[2]||(f[2]=g=>l(1,1,0))},{default:v(()=>[h(J,null,{default:v(()=>f[19]||(f[19]=[k("north_east")])),_:1})]),_:1}),f[28]||(f[28]=M("br",null,null,-1)),h(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[3]||(f[3]=g=>l(-1,0,0))},{default:v(()=>[h(J,null,{default:v(()=>f[20]||(f[20]=[k("west")])),_:1})]),_:1}),h(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[4]||(f[4]=g=>u(["x","y"]))},{default:v(()=>[h(J,null,{default:v(()=>f[21]||(f[21]=[k("home")])),_:1})]),_:1}),h(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[5]||(f[5]=g=>l(1,0,0))},{default:v(()=>[h(J,null,{default:v(()=>f[22]||(f[22]=[k("east")])),_:1})]),_:1}),f[29]||(f[29]=M("br",null,null,-1)),h(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[6]||(f[6]=g=>l(-1,-1,0))},{default:v(()=>[h(J,null,{default:v(()=>f[23]||(f[23]=[k("south_west")])),_:1})]),_:1}),h(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[7]||(f[7]=g=>l(0,-1,0))},{default:v(()=>[h(J,null,{default:v(()=>f[24]||(f[24]=[k("south")])),_:1})]),_:1}),h(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[8]||(f[8]=g=>l(1,-1,0))},{default:v(()=>[h(J,null,{default:v(()=>f[25]||(f[25]=[k("south_east")])),_:1})]),_:1})]),_:1}),h(ze,{cols:"4"},{default:v(()=>[f[33]||(f[33]=k(" Z ")),f[34]||(f[34]=M("br",null,null,-1)),h(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[9]||(f[9]=g=>l(0,0,1))},{default:v(()=>[h(J,null,{default:v(()=>f[30]||(f[30]=[k("north")])),_:1})]),_:1}),f[35]||(f[35]=M("br",null,null,-1)),h(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[10]||(f[10]=g=>u(["z"]))},{default:v(()=>[h(J,null,{default:v(()=>f[31]||(f[31]=[k("home")])),_:1})]),_:1}),f[36]||(f[36]=M("br",null,null,-1)),h(se,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[11]||(f[11]=g=>l(1,0,1))},{default:v(()=>[h(J,null,{default:v(()=>f[32]||(f[32]=[k("south")])),_:1})]),_:1})]),_:1})]),_:1}),h(rt,null,{default:v(()=>[h(ze,{cols:"12"},{default:v(()=>[h(NT,{modelValue:o.value,"onUpdate:modelValue":f[12]||(f[12]=g=>o.value=g)},{default:v(()=>[h(se,{value:.1},{default:v(()=>f[37]||(f[37]=[k(" 0.1 ")])),_:1}),h(se,{value:1},{default:v(()=>f[38]||(f[38]=[k(" 1 ")])),_:1}),h(se,{value:10},{default:v(()=>f[39]||(f[39]=[k(" 10 ")])),_:1}),h(se,{value:100},{default:v(()=>f[40]||(f[40]=[k(" 100 ")])),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})):fe("",!0)]),_:1}),h(Mn,null,{default:v(()=>[h(wn),h(se,{variant:"text",onClick:f[13]||(f[13]=g=>c())},{default:v(()=>f[41]||(f[41]=[k(" Close ")])),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}});class Al extends mr{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=De.batchGetLastPrintedFilesRoute;return await this.post(n,{printerIds:t})}static async batchReprintFiles(t){const n=De.batchReprintFilesRoute;return await this.post(n,{prints:t})}}var oa=(e=>(e[e.PrinterNotAvailable=0]="PrinterNotAvailable",e[e.NoLastPrint=1]="NoLastPrint",e[e.LastPrintReady=2]="LastPrintReady",e))(oa||{});function jW(e){return e.message?`${e.message}
62
+ ${e.stack}`:`'${e}'`}const qW=ku("v-alert-title"),WW=["success","info","warning","error"],GW=ue({border:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["top","end","bottom","start"].includes(e)},borderColor:String,closable:Boolean,closeIcon:{type:He,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=>WW.includes(e)},...Ue(),...Rr(),...Ir(),...vs(),...zo(),...Cu(),...Dn(),...vt(),...$t(),...$s({variant:"flat"})},"VAlert"),dn=_e()({name:"VAlert",props:GW(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{emit:n,slots:r}=t;const s=st(e,"modelValue"),i=P(()=>{if(e.icon!==!1)return e.type?e.icon??`$${e.type}`:e.icon}),o=P(()=>({color:e.color??e.type,variant:e.variant})),{themeClasses:a}=Zt(e),{colorClasses:l,colorStyles:u,variantClasses:c}=Ja(o),{densityClasses:d}=gs(e),{dimensionStyles:f}=Ar(e),{elevationClasses:p}=Ds(e),{locationStyles:g}=Za(e),{positionClasses:m}=Tu(e),{roundedClasses:y}=Un(e),{textColorClasses:w,textColorStyles:b}=Is(Te(e,"borderColor")),{t:_}=Wr(),T=P(()=>({"aria-label":_(e.closeLabel),onClick(x){s.value=!1,n("click:close",x)}}));return()=>{const x=!!(r.prepend||i.value),C=!!(r.title||e.title),I=!!(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,g.value,e.style],role:"alert"},{default:()=>{var S,E;return[Uo(!1,"v-alert"),e.border&&h("div",{key:"border",class:["v-alert__border",w.value],style:b.value},null),x&&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(J,{key:"prepend-icon",density:e.density,icon:i.value,size:e.prominent?44:28},null)]),h("div",{class:"v-alert__content"},[C&&h(qW,{key:"title"},{default:()=>{var O;return[((O=r.title)==null?void 0:O.call(r))??e.title]}}),((S=r.text)==null?void 0:S.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()]),I&&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 O;return[(O=r.close)==null?void 0:O.call(r,{props:T.value})]}}):h(se,he({key:"close-btn",icon:e.closeIcon,size:"x-small",variant:"text"},T.value),null)])]}})}}}),ky=Symbol.for("vuetify:list");function IA(){const e=Xe(ky,{hasPrepend:Ie(!1),updateHasPrepend:()=>null}),t={hasPrepend:Ie(!1),updateHasPrepend:n=>{n&&(t.hasPrepend.value=n)}};return Gt(ky,t),e}function AA(){return Xe(ky,null)}const Rw=e=>{const t={activate:n=>{let{id:r,value:s,activated:i}=n;return r=Be(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 An(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},OA=e=>{const t=Rw(e);return{activate:r=>{let{activated:s,id:i,...o}=r;i=Be(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=An(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=Rw(e);return{activate:r=>{let{id:s,activated:i,children:o,...a}=r;return s=Be(s),o.has(s)?i:t.activate({id:s,activated:i,children:o,...a})},in:t.in,out:t.out}},YW=e=>{const t=OA(e);return{activate:r=>{let{id:s,activated:i,children:o,...a}=r;return s=Be(s),o.has(s)?i:t.activate({id:s,activated:i,children:o,...a})},in:t.in,out:t.out}},XW={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},MA={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},QW={open:MA.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)}},Iw=e=>{const t={select:n=>{let{id:r,value:s,selected:i}=n;if(r=Be(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},DA=e=>{const t=Iw(e);return{select:r=>{let{selected:s,id:i,...o}=r;i=Be(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)}},JW=e=>{const t=Iw(e);return{select:r=>{let{id:s,selected:i,children:o,...a}=r;return s=Be(s),o.has(s)?i:t.select({id:s,selected:i,children:o,...a})},in:t.in,out:t.out}},ZW=e=>{const t=DA(e);return{select:r=>{let{id:s,selected:i,children:o,...a}=r;return s=Be(s),o.has(s)?i:t.select({id:s,selected:i,children:o,...a})},in:t.in,out:t.out}},$A=e=>{const t={select:n=>{let{id:r,value:s,selected:i,children:o,parents:a}=n;r=Be(r);const l=new Map(i),u=[r];for(;u.length;){const d=u.shift();i.set(Be(d),s?"on":"off"),o.has(d)&&u.push(...o.get(d))}let c=Be(a.get(r));for(;c;){const d=o.get(c),f=d.every(g=>i.get(Be(g))==="on"),p=d.every(g=>!i.has(Be(g))||i.get(Be(g))==="off");i.set(c,f?"on":p?"off":"indeterminate"),c=Be(a.get(c))}return e&&!s&&Array.from(i.entries()).reduce((f,p)=>{let[g,m]=p;return m==="on"&&f.push(g),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},e6=e=>{const t=$A(e);return{select:t.select,in:t.in,out:(r,s,i)=>{const o=[];for(const[a,l]of r.entries())if(l==="on"){if(i.has(a)){const u=i.get(a);if(r.get(u)==="on")continue}o.push(a)}return o}}},id=Symbol.for("vuetify:nested"),LA={id:Ie(),root:{register:()=>null,unregister:()=>null,parents:U(new Map),children:U(new Map),open:()=>null,openOnSelect:()=>null,activate:()=>null,select:()=>null,activatable:U(!1),selectable:U(!1),opened:U(new Set),activated:U(new Set),selected:U(new Map),selectedValues:U([]),getPath:()=>[]}},t6=ue({activatable:Boolean,selectable:Boolean,activeStrategy:[String,Function,Object],selectStrategy:[String,Function,Object],openStrategy:[String,Object],opened:null,activated:null,selected:null,mandatory:Boolean},"nested"),n6=e=>{let t=!1;const n=U(new Map),r=U(new Map),s=st(e,"opened",e.opened,g=>new Set(g),g=>[...g.values()]),i=P(()=>{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 YW(e.mandatory);case"independent":return Rw(e.mandatory);case"single-independent":default:return OA(e.mandatory)}}),o=P(()=>{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 ZW(e.mandatory);case"leaf":return JW(e.mandatory);case"independent":return Iw(e.mandatory);case"single-independent":return DA(e.mandatory);case"trunk":return e6(e.mandatory);case"classic":default:return $A(e.mandatory)}}),a=P(()=>{if(typeof e.openStrategy=="object")return e.openStrategy;switch(e.openStrategy){case"list":return QW;case"single":return XW;case"multiple":default:return MA}}),l=st(e,"activated",e.activated,g=>i.value.in(g,n.value,r.value),g=>i.value.out(g,n.value,r.value)),u=st(e,"selected",e.selected,g=>o.value.in(g,n.value,r.value),g=>o.value.out(g,n.value,r.value));En(()=>{t=!0});function c(g){const m=[];let y=g;for(;y!=null;)m.unshift(y),y=r.value.get(y);return m}const d=an("nested"),f=new Set,p={id:Ie(),root:{opened:s,activatable:Te(e,"activatable"),selectable:Te(e,"selectable"),activated:l,selected:u,selectedValues:P(()=>{const g=[];for(const[m,y]of u.value.entries())y==="on"&&g.push(m);return g}),register:(g,m,y)=>{if(f.has(g)){c(g).map(String).join(" -> "),c(m).concat(g).map(String).join(" -> ");return}else f.add(g);m&&g!==m&&r.value.set(g,m),y&&n.value.set(g,[]),m!=null&&n.value.set(m,[...n.value.get(m)||[],g])},unregister:g=>{if(t)return;f.delete(g),n.value.delete(g);const m=r.value.get(g);if(m){const y=n.value.get(m)??[];n.value.set(m,y.filter(w=>w!==g))}r.value.delete(g)},open:(g,m,y)=>{d.emit("click:open",{id:g,value:m,path:c(g),event:y});const w=a.value.open({id:g,value:m,opened:new Set(s.value),children:n.value,parents:r.value,event:y});w&&(s.value=w)},openOnSelect:(g,m,y)=>{const w=a.value.select({id:g,value:m,selected:new Map(u.value),opened:new Set(s.value),children:n.value,parents:r.value,event:y});w&&(s.value=w)},select:(g,m,y)=>{d.emit("click:select",{id:g,value:m,path:c(g),event:y});const w=o.value.select({id:g,value:m,selected:new Map(u.value),children:n.value,parents:r.value,event:y});w&&(u.value=w),p.root.openOnSelect(g,m,y)},activate:(g,m,y)=>{if(!e.activatable)return p.root.select(g,!0,y);d.emit("click:activate",{id:g,value:m,path:c(g),event:y});const w=i.value.activate({id:g,value:m,activated:new Set(l.value),children:n.value,parents:r.value,event:y});if(w.size!==l.value.size)l.value=w;else{for(const b of w)if(!l.value.has(b)){l.value=w;return}for(const b of l.value)if(!w.has(b)){l.value=w;return}}},children:n,parents:r,getPath:c}};return Gt(id,p),p.root},FA=(e,t)=>{const n=Xe(id,LA),r=Symbol("nested item"),s=P(()=>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:P(()=>n.root.opened.value.has(s.value)),parent:P(()=>n.root.parents.value.get(s.value)),activate:(o,a)=>n.root.activate(s.value,o,a),isActivated:P(()=>n.root.activated.value.has(Be(s.value))),select:(o,a)=>n.root.select(s.value,o,a),isSelected:P(()=>n.root.selected.value.get(Be(s.value))==="on"),isIndeterminate:P(()=>n.root.selected.value.get(Be(s.value))==="indeterminate"),isLeaf:P(()=>!n.root.children.value.get(s.value)),isGroupActivator:n.isGroupActivator};return Su(()=>{!n.isGroupActivator&&n.root.register(s.value,n.id.value,t)}),En(()=>{!n.isGroupActivator&&n.root.unregister(s.value)}),t&&Gt(id,i),i},r6=()=>{const e=Xe(id,LA);Gt(id,{...e,isGroupActivator:!0})};function Hd(){const e=Ie(!1);return _t(()=>{window.requestAnimationFrame(()=>{e.value=!0})}),{ssrBootStyles:P(()=>e.value?void 0:{transition:"none !important"}),isBooted:wu(e)}}const s6=_u({name:"VListGroupActivator",setup(e,t){let{slots:n}=t;return r6(),()=>{var r;return(r=n.default)==null?void 0:r.call(n)}}}),i6=ue({activeColor:String,baseColor:String,color:String,collapseIcon:{type:He,default:"$collapse"},expandIcon:{type:He,default:"$expand"},prependIcon:He,appendIcon:He,fluid:Boolean,subgroup:Boolean,title:String,value:null,...Ue(),...vt()},"VListGroup"),xy=_e()({name:"VListGroup",props:i6(),setup(e,t){let{slots:n}=t;const{isOpen:r,open:s,id:i}=FA(Te(e,"value"),!0),o=P(()=>`v-list-group--id-${String(i.value)}`),a=AA(),{isBooted:l}=Hd();function u(p){var g;p.stopPropagation(),!["INPUT","TEXTAREA"].includes((g=p.target)==null?void 0:g.tagName)&&s(!r.value,p)}const c=P(()=>({onClick:u,class:"v-list-group__header",id:o.value})),d=P(()=>r.value?e.collapseIcon:e.expandIcon),f=P(()=>({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 Ae(()=>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(s6,null,{default:()=>[n.activator({props:c.value,isOpen:r.value})]})]}),h(si,{transition:{component:sP},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)]),[[Gi,r.value]])]}})]})),{isOpen:r}}}),o6=ue({opacity:[Number,String],...Ue(),...vt()},"VListItemSubtitle"),yt=_e()({name:"VListItemSubtitle",props:o6(),setup(e,t){let{slots:n}=t;return Ae(()=>h(e.tag,{class:["v-list-item-subtitle",e.class],style:[{"--v-list-item-subtitle-opacity":e.opacity},e.style]},n)),{}}}),dt=ku("v-list-item-title"),a6=ue({active:{type:Boolean,default:void 0},activeClass:String,activeColor:String,appendAvatar:String,appendIcon:He,baseColor:String,disabled:Boolean,lines:[Boolean,String],link:{type:Boolean,default:void 0},nav:Boolean,prependAvatar:String,prependIcon:He,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(),...Ue(),...Rr(),...Ir(),...vs(),...Dn(),...zp(),...vt(),...$t(),...$s({variant:"text"})},"VListItem"),Ve=_e()({name:"VListItem",directives:{Ripple:Pu},props:a6(),emits:{click:e=>!0},setup(e,t){let{attrs:n,slots:r,emit:s}=t;const i=Up(e,n),o=P(()=>e.value===void 0?i.href.value:e.value),{activate:a,isActivated:l,select:u,isOpen:c,isSelected:d,isIndeterminate:f,isGroupActivator:p,root:g,parent:m,openOnSelect:y,id:w}=FA(o,!1),b=AA(),_=P(()=>{var oe;return e.active!==!1&&(e.active||((oe=i.isActive)==null?void 0:oe.value)||(g.activatable.value?l.value:d.value))}),T=P(()=>e.link!==!1&&i.isLink.value),x=P(()=>!!b&&(g.selectable.value||g.activatable.value||e.value!=null)),C=P(()=>!e.disabled&&e.link!==!1&&(e.link||i.isClickable.value||x.value)),I=P(()=>e.rounded||e.nav),S=P(()=>e.color??e.activeColor),E=P(()=>({color:_.value?S.value??e.baseColor:e.baseColor,variant:e.variant}));ke(()=>{var oe;return(oe=i.isActive)==null?void 0:oe.value},oe=>{oe&&O()}),Su(()=>{var oe;(oe=i.isActive)!=null&&oe.value&&O()});function O(){m.value!=null&&g.open(m.value,!0),y(!0)}const{themeClasses:R}=Zt(e),{borderClasses:A}=Ms(e),{colorClasses:D,colorStyles:L,variantClasses:W}=Ja(E),{densityClasses:z}=gs(e),{dimensionStyles:K}=Ar(e),{elevationClasses:G}=Ds(e),{roundedClasses:H}=Un(I),B=P(()=>e.lines?`v-list-item--${e.lines}-line`:void 0),ne=P(()=>({isActive:_.value,select:u,isOpen:c.value,isSelected:d.value,isIndeterminate:f.value}));function q(oe){var ie,be;s("click",oe),!["INPUT","TEXTAREA"].includes((ie=oe.target)==null?void 0:ie.tagName)&&C.value&&((be=i.navigate)==null||be.call(i,oe),!p&&(g.activatable.value?a(!l.value,oe):(g.selectable.value||e.value!=null)&&u(!d.value,oe)))}function Y(oe){const ie=oe.target;["INPUT","TEXTAREA"].includes(ie.tagName)||(oe.key==="Enter"||oe.key===" ")&&(oe.preventDefault(),oe.target.dispatchEvent(new MouseEvent("click",oe)))}return Ae(()=>{const oe=T.value?"a":e.tag,ie=r.title||e.title!=null,be=r.subtitle||e.subtitle!=null,Q=!!(e.appendAvatar||e.appendIcon),X=!!(Q||r.append),V=!!(e.prependAvatar||e.prependIcon),ge=!!(V||r.prepend);return b==null||b.updateHasPrepend(ge),e.activeColor&&zF("active-color",["color","base-color"]),Bt(h(oe,he({class:["v-list-item",{"v-list-item--active":_.value,"v-list-item--disabled":e.disabled,"v-list-item--link":C.value,"v-list-item--nav":e.nav,"v-list-item--prepend":!ge&&(b==null?void 0:b.hasPrepend.value),"v-list-item--slim":e.slim,[`${e.activeClass}`]:e.activeClass&&_.value},R.value,A.value,D.value,z.value,G.value,B.value,H.value,W.value,e.class],style:[L.value,K.value,e.style],tabindex:C.value?b?-2:0:void 0,"aria-selected":x.value?g.activatable.value?l.value:g.selectable.value?d.value:_.value:void 0,onClick:q,onKeydown:C.value&&!T.value&&Y},i.linkProps),{default:()=>{var Oe;return[Uo(C.value||_.value,"v-list-item"),ge&&h("div",{key:"prepend",class:"v-list-item__prepend"},[r.prepend?h(Ot,{key:"prepend-defaults",disabled:!V,defaults:{VAvatar:{density:e.density,image:e.prependAvatar},VIcon:{density:e.density,icon:e.prependIcon},VListItemAction:{start:!0}}},{default:()=>{var Ne;return[(Ne=r.prepend)==null?void 0:Ne.call(r,ne.value)]}}):h(Pe,null,[e.prependAvatar&&h(lt,{key:"prepend-avatar",density:e.density,image:e.prependAvatar},null),e.prependIcon&&h(J,{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":""},[ie&&h(dt,{key:"title"},{default:()=>{var Ne;return[((Ne=r.title)==null?void 0:Ne.call(r,{title:e.title}))??re(e.title)]}}),be&&h(yt,{key:"subtitle"},{default:()=>{var Ne;return[((Ne=r.subtitle)==null?void 0:Ne.call(r,{subtitle:e.subtitle}))??re(e.subtitle)]}}),(Oe=r.default)==null?void 0:Oe.call(r,ne.value)]),X&&h("div",{key:"append",class:"v-list-item__append"},[r.append?h(Ot,{key:"append-defaults",disabled:!Q,defaults:{VAvatar:{density:e.density,image:e.appendAvatar},VIcon:{density:e.density,icon:e.appendIcon},VListItemAction:{end:!0}}},{default:()=>{var Ne;return[(Ne=r.append)==null?void 0:Ne.call(r,ne.value)]}}):h(Pe,null,[e.appendIcon&&h(J,{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)])]}}),[[fr("ripple"),C.value&&e.ripple]])}),{activate:a,isActivated:l,isGroupActivator:p,isSelected:d,list:b,select:u,root:g,id:w,link:i}}}),l6=ue({color:String,inset:Boolean,sticky:Boolean,title:String,...Ue(),...vt()},"VListSubheader"),jr=_e()({name:"VListSubheader",props:l6(),setup(e,t){let{slots:n}=t;const{textColorClasses:r,textColorStyles:s}=Is(Te(e,"color"));return Ae(()=>{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])]}})}),{}}}),u6=ue({color:String,inset:Boolean,length:[Number,String],opacity:[Number,String],thickness:[Number,String],vertical:Boolean,...Ue(),...$t()},"VDivider"),cn=_e()({name:"VDivider",props:u6(),setup(e,t){let{attrs:n,slots:r}=t;const{themeClasses:s}=Zt(e),{textColorClasses:i,textColorStyles:o}=Is(Te(e,"color")),a=P(()=>{const l={};return e.length&&(l[e.vertical?"height":"width"]=Fe(e.length)),e.thickness&&(l[e.vertical?"borderRightWidth":"borderTopWidth"]=Fe(e.thickness)),l});return Ae(()=>{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}),{}}}),c6=ue({items:Array,returnObject:Boolean},"VListChildren"),NA=_e()({name:"VListChildren",props:c6(),setup(e,t){let{slots:n}=t;return IA(),()=>{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(cn,a,null);if(l==="subheader")return((p=n.subheader)==null?void 0:p.call(n,{props:a}))??h(jr,a,null);const c={subtitle:n.subtitle?g=>{var m;return(m=n.subtitle)==null?void 0:m.call(n,{...g,item:u})}:void 0,prepend:n.prepend?g=>{var m;return(m=n.prepend)==null?void 0:m.call(n,{...g,item:u})}:void 0,append:n.append?g=>{var m;return(m=n.append)==null?void 0:m.call(n,{...g,item:u})}:void 0,title:n.title?g=>{var m;return(m=n.title)==null?void 0:m.call(n,{...g,item:u})}:void 0},d=xy.filterProps(a);return o?h(xy,he({value:a==null?void 0:a.value},d),{activator:g=>{let{props:m}=g;const y={...a,...m,value:e.returnObject?u:a.value};return n.header?n.header({props:y}):h(Ve,y,c)},default:()=>h(NA,{items:o,returnObject:e.returnObject},n)}):n.item?n.item({props:a}):h(Ve,he(a,{value:e.returnObject?u:a.value}),c)}))}}}),BA=ue({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 Ey(e,t){const n=Fn(t,e.itemTitle,t),r=Fn(t,e.itemValue,n),s=Fn(t,e.itemChildren),i=e.itemProps===!0?typeof t=="object"&&t!=null&&!Array.isArray(t)?"children"in t?Os(t,["children"]):t:void 0:Fn(t,e.itemProps),o={title:n,value:r,...i};return{title:String(o.title??""),value:o.value,props:o,children:Array.isArray(s)?VA(e,s):void 0,raw:t}}function VA(e,t){const n=kd(e,["itemTitle","itemValue","itemChildren","itemProps","returnObject","valueComparator"]),r=[];for(const s of t)r.push(Ey(n,s));return r}function d6(e){const t=P(()=>VA(e,e.items)),n=P(()=>t.value.some(a=>a.value===null)),r=Ie(new Map),s=Ie([]);On(()=>{const a=t.value,l=new Map,u=[];for(let c=0;c<a.length;c++){const d=a[c];if(xT(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,g=e.valueComparator||Ps,m=kd(e,["itemTitle","itemValue","itemChildren","itemProps","returnObject","valueComparator"]),y=[];e:for(const w of a){if(!d&&w===null)continue;if(f&&typeof w=="string"){y.push(Ey(m,w));continue}const b=l.get(w);if(p||!b){for(const _ of p?u:c)if(g(w,_.value)){y.push(_);continue e}y.push(Ey(m,w));continue}y.push(...b)}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 f6(e,t){const n=Fn(t,e.itemType,"item"),r=xT(t)?t:Fn(t,e.itemTitle),s=Fn(t,e.itemValue,void 0),i=Fn(t,e.itemChildren),o=e.itemProps===!0?Os(t,["children"]):Fn(t,e.itemProps),a={title:r,value:s,...o};return{type:n,title:a.title,value:a.value,props:a,children:n==="item"&&i?UA(e,i):void 0,raw:t}}function UA(e,t){const n=[];for(const r of t)n.push(f6(e,r));return n}function h6(e){return{items:P(()=>UA(e,e.items))}}const p6=ue({baseColor:String,activeColor:String,activeClass:String,bgColor:String,disabled:Boolean,expandIcon:He,collapseIcon:He,lines:{type:[Boolean,String],default:"one"},slim:Boolean,nav:Boolean,"onClick:open":Nn(),"onClick:select":Nn(),"onUpdate:opened":Nn(),...t6({selectStrategy:"single-leaf",openStrategy:"list"}),...ms(),...Ue(),...Rr(),...Ir(),...vs(),itemType:{type:String,default:"type"},...BA(),...Dn(),...vt(),...$t(),...$s({variant:"text"})},"VList"),Vt=_e()({name:"VList",props:p6(),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}=h6(e),{themeClasses:s}=Zt(e),{backgroundColorClasses:i,backgroundColorStyles:o}=dr(Te(e,"bgColor")),{borderClasses:a}=Ms(e),{densityClasses:l}=gs(e),{dimensionStyles:u}=Ar(e),{elevationClasses:c}=Ds(e),{roundedClasses:d}=Un(e),{children:f,open:p,parents:g,select:m,getPath:y}=n6(e),w=P(()=>e.lines?`v-list--${e.lines}-line`:void 0),b=Te(e,"activeColor"),_=Te(e,"baseColor"),T=Te(e,"color");IA(),Pr({VListGroup:{activeColor:b,baseColor:_,color:T,expandIcon:Te(e,"expandIcon"),collapseIcon:Te(e,"collapseIcon")},VListItem:{activeClass:Te(e,"activeClass"),activeColor:b,baseColor:_,color:T,density:Te(e,"density"),disabled:Te(e,"disabled"),lines:Te(e,"lines"),nav:Te(e,"nav"),slim:Te(e,"slim"),variant:Te(e,"variant")}});const x=Ie(!1),C=U();function I(D){x.value=!0}function S(D){x.value=!1}function E(D){var L;!x.value&&!(D.relatedTarget&&((L=C.value)!=null&&L.contains(D.relatedTarget)))&&A()}function O(D){const L=D.target;if(!(!C.value||["INPUT","TEXTAREA"].includes(L.tagName))){if(D.key==="ArrowDown")A("next");else if(D.key==="ArrowUp")A("prev");else if(D.key==="Home")A("first");else if(D.key==="End")A("last");else return;D.preventDefault()}}function R(D){x.value=!0}function A(D){if(C.value)return Ec(C.value,D)}return Ae(()=>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,w.value,d.value,e.class],style:[o.value,u.value,e.style],tabindex:e.disabled?-1:0,role:"listbox","aria-activedescendant":void 0,onFocusin:I,onFocusout:S,onFocus:E,onKeydown:O,onMousedown:R},{default:()=>[h(NA,{items:r.value,returnObject:e.returnObject},n)]})),{open:p,select:m,focus:A,children:f,parents:g,getPath:y}}}),m6=ue({start:Boolean,end:Boolean,...Ue(),...vt()},"VListItemAction"),hu=_e()({name:"VListItemAction",props:m6(),setup(e,t){let{slots:n}=t;return Ae(()=>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)),{}}}),g6=ue({start:Boolean,end:Boolean,...Ue(),...vt()},"VListItemMedia"),v6=_e()({name:"VListItemMedia",props:g6(),setup(e,t){let{slots:n}=t;return Ae(()=>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)),{}}}),y6={key:1},b6={key:2},w6={class:"mt-3"},S6={key:0},_6={key:1},k6={key:2},x6=$e({__name:"BatchReprintDialog",setup(e){const t=Ft(),n=U(),r=tn(nn.BatchReprintDialog),s=U(!1),i=U(!1),o=U([]),a=U([]),l=U(""),u=Dt();function c(g){s.value=!0}async function d(g){n.value=g;try{const m=await Al.batchGetLastPrintedFiles(n.value);o.value=m,a.value=m.filter(y=>y.connectionState==="Operational"&&y.reprintState==oa.LastPrintReady)}catch(m){l.value=m.code.toString()??""}s.value=!1}async function f(){i.value=!0;try{await Al.batchReprintFiles(a.value.filter(g=>{var m;return(m=g.file)==null?void 0:m.path}).map(g=>{var m;return{printerId:g.printerId,path:((m=g.file)==null?void 0:m.path)||""}})),t.clearSelectedPrinters(),u.info("Action completed","Your reprinted jobs are starting",5e3),p()}catch(g){l.value=jW(g)}finally{i.value=!1}}function p(){r.closeDialog(r.context())}return(g,m)=>{const y=hi;return $(),te(y,{id:Z(r).dialogId,"max-width":"1000px",onBeforeOpened:c,onEscape:m[3]||(m[3]=w=>p()),onOpened:d},{default:v(()=>[h(gt,{class:"pa-4"},{default:v(()=>[h(sn,null,{default:v(()=>m[4]||(m[4]=[M("span",{class:"text-h5"}," Batch - Submit Reprint Jobs ",-1)])),_:1}),h(en,null,{default:v(()=>{var w;return[(w=l.value)!=null&&w.length?($(),te(dn,{key:0,color:"error"},{default:v(()=>[k(re(l.value),1)]),_:1})):fe("",!0),s.value?($(),me("span",y6," Loading... ")):($(),me("div",b6,[h(Vt,{density:"compact"},{default:v(()=>[h(jr,null,{default:v(()=>m[5]||(m[5]=[k(" Reprinted Files - Select from list ")])),_:1}),h(xy,{modelValue:a.value,"onUpdate:modelValue":m[0]||(m[0]=b=>a.value=b),multiple:""},{default:v(()=>[($(!0),me(Pe,null,Wt(o.value,(b,_)=>($(),te(Ve,{key:_,value:b,disabled:b.connectionState!=="Operational"||b.reprintState!==Z(oa).LastPrintReady},{prepend:v(()=>[b.reprintState==Z(oa).LastPrintReady?($(),te(J,{key:0},{default:v(()=>m[6]||(m[6]=[k("checklist")])),_:1})):fe("",!0),b.reprintState==Z(oa).NoLastPrint?($(),te(J,{key:1},{default:v(()=>m[7]||(m[7]=[k(" question_mark ")])),_:1})):fe("",!0),b.reprintState==Z(oa).PrinterNotAvailable?($(),te(J,{key:2},{default:v(()=>m[8]||(m[8]=[k(" signal_disconnected ")])),_:1})):fe("",!0)]),default:v(()=>{var T,x;return[(x=(T=b.file)==null?void 0:T.path)!=null&&x.length?($(),te(dt,{key:0},{default:v(()=>{var C;return[k(re((C=b.file)==null?void 0:C.path)+" ",1),b.connectionState!=="Operational"?($(),te(Sn,{key:0},{default:v(()=>m[9]||(m[9]=[k(" Printer busy ")])),_:1})):fe("",!0)]}),_:2},1024)):b.reprintState==Z(oa).NoLastPrint?($(),te(dt,{key:1},{default:v(()=>m[10]||(m[10]=[k(" No file is present to print again ")])),_:1})):($(),te(dt,{key:2},{default:v(()=>m[11]||(m[11]=[k(" OctoPrint cant be reached ")])),_:1})),h(yt,null,{default:v(()=>{var C;return[k(" Printer '"+re(((C=Z(t).printer(b.printerId))==null?void 0:C.name)??"Unknown printer")+"' ",1)]}),_:2},1024)]}),_:2},1032,["value","disabled"]))),128))]),_:1},8,["modelValue"])]),_:1})])),M("div",w6,[i.value?($(),me("div",S6,[h(ni,{class:"ma-3",indeterminate:"",color:"blue"}),m[12]||(m[12]=k(" Submitting "))])):a.value.length>0?($(),me("div",_6,re(a.value.length)+" reprint selected ",1)):($(),me("div",k6,"Must select at least one file"))]),m[14]||(m[14]=M("br",null,null,-1)),h(se,{disabled:i.value||a.value.length===0,onClick:m[1]||(m[1]=b=>f())},{default:v(()=>m[13]||(m[13]=[k(" Submit Batch Reprint ")])),_:1},8,["disabled"])]}),_:1}),h(Mn,null,{default:v(()=>[h(wn),h(se,{variant:"text",onClick:m[2]||(m[2]=w=>Z(r).closeDialog())},{default:v(()=>m[15]||(m[15]=[k(" Close ")])),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),E6="/img/octoprint-tentacle.svg";function zA(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]}function HA(e){return e===0}function jA(e){return e===1}function qA(e){return HA(e)?"OctoPrint":jA(e)?"Moonraker":"Unknown"}function C6(e){let{rootEl:t,isSticky:n,layoutItemStyles:r}=e;const s=Ie(!1),i=Ie(0),o=P(()=>{const u=typeof s.value=="boolean"?"top":s.value;return[n.value?{top:"auto",bottom:"auto",height:void 0}:void 0,s.value?{[u]:Fe(i.value)}:{top:r.value.top}]});_t(()=>{ke(n,u=>{u?window.addEventListener("scroll",l,{passive:!0}):window.removeEventListener("scroll",l)},{immediate:!0})}),En(()=>{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,g=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-g,s.value=!0):u==="down"&&p<=0?(i.value=0,s.value="bottom"):u==="up"&&f<=0&&(g?s.value!=="top"&&(i.value=-f+g+d,s.value="top"):(i.value=c.top+f,s.value="top")),a=window.scrollY}return{isStuck:s,stickyStyles:o}}const T6=100,P6=20;function ek(e){return(e<0?-1:1)*Math.sqrt(Math.abs(e))*1.41421356237}function tk(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=ek(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 ek(t)*1e3}function R6(){const e={};function t(s){Array.from(s.changedTouches).forEach(i=>{(e[i.identifier]??(e[i.identifier]=new RF(P6))).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]>T6)break;a.push({t:c[0],d:c[1].clientX}),l.push({t:c[0],d:c[1].clientY})}return{x:tk(a),y:tk(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 A6(e){let{el:t,isActive:n,isTemporary:r,width:s,touchless:i,position:o}=e;_t(()=>{window.addEventListener("touchstart",b,{passive:!0}),window.addEventListener("touchmove",_,{passive:!1}),window.addEventListener("touchend",T,{passive:!0})}),En(()=>{window.removeEventListener("touchstart",b),window.removeEventListener("touchmove",_),window.removeEventListener("touchend",T)});const a=P(()=>["left","right"].includes(o.value)),{addMovement:l,endTouch:u,getVelocity:c}=R6();let d=!1;const f=Ie(!1),p=Ie(0),g=Ie(0);let m;function y(C,I){return(o.value==="left"?C:o.value==="right"?document.documentElement.clientWidth-C:o.value==="top"?C:o.value==="bottom"?document.documentElement.clientHeight-C:fl())-(I?s.value:0)}function w(C){let I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const S=o.value==="left"?(C-g.value)/s.value:o.value==="right"?(document.documentElement.clientWidth-C-g.value)/s.value:o.value==="top"?(C-g.value)/s.value:o.value==="bottom"?(document.documentElement.clientHeight-C-g.value)/s.value:fl();return I?Math.max(0,Math.min(1,S)):S}function b(C){if(i.value)return;const I=C.changedTouches[0].clientX,S=C.changedTouches[0].clientY,E=25,O=o.value==="left"?I<E:o.value==="right"?I>document.documentElement.clientWidth-E:o.value==="top"?S<E:o.value==="bottom"?S>document.documentElement.clientHeight-E:fl(),R=n.value&&(o.value==="left"?I<s.value:o.value==="right"?I>document.documentElement.clientWidth-s.value:o.value==="top"?S<s.value:o.value==="bottom"?S>document.documentElement.clientHeight-s.value:fl());(O||R||n.value&&r.value)&&(m=[I,S],g.value=y(a.value?I:S,n.value),p.value=w(a.value?I:S),d=g.value>-20&&g.value<80,u(C),l(C))}function _(C){const I=C.changedTouches[0].clientX,S=C.changedTouches[0].clientY;if(d){if(!C.cancelable){d=!1;return}const O=Math.abs(I-m[0]),R=Math.abs(S-m[1]);(a.value?O>R&&O>3:R>O&&R>3)?(f.value=!0,d=!1):(a.value?R:O)>3&&(d=!1)}if(!f.value)return;C.preventDefault(),l(C);const E=w(a.value?I:S,!1);p.value=Math.max(0,Math.min(1,E)),E>1?g.value=y(a.value?I:S,!0):E<0&&(g.value=y(a.value?I:S,!1))}function T(C){if(d=!1,!f.value)return;l(C),f.value=!1;const I=c(C.changedTouches[0].identifier),S=Math.abs(I.x),E=Math.abs(I.y);(a.value?S>E&&S>400:E>S&&E>3)?n.value=I.direction===({left:"right",right:"left",top:"down",bottom:"up"}[o.value]||fl()):n.value=p.value>.5}const x=P(()=>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))`:fl(),transition:"none"}:void 0);return Ur(f,()=>{var S,E;const C=((S=t.value)==null?void 0:S.style.transform)??null,I=((E=t.value)==null?void 0:E.style.transition)??null;On(()=>{var O,R,A,D;(R=t.value)==null||R.style.setProperty("transform",((O=x.value)==null?void 0:O.transform)||"none"),(D=t.value)==null||D.style.setProperty("transition",((A=x.value)==null?void 0:A.transition)||null)}),gn(()=>{var O,R;(O=t.value)==null||O.style.setProperty("transform",C),(R=t.value)==null||R.style.setProperty("transition",I)})}),{isDragging:f,dragProgress:p,dragStyles:x}}function fl(){throw new Error}const mm={"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 O6(e,t,n){const r=[];let s=[];const i=WA(e),o=GA(e),a=n??mm[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 M6(e,t,n){const r=n??mm[t.slice(-2).toUpperCase()]??0,s=new Date(e);for(;s.getDay()!==r;)s.setDate(s.getDate()-1);return s}function D6(e,t){const n=new Date(e),r=((mm[t.slice(-2).toUpperCase()]??0)+6)%7;for(;n.getDay()!==r;)n.setDate(n.getDate()+1);return n}function WA(e){return new Date(e.getFullYear(),e.getMonth(),1)}function GA(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function $6(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}const L6=/^([12]\d{3}-([1-9]|0[1-9]|1[0-2])-([1-9]|0[1-9]|[12]\d|3[01]))$/;function KA(e){if(e==null)return new Date;if(e instanceof Date)return e;if(typeof e=="string"){let t;if(L6.test(e))return $6(e);if(t=Date.parse(e),!isNaN(t))return new Date(t)}return null}const nk=new Date(2e3,0,2);function F6(e,t){const n=t??mm[e.slice(-2).toUpperCase()]??0;return kl(7).map(r=>{const s=new Date(nk);return s.setDate(nk.getDate()+n+r),new Intl.DateTimeFormat(e,{weekday:"narrow"}).format(s)})}function N6(e,t,n,r){const s=KA(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 B6(e,t){const n=e.toJsDate(t),r=n.getFullYear(),s=S_(String(n.getMonth()+1),2,"0"),i=S_(String(n.getDate()),2,"0");return`${r}-${s}-${i}`}function V6(e){const[t,n,r]=e.split("-").map(Number);return new Date(t,n-1,r)}function U6(e,t){const n=new Date(e);return n.setMinutes(n.getMinutes()+t),n}function z6(e,t){const n=new Date(e);return n.setHours(n.getHours()+t),n}function H6(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function j6(e,t){const n=new Date(e);return n.setDate(n.getDate()+t*7),n}function q6(e,t){const n=new Date(e);return n.setDate(1),n.setMonth(n.getMonth()+t),n}function W6(e){return e.getFullYear()}function G6(e){return e.getMonth()}function K6(e){return e.getDate()}function Y6(e){return new Date(e.getFullYear(),e.getMonth()+1,1)}function X6(e){return new Date(e.getFullYear(),e.getMonth()-1,1)}function Q6(e){return e.getHours()}function J6(e){return e.getMinutes()}function Z6(e){return new Date(e.getFullYear(),0,1)}function eG(e){return new Date(e.getFullYear(),11,31)}function tG(e,t){return tp(e,t[0])&&sG(e,t[1])}function nG(e){const t=new Date(e);return t instanceof Date&&!isNaN(t.getTime())}function tp(e,t){return e.getTime()>t.getTime()}function rG(e,t){return tp(Cy(e),Cy(t))}function sG(e,t){return e.getTime()<t.getTime()}function rk(e,t){return e.getTime()===t.getTime()}function iG(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function oG(e,t){return e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function aG(e,t){return e.getFullYear()===t.getFullYear()}function lG(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 uG(e,t){const n=new Date(e);return n.setHours(t),n}function cG(e,t){const n=new Date(e);return n.setMinutes(t),n}function dG(e,t){const n=new Date(e);return n.setMonth(t),n}function fG(e,t){const n=new Date(e);return n.setDate(t),n}function hG(e,t){const n=new Date(e);return n.setFullYear(t),n}function Cy(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0)}function pG(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59,999)}class mG{constructor(t){this.locale=t.locale,this.formats=t.formats}date(t){return KA(t)}toJsDate(t){return t}toISO(t){return B6(this,t)}parseISO(t){return V6(t)}addMinutes(t,n){return U6(t,n)}addHours(t,n){return z6(t,n)}addDays(t,n){return H6(t,n)}addWeeks(t,n){return j6(t,n)}addMonths(t,n){return q6(t,n)}getWeekArray(t,n){return O6(t,this.locale,n?Number(n):void 0)}startOfWeek(t,n){return M6(t,this.locale,n?Number(n):void 0)}endOfWeek(t){return D6(t,this.locale)}startOfMonth(t){return WA(t)}endOfMonth(t){return GA(t)}format(t,n){return N6(t,n,this.locale,this.formats)}isEqual(t,n){return rk(t,n)}isValid(t){return nG(t)}isWithinRange(t,n){return tG(t,n)}isAfter(t,n){return tp(t,n)}isAfterDay(t,n){return rG(t,n)}isBefore(t,n){return!tp(t,n)&&!rk(t,n)}isSameDay(t,n){return iG(t,n)}isSameMonth(t,n){return oG(t,n)}isSameYear(t,n){return aG(t,n)}setMinutes(t,n){return cG(t,n)}setHours(t,n){return uG(t,n)}setMonth(t,n){return dG(t,n)}setDate(t,n){return fG(t,n)}setYear(t,n){return hG(t,n)}getDiff(t,n,r){return lG(t,n,r)}getWeekdays(t){return F6(this.locale,t?Number(t):void 0)}getYear(t){return W6(t)}getMonth(t){return G6(t)}getDate(t){return K6(t)}getNextMonth(t){return Y6(t)}getPreviousMonth(t){return X6(t)}getHours(t){return Q6(t)}getMinutes(t){return J6(t)}startOfDay(t){return Cy(t)}endOfDay(t){return pG(t)}startOfYear(t){return Z6(t)}endOfYear(t){return eG(t)}}const gG=Symbol.for("vuetify:date-options"),sk=Symbol.for("vuetify:date-adapter");function vG(e,t){const n=Jn({adapter:mG,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:yG(n,t)}}function yG(e,t){const n=vn(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 od=Symbol.for("vuetify:layout"),YA=Symbol.for("vuetify:layout-item"),ik=1e3,XA=ue({overlaps:{type:Array,default:()=>[]},fullHeight:Boolean},"layout"),QA=ue({name:{type:String},order:{type:[Number,String],default:0},absolute:Boolean},"layout-item");function JA(){const e=Xe(od);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(od);if(!t)throw new Error("[Vuetify] Could not find injected layout");const n=e.id??`layout-item-${hs()}`,r=an("useLayoutItem");Gt(YA,{id:n});const s=Ie(!1);wb(()=>s.value=!0),TC(()=>s.value=!1);const{layoutItemStyles:i,layoutItemScrimStyles:o}=t.register(r,{...e,active:P(()=>s.value?!1:e.active.value),id:n});return En(()=>t.unregister(n)),{layoutItemStyles:i,layoutRect:t.layoutRect,layoutItemScrimStyles:o}}const bG=(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 eO(e){const t=Xe(od,null),n=P(()=>t?t.rootZIndex.value-100:ik),r=U([]),s=vn(new Map),i=vn(new Map),o=vn(new Map),a=vn(new Map),l=vn(new Map),{resizeRef:u,contentRect:c}=Va(),d=P(()=>{const C=new Map,I=e.overlaps??[];for(const S of I.filter(E=>E.includes(":"))){const[E,O]=S.split(":");if(!r.value.includes(E)||!r.value.includes(O))continue;const R=s.get(E),A=s.get(O),D=i.get(E),L=i.get(O);!R||!A||!D||!L||(C.set(O,{position:R.value,amount:parseInt(D.value,10)}),C.set(E,{position:A.value,amount:-parseInt(L.value,10)}))}return C}),f=P(()=>{const C=[...new Set([...o.values()].map(S=>S.value))].sort((S,E)=>S-E),I=[];for(const S of C){const E=r.value.filter(O=>{var R;return((R=o.get(O))==null?void 0:R.value)===S});I.push(...E)}return bG(I,s,i,a)}),p=P(()=>!Array.from(l.values()).some(C=>C.value)),g=P(()=>f.value[f.value.length-1].layer),m=P(()=>({"--v-layout-left":Fe(g.value.left),"--v-layout-right":Fe(g.value.right),"--v-layout-top":Fe(g.value.top),"--v-layout-bottom":Fe(g.value.bottom),...p.value?void 0:{transition:"none"}})),y=P(()=>f.value.slice(1).map((C,I)=>{let{id:S}=C;const{layer:E}=f.value[I],O=i.get(S),R=s.get(S);return{id:S,...E,size:Number(O.value),position:R.value}})),w=C=>y.value.find(I=>I.id===C),b=an("createLayout"),_=Ie(!1);_t(()=>{_.value=!0}),Gt(od,{register:(C,I)=>{let{id:S,order:E,position:O,layoutSize:R,elementSize:A,active:D,disableTransitions:L,absolute:W}=I;o.set(S,E),s.set(S,O),i.set(S,R),a.set(S,D),L&&l.set(S,L);const K=xl(YA,b==null?void 0:b.vnode).indexOf(C);K>-1?r.value.splice(K,0,S):r.value.push(S);const G=P(()=>y.value.findIndex(q=>q.id===S)),H=P(()=>n.value+f.value.length*2-G.value*2),B=P(()=>{const q=O.value==="left"||O.value==="right",Y=O.value==="right",oe=O.value==="bottom",ie=A.value??R.value,be=ie===0?"%":"px",Q={[O.value]:0,zIndex:H.value,transform:`translate${q?"X":"Y"}(${(D.value?0:-(ie===0?100:ie))*(Y||oe?-1:1)}${be})`,position:W.value||n.value!==ik?"absolute":"fixed",...p.value?void 0:{transition:"none"}};if(!_.value)return Q;const X=y.value[G.value];if(!X)throw new Error(`[Vuetify] Could not find layout item "${S}"`);const V=d.value.get(S);return V&&(X[V.position]+=V.amount),{...Q,height:q?`calc(100% - ${X.top}px - ${X.bottom}px)`:A.value?`${A.value}px`:void 0,left:Y?void 0:`${X.left}px`,right:Y?`${X.right}px`:void 0,top:O.value!=="bottom"?`${X.top}px`:void 0,bottom:O.value!=="top"?`${X.bottom}px`:void 0,width:q?A.value?`${A.value}px`:void 0:`calc(100% - ${X.left}px - ${X.right}px)`}}),ne=P(()=>({zIndex:H.value-1}));return{layoutItemStyles:B,layoutItemScrimStyles:ne,zIndex:H}},unregister:C=>{o.delete(C),s.delete(C),i.delete(C),a.delete(C),l.delete(C),r.value=r.value.filter(I=>I!==C)},mainRect:g,mainStyles:m,getLayoutItem:w,items:y,layoutRect:c,rootZIndex:n});const T=P(()=>["v-layout",{"v-layout--full-height":e.fullHeight}]),x=P(()=>({zIndex:t?n.value:void 0,position:t?"relative":void 0,overflow:t?"hidden":void 0}));return{layoutClasses:T,layoutStyles:x,getLayoutItem:w,items:y,layoutRect:c,layoutRef:u}}const wG=["start","end","left","right","top","bottom"],SG=ue({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=>wG.includes(e)},sticky:Boolean,...ms(),...Ue(),...Vb(),...el({mobile:null}),...vs(),...QA(),...Dn(),...vt({tag:"nav"}),...$t()},"VNavigationDrawer"),Aw=_e()({name:"VNavigationDrawer",props:SG(),emits:{"update:modelValue":e=>!0,"update:rail":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{isRtl:i}=Or(),{themeClasses:o}=Zt(e),{borderClasses:a}=Ms(e),{backgroundColorClasses:l,backgroundColorStyles:u}=dr(Te(e,"color")),{elevationClasses:c}=Ds(e),{displayClasses:d,mobile:f}=fi(e),{roundedClasses:p}=Un(e),g=qT(),m=st(e,"modelValue",null,B=>!!B),{ssrBootStyles:y}=Hd(),{scopeId:w}=Ru(),b=U(),_=Ie(!1),{runOpenDelay:T,runCloseDelay:x}=Ub(e,B=>{_.value=B}),C=P(()=>e.rail&&e.expandOnHover&&_.value?Number(e.width):Number(e.rail?e.railWidth:e.width)),I=P(()=>Iv(e.location,i.value)),S=P(()=>e.persistent),E=P(()=>!e.permanent&&(f.value||e.temporary)),O=P(()=>e.sticky&&!E.value&&I.value!=="bottom");Ur(()=>e.expandOnHover&&e.rail!=null,()=>{ke(_,B=>r("update:rail",!B))}),Ur(()=>!e.disableResizeWatcher,()=>{ke(E,B=>!e.permanent&&Mt(()=>m.value=!B))}),Ur(()=>!e.disableRouteWatcher&&!!g,()=>{ke(g.currentRoute,()=>E.value&&(m.value=!1))}),ke(()=>e.permanent,B=>{B&&(m.value=!0)}),e.modelValue==null&&!E.value&&(m.value=e.permanent||!f.value);const{isDragging:R,dragProgress:A}=A6({el:b,isActive:m,isTemporary:E,width:C,touchless:Te(e,"touchless"),position:I}),D=P(()=>{const B=E.value?0:e.rail&&e.expandOnHover?Number(e.railWidth):C.value;return R.value?B*A.value:B}),{layoutItemStyles:L,layoutItemScrimStyles:W}=ZA({id:e.name,order:P(()=>parseInt(e.order,10)),position:I,layoutSize:D,elementSize:C,active:wu(m),disableTransitions:P(()=>R.value),absolute:P(()=>e.absolute||O.value&&typeof z.value!="string")}),{isStuck:z,stickyStyles:K}=C6({rootEl:b,isSticky:O,layoutItemStyles:L}),G=dr(P(()=>typeof e.scrim=="string"?e.scrim:null)),H=P(()=>({...R.value?{opacity:A.value*.2,transition:"none"}:void 0,...W.value}));return Pr({VList:{bgColor:"transparent"}}),Ae(()=>{const B=s.image||e.image;return h(Pe,null,[h(e.tag,he({ref:b,onMouseenter:T,onMouseleave:x,class:["v-navigation-drawer",`v-navigation-drawer--${I.value}`,{"v-navigation-drawer--expand-on-hover":e.expandOnHover,"v-navigation-drawer--floating":e.floating,"v-navigation-drawer--is-hovering":_.value,"v-navigation-drawer--rail":e.rail,"v-navigation-drawer--temporary":E.value,"v-navigation-drawer--persistent":S.value,"v-navigation-drawer--active":m.value,"v-navigation-drawer--sticky":O.value},o.value,l.value,a.value,d.value,c.value,p.value,e.class],style:[u.value,L.value,y.value,K.value,e.style]},w,n),{default:()=>{var ne,q,Y;return[B&&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(us,{key:"image-img",alt:"",cover:!0,height:"inherit",src:e.image},null)]),s.prepend&&h("div",{class:"v-navigation-drawer__prepend"},[(ne=s.prepend)==null?void 0:ne.call(s)]),h("div",{class:"v-navigation-drawer__content"},[(q=s.default)==null?void 0:q.call(s)]),s.append&&h("div",{class:"v-navigation-drawer__append"},[(Y=s.append)==null?void 0:Y.call(s)])]}}),h(Io,{name:"fade-transition"},{default:()=>[E.value&&(R.value||m.value)&&!!e.scrim&&h("div",he({class:["v-navigation-drawer__scrim",G.backgroundColorClasses.value],style:[H.value,G.backgroundColorStyles.value],onClick:()=>{S.value||(m.value=!1)}},w),null)]})])}),{isStuck:z}}}),_G=ue({active:Boolean,disabled:Boolean,max:[Number,String],value:{type:[Number,String],default:0},...Ue(),...Iu({transition:{component:rP}})},"VCounter"),Ow=_e()({name:"VCounter",functional:!0,props:_G(),setup(e,t){let{slots:n}=t;const r=P(()=>e.max?`${e.value} / ${e.max}`:String(e.value));return Ae(()=>h(si,{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]),[[Gi,e.active]])]})),{}}}),kG=ue({text:String,onClick:Nn(),...Ue(),...$t()},"VLabel"),Mw=_e()({name:"VLabel",props:kG(),setup(e,t){let{slots:n}=t;return Ae(()=>{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)])}),{}}}),xG=ue({floating:Boolean,...Ue()},"VFieldLabel"),bf=_e()({name:"VFieldLabel",props:xG(),setup(e,t){let{slots:n}=t;return Ae(()=>h(Mw,{class:["v-field-label",{"v-field-label--floating":e.floating},e.class],style:e.style,"aria-hidden":e.floating||void 0},n)),{}}});function tO(e){const{t}=Wr();function n(r){let{name:s,color:i}=r;const o={prepend:"prependAction",prependInner:"prependAction",append:"appendAction",appendInner:"appendAction",clear:"clear"}[s],a=e[`onClick:${s}`];function l(c){c.key!=="Enter"&&c.key!==" "||(c.preventDefault(),c.stopPropagation(),Fp(a,new PointerEvent("click",c)))}const u=a&&o?t(`$vuetify.input.${o}`,e.label??""):void 0;return h(J,{icon:e[`${s}Icon`],"aria-label":u,onClick:a,onKeydown:l,color:i},null)}return{InputIcon:n}}const nO=ue({focused:Boolean,"onUpdate:focused":Nn()},"focus");function Uu(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:di();const n=st(e,"focused"),r=P(()=>({[`${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"],gm=ue({appendInnerIcon:He,bgColor:String,clearable:Boolean,clearIcon:{type:He,default:"$clear"},active:Boolean,centerAffix:{type:Boolean,default:void 0},color:String,baseColor:String,dirty:Boolean,disabled:{type:Boolean,default:null},glow:Boolean,error:Boolean,flat:Boolean,iconColor:[Boolean,String],label:String,persistentClear:Boolean,prependInnerIcon:He,reverse:Boolean,singleLine:Boolean,variant:{type:String,default:"filled",validator:e=>EG.includes(e)},"onClick:clear":Nn(),"onClick:appendInner":Nn(),"onClick:prependInner":Nn(),...Ue(),...Bp(),...Dn(),...$t()},"VField"),pu=_e()({name:"VField",inheritAttrs:!1,props:{id:String,...nO(),...gm()},emits:{"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{themeClasses:i}=Zt(e),{loaderClasses:o}=Pd(e),{focusClasses:a,isFocused:l,focus:u,blur:c}=Uu(e),{InputIcon:d}=tO(e),{roundedClasses:f}=Un(e),{rtlClasses:p}=Or(),g=P(()=>e.dirty||e.active),m=P(()=>!!(e.label||s.label)),y=P(()=>!e.singleLine&&m.value),w=hs(),b=P(()=>e.id||`input-${w}`),_=P(()=>`${b.value}-messages`),T=U(),x=U(),C=U(),I=P(()=>["plain","underlined"].includes(e.variant)),S=P(()=>e.error||e.disabled?void 0:g.value&&l.value?e.color:e.baseColor),E=P(()=>{if(!(!e.iconColor||e.glow&&!l.value))return e.iconColor===!0?S.value:e.iconColor}),{backgroundColorClasses:O,backgroundColorStyles:R}=dr(Te(e,"bgColor")),{textColorClasses:A,textColorStyles:D}=Is(S);ke(g,z=>{if(y.value){const K=T.value.$el,G=x.value.$el;requestAnimationFrame(()=>{const H=Db(K),B=G.getBoundingClientRect(),ne=B.x-H.x,q=B.y-H.y-(H.height/2-B.height/2),Y=B.width/.75,oe=Math.abs(Y-H.width)>1?{maxWidth:Fe(Y)}:void 0,ie=getComputedStyle(K),be=getComputedStyle(G),Q=parseFloat(ie.transitionDuration)*1e3||150,X=parseFloat(be.getPropertyValue("--v-field-label-scale")),V=be.getPropertyValue("color");K.style.visibility="visible",G.style.visibility="hidden",El(K,{transform:`translate(${ne}px, ${q}px) scale(${X})`,color:V,...oe},{duration:Q,easing:Ah,direction:z?"normal":"reverse"}).finished.then(()=>{K.style.removeProperty("visibility"),G.style.removeProperty("visibility")})})}},{flush:"post"});const L=P(()=>({isActive:g,isFocused:l,controlRef:C,blur:c,focus:u}));function W(z){z.target!==document.activeElement&&z.preventDefault()}return Ae(()=>{var ne,q,Y;const z=e.variant==="outlined",K=!!(s["prepend-inner"]||e.prependInnerIcon),G=!!(e.clearable||s.clear)&&!e.disabled,H=!!(s["append-inner"]||e.appendInnerIcon||G),B=()=>s.label?s.label({...L.value,label:e.label,props:{for:b.value}}):e.label;return h("div",he({class:["v-field",{"v-field--active":g.value,"v-field--appended":H,"v-field--center-affix":e.centerAffix??!I.value,"v-field--disabled":e.disabled,"v-field--dirty":e.dirty,"v-field--error":e.error,"v-field--glow":e.glow,"v-field--flat":e.flat,"v-field--has-background":!!e.bgColor,"v-field--persistent-clear":e.persistentClear,"v-field--prepended":K,"v-field--reverse":e.reverse,"v-field--single-line":e.singleLine,"v-field--no-label":!B(),[`v-field--variant-${e.variant}`]:!0},i.value,O.value,a.value,o.value,f.value,p.value,e.class],style:[R.value,e.style],onClick:W},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}),K&&h("div",{key:"prepend",class:"v-field__prepend-inner"},[e.prependInnerIcon&&h(d,{key:"prepend-icon",name:"prependInner",color:E.value},null),(ne=s["prepend-inner"])==null?void 0:ne.call(s,L.value)]),h("div",{class:"v-field__field","data-no-activator":""},[["filled","solo","solo-inverted","solo-filled"].includes(e.variant)&&y.value&&h(bf,{key:"floating-label",ref:x,class:[A.value],floating:!0,for:b.value,style:D.value},{default:()=>[B()]}),m.value&&h(bf,{key:"label",ref:T,for:b.value},{default:()=>[B()]}),((q=s.default)==null?void 0:q.call(s,{...L.value,props:{id:b.value,class:"v-field__input","aria-describedby":_.value},focus:u,blur:c}))??h("div",{id:b.value,class:"v-field__input","aria-describedby":_.value},null)]),G&&h(iP,{key:"clear"},{default:()=>[Bt(h("div",{class:"v-field__clearable",onMousedown:oe=>{oe.preventDefault(),oe.stopPropagation()}},[h(Ot,{defaults:{VIcon:{icon:e.clearIcon}}},{default:()=>[s.clear?s.clear({...L.value,props:{onFocus:u,onBlur:c,onClick:e["onClick:clear"]}}):h(d,{name:"clear",onFocus:u,onBlur:c},null)]})]),[[Gi,e.dirty]])]}),H&&h("div",{key:"append",class:"v-field__append-inner"},[(Y=s["append-inner"])==null?void 0:Y.call(s,L.value),e.appendInnerIcon&&h(d,{key:"append-icon",name:"appendInner",color:E.value},null)]),h("div",{class:["v-field__outline",A.value],style:D.value},[z&&h(Pe,null,[h("div",{class:"v-field__outline__start"},null),y.value&&h("div",{class:"v-field__outline__notch"},[h(bf,{ref:x,floating:!0,for:b.value},{default:()=>[B()]})]),h("div",{class:"v-field__outline__end"},null)]),I.value&&y.value&&h(bf,{ref:x,floating:!0,for:b.value},{default:()=>[B()]})])])}),{controlRef:C,fieldIconColor:E}}}),CG=ue({active:Boolean,color:String,messages:{type:[Array,String],default:()=>[]},...Ue(),...Iu({transition:{component:rP,leaveAbsolute:!0,group:!0}})},"VMessages"),TG=_e()({name:"VMessages",props:CG(),setup(e,t){let{slots:n}=t;const r=P(()=>An(e.messages)),{textColorClasses:s,textColorStyles:i}=Is(P(()=>e.color));return Ae(()=>h(si,{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]))]})),{}}}),rO=Symbol.for("vuetify:form"),PG=ue({disabled:Boolean,fastFail:Boolean,readonly:Boolean,modelValue:{type:Boolean,default:null},validateOn:{type:String,default:"input"}},"form");function RG(e){const t=st(e,"modelValue"),n=P(()=>e.disabled),r=P(()=>e.readonly),s=Ie(!1),i=U([]),o=U([]);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(rO,{register:c=>{let{id:d,vm:f,validate:p,reset:g,resetValidation:m}=c;i.value.some(y=>y.id===d),i.value.push({id:d,validate:p,reset:g,resetValidation:m,vm:Tp(f),isValid:null,errorMessages:[]})},unregister:c=>{i.value=i.value.filter(d=>d.id!==c)},update:(c,d,f)=>{const p=i.value.find(g=>g.id===c);p&&(p.isValid=d,p.errorMessages=f)},isDisabled:n,isReadonly:r,isValidating:s,isValid:t,items:i,validateOn:Te(e,"validateOn")}),{errors:o,isDisabled:n,isReadonly:r,isValidating:s,isValid:t,items:i,validate:a,reset:l,resetValidation:u}}function sO(e){const t=Xe(rO,null);return{...t,isReadonly:P(()=>!!((e==null?void 0:e.readonly)??(t==null?void 0:t.isReadonly.value))),isDisabled:P(()=>!!((e==null?void 0:e.disabled)??(t==null?void 0:t.isDisabled.value)))}}const IG=ue({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,...nO()},"validation");function AG(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:di(),n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:hs();const r=st(e,"modelValue"),s=P(()=>e.validationValue===void 0?r.value:e.validationValue),i=sO(e),o=U([]),a=Ie(!0),l=P(()=>!!(An(r.value===""?null:r.value).length||An(s.value===""?null:s.value).length)),u=P(()=>{var _;return(_=e.errorMessages)!=null&&_.length?An(e.errorMessages).concat(o.value).slice(0,Math.max(0,Number(e.maxErrors))):o.value}),c=P(()=>{var x;let _=(e.validateOn??((x=i.validateOn)==null?void 0:x.value))||"input";_==="lazy"&&(_="input lazy"),_==="eager"&&(_="input eager");const T=new Set((_==null?void 0:_.split(" "))??[]);return{input:T.has("input"),blur:T.has("blur")||T.has("input")||T.has("invalid-input"),invalidInput:T.has("invalid-input"),lazy:T.has("lazy"),eager:T.has("eager")}}),d=P(()=>{var _;return e.error||(_=e.errorMessages)!=null&&_.length?!1:e.rules.length?a.value?o.value.length||c.value.lazy?null:!0:!o.value.length:!0}),f=Ie(!1),p=P(()=>({[`${t}--error`]:d.value===!1,[`${t}--dirty`]:l.value,[`${t}--disabled`]:i.isDisabled.value,[`${t}--readonly`]:i.isReadonly.value})),g=an("validation"),m=P(()=>e.name??Z(n));Su(()=>{var _;(_=i.register)==null||_.call(i,{id:m.value,vm:g,validate:b,reset:y,resetValidation:w})}),En(()=>{var _;(_=i.unregister)==null||_.call(i,m.value)}),_t(async()=>{var _;c.value.lazy||await b(!c.value.eager),(_=i.update)==null||_.call(i,m.value,d.value,u.value)}),Ur(()=>c.value.input||c.value.invalidInput&&d.value===!1,()=>{ke(s,()=>{if(s.value!=null)b();else if(e.focused){const _=ke(()=>e.focused,T=>{T||b(),_()})}})}),Ur(()=>c.value.blur,()=>{ke(()=>e.focused,_=>{_||b()})}),ke([d,u],()=>{var _;(_=i.update)==null||_.call(i,m.value,d.value,u.value)});async function y(){r.value=null,await Mt(),await w()}async function w(){a.value=!0,c.value.lazy?o.value=[]:await b(!c.value.eager)}async function b(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const T=[];f.value=!0;for(const x of e.rules){if(T.length>=Number(e.maxErrors??1))break;const I=await(typeof x=="function"?x:()=>x)(s.value);if(I!==!0){if(I!==!1&&typeof I!="string"){console.warn(`${I} is not a valid value. Rule functions must return boolean true or a string.`);continue}T.push(I||"")}}return o.value=T,f.value=!1,a.value=_,o.value}return{errorMessages:u,isDirty:l,isDisabled:i.isDisabled,isReadonly:i.isReadonly,isPristine:a,isValid:d,isValidating:f,reset:y,resetValidation:w,validate:b,validationClasses:p}}const il=ue({id:String,appendIcon:He,baseColor:String,centerAffix:{type:Boolean,default:!0},color:String,glow:Boolean,iconColor:[Boolean,String],prependIcon:He,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(),...Ue(),...Rr(),...kd(Ir(),["maxWidth","minWidth","width"]),...$t(),...IG()},"VInput"),cs=_e()({name:"VInput",props:{...il()},emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:r,emit:s}=t;const{densityClasses:i}=gs(e),{dimensionStyles:o}=Ar(e),{themeClasses:a}=Zt(e),{rtlClasses:l}=Or(),{InputIcon:u}=tO(e),c=hs(),d=P(()=>e.id||`input-${c}`),f=P(()=>`${d.value}-messages`),{errorMessages:p,isDirty:g,isDisabled:m,isReadonly:y,isPristine:w,isValid:b,isValidating:_,reset:T,resetValidation:x,validate:C,validationClasses:I}=AG(e,"v-input",d),S=P(()=>({id:d,messagesId:f,isDirty:g,isDisabled:m,isReadonly:y,isPristine:w,isValid:b,isValidating:_,reset:T,resetValidation:x,validate:C})),E=P(()=>e.error||e.disabled?void 0:e.focused?e.color:e.baseColor),O=P(()=>{if(e.iconColor)return e.iconColor===!0?E.value:e.iconColor}),R=P(()=>{var A;return(A=e.errorMessages)!=null&&A.length||!w.value&&p.value.length?p.value:e.hint&&(e.persistentHint||e.focused)?e.hint:e.messages});return Ae(()=>{var z,K,G,H;const A=!!(r.prepend||e.prependIcon),D=!!(r.append||e.appendIcon),L=R.value.length>0,W=!e.hideDetails||e.hideDetails==="auto"&&(L||!!r.details);return h("div",{class:["v-input",`v-input--${e.direction}`,{"v-input--center-affix":e.centerAffix,"v-input--focused":e.focused,"v-input--glow":e.glow,"v-input--hide-spin-buttons":e.hideSpinButtons},i.value,a.value,l.value,I.value,e.class],style:[o.value,e.style]},[A&&h("div",{key:"prepend",class:"v-input__prepend"},[(z=r.prepend)==null?void 0:z.call(r,S.value),e.prependIcon&&h(u,{key:"prepend-icon",name:"prepend",color:O.value},null)]),r.default&&h("div",{class:"v-input__control"},[(K=r.default)==null?void 0:K.call(r,S.value)]),D&&h("div",{key:"append",class:"v-input__append"},[e.appendIcon&&h(u,{key:"append-icon",name:"append",color:O.value},null),(G=r.append)==null?void 0:G.call(r,S.value)]),W&&h("div",{id:f.value,class:"v-input__details",role:"alert","aria-live":"polite"},[h(TG,{active:L,messages:R.value},{message:r.message}),(H=r.details)==null?void 0:H.call(r,S.value)])])}),{reset:T,resetValidation:x,validate:C,isValid:b,errorMessages:p}}}),OG=["color","file","time","date","datetime-local","week","month"],iO=ue({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,...il(),...gm()},"VTextField"),ut=_e()({name:"VTextField",directives:{Intersect:Ew},inheritAttrs:!1,props:iO(),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}=Uu(e),u=P(()=>typeof e.counterValue=="function"?e.counterValue(i.value):typeof e.counterValue=="number"?e.counterValue:(i.value??"").toString().length),c=P(()=>{if(n.maxlength)return n.maxlength;if(!(!e.counter||typeof e.counter!="number"&&typeof e.counter!="string"))return e.counter}),d=P(()=>["plain","underlined"].includes(e.variant));function f(C,I){var S,E;!e.autofocus||!C||(E=(S=I[0].target)==null?void 0:S.focus)==null||E.call(S)}const p=U(),g=U(),m=U(),y=P(()=>OG.includes(e.type)||e.persistentPlaceholder||o.value||e.active);function w(){var C;m.value!==document.activeElement&&((C=m.value)==null||C.focus()),o.value||a()}function b(C){r("mousedown:control",C),C.target!==m.value&&(w(),C.preventDefault())}function _(C){w(),r("click:control",C)}function T(C){C.stopPropagation(),w(),Mt(()=>{i.value=null,Fp(e["onClick:clear"],C)})}function x(C){var S;const I=C.target;if(i.value=I.value,(S=e.modelModifiers)!=null&&S.trim&&["text","search","password","tel","url"].includes(e.type)){const E=[I.selectionStart,I.selectionEnd];Mt(()=>{I.selectionStart=E[0],I.selectionEnd=E[1]})}}return Ae(()=>{const C=!!(s.counter||e.counter!==!1&&e.counter!=null),I=!!(C||s.details),[S,E]=Qa(n),{modelValue:O,...R}=cs.filterProps(e),A=pu.filterProps(e);return h(cs,he({ref:p,modelValue:i.value,"onUpdate:modelValue":D=>i.value=D,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},S,R,{centerAffix:!d.value,focused:o.value}),{...s,default:D=>{let{id:L,isDisabled:W,isDirty:z,isReadonly:K,isValid:G}=D;return h(pu,he({ref:g,onMousedown:b,onClick:_,"onClick:clear":T,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"],role:e.role},A,{id:L.value,active:y.value||z.value,dirty:z.value||e.dirty,disabled:W.value,focused:o.value,error:G.value===!1}),{...s,default:H=>{let{props:{class:B,...ne}}=H;const q=Bt(h("input",he({ref:m,value:i.value,onInput:x,autofocus:e.autofocus,readonly:K.value,disabled:W.value,name:e.name,placeholder:e.placeholder,size:1,type:e.type,onFocus:w,onBlur:l},ne,E),null),[[fr("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:B,"data-no-activator":""},[s.default(),q]):Li(q,{class:B}),e.suffix&&h("span",{class:"v-text-field__suffix"},[h("span",{class:"v-text-field__suffix__text"},[e.suffix])])])}})},details:I?D=>{var L;return h(Pe,null,[(L=s.details)==null?void 0:L.call(s,D),C&&h(Pe,null,[h("span",null,null),h(Ow,{active:e.persistentCounter||o.value,value:u.value,max:c.value,disabled:e.disabled},s.counter)])])}:void 0})}),Ki({},p,g,m)}}),MG=ue({id:String,interactive:Boolean,text:String,...Os(Rd({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:MG(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=st(e,"modelValue"),{scopeId:s}=Ru(),i=hs(),o=P(()=>e.id||`v-tooltip-${i}`),a=U(),l=P(()=>e.location.split(" ").length>1?e.location:e.location+" center"),u=P(()=>e.origin==="auto"||e.origin==="overlap"||e.origin.split(" ").length>1||e.location.split(" ").length>1?e.origin:e.origin+" center"),c=P(()=>e.transition?e.transition:r.value?"scale-transition":"fade-transition"),d=P(()=>he({"aria-describedby":o.value},e.activatorProps));return Ae(()=>{const f=Fi.filterProps(e);return h(Fi,he({ref:a,class:["v-tooltip",{"v-tooltip--interactive":e.interactive},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,g=new Array(p),m=0;m<p;m++)g[m]=arguments[m];return((y=n.default)==null?void 0:y.call(n,...g))??e.text}})}),Ki({},a)}}),DG={key:0,class:"d-flex justify-center static-disabled"},$G={key:1,class:"pulsating-red d-flex justify-center"},LG={key:0,class:"d-flex justify-center"},FG={key:0},NG={key:1},BG={key:1},VG={key:0},UG={key:1},zG={key:0},HG={key:1},jG={key:0},qG={key:1},WG={key:2},GG=$e({__name:"FileExplorerSideNav",setup(e){const t=Ft(),n=tr(),r=U(36),s=U(void 0),i=U(void 0),o=U(!1),a=U(!0),l=P(()=>t.sideNavPrinter),u=P(()=>{var X;return(X=l.value)==null?void 0:X.id}),c=P(()=>u.value?n.isApiResponding(u.value):!1),d=P(()=>{var X;return HA((X=l.value)==null?void 0:X.printerType)}),f=P(()=>{var X;return jA((X=l.value)==null?void 0:X.printerType)}),p=P(()=>{var X;return qA((X=l.value)==null?void 0:X.printerType)}),g=P(()=>u.value?n.isPrinterOperational(u.value):!1),m=P(()=>{var X;return(X=l.value)==null?void 0:X.enabled}),y=P(()=>{var X,V;return!!((V=(X=l.value)==null?void 0:X.disabledReason)!=null&&V.length)}),w=P(()=>u.value?n.isPrinterPrinting(u.value):!1),b=P(()=>{var X;return(X=i.value)!=null&&X.length?i.value.filter(V=>{var ge;return(ge=s.value)!=null&&ge.length?`${V.path}`.toLowerCase().includes(s.value):!0})||[]:[]}),_=P(()=>!l.value||!u.value?!1:n.isPrinterStoppable(u.value)),T=P(()=>!l.value||!u.value?!1:n.isPrinterPaused(u.value)),x=P(()=>{var X;return u.value?((X=i.value)==null?void 0:X.length)&&n.isApiResponding(u.value):!1}),C=P(()=>{if(!u.value)throw new Error("Printer ID not set, cannot get current job");return n.printerJobsById[u.value]}),I=P(()=>{if(!u.value)throw new Error("Printer ID not set, cannot get current printing file name");return n.printingFilePathsByPrinterId[u.value]}),S=P(()=>{var Ne;if(!u.value||!l.value)return null;const X=n.printerEventsById[u.value],V=n.socketStatesById[u.value],ge=cA(l.value,V,X);return((Ne=Fs().frontendDebugSettings)==null?void 0:Ne.showInterpretedPrinterState)&&console.debug("[FileExplorerSideNav] rendered for printerId",u.value,ge==null?void 0:ge.text,ge==null?void 0:ge.color,ge==null?void 0:ge.rgb),ge}),E=async()=>{var V;a.value=!0;const X=(V=l.value)==null?void 0:V.id;if(X)try{n.isApiResponding(X)?i.value=await t.loadPrinterFiles(X):i.value=await Di.getFileCache(X)}finally{a.value=!1}},O=async X=>{u.value&&await t.deletePrinterFile(u.value,X.path)};ke(l,async(X,V)=>{o.value=!!X;const ge=X==null?void 0:X.id;!X||!ge||(!i.value||X.id!==(V==null?void 0:V.id)||!V)&&await E()}),ke(o,X=>{X||t.setSideNavPrinter(void 0)});function R(X){return X?X==null?void 0:X.toFixed(1):""}function A(X){return u.value?n.printingFilePathsByPrinterId[u.value]===X.path:!1}function D(){const X=l.value;if(X&&o.value)return fm(X.name)}function L(){l.value&&(Xt.openPrinterURL(l.value.printerURL),Q())}function W(){if(!l.value)return;const X=new URL(l.value.printerURL);X.port="8080",Xt.openPrinterURL(X.toString()),Q()}async function z(){if(u.value){if(n.isPrinterOperational(u.value))return await Xt.sendPrinterDisconnectCommand(u.value);await Xt.sendPrinterConnectCommand(u.value)}}async function K(){if(!u.value)throw new Error("Printer ID not set, cant toggle enabled");if(!l.value)throw new Error("Cant toggle enabled, sidenav printer unset");const X=!l.value.enabled;await Xt.toggleEnabled(u.value,X)}async function G(){if(!u.value)throw new Error("Printer ID not set, cant toggle maintenance");if(!l.value)throw new Error("Cant toggle enabled, sidenav printer unset");if(y.value){await Xt.updatePrinterMaintenance(u.value);return}t.setMaintenanceDialogPrinter(l.value),await tn(nn.PrinterMaintenanceDialog).openDialog(),Q()}async function H(){u.value&&await Xt.refreshSocket(u.value)}async function B(){u.value&&confirm("Are you sure to cancel the current print job?")&&await Ma.stopPrintJob(u.value)}async function ne(){u.value&&await Ma.pausePrintJob(u.value)}async function q(){u.value&&await Ma.resumePrintJob(u.value)}async function Y(){u.value&&confirm("Are you sure to delete all files for this printer?")&&(a.value=!0,await t.deletePrinterFiles(u.value),a.value=!1,i.value=t.printerFiles(u.value))}function oe(){l.value&&(t.setUpdateDialogPrinter(l.value),tn(nn.AddOrUpdatePrinterDialog).openDialog(),Q())}async function ie(X){u.value&&await n.selectAndPrintFile({printerId:u.value,fullPath:X.path})}function be(X){u.value&&Di.downloadFile(u.value,X)}function Q(){t.setSideNavPrinter(void 0)}return(X,V)=>{const ge=fr("drop-upload");return $(),te(Aw,{modelValue:o.value,"onUpdate:modelValue":V[14]||(V[14]=Oe=>o.value=Oe),absolute:"",loading:"true",location:"right",scrim:"white",temporary:"",width:"700",onClose:V[15]||(V[15]=Oe=>Q())},{default:v(()=>{var Oe,Ne,N;return[l.value?($(),te(Ve,{key:0,lines:"two"},{prepend:v(()=>[h(nt,{location:"left"},{activator:v(({props:F})=>[h(se,he({size:r.value,class:"mr-4 mt-1",color:"primary",icon:""},F,{onClick:V[0]||(V[0]=ee=>L()),onMouseup:V[1]||(V[1]=kt(ee=>L(),["middle"]))}),{default:v(()=>[h(lt,{size:r.value,class:"font-weight-bold",color:"primary"},{default:v(()=>[k(re(D()),1)]),_:1},8,["size"])]),_:2},1040,["size"])]),default:v(()=>[M("span",null," Visit the "+re(p.value)+" associated to this printer ",1)]),_:1})]),default:v(()=>[h(dt,{class:"font-weight-bold"},{default:v(()=>[k(re(l.value.name),1)]),_:1}),h(yt),h(v6,null,{default:v(()=>{var F,ee,pe,ce;return[!m.value||!c.value?($(),me("strong",DG,re(m.value?"Enabled":"Disabled")+" - "+re(c.value?(ee=(F=S.value)==null?void 0:F.text)==null?void 0:ee.toUpperCase():"Offline"),1)):fe("",!0),m.value&&((pe=S.value)!=null&&pe.text)&&g.value&&c.value?($(),me("strong",$G," Enabled - "+re((ce=S.value)==null?void 0:ce.text),1)):fe("",!0)]}),_:1}),C.value?($(),te(yt,{key:0},{default:v(()=>{var F,ee,pe,ce;return[(F=C.value)!=null&&F.progress?($(),me("span",LG," Progress: "+re(R((ee=C.value)==null?void 0:ee.progress.completion))+"% ",1)):fe("",!0),(pe=C.value)!=null&&pe.progress?($(),te(ru,{key:1,"model-value":R((ce=C.value.progress)==null?void 0:ce.completion),class:"mt-1 mb-1",height:"8px"},null,8,["model-value"])):fe("",!0),h(nt,{location:"bottom"},{activator:v(({props:we})=>[h(se,he({size:"small"},we,{variant:"outlined"}),{default:v(()=>[k(re(I.value),1)]),_:2},1040)]),default:v(()=>[M("span",null,re(I.value),1)]),_:1})]}),_:1})):fe("",!0)]),_:1})):fe("",!0),!m.value||!c.value?($(),te(dn,{key:1,color:"primary"},{default:v(()=>[m.value?($(),me("span",NG,[k(" This "+re(p.value)+" seems unreachable... Will keep trying for you ",1),h(J,null,{default:v(()=>V[16]||(V[16]=[k("hourglass_top")])),_:1})])):($(),me("span",FG," Disabled "+re(p.value)+", enable it first to get live updates ",1))]),_:1})):fe("",!0),!((Oe=l.value)!=null&&Oe.enabled)&&!((Ne=l.value)!=null&&Ne.disabledReason)?($(),te(dn,{key:2,color:"secondary"},{default:v(()=>[k(" This "+re(p.value)+" was disabled without reason. ",1)]),_:1})):fe("",!0),(N=l.value)!=null&&N.disabledReason?($(),te(dn,{key:3,color:"black"},{default:v(()=>{var F;return[k(" This "+re(p.value)+" was disabled for maintenance: ",1),V[17]||(V[17]=M("br",null,null,-1)),M("small",null,"   "+re((F=l.value)==null?void 0:F.disabledReason),1)]}),_:1})):fe("",!0),h(cn),Bt(($(),te(Vt,{density:"compact"},{default:v(()=>[h(jr,{inset:""},{default:v(()=>V[18]||(V[18]=[k(" Manage FDM Monster instance")])),_:1}),h(nt,{location:"left"},{activator:v(({props:F})=>[h(Ve,he({class:"extra-dense-list-item",link:""},F,{onClick:V[2]||(V[2]=kt(ee=>L(),["prevent","stop"]))}),{prepend:v(()=>[h(lt,{size:r.value,class:"ml-3 mr-6 ma-5"},{default:v(()=>[d.value?($(),te(us,{key:0,src:E6})):($(),me("span",BG,"MO"))]),_:1},8,["size"])]),default:v(()=>[M("span",null," Open "+re(p.value),1)]),_:2},1040)]),default:v(()=>[M("span",null," Visit the "+re(p.value)+" associated to this printer ",1)]),_:1}),f.value?($(),te(nt,{key:0,location:"left"},{activator:v(({props:F})=>[h(Ve,he({class:"extra-dense-list-item",link:""},F,{onClick:V[3]||(V[3]=kt(ee=>W(),["prevent","stop"]))}),{prepend:v(()=>[h(lt,{size:r.value,class:"ml-3 mr-6 ma-5"},{default:v(()=>V[19]||(V[19]=[M("span",null,"MA",-1)])),_:1},8,["size"])]),default:v(()=>[V[20]||(V[20]=M("span",null," Open Mainsail ",-1))]),_:2},1040)]),default:v(()=>[V[21]||(V[21]=M("span",null," Visit the Mainsail for this printer ",-1))]),_:1})):fe("",!0),h(nt,{location:"left"},{activator:v(({props:F})=>[h(Ve,he({class:"extra-dense-list-item",link:""},F,{onClick:V[4]||(V[4]=kt(ee=>K(),["prevent","stop"]))}),{prepend:v(()=>[h(lt,{size:r.value,color:"grey-lighten-1"},{default:v(()=>[h(J,{color:m.value?"primary":"green"},{default:v(()=>V[22]||(V[22]=[k(" dns")])),_:1},8,["color"])]),_:1},8,["size"])]),default:v(()=>[m.value?($(),me("span",VG," Disable Printer Location ")):m.value?fe("",!0):($(),me("span",UG," Enable Printer Location "))]),_:2},1040)]),default:v(()=>[V[23]||(V[23]=M("span",null," Deactivate connection, without impacting print ",-1))]),_:1}),h(nt,{location:"left"},{activator:v(({props:F})=>[h(Ve,he({class:"extra-dense-list-item",link:""},F,{onClick:V[5]||(V[5]=kt(ee=>G(),["prevent","stop"]))}),{default:v(()=>[h(lt,{size:r.value,color:"grey-lighten-1"},{default:v(()=>[h(J,{color:y.value?"green":"primary"},{default:v(()=>V[24]||(V[24]=[k(" construction ")])),_:1},8,["color"])]),_:1},8,["size"]),y.value?y.value?($(),me("span",HG," Complete Maintenance ")):fe("",!0):($(),me("span",zG," Enable Maintenance "))]),_:2},1040)]),default:v(()=>[V[25]||(V[25]=M("span",null," Deactivate, set under repair, without impacting print ",-1))]),_:1}),h(nt,{location:"left"},{activator:v(({props:F})=>[h(Ve,he({class:"extra-dense-list-item",link:""},F,{onClick:V[6]||(V[6]=kt(ee=>H(),["prevent","stop"]))}),{default:v(()=>[h(lt,{size:r.value},{default:v(()=>[h(J,{color:y.value?"green":"primary",class:"grey-lighten-1"},{default:v(()=>V[26]||(V[26]=[k(" autorenew ")])),_:1},8,["color"])]),_:1},8,["size"]),V[27]||(V[27]=M("span",null,[k(" Refresh State "),M("small",null," - this does not affect the print! ")],-1))]),_:2},1040)]),default:v(()=>[V[28]||(V[28]=M("span",null," Let FDM Monster know you are experiencing inconsistencies, reset all volatile states ",-1))]),_:1}),h(cn),h(jr,{inset:""},{default:v(()=>V[29]||(V[29]=[k(" Commands")])),_:1}),h(nt,{location:"left"},{activator:v(({props:F})=>{var ee;return[h(Ve,he({disabled:!((ee=l.value)!=null&&ee.enabled)||!c.value,class:"extra-dense-list-item",link:""},F,{onClick:V[7]||(V[7]=kt(pe=>z(),["prevent","stop"]))}),{default:v(()=>[h(lt,{size:r.value},{default:v(()=>[h(J,null,{default:v(()=>V[30]||(V[30]=[k(" usb")])),_:1})]),_:1},8,["size"]),_.value?($(),me("span",jG," Disconnect USB & Stop Print ")):g.value?($(),me("span",qG," Disconnect USB ")):($(),me("span",WG," Connect USB "))]),_:2},1040,["disabled"])]}),default:v(()=>[V[31]||(V[31]=M("span",null," Disconnect USB, disrupting any print ",-1))]),_:1}),h(nt,{location:"left"},{activator:v(({props:F})=>[h(Ve,he({disabled:!c.value||!w.value,class:"extra-dense-list-item",link:""},F,{onClick:V[8]||(V[8]=kt(ee=>T.value?q():ne(),["prevent","stop"]))}),{default:v(()=>[h(lt,{size:r.value},{default:v(()=>[T.value?fe("",!0):($(),te(J,{key:0},{default:v(()=>V[32]||(V[32]=[k(" pause")])),_:1})),T.value?($(),te(J,{key:1},{default:v(()=>V[33]||(V[33]=[k(" play_circle_outline")])),_:1})):fe("",!0)]),_:1},8,["size"]),k(" "+re(T.value?"Resume print":"Pause print"),1)]),_:2},1040,["disabled"])]),default:v(()=>[V[34]||(V[34]=M("span",null," Send Pause or Resume command ",-1))]),_:1}),h(nt,{location:"left"},{activator:v(({props:F})=>[h(Ve,he({disabled:!_.value,class:"extra-dense-list-item",link:""},F,{onClick:V[9]||(V[9]=kt(ee=>B(),["prevent","stop"]))}),{default:v(()=>[h(lt,{size:r.value},{default:v(()=>[h(J,null,{default:v(()=>V[35]||(V[35]=[k(" stop")])),_:1})]),_:1},8,["size"]),V[36]||(V[36]=k(" Cancel print "))]),_:2},1040,["disabled"])]),default:v(()=>[V[37]||(V[37]=M("span",null," Cancel print gracefully ",-1))]),_:1}),h(nt,{location:"left"},{activator:v(({props:F})=>[h(Ve,he({disabled:!x.value,class:"extra-dense-list-item",link:""},F,{onClick:V[10]||(V[10]=kt(ee=>Y(),["prevent","stop"]))}),{default:v(()=>[h(lt,{size:r.value},{default:v(()=>[h(J,null,{default:v(()=>V[38]||(V[38]=[k(" delete")])),_:1})]),_:1},8,["size"]),V[39]||(V[39]=k(" Delete files "))]),_:2},1040,["disabled"])]),default:v(()=>[V[40]||(V[40]=M("span",null," Clear all files present on OctoPrint (local) ",-1))]),_:1}),h(nt,{location:"left"},{activator:v(({props:F})=>[h(Ve,he({class:"extra-dense-list-item",link:""},F,{onClick:V[11]||(V[11]=kt(ee=>E(),["prevent","stop"]))}),{default:v(()=>[h(lt,{size:r.value},{default:v(()=>[h(J,null,{default:v(()=>V[41]||(V[41]=[k(" refresh")])),_:1})]),_:1},8,["size"]),V[42]||(V[42]=k(" Refresh files "))]),_:2},1040)]),default:v(()=>[V[43]||(V[43]=M("span",null," Rebuild the file list on OctoPrint (local) ",-1))]),_:1}),h(nt,{location:"left"},{activator:v(({props:F})=>[h(Ve,he({class:"extra-dense-list-item",link:""},F,{onClick:V[12]||(V[12]=kt(ee=>oe(),["prevent","stop"]))}),{default:v(()=>[h(lt,{size:r.value},{default:v(()=>[h(J,null,{default:v(()=>V[44]||(V[44]=[k(" settings")])),_:1})]),_:1},8,["size"]),V[45]||(V[45]=k(" Settings "))]),_:2},1040)]),default:v(()=>[V[46]||(V[46]=M("span",null," Edit the printer settings ",-1))]),_:1})]),_:1})),[[ge,{printers:[l.value]}]]),h(cn),Bt(($(),te(Vt,{density:"compact"},{default:v(()=>[h(jr,{inset:""},{default:v(()=>V[47]||(V[47]=[k(" Files - drag 'n drop!")])),_:1}),h(ut,{modelValue:s.value,"onUpdate:modelValue":V[13]||(V[13]=F=>s.value=F),class:"ml-5 mr-5",clearable:"",label:"Search files...","prepend-icon":"search"},null,8,["modelValue"]),b.value.length?fe("",!0):($(),te(Ve,{key:0},{default:v(()=>[h(lt,{size:r.value},{default:v(()=>[h(J,null,{default:v(()=>V[48]||(V[48]=[k(" clear")])),_:1})]),_:1},8,["size"]),h(dt,null,{default:v(()=>V[49]||(V[49]=[k(" No files to show")])),_:1})]),_:1})),a.value?($(),te(ru,{key:1,indeterminate:""})):fe("",!0),($(!0),me(Pe,null,Wt(b.value,(F,ee)=>($(),te(Ve,{key:ee,density:"compact",link:"",style:{"padding-top":"0"}},{default:v(()=>[h(lt,{size:r.value},{default:v(()=>[h(nt,{location:"left"},{activator:v(({props:pe})=>[h(se,he({ref_for:!0},pe,{onClick:ce=>be(F.path)}),{default:v(()=>[h(J,null,{default:v(()=>V[50]||(V[50]=[k(" download")])),_:1})]),_:2},1040,["onClick"])]),default:v(()=>[V[51]||(V[51]=M("span",null," Download GCode ",-1))]),_:2},1024)]),_:2},1032,["size"]),h(hu,null,{default:v(()=>[h(nt,{location:"left"},{activator:v(({props:pe})=>[h(se,he({disabled:A(F),icon:"",ref_for:!0},pe,{onClick:ce=>ie(F)}),{default:v(()=>[h(J,null,{default:v(()=>V[52]||(V[52]=[k(" play_arrow")])),_:1})]),_:2},1040,["disabled","onClick"])]),default:v(()=>[V[53]||(V[53]=M("span",null," Select & Print ",-1))]),_:2},1024)]),_:2},1024),h(nt,{location:"left"},{activator:v(({props:pe})=>[M("span",he({class:{"current-file-print":A(F)},ref_for:!0},pe),re(F.path),17)]),default:v(()=>[M("span",null,[k(" File: "+re(F.path)+" ",1),V[54]||(V[54]=M("br",null,null,-1)),k(" Size: "+re(Z(zA)(F.size))+" ",1),V[55]||(V[55]=M("br",null,null,-1)),M("strong",null,re(A(F)?"Printing":"Unused"),1)])]),_:2},1024),h(hu,null,{default:v(()=>[h(nt,{location:"left"},{activator:v(({props:pe})=>[h(se,he({disabled:A(F),ref_for:!0},pe,{onClick:ce=>O(F)}),{default:v(()=>[h(J,{color:"grey-lighten-1"},{default:v(()=>V[56]||(V[56]=[k(" delete")])),_:1})]),_:2},1040,["disabled","onClick"])]),default:v(()=>[V[57]||(V[57]=M("span",null," Delete file ",-1))]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1})),[[ge,{printers:[l.value]}]])]}),_:1},8,["modelValue"])}}});class np extends mr{static async downloadYamlExport(t){const r=await(await Gn()).request({method:"POST",url:"api/server/export-printers-floors-yaml",data:t,responseType:"arraybuffer"});Sy(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 Gn()).request({method:"POST",url:"api/server/dump-fdm-monster-logs",responseType:"arraybuffer"});Sy(n.data,"logs-fdm-monster-"+Date.now()+".zip")}static async clearLogFilesOlderThanWeek(){return await this.delete("api/server/clear-outdated-fdm-monster-logs")}}class pa extends mr{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 Gn(!1,!1)).get("/api/test")}}const vm=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 pa.getFeatures();this.setFeatures(e)}catch{this.features={}}},setFeatures(e){this.features=e}}}),oO=Symbol.for("vuetify:selection-control-group"),Dw=ue({color:String,disabled:{type:Boolean,default:null},defaultsTarget:String,error:Boolean,id:String,inline:Boolean,falseIcon:He,trueIcon:He,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:Ps},...Ue(),...Rr(),...$t()},"SelectionControlGroup"),KG=ue({...Dw({defaultsTarget:"VSelectionControl"})},"VSelectionControlGroup"),YG=_e()({name:"VSelectionControlGroup",props:KG(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=st(e,"modelValue"),s=hs(),i=P(()=>e.id||`v-selection-control-group-${s}`),o=P(()=>e.name||i.value),a=new Set;return Gt(oO,{modelValue:r,forceUpdate:()=>{a.forEach(l=>l())},onForceUpdate:l=>{a.add(l),gn(()=>{a.delete(l)})}}),Pr({[e.defaultsTarget]:{color:Te(e,"color"),disabled:Te(e,"disabled"),density:Te(e,"density"),error:Te(e,"error"),inline:Te(e,"inline"),modelValue:r,multiple:P(()=>!!e.multiple||e.multiple==null&&Array.isArray(r.value)),name:o,falseIcon:Te(e,"falseIcon"),trueIcon:Te(e,"trueIcon"),readonly:Te(e,"readonly"),ripple:Te(e,"ripple"),type:Te(e,"type"),valueComparator:Te(e,"valueComparator")}}),Ae(()=>{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)])}),{}}}),ym=ue({label:String,baseColor:String,trueValue:null,falseValue:null,value:null,...Ue(),...Dw()},"VSelectionControl");function XG(e){const t=Xe(oO,void 0),{densityClasses:n}=gs(e),r=st(e,"modelValue"),s=P(()=>e.trueValue!==void 0?e.trueValue:e.value!==void 0?e.value:!0),i=P(()=>e.falseValue!==void 0?e.falseValue:!1),o=P(()=>!!e.multiple||e.multiple==null&&Array.isArray(r.value)),a=P({get(){const p=t?t.modelValue.value:r.value;return o.value?An(p).some(g=>e.valueComparator(g,s.value)):e.valueComparator(p,s.value)},set(p){if(e.readonly)return;const g=p?s.value:i.value;let m=g;o.value&&(m=p?[...An(r.value),g]:An(r.value).filter(y=>!e.valueComparator(y,s.value))),t?t.modelValue.value=m:r.value=m}}),{textColorClasses:l,textColorStyles:u}=Is(P(()=>{if(!(e.error||e.disabled))return a.value?e.color:e.baseColor})),{backgroundColorClasses:c,backgroundColorStyles:d}=dr(P(()=>a.value&&!e.error&&!e.disabled?e.color:e.baseColor)),f=P(()=>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 Ga=_e()({name:"VSelectionControl",directives:{Ripple:Pu},inheritAttrs:!1,props:ym(),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}=XG(e),p=hs(),g=Ie(!1),m=Ie(!1),y=U(),w=P(()=>e.id||`input-${p}`),b=P(()=>!e.disabled&&!e.readonly);s==null||s.onForceUpdate(()=>{y.value&&(y.value.checked=a.value)});function _(I){b.value&&(g.value=!0,Rh(I.target,":focus-visible")!==!1&&(m.value=!0))}function T(){g.value=!1,m.value=!1}function x(I){I.stopPropagation()}function C(I){if(!b.value){y.value&&(y.value.checked=a.value);return}e.readonly&&s&&Mt(()=>s.forceUpdate()),a.value=I.target.checked}return Ae(()=>{var R,A;const I=r.label?r.label({label:e.label,props:{for:w.value}}):e.label,[S,E]=Qa(n),O=h("input",he({ref:y,checked:a.value,disabled:!!e.disabled,id:w.value,onBlur:T,onFocus:_,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",he({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":g.value,"v-selection-control--focus-visible":m.value,"v-selection-control--inline":e.inline},i.value,e.class]},S,{style:e.style}),[h("div",{class:["v-selection-control__wrapper",l.value],style:u.value},[(R=r.default)==null?void 0:R.call(r,{backgroundColorClasses:c,backgroundColorStyles:d}),Bt(h("div",{class:["v-selection-control__input"]},[((A=r.input)==null?void 0:A.call(r,{model:a,textColorClasses:l,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,inputNode:O,icon:o.value,props:{onFocus:_,onBlur:T,id:w.value}}))??h(Pe,null,[o.value&&h(J,{key:"icon",icon:o.value},null),O])]),[[fr("ripple"),e.ripple&&[!e.disabled&&!e.readonly,null,["center","circle"]]]])]),I&&h(Mw,{for:w.value,onClick:x},{default:()=>[I]})])}),{isFocused:g,input:y}}}),aO=ue({indeterminate:Boolean,indeterminateIcon:{type:He,default:"$checkboxIndeterminate"},...ym({falseIcon:"$checkboxOff",trueIcon:"$checkboxOn"})},"VCheckboxBtn"),mu=_e()({name:"VCheckboxBtn",props:aO(),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=P(()=>r.value?e.indeterminateIcon:e.falseIcon),a=P(()=>r.value?e.indeterminateIcon:e.trueIcon);return Ae(()=>{const l=Os(Ga.filterProps(e),["modelValue"]);return h(Ga,he(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)}),{}}}),QG=ue({...il(),...Os(aO(),["inline"])},"VCheckbox"),yn=_e()({name:"VCheckbox",inheritAttrs:!1,props:QG(),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}=Uu(e),l=hs(),u=P(()=>e.id||`checkbox-${l}`);return Ae(()=>{const[c,d]=Qa(n),f=cs.filterProps(e),p=mu.filterProps(e);return h(cs,he({class:["v-checkbox",e.class]},c,f,{modelValue:s.value,"onUpdate:modelValue":g=>s.value=g,id:u.value,focused:i.value,style:e.style}),{...r,default:g=>{let{id:m,messagesId:y,isDisabled:w,isReadonly:b,isValid:_}=g;return h(mu,he(p,{id:m.value,"aria-describedby":y.value,disabled:w.value,readonly:b.value},d,{error:_.value===!1,modelValue:s.value,"onUpdate:modelValue":T=>s.value=T,onFocus:o,onBlur:a}),r)}})}),{}}}),JG=ue({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))},...il({prependIcon:"$file"}),modelValue:{type:[Array,Object],default:e=>e.multiple?[]:null,validator:e=>An(e).every(t=>t!=null&&typeof t=="object")},...gm({clearable:!0})},"VFileInput"),lO=_e()({name:"VFileInput",inheritAttrs:!1,props:JG(),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}=Wr(),o=st(e,"modelValue",e.modelValue,R=>An(R),R=>!e.multiple&&Array.isArray(R)?R[0]:R),{isFocused:a,focus:l,blur:u}=Uu(e),c=P(()=>typeof e.showSize!="boolean"?e.showSize:void 0),d=P(()=>(o.value??[]).reduce((R,A)=>{let{size:D=0}=A;return R+D},0)),f=P(()=>__(d.value,c.value)),p=P(()=>(o.value??[]).map(R=>{const{name:A="",size:D=0}=R;return e.showSize?`${A} (${__(D,c.value)})`:A})),g=P(()=>{var A;const R=((A=o.value)==null?void 0:A.length)??0;return e.showSize?i(e.counterSizeString,R,f.value):i(e.counterString,R)}),m=U(),y=U(),w=U(),b=P(()=>a.value||e.active),_=P(()=>["plain","underlined"].includes(e.variant));function T(){var R;w.value!==document.activeElement&&((R=w.value)==null||R.focus()),a.value||l()}function x(R){var A;(A=w.value)==null||A.click()}function C(R){r("mousedown:control",R)}function I(R){var A;(A=w.value)==null||A.click(),r("click:control",R)}function S(R){R.stopPropagation(),T(),Mt(()=>{o.value=[],Fp(e["onClick:clear"],R)})}function E(R){R.preventDefault()}function O(R){R.preventDefault(),R.dataTransfer&&(o.value=[...R.dataTransfer.files??[]])}return ke(o,R=>{(!Array.isArray(R)||!R.length)&&w.value&&(w.value.value="")}),Ae(()=>{const R=!!(s.counter||e.counter),A=!!(R||s.details),[D,L]=Qa(n),{modelValue:W,...z}=cs.filterProps(e),K=pu.filterProps(e);return h(cs,he({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":_.value},e.class],style:e.style,"onClick:prepend":x},D,z,{centerAffix:!_.value,focused:a.value}),{...s,default:G=>{let{id:H,isDisabled:B,isDirty:ne,isReadonly:q,isValid:Y}=G;return h(pu,he({ref:y,"prepend-icon":e.prependIcon,onMousedown:C,onClick:I,"onClick:clear":S,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"]},K,{id:H.value,active:b.value||ne.value,dirty:ne.value||e.dirty,disabled:B.value,focused:a.value,error:Y.value===!1,onDragover:E,onDrop:O}),{...s,default:oe=>{var Q;let{props:{class:ie,...be}}=oe;return h(Pe,null,[h("input",he({ref:w,type:"file",readonly:q.value,disabled:B.value,multiple:e.multiple,name:e.name,onClick:X=>{X.stopPropagation(),q.value&&X.preventDefault(),T()},onChange:X=>{if(!X.target)return;const V=X.target;o.value=[...V.files??[]]},onFocus:T,onBlur:u},be,L),null),h("div",{class:ie},[!!((Q=o.value)!=null&&Q.length)&&!e.hideInput&&(s.selection?s.selection({fileNames:p.value,totalBytes:d.value,totalBytesReadable:f.value}):e.chips?p.value.map(X=>h(Sn,{key:X,size:"small",text:X},null)):p.value.join(", "))])])}})},details:A?G=>{var H,B;return h(Pe,null,[(H=s.details)==null?void 0:H.call(s,G),R&&h(Pe,null,[h("span",null,null),h(Ow,{active:!!((B=o.value)!=null&&B.length),value:g.value,disabled:e.disabled},s.counter)])])}:void 0})}),Ki({},m,y,w)}}),ZG=ue({...ym({falseIcon:"$radioOff",trueIcon:"$radioOn"})},"VRadio"),Ty=_e()({name:"VRadio",props:ZG(),setup(e,t){let{slots:n}=t;return Ae(()=>{const r=Ga.filterProps(e);return h(Ga,he(r,{class:["v-radio",e.class],style:e.style,type:"radio"}),n)}),{}}}),e7=ue({height:{type:[Number,String],default:"auto"},...il(),...Os(Dw(),["multiple"]),trueIcon:{type:He,default:"$radioOn"},falseIcon:{type:He,default:"$radioOff"},type:{type:String,default:"radio"}},"VRadioGroup"),uO=_e()({name:"VRadioGroup",inheritAttrs:!1,props:e7(),emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const s=hs(),i=P(()=>e.id||`radio-group-${s}`),o=st(e,"modelValue");return Ae(()=>{const[a,l]=Qa(n),u=cs.filterProps(e),c=Ga.filterProps(e),d=r.label?r.label({label:e.label,props:{for:i.value}}):e.label;return h(cs,he({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:g,isDisabled:m,isReadonly:y}=f;return h(Pe,null,[d&&h(Mw,{id:p.value},{default:()=>[d]}),h(YG,he(c,{id:p.value,"aria-describedby":g.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":w=>o.value=w}),r)])}})}),{}}}),t7=ue({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,...il(),...gm()},"VTextarea"),cO=_e()({name:"VTextarea",directives:{Intersect:Ew},inheritAttrs:!1,props:t7(),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}=Uu(e),u=P(()=>typeof e.counterValue=="function"?e.counterValue(i.value):(i.value||"").toString().length),c=P(()=>{if(n.maxlength)return n.maxlength;if(!(!e.counter||typeof e.counter!="number"&&typeof e.counter!="string"))return e.counter});function d(R,A){var D,L;!e.autofocus||!R||(L=(D=A[0].target)==null?void 0:D.focus)==null||L.call(D)}const f=U(),p=U(),g=Ie(""),m=U(),y=P(()=>e.persistentPlaceholder||o.value||e.active);function w(){var R;m.value!==document.activeElement&&((R=m.value)==null||R.focus()),o.value||a()}function b(R){w(),r("click:control",R)}function _(R){r("mousedown:control",R)}function T(R){R.stopPropagation(),w(),Mt(()=>{i.value="",Fp(e["onClick:clear"],R)})}function x(R){var D;const A=R.target;if(i.value=A.value,(D=e.modelModifiers)!=null&&D.trim){const L=[A.selectionStart,A.selectionEnd];Mt(()=>{A.selectionStart=L[0],A.selectionEnd=L[1]})}}const C=U(),I=U(Number(e.rows)),S=P(()=>["plain","underlined"].includes(e.variant));On(()=>{e.autoGrow||(I.value=Number(e.rows))});function E(){e.autoGrow&&Mt(()=>{if(!C.value||!p.value)return;const R=getComputedStyle(C.value),A=getComputedStyle(p.value.$el),D=parseFloat(R.getPropertyValue("--v-field-padding-top"))+parseFloat(R.getPropertyValue("--v-input-padding-top"))+parseFloat(R.getPropertyValue("--v-field-padding-bottom")),L=C.value.scrollHeight,W=parseFloat(R.lineHeight),z=Math.max(parseFloat(e.rows)*W+D,parseFloat(A.getPropertyValue("--v-input-control-height"))),K=parseFloat(e.maxRows)*W+D||1/0,G=Er(L??0,z,K);I.value=Math.floor((G-D)/W),g.value=Fe(G)})}_t(E),ke(i,E),ke(()=>e.rows,E),ke(()=>e.maxRows,E),ke(()=>e.density,E);let O;return ke(C,R=>{R?(O=new ResizeObserver(E),O.observe(C.value)):O==null||O.disconnect()}),En(()=>{O==null||O.disconnect()}),Ae(()=>{const R=!!(s.counter||e.counter||e.counterValue),A=!!(R||s.details),[D,L]=Qa(n),{modelValue:W,...z}=cs.filterProps(e),K=pu.filterProps(e);return h(cs,he({ref:f,modelValue:i.value,"onUpdate:modelValue":G=>i.value=G,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":S.value},e.class],style:e.style},D,z,{centerAffix:I.value===1&&!S.value,focused:o.value}),{...s,default:G=>{let{id:H,isDisabled:B,isDirty:ne,isReadonly:q,isValid:Y}=G;return h(pu,he({ref:p,style:{"--v-textarea-control-height":g.value},onClick:b,onMousedown:_,"onClick:clear":T,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"]},K,{id:H.value,active:y.value||ne.value,centerAffix:I.value===1&&!S.value,dirty:ne.value||e.dirty,disabled:B.value,focused:o.value,error:Y.value===!1}),{...s,default:oe=>{let{props:{class:ie,...be}}=oe;return h(Pe,null,[e.prefix&&h("span",{class:"v-text-field__prefix"},[e.prefix]),Bt(h("textarea",he({ref:m,class:ie,value:i.value,onInput:x,autofocus:e.autofocus,readonly:q.value,disabled:B.value,placeholder:e.placeholder,rows:e.rows,name:e.name,onFocus:w,onBlur:l},be,L),null),[[fr("intersect"),{handler:d},null,{once:!0}]]),e.autoGrow&&Bt(h("textarea",{class:[ie,"v-textarea__sizer"],id:`${be.id}-sizer`,"onUpdate:modelValue":Q=>i.value=Q,ref:C,readonly:!0,"aria-hidden":"true"},null),[[tF,i.value]]),e.suffix&&h("span",{class:"v-text-field__suffix"},[e.suffix])])}})},details:A?G=>{var H;return h(Pe,null,[(H=s.details)==null?void 0:H.call(s,G),R&&h(Pe,null,[h("span",null,null),h(Ow,{active:e.persistentCounter||o.value,value:u.value,max:c.value,disabled:e.disabled},s.counter)])])}:void 0})}),Ki({},f,p,m)}}),n7={key:0,class:"pl-2"},r7={key:1},s7=$e({__name:"YamlImportExportDialog",setup(e){const t=vm(),n=tn(nn.YamlImportExport),r=Dt(),s=U(""),i=U(""),o=U(0),a=U(!0),l=U(!0),u=U(!0),c=U(!0),d=U(void 0),f=U(""),p=P(()=>!t.hasFeature("printerGroupsApi")),g=P(()=>!!d.value),m=P(()=>o.value===0),y=async()=>{await t.loadFeatures(),u.value=t.hasFeature("printerGroupsApi")},w=async()=>{d.value=void 0,s.value="",i.value="",f.value=""},b=async()=>{l.value&&(c.value=!0),await np.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=""},_=async()=>{if(s.value="",i.value="",!d.value){s.value="The import file was not specified";return}try{await np.uploadAndImportYaml(d.value),d.value=void 0,r.openInfoMessage({title:"Imported the YAML file"}),T()}catch(x){s.value="An error occurred uring import",i.value=x.message.toString(),d.value=void 0}},T=()=>{d.value=void 0,s.value="",i.value="",f.value="",n.closeDialog()};return(x,C)=>{const I=hi;return $(),te(I,{id:Z(n).dialogId,"max-width":"700px",onEscape:C[10]||(C[10]=S=>T()),onOpened:w,onBeforeOpened:y},{default:v(()=>[h(gt,{class:"pa-4"},{default:v(()=>[h(sn,null,{default:v(()=>C[11]||(C[11]=[M("span",{class:"text-h5"}," YAML export and import ",-1)])),_:1}),h(en,null,{default:v(()=>[C[18]||(C[18]=M("div",null,"Choose mode:",-1)),h(rt,null,{default:v(()=>[C[12]||(C[12]=M("br",null,null,-1)),h(uO,{modelValue:Z(o),"onUpdate:modelValue":C[0]||(C[0]=S=>Je(o)?o.value=S:null),class:"ml-3",inline:""},{default:v(()=>[h(Ty,{value:0,label:"Import YAML"}),h(Ty,{value:1,label:"Export YAML"})]),_:1},8,["modelValue"])]),_:1}),M("div",null,[Z(m)?($(),me("div",n7,[h(lO,{modelValue:Z(d),"onUpdate:modelValue":C[1]||(C[1]=S=>Je(d)?d.value=S:null),accept:".yaml",label:"Select a YAML file for import *"},null,8,["modelValue"])])):($(),me("div",r7,[h(yn,{modelValue:Z(a),"onUpdate:modelValue":C[2]||(C[2]=S=>Je(a)?a.value=S: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]=S=>Je(u)?u.value=S: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]=S=>Je(c)?c.value=S: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]=S=>Je(l)?l.value=S:null),class:"pa-0 ma-0 ml-2",label:"Include grid positions (auto-includes printers)"},null,8,["modelValue"]),C[13]||(C[13]=k(" Include notes (for yourself): ")),h(cO,{modelValue:Z(f),"onUpdate:modelValue":C[6]||(C[6]=S=>Je(f)?f.value=S:null),rows:"1"},null,8,["modelValue"])])),Z(m)?fe("",!0):($(),te(se,{key:2,onClick:C[7]||(C[7]=S=>b())},{default:v(()=>[h(J,null,{default:v(()=>C[14]||(C[14]=[k("download")])),_:1}),C[15]||(C[15]=k(" Export YAML file "))]),_:1})),Z(m)?($(),te(se,{key:3,disabled:!Z(g),onClick:C[8]||(C[8]=S=>_())},{default:v(()=>[h(J,null,{default:v(()=>C[16]||(C[16]=[k("upload")])),_:1}),C[17]||(C[17]=k(" Import YAML data "))]),_:1},8,["disabled"])):fe("",!0)])]),_:1}),h(Mn,null,{default:v(()=>[C[20]||(C[20]=M("em",{class:"text-red"}," * indicates required field ",-1)),h(wn),h(se,{variant:"text",onClick:C[9]||(C[9]=S=>T())},{default:v(()=>C[19]||(C[19]=[k(" Close ")])),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),i7="/assets/octofarm-printer-export-Dw0Zh14I.gif",$w=Symbol.for("vuetify:v-stepper"),dO=ue({color:String,disabled:{type:[Boolean,String],default:!1},prevText:{type:String,default:"$vuetify.stepper.prev"},nextText:{type:String,default:"$vuetify.stepper.next"}},"VStepperActions"),o7=_e()({name:"VStepperActions",props:dO(),emits:{"click:prev":()=>!0,"click:next":()=>!0},setup(e,t){let{emit:n,slots:r}=t;const{t:s}=Wr();function i(){n("click:prev")}function o(){n("click:next")}return Ae(()=>{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)]}})])}),{}}}),Lw=ku("v-stepper-header"),a7=ue({color:String,title:String,subtitle:String,complete:Boolean,completeIcon:{type:He,default:"$complete"},editable:Boolean,editIcon:{type:He,default:"$edit"},error:Boolean,errorIcon:{type:He,default:"$error"},icon:He,ripple:{type:[Boolean,Object],default:!0},rules:{type:Array,default:()=>[]}},"StepperItem"),l7=ue({...a7(),...Ed()},"VStepperItem"),ih=_e()({name:"VStepperItem",directives:{Ripple:Pu},props:l7(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const r=Cd(e,$w,!0),s=P(()=>(r==null?void 0:r.value.value)??e.value),i=P(()=>e.rules.every(f=>f()===!0)),o=P(()=>!e.disabled&&e.editable),a=P(()=>!e.disabled&&e.editable),l=P(()=>e.error||!i.value),u=P(()=>e.complete||e.rules.length>0&&i.value),c=P(()=>l.value?e.errorIcon:u.value?e.completeIcon:r.isSelected.value&&e.editable?e.editIcon:e.icon),d=P(()=>({canEdit:a.value,hasError:l.value,hasCompleted:u.value,title:e.title,subtitle:e.subtitle,step:s.value,value:e.value}));return Ae(()=>{var y,w,b;const f=(!r||r.isSelected.value||u.value||a.value)&&!l.value&&!e.disabled,p=!!(e.title!=null||n.title),g=!!(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&&Uo(!0,"v-stepper-item"),h(lt,{key:"stepper-avatar",class:"v-stepper-item__avatar",color:f?e.color:void 0,size:24},{default:()=>{var _;return[((_=n.icon)==null?void 0:_.call(n,d.value))??(c.value?h(J,{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]),g&&h("div",{key:"subtitle",class:"v-stepper-item__subtitle"},[((w=n.subtitle)==null?void 0:w.call(n,d.value))??e.subtitle]),(b=n.default)==null?void 0:b.call(n,d.value)])]),[[fr("ripple"),e.ripple&&e.editable,null]])}),{}}}),u7=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 c7(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 d7(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}),u7(t)}function f7(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 h7(){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=>c7(n,t),touchend:n=>d7(n,t),touchmove:n=>f7(n,t)}}function p7(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=h7(t.value);r._touchHandlers=r._touchHandlers??Object.create(null),r._touchHandlers[i]=o,yT(o).forEach(l=>{r.addEventListener(l,o[l],s)})}function m7(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];yT(s).forEach(a=>{n.removeEventListener(a,s[a])}),delete n._touchHandlers[r]}const fO={mounted:p7,unmounted:m7},hO=Symbol.for("vuetify:v-window"),pO=Symbol.for("vuetify:v-window-group"),mO=ue({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"},...Ue(),...vt(),...$t()},"VWindow"),ok=_e()({name:"VWindow",directives:{Touch:fO},props:mO(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:r}=Zt(e),{isRtl:s}=Or(),{t:i}=Wr(),o=xu(e,pO),a=U(),l=P(()=>s.value?!e.reverse:e.reverse),u=Ie(!1),c=P(()=>{const T=e.direction==="vertical"?"y":"x",C=(l.value?!u.value:u.value)?"-reverse":"";return`v-window-${T}${C}-transition`}),d=Ie(0),f=U(void 0),p=P(()=>o.items.value.findIndex(T=>o.selected.value.includes(T.id)));ke(p,(T,x)=>{const C=o.items.value.length,I=C-1;C<=2?u.value=T<x:T===I&&x===0?u.value=!0:T===0&&x===I?u.value=!1:u.value=T<x}),Gt(hO,{transition:c,isReversed:u,transitionCount:d,transitionHeight:f,rootRef:a});const g=P(()=>e.continuous||p.value!==0),m=P(()=>e.continuous||p.value!==o.items.value.length-1);function y(){g.value&&o.prev()}function w(){m.value&&o.next()}const b=P(()=>{const T=[],x={icon:s.value?e.nextIcon:e.prevIcon,class:`v-window__${l.value?"right":"left"}`,onClick:o.prev,"aria-label":i("$vuetify.carousel.prev")};T.push(g.value?n.prev?n.prev({props:x}):h(se,x,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 T.push(m.value?n.next?n.next({props:C}):h(se,C,null):h("div",null,null)),T}),_=P(()=>e.touch===!1?e.touch:{...{left:()=>{l.value?y():w()},right:()=>{l.value?w():y()},start:x=>{let{originalEvent:C}=x;C.stopPropagation()}},...e.touch===!0?{}:e.touch});return Ae(()=>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 T,x;return[h("div",{class:"v-window__container",style:{height:f.value}},[(T=n.default)==null?void 0:T.call(n,{group:o}),e.showArrows!==!1&&h("div",{class:"v-window__controls"},[b.value])]),(x=n.additional)==null?void 0:x.call(n,{group:o})]}}),[[fr("touch"),_.value]])),{group:o}}}),g7=ue({...Os(mO(),["continuous","nextIcon","prevIcon","showArrows","touch","mandatory"])},"VStepperWindow"),gO=_e()({name:"VStepperWindow",props:g7(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=Xe($w,null),s=st(e,"modelValue"),i=P({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 Ae(()=>{const o=ok.filterProps(e);return h(ok,he({_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)}),{}}}),vO=ue({reverseTransition:{type:[Boolean,String],default:void 0},transition:{type:[Boolean,String],default:void 0},...Ue(),...Ed(),...uP()},"VWindowItem"),ak=_e()({name:"VWindowItem",directives:{Touch:fO},props:vO(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const r=Xe(hO),s=Cd(e,pO),{isBooted:i}=Hd();if(!r||!s)throw new Error("[Vuetify] VWindowItem must be used inside VWindow");const o=Ie(!1),a=P(()=>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 g;o.value||!r||(o.value=!0,r.transitionCount.value===0&&(r.transitionHeight.value=Fe((g=r.rootRef.value)==null?void 0:g.clientHeight)),r.transitionCount.value+=1)}function c(){l()}function d(g){o.value&&Mt(()=>{!a.value||!o.value||!r||(r.transitionHeight.value=Fe(g.clientHeight))})}const f=P(()=>{const g=r.isReversed.value?e.reverseTransition:e.transition;return a.value?{name:typeof g!="string"?r.transition.value:g,onBeforeEnter:u,onAfterEnter:l,onEnterCancelled:c,onBeforeLeave:u,onAfterLeave:l,onLeaveCancelled:c,onEnter:d}:!1}),{hasContent:p}=cP(e,s.isSelected);return Ae(()=>h(si,{transition:f.value,disabled:!i.value},{default:()=>{var g;return[Bt(h("div",{class:["v-window-item",s.selectedClass.value,e.class],style:e.style},[p.value&&((g=n.default)==null?void 0:g.call(n))]),[[Gi,s.isSelected.value]])]}})),{groupItem:s}}}),v7=ue({...vO()},"VStepperWindowItem"),oh=_e()({name:"VStepperWindowItem",props:v7(),setup(e,t){let{slots:n}=t;return Ae(()=>{const r=ak.filterProps(e);return h(ak,he({_as:"VStepperWindowItem"},r,{class:["v-stepper-window-item",e.class],style:e.style}),n)}),{}}}),yO=ue({color:String,...ms(),...Ue(),...Ir(),...vs(),...zo(),...Cu(),...Dn(),...vt(),...$t()},"VSheet"),rp=_e()({name:"VSheet",props:yO(),setup(e,t){let{slots:n}=t;const{themeClasses:r}=Zt(e),{backgroundColorClasses:s,backgroundColorStyles:i}=dr(Te(e,"color")),{borderClasses:o}=Ms(e),{dimensionStyles:a}=Ar(e),{elevationClasses:l}=Ds(e),{locationStyles:u}=Za(e),{positionClasses:c}=Tu(e),{roundedClasses:d}=Un(e);return Ae(()=>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)),{}}}),y7=ue({altLabels:Boolean,bgColor:String,completeIcon:He,editIcon:He,editable:Boolean,errorIcon:He,hideActions:Boolean,items:{type:Array,default:()=>[]},itemTitle:{type:String,default:"title"},itemValue:{type:String,default:"value"},nonLinear:Boolean,flat:Boolean,...el()},"Stepper"),b7=ue({...y7(),...xd({mandatory:"force",selectedClass:"v-stepper-item--selected"}),...yO(),...kd(dO(),["prevText","nextText"])},"VStepper"),bO=_e()({name:"VStepper",props:b7(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{items:r,next:s,prev:i,selected:o}=xu(e,$w),{displayClasses:a,mobile:l}=fi(e),{completeIcon:u,editIcon:c,errorIcon:d,color:f,editable:p,prevText:g,nextText:m}=Vo(e),y=P(()=>e.items.map((_,T)=>{const x=Fn(_,e.itemTitle,_),C=Fn(_,e.itemValue,T+1);return{title:x,value:C,raw:_}})),w=P(()=>r.value.findIndex(_=>o.value.includes(_.id))),b=P(()=>e.disabled?e.disabled:w.value===0?"prev":w.value===r.value.length-1?"next":!1);return Pr({VStepperItem:{editable:p,errorIcon:d,completeIcon:u,editIcon:c,prevText:g,nextText:m},VStepperActions:{color:f,disabled:b,prevText:g,nextText:m}}),Ae(()=>{const _=rp.filterProps(e),T=!!(n.header||e.items.length),x=e.items.length>0,C=!e.hideActions&&!!(x||n.actions);return h(rp,he(_,{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 I,S;return[T&&h(Lw,{key:"stepper-header"},{default:()=>[y.value.map((E,O)=>{let{raw:R,...A}=E;return h(Pe,null,[!!O&&h(cn,null,null),h(ih,A,{default:n[`header-item.${A.value}`]??n.header,icon:n.icon,title:n.title,subtitle:n.subtitle})])})]}),x&&h(gO,{key:"stepper-window"},{default:()=>[y.value.map(E=>h(oh,{value:E.value},{default:()=>{var O,R;return((O=n[`item.${E.value}`])==null?void 0:O.call(n,E))??((R=n.item)==null?void 0:R.call(n,E))}}))]}),(I=n.default)==null?void 0:I.call(n,{prev:i,next:s}),C&&(((S=n.actions)==null?void 0:S.call(n,{next:s,prev:i}))??h(o7,{key:"stepper-actions","onClick:prev":i,"onClick:next":s},n))]}})}),{prev:i,next:s}}}),w7={class:"my-3"},S7={key:0},_7={key:1},k7={class:"my-2"},x7={key:0},E7={class:"mr-4"},C7={class:"mr-4"},T7={class:"mr-4"},P7={class:"my-3"},R7={key:0,class:"mb-5 mt-10"},I7={key:1},A7={class:"ml-5 mt-2"},O7={key:0,class:"ml-5 mt-2"},M7=$e({__name:"OctoFarmImportDialog",setup(e){const t=U(),n=U(!1),r=U(!1),s=U(""),i=U(""),o=U(),a=U(0),l=U([]),u=U([]),c=U(!1),d=tn(nn.ImportOctoFarmDialog);function f(){}async function p(){}const g=async()=>{if(!o.value){n.value=!1;return}const T=JSON.parse(await o.value.text());if(!T||!Array.isArray(T))return[];if(!(T!=null&&T.length))return[];let x=T;T.length===1&&Array.isArray(T[0])&&(x=T[0]),x=x.map(S=>{var E,O;return S._id&&delete S._id,S.apikey&&(S.apiKey=S.apikey,delete S.apikey),S.settingsApperance&&(S.settingsAppearance=S.settingsApperance,delete S.settingsApperance),(E=S.settingsAppearance)!=null&&E.name?(S.name=(O=S.settingsAppearance)==null?void 0:O.name,delete S.settingsAppearance):S.name=S.printerURL,{enabled:!S.disabled,apiKey:S.apiKey,printerURL:S.printerURL,name:S.name}});let C=!1;const I=[];s.value="",i.value="";for(const S of x){const E=Object.keys(S);E.includes("enabled")&&(S.enabled===!1||S.enabled===!0)&&E.includes("apiKey")&&S.apiKey.length&&E.includes("printerURL")&&S.printerURL.length&&E.includes("name")&&S.name||(I.push(S.name||S.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: "+I.join(", ")),x},m=async()=>{const T=await g();T!=null&&T.length&&(u.value=[...Array(T.length)].map((x,C)=>C),l.value=T||[],t.value=2)},y=()=>{u.value.length?u.value=[]:u.value=[...Array(l.value.length)].map((x,C)=>C)},w=async()=>{var T;a.value=((T=await g())==null?void 0:T.length)||0},b=async()=>{t.value=3;const T=l.value.filter((x,C)=>u.value.includes(C));if(T!=null&&T.length)try{await Xt.batchImportPrinters(T),c.value=!0}catch(x){c.value=!1,o.value=void 0,s.value="An error occurred",i.value=x.message.toString()}},_=()=>{o.value=void 0,d.closeDialog(),t.value=1};return(T,x)=>{const C=In("v-subheader"),I=In("v-list-item-content"),S=In("v-list-item-group"),E=hi;return $(),te(E,{id:Z(d).dialogId,"max-width":"700px",onBeforeOpened:x[8]||(x[8]=O=>void 0),onEscape:x[9]||(x[9]=O=>_()),onOpened:x[10]||(x[10]=O=>p())},{default:v(()=>[h(gt,{class:"pa-4"},{default:v(()=>[h(sn,null,{default:v(()=>x[11]||(x[11]=[M("span",{class:"text-h5"}," Import OctoFarm Printers ",-1)])),_:1}),h(en,null,{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:"12"},{default:v(()=>[h(bO,{modelValue:Z(t),"onUpdate:modelValue":x[6]||(x[6]=O=>Je(t)?t.value=O:null),"non-linear":""},{default:v(()=>[h(Lw,null,{default:v(()=>[h(ih,{complete:Z(t)>1,value:"1",editable:""},{default:v(()=>x[12]||(x[12]=[k(" Export PrintersDB from OctoFarm ")])),_:1},8,["complete"]),h(ih,{complete:Z(t)>2,value:"2",editable:""},{default:v(()=>x[13]||(x[13]=[k(" Show printers & decide ")])),_:1},8,["complete"]),h(ih,{complete:Z(t)>3,value:"3",editable:""},{default:v(()=>x[14]||(x[14]=[k(" Import printers into FDM Monster ")])),_:1},8,["complete"])]),_:1}),h(gO,null,{default:v(()=>[h(oh,{value:"1"},{default:v(()=>[h(lO,{class:"mt-2",style:{"max-width":"400px"},modelValue:Z(o),"onUpdate:modelValue":x[0]||(x[0]=O=>Je(o)?o.value=O:null),filled:"",accept:".json",clearable:"",label:"Upload PrintersDB.json file",onChange:x[1]||(x[1]=O=>w())},null,8,["modelValue"]),M("ol",null,[M("li",null,[M("h4",null,[h(J,null,{default:v(()=>x[15]||(x[15]=[k("navigation")])),_:1}),x[16]||(x[16]=k(" Go to your OctoFarm System page "))])]),M("li",null,[M("h4",null,[h(J,null,{default:v(()=>x[17]||(x[17]=[k("mouse")])),_:1}),x[18]||(x[18]=k(" Click 'Database' "))])]),M("li",null,[M("h4",null,[h(J,null,{default:v(()=>x[19]||(x[19]=[k("mouse")])),_:1}),x[20]||(x[20]=k(" Click the button 'Export Printers' "))])]),M("li",null,[M("h4",null,[h(J,null,{default:v(()=>x[21]||(x[21]=[k("upload")])),_:1}),x[22]||(x[22]=k(" Upload 'PrintersDB.json' above "))])])]),M("div",w7,[h(J,{class:"pr-2"},{default:v(()=>x[23]||(x[23]=[k("info")])),_:1}),x[25]||(x[25]=k(' 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:x[2]||(x[2]=O=>r.value=!Z(r))},{default:v(()=>[h(J,{class:"pr-2"},{default:v(()=>x[24]||(x[24]=[k("gif")])),_:1}),Z(r)?($(),me("span",_7,"Hide GIF")):($(),me("span",S7,"Show GIF"))]),_:1})]),Z(r)?($(),te(us,{key:0,class:"my-4",src:Z(i7),style:{border:"3px solid dimgray","max-width":"800px"},elevation:"10"},null,8,["src"])):fe("",!0),x[27]||(x[27]=M("br",null,null,-1)),h(se,{color:"primary",onClick:x[3]||(x[3]=O=>m()),disabled:!Z(o)},{default:v(()=>x[26]||(x[26]=[k(" Validate ")])),_:1},8,["disabled"])]),_:1}),h(oh,{value:"2"},{default:v(()=>{var O;return[M("div",k7,[h(J,{class:"pr-2"},{default:v(()=>x[28]||(x[28]=[k("info")])),_:1}),k(" Import state: "+re(Z(n)?"success":"failed")+" - "+re(Z(a))+" printer(s) found ",1)]),Z(s)?($(),te(dn,{key:0,class:"my-2",type:"error"},{default:v(()=>{var R,A;return[k(re(Z(s))+" ",1),x[29]||(x[29]=M("br",null,null,-1)),k(" Details: "+re((R=Z(i))==null?void 0:R.slice(0,75))+" ",1),((A=Z(i))==null?void 0:A.length)>75?($(),me("span",x7,"...")):fe("",!0)]}),_:1})):fe("",!0),h(cn,{class:"mt-2"}),h(Vt,{"two-line":"",flat:"",subheader:"",dense:"",class:"mt-2"},{default:v(()=>[h(C,null,{default:v(()=>x[30]||(x[30]=[k("Found printers")])),_:1}),h(S,{modelValue:Z(u),"onUpdate:modelValue":x[4]||(x[4]=R=>Je(u)?u.value=R:null),multiple:""},{default:v(()=>[($(!0),me(Pe,null,Wt(Z(l),R=>($(),te(Ve,{dense:"",key:R.name,title:R.name},{default:v(({isActive:A})=>[h(hu,null,{default:v(()=>[h(yn,{"input-value":A},null,8,["input-value"])]),_:2},1024),h(I,null,{default:v(()=>[h(dt,null,{default:v(()=>[k(re(R.name),1)]),_:2},1024),h(yt,null,{default:v(()=>[M("span",E7,"URL: "+re(R.printerURL),1),M("span",C7,"Enabled: "+re(R.enabled),1),M("span",T7,"API Key: "+re(R.apiKey),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["title"]))),128))]),_:1},8,["modelValue"]),h(C,null,{default:v(()=>[h(se,{onClick:y,class:"my-2",small:""},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>x[31]||(x[31]=[k("check")])),_:1}),x[32]||(x[32]=k(" Toggle selection "))]),_:1})]),_:1})]),_:1}),M("div",P7,[h(J,{class:"pr-2"},{default:v(()=>x[33]||(x[33]=[k("info")])),_:1}),x[34]||(x[34]=k(" At this moment, the following properties will be imported: enabled, name, printerURL and apiKey "))]),h(se,{class:"my-2",color:"primary",onClick:x[5]||(x[5]=R=>b()),disabled:!((O=Z(u))!=null&&O.length)},{default:v(()=>{var R;return[k(" Submit "+re((R=Z(u))==null?void 0:R.length)+" printers ",1)]}),_:1},8,["disabled"])]}),_:1}),h(oh,{value:"3"},{default:v(()=>{var O,R;return[Z(c)?($(),me("div",R7,[h(J,{size:"100",class:"mr-5",color:"green circle"},{default:v(()=>x[35]||(x[35]=[k("check_circle")])),_:1}),x[36]||(x[36]=k(" Import Completed "))])):($(),me("div",I7,[h(J,{size:"100",class:"mr-5",color:"red circle"},{default:v(()=>x[37]||(x[37]=[k("error")])),_:1}),k(" Something went wrong: "+re(Z(s))+" ",1),x[38]||(x[38]=M("br",null,null,-1)),M("span",A7," Details: "+re((O=Z(i))==null?void 0:O.slice(0,75)),1),((R=Z(i))==null?void 0:R.length)>75?($(),me("span",O7,"...")):fe("",!0)]))]}),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),h(se,{class:"mt-2"},{default:v(()=>x[39]||(x[39]=[k(" Validate printers ")])),_:1})]),_:1}),h(Mn,null,{default:v(()=>[h(wn),h(se,{onClick:x[7]||(x[7]=O=>_())},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>x[40]||(x[40]=[k("close")])),_:1}),x[41]||(x[41]=k(" Close "))]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),D7=ue({id:String,submenu:Boolean,...Os(Rd({closeDelay:250,closeOnContentClick:!0,locationStrategy:"connected",location:void 0,openDelay:300,scrim:!1,scrollStrategy:"reposition",transition:{component:Bb}}),["absolute"])},"VMenu"),bm=_e()({name:"VMenu",props:D7(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=st(e,"modelValue"),{scopeId:s}=Ru(),{isRtl:i}=Or(),o=hs(),a=P(()=>e.id||`v-menu-${o}`),l=U(),u=Xe(Fv,null),c=Ie(new Set);Gt(Fv,{register(){c.value.add(o)},unregister(){c.value.delete(o)},closeParents(y){setTimeout(()=>{var w;!c.value.size&&!e.persistent&&(y==null||(w=l.value)!=null&&w.contentEl&&!AF(y,l.value.contentEl))&&(r.value=!1,u==null||u.closeParents())},40)}}),En(()=>{u==null||u.unregister(),document.removeEventListener("focusin",d)}),wb(()=>r.value=!1);async function d(y){var _,T,x;const w=y.relatedTarget,b=y.target;await Mt(),r.value&&w!==b&&((_=l.value)!=null&&_.contentEl)&&((T=l.value)!=null&&T.globalTop)&&![document,l.value.contentEl].includes(b)&&!l.value.contentEl.contains(b)&&((x=jc(l.value.contentEl)[0])==null||x.focus())}ke(r,y=>{y?(u==null||u.register(),Et&&document.addEventListener("focusin",d,{once:!0})):(u==null||u.unregister(),Et&&document.removeEventListener("focusin",d))},{immediate:!0});function f(y){u==null||u.closeParents(y)}function p(y){var w,b,_,T,x;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(),_T(jc((w=l.value)==null?void 0:w.contentEl,!1),y.shiftKey?"prev":"next",I=>I.tabIndex>=0)||(r.value=!1,(_=(b=l.value)==null?void 0:b.activatorEl)==null||_.focus())}else e.submenu&&y.key===(i.value?"ArrowRight":"ArrowLeft")&&(r.value=!1,(x=(T=l.value)==null?void 0:T.activatorEl)==null||x.focus())}function g(y){var b;if(e.disabled)return;const w=(b=l.value)==null?void 0:b.contentEl;w&&r.value?y.key==="ArrowDown"?(y.preventDefault(),y.stopImmediatePropagation(),Ec(w,"next")):y.key==="ArrowUp"?(y.preventDefault(),y.stopImmediatePropagation(),Ec(w,"prev")):e.submenu&&(y.key===(i.value?"ArrowRight":"ArrowLeft")?r.value=!1:y.key===(i.value?"ArrowLeft":"ArrowRight")&&(y.preventDefault(),Ec(w,"first"))):(e.submenu?y.key===(i.value?"ArrowLeft":"ArrowRight"):["ArrowDown","ArrowUp"].includes(y.key))&&(r.value=!0,y.preventDefault(),setTimeout(()=>setTimeout(()=>g(y))))}const m=P(()=>he({"aria-haspopup":"menu","aria-expanded":String(r.value),"aria-controls":a.value,onKeydown:g},e.activatorProps));return Ae(()=>{const y=Fi.filterProps(e);return h(Fi,he({ref:l,id:a.value,class:["v-menu",e.class],style:e.style},y,{modelValue:r.value,"onUpdate:modelValue":w=>r.value=w,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 w=arguments.length,b=new Array(w),_=0;_<w;_++)b[_]=arguments[_];return h(Ot,{root:"VMenu"},{default:()=>{var T;return[(T=n.default)==null?void 0:T.call(n,...b)]}})}})}),Ki({id:a,ΨopenChildren:c},l)}}),$7=ue({renderless:Boolean,...Ue()},"VVirtualScrollItem"),L7=_e()({name:"VVirtualScrollItem",inheritAttrs:!1,props:$7(),emits:{"update:height":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{resizeRef:i,contentRect:o}=Va(void 0,"border");ke(()=>{var a;return(a=o.value)==null?void 0:a.height},a=>{a!=null&&r("update:height",a)}),Ae(()=>{var a,l;return e.renderless?h(Pe,null,[(a=s.default)==null?void 0:a.call(s,{itemRef:i})]):h("div",he({ref:i,class:["v-virtual-scroll__item",e.class],style:e.style},n),[(l=s.default)==null?void 0:l.call(s)])})}}),F7=-1,N7=1,Og=100,B7=ue({itemHeight:{type:[Number,String],default:null},itemKey:{type:[String,Array,Function],default:null},height:[Number,String]},"virtual");function V7(e,t){const n=fi(),r=Ie(0);On(()=>{r.value=parseFloat(e.itemHeight||0)});const s=Ie(0),i=Ie(Math.ceil((parseInt(e.height)||n.height.value)/(r.value||16))||1),o=Ie(0),a=Ie(0),l=U(),u=U();let c=0;const{resizeRef:d,contentRect:f}=Va();On(()=>{d.value=l.value});const p=P(()=>{var B;return l.value===document.documentElement?n.height.value:((B=f.value)==null?void 0:B.height)||parseInt(e.height)||0}),g=P(()=>!!(l.value&&u.value&&p.value&&r.value));let m=Array.from({length:t.value.length}),y=Array.from({length:t.value.length});const w=Ie(0);let b=-1;function _(B){return m[B]||r.value}const T=TF(()=>{const B=performance.now();y[0]=0;const ne=t.value.length;for(let q=1;q<=ne-1;q++)y[q]=(y[q-1]||0)+_(q-1);w.value=Math.max(w.value,performance.now()-B)},w),x=ke(g,B=>{B&&(x(),c=u.value.offsetTop,T.immediate(),z(),~b&&Mt(()=>{Et&&window.requestAnimationFrame(()=>{G(b),b=-1})}))});gn(()=>{T.clear()});function C(B,ne){const q=m[B],Y=r.value;r.value=Y?Math.min(r.value,ne):ne,(q!==ne||Y!==r.value)&&(m[B]=ne,T())}function I(B){return B=Er(B,0,t.value.length-1),y[B]||0}function S(B){return U7(y,B)}let E=0,O=0,R=0;ke(p,(B,ne)=>{ne&&(z(),B<ne&&requestAnimationFrame(()=>{O=0,z()}))});let A=-1;function D(){if(!l.value||!u.value)return;const B=l.value.scrollTop,ne=performance.now();ne-R>500?(O=Math.sign(B-E),c=u.value.offsetTop):O=B-E,E=B,R=ne,window.clearTimeout(A),A=window.setTimeout(L,500),z()}function L(){!l.value||!u.value||(O=0,R=0,window.clearTimeout(A),z())}let W=-1;function z(){cancelAnimationFrame(W),W=requestAnimationFrame(K)}function K(){if(!l.value||!p.value)return;const B=E-c,ne=Math.sign(O),q=Math.max(0,B-Og),Y=Er(S(q),0,t.value.length),oe=B+p.value+Og,ie=Er(S(oe)+1,Y+1,t.value.length);if((ne!==F7||Y<s.value)&&(ne!==N7||ie>i.value)){const be=I(s.value)-I(Y),Q=I(ie)-I(i.value);Math.max(be,Q)>Og?(s.value=Y,i.value=ie):(Y<=0&&(s.value=Y),ie>=t.value.length&&(i.value=ie))}o.value=I(s.value),a.value=I(t.value.length)-I(i.value)}function G(B){const ne=I(B);!l.value||B&&!ne?b=B:l.value.scrollTop=ne}const H=P(()=>t.value.slice(s.value,i.value).map((B,ne)=>{const q=ne+s.value;return{raw:B,index:q,key:Fn(B,e.itemKey,q)}}));return ke(t,()=>{m=Array.from({length:t.value.length}),y=Array.from({length:t.value.length}),T.immediate(),z()},{deep:1}),{calculateVisibleItems:z,containerRef:l,markerRef:u,computedItems:H,paddingTop:o,paddingBottom:a,scrollToIndex:G,handleScroll:D,handleScrollend:L,handleItemResize:C}}function U7(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 z7=ue({items:{type:Array,default:()=>[]},renderless:Boolean,...B7(),...Ue(),...Ir()},"VVirtualScroll"),H7=_e()({name:"VVirtualScroll",props:z7(),setup(e,t){let{slots:n}=t;const r=an("VVirtualScroll"),{dimensionStyles:s}=Ar(e),{calculateVisibleItems:i,containerRef:o,markerRef:a,handleScroll:l,handleScrollend:u,handleItemResize:c,scrollToIndex:d,paddingTop:f,paddingBottom:p,computedItems:g}=V7(e,Te(e,"items"));return Ur(()=>e.renderless,()=>{function m(){var b,_;const w=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)?"addEventListener":"removeEventListener";o.value===document.documentElement?(document[w]("scroll",l,{passive:!0}),document[w]("scrollend",u)):((b=o.value)==null||b[w]("scroll",l,{passive:!0}),(_=o.value)==null||_[w]("scrollend",u))}_t(()=>{o.value=MT(r.vnode.el,!0),m(!0)}),gn(m)}),Ae(()=>{const m=g.value.map(y=>h(L7,{key:y.key,renderless:e.renderless,"onUpdate:height":w=>c(y.index,w)},{default:w=>{var b;return(b=n.default)==null?void 0:b.call(n,{item:y.raw,index:y.index,...w})}}));return e.renderless?h(Pe,null,[h("div",{ref:a,class:"v-virtual-scroll__spacer",style:{paddingTop:Fe(f.value)}},null),m,h("div",{class:"v-virtual-scroll__spacer",style:{paddingBottom:Fe(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:Fe(f.value),paddingBottom:Fe(p.value)}},[m])])}),{calculateVisibleItems:i,scrollToIndex:d}}});function j7(e,t){const n=Ie(!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 q7=ue({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:He,default:"$dropdown"},menuProps:{type:Object},multiple:Boolean,noDataText:{type:String,default:"$vuetify.noDataText"},openOnClear:Boolean,itemColor:String,...BA({itemChildren:!1})},"Select"),W7=ue({...q7(),...Os(iO({modelValue:null,role:"combobox"}),["validationValue","dirty","appendInnerIcon"]),...Iu({transition:{component:Bb}})},"VSelect"),Do=_e()({name:"VSelect",props:W7(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:menu":e=>!0},setup(e,t){let{slots:n}=t;const{t:r}=Wr(),s=U(),i=U(),o=U(),{items:a,transformIn:l,transformOut:u}=d6(e),c=st(e,"modelValue",[],H=>l(H===null?[null]:An(H)),H=>{const B=u(H);return e.multiple?B:B[0]??null}),d=P(()=>typeof e.counterValue=="function"?e.counterValue(c.value):typeof e.counterValue=="number"?e.counterValue:c.value.length),f=sO(e),p=P(()=>c.value.map(H=>H.value)),g=Ie(!1);let m="",y;const w=P(()=>e.hideSelected?a.value.filter(H=>!c.value.some(B=>(e.valueComparator||Ps)(B,H))):a.value),b=P(()=>e.hideNoData&&!w.value.length||f.isReadonly.value||f.isDisabled.value),_=st(e,"menu"),T=P({get:()=>_.value,set:H=>{var B;_.value&&!H&&((B=i.value)!=null&&B.ΨopenChildren.size)||H&&b.value||(_.value=H)}}),x=P(()=>T.value?e.closeText:e.openText),C=P(()=>{var H;return{...e.menuProps,activatorProps:{...((H=e.menuProps)==null?void 0:H.activatorProps)||{},"aria-haspopup":"listbox"}}}),I=U(),S=j7(I,s);function E(H){e.openOnClear&&(T.value=!0)}function O(){b.value||(T.value=!T.value)}function R(H){x_(H)&&A(H)}function A(H){var Y,oe;if(!H.key||f.isReadonly.value)return;["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(H.key)&&H.preventDefault(),["Enter","ArrowDown"," "].includes(H.key)&&(T.value=!0),["Escape","Tab"].includes(H.key)&&(T.value=!1),H.key==="Home"?(Y=I.value)==null||Y.focus("first"):H.key==="End"&&((oe=I.value)==null||oe.focus("last"));const B=1e3;if(!x_(H))return;const ne=performance.now();ne-y>B&&(m=""),m+=H.key.toLowerCase(),y=ne;const q=a.value.find(ie=>ie.title.toLowerCase().startsWith(m));if(q!==void 0){c.value=[q];const ie=w.value.indexOf(q);Et&&window.requestAnimationFrame(()=>{var be;ie>=0&&((be=o.value)==null||be.scrollToIndex(ie))})}}function D(H){let B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!H.props.disabled)if(e.multiple){const ne=c.value.findIndex(Y=>(e.valueComparator||Ps)(Y.value,H.value)),q=B??!~ne;if(~ne){const Y=q?[...c.value,H]:[...c.value];Y.splice(ne,1),c.value=Y}else q&&(c.value=[...c.value,H])}else{const ne=B!==!1;c.value=ne?[H]:[],Mt(()=>{T.value=!1})}}function L(H){var B;(B=I.value)!=null&&B.$el.contains(H.relatedTarget)||(T.value=!1)}function W(){var H;e.eager&&((H=o.value)==null||H.calculateVisibleItems())}function z(){var H;g.value&&((H=s.value)==null||H.focus())}function K(H){g.value=!0}function G(H){if(H==null)c.value=[];else if(Rh(s.value,":autofill")||Rh(s.value,":-webkit-autofill")){const B=a.value.find(ne=>ne.title===H);B&&D(B)}else s.value&&(s.value.value="")}return ke(T,()=>{if(!e.hideSelected&&T.value&&c.value.length){const H=w.value.findIndex(B=>c.value.some(ne=>(e.valueComparator||Ps)(ne.value,B.value)));Et&&window.requestAnimationFrame(()=>{var B;H>=0&&((B=o.value)==null||B.scrollToIndex(H))})}}),ke(()=>e.items,(H,B)=>{T.value||g.value&&!B.length&&H.length&&(T.value=!0)}),Ae(()=>{const H=!!(e.chips||n.chip),B=!!(!e.hideNoData||w.value.length||n["prepend-item"]||n["append-item"]||n["no-data"]),ne=c.value.length>0,q=ut.filterProps(e),Y=ne||!g.value&&e.label&&!e.persistentPlaceholder?void 0:e.placeholder;return h(ut,he({ref:s},q,{modelValue:c.value.map(oe=>oe.props.value).join(", "),"onUpdate:modelValue":G,focused:g.value,"onUpdate:focused":oe=>g.value=oe,validationValue:c.externalValue,counterValue:d.value,dirty:ne,class:["v-select",{"v-select--active-menu":T.value,"v-select--chips":!!e.chips,[`v-select--${e.multiple?"multiple":"single"}`]:!0,"v-select--selected":c.value.length,"v-select--selection-slot":!!n.selection},e.class],style:e.style,inputmode:"none",placeholder:Y,"onClick:clear":E,"onMousedown:control":O,onBlur:L,onKeydown:A,"aria-label":r(x.value),title:r(x.value)}),{...n,default:()=>h(Pe,null,[h(bm,he({ref:i,modelValue:T.value,"onUpdate:modelValue":oe=>T.value=oe,activator:"parent",contentClass:"v-select__content",disabled:b.value,eager:e.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:e.transition,onAfterEnter:W,onAfterLeave:z},C.value),{default:()=>[B&&h(Vt,he({ref:I,selected:p.value,selectStrategy:e.multiple?"independent":"single-independent",onMousedown:oe=>oe.preventDefault(),onKeydown:R,onFocusin:K,tabindex:"-1","aria-live":"polite",color:e.itemColor??e.color},S,e.listProps),{default:()=>{var oe,ie,be;return[(oe=n["prepend-item"])==null?void 0:oe.call(n),!w.value.length&&!e.hideNoData&&(((ie=n["no-data"])==null?void 0:ie.call(n))??h(Ve,{key:"no-data",title:r(e.noDataText)},null)),h(H7,{ref:o,renderless:!0,items:w.value,itemKey:"value"},{default:Q=>{var Ne;let{item:X,index:V,itemRef:ge}=Q;const Oe=he(X.props,{ref:ge,key:X.value,onClick:()=>D(X,null)});return((Ne=n.item)==null?void 0:Ne.call(n,{item:X,index:V,props:Oe}))??h(Ve,he(Oe,{role:"option"}),{prepend:N=>{let{isSelected:F}=N;return h(Pe,null,[e.multiple&&!e.hideSelected?h(mu,{key:X.value,modelValue:F,ripple:!1,tabindex:"-1"},null):void 0,X.props.prependAvatar&&h(lt,{image:X.props.prependAvatar},null),X.props.prependIcon&&h(J,{icon:X.props.prependIcon},null)])}})}}),(be=n["append-item"])==null?void 0:be.call(n)]}})]}),c.value.map((oe,ie)=>{function be(ge){ge.stopPropagation(),ge.preventDefault(),D(oe,!1)}const Q={"onClick:close":be,onKeydown(ge){ge.key!=="Enter"&&ge.key!==" "||(ge.preventDefault(),ge.stopPropagation(),be(ge))},onMousedown(ge){ge.preventDefault(),ge.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0},X=H?!!n.chip:!!n.selection,V=X?kT(H?n.chip({item:oe,index:ie,props:Q}):n.selection({item:oe,index:ie})):void 0;if(!(X&&!V))return h("div",{key:oe.value,class:"v-select__selection"},[H?n.chip?h(Ot,{key:"chip-defaults",defaults:{VChip:{closable:e.closableChips,size:"small",text:oe.title}}},{default:()=>[V]}):h(Sn,he({key:"chip",closable:e.closableChips,size:"small",text:oe.title,disabled:oe.props.disabled},Q),null):V??h("span",{class:"v-select__selection-text"},[oe.title,e.multiple&&ie<c.value.length-1&&h("span",{class:"v-select__selection-comma"},[k(",")])])])})]),"append-inner":function(){var Q,X;for(var oe=arguments.length,ie=new Array(oe),be=0;be<oe;be++)ie[be]=arguments[be];return h(Pe,null,[(Q=n["append-inner"])==null?void 0:Q.call(n,...ie),e.menuIcon?h(J,{class:"v-select__menu-icon",color:(X=s.value)==null?void 0:X.fieldIconColor,icon:e.menuIcon},null):void 0])}})}),Ki({isFocused:g,menu:T,select:D},s)}}),G7={class:"text-h5"},K7=$e({__name:"PrinterMaintenanceDialog",setup(e){const t=U([]),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=U({}),s=Ft(),i=tn(nn.PrinterMaintenanceDialog),o=P(()=>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 Xt.updatePrinterMaintenance(c,d),r.value={},u()},u=()=>{t.value=[],i.closeDialog(),s.setMaintenanceDialogPrinter()};return(c,d)=>{const f=hi;return $(),te(f,{id:Z(i).dialogId,"max-width":"700px",onEscape:d[5]||(d[5]=p=>u())},{default:v(()=>[h(gt,{class:"pa-4"},{default:v(()=>[h(sn,null,{default:v(()=>{var p;return[M("span",G7," Mark '"+re((p=o.value)==null?void 0:p.name)+"' for maintenance ",1)]}),_:1}),h(dn,{color:"secondary"},{default:v(()=>d[6]||(d[6]=[k(" Keep this info clear and stick to convention ")])),_:1}),h(en,null,{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:"12"},{default:v(()=>[h(Do,{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(cO,{modelValue:r.value.disabledReason,"onUpdate:modelValue":d[2]||(d[2]=p=>r.value.disabledReason=p),"data-vv-validate-on":"change|blur"},{label:v(()=>d[7]||(d[7]=[M("div",null,"Type the reason*",-1)])),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(Mn,null,{default:v(()=>[d[10]||(d[10]=M("em",{class:"text-red"}," * indicates required field ",-1)),h(wn),h(se,{variant:"text",onClick:d[3]||(d[3]=p=>u())},{default:v(()=>d[8]||(d[8]=[k(" Close ")])),_:1}),h(se,{color:"blue-darken-1",variant:"text",onClick:d[4]||(d[4]=p=>l())},{default:v(()=>d[9]||(d[9]=[k(" Save ")])),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),Y7=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],X7=[1,2,3,4,5,6,7,8,9,10,11,12],wO=$e({__name:"GridSettingsList",setup(e){const t=Fs(),n=Dt(),r=P(()=>t.largeTiles),s=P(()=>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)=>($(),me("div",null,[h(en,null,{default:v(()=>[h(Vt,{subheader:"",lines:"three"},{default:v(()=>{var d;return[h(jr,null,{default:v(()=>c[2]||(c[2]=[k(" Grid Rows and Columns ")])),_:1}),(d=Z(t).settings)!=null&&d.frontend?($(),te(Ve,{key:0},{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:"3"},{default:v(()=>[h(Do,{type:"number","onUpdate:modelValue":o,value:Z(t).settings.frontend.gridRows,items:Z(Y7),label:"Set the grid rows"},null,8,["value","items"])]),_:1}),h(ze,{cols:"3"},{default:v(()=>[h(Do,{type:"number","onUpdate:modelValue":i,value:Z(t).settings.frontend.gridCols,items:Z(X7),label:"Set the grid columns"},null,8,["value","items"])]),_:1})]),_:1})]),_:1})):fe("",!0)]}),_:1}),h(cn),h(Vt,{subheader:"",lines:"three"},{default:v(()=>[h(jr,null,{default:v(()=>c[3]||(c[3]=[k(" Large or Compact Tiles ")])),_:1}),h(Ve,null,{default:v(()=>{var d;return[(d=Z(t).settings)!=null&&d.frontend?($(),te(rt,{key:0},{default:v(()=>[h(ze,{cols:"5"},{default:v(()=>[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})):fe("",!0)]}),_:1})]),_:1}),h(cn),h(Vt,{subheader:"","three-line":""},{default:v(()=>[h(jr,null,{default:v(()=>c[4]||(c[4]=[k("Large or Compact Tiles")])),_:1}),h(Ve,null,{default:v(()=>{var d;return[(d=Z(t).settings)!=null&&d.frontend?($(),te(rt,{key:0},{default:v(()=>[h(ze,{cols:"5"},{default:v(()=>[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})):fe("",!0)]}),_:1})]),_:1})]),_:1})]))}}),Q7={class:"text-h5"},J7=$e({__name:"GridSettingsDialog",setup(e){const t=tn(nn.GridSettingsDialog);function n(){t.closeDialog(t.context())}return(r,s)=>{const i=hi;return $(),te(i,{id:Z(t).dialogId,"max-width":"1000px",onEscape:s[1]||(s[1]=o=>n())},{default:v(()=>[h(gt,{class:"pa-4"},{default:v(()=>[h(sn,null,{default:v(()=>[M("span",Q7,[s[4]||(s[4]=k(" Grid Settings ")),h(nt,{top:""},{activator:v(({props:o})=>[h(se,he(o,{class:"ma-2",fab:"","x-small":""}),{default:v(()=>[h(J,null,{default:v(()=>s[2]||(s[2]=[k("question_mark")])),_:1})]),_:2},1040)]),default:v(()=>s[3]||(s[3]=[k(" Change your grid rows, columns and tile settings. ")])),_:1})])]),_:1}),h(wO),h(Mn,null,{default:v(()=>[h(wn),h(se,{onClick:s[0]||(s[0]=o=>Z(t).closeDialog())},{default:v(()=>s[5]||(s[5]=[k("Close")])),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}});class es extends mr{static async createUser(t){const n=De.userRoute;return await this.post(n,t)}static async listUsers(){const t=De.userRoute;return await this.get(t)}static async listRoles(){const t=De.rolesRoute;return await this.get(t)}static async getProfile(){const t=De.userProfileRoute;return await this.get(t)}static async changePassword(t,n,r){const s=De.userChangePasswordRoute(t);return await this.post(s,{oldPassword:n,newPassword:r})}static async changeUsername(t,n){const r=De.userChangeUsernameRoute(t);return await this.post(r,{username:n})}static async deleteUser(t){const n=De.userDeleteRoute(t);return await this.delete(n)}static async setUserVerified(t,n){const r=De.userSetVerifiedRoute(t);return await this.post(r,{isVerified:n})}static async setRootUser(t,n){const r=De.userSetRootUserRoute(t);return await this.post(r,{isRootUser:n})}static async setUserRoles(t,n){const r=De.userSetUserRolesRoute(t);return await this.post(r,{roleIds:n})}}const Z7={class:"text-h5"},eK={class:"pl-5"},tK=$e({__name:"CreateUserDialog",setup(e){const t=tn(nn.CreateUserDialog),n=Xe("appConstants"),r=Dt(),s=U({username:"",password:"",roleIds:[]}),i=U(""),o=U([]),a=P(()=>{var f,p;return(p=(f=s.value)==null?void 0:f.username)!=null&&p.length?fm(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 es.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 _t(async()=>{try{o.value=await es.listRoles()}catch(f){r.openErrorMessage({title:"Failed to load roles",subtitle:f instanceof Error?f.message:"Unknown error"})}}),(f,p)=>{const g=hi;return $(),te(g,{id:Z(t).dialogId,"max-width":"700px",onEscape:d},{default:v(()=>[h(gt,{class:"pa-4"},{default:v(()=>[h(sn,null,{default:v(()=>[M("span",Z7,[h(lt,{color:"primary",size:"56"},{default:v(()=>[k(re(a.value),1)]),_:1}),M("span",eK,[p[6]||(p[6]=k("New verified User ")),h(nt,{top:""},{activator:v(({props:m})=>[h(se,he({class:"ma-2",fab:""},m,{"x-small":""}),{default:v(()=>[h(J,null,{default:v(()=>p[4]||(p[4]=[k("question_mark")])),_:1})]),_:2},1040)]),default:v(()=>p[5]||(p[5]=[k(" 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:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:12},{default:v(()=>[h(Vn,null,{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:"12",md:"6"},{default:v(()=>[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(Do,{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(Mn,null,{default:v(()=>[p[9]||(p[9]=M("em",{class:"text-red"}," * indicates required field ",-1)),h(wn),h(se,{variant:"text",onClick:d},{default:v(()=>p[7]||(p[7]=[k("Close")])),_:1}),h(se,{color:"blue-darken-1",variant:"text",onClick:c},{default:v(()=>p[8]||(p[8]=[k("Create")])),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),SO=()=>({id:void 0,name:Vu(),floor:"1",printers:[]});class ts extends mr{static convertPrinterFloorToCreateForm(t){const n=SO();return n.id=t==null?void 0:t.id,n.name=(t==null?void 0:t.name)||Vu(),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=`${De.floorRoute}/`;return await this.get(t)}static async createFloor(t){const n=`${De.floorRoute}/`;return await this.post(n,t)}static async updateFloorName(t,n){const r=`${De.updatePrinterFloorNameRoute(t)}/`;return await this.patch(r,{name:n})}static async updateFloorNumber(t,n){const r=`${De.updatePrinterFloorNumberRoute(t)}/`;return await this.patch(r,{floor:n})}static async deleteFloor(t){const n=`${De.getFloorRoute(t)}/`;return await this.delete(n)}static async addPrinterToFloor(t,n){const r=`${De.addOrRemovePrinterFromFloorRoute(t)}/`;return await this.post(r,n)}static async deletePrinterFromFloor(t,n){const r=`${De.addOrRemovePrinterFromFloorRoute(t)}/`;return await this.delete(r,{printerId:n})}}const Xi=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 Ft().printers.filter(n=>!e.floors.find(r=>r.printers.find(s=>s.printerId===n.id)))},gridSortedPrinters(){const e=Fs(),t=e.gridCols,n=e.gridRows,s=Ft().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 ts.getFloors();return this.saveFloors(e),e},async createFloor(e){const t=await ts.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 ts.deleteFloor(e),this._popPrinterFloor(e)},async updateFloorName({floorId:e,name:t}){const n=await ts.updateFloorName(e,t);return this._replaceFloor(n),n},async updateFloorNumber({floorId:e,floorNumber:t}){const n=await ts.updateFloorNumber(e,t);return this._replaceFloor(n),n},async addPrinterToFloor({floorId:e,printerId:t,x:n,y:r}){const s=await ts.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 ts.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)}}}),nK={class:"text-h5"},rK=$e({__name:"AddOrUpdateFloorDialog",setup(e){const t=tn(nn.AddOrUpdateFloorDialog),n=Xi(),r=Xe("appConstants"),s=Dt(),i=U(SO()),o=P(()=>{var d;return(d=t.context())==null?void 0:d.printerFloorId}),a=P(()=>i.value?fm(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=ts.convertCreateFormToFloor(i.value);await n.createFloor(d),s.openInfoMessage({title:`Floor ${d.name} created`}),i.value.name=Vu();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=ts.convertPrinterFloorToCreateForm(f)}}),_t(()=>{var d;if(o.value){const f=n.floor(o.value);i.value=ts.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=hi;return $(),te(p,{id:Z(t).dialogId,"max-width":"700px",onEscape:c},{default:v(()=>[h(gt,null,{default:v(()=>[h(sn,null,{default:v(()=>[M("span",nK,[h(lt,{color:"primary",size:"56"},{default:v(()=>[k(re(a.value),1)]),_:1}),f[2]||(f[2]=k(" New Floor "))])]),_:1}),h(en,null,{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:12},{default:v(()=>[h(Vn,null,{default:v(()=>[h(rt,null,{default:v(()=>[i.value?($(),te(ze,{key:0,cols:"12",md:"6"},{default:v(()=>[h(ut,{modelValue:i.value.name,"onUpdate:modelValue":f[0]||(f[0]=g=>i.value.name=g),autofocus:"",label:"Floor name*",required:""},null,8,["modelValue"]),h(ut,{modelValue:i.value.floor,"onUpdate:modelValue":f[1]||(f[1]=g=>i.value.floor=g),label:"Floor number",required:"",type:"number"},null,8,["modelValue"])]),_:1})):fe("",!0)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),h(Mn,null,{default:v(()=>[f[5]||(f[5]=M("em",{class:"text-red"}," * indicates required field ",-1)),h(wn),h(se,{variant:"text",onClick:c},{default:v(()=>f[3]||(f[3]=[k("Close")])),_:1}),h(se,{color:"blue-darken-1",variant:"text",onClick:u},{default:v(()=>f[4]||(f[4]=[k("Create")])),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}});class sp extends mr{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 zu=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(){}},Ka=typeof window>"u"||"Deno"in globalThis;function Zr(){}function sK(e,t){return typeof e=="function"?e(t):e}function Py(e){return typeof e=="number"&&e>=0&&e!==1/0}function _O(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Fl(e,t){return typeof e=="function"?e(t):e}function xs(e,t){return typeof e=="function"?e(t):e}function lk(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Fw(o,t.options))return!1}else if(!ad(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 uk(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Ya(t.options.mutationKey)!==Ya(i))return!1}else if(!ad(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Fw(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ya)(e)}function Ya(e){return JSON.stringify(e,(t,n)=>Ry(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function ad(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ad(e[n],t[n])):!1}function kO(e,t){if(e===t)return e;const n=ck(e)&&ck(t);if(n||Ry(e)&&Ry(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]=kO(e[c],t[c]),a[c]===e[c]&&e[c]!==void 0&&l++)}return s===o&&l===s?e:a}return t}function ip(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 ck(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ry(e){if(!dk(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!dk(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function dk(e){return Object.prototype.toString.call(e)==="[object Object]"}function iK(e){return new Promise(t=>{setTimeout(t,e)})}function Iy(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?kO(e,t):t}function oK(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function aK(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Nw=Symbol();function xO(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Nw?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var ga,uo,Ul,PE,lK=(PE=class extends zu{constructor(){super();je(this,ga);je(this,uo);je(this,Ul);Me(this,Ul,t=>{if(!Ka&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){j(this,uo)||this.setEventListener(j(this,Ul))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,uo))==null||t.call(this),Me(this,uo,void 0))}setEventListener(t){var n;Me(this,Ul,t),(n=j(this,uo))==null||n.call(this),Me(this,uo,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){j(this,ga)!==t&&(Me(this,ga,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof j(this,ga)=="boolean"?j(this,ga):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ga=new WeakMap,uo=new WeakMap,Ul=new WeakMap,PE),Bw=new lK,zl,co,Hl,RE,uK=(RE=class extends zu{constructor(){super();je(this,zl,!0);je(this,co);je(this,Hl);Me(this,Hl,t=>{if(!Ka&&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,co)||this.setEventListener(j(this,Hl))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,co))==null||t.call(this),Me(this,co,void 0))}setEventListener(t){var n;Me(this,Hl,t),(n=j(this,co))==null||n.call(this),Me(this,co,t(this.setOnline.bind(this)))}setOnline(t){j(this,zl)!==t&&(Me(this,zl,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return j(this,zl)}},zl=new WeakMap,co=new WeakMap,Hl=new WeakMap,RE),op=new uK;function Ay(){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 cK(e){return Math.min(1e3*2**e,3e4)}function EO(e){return(e??"online")==="online"?op.isOnline():!0}var CO=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Mg(e){return e instanceof CO}function TO(e){let t=!1,n=0,r=!1,s;const i=Ay(),o=m=>{var y;r||(f(new CO(m)),(y=e.abort)==null||y.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>Bw.isFocused()&&(e.networkMode==="always"||op.isOnline())&&e.canRun(),c=()=>EO(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=w=>{(r||u())&&m(w)},(y=e.onPause)==null||y.call(e)}).then(()=>{var m;s=void 0,r||(m=e.onContinue)==null||m.call(e)}),g=()=>{if(r)return;let m;const y=n===0?e.initialPromise:void 0;try{m=y??e.fn()}catch(w){m=Promise.reject(w)}Promise.resolve(m).then(d).catch(w=>{var C;if(r)return;const b=e.retry??(Ka?0:3),_=e.retryDelay??cK,T=typeof _=="function"?_(n,w):_,x=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,w);if(t||!x){f(w);return}n++,(C=e.onFail)==null||C.call(e,n,w),iK(T).then(()=>u()?void 0:p()).then(()=>{t?f(w):g()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?g():p().then(g),i)}}var dK=e=>setTimeout(e,0);function fK(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=dK;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=fK(),va,IE,PO=(IE=class{constructor(){je(this,va)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Py(this.gcTime)&&Me(this,va,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ka?1/0:5*60*1e3))}clearGcTimeout(){j(this,va)&&(clearTimeout(j(this,va)),Me(this,va,void 0))}},va=new WeakMap,IE),jl,ql,Jr,ya,qn,md,ba,ws,Si,AE,hK=(AE=class extends PO{constructor(t){super();je(this,ws);je(this,jl);je(this,ql);je(this,Jr);je(this,ya);je(this,qn);je(this,md);je(this,ba);Me(this,ba,!1),Me(this,md,t.defaultOptions),this.setOptions(t.options),this.observers=[],Me(this,ya,t.client),Me(this,Jr,j(this,ya).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Me(this,jl,pK(this.options)),this.state=t.state??j(this,jl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=j(this,qn))==null?void 0:t.promise}setOptions(t){this.options={...j(this,md),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&j(this,Jr).remove(this)}setData(t,n){const r=Iy(this.state.data,t,this.options);return tt(this,ws,Si).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,Si).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=j(this,qn))==null?void 0:r.promise;return(s=j(this,qn))==null||s.cancel(t),n?n.then(Zr).catch(Zr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(j(this,jl))}isActive(){return this.observers.some(t=>xs(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Nw||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||!_O(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=j(this,qn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=j(this,qn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),j(this,Jr).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,qn)&&(j(this,ba)?j(this,qn).cancel({revert:!0}):j(this,qn).cancelRetry()),this.scheduleGc()),j(this,Jr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||tt(this,ws,Si).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,qn))return j(this,qn).continueRetry(),j(this,qn).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:()=>(Me(this,ba,!0),r.signal)})},i=()=>{const d=xO(this.options,n),f={client:j(this,ya),queryKey:this.queryKey,meta:this.meta};return s(f),Me(this,ba,!1),this.options.persister?this.options.persister(d,f,this):d(f)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:j(this,ya),state:this.state,fetchFn:i};s(o),(l=this.options.behavior)==null||l.onFetch(o,this),Me(this,ql,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&tt(this,ws,Si).call(this,{type:"fetch",meta:(c=o.fetchOptions)==null?void 0:c.meta});const a=d=>{var f,p,g,m;Mg(d)&&d.silent||tt(this,ws,Si).call(this,{type:"error",error:d}),Mg(d)||((p=(f=j(this,Jr).config).onError)==null||p.call(f,d,this),(m=(g=j(this,Jr).config).onSettled)==null||m.call(g,this.state.data,d,this)),this.scheduleGc()};return Me(this,qn,TO({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var f,p,g,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,Jr).config).onSuccess)==null||p.call(f,d,this),(m=(g=j(this,Jr).config).onSettled)==null||m.call(g,d,this.state.error,this),this.scheduleGc()},onError:a,onFail:(d,f)=>{tt(this,ws,Si).call(this,{type:"failed",failureCount:d,error:f})},onPause:()=>{tt(this,ws,Si).call(this,{type:"pause"})},onContinue:()=>{tt(this,ws,Si).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),j(this,qn).start()}},jl=new WeakMap,ql=new WeakMap,Jr=new WeakMap,ya=new WeakMap,qn=new WeakMap,md=new WeakMap,ba=new WeakMap,ws=new WeakSet,Si=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,...RO(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 Mg(s)&&s.revert&&j(this,ql)?{...j(this,ql),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,Jr).notify({query:this,type:"updated",action:t})})},AE);function RO(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:EO(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function pK(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 Qs,OE,IO=(OE=class extends zu{constructor(n={}){super();je(this,Qs);this.config=n,Me(this,Qs,new Map)}build(n,r,s){const i=r.queryKey,o=r.queryHash??Fw(i,r);let a=this.get(o);return a||(a=new hK({client:n,queryKey:i,queryHash:o,options:n.defaultQueryOptions(r),state:s,defaultOptions:n.getQueryDefaults(i)}),this.add(a)),a}add(n){j(this,Qs).has(n.queryHash)||(j(this,Qs).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const r=j(this,Qs).get(n.queryHash);r&&(n.destroy(),r===n&&j(this,Qs).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Ln.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return j(this,Qs).get(n)}getAll(){return[...j(this,Qs).values()]}find(n){const r={exact:!0,...n};return this.getAll().find(s=>lk(r,s))}findAll(n={}){const r=this.getAll();return Object.keys(n).length>0?r.filter(s=>lk(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()})})}},Qs=new WeakMap,OE),Js,ir,wa,Zs,no,ME,mK=(ME=class extends PO{constructor(t){super();je(this,Zs);je(this,Js);je(this,ir);je(this,wa);this.mutationId=t.mutationId,Me(this,ir,t.mutationCache),Me(this,Js,[]),this.state=t.state||AO(),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,Js).includes(t)||(j(this,Js).push(t),this.clearGcTimeout(),j(this,ir).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Me(this,Js,j(this,Js).filter(n=>n!==t)),this.scheduleGc(),j(this,ir).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){j(this,Js).length||(this.state.status==="pending"?this.scheduleGc():j(this,ir).remove(this))}continue(){var t;return((t=j(this,wa))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,i,o,a,l,u,c,d,f,p,g,m,y,w,b,_,T,x,C,I;Me(this,wa,TO({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,E)=>{tt(this,Zs,no).call(this,{type:"failed",failureCount:S,error:E})},onPause:()=>{tt(this,Zs,no).call(this,{type:"pause"})},onContinue:()=>{tt(this,Zs,no).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>j(this,ir).canRun(this)}));const n=this.state.status==="pending",r=!j(this,wa).canStart();try{if(!n){tt(this,Zs,no).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(s=j(this,ir).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,Zs,no).call(this,{type:"pending",context:E,variables:t,isPaused:r})}const S=await j(this,wa).start();return await((u=(l=j(this,ir).config).onSuccess)==null?void 0:u.call(l,S,t,this.state.context,this)),await((d=(c=this.options).onSuccess)==null?void 0:d.call(c,S,t,this.state.context)),await((p=(f=j(this,ir).config).onSettled)==null?void 0:p.call(f,S,null,this.state.variables,this.state.context,this)),await((m=(g=this.options).onSettled)==null?void 0:m.call(g,S,null,t,this.state.context)),tt(this,Zs,no).call(this,{type:"success",data:S}),S}catch(S){try{throw await((w=(y=j(this,ir).config).onError)==null?void 0:w.call(y,S,t,this.state.context,this)),await((_=(b=this.options).onError)==null?void 0:_.call(b,S,t,this.state.context)),await((x=(T=j(this,ir).config).onSettled)==null?void 0:x.call(T,void 0,S,this.state.variables,this.state.context,this)),await((I=(C=this.options).onSettled)==null?void 0:I.call(C,void 0,S,t,this.state.context)),S}finally{tt(this,Zs,no).call(this,{type:"error",error:S})}}finally{j(this,ir).runNext(this)}}},Js=new WeakMap,ir=new WeakMap,wa=new WeakMap,Zs=new WeakSet,no=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,Js).forEach(r=>{r.onMutationUpdate(t)}),j(this,ir).notify({mutation:this,type:"updated",action:t})})},ME);function AO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Pi,Ss,gd,DE,OO=(DE=class extends zu{constructor(n={}){super();je(this,Pi);je(this,Ss);je(this,gd);this.config=n,Me(this,Pi,new Set),Me(this,Ss,new Map),Me(this,gd,0)}build(n,r,s){const i=new mK({mutationCache:this,mutationId:++Gd(this,gd)._,options:n.defaultMutationOptions(r),state:s});return this.add(i),i}add(n){j(this,Pi).add(n);const r=wf(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,Pi).delete(n)){const r=wf(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=wf(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=wf(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,Pi).forEach(n=>{this.notify({type:"removed",mutation:n})}),j(this,Pi).clear(),j(this,Ss).clear()})}getAll(){return Array.from(j(this,Pi))}find(n){const r={exact:!0,...n};return this.getAll().find(s=>uk(r,s))}findAll(n={}){return this.getAll().filter(r=>uk(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(Zr))))}},Pi=new WeakMap,Ss=new WeakMap,gd=new WeakMap,DE);function wf(e){var t;return(t=e.options.scope)==null?void 0:t.id}function fk(e){return{onFetch:(t,n)=>{var c,d,f,p,g;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=((g=t.state.data)==null?void 0:g.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const y=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},w=xO(t.options,t.fetchOptions),b=async(_,T,x)=>{if(m)return Promise.reject();if(T==null&&_.pages.length)return Promise.resolve(_);const C={client:t.client,queryKey:t.queryKey,pageParam:T,direction:x?"backward":"forward",meta:t.options.meta};y(C);const I=await w(C),{maxPages:S}=t.options,E=x?aK:oK;return{pages:E(_.pages,I,S),pageParams:E(_.pageParams,T,S)}};if(s&&i.length){const _=s==="backward",T=_?gK:hk,x={pages:i,pageParams:o},C=T(r,x);a=await b(x,C,_)}else{const _=e??i.length;do{const T=l===0?o[0]??r.initialPageParam:hk(r,a);if(l>0&&T==null)break;a=await b(a,T),l++}while(l<_)}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 hk(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 gK(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 un,fo,ho,Wl,Gl,po,Kl,Yl,$E,vK=($E=class{constructor(t={}){je(this,un);je(this,fo);je(this,ho);je(this,Wl);je(this,Gl);je(this,po);je(this,Kl);je(this,Yl);Me(this,un,t.queryCache||new IO),Me(this,fo,t.mutationCache||new OO),Me(this,ho,t.defaultOptions||{}),Me(this,Wl,new Map),Me(this,Gl,new Map),Me(this,po,0)}mount(){Gd(this,po)._++,j(this,po)===1&&(Me(this,Kl,Bw.subscribe(async t=>{t&&(await this.resumePausedMutations(),j(this,un).onFocus())})),Me(this,Yl,op.subscribe(async t=>{t&&(await this.resumePausedMutations(),j(this,un).onOnline())})))}unmount(){var t,n;Gd(this,po)._--,j(this,po)===0&&((t=j(this,Kl))==null||t.call(this),Me(this,Kl,void 0),(n=j(this,Yl))==null||n.call(this),Me(this,Yl,void 0))}isFetching(t){return j(this,un).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return j(this,fo).findAll({...t,status:"pending"}).length}getQueryData(t){var r;const n=this.defaultQueryOptions({queryKey:t});return(r=j(this,un).get(n.queryHash))==null?void 0:r.state.data}ensureQueryData(t){const n=this.defaultQueryOptions(t),r=j(this,un).build(this,n),s=r.state.data;return s===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(Fl(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(s))}getQueriesData(t){return j(this,un).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,un).get(s.queryHash),o=i==null?void 0:i.state.data,a=sK(n,o);if(a!==void 0)return j(this,un).build(this,s).setData(a,{...r,manual:!0})}setQueriesData(t,n,r){return Ln.batch(()=>j(this,un).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,un).get(n.queryHash))==null?void 0:r.state}removeQueries(t){const n=j(this,un);Ln.batch(()=>{n.findAll(t).forEach(r=>{n.remove(r)})})}resetQueries(t,n){const r=j(this,un);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,un).findAll(t).map(i=>i.cancel(r)));return Promise.all(s).then(Zr).catch(Zr)}invalidateQueries(t,n={}){return Ln.batch(()=>(j(this,un).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,un).findAll(t).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,r);return r.throwOnError||(o=o.catch(Zr)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(s).then(Zr)}fetchQuery(t){const n=this.defaultQueryOptions(t);n.retry===void 0&&(n.retry=!1);const r=j(this,un).build(this,n);return r.isStaleByTime(Fl(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Zr).catch(Zr)}fetchInfiniteQuery(t){return t.behavior=fk(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Zr).catch(Zr)}ensureInfiniteQueryData(t){return t.behavior=fk(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return op.isOnline()?j(this,fo).resumePausedMutations():Promise.resolve()}getQueryCache(){return j(this,un)}getMutationCache(){return j(this,fo)}getDefaultOptions(){return j(this,ho)}setDefaultOptions(t){Me(this,ho,t)}setQueryDefaults(t,n){j(this,Wl).set(Ya(t),{queryKey:t,defaultOptions:n})}getQueryDefaults(t){const n=[...j(this,Wl).values()],r={};return n.forEach(s=>{ad(t,s.queryKey)&&Object.assign(r,s.defaultOptions)}),r}setMutationDefaults(t,n){j(this,Gl).set(Ya(t),{mutationKey:t,defaultOptions:n})}getMutationDefaults(t){const n=[...j(this,Gl).values()],r={};return n.forEach(s=>{ad(t,s.mutationKey)&&Object.assign(r,s.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const n={...j(this,ho).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return n.queryHash||(n.queryHash=Fw(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===Nw&&(n.enabled=!1),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...j(this,ho).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){j(this,un).clear(),j(this,fo).clear()}},un=new WeakMap,fo=new WeakMap,ho=new WeakMap,Wl=new WeakMap,Gl=new WeakMap,po=new WeakMap,Kl=new WeakMap,Yl=new WeakMap,$E),br,ft,vd,or,Sa,Xl,mo,ei,yd,Ql,Jl,_a,ka,go,Zl,Pt,hc,Oy,My,Dy,$y,Ly,Fy,Ny,MO,LE,yK=(LE=class extends zu{constructor(t,n){super();je(this,Pt);je(this,br);je(this,ft);je(this,vd);je(this,or);je(this,Sa);je(this,Xl);je(this,mo);je(this,ei);je(this,yd);je(this,Ql);je(this,Jl);je(this,_a);je(this,ka);je(this,go);je(this,Zl,new Set);this.options=n,Me(this,br,t),Me(this,ei,null),Me(this,mo,Ay()),this.options.experimental_prefetchInRender||j(this,mo).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),pk(j(this,ft),this.options)?tt(this,Pt,hc).call(this):this.updateResult(),tt(this,Pt,$y).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return By(j(this,ft),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return By(j(this,ft),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,tt(this,Pt,Ly).call(this),tt(this,Pt,Fy).call(this),j(this,ft).removeObserver(this)}setOptions(t){const n=this.options,r=j(this,ft);if(this.options=j(this,br).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof xs(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,Pt,Ny).call(this),j(this,ft).setOptions(this.options),n._defaulted&&!ip(this.options,n)&&j(this,br).getQueryCache().notify({type:"observerOptionsUpdated",query:j(this,ft),observer:this});const s=this.hasListeners();s&&mk(j(this,ft),r,this.options,n)&&tt(this,Pt,hc).call(this),this.updateResult(),s&&(j(this,ft)!==r||xs(this.options.enabled,j(this,ft))!==xs(n.enabled,j(this,ft))||Fl(this.options.staleTime,j(this,ft))!==Fl(n.staleTime,j(this,ft)))&&tt(this,Pt,Oy).call(this);const i=tt(this,Pt,My).call(this);s&&(j(this,ft)!==r||xs(this.options.enabled,j(this,ft))!==xs(n.enabled,j(this,ft))||i!==j(this,go))&&tt(this,Pt,Dy).call(this,i)}getOptimisticResult(t){const n=j(this,br).getQueryCache().build(j(this,br),t),r=this.createResult(n,t);return wK(this,r)&&(Me(this,or,r),Me(this,Xl,this.options),Me(this,Sa,j(this,ft).state)),r}getCurrentResult(){return j(this,or)}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,Zl).add(t)}getCurrentQuery(){return j(this,ft)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=j(this,br).defaultQueryOptions(t),r=j(this,br).getQueryCache().build(j(this,br),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return tt(this,Pt,hc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),j(this,or)))}createResult(t,n){var S;const r=j(this,ft),s=this.options,i=j(this,or),o=j(this,Sa),a=j(this,Xl),u=t!==r?t.state:j(this,vd),{state:c}=t;let d={...c},f=!1,p;if(n._optimisticResults){const E=this.hasListeners(),O=!E&&pk(t,n),R=E&&mk(t,r,n,s);(O||R)&&(d={...d,...RO(c.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:g,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,yd))p=j(this,Ql);else try{Me(this,yd,n.select),p=n.select(d.data),p=Iy(i==null?void 0:i.data,p,n),Me(this,Ql,p),Me(this,ei,null)}catch(E){Me(this,ei,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((S=j(this,Jl))==null?void 0:S.state.data,j(this,Jl)):n.placeholderData,n.select&&E!==void 0)try{E=n.select(E),Me(this,ei,null)}catch(O){Me(this,ei,O)}E!==void 0&&(y="success",p=Iy(i==null?void 0:i.data,E,n),f=!0)}j(this,ei)&&(g=j(this,ei),p=j(this,Ql),m=Date.now(),y="error");const w=d.fetchStatus==="fetching",b=y==="pending",_=y==="error",T=b&&w,x=p!==void 0,I={status:y,fetchStatus:d.fetchStatus,isPending:b,isSuccess:y==="success",isError:_,isInitialLoading:T,isLoading:T,data:p,dataUpdatedAt:d.dataUpdatedAt,error:g,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:w,isRefetching:w&&!b,isLoadingError:_&&!x,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:_&&x,isStale:Vw(t,n),refetch:this.refetch,promise:j(this,mo)};if(this.options.experimental_prefetchInRender){const E=A=>{I.status==="error"?A.reject(I.error):I.data!==void 0&&A.resolve(I.data)},O=()=>{const A=Me(this,mo,I.promise=Ay());E(A)},R=j(this,mo);switch(R.status){case"pending":t.queryHash===r.queryHash&&E(R);break;case"fulfilled":(I.status==="error"||I.data!==R.value)&&O();break;case"rejected":(I.status!=="error"||I.error!==R.reason)&&O();break}}return I}updateResult(){const t=j(this,or),n=this.createResult(j(this,ft),this.options);if(Me(this,Sa,j(this,ft).state),Me(this,Xl,this.options),j(this,Sa).data!==void 0&&Me(this,Jl,j(this,ft)),ip(n,t))return;Me(this,or,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!j(this,Zl).size)return!0;const o=new Set(i??j(this,Zl));return this.options.throwOnError&&o.add("error"),Object.keys(j(this,or)).some(a=>{const l=a;return j(this,or)[l]!==t[l]&&o.has(l)})};tt(this,Pt,MO).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&tt(this,Pt,$y).call(this)}},br=new WeakMap,ft=new WeakMap,vd=new WeakMap,or=new WeakMap,Sa=new WeakMap,Xl=new WeakMap,mo=new WeakMap,ei=new WeakMap,yd=new WeakMap,Ql=new WeakMap,Jl=new WeakMap,_a=new WeakMap,ka=new WeakMap,go=new WeakMap,Zl=new WeakMap,Pt=new WeakSet,hc=function(t){tt(this,Pt,Ny).call(this);let n=j(this,ft).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Zr)),n},Oy=function(){tt(this,Pt,Ly).call(this);const t=Fl(this.options.staleTime,j(this,ft));if(Ka||j(this,or).isStale||!Py(t))return;const r=_O(j(this,or).dataUpdatedAt,t)+1;Me(this,_a,setTimeout(()=>{j(this,or).isStale||this.updateResult()},r))},My=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(j(this,ft)):this.options.refetchInterval)??!1},Dy=function(t){tt(this,Pt,Fy).call(this),Me(this,go,t),!(Ka||xs(this.options.enabled,j(this,ft))===!1||!Py(j(this,go))||j(this,go)===0)&&Me(this,ka,setInterval(()=>{(this.options.refetchIntervalInBackground||Bw.isFocused())&&tt(this,Pt,hc).call(this)},j(this,go)))},$y=function(){tt(this,Pt,Oy).call(this),tt(this,Pt,Dy).call(this,tt(this,Pt,My).call(this))},Ly=function(){j(this,_a)&&(clearTimeout(j(this,_a)),Me(this,_a,void 0))},Fy=function(){j(this,ka)&&(clearInterval(j(this,ka)),Me(this,ka,void 0))},Ny=function(){const t=j(this,br).getQueryCache().build(j(this,br),this.options);if(t===j(this,ft))return;const n=j(this,ft);Me(this,ft,t),Me(this,vd,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},MO=function(t){Ln.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(j(this,or))}),j(this,br).getQueryCache().notify({query:j(this,ft),type:"observerResultsUpdated"})})},LE);function bK(e,t){return xs(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function pk(e,t){return bK(e,t)||e.state.data!==void 0&&By(e,t,t.refetchOnMount)}function By(e,t,n){if(xs(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Vw(e,t)}return!1}function mk(e,t,n,r){return(e!==t||xs(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Vw(e,n)}function Vw(e,t){return xs(t.enabled,e)!==!1&&e.isStaleByTime(Fl(t.staleTime,e))}function wK(e,t){return!ip(e.getCurrentResult(),t)}var vo,yo,wr,Ri,$i,ah,Vy,FE,SK=(FE=class extends zu{constructor(n,r){super();je(this,$i);je(this,vo);je(this,yo);je(this,wr);je(this,Ri);Me(this,vo,n),this.setOptions(r),this.bindMethods(),tt(this,$i,ah).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,vo).defaultMutationOptions(n),ip(this.options,r)||j(this,vo).getMutationCache().notify({type:"observerOptionsUpdated",mutation:j(this,wr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Ya(r.mutationKey)!==Ya(this.options.mutationKey)?this.reset():((s=j(this,wr))==null?void 0:s.state.status)==="pending"&&j(this,wr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=j(this,wr))==null||n.removeObserver(this)}onMutationUpdate(n){tt(this,$i,ah).call(this),tt(this,$i,Vy).call(this,n)}getCurrentResult(){return j(this,yo)}reset(){var n;(n=j(this,wr))==null||n.removeObserver(this),Me(this,wr,void 0),tt(this,$i,ah).call(this),tt(this,$i,Vy).call(this)}mutate(n,r){var s;return Me(this,Ri,r),(s=j(this,wr))==null||s.removeObserver(this),Me(this,wr,j(this,vo).getMutationCache().build(j(this,vo),this.options)),j(this,wr).addObserver(this),j(this,wr).execute(n)}},vo=new WeakMap,yo=new WeakMap,wr=new WeakMap,Ri=new WeakMap,$i=new WeakSet,ah=function(){var r;const n=((r=j(this,wr))==null?void 0:r.state)??AO();Me(this,yo,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Vy=function(n){Ln.batch(()=>{var r,s,i,o,a,l,u,c;if(j(this,Ri)&&this.hasListeners()){const d=j(this,yo).variables,f=j(this,yo).context;(n==null?void 0:n.type)==="success"?((s=(r=j(this,Ri)).onSuccess)==null||s.call(r,n.data,d,f),(o=(i=j(this,Ri)).onSettled)==null||o.call(i,n.data,null,d,f)):(n==null?void 0:n.type)==="error"&&((l=(a=j(this,Ri)).onError)==null||l.call(a,n.error,d,f),(c=(u=j(this,Ri)).onSettled)==null||c.call(u,void 0,n.error,d,f))}this.listeners.forEach(d=>{d(j(this,yo))})})},FE),_K="VUE_QUERY_CLIENT";function DO(e){const t=e?`:${e}`:"";return`${_K}${t}`}function Uy(e,t){Object.keys(e).forEach(n=>{e[n]=t[n]})}function zy(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)=>zy(s,t,String(i),r+1));if(typeof e=="object"&&xK(e)){const s=Object.entries(e).map(([i,o])=>[i,zy(o,t,i,r+1)]);return Object.fromEntries(s)}return e}function kK(e,t){return zy(e,t)}function it(e,t=!1){return kK(e,(n,r,s)=>{if(s===1&&r==="queryKey")return it(n,!0);if(t&&EK(n))return it(n(),t);if(Je(n))return it(Z(n),t)})}function xK(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function EK(e){return typeof e=="function"}function Hy(e,t){return typeof e=="function"?e(...t):!!e}function Uw(e=""){if(!DC())throw new Error("vue-query hooks can only be used inside setup() function or functions that support injection context.");const t=DO(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 CK=class extends IO{find(e){return super.find(it(e))}findAll(e={}){return super.findAll(it(e))}},TK=class extends OO{find(e){return super.find(it(e))}findAll(e={}){return super.findAll(it(e))}},PK=class extends vK{constructor(e={}){const t={defaultOptions:e.defaultOptions,queryCache:e.queryCache||new CK,mutationCache:e.mutationCache||new TK};super(t),this.isRestoring=U(!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=DO(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 PK(o)}Ka||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 IK(e,t,n){const r=Uw(),s=P(()=>{const p=it(t);typeof p.enabled=="function"&&(p.enabled=p.enabled());const g=r.defaultQueryOptions(p);return g._optimisticResults=r.isRestoring.value?"isRestoring":"optimistic",g}),i=new e(r,s.value),o=Ep(i.getCurrentResult());let a=()=>{};ke(r.isRestoring,p=>{p||(a(),a=i.subscribe(g=>{Uy(o,g)}))},{immediate:!0});const l=()=>{i.setOptions(s.value),Uy(o,i.getCurrentResult())};ke(s,l),gn(()=>{a()});const u=(...p)=>(l(),o.refetch(...p)),c=()=>new Promise((p,g)=>{let m=()=>{};const y=()=>{if(s.value.enabled!==!1){i.setOptions(s.value);const w=i.getOptimisticResult(s.value);w.isStale?(m(),i.fetchOptimistic(s.value).then(p,b=>{Hy(s.value.throwOnError,[b,i.getCurrentQuery()])?g(b):p(i.getCurrentResult())})):(m(),p(w))}};y(),m=ke(s,y)});ke(()=>o.error,p=>{if(o.isError&&!o.isFetching&&Hy(s.value.throwOnError,[p,i.getCurrentQuery()]))throw p});const f=Vo(o);for(const p in o)typeof o[p]=="function"&&(f[p]=o[p]);return f.suspense=c,f.refetch=u,f}function wm(e,t){return IK(yK,e)}function AK(e,t){const n=Uw(),r=P(()=>n.defaultMutationOptions(it(e))),s=new SK(n,r.value),i=Ep(s.getCurrentResult()),o=s.subscribe(c=>{Uy(i,c)}),a=(c,d)=>{s.mutate(c,d).catch(()=>{})};ke(r,()=>{s.setOptions(r.value)}),gn(()=>{o()});const u=Vo(i);return ke(()=>i.error,c=>{if(c&&Hy(r.value.throwOnError,[c]))throw c}),{...u,mutate:a,mutateAsync:i.mutate,reset:i.reset}}const OK=ue({...Ue(),...Ir(),...XA()},"VLayout"),Sm=_e()({name:"VLayout",props:OK(),setup(e,t){let{slots:n}=t;const{layoutClasses:r,layoutStyles:s,getLayoutItem:i,items:o,layoutRef:a}=eO(e),{dimensionStyles:l}=Ar(e);return Ae(()=>{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}}}),MK={class:"text-h5"},DK={key:0},$K={key:1},LK=$e({__name:"AddOrUpdateCameraStreamDialog",setup(e){const t=Uw(),n=tn(nn.AddOrUpdateCameraDialog),r=P(()=>"C"),s=U({name:"",streamURL:""}),i=()=>{var d;return((d=n.context())==null?void 0:d.addOrUpdate)==="update"},o=P(()=>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(g=>g.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 sp.createCameraStream({streamURL:s.value.streamURL,name:s.value.name}),await t.refetchQueries({queryKey:["cameraStream"]}),n.closeDialog()}async function u(){var d;await sp.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=hi;return $(),te(p,{id:Z(n).dialogId,"max-width":"800px",onEscape:f[3]||(f[3]=g=>a())},{default:v(()=>[h(gt,null,{default:v(()=>[h(sn,null,{default:v(()=>[M("span",MK,[h(lt,{class:"mr-2",color:"primary",size:"56"},{default:v(()=>[k(re(r.value),1)]),_:1}),o.value?($(),me("span",DK," Updating Camera ")):($(),me("span",$K," New Camera "))])]),_:1}),h(en,null,{default:v(()=>[h(Vn,{"grid-list-md":""},{default:v(()=>[h(Sm,{wrap:""},{default:v(()=>[h(ut,{modelValue:s.value.name,"onUpdate:modelValue":f[0]||(f[0]=g=>s.value.name=g),label:"Name",required:""},null,8,["modelValue"]),h(ut,{modelValue:s.value.streamURL,"onUpdate:modelValue":f[1]||(f[1]=g=>s.value.streamURL=g),label:"Url (MJPEG)",required:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(Mn,null,{default:v(()=>[h(wn),h(se,{color:"primary-darken-2",onClick:c},{default:v(()=>f[4]||(f[4]=[k(" Cancel ")])),_:1}),h(se,{color:"primary",onClick:f[2]||(f[2]=g=>o.value?u():l())},{default:v(()=>[k(re(o.value?"Update":"Create"),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),zw=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 Xt.testConnection(e)},saveEvent(e){var t;(t=this.testPrinterEvents)==null||t.push(e)}}}),FK="error",NK="success",BK=$e({__name:"PrinterChecksPanel",setup(e){const t=zw(),n=U(4);function r(){return t.getEvents().map(s=>({label:s.event,text:s.payload,color:s.failure?FK:NK}))}return(s,i)=>($(),te(ze,{cols:Z(n)},{default:v(()=>[i[0]||(i[0]=M("strong",null," Checks: ",-1)),($(!0),me(Pe,null,Wt(r(),(o,a)=>($(),te(dn,{key:a,type:o.color,density:"compact"},{default:v(()=>[M("small",null,re(o.label)+" "+re(o.text),1)]),_:2},1032,["type"]))),128))]),_:1},8,["cols"]))}}),VK="/assets/klipper-logo-B1Hu-a1R.svg",gk="/assets/octoprint-tentacle-D_4slObB.svg",$O=Symbol.for("vuetify:v-item-group"),UK=ue({...Ue(),...xd({selectedClass:"v-item--selected"}),...vt(),...$t()},"VItemGroup"),zK=_e()({name:"VItemGroup",props:UK(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:r}=Zt(e),{isSelected:s,select:i,next:o,prev:a,selected:l}=xu(e,$O);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})]}})}}),HK=_e()({name:"VItem",props:Ed(),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}=Cd(e,$O);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})}}}),jK={class:"text-h5"},qK={key:0},WK={key:1},GK={class:"ml-3 align-center"},KK=$e({__name:"AddOrUpdatePrinterDialog",setup(e){const t=tn(nn.AddOrUpdatePrinterDialog),n=Ft(),r=zw(),s=vm(),i=Xe("appConstants"),o=Dt(),a=U(null),l=U(!1),u=U(!1),c=U(!1),d=U(""),f=U(_y()),p=P(()=>{var D,L;if(s.hasFeature("multiplePrinterServices")){const W=s.getFeature("multiplePrinterServices");if((L=(D=W==null?void 0:W.subFeatures)==null?void 0:D.types)==null?void 0:L.includes("klipper"))return[{name:"OctoPrint",logo:gk,height:"75px"},{name:"Klipper",logo:VK,height:"75px"}]}return[{name:"OctoPrint",logo:gk,height:"75px"}]}),g=P(()=>{var D;return(D=n.updateDialogPrinter)==null?void 0:D.id});_t(async()=>{if(g.value){const D=n.printer(g.value);f.value=Xt.convertPrinterToCreateForm(D)}}),ke(g,D=>{if(!D)return;const L=n.printer(D);f.value=Xt.convertPrinterToCreateForm(L)});const m=P(()=>n.updateDialogPrinter),y=P(()=>!!m.value),w=P(()=>y?"Save":"Create"),b=P(()=>{var D;return f?fm((D=f.value)==null?void 0:D.name):"?"}),_=P(()=>({required:!0,max:i.maxPrinterNameLength})),T=P(()=>({required:!0,length:i.apiKeyLength,alpha_num:!0}));function x(){f.value=_y()}function C(){c.value=!0}async function I(){if(!f)return;r.clearEvents(),C();const{correlationToken:D}=await r.createTestPrinter(f.value);r.currentCorrelationToken=D}async function S(D){await n.createPrinter(D,u.value),o.openInfoMessage({title:`Printer ${D.name} created`})}async function E(D){const L=D.id;await n.updatePrinter({printerId:L,updatedPrinter:D},u.value),o.openInfoMessage({title:`Printer ${D.name} updated`})}async function O(){var L,W,z,K,G;if(!f)return;a.value=null,l.value=!0,(L=f.value.printerURL)!=null&&L.length&&!((W=f.value.printerURL)!=null&&W.startsWith("http://"))&&!((z=f.value.printerURL)!=null&&z.startsWith("https://"))&&(f.value.printerURL+="https://");const D=f.value;try{y.value?await E(D):await S(D),A()}catch(H){H instanceof NP?(a.value=((G=(K=H.response)==null?void 0:K.data)==null?void 0:G.error)||H.message,o.error("Validation Failed",H.message)):(a.value=H.message,o.error("Error",H.message))}finally{l.value=!1,u.value=!1}}async function R(){f.value.name=Vu(),n.updateDialogPrinter=void 0,a.value=null,u.value=!1,a.value=null}function A(){t.closeDialog(),u.value=!1,a.value=null,c.value=!1,r.clearEvents(),x(),n.updateDialogPrinter=void 0,d.value=""}return(D,L)=>{const W=BK,z=hi;return $(),te(z,{id:Z(t).dialogId,"max-width":Z(c)?"900px":"700px",onEscape:L[11]||(L[11]=K=>A())},{default:v(()=>[h(gt,{class:"pa-4"},{default:v(()=>[h(sn,null,{default:v(()=>[M("span",jK,[h(lt,{color:"primary",size:"56"},{default:v(()=>[k(re(Z(b)),1)]),_:1}),Z(y)?($(),me("span",qK," Updating Printer ")):($(),me("span",WK," New Printer "))])]),_:1}),h(en,null,{default:v(()=>{var K;return[L[14]||(L[14]=M("h4",null,"Printer type",-1)),h(zK,{modelValue:Z(f).printerType,"onUpdate:modelValue":L[0]||(L[0]=G=>Z(f).printerType=G),mandatory:""},{default:v(()=>[h(Vn,null,{default:v(()=>[h(rt,null,{default:v(()=>[($(!0),me(Pe,null,Wt(Z(p),G=>($(),te(ze,{key:G.name,cols:"12",md:"6"},{default:v(()=>[h(HK,null,{default:v(({isSelected:H,toggle:B})=>[h(gt,{color:H?"primary":"blue-grey darken-4",class:"d-flex align-center justify-center elevation-8",height:"75px",width:"225px",onClick:B},{default:v(()=>[h(us,{src:G.logo,height:G.height,"max-width":"125px",width:"125px"},null,8,["src","height"]),h(e2,null,{default:v(()=>[M("h3",GK,re(G.name),1)]),_:2},1024)]),_:2},1032,["color","onClick"])]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"]),h(rt,null,{default:v(()=>[h(ze,{cols:Z(c)?8:12},{default:v(()=>[Z(f)?($(),te(rt,{key:0},{default:v(()=>[h(ze,null,{default:v(()=>[h(ut,{modelValue:Z(f).name,"onUpdate:modelValue":L[1]||(L[1]=G=>Z(f).name=G),counter:Z(_).max,autofocus:"",class:"ma-1",label:"Printer name*",required:""},null,8,["modelValue","counter"])]),_:1}),h(ze,null,{default:v(()=>[h(yn,{modelValue:Z(f).enabled,"onUpdate:modelValue":L[2]||(L[2]=G=>Z(f).enabled=G),hint:"Disabling makes the printer passive",label:"Enabled*","persistent-hint":"",required:""},null,8,["modelValue"])]),_:1})]),_:1})):fe("",!0),h(ut,{modelValue:Z(f).printerURL,"onUpdate:modelValue":L[3]||(L[3]=G=>Z(f).printerURL=G),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":L[4]||(L[4]=G=>Z(f).apiKey=G),counter:Z(T).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)?($(),te(W,{key:0,cols:4},{default:v(()=>[h(se,{onClick:L[5]||(L[5]=G=>c.value=!1)},{default:v(()=>L[12]||(L[12]=[k(" Hide checks ")])),_:1})]),_:1})):fe("",!0)]),_:1}),(K=Z(a))!=null&&K.length?($(),te(dn,{key:0,color:"primary",class:"my-3"},{default:v(()=>[k(re(Z(a))+" ",1),h(yn,{color:"warning",modelValue:Z(u),"onUpdate:modelValue":L[6]||(L[6]=G=>Je(u)?u.value=G:null),label:"Force save"},null,8,["modelValue"])]),_:1})):fe("",!0),Z(l)?($(),te(dn,{key:1,class:"my-3"},{default:v(()=>[L[13]||(L[13]=k(" Validating printer ")),h(ni,{indeterminate:""})]),_:1})):fe("",!0)]}),_:1}),h(Mn,null,{default:v(()=>[L[18]||(L[18]=M("em",{class:"text-red"}," * indicates required field ",-1)),h(wn),h(se,{variant:"text",onClick:L[7]||(L[7]=K=>A())},{default:v(()=>L[15]||(L[15]=[k(" Close ")])),_:1}),Z(y)?($(),te(se,{key:0,color:"gray",variant:"text",onClick:L[8]||(L[8]=K=>R())},{default:v(()=>L[16]||(L[16]=[k(" Duplicate ")])),_:1})):fe("",!0),h(se,{color:"warning",variant:"text",onClick:L[9]||(L[9]=K=>I())},{default:v(()=>L[17]||(L[17]=[k(" Test connection ")])),_:1}),h(se,{color:"blue-darken-1",variant:"text",onClick:L[10]||(L[10]=K=>O())},{default:v(()=>[k(re(Z(w)),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["id","max-width"])}}}),YK=ue({text:String,...Ue(),...vt()},"VToolbarTitle"),xn=_e()({name:"VToolbarTitle",props:YK(),setup(e,t){let{slots:n}=t;return Ae(()=>{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"],LO=ue({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(),...Ue(),...vs(),...Dn(),...vt({tag:"header"}),...$t()},"VToolbar"),pr=_e()({name:"VToolbar",props:LO(),setup(e,t){var p;let{slots:n}=t;const{backgroundColorClasses:r,backgroundColorStyles:s}=dr(Te(e,"color")),{borderClasses:i}=Ms(e),{elevationClasses:o}=Ds(e),{roundedClasses:a}=Un(e),{themeClasses:l}=Zt(e),{rtlClasses:u}=Or(),c=Ie(!!(e.extended||(p=n.extension)!=null&&p.call(n))),d=P(()=>parseInt(Number(e.height)+(e.density==="prominent"?Number(e.height):0)-(e.density==="comfortable"?8:0)-(e.density==="compact"?16:0),10)),f=P(()=>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 Pr({VBtn:{variant:"text"}}),Ae(()=>{var w;const g=!!(e.title||n.title),m=!!(n.image||e.image),y=(w=n.extension)==null?void 0:w.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(us,{key:"image-img",cover:!0,src:e.image},null)]),h(Ot,{defaults:{VTabs:{height:Fe(d.value)}}},{default:()=>{var b,_,T;return[h("div",{class:"v-toolbar__content",style:{height:Fe(d.value)}},[n.prepend&&h("div",{class:"v-toolbar__prepend"},[(b=n.prepend)==null?void 0:b.call(n)]),g&&h(xn,{key:"title",text:e.title},{text:n.title}),(_=n.default)==null?void 0:_.call(n),n.append&&h("div",{class:"v-toolbar__append"},[(T=n.append)==null?void 0:T.call(n)])])]}}),h(Ot,{defaults:{VTabs:{height:Fe(f.value)}}},{default:()=>[h(sP,null,{default:()=>[c.value&&h("div",{class:"v-toolbar__extension",style:{height:Fe(f.value)}},[y])]})]})]})}),{contentHeight:d,extensionHeight:f}}}),QK=$e({__name:"HelpOverlay",setup(e){const t=U(!1);return(n,r)=>($(),te(hP,{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:v(({props:s})=>[h(nt,{location:"top"},{activator:v(({props:i})=>[h(se,he({icon:"help"},{...s,...i}),{default:v(()=>[h(J,null,{default:v(()=>r[1]||(r[1]=[k("help")])),_:1})]),_:2},1040)]),default:v(()=>[r[2]||(r[2]=M("span",null," Load the online documentation webpage ",-1))]),_:2},1024)]),default:v(({isActive:s})=>[h(gt,{height:"100%",width:"100%"},{default:v(()=>[h(pr,{color:"primary"},{default:v(()=>[h(J,{class:"ml-5"},{default:v(()=>r[3]||(r[3]=[k("help")])),_:1}),r[6]||(r[6]=M("h2",{class:"ml-10"},"FDM Monster Documentation",-1)),h(wn),r[7]||(r[7]=M("span",{class:"mr-10"}," docs.fdm-monster.net ",-1)),h(se,{variant:"flat",onClick:i=>s.value=!1},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>r[4]||(r[4]=[k("close")])),_:1}),r[5]||(r[5]=k(" Close help "))]),_:2},1032,["onClick"])]),_:2},1024),r[8]||(r[8]=M("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"]))}}),JK=$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)=>($(),te(nt,{location:t.location},{activator:v(({props:s})=>[h(se,he(s,{variant:"outlined",class:"ml-2",color:n.color,onClick:r[0]||(r[0]=i=>n.$emit("click"))}),{default:v(()=>[Op(n.$slots,"default",{},()=>{var i;return[(i=t.icon)!=null&&i.length?($(),te(J,{key:0,class:Fo("mr-2 "+t.iconClass)},{default:v(()=>[k(re(t.icon),1)]),_:1},8,["class"])):fe("",!0),k(" "+re(t.text),1)]})]),_:2},1040,["color"])]),default:v(()=>[M("span",null,re(t.tooltip),1)]),_:3},8,["location"]))}});/*!
63
+ * vue-router v4.5.0
64
+ * (c) 2024 Eduardo San Martin Morote
65
+ * @license MIT
66
+ */const _l=typeof document<"u";function FO(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function ZK(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&FO(e.default)}const Ct=Object.assign;function Dg(e,t){const n={};for(const r in t){const s=t[r];n[r]=As(s)?s.map(e):e(s)}return n}const Oc=()=>{},As=Array.isArray,NO=/#/g,e9=/&/g,t9=/\//g,n9=/=/g,r9=/\?/g,BO=/\+/g,s9=/%5B/g,i9=/%5D/g,VO=/%5E/g,o9=/%60/g,UO=/%7B/g,a9=/%7C/g,zO=/%7D/g,l9=/%20/g;function Hw(e){return encodeURI(""+e).replace(a9,"|").replace(s9,"[").replace(i9,"]")}function u9(e){return Hw(e).replace(UO,"{").replace(zO,"}").replace(VO,"^")}function jy(e){return Hw(e).replace(BO,"%2B").replace(l9,"+").replace(NO,"%23").replace(e9,"%26").replace(o9,"`").replace(UO,"{").replace(zO,"}").replace(VO,"^")}function c9(e){return jy(e).replace(n9,"%3D")}function d9(e){return Hw(e).replace(NO,"%23").replace(r9,"%3F")}function f9(e){return e==null?"":d9(e).replace(t9,"%2F")}function ld(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const h9=/\/$/,p9=e=>e.replace(h9,"");function $g(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=y9(r??t,n),{fullPath:r+(i&&"?")+i+o,path:r,query:s,hash:ld(o)}}function m9(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function vk(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function g9(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&gu(t.matched[r],n.matched[s])&&HO(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function gu(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function HO(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!v9(e[n],t[n]))return!1;return!0}function v9(e,t){return As(e)?yk(e,t):As(t)?yk(t,e):e===t}function yk(e,t){return As(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function y9(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 Ji={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var ud;(function(e){e.pop="pop",e.push="push"})(ud||(ud={}));var Mc;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Mc||(Mc={}));function b9(e){if(!e)if(_l){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),p9(e)}const w9=/^[^#]+#/;function S9(e,t){return e.replace(w9,"#")+t}function _9(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 _m=()=>({left:window.scrollX,top:window.scrollY});function k9(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=_9(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 bk(e,t){return(history.state?history.state.position-t:-1)+e}const qy=new Map;function x9(e,t){qy.set(e,t)}function E9(e){const t=qy.get(e);return qy.delete(e),t}let C9=()=>location.protocol+"//"+location.host;function jO(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),vk(l,"")}return vk(n,e)+r+s}function T9(e,t,n,r){let s=[],i=[],o=null;const a=({state:f})=>{const p=jO(e,location),g=n.value,m=t.value;let y=0;if(f){if(n.value=p,t.value=f,o&&o===g){o=null;return}y=m?f.position-m.position:0}else r(p);s.forEach(w=>{w(n.value,g,{delta:y,type:ud.pop,direction:y?y>0?Mc.forward:Mc.back:Mc.unknown})})};function l(){o=n.value}function u(f){s.push(f);const p=()=>{const g=s.indexOf(f);g>-1&&s.splice(g,1)};return i.push(p),p}function c(){const{history:f}=window;f.state&&f.replaceState(Ct({},f.state,{scroll:_m()}),"")}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 wk(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?_m():null}}function P9(e){const{history:t,location:n}=window,r={value:jO(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:C9()+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=Ct({},t.state,wk(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=Ct({},s.value,t.state,{forward:l,scroll:_m()});i(c.current,c,!0);const d=Ct({},wk(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=b9(e);const t=P9(e),n=T9(e,t.state,t.location,t.replace);function r(i,o=!0){o||n.pauseListeners(),history.go(i)}const s=Ct({location:"",base:e,go:r,createHref:S9.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 I9(e){return typeof e=="string"||e&&typeof e=="object"}function qO(e){return typeof e=="string"||typeof e=="symbol"}const WO=Symbol("");var Sk;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Sk||(Sk={}));function vu(e,t){return Ct(new Error,{type:e,[WO]:!0},t)}function yi(e,t){return e instanceof Error&&WO in e&&(t==null||!!(e.type&t))}const _k="[^/]+?",A9={sensitive:!1,strict:!1,start:!0,end:!0},O9=/[.+*?^${}()[\]/\\]/g;function M9(e,t){const n=Ct({},A9,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:g,repeatable:m,optional:y,regexp:w}=f;i.push({name:g,repeatable:m,optional:y});const b=w||_k;if(b!==_k){p+=10;try{new RegExp(`(${b})`)}catch(T){throw new Error(`Invalid custom RegExp for param "${g}" (${b}): `+T.message)}}let _=m?`((?:${b})(?:/(?:${b}))*)`:`(${b})`;d||(_=y&&u.length<2?`(?:/${_})`:"/"+_),y&&(_+="?"),s+=_,p+=20,y&&(p+=-8),m&&(p+=-20),b===".*"&&(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]||"",g=i[f-1];d[g.name]=p&&g.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:g,repeatable:m,optional:y}=p,w=g in u?u[g]:"";if(As(w)&&!m)throw new Error(`Provided param "${g}" is an array but it is not repeatable (* or + modifiers)`);const b=As(w)?w.join("/"):w;if(!b)if(y)f.length<2&&(c.endsWith("/")?c=c.slice(0,-1):d=!0);else throw new Error(`Missing required param "${g}"`);c+=b}}return c||"/"}return{re:o,score:r,keys:i,parse:a,stringify:l}}function D9(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 GO(e,t){let n=0;const r=e.score,s=t.score;for(;n<r.length&&n<s.length;){const i=D9(r[n],s[n]);if(i)return i;n++}if(Math.abs(s.length-r.length)===1){if(kk(r))return 1;if(kk(s))return-1}return s.length-r.length}function kk(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const $9={type:0,value:""},L9=/[a-zA-Z0-9_]/;function F9(e){if(!e)return[[]];if(e==="/")return[[$9]];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:L9.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 N9(e,t,n){const r=M9(F9(e.path),n),s=Ct(r,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function B9(e,t){const n=[],r=new Map;t=Tk({strict:!1,end:!0,sensitive:!1},t);function s(d){return r.get(d)}function i(d,f,p){const g=!p,m=Ek(d);m.aliasOf=p&&p.record;const y=Tk(t,d),w=[m];if("alias"in d){const T=typeof d.alias=="string"?[d.alias]:d.alias;for(const x of T)w.push(Ek(Ct({},m,{components:p?p.record.components:m.components,path:x,aliasOf:p?p.record:m})))}let b,_;for(const T of w){const{path:x}=T;if(f&&x[0]!=="/"){const C=f.record.path,I=C[C.length-1]==="/"?"":"/";T.path=f.record.path+(x&&I+x)}if(b=N9(T,f,y),p?p.alias.push(b):(_=_||b,_!==b&&_.alias.push(b),g&&d.name&&!Ck(b)&&o(d.name)),KO(b)&&l(b),m.children){const C=m.children;for(let I=0;I<C.length;I++)i(C[I],b,p&&p.children[I])}p=p||b}return _?()=>{o(_)}:Oc}function o(d){if(qO(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=z9(d,n);n.splice(f,0,d),d.record.name&&!Ck(d)&&r.set(d.record.name,d)}function u(d,f){let p,g={},m,y;if("name"in d&&d.name){if(p=r.get(d.name),!p)throw vu(1,{location:d});y=p.record.name,g=Ct(xk(f.params,p.keys.filter(_=>!_.optional).concat(p.parent?p.parent.keys.filter(_=>_.optional):[]).map(_=>_.name)),d.params&&xk(d.params,p.keys.map(_=>_.name))),m=p.stringify(g)}else if(d.path!=null)m=d.path,p=n.find(_=>_.re.test(m)),p&&(g=p.parse(m),y=p.record.name);else{if(p=f.name?r.get(f.name):n.find(_=>_.re.test(f.path)),!p)throw vu(1,{location:d,currentLocation:f});y=p.record.name,g=Ct({},f.params,d.params),m=p.stringify(g)}const w=[];let b=p;for(;b;)w.unshift(b.record),b=b.parent;return{name:y,path:m,params:g,matched:w,meta:U9(w)}}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 xk(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function Ek(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:V9(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 V9(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 Ck(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function U9(e){return e.reduce((t,n)=>Ct(t,n.meta),{})}function Tk(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function z9(e,t){let n=0,r=t.length;for(;n!==r;){const i=n+r>>1;GO(e,t[i])<0?r=i:n=i+1}const s=H9(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function H9(e){let t=e;for(;t=t.parent;)if(KO(t)&&GO(e,t)===0)return t}function KO({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function j9(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(BO," "),o=i.indexOf("="),a=ld(o<0?i:i.slice(0,o)),l=o<0?null:ld(i.slice(o+1));if(a in t){let u=t[a];As(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=c9(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(As(r)?r.map(i=>i&&jy(i)):[r&&jy(r)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+n,i!=null&&(t+="="+i))})}return t}function q9(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=As(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const W9=Symbol(""),Rk=Symbol(""),km=Symbol(""),jw=Symbol(""),Wy=Symbol("");function nc(){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 lo(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(vu(4,{from:n,to:t})):f instanceof Error?l(f):I9(f)?l(vu(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 Lg(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(FO(l)){const c=(l.__vccOpts||l)[t];c&&i.push(lo(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=ZK(c)?c.default:c;o.mods[a]=c,o.components[a]=d;const p=(d.__vccOpts||d)[t];return p&&lo(p,n,r,o,a,s)()}))}}return i}function Ik(e){const t=Xe(km),n=Xe(jw),r=P(()=>{const l=Z(e.to);return t.resolve(l)}),s=P(()=>{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(gu.bind(null,c));if(f>-1)return f;const p=Ak(l[u-2]);return u>1&&Ak(c)===p&&d[d.length-1].path!==p?d.findIndex(gu.bind(null,l[u-2])):f}),i=P(()=>s.value>-1&&Q9(n.params,r.value.params)),o=P(()=>s.value>-1&&s.value===n.matched.length-1&&HO(n.params,r.value.params));function a(l={}){if(X9(l)){const u=t[Z(e.replace)?"replace":"push"](Z(e.to)).catch(Oc);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:r,href:P(()=>r.value.href),isActive:i,isExactActive:o,navigate:a}}function G9(e){return e.length===1?e[0]:e}const K9=$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:Ik,setup(e,{slots:t}){const n=vn(Ik(e)),{options:r}=Xe(km),s=P(()=>({[Ok(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Ok(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&G9(t.default(n));return e.custom?i:hr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},i)}}}),Y9=K9;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 Q9(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(!As(s)||s.length!==r.length||r.some((i,o)=>i!==s[o]))return!1}return!0}function Ak(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Ok=(e,t,n)=>e??t??n,J9=$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(Wy),s=P(()=>e.route||r.value),i=Xe(Rk,0),o=P(()=>{let u=Z(i);const{matched:c}=s.value;let d;for(;(d=c[u])&&!d.components;)u++;return u}),a=P(()=>s.value.matched[o.value]);Gt(Rk,P(()=>o.value+1)),Gt(W9,a),Gt(Wy,s);const l=U();return ke(()=>[l.value,a.value,e.name],([u,c,d],[f,p,g])=>{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||!gu(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 Mk(n.default,{Component:f,route:u});const p=d.props[c],g=p?p===!0?u.params:typeof p=="function"?p(u):p:null,y=hr(f,Ct({},g,t,{onVnodeUnmounted:w=>{w.component.isUnmounted&&(d.instances[c]=null)},ref:l}));return Mk(n.default,{Component:y,route:u})||y}}});function Mk(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Z9=J9;function eY(e){const t=B9(e.routes,e),n=e.parseQuery||j9,r=e.stringifyQuery||Pk,s=e.history,i=nc(),o=nc(),a=nc(),l=Ie(Ji);let u=Ji;_l&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=Dg.bind(null,Q=>""+Q),d=Dg.bind(null,f9),f=Dg.bind(null,ld);function p(Q,X){let V,ge;return qO(Q)?(V=t.getRecordMatcher(Q),ge=X):ge=Q,t.addRoute(ge,V)}function g(Q){const X=t.getRecordMatcher(Q);X&&t.removeRoute(X)}function m(){return t.getRoutes().map(Q=>Q.record)}function y(Q){return!!t.getRecordMatcher(Q)}function w(Q,X){if(X=Ct({},X||l.value),typeof Q=="string"){const F=$g(n,Q,X.path),ee=t.resolve({path:F.path},X),pe=s.createHref(F.fullPath);return Ct(F,ee,{params:f(ee.params),hash:ld(F.hash),redirectedFrom:void 0,href:pe})}let V;if(Q.path!=null)V=Ct({},Q,{path:$g(n,Q.path,X.path).path});else{const F=Ct({},Q.params);for(const ee in F)F[ee]==null&&delete F[ee];V=Ct({},Q,{params:d(F)}),X.params=d(X.params)}const ge=t.resolve(V,X),Oe=Q.hash||"";ge.params=c(f(ge.params));const Ne=m9(r,Ct({},Q,{hash:u9(Oe),path:ge.path})),N=s.createHref(Ne);return Ct({fullPath:Ne,hash:Oe,query:r===Pk?q9(Q.query):Q.query||{}},ge,{redirectedFrom:void 0,href:N})}function b(Q){return typeof Q=="string"?$g(n,Q,l.value.path):Ct({},Q)}function _(Q,X){if(u!==Q)return vu(8,{from:X,to:Q})}function T(Q){return I(Q)}function x(Q){return T(Ct(b(Q),{replace:!0}))}function C(Q){const X=Q.matched[Q.matched.length-1];if(X&&X.redirect){const{redirect:V}=X;let ge=typeof V=="function"?V(Q):V;return typeof ge=="string"&&(ge=ge.includes("?")||ge.includes("#")?ge=b(ge):{path:ge},ge.params={}),Ct({query:Q.query,hash:Q.hash,params:ge.path!=null?{}:Q.params},ge)}}function I(Q,X){const V=u=w(Q),ge=l.value,Oe=Q.state,Ne=Q.force,N=Q.replace===!0,F=C(V);if(F)return I(Ct(b(F),{state:typeof F=="object"?Ct({},Oe,F.state):Oe,force:Ne,replace:N}),X||V);const ee=V;ee.redirectedFrom=X;let pe;return!Ne&&g9(r,ge,V)&&(pe=vu(16,{to:ee,from:ge}),ne(ge,ge,!0,!1)),(pe?Promise.resolve(pe):O(ee,ge)).catch(ce=>yi(ce)?yi(ce,2)?ce:B(ce):G(ce,ee,ge)).then(ce=>{if(ce){if(yi(ce,2))return I(Ct({replace:N},b(ce.to),{state:typeof ce.to=="object"?Ct({},Oe,ce.to.state):Oe,force:Ne}),X||ee)}else ce=A(ee,ge,!0,N,Oe);return R(ee,ge,ce),ce})}function S(Q,X){const V=_(Q,X);return V?Promise.reject(V):Promise.resolve()}function E(Q){const X=oe.values().next().value;return X&&typeof X.runWithContext=="function"?X.runWithContext(Q):Q()}function O(Q,X){let V;const[ge,Oe,Ne]=tY(Q,X);V=Lg(ge.reverse(),"beforeRouteLeave",Q,X);for(const F of ge)F.leaveGuards.forEach(ee=>{V.push(lo(ee,Q,X))});const N=S.bind(null,Q,X);return V.push(N),be(V).then(()=>{V=[];for(const F of i.list())V.push(lo(F,Q,X));return V.push(N),be(V)}).then(()=>{V=Lg(Oe,"beforeRouteUpdate",Q,X);for(const F of Oe)F.updateGuards.forEach(ee=>{V.push(lo(ee,Q,X))});return V.push(N),be(V)}).then(()=>{V=[];for(const F of Ne)if(F.beforeEnter)if(As(F.beforeEnter))for(const ee of F.beforeEnter)V.push(lo(ee,Q,X));else V.push(lo(F.beforeEnter,Q,X));return V.push(N),be(V)}).then(()=>(Q.matched.forEach(F=>F.enterCallbacks={}),V=Lg(Ne,"beforeRouteEnter",Q,X,E),V.push(N),be(V))).then(()=>{V=[];for(const F of o.list())V.push(lo(F,Q,X));return V.push(N),be(V)}).catch(F=>yi(F,8)?F:Promise.reject(F))}function R(Q,X,V){a.list().forEach(ge=>E(()=>ge(Q,X,V)))}function A(Q,X,V,ge,Oe){const Ne=_(Q,X);if(Ne)return Ne;const N=X===Ji,F=_l?history.state:{};V&&(ge||N?s.replace(Q.fullPath,Ct({scroll:N&&F&&F.scroll},Oe)):s.push(Q.fullPath,Oe)),l.value=Q,ne(Q,X,V,N),B()}let D;function L(){D||(D=s.listen((Q,X,V)=>{if(!ie.listening)return;const ge=w(Q),Oe=C(ge);if(Oe){I(Ct(Oe,{replace:!0,force:!0}),ge).catch(Oc);return}u=ge;const Ne=l.value;_l&&x9(bk(Ne.fullPath,V.delta),_m()),O(ge,Ne).catch(N=>yi(N,12)?N:yi(N,2)?(I(Ct(b(N.to),{force:!0}),ge).then(F=>{yi(F,20)&&!V.delta&&V.type===ud.pop&&s.go(-1,!1)}).catch(Oc),Promise.reject()):(V.delta&&s.go(-V.delta,!1),G(N,ge,Ne))).then(N=>{N=N||A(ge,Ne,!1),N&&(V.delta&&!yi(N,8)?s.go(-V.delta,!1):V.type===ud.pop&&yi(N,20)&&s.go(-1,!1)),R(ge,Ne,N)}).catch(Oc)}))}let W=nc(),z=nc(),K;function G(Q,X,V){B(Q);const ge=z.list();return ge.length?ge.forEach(Oe=>Oe(Q,X,V)):console.error(Q),Promise.reject(Q)}function H(){return K&&l.value!==Ji?Promise.resolve():new Promise((Q,X)=>{W.add([Q,X])})}function B(Q){return K||(K=!Q,L(),W.list().forEach(([X,V])=>Q?V(Q):X()),W.reset()),Q}function ne(Q,X,V,ge){const{scrollBehavior:Oe}=e;if(!_l||!Oe)return Promise.resolve();const Ne=!V&&E9(bk(Q.fullPath,0))||(ge||!V)&&history.state&&history.state.scroll||null;return Mt().then(()=>Oe(Q,X,Ne)).then(N=>N&&k9(N)).catch(N=>G(N,Q,X))}const q=Q=>s.go(Q);let Y;const oe=new Set,ie={currentRoute:l,listening:!0,addRoute:p,removeRoute:g,clearRoutes:t.clearRoutes,hasRoute:y,getRoutes:m,resolve:w,options:e,push:T,replace:x,go:q,back:()=>q(-1),forward:()=>q(1),beforeEach:i.add,beforeResolve:o.add,afterEach:a.add,onError:z.add,isReady:H,install(Q){const X=this;Q.component("RouterLink",Y9),Q.component("RouterView",Z9),Q.config.globalProperties.$router=X,Object.defineProperty(Q.config.globalProperties,"$route",{enumerable:!0,get:()=>Z(l)}),_l&&!Y&&l.value===Ji&&(Y=!0,T(s.location).catch(Oe=>{}));const V={};for(const Oe in Ji)Object.defineProperty(V,Oe,{get:()=>l.value[Oe],enumerable:!0});Q.provide(km,X),Q.provide(jw,Ep(V)),Q.provide(Wy,l);const ge=Q.unmount;oe.add(Q),Q.unmount=function(){oe.delete(Q),oe.size<1&&(u=Ji,D&&D(),D=null,l.value=Ji,Y=!1,K=!1),ge()}}};function be(Q){return Q.reduce((X,V)=>X.then(()=>E(V)),Promise.resolve())}return ie}function tY(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=>gu(u,a))?r.push(a):n.push(a));const l=e.matched[o];l&&(t.matched.find(u=>gu(u,l))||s.push(l))}return[n,r,s]}function Wo(){return Xe(km)}function YO(e){return Xe(jw)}const nY={class:"text-center"},rY={class:"float-end"},sY=$e({__name:"PrintJobsMenu",setup(e){const t=tr(),n=U(""),r=U(!1),s=P(()=>t.printersWithJob.filter(a=>{var p,g,m,y;const l=(g=(p=a.job)==null?void 0:p.job)==null?void 0:g.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=P(()=>s.value.length||0);function o(a){return a?a==null?void 0:a.toFixed(0):""}return ke(r,()=>{n.value=""}),(a,l)=>($(),me("div",nY,[h(bm,{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:v(({props:u})=>[h(se,he({color:Z(i)?"green":"secondary",dark:""},u),{default:v(()=>[M("span",null," Print jobs "+re(Z(i)?`(${Z(i)})`:""),1),h(J,{end:""},{default:v(()=>l[4]||(l[4]=[k(" work ")])),_:1})]),_:2},1040,["color"])]),default:v(()=>[h(gt,{class:"d-flex flex-column","min-width":"300"},{default:v(()=>[h(Vt,{style:{"overflow-y":"hidden","flex-shrink":"0"}},{default:v(()=>[h(Ve,null,{prepend:v(()=>[h(lt,{class:"font-weight-bold",color:"primary",size:"44"},{default:v(()=>[k(re(Z(i)),1)]),_:1})]),default:v(()=>[h(dt,null,{default:v(()=>[l[7]||(l[7]=k(" Print Jobs ")),M("span",rY,[h(se,{variant:"tonal",onClick:l[0]||(l[0]=u=>r.value=!1)},{default:v(()=>[h(J,null,{default:v(()=>l[5]||(l[5]=[k("close")])),_:1}),l[6]||(l[6]=k("Close "))]),_:1})])]),_:1}),h(hu,{class:"mt-2"},{default:v(()=>[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(cn),h(Vt,{style:{"overflow-y":"auto","flex-shrink":"1"}},{default:v(()=>[Z(i)?fe("",!0):($(),te(Ve,{key:0},{default:v(()=>l[8]||(l[8]=[k(" No active prints ")])),_:1})),($(!0),me(Pe,null,Wt(Z(s),({printer:u,job:c})=>($(),te(Ve,{key:u.id,lines:"two"},{prepend:v(()=>[h(lt,{size:"70"},{default:v(()=>{var d;return[h(ni,{"model-value":(d=c==null?void 0:c.progress)==null?void 0:d.completion,width:5,color:"green",size:"50"},{default:v(()=>{var f;return[k(re(o((f=c.progress)==null?void 0:f.completion)+"%"||""),1)]}),_:2},1032,["model-value"])]}),_:2},1024)]),default:v(()=>[h(dt,null,{default:v(()=>{var d,f;return[k(re((f=(d=c.job)==null?void 0:d.file)==null?void 0:f.name),1)]}),_:2},1024),h(yt,null,{default:v(()=>[k(" Elapsed: "+re(Math.round((c==null?void 0:c.progress.printTime)??0/60))+" minutes ",1),l[9]||(l[9]=M("br",null,null,-1)),k(" Printer: "+re(u.name),1)]),_:2},1024)]),_:2},1024))),128))]),_:1}),h(Mn,null,{default:v(()=>[h(wn),h(se,{onClick:l[2]||(l[2]=u=>r.value=!1)},{default:v(()=>l[10]||(l[10]=[k(" Close ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]))}}),qw=ps("profile",{state:()=>({username:null,isDemoUser:null,userId:null}),actions:{async getProfile(){return await es.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 iY(e,t){return e.push({name:t})}async function XO(e){if(e.currentRoute.value.path==="/login"){console.log("routeToLogin: already at login page");return}return iY(e,qt.Login)}const Dk=!0,oY=()=>Object.freeze({apiKeyLength:43,maxPort:65535,maxPrinterNameLength:25,maxPrinterGroupNameLength:30,maxPrinterGroupLocationX:4,maxPrinterGroupLocationY:4,minPrinterFloorNameLength:3,minUsernameLength:3}),ui=Object.create(null);ui.open="0";ui.close="1";ui.ping="2";ui.pong="3";ui.message="4";ui.upgrade="5";ui.noop="6";const lh=Object.create(null);Object.keys(ui).forEach(e=>{lh[ui[e]]=e});const Gy={type:"error",data:"parser error"},QO=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",JO=typeof ArrayBuffer=="function",ZO=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Ww=({type:e,data:t},n,r)=>QO&&t instanceof Blob?n?r(t):$k(t,r):JO&&(t instanceof ArrayBuffer||ZO(t))?n?r(t):$k(new Blob([t]),r):r(ui[e]+(t||"")),$k=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Lk(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Fg;function aY(e,t){if(QO&&e.data instanceof Blob)return e.data.arrayBuffer().then(Lk).then(t);if(JO&&(e.data instanceof ArrayBuffer||ZO(e.data)))return t(Lk(e.data));Ww(e,!1,n=>{Fg||(Fg=new TextEncoder),t(Fg.encode(n))})}const Fk="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Fk.length;e++)pc[Fk.charCodeAt(e)]=e;const lY=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=pc[e.charCodeAt(r)],o=pc[e.charCodeAt(r+1)],a=pc[e.charCodeAt(r+2)],l=pc[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},uY=typeof ArrayBuffer=="function",Gw=(e,t)=>{if(typeof e!="string")return{type:"message",data:eM(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:cY(e.substring(1),t)}:lh[n]?e.length>1?{type:lh[n],data:e.substring(1)}:{type:lh[n]}:Gy},cY=(e,t)=>{if(uY){const n=lY(e);return eM(n,t)}else return{base64:!0,data:e}},eM=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},tM="",dY=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((i,o)=>{Ww(i,!1,a=>{r[o]=a,++s===n&&t(r.join(tM))})})},fY=(e,t)=>{const n=e.split(tM),r=[];for(let s=0;s<n.length;s++){const i=Gw(n[s],t);if(r.push(i),i.type==="error")break}return r};function hY(){return new TransformStream({transform(e,t){aY(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 Ng;function Sf(e){return e.reduce((t,n)=>t+n.length,0)}function _f(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 pY(e,t){Ng||(Ng=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(Sf(n)<1)break;const l=_f(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(Sf(n)<2)break;const l=_f(n,2);s=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(Sf(n)<8)break;const l=_f(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),c=u.getUint32(0);if(c>Math.pow(2,21)-1){a.enqueue(Gy);break}s=c*Math.pow(2,32)+u.getUint32(4),r=3}else{if(Sf(n)<s)break;const l=_f(n,s);a.enqueue(Gw(i?l:Ng.decode(l),t)),r=0}if(s===0||s>e){a.enqueue(Gy);break}}}})}const nM=4;function bn(e){if(e)return mY(e)}function mY(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 xm=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),ns=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),gY="arraybuffer";function rM(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const vY=ns.setTimeout,yY=ns.clearTimeout;function Em(e,t){t.useNativeTimers?(e.setTimeoutFn=vY.bind(ns),e.clearTimeoutFn=yY.bind(ns)):(e.setTimeoutFn=ns.setTimeout.bind(ns),e.clearTimeoutFn=ns.clearTimeout.bind(ns))}const bY=1.33;function wY(e){return typeof e=="string"?SY(e):Math.ceil((e.byteLength||e.size)*bY)}function SY(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 sM(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function _Y(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function kY(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 xY extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Kw extends bn{constructor(t){super(),this.writable=!1,Em(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 xY(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=Gw(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=_Y(t);return n.length?"?"+n:""}}class EY extends Kw{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)};fY(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,dY(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]=sM()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let iM=!1;try{iM=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const CY=iM;function TY(){}class PY extends EY{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 Nl=class uh extends bn{constructor(t,n,r){super(),this.createRequest=t,Em(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=rM(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=uh.requestsCount++,uh.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 uh.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()}};Nl.requestsCount=0;Nl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Nk);else if(typeof addEventListener=="function"){const e="onpagehide"in ns?"pagehide":"unload";addEventListener(e,Nk,!1)}}function Nk(){for(let e in Nl.requests)Nl.requests.hasOwnProperty(e)&&Nl.requests[e].abort()}const RY=function(){const e=oM({xdomain:!1});return e&&e.responseType!==null}();class IY extends PY{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 Nl(oM,this.uri(),t)}}function oM(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||CY))return new XMLHttpRequest}catch{}if(!t)try{return new ns[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const aM=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class AY extends Kw{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=aM?{}:rM(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;Ww(r,this.supportsBinary,i=>{try{this.doWrite(r,i)}catch{}s&&xm(()=>{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]=sM()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Bg=ns.WebSocket||ns.MozWebSocket;class OY extends AY{createSocket(t,n,r){return aM?new Bg(t,n,r):n?new Bg(t,n):new Bg(t)}doWrite(t,n){this.ws.send(n)}}class MY extends Kw{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=pY(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=hY();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&&xm(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const DY={websocket:OY,webtransport:MY,polling:IY},$Y=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,LY=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ky(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=$Y.exec(e||""),i={},o=14;for(;o--;)i[LY[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=FY(i,i.path),i.queryKey=NY(i,i.query),i}function FY(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 NY(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,i){s&&(n[s]=i)}),n}const Yy=typeof addEventListener=="function"&&typeof removeEventListener=="function",ch=[];Yy&&addEventListener("offline",()=>{ch.forEach(e=>e())},!1);class Co extends bn{constructor(t,n){if(super(),this.binaryType=gY,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=Ky(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=Ky(n.host).host);Em(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=kY(this.opts.query)),Yy&&(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"})},ch.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=nM,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&&Co.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",Co.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+=wY(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,xm(()=>{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(Co.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(),Yy&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=ch.indexOf(this._offlineEventListener);r!==-1&&ch.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Co.protocol=nM;class BY extends Co{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;Co.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;Co.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 VY=class extends BY{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=>DY[s]).filter(s=>!!s)),super(t,r)}};function UY(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=Ky(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 zY=typeof ArrayBuffer=="function",HY=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,lM=Object.prototype.toString,jY=typeof Blob=="function"||typeof Blob<"u"&&lM.call(Blob)==="[object BlobConstructor]",qY=typeof File=="function"||typeof File<"u"&&lM.call(File)==="[object FileConstructor]";function Yw(e){return zY&&(e instanceof ArrayBuffer||HY(e))||jY&&e instanceof Blob||qY&&e instanceof File}function dh(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(dh(e[n]))return!0;return!1}if(Yw(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return dh(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&dh(e[n]))return!0;return!1}function WY(e){const t=[],n=e.data,r=e;return r.data=Xy(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Xy(e,t){if(!e)return e;if(Yw(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]=Xy(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]=Xy(e[r],t));return n}return e}function GY(e,t){return e.data=Qy(e.data,t),delete e.attachments,e}function Qy(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]=Qy(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Qy(e[n],t));return e}const KY=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],YY=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)&&dh(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 Bk(e){return Object.prototype.toString.call(e)==="[object Object]"}class Xw 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 QY(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Yw(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(Xw.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 Bk(n);case ht.DISCONNECT:return n===void 0;case ht.CONNECT_ERROR:return typeof n=="string"||Bk(n);case ht.EVENT:case ht.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&KY.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 QY{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=GY(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const JY=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Xw,Encoder:XY,get PacketType(){return ht},protocol:YY},Symbol.toStringTag,{value:"Module"}));function ks(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const ZY=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class uM 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(ZY.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 Hu(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}Hu.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};Hu.prototype.reset=function(){this.attempts=0};Hu.prototype.setMin=function(e){this.ms=e};Hu.prototype.setMax=function(e){this.max=e};Hu.prototype.setJitter=function(e){this.jitter=e};class Jy 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,Em(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 Hu({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||JY;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 VY(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){xm(()=>{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 uM(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 rc={};function fh(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=UY(e,t.path||"/socket.io"),r=n.source,s=n.id,i=n.path,o=rc[s]&&i in rc[s].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new Jy(r,t):(rc[s]||(rc[s]=new Jy(r,t)),l=rc[s]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(fh,{Manager:Jy,Socket:uM,io:fh,connect:fh});let Qt=null;const Sr=vn({connected:!1,setup:!1,id:""});function eX(e,t){if(Sr.setup)throw new Error("Socket already set up");Sr.setup=!1,Qt=fh(e,{auth:t!=null&&t.length?{token:t}:void 0}),Sr.setup=!0,Qt.on("connect",()=>{Sr.id=Qt.id||"",Sr.connected=!0}),Qt.on("disconnect",()=>{Sr.id="",Sr.connected=!1})}function tX(){Sr.connected=!1,Qt==null||Qt.close(),Qt==null||Qt.open()}function nX(){Qt&&Qt.close(),Qt=null,Sr.setup=!1,Sr.connected=!1,Sr.id=""}function rX(){if(!Qt)return console.warn("Socket not set-up"),{setup:!1};const e={setup:!0,active:Qt.active,connected:Qt.connected,id:Qt.id,recovered:Qt.recovered};return console.warn(e),e}const sX=ue({scrollTarget:{type:String},scrollThreshold:{type:[String,Number],default:300}},"scroll");function iX(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{canScroll:n}=t;let r=0,s=0;const i=U(null),o=Ie(0),a=Ie(0),l=Ie(0),u=Ie(!1),c=Ie(!1),d=P(()=>Number(e.scrollThreshold)),f=P(()=>Er((d.value-o.value)/d.value||0)),p=()=>{const g=i.value;if(!g||n&&!n.value)return;r=o.value,o.value="window"in g?g.pageYOffset:g.scrollTop;const m=g instanceof Window?document.documentElement.scrollHeight:g.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}),_t(()=>{ke(()=>e.scrollTarget,g=>{var y;const m=g?document.querySelector(g):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})}),En(()=>{var g;(g=i.value)==null||g.removeEventListener("scroll",p)}),n&&ke(n,p,{immediate:!0}),{scrollThreshold:d,currentScroll:o,currentThreshold:l,isScrollActive:u,scrollRatio:f,isScrollingUp:c,savedScroll:a}}const oX=ue({scrollBehavior:String,modelValue:{type:Boolean,default:!0},location:{type:String,default:"top",validator:e=>["top","bottom"].includes(e)},...LO(),...QA(),...sX(),height:{type:[Number,String],default:64}},"VAppBar"),cM=_e()({name:"VAppBar",props:oX(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=U(),s=st(e,"modelValue"),i=P(()=>{var _;const b=new Set(((_=e.scrollBehavior)==null?void 0:_.split(" "))??[]);return{hide:b.has("hide"),fullyHide:b.has("fully-hide"),inverted:b.has("inverted"),collapse:b.has("collapse"),elevate:b.has("elevate"),fadeImage:b.has("fade-image")}}),o=P(()=>{const b=i.value;return b.hide||b.fullyHide||b.inverted||b.collapse||b.elevate||b.fadeImage||!s.value}),{currentScroll:a,scrollThreshold:l,isScrollingUp:u,scrollRatio:c}=iX(e,{canScroll:o}),d=P(()=>i.value.hide||i.value.fullyHide),f=P(()=>e.collapse||i.value.collapse&&(i.value.inverted?c.value>0:c.value===0)),p=P(()=>e.flat||i.value.fullyHide&&!s.value||i.value.elevate&&(i.value.inverted?a.value>0:a.value===0)),g=P(()=>i.value.fadeImage?i.value.inverted?1-c.value:c.value:void 0),m=P(()=>{var T,x;if(i.value.hide&&i.value.inverted)return 0;const b=((T=r.value)==null?void 0:T.contentHeight)??0,_=((x=r.value)==null?void 0:x.extensionHeight)??0;return d.value?a.value<l.value||i.value.fullyHide?b+_:b:b+_});Ur(P(()=>!!e.scrollBehavior),()=>{On(()=>{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}=Hd(),{layoutItemStyles:w}=ZA({id:e.name,order:P(()=>parseInt(e.order,10)),position:Te(e,"location"),layoutSize:m,elementSize:Ie(void 0),active:s,absolute:Te(e,"absolute")});return Ae(()=>{const b=pr.filterProps(e);return h(pr,he({ref:r,class:["v-app-bar",{"v-app-bar--bottom":e.location==="bottom"},e.class],style:[{...w.value,"--v-toolbar-image-opacity":g.value,height:void 0,...y.value},e.style]},b,{collapse:f.value,flat:p.value}),n)}),{}}}),aX=ue({...eP({icon:"$menu",variant:"text"})},"VAppBarNavIcon"),lX=_e()({name:"VAppBarNavIcon",props:aX(),setup(e,t){let{slots:n}=t;return Ae(()=>h(se,he(e,{class:["v-app-bar-nav-icon"]}),n)),{}}}),uX={key:1,class:"text-uppercase text--white"},cX={key:3,class:"ml-2"},dX={key:4,class:"ml-2"},fX=$e({__name:"TopBar",setup(e){const t=qw(),n=as(),r=Wo(),s=[{title:"Open Profile",icon:"person",path:"/settings/account"}],i=U(Date.now());vF(()=>{i.value=Date.now()},1e3);const o=P(()=>{var d;if(!((d=n.tokenClaims)!=null&&d.exp))return"";const c=n.tokenClaims.exp-i.value/1e3;return`${Math.round(c)}s`}),a=P(()=>t.username),l=P(()=>n.isDemoMode);async function u(){await n.logout(!0),await XO(r)}return(c,d)=>{const f=JK,p=QK;return $(),te(cM,{elevation:"0"},{default:v(()=>[h(xn,{class:"text-uppercase text-white"},{default:v(()=>d[1]||(d[1]=[M("span",{class:"font-weight-light"}," FDM ",-1),M("strong",null," Monster ",-1)])),_:1}),l.value?($(),te(wn,{key:0})):fe("",!0),l.value?($(),me("h2",uX," DEMO MODE ")):fe("",!0),h(wn),h(sY),Z(n).hasAuthToken&&!Z(n).isLoginExpired?($(),te(bm,{key:2,"close-on-content-click":!1,location:"bottom right","open-on-hover":"",transition:"slide-y-transition"},{activator:v(({props:g})=>[h(se,he({class:"ml-2",color:"secondary",theme:"dark"},g),{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>d[2]||(d[2]=[k("person")])),_:1}),k(" "+re(a.value),1)]),_:2},1040)]),default:v(()=>[h(Vt,null,{default:v(()=>[($(),me(Pe,null,Wt(s,(g,m)=>h(Ve,{key:m,to:g.path,title:g.title,"prepend-avatar":g.icon,link:""},null,8,["to","title","prepend-avatar"])),64))]),_:1})]),_:1})):fe("",!0),Z(Dk)&&o.value?($(),me("span",cX," AuthExp "+re(o.value),1)):fe("",!0),Z(Dk)?($(),me("span",dX,[M("small",null," S"+re(Z(Sr).setup?1:0)+" C"+re(Z(Sr).connected?1:0)+" "+re(Z(Sr).id),1)])):fe("",!0),Z(n).loginRequired===!0?($(),te(f,{key:5,tooltip:"Go back to login",text:"Logout",color:"secondary",icon:"logout",onClick:d[0]||(d[0]=g=>u())})):fe("",!0),Z(n).loginRequired===!0?($(),te(se,{key:6,class:"ml-2"},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>d[3]||(d[3]=[k("logout")])),_:1}),d[4]||(d[4]=k(" Logout "))]),_:1})):fe("",!0),h(p)]),_:1})}}}),Qw="/assets/logo-CJVdjy51.png",hX=$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)=>($(),te(Aw,{permanent:"",rail:""},{default:v(()=>[h(lX,{class:"ml-1 mt-2"},{default:v(()=>[h(us,{alt:"FDM Monster Logo",src:Z(Qw),class:"shrink mr-1 pt-3 ml-1",transition:"scale-transition",width:"40"},null,8,["src"])]),_:1}),h(cn),h(Vt,{density:"compact",nav:""},{default:v(()=>[($(),me(Pe,null,Wt(t,([s,i,o],a)=>h(Ve,{key:a,to:o,"prepend-icon":s,title:i,density:"comfortable","router-link":""},null,8,["to","prepend-icon","title"])),64))]),_:1})]),_:1}))}});function pX(e){const t=Ie(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 gn(r),{clear:r,time:t,start:i,reset:s}}const mX=ue({multiLine:Boolean,text:String,timer:[Boolean,String],timeout:{type:[Number,String],default:5e3},vertical:Boolean,...zo({location:"bottom"}),...Cu(),...Dn(),...$s(),...$t(),...Os(Rd({transition:"v-snackbar-transition"}),["persistent","noClickAnimation","scrim","scrollStrategy"])},"VSnackbar"),Jw=_e()({name:"VSnackbar",props:mX(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=st(e,"modelValue"),{positionClasses:s}=Tu(e),{scopeId:i}=Ru(),{themeClasses:o}=Zt(e),{colorClasses:a,colorStyles:l,variantClasses:u}=Ja(e),{roundedClasses:c}=Un(e),d=pX(()=>Number(e.timeout)),f=U(),p=U(),g=Ie(!1),m=Ie(0),y=U(),w=Xe(od,void 0);Ur(()=>!!w,()=>{const R=JA();On(()=>{y.value=R.mainStyles.value})}),ke(r,_),ke(()=>e.timeout,_),_t(()=>{r.value&&_()});let b=-1;function _(){d.reset(),window.clearTimeout(b);const R=Number(e.timeout);if(!r.value||R===-1)return;const A=Ab(p.value);d.start(A),b=window.setTimeout(()=>{r.value=!1},R)}function T(){d.reset(),window.clearTimeout(b)}function x(){g.value=!0,T()}function C(){g.value=!1,_()}function I(R){m.value=R.touches[0].clientY}function S(R){Math.abs(m.value-R.changedTouches[0].clientY)>50&&(r.value=!1)}function E(){g.value&&C()}const O=P(()=>e.location.split(" ").reduce((R,A)=>(R[`v-snackbar--${A}`]=!0,R),{}));return Ae(()=>{const R=Fi.filterProps(e),A=!!(n.default||n.text||e.text);return h(Fi,he({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},O.value,s.value,e.class],style:[y.value,e.style]},R,{modelValue:r.value,"onUpdate:modelValue":D=>r.value=D,contentProps:he({class:["v-snackbar__wrapper",o.value,a.value,c.value,u.value],style:[l.value],onPointerenter:x,onPointerleave:C},R.contentProps),persistent:!0,noClickAnimation:!0,scrim:!1,scrollStrategy:"none",_disableGlobalStack:!0,onTouchstartPassive:I,onTouchend:S,onAfterLeave:E},i),{default:()=>{var D,L;return[Uo(!1,"v-snackbar"),e.timer&&!g.value&&h("div",{key:"timer",class:"v-snackbar__timer"},[h(ru,{ref:p,color:typeof e.timer=="string"?e.timer:"info",max:e.timeout,"model-value":d.time.value},null)]),A&&h("div",{key:"content",class:"v-snackbar__content",role:"status","aria-live":"polite"},[((D=n.text)==null?void 0:D.call(n))??e.text,(L=n.default)==null?void 0:L.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})}),Ki({},f)}}),gX={style:{width:"100%"}},vX={class:"font-weight-bold text-button"},yX=$e({__name:"AppProgressSnackbar",setup(e){const t=Dt(),n=U(!1),r=U(""),s=U([]),i=U(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 _t(()=>{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,g=o(c);if(g)Math.min(100,d)>=g.value&&(g.expiresAt=Date.now()+1500,g.value=d,g.completed=p);else{if(d>=100)return;a(c,f,d,!1,Date.now()+1500)}r.value="Uploading files"})}),(u,c)=>($(),te(Jw,{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:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:"2"},{default:v(()=>[h(se,{icon:"file_upload",size:"large"})]),_:1}),h(ze,{class:"d-flex align-center flex-row",cols:"8"},{default:v(()=>[M("div",gX,[M("span",vX,re(r.value),1),($(!0),me(Pe,null,Wt(s.value,(d,f)=>($(),me("div",{key:f,class:"mb-2"},[d.completed?($(),te(J,{key:0},{default:v(()=>c[2]||(c[2]=[k("check")])),_:1})):d.timeoutAt?($(),te(J,{key:1},{default:v(()=>c[3]||(c[3]=[k("pause")])),_:1})):($(),te(J,{key:2},{default:v(()=>c[4]||(c[4]=[k("hourglass_bottom")])),_:1})),k(" "+re(d.title)+" "+re((d.completed?100:d.value).toFixed(1))+"% ",1),c[5]||(c[5]=M("br",null,null,-1)),($(),te(ru,{key:d.key,"model-value":d.completed?100:d.value,color:d.timeoutAt?"red":"success"},null,8,["model-value","color"]))]))),128))])]),_:1}),h(ze,{cols:"1"},{default:v(()=>[h(se,{icon:"close",size:"large",onClick:c[0]||(c[0]=d=>n.value=!1)})]),_:1})]),_:1})]),_:1},8,["modelValue","timeout"]))}}),bX={class:"font-weight-bold text-button"},wX={key:0},SX=$e({__name:"AppErrorSnackbar",setup(e){const t=Dt(),n=U(-1),r=U(!1),s=U(""),i=U("");return _t(()=>{t.onErrorMessage(o=>{s.value=o.title,i.value=o.subtitle??"",r.value=!0,n.value=o.timeout??1e4})}),(o,a)=>($(),te(Jw,{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:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:"2"},{default:v(()=>[h(se,{icon:"error"})]),_:1}),h(ze,{class:"d-flex align-center flex-row",cols:"8"},{default:v(()=>{var l;return[M("div",null,[M("span",bX,re(s.value),1),(l=i.value)!=null&&l.length?($(),me("div",wX,re(i.value),1)):fe("",!0)])]}),_:1}),h(ze,{cols:"1"},{default:v(()=>[h(se,{icon:"close",onClick:a[0]||(a[0]=l=>r.value=!1)})]),_:1})]),_:1})]),_:1},8,["modelValue","timeout"]))}}),_X={class:"font-weight-bold text-button"},kX={key:0},xX=$e({__name:"AppInfoSnackbar",setup(e){const t=Dt(),n=U(!1),r=U(""),s=U(""),i=U(2e3),o=U(!1);return _t(()=>{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)=>($(),te(Jw,{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:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:"2"},{default:v(()=>[h(se,{icon:"info"})]),_:1}),h(ze,{cols:"8",class:"d-flex align-center flex-row"},{default:v(()=>{var u;return[M("div",null,[M("span",_X,re(r.value),1),(u=s.value)!=null&&u.length?($(),me("div",kX,re(s.value),1)):fe("",!0)])]}),_:1}),h(ze,{cols:"2"},{default:v(()=>[h(se,{icon:"close",onClick:l[0]||(l[0]=u=>n.value=!1)})]),_:1})]),_:1})]),_:1},8,["modelValue","color","timeout"]))}}),Zw=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 Di.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}}}),EX="/img/OIG.JYDC2RaWdz7g9.jpg",Go=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},CX=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:CX,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 PX(e,t,n,r,s,i){return n.loading?($(),me("div",{key:0,style:ss(i.getWrapperStyle())},[($(),me(Pe,null,Wt(9,o=>M("div",{key:o,style:ss(i.getCircleStyle(i.random(100)))},null,4)),64))],4)):fe("",!0)}const dM=Go(TX,[["render",PX]]);function fM(e){const t=ct();t.getOptions().enabled=e,console.warn("Sentry enabled:",e)}const RX=e=>new Promise(t=>setTimeout(t,e)),IX=ps("tracked-uploads",()=>{const e=U([]),t=P(()=>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 AX{constructor(){ye(this,"printerStore",Ft());ye(this,"floorStore",Xi());ye(this,"printerStateStore",tr());ye(this,"testPrinterStore",zw());ye(this,"trackedUploadsStore",IX());ye(this,"snackbar",Dt())}socketState(){return rX()}async setupSocketConnection(){console.debug("Setting up socket.io client");const t=await uA(),n=as();n.loadTokens(),eX(t,n.loginRequired?n.token:void 0),Qt==null||Qt.on("legacy-update",r=>this.onMessage(JSON.parse(r))),Qt==null||Qt.on("test-printer-state",r=>{this.testPrinterStore.saveEvent(r),console.log(r)})}disconnect(){nX()}reconnect(){Qt&&(console.debug("Resetting socket.io client connection"),tX())}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"}},MX={class:"mt-2 mb-2"},DX={key:0,class:"mt-2 mb-2"},$X={key:1,class:"mt-2 mb-2"},LX={key:2,style:{animation:"fadeIn 0.75s"}},FX=$e({__name:"AppLoader",setup(e){const t=as(),n=Fs(),r=vm(),s=qw(),i=U(!1),o=Wo(),a=U(""),l=U(!0),u=U(),c=U(),d=U(),f=Dt(),p=new AX;function g(){window.location.reload()}function m(){navigator.clipboard.writeText(JSON.stringify(u.value)),f.openInfoMessage({title:"Copied",subtitle:"Error copied to clipboard"})}function y(I,S=""){I?(a.value=S,u.value=null,c.value=null,d.value=null):a.value="",i.value=I}async function w(){var I;try{await n.loadSettings(),await r.loadFeatures(),await s.getProfile();const S=(I=n.serverSettings)==null?void 0:I.sentryDiagnosticsEnabled;fM(!!S)}catch(S){console.log("Error when loading settings.",S),f.openErrorMessage({title:"Error",subtitle:"Error when loading settings, features and/or profile."}),ai(S)}p.socketState().setup?p.reconnect():await p.setupSocketConnection(),y(!1)}return Fr("auth:permission-denied").on(async I=>{console.log("[AppLoader] Permission denied, going to permission denied page"),y(!0,"Permission denied"),await o.push({name:qt.PermissionDenied,query:{roles:I==null?void 0:I.roles,page:String(o.currentRoute.value.name),permissions:I==null?void 0:I.permissions,error:I==null?void 0:I.error,url:I==null?void 0:I.url}}),y(!1)}),Fr("auth:failure").on(async I=>{console.debug(`[AppLoader] Event received: 'auth:failure', going back to login, context: ${I}`),y(!0,"Authentication failed, going back to login"),o.currentRoute.value.name!==qt.Login&&await o.push({name:qt.Login}),y(!1)}),Fr("auth:login").on(async()=>{console.debug("[AppLoader] Event received: 'auth:login', loading app"),y(!0,"Loading app"),await w()}),Fr(`auth:${_r.AccountNotVerified}`).on(async()=>{console.debug(`[AppLoader] Event received: 'auth:${_r.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)}),Fr(`auth:${_r.PasswordChangeRequired}`).on(async()=>{console.debug(`[AppLoader] Event received: 'auth:${_r.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()}),Su(async()=>{var R,A;l.value=!0;const I=["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"],S=I[Math.floor(Math.random()*I.length)];y(!0,S);try{await pa.test()}catch(D){l.value=!1,u.value=D,c.value="api/test",ai(D);return}const{loginRequired:E,wizardState:O}=await t.checkAuthenticationRequirements();if(!O.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 w();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:D,handled:L}=await t.verifyOrRefreshLoginOnceOrLogout();if(L){console.debug("[AppLoader] received handled event, hiding overlay");return}if(!D){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(D){console.log("[AppLoader] Error when refreshing login",D),l.value=!1,u.value=D.message,c.value=(R=D.config)==null?void 0:R.url,d.value=(A=D.response)==null?void 0:A.data,ai(D);return}console.debug("[AppLoader] Loading app"),await w()}),(I,S)=>($(),me(Pe,null,[h(Fi,{modelValue:i.value,"onUpdate:modelValue":S[2]||(S[2]=E=>i.value=E),opacity:"0.98",style:{"z-index":"7"}},{default:v(()=>[l.value?($(),te(dM,{key:0,size:20,class:"ma-auto",color:"#a70015"})):fe("",!0),S[19]||(S[19]=M("br",null,null,-1)),u.value?($(),me("div",OX,[S[16]||(S[16]=M("h1",null,"FDM Monster Server Error",-1)),S[17]||(S[17]=M("p",null," Did not expect this answer from the server. Please check your configuration and logs. ",-1)),h(rp,{class:"pa-4 rounded",color:"grey-darken-2",width:"80%"},{default:v(()=>[S[11]||(S[11]=k(" Details: ")),M("div",MX,re(JSON.stringify(u.value,null,4)),1),c.value?($(),me("div",DX," Original URL: "+re(c.value),1)):fe("",!0),d.value?($(),me("div",$X," Response body: "+re(d.value),1)):fe("",!0),S[12]||(S[12]=M("br",null,null,-1)),h(se,{class:"mb-2",color:"secondary",onClick:S[0]||(S[0]=E=>m())},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>S[3]||(S[3]=[k("content_copy")])),_:1}),S[4]||(S[4]=k(" Copy error details "))]),_:1}),S[13]||(S[13]=M("br",null,null,-1)),h(se,{color:"primary mb-2",onClick:S[1]||(S[1]=E=>g())},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>S[5]||(S[5]=[k("refresh")])),_:1}),S[6]||(S[6]=k(" reload the page "))]),_:1}),S[14]||(S[14]=M("br",null,null,-1)),h(se,{color:"darken-2 mb-2",href:"https://docs.fdm-monster.net",style:{color:"white"},target:"_blank"},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>S[7]||(S[7]=[k("menu_book")])),_:1}),S[8]||(S[8]=k(" view documentation "))]),_:1}),S[15]||(S[15]=M("br",null,null,-1)),h(se,{color:"purple-darken-4",href:"https://discord.gg/mwA8uP8CMc",style:{color:"white"},target:"_blank"},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>S[9]||(S[9]=[k("chat")])),_:1}),S[10]||(S[10]=k(" join our Discord "))]),_:1})]),_:1}),S[18]||(S[18]=M("img",{class:"justify-center align-center align-content-center rounded-pill mt-8 ma-4",src:EX,style:{opacity:"0.9"},width:"400"},null,-1))])):fe("",!0),l.value?($(),me("div",LX,re(a.value),1)):fe("",!0)]),_:1},8,["modelValue"]),i.value?fe("",!0):Op(I.$slots,"default",{key:0})],64))}});async function NX(){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 BX=ue({...Ue(),...XA({fullHeight:!0}),...$t()},"VApp"),VX=_e()({name:"VApp",props:BX(),setup(e,t){let{slots:n}=t;const r=Zt(e),{layoutClasses:s,getLayoutItem:i,items:o,layoutRef:a}=eO(e),{rtlClasses:l}=Or();return Ae(()=>{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}}}),UX=ue({scrollable:Boolean,...Ue(),...Ir(),...vt({tag:"main"})},"VMain"),zX=_e()({name:"VMain",props:UX(),setup(e,t){let{slots:n}=t;const{dimensionStyles:r}=Ar(e),{mainStyles:s}=JA(),{ssrBootStyles:i}=Hd();return Ae(()=>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)]}})),{}}}),HX=$e({__name:"App",setup(e){const t=Zw(),n=as(),r=t.queuedUploads;return ke(r,async()=>{await t.handleNextUpload()}),_t(()=>{NX(),console.debug(`App.vue mounted. Logged in: ${n.hasAuthToken}, Expired: ${n.isLoginExpired}`)}),(s,i)=>{const o=xX,a=SX,l=yX,u=hX,c=fX,d=In("router-view"),f=KK,p=LK,g=rK,m=tK,y=J7,w=K7,b=M7,_=s7,T=GG,x=x6,C=HW;return $(),te(VX,null,{default:v(()=>[h(o),h(a),h(l),Z(n).hasAuthToken&&!Z(n).isLoginExpired||!Z(n).loginRequired?($(),te(u,{key:0})):fe("",!0),Z(n).hasAuthToken&&!Z(n).isLoginExpired||!Z(n).loginRequired?($(),te(c,{key:1})):fe("",!0),h(FX,null,{default:v(()=>[h(zX,null,{default:v(()=>[h(d)]),_:1})]),_:1}),h(f),h(p),h(g),h(m),h(y),h(w),h(b),h(_),h(T),h(x),h(C)]),_:1})}}}),eS="/img/logo.svg",hM=$e({__name:"PrinterCreateAction",props:{floorId:{},floorX:{},floorY:{}},setup(e){const t=e,n=tn(nn.AddOrUpdatePrinterDialog);function r(){n.openDialog(t)}return(s,i)=>($(),te(se,{class:"ma-2",color:"primary",size:"small",rounded:"",onClickCapture:i[0]||(i[0]=kt(o=>r(),["stop"]))},{default:v(()=>[h(J,null,{default:v(()=>i[1]||(i[1]=[k("add")])),_:1}),i[2]||(i[2]=k(" New printer "))]),_:1}))}});class pM extends mr{static async postQuickStopM112Command(t){const n=De.sendQuickStopM112Route(t);return await this.post(n)}}const Cm=ps("GridStore",{state:()=>({gridEditMode:!1})}),jX="thumbnail",qX=(e,t)=>wm({queryKey:[jX,e],queryFn:async()=>e.value?Di.getThumbnail(e.value).then(n=>n.thumbnailBase64||""):"",enabled:!!e&&!!t}),WX={class:"d-flex flex flex-column justify-center",style:{height:"100%"}},GX={key:1,class:"printer-file-or-stream-viewer"},KX={key:2,class:"printer-file-or-stream-viewer"},YX={key:3,class:"printer-menu"},XX={class:"file-name"},QX={key:5,class:"centered-controls"},JX={key:0},ZX={key:1},Vk="rgba(100,100,100,0.1)",eQ=$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=Ft(),r=tr(),s=Xi(),i=Fs(),o=Cm(),a=tn(nn.PrinterControlDialog),l=tn(nn.AddOrUpdatePrinterDialog),u=Dt(),c=P(()=>{var H;return(H=t.printer)==null?void 0:H.id}),d=P(()=>i.largeTiles),f=P(()=>d.value?"80px":"40px"),{data:p}=qX(c,i.thumbnailsEnabled),g=P(()=>c.value?r.isApiResponding(c.value):!1),m=P(()=>c.value?r.isPrinterOperational(c.value):!1),y=P(()=>c.value?r.isPrinterPrinting(c.value):!1),w=P(()=>c.value?r.isPrinterPaused(c.value):!1),b=P(()=>c.value?n.isSelectedPrinter(c.value):!1),_=P(()=>{var H;return((H=n.selectedPrinters)==null?void 0:H.length)&&!b.value}),T=P(()=>i.preferCancelOverQuickStop),x=P(()=>{if(!c.value)return;const H=n.printer(c.value);if(!H)return;const B=r.printerEventsById[c.value],ne=r.socketStatesById[c.value];return cA(H,ne,B)}),C=P(()=>{const H=x.value;return H&&H.rgb||Vk}),I=P(()=>{if(c.value)return r.printerJobsById[c.value]}),S=P(()=>{if(c.value)return r.printingFilePathsByPrinterId[c.value]}),E=async()=>{c.value&&confirm("Are you sure to cancel the current print job?")&&await Ma.stopPrintJob(c.value)},O=async()=>{c.value&&await Ma.pausePrintJob(c.value)},R=async()=>{c.value&&await Ma.resumePrintJob(c.value)},A=()=>{n.setSideNavPrinter(t.printer)},D=async()=>{c.value&&(await Xt.refreshSocket(c.value),u.openInfoMessage({title:"Refreshing connection state"}))},L=()=>{n.setUpdateDialogPrinter(t.printer),l.openDialog()},W=async()=>{if(!c.value)throw new Error("PrinterId not set, cant open dialog");await a.openDialog({printerId:c})},z=async()=>{c.value&&confirm("Are you sure to abort the print in Quick Stop mode? Please reconnect after.")&&await pM.postQuickStopM112Command(c.value)},K=async()=>{c.value&&await Xt.sendPrinterConnectCommand(c.value)},G=async()=>{var H;if(!(!t.printer||!c.value)){if(o.gridEditMode){const B=(H=s.selectedFloor)==null?void 0:H.id;if(!B)throw new Error("Cant clear printer, floor not selected");await ts.deletePrinterFromFloor(B,c.value);return}n.toggleSelectedPrinter(t.printer)}};return(H,B)=>{const ne=hM,q=fr("drop-upload"),Y=fr("drop-printer-position");return Bt(($(),me("div",null,[Bt(($(),te(gt,{class:Fo([{"tile-large":d.value,"tile-selected":b.value,"tile-unselected":_.value,"tile-no-printer":!e.printer},"tile colored-tile rounded-lg"]),elevation:"5",onClick:B[8]||(B[8]=oe=>G())},{default:v(()=>{var oe,ie,be,Q,X,V,ge;return[Bt(M("div",{class:"printer-title"},re(((oe=e.printer)==null?void 0:oe.name)??" "),513),[[Gi,e.printer]]),!e.printer||Z(o).gridEditMode?($(),me("div",{key:0,style:ss([{height:d.value?"calc(120px - 20px)":"calc(84px - 20px)"},{position:"absolute"}]),class:"plus-hover-icon"},[M("div",WX,[e.printer?fe("",!0):($(),te(ne,{key:0,"floor-id":(ie=Z(s).selectedFloor)==null?void 0:ie.id,"floor-x":e.x,"floor-y":e.y},null,8,["floor-id","floor-x","floor-y"])),e.printer?($(),te(se,{key:1,color:"error",rounded:"",small:"",onClickCapture:B[0]||(B[0]=kt(Oe=>G(),["stop"]))},{default:v(()=>[h(J,null,{default:v(()=>B[9]||(B[9]=[k("clear")])),_:1}),B[10]||(B[10]=k(" Clear position "))]),_:1})):fe("",!0)])],4)):fe("",!0),e.printer&&g.value?($(),me("div",GX,[(be=Z(p))!=null&&be.length?($(),te(us,{key:1,src:"data:image/png;base64,"+(Z(p)??""),width:f.value},null,8,["src","width"])):($(),te(us,{key:0,src:Z(Qw),width:f.value,alt:"No thumbnail was found in GCode",style:{opacity:"0.3",filter:"grayscale(100%)"}},null,8,["src","width"]))])):e.printer?($(),me("div",KX,[(Q=x.value)!=null&&Q.text.includes("API")?($(),te(J,{key:0,size:f.value,color:"secondary"},{default:v(()=>B[11]||(B[11]=[k(" wifi_off ")])),_:1},8,["size"])):fe("",!0),e.printer.enabled?fe("",!0):($(),te(J,{key:1,size:f.value,color:"secondary"},{default:v(()=>B[12]||(B[12]=[k(" disabled_by_default ")])),_:1},8,["size"])),(X=x.value)!=null&&X.text.includes("unset")?($(),te(J,{key:2,size:f.value,color:"secondary"},{default:v(()=>B[13]||(B[13]=[k(" question_mark ")])),_:1},8,["size"])):fe("",!0)])):fe("",!0),e.printer&&!Z(o).gridEditMode?($(),me("div",YX,[h(nt,{top:""},{activator:v(({props:Oe})=>[h(se,he({color:"darkgray",elevation:"0",small:"",style:{"border-radius":"7px"}},Oe,{onClick:B[1]||(B[1]=kt(Ne=>A(),["prevent","stop"]))}),{default:v(()=>[h(J,{dark:""},{default:v(()=>B[14]||(B[14]=[k("menu")])),_:1})]),_:2},1040)]),default:v(()=>B[15]||(B[15]=[k("Open printer details")])),_:1})])):fe("",!0),e.printer&&!Z(o).gridEditMode?($(),me("div",{key:4,style:ss([{position:d.value?"inherit":"absolute",top:d.value?"inherit":"30px"},{overflow:"clip"}]),class:"printer-controls"},[M("small",XX,re(S.value??" "),1)],4)):fe("",!0),e.printer&&!Z(o).gridEditMode?($(),me("div",QX,[h(nt,{top:""},{activator:v(({props:Oe})=>[h(se,he({disabled:!g.value||!m.value,size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},Oe,{onClick:B[2]||(B[2]=kt(Ne=>W(),["prevent","stop"]))}),{default:v(()=>[h(J,null,{default:v(()=>B[16]||(B[16]=[k("open_with")])),_:1})]),_:2},1040,["disabled","size"])]),default:v(()=>B[17]||(B[17]=[k("Move and home printer")])),_:1}),h(nt,{top:""},{activator:v(({props:Oe})=>[!m.value&&g.value?($(),te(se,he({key:0,size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},Oe,{onClick:B[3]||(B[3]=kt(Ne=>K(),["prevent","stop"]))}),{default:v(()=>[h(J,null,{default:v(()=>B[18]||(B[18]=[k("usb")])),_:1})]),_:2},1040,["size"])):fe("",!0)]),default:v(()=>B[19]||(B[19]=[k("Connect USB (only for OctoPrint)")])),_:1}),h(nt,{top:""},{activator:v(({props:Oe})=>[h(se,he({size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},Oe,{onClick:B[4]||(B[4]=kt(Ne=>D(),["prevent","stop"]))}),{default:v(()=>[h(J,null,{default:v(()=>B[20]||(B[20]=[k("refresh")])),_:1})]),_:2},1040,["size"])]),default:v(()=>B[21]||(B[21]=[k("Reload printer websocket and refresh all states ")])),_:1}),h(nt,{top:""},{activator:v(({props:Oe})=>[h(se,he({disabled:!g.value||!w.value&&!y.value,size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},Oe,{onClick:B[5]||(B[5]=kt(Ne=>w.value?R():O(),["prevent","stop"]))}),{default:v(()=>[w.value?fe("",!0):($(),te(J,{key:0},{default:v(()=>B[22]||(B[22]=[k("pause")])),_:1})),w.value?($(),te(J,{key:1},{default:v(()=>B[23]||(B[23]=[k("play_arrow")])),_:1})):fe("",!0)]),_:2},1040,["disabled","size"])]),default:v(()=>[k(re(w.value?"Resume print":"Pause print"),1)]),_:1}),h(nt,{top:""},{activator:v(({props:Oe})=>[h(se,he({disabled:!g.value||T.value&&!y.value&&!w.value,size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},Oe,{onClick:B[6]||(B[6]=kt(Ne=>T.value?E():z(),["prevent","stop"]))}),{default:v(()=>[h(J,null,{default:v(()=>[k(re(T.value?"stop":"dangerous"),1)]),_:1})]),_:2},1040,["disabled","size"])]),default:v(()=>[k(re(T.value?"Cancel current print gracefully":"Perform quick stop of printer"),1)]),_:1}),h(nt,{top:""},{activator:v(({props:Oe})=>[h(se,he({size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},Oe,{onClick:B[7]||(B[7]=kt(Ne=>L(),["prevent","stop"]))}),{default:v(()=>[h(J,null,{default:v(()=>B[24]||(B[24]=[k("settings")])),_:1})]),_:2},1040,["size"])]),default:v(()=>B[25]||(B[25]=[k("Open printer settings")])),_:1})])):fe("",!0),e.printer&&!Z(o).gridEditMode?($(),te(ru,{key:6,value:(ge=(V=I.value)==null?void 0:V.progress)==null?void 0:ge.completion,"background-color":"dark-gray",class:"progress-bar",height:"14"},{default:v(({value:Oe})=>{var Ne;return[M("strong",null,re((Oe==null?void 0:Oe.toFixed(1))+"%"),1),h(nt,{disabled:(Ne=e.printer)==null?void 0:Ne.enabled,"close-delay":"100",color:"danger","open-delay":"0",top:""},{activator:v(({props:N})=>{var F,ee,pe;return[M("span",he({class:"xsmall-resized-font text--secondary ml-sm-2"},N),[(F=e.printer)!=null&&F.disabledReason?($(),me("span",JX,[B[27]||(B[27]=M("small",null," MAINTENANCE",-1)),h(J,{class:"d-none d-xl-inline",color:"primary",small:""},{default:v(()=>B[26]||(B[26]=[k("info")])),_:1})])):($(),me("span",ZX,[M("small",{style:ss({"background-color":C.value+"99","border-left":"5px solid "+C.value+"ff",padding:"5px"})},re((pe=(ee=x.value)==null?void 0:ee.text)==null?void 0:pe.toUpperCase()),5)]))],16)]}),default:v(()=>{var N;return[M("span",null,re(((N=e.printer)==null?void 0:N.disabledReason)??"Printer disabled"),1)]}),_:1},8,["disabled"])]}),_:1},8,["value"])):fe("",!0)]}),_:1},8,["class"])),[[q,{printers:[e.printer]}]])])),[[Y,{x:e.x,y:e.y,printerSet:e.printer}]])}}}),mM="FDM-Monster-Client-Vue2";var gM=(e=>(e.PRINTER_PLACE="PRINTER_PLACE",e))(gM||{});function tQ(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===mM&&e.intent==="PRINTER_PLACE"}const nQ=ue({color:String,density:String,...Ue()},"VBannerActions"),rQ=_e()({name:"VBannerActions",props:nQ(),setup(e,t){let{slots:n}=t;return Pr({VBtn:{color:e.color,density:e.density,slim:!0,variant:"text"}}),Ae(()=>{var r;return h("div",{class:["v-banner-actions",e.class],style:e.style},[(r=n.default)==null?void 0:r.call(n)])}),{}}}),sQ=ku("v-banner-text"),iQ=ue({avatar:String,bgColor:String,color:String,icon:He,lines:String,stacked:Boolean,sticky:Boolean,text:String,...ms(),...Ue(),...Rr(),...Ir(),...el({mobile:null}),...vs(),...zo(),...Cu(),...Dn(),...vt(),...$t()},"VBanner"),vM=_e()({name:"VBanner",props:iQ(),setup(e,t){let{slots:n}=t;const{backgroundColorClasses:r,backgroundColorStyles:s}=dr(e,"bgColor"),{borderClasses:i}=Ms(e),{densityClasses:o}=gs(e),{displayClasses:a,mobile:l}=fi(e),{dimensionStyles:u}=Ar(e),{elevationClasses:c}=Ds(e),{locationStyles:d}=Za(e),{positionClasses:f}=Tu(e),{roundedClasses:p}=Un(e),{themeClasses:g}=Zt(e),m=Te(e,"color"),y=Te(e,"density");Pr({VBannerActions:{color:m,density:y}}),Ae(()=>{const w=!!(e.text||n.text),b=!!(e.avatar||e.icon),_=!!(b||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},g.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 T;return[_&&h("div",{key:"prepend",class:"v-banner__prepend"},[n.prepend?h(Ot,{key:"prepend-defaults",disabled:!b,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"},[w&&h(sQ,{key:"text"},{default:()=>{var x;return[((x=n.text)==null?void 0:x.call(n))??e.text]}}),(T=n.default)==null?void 0:T.call(n)]),n.actions&&h(rQ,{key:"actions"},n.actions)]}})})}}),oQ={class:"printer-grid-container"},aQ={key:0,class:"d-flex flex-row justify-start",style:{gap:"10px",width:"100%"}},lQ={key:0,class:"d-flex flex-column justify-start",style:{gap:"10px","margin-top":"10px"}},uQ=$e({__name:"PrinterGrid",props:{gap:{type:String,default:"4px"}},setup(e){const t=Ft(),n=Xi(),r=Fs(),s=Cm();_t(async()=>{await t.loadPrinters(),await n.loadFloors()});const i=e,o=P(()=>n.gridSortedPrinters),a=P(()=>r.gridCols),l=P(()=>r.gridRows),u=P(()=>r.largeTiles),c=P(()=>l.value*a.value),d=P(()=>({display:"grid",gridTemplateColumns:`repeat(${a.value}, 1fr)`,gap:i.gap})),f=T=>T%a.value,p=T=>Math.floor(T/a.value);function g(T,x){x.dataTransfer&&T.id&&x.dataTransfer.setData("text",JSON.stringify({appId:mM,intent:gM.PRINTER_PLACE,printerId:T.id}))}function m(T,x){var S;const C=T,I=x;if(!(!((S=o.value)!=null&&S.length)||!o.value[C]))return o.value[C][I]}async function y(){!s.gridEditMode||!r.frontendSettings||r.frontendSettings.gridRows>=16||(r.frontendSettings.gridRows++,await r.saveFrontendSettings())}async function w(){!s.gridEditMode||!r.frontendSettings||r.frontendSettings.gridCols>=12||(r.frontendSettings.gridCols++,await r.saveFrontendSettings())}async function b(){!s.gridEditMode||!r.frontendSettings||r.frontendSettings.gridRows!=1&&(r.frontendSettings.gridRows--,await r.saveFrontendSettings())}async function _(){!s.gridEditMode||!r.frontendSettings||r.frontendSettings.gridCols!=1&&(r.frontendSettings.gridCols--,await r.saveFrontendSettings())}return(T,x)=>($(),me("div",null,[Z(s).gridEditMode?($(),te(vM,{key:0},{default:v(()=>[h(rt,{style:{"margin-bottom":"-5px"}},{default:v(()=>[h(ze,null,{default:v(()=>[M("span",null," Drag "+re(Z(n).floorlessPrinters.length)+" unplaced printer(s) from here to place it on the grid. ",1),h(ep,null,{default:v(()=>[($(!0),me(Pe,null,Wt(Z(n).floorlessPrinters,C=>($(),te(Sn,{key:C.id,draggable:"",size:"small",style:{cursor:"move"},onDragstart:I=>g(C,I)},{default:v(()=>[k(re(C.name),1)]),_:2},1032,["onDragstart"]))),128))]),_:1})]),_:1}),h(ze,null,{default:v(()=>[M("div",null,[x[6]||(x[6]=k(" Clear printers by clicking on ")),M("strong",null,[h(J,null,{default:v(()=>x[4]||(x[4]=[k("disabled_visible")])),_:1}),x[5]||(x[5]=k(" Click to clear "))])])]),_:1})]),_:1})]),_:1})):fe("",!0),M("div",oQ,[M("div",{class:"printer-grid",style:ss(d.value)},[($(!0),me(Pe,null,Wt(c.value,C=>($(),me("div",{key:`printer-${f(C-1)}-${p(C-1)}`,class:Fo(["printer-cell",{"printer-cell-large":u.value}])},[h(eQ,{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?($(),me("div",aQ,[x[9]||(x[9]=k(" Columns ")),h(se,{"x-small":"",rounded:"",disabled:Z(r).gridCols<=1,onClick:x[0]||(x[0]=C=>_())},{default:v(()=>[h(J,null,{default:v(()=>x[7]||(x[7]=[k("remove")])),_:1})]),_:1},8,["disabled"]),h(se,{"x-small":"",rounded:"",disabled:Z(r).gridCols>=12,onClick:x[1]||(x[1]=C=>w())},{default:v(()=>[h(J,null,{default:v(()=>x[8]||(x[8]=[k("add")])),_:1})]),_:1},8,["disabled"])])):fe("",!0)],4),Z(s).gridEditMode?($(),me("div",lQ,[x[12]||(x[12]=k(" Rows ")),h(se,{"x-small":"",rounded:"",disabled:Z(r).gridRows<=1,onClick:x[2]||(x[2]=C=>b())},{default:v(()=>[h(J,null,{default:v(()=>x[10]||(x[10]=[k("remove")])),_:1})]),_:1},8,["disabled"]),h(se,{"x-small":"",rounded:"",disabled:Z(r).gridRows>=16,onClick:x[3]||(x[3]=C=>y())},{default:v(()=>[h(J,null,{default:v(()=>x[11]||(x[11]=[k("add")])),_:1})]),_:1},8,["disabled"])])):fe("",!0)]),x[13]||(x[13]=M("img",{alt:"FDM Monster Background",class:"grid-bg-img align-content-center",src:eS,style:{opacity:"0.08","pointer-events":"none"}},null,-1))]))}}),cQ=Go(uQ,[["__scopeId","data-v-0a20edf3"]]);function dQ(e,t){return e?t.map(n=>({file:n,printer:e})):[]}function yM(e,t){return!(e!=null&&e.length)||!t?[]:e.map(n=>({file:t,printer:n}))}const fQ=ue({indeterminate:Boolean,inset:Boolean,flat:Boolean,loading:{type:[Boolean,String],default:!1},...il(),...ym()},"VSwitch"),ap=_e()({name:"VSwitch",inheritAttrs:!1,props:fQ(),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}=Pd(e),{isFocused:a,focus:l,blur:u}=Uu(e),c=U(),d=Et&&window.matchMedia("(forced-colors: active)").matches,f=P(()=>typeof e.loading=="string"&&e.loading!==""?e.loading:e.color),p=hs(),g=P(()=>e.id||`switch-${p}`);function m(){s.value&&(s.value=!1)}function y(w){var b,_;w.stopPropagation(),w.preventDefault(),(_=(b=c.value)==null?void 0:b.input)==null||_.click()}return Ae(()=>{const[w,b]=Qa(n),_=cs.filterProps(e),T=Ga.filterProps(e);return h(cs,he({class:["v-switch",{"v-switch--flat":e.flat},{"v-switch--inset":e.inset},{"v-switch--indeterminate":s.value},o.value,e.class]},w,_,{modelValue:i.value,"onUpdate:modelValue":x=>i.value=x,id:g.value,focused:a.value,style:e.style}),{...r,default:x=>{let{id:C,messagesId:I,isDisabled:S,isReadonly:E,isValid:O}=x;const R={model:i,isValid:O};return h(Ga,he({ref:c},T,{modelValue:i.value,"onUpdate:modelValue":[A=>i.value=A,m],id:C.value,"aria-describedby":I.value,type:"checkbox","aria-checked":s.value?"mixed":void 0,disabled:S.value,readonly:E.value,onFocus:l,onBlur:u},b),{...r,default:A=>{let{backgroundColorClasses:D,backgroundColorStyles:L}=A;return h("div",{class:["v-switch__track",d?void 0:D.value],style:L.value,onClick:y},[r["track-true"]&&h("div",{key:"prepend",class:"v-switch__track-true"},[r["track-true"](R)]),r["track-false"]&&h("div",{key:"append",class:"v-switch__track-false"},[r["track-false"](R)])])},input:A=>{let{inputNode:D,icon:L,backgroundColorClasses:W,backgroundColorStyles:z}=A;return h(Pe,null,[D,h("div",{class:["v-switch__thumb",{"v-switch__thumb--filled":L||e.loading},e.inset||d?void 0:W.value],style:e.inset?void 0:z.value},[r.thumb?h(Ot,{defaults:{VIcon:{icon:L,size:"x-small"}}},{default:()=>[r.thumb({...R,icon:L})]}):h(ZN,null,{default:()=>[e.loading?h(Vp,{name:"v-switch",active:!0,color:O.value===!1?void 0:f.value},{default:K=>r.loader?r.loader(K):h(ni,{active:K.isActive,color:K.color,indeterminate:!0,size:"16",width:"2"},null)}):L&&h(J,{key:String(L),icon:L,size:"x-small"},null)]})])])}})}})}),{}}}),hQ={class:"d-flex flex-wrap gap-2"},pQ={class:"pr-2"},mQ={class:"pr-2"},gQ={class:"pr-2"},vQ={class:"pr-2"},yQ={class:"pr-2"},bQ={class:"ma-4 pt-6"},wQ=$e({__name:"HomeToolbar",setup(e){const t=Ft(),n=tr(),r=Xi(),s=Cm(),i=P(()=>r.selectedFloorIndex),o=P(()=>r.floors);function a(l){r.changeSelectedFloorByIndex(l)}return(l,u)=>($(),te(pr,{flat:""},{default:v(()=>{var c;return[h(NT,{"model-value":i.value,class:"ml-7",mandatory:"",rounded:"","onUpdate:modelValue":a},{default:v(()=>[($(!0),me(Pe,null,Wt(o.value,d=>($(),te(se,{key:d.id,size:"small"},{default:v(()=>[h(J,null,{default:v(()=>u[2]||(u[2]=[k("layers")])),_:1}),k(" "+re(d.name),1)]),_:2},1024))),128))]),_:1},8,["model-value"]),(c=Z(t).printers)!=null&&c.length?fe("",!0):($(),te(se,{key:0,class:"mt-0 ml-6",color:"primary",to:"/printers"},{default:v(()=>u[3]||(u[3]=[k(" You have no printers. Click here to start! ")])),_:1})),Z(r).floorlessPrinters.length?($(),te(dn,{key:1,class:"ml-4"},{default:v(()=>[h(J,null,{default:v(()=>u[4]||(u[4]=[k("warning")])),_:1}),k(" "+re(Z(r).floorlessPrinters.length)+" unplaced printer(s)! ",1)]),_:1})):fe("",!0),h(wn),M("span",hQ,[M("span",pQ,[h(J,null,{default:v(()=>u[5]||(u[5]=[k("print")])),_:1}),k(" "+re(Z(n).printingCount),1)]),M("span",mQ,[h(J,null,{default:v(()=>u[6]||(u[6]=[k("ac_unit")])),_:1}),k(" "+re(Z(n).operationalNotPrintingCount),1)]),M("span",gQ,[h(J,null,{default:v(()=>u[7]||(u[7]=[k("handyman")])),_:1}),k(" "+re(Z(t).maintenanceCount),1)]),M("span",vQ,[h(J,null,{default:v(()=>u[8]||(u[8]=[k("usb_off")])),_:1}),k(" "+re(Z(t).disconnectedCount),1)]),M("span",yQ,[h(J,null,{default:v(()=>u[9]||(u[9]=[k("print_disabled")])),_:1}),k(" "+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:v(()=>[h(J,null,{default:v(()=>u[10]||(u[10]=[k("settings")])),_:1})]),_:1}),M("div",bQ,[h(ap,{modelValue:Z(s).gridEditMode,"onUpdate:modelValue":u[1]||(u[1]=d=>Z(s).gridEditMode=d),label:"Grid Edit Mode"},null,8,["modelValue"])])]}),_:1}))}}),SQ={class:"pl-1"},_Q=$e({__name:"PrinterGridView",setup(e){const t=Cm(),n=Ft(),r=tr(),s=Zw(),i=Dt(),o=U(void 0),a=P(()=>n.selectedPrinters.length>0),l=P(()=>n.selectedPrinters),u=U(null),c=()=>{u.value&&(u.value.value="",o.value=void 0)},d=()=>{n.clearSelectedPrinters()},f=async()=>{var b;const w=await tn(nn.BatchReprintDialog).handleAsync((b=n.selectedPrinters)==null?void 0:b.map(_=>_.id));console.log("[PrinterGridView] Dialog completed",w)},p=()=>{const w=l.value,b=w.filter(x=>r.isApiResponding(x.id));if(!o.value)return;const _=w.length-b.length;_>0&&i.openInfoMessage({title:`${_} printers inaccessible`,subtitle:"These were skipped from uploading."});const T=yM(b,o.value);s.queueUploads(T),u.value&&(u.value.value=""),d()},g=()=>{u.value&&u.value.files?o.value=u.value.files[0]:o.value=void 0},m=w=>{n.toggleSelectedPrinter(w)},y=w=>{Xt.openPrinterURL(w.printerURL)};return(w,b)=>{const _=fr("drop-upload");return $(),me("div",null,[h(wQ),Z(t).gridEditMode?fe("",!0):Bt(($(),te(vM,{key:0},{default:v(()=>[h(rt,{style:{"margin-bottom":"-5px"}},{default:v(()=>[h(ze,{style:{padding:"5px 0 0 15px"}},{default:v(()=>[h(ep,{class:"d-inline-block"},{default:v(()=>[l.value.length===0?($(),te(Sn,{key:0,size:"small"},{default:v(()=>b[6]||(b[6]=[k(" No selected printers ")])),_:1})):fe("",!0),($(!0),me(Pe,null,Wt(l.value,T=>($(),te(Sn,{key:T.id,closable:"",color:"primary",size:"small",onClick:x=>y(T),"onClick:close":x=>m(T)},{default:v(()=>[k(re(T.name),1)]),_:2},1032,["onClick","onClick:close"]))),128))]),_:1})]),_:1}),h(ze,{align:"right",style:{padding:"0"}},{default:v(()=>[o.value?($(),te(ep,{key:0,class:"float-end"},{default:v(()=>[h(Sn,{closable:"","onClick:close":b[0]||(b[0]=T=>c())},{default:v(()=>[k(re(o.value.name)+" ",1),M("strong",SQ,re(Z(zA)(o.value.size)),1)]),_:1})]),_:1})):fe("",!0),b[12]||(b[12]=M("br",null,null,-1)),h(se,{disabled:!a.value,color:"primary",size:"x-small",onClick:b[1]||(b[1]=T=>f())},{default:v(()=>[h(J,{class:"pr-2",size:"small"},{default:v(()=>b[7]||(b[7]=[k(" refresh ")])),_:1}),b[8]||(b[8]=k(" Batch reprint "))]),_:1},8,["disabled"]),h(se,{color:a.value?"primary":"secondary",class:"ml-2",size:"x-small",onClick:b[2]||(b[2]=T=>d())},{default:v(()=>[h(J,{class:"pr-2",size:"small"},{default:v(()=>b[9]||(b[9]=[k(" delete ")])),_:1}),k(" Clear all ("+re(l.value.length)+") ",1)]),_:1},8,["color"]),h(se,{class:"ml-2",color:"primary",size:"x-small",onClick:b[3]||(b[3]=T=>{var x;return(x=u.value)==null?void 0:x.click()})},{default:v(()=>b[10]||(b[10]=[k(" Select gcode file ")])),_:1}),h(se,{disabled:!o.value,class:"ml-2 mr-5",color:"green",size:"x-small",onClick:b[4]||(b[4]=T=>p())},{default:v(()=>b[11]||(b[11]=[k(" Upload gcode file ")])),_:1},8,["disabled"]),M("input",{ref_key:"fileUpload",ref:u,multiple:!1,accept:".gcode",style:{display:"none"},type:"file",onChange:b[5]||(b[5]=T=>g())},null,544)]),_:1})]),_:1})]),_:1})),[[_,{printers:l.value}]]),h(cQ,{class:"ma-2"})])}}}),kQ=$e({name:"RefreshFilesAction",components:{},props:{printer:Object},setup:()=>({printersStore:Ft()}),methods:{async getFiles(){this.printer&&await this.printersStore.loadPrinterFiles(this.printer.id)}}});function xQ(e,t,n,r,s,i){return $(),te(se,{color:"secondary",onClick:t[0]||(t[0]=o=>e.getFiles())},{default:v(()=>[h(J,null,{default:v(()=>t[1]||(t[1]=[k("refresh")])),_:1}),t[2]||(t[2]=M("span",{class:"d-none d-lg-inline"}," Refresh files ",-1))]),_:1})}const bM=Go(kQ,[["render",xQ]]),EQ=$e({name:"PrinterDetails",components:{RefreshFilesAction:bM},props:{printer:Object},setup:()=>({printersStore:Ft(),printerStateStore:tr()}),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 CQ(e,t,n,r,s,i){const o=bM,a=fr("drop-upload");return e.printer?Bt(($(),te(Vn,{key:0,style:ss(e.dragging?"background-color:red":""),transition:"scale-transition"},{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,null,{default:v(()=>[k(" Name: "+re(e.printer.name)+" ",1),t[0]||(t[0]=M("br",null,null,-1)),k(" URL: "+re(e.printer.printerURL)+" ",1),t[1]||(t[1]=M("br",null,null,-1)),t[2]||(t[2]=k(" Host: ")),h(Sn,{size:"small"},{default:v(()=>[k(re(e.apiState),1)]),_:1}),t[3]||(t[3]=M("br",null,null,-1)),t[4]||(t[4]=k(" WebSocket: ")),h(Sn,{size:"small"},{default:v(()=>[k(re(e.socketState),1)]),_:1}),t[5]||(t[5]=M("br",null,null,-1)),t[6]||(t[6]=k(" Printer: ")),h(Sn,{size:"small"},{default:v(()=>[k(re(e.printerTextState),1)]),_:1})]),_:1}),h(ze,null,{default:v(()=>[h(o,{printer:e.printer,class:"d-flex justify-end"},null,8,["printer"])]),_:1})]),_:1})]),_:1},8,["style"])),[[a,{printers:[e.printer]}]]):fe("",!0)}const TQ=Go(EQ,[["render",CQ]]),PQ=$e({__name:"PrinterUrlAction",props:{printer:{}},setup(e){const t=e;async function n(){Xt.openPrinterURL(t.printer.printerURL)}return(r,s)=>($(),te(nt,{location:"top"},{activator:v(({props:i})=>[h(se,he(i,{color:"secondary",rounded:"",size:"small",onClickCapture:s[0]||(s[0]=kt(o=>n(),["stop"]))}),{default:v(()=>[h(J,null,{default:v(()=>s[1]||(s[1]=[k("directions")])),_:1})]),_:2},1040)]),default:v(()=>s[2]||(s[2]=[k("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 IQ(e,t,n,r,s,i){return $(),te(nt,{location:"top"},{activator:v(({props:o})=>[h(se,he(o,{color:"secondary",class:"ma-2",size:"small",rounded:"",onClickCapture:t[0]||(t[0]=kt(a=>e.openSettings(),["stop"]))}),{default:v(()=>[h(J,null,{default:v(()=>t[1]||(t[1]=[k("settings")])),_:1})]),_:2},1040)]),default:v(()=>t[2]||(t[2]=[k("Update printer settings")])),_:1})}const AQ=Go(RQ,[["render",IQ]]),OQ=ue({bordered:Boolean,color:String,content:[Number,String],dot:Boolean,floating:Boolean,icon:He,inline:Boolean,label:{type:String,default:"$vuetify.badge"},max:[Number,String],modelValue:{type:Boolean,default:!0},offsetX:[Number,String],offsetY:[Number,String],textColor:String,...Ue(),...zo({location:"top end"}),...Dn(),...vt(),...$t(),...Iu({transition:"scale-rotate-transition"})},"VBadge"),wM=_e()({name:"VBadge",inheritAttrs:!1,props:OQ(),setup(e,t){const{backgroundColorClasses:n,backgroundColorStyles:r}=dr(Te(e,"color")),{roundedClasses:s}=Un(e),{t:i}=Wr(),{textColorClasses:o,textColorStyles:a}=Is(Te(e,"textColor")),{themeClasses:l}=DT(),{locationStyles:u}=Za(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 Ae(()=>{const c=Number(e.content),d=!e.max||isNaN(c)?e.content:c<=Number(e.max)?c:`${e.max}+`,[f,p]=Tv(t.attrs,["aria-atomic","aria-label","aria-live","role","title"]);return h(e.tag,he({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 g,m;return[h("div",{class:"v-badge__wrapper"},[(m=(g=t.slots).default)==null?void 0:m.call(g),h(si,{transition:e.transition},{default:()=>{var y,w;return[Bt(h("span",he({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?(w=(y=t.slots).badge)==null?void 0:w.call(y):e.icon?h(J,{icon:e.icon},null):d]),[[Gi,e.modelValue]])]}})])]}})}),{}}}),MQ=$e({__name:"PrinterConnectionAction",props:{printer:{}},setup(e){const t=e,n=tr();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 Xt.sendPrinterDisconnectCommand(t.printer.id);await Xt.sendPrinterConnectCommand(t.printer.id)}return(o,a)=>($(),te(nt,{location:"top"},{activator:v(({props:l})=>[o.printer.enabled?($(),te(wM,{key:0,color:r()?"green":"red",class:"pa-2"},{badge:v(()=>[r()?($(),te(J,{key:0},{default:v(()=>a[0]||(a[0]=[k("check")])),_:1})):($(),te(J,{key:1},{default:v(()=>a[1]||(a[1]=[k("close")])),_:1}))]),default:v(()=>[h(se,he({disabled:s()},l,{color:"secondary",rounded:"",size:"small",onClick:kt(i,["stop"])}),{default:v(()=>[h(J,null,{default:v(()=>a[2]||(a[2]=[k("usb")])),_:1})]),_:2},1040,["disabled"])]),_:2},1032,["color"])):fe("",!0)]),default:v(()=>a[3]||(a[3]=[k("Connect USB (OctoPrint only)")])),_:1}))}}),DQ=$e({__name:"PrinterQuickStopAction",props:{printer:{}},setup(e){const t=e;async function n(){confirm("Are you sure to quick stop this printer?")&&await pM.postQuickStopM112Command(t.printer.id)}return(r,s)=>($(),te(nt,{location:"top"},{activator:v(({props:i})=>[r.printer.enabled?($(),te(wM,{key:0,class:"ma-2"},{badge:v(()=>[h(J,null,{default:v(()=>s[0]||(s[0]=[k("bolt")])),_:1})]),default:v(()=>[h(se,he(i,{color:"secondary",size:"small",rounded:"",onClick:kt(n,["stop"])}),{default:v(()=>[h(J,null,{default:v(()=>s[1]||(s[1]=[k("dangerous")])),_:1})]),_:2},1040)]),_:2},1024)):fe("",!0)]),default:v(()=>s[2]||(s[2]=[k("Perform quick stop of printer")])),_:1}))}});class SM extends mr{static async getSettings(t){const n=`${De.getPrinterSettingsRoute(t)}`;return await this.get(n)}static async setGCodeAnalysis(t,n=!1){const r=`${De.setPrinterSettingsGCodeAnalysisRoute(t)}`;return await this.post(r,{enabled:n})}static async syncPrinterName(t){const n=`${De.syncPrinterNameSettingRoute(t)}`;return await this.post(n)}}const $Q=$e({__name:"SyncPrinterNameAction",props:{printer:{}},setup(e){const t=e,n=Dt();async function r(){await SM.syncPrinterName(t.printer.id),n.openInfoMessage({title:"Synced printer name to OctoPrint"})}return(s,i)=>($(),te(nt,{location:"top"},{activator:v(({props:o})=>[h(se,he(o,{color:"secondary",size:"small",rounded:"",onClickCapture:i[0]||(i[0]=kt(a=>r(),["stop"]))}),{default:v(()=>[h(J,null,{default:v(()=>i[1]||(i[1]=[k("badge")])),_:1})]),_:2},1040)]),default:v(()=>i[2]||(i[2]=[k(" Set OctoPrints name to the FDM Monster Name ")])),_:1}))}}),LQ=$e({__name:"PrinterDeleteAction",props:{printer:{}},setup(e){const t=e,n=Ft(),r=tr();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)=>($(),te(nt,{location:"top"},{activator:v(({props:a})=>[h(se,he(a,{class:"ms-4",color:"secondary",size:"small",rounded:"",onClick:kt(s,["prevent","stop"])}),{default:v(()=>[h(J,null,{default:v(()=>o[0]||(o[0]=[k("delete")])),_:1})]),_:2},1040)]),default:v(()=>o[1]||(o[1]=[k("Delete printer")])),_:1}))}});class hl extends mr{static async createGroup(t){const n=`${De.createGroupRoute}`,r={name:t};return await this.post(n,r)}static async deleteGroup(t){const n=`${De.deleteGroupRoute(t)}`;return await this.delete(n)}static async getGroupsWithPrinters(){const t=`${De.printerGroupRoute}`;return await this.get(t)}static async addPrinterToGroup(t,n){const r=`${De.addPrinterToGroupRoute(t)}`,s={printerId:n};return await this.post(r,s)}static async deletePrinterFromGroup(t,n){const r=`${De.deletePrinterFromGroupRoute(t)}`,s={printerId:n};return await this.delete(r,s)}static async updateGroupName(t,n){const r=`${De.updateGroupNameRoute(t)}`,s={name:n};return await this.patch(r,s)}}const FQ=(e,t,n)=>{if(e==null||t==null)return-1;e=e.toString().toLocaleLowerCase(),t=t.toString().toLocaleLowerCase();const r=[];let s=e.indexOf(t);for(;~s;)r.push([s,s+t.length]),s=e.indexOf(t,s+t.length);return r.length?r:-1};function Vg(e,t){if(!(e==null||typeof e=="boolean"||e===-1))return typeof e=="number"?[[e,t.length]]:Array.isArray(e[0])?e:[e]}const NQ=ue({customFilter:Function,customKeyFilter:Object,filterKeys:[Array,String],filterMode:{type:String,default:"intersection"},noFilter:Boolean},"filter");function BQ(e,t,n){var a;const r=[],s=(n==null?void 0:n.default)??FQ,i=n!=null&&n.filterKeys?An(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]=An(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 w of y){const b=Fn(c,w),_=(a=n==null?void 0:n.customKeyFilter)==null?void 0:a[w];if(p=_?_(b,t,u):s(b,t,u),p!==-1&&p!==!1)_?d[w]=Vg(p,t):f[w]=Vg(p,t);else if((n==null?void 0:n.filterMode)==="every")continue e}}else p=s(u,t,u),p!==-1&&p!==!1&&(f.title=Vg(p,t));const g=Object.keys(f).length,m=Object.keys(d).length;if(!g&&!m||(n==null?void 0:n.filterMode)==="union"&&m!==o&&!g||(n==null?void 0:n.filterMode)==="intersection"&&(m!==o||!g))continue}r.push({index:l,matches:{...f,...d}})}return r}function VQ(e,t,n,r){const s=Ie([]),i=Ie(new Map),o=P(()=>r!=null&&r.transform?Z(t).map(l=>[l,r.transform(l)]):Z(t));On(()=>{const l=typeof n=="function"?n():Z(n),u=typeof l!="string"&&typeof l!="number"?"":String(l),c=BQ(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(g=>{let{index:m,matches:y}=g;const w=d[m];f.push(w),p.set(w.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 UQ=ue({expandOnClick:Boolean,showExpand:Boolean,expanded:{type:Array,default:()=>[]}},"DataTable-expand"),_M=Symbol.for("vuetify:datatable:expanded");function zQ(e){const t=Te(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(_M,o),o}function kM(){const e=Xe(_M);if(!e)throw new Error("foo");return e}const HQ=ue({groupBy:{type:Array,default:()=>[]}},"DataTable-group"),xM=Symbol.for("vuetify:data-table-group");function jQ(e){return{groupBy:st(e,"groupBy")}}function qQ(e){const{disableSort:t,groupBy:n,sortBy:r}=e,s=U(new Set),i=P(()=>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 g of f.items)"type"in g&&g.type==="group"?p.push(...d(g)):p.push(g);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(xM,u),u}function EM(){const e=Xe(xM);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=Ba(r.raw,t);n.has(s)||n.set(s,[]),n.get(s).push(r)}return n}function CM(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?CM(a,o,n+1,c):a,type:"group"})}),i}function TM(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(...TM(r.items,t))):n.push(r);return n}function GQ(e,t,n){return{flatItems:P(()=>{if(!t.value.length)return e.value;const s=CM(e.value,t.value.map(i=>i.key));return TM(s,n.value)})}}function KQ(e){let{page:t,itemsPerPage:n,sortBy:r,groupBy:s,search:i}=e;const o=an("VDataTable"),a=P(()=>({page:t.value,itemsPerPage:n.value,sortBy:r.value,groupBy:s.value,search:i.value}));let l=null;ke(a,()=>{Ps(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 YQ=ue({page:{type:[Number,String],default:1},itemsPerPage:{type:[Number,String],default:10}},"DataTable-paginate"),PM=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 QQ(e){const{page:t,itemsPerPage:n,itemsLength:r}=e,s=P(()=>n.value===-1?0:n.value*(t.value-1)),i=P(()=>n.value===-1?r.value:Math.min(r.value,s.value+n.value)),o=P(()=>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=Er(t.value+1,1,o.value)}function u(){t.value=Er(t.value-1,1,o.value)}function c(f){t.value=Er(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(PM,d),d}function JQ(){const e=Xe(PM);if(!e)throw new Error("Missing pagination!");return e}function ZQ(e){const t=an("usePaginatedItems"),{items:n,startIndex:r,stopIndex:s,itemsPerPage:i}=e,o=P(()=>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 eJ={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}},RM={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 RM.select({items:n,value:t,selected:r})}},IM={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 IM.select({items:n,value:t,selected:r})}},tJ=ue({showSelect:Boolean,selectStrategy:{type:[String,Object],default:"page"},modelValue:{type:Array,default:()=>[]},valueComparator:{type:Function,default:Ps}},"DataTable-select"),AM=Symbol.for("vuetify:data-table-selection");function nJ(e,t){let{allItems:n,currentPage:r}=t;const s=st(e,"modelValue",e.modelValue,b=>new Set(An(b).map(_=>{var T;return((T=n.value.find(x=>e.valueComparator(_,x.value)))==null?void 0:T.value)??_})),b=>[...b.values()]),i=P(()=>n.value.filter(b=>b.selectable)),o=P(()=>r.value.filter(b=>b.selectable)),a=P(()=>{if(typeof e.selectStrategy=="object")return e.selectStrategy;switch(e.selectStrategy){case"single":return eJ;case"all":return IM;case"page":default:return RM}}),l=Ie(null);function u(b){return An(b).every(_=>s.value.has(_.value))}function c(b){return An(b).some(_=>s.value.has(_.value))}function d(b,_){const T=a.value.select({items:b,value:_,selected:new Set(s.value)});s.value=T}function f(b,_,T){const x=[];if(_=_??r.value.findIndex(C=>C.value===b.value),e.selectStrategy!=="single"&&(T!=null&&T.shiftKey)&&l.value!==null){const[C,I]=[l.value,_].sort((S,E)=>S-E);x.push(...r.value.slice(C,I+1))}else x.push(b),l.value=_;d(x,!u([b]))}function p(b){const _=a.value.selectAll({value:b,allItems:i.value,currentPage:o.value,selected:new Set(s.value)});s.value=_}const g=P(()=>s.value.size>0),m=P(()=>{const b=a.value.allSelected({allItems:i.value,currentPage:o.value});return!!b.length&&u(b)}),y=P(()=>a.value.showSelectAll),w={toggleSelect:f,select:d,selectAll:p,isSelected:u,isSomeSelected:c,someSelected:g,allSelected:m,showSelectAll:y,lastSelectedIndex:l,selectStrategy:a};return Gt(AM,w),w}function Tm(){const e=Xe(AM);if(!e)throw new Error("Missing selection!");return e}const rJ=ue({sortBy:{type:Array,default:()=>[]},customKeySort:Object,multiSort:Boolean,mustSort:Boolean},"DataTable-sort"),OM=Symbol.for("vuetify:data-table-sort");function sJ(e){const t=st(e,"sortBy"),n=Te(e,"mustSort"),r=Te(e,"multiSort");return{sortBy:t,mustSort:n,multiSort:r}}function iJ(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(OM,a),a}function MM(){const e=Xe(OM);if(!e)throw new Error("Missing sort!");return e}function oJ(e,t,n,r){const s=Wr();return{sortedItems:P(()=>{var o,a;return n.value.length?aJ(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 aJ(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 g=Ba(o[1],f),m=Ba(a[1],f),y=o[0].raw,w=a[0].raw;if(p==="desc"&&([g,m]=[m,g],[y,w]=[w,y]),(l=r==null?void 0:r.sortRawFunctions)!=null&&l[f]){const b=r.sortRawFunctions[f](y,w);if(b==null)continue;if(d=!0,b)return b}if((u=r==null?void 0:r.sortFunctions)!=null&&u[f]){const b=r.sortFunctions[f](g,m);if(b==null)continue;if(d=!0,b)return b}if(!d){if(g instanceof Date&&m instanceof Date)return g.getTime()-m.getTime();if([g,m]=[g,m].map(b=>b!=null?b.toString().toLocaleLowerCase():b),g!==m)return ef(g)&&ef(m)?0:ef(g)?-1:ef(m)?1:!isNaN(g)&&!isNaN(m)?Number(g)-Number(m):s.compare(g,m)}}return 0}).map(o=>{let[a]=o;return a})}function lJ(){const e=U([]);RC(()=>e.value=[]);function t(n,r){e.value[r]=n}return{refs:e,updateRef:t}}const uJ=ue({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:He,default:"$first"},prevIcon:{type:He,default:"$prev"},nextIcon:{type:He,default:"$next"},lastIcon:{type:He,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(),...Ue(),...Rr(),...vs(),...Dn(),...Eu(),...vt({tag:"nav"}),...$t(),...$s({variant:"text"})},"VPagination"),Uk=_e()({name:"VPagination",props:uJ(),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}=Wr(),{isRtl:a}=Or(),{themeClasses:l}=Zt(e),{width:u}=fi(),c=Ie(-1);Pr(void 0,{scoped:!0});const{resizeRef:d}=Va(S=>{if(!S.length)return;const{target:E,contentRect:O}=S[0],R=E.querySelector(".v-pagination__list > *");if(!R)return;const A=O.width,D=R.offsetWidth+parseFloat(getComputedStyle(R).marginRight)*2;c.value=m(A,D)}),f=P(()=>parseInt(e.length,10)),p=P(()=>parseInt(e.start,10)),g=P(()=>e.totalVisible!=null?parseInt(e.totalVisible,10):c.value>=0?c.value:m(u.value,58));function m(S,E){const O=e.showFirstLastPage?5:3;return Math.max(0,Math.floor(Number(((S-E*O)/E).toFixed(2))))}const y=P(()=>{if(f.value<=0||isNaN(f.value)||f.value>Number.MAX_SAFE_INTEGER)return[];if(g.value<=0)return[];if(g.value===1)return[s.value];if(f.value<=g.value)return kl(f.value,p.value);const S=g.value%2===0,E=S?g.value/2:Math.floor(g.value/2),O=S?E:E+1,R=f.value-E;if(O-s.value>=0)return[...kl(Math.max(1,g.value-1),p.value),e.ellipsis,f.value];if(s.value-R>=(S?1:0)){const A=g.value-1,D=f.value-A+p.value;return[p.value,e.ellipsis,...kl(A,D)]}else{const A=Math.max(1,g.value-2),D=A===1?s.value:s.value-Math.ceil(A/2)+p.value;return[p.value,e.ellipsis,...kl(A,D),e.ellipsis,f.value]}});function w(S,E,O){S.preventDefault(),s.value=E,O&&r(O,E)}const{refs:b,updateRef:_}=lJ();Pr({VPaginationBtn:{color:Te(e,"color"),border:Te(e,"border"),density:Te(e,"density"),size:Te(e,"size"),variant:Te(e,"variant"),rounded:Te(e,"rounded"),elevation:Te(e,"elevation")}});const T=P(()=>y.value.map((S,E)=>{const O=R=>_(R,E);if(typeof S=="string")return{isActive:!1,key:`ellipsis-${E}`,page:S,props:{ref:O,ellipsis:!0,icon:!0,disabled:!0}};{const R=S===s.value;return{isActive:R,key:S,page:o(S),props:{ref:O,ellipsis:!1,icon:!0,disabled:!!e.disabled||Number(e.length)<2,color:R?e.activeColor:e.color,"aria-current":R,"aria-label":i(R?e.currentPageAriaLabel:e.pageAriaLabel,S),onClick:A=>w(A,S)}}}})),x=P(()=>{const S=!!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:O=>w(O,p.value,"first"),disabled:S,"aria-label":i(e.firstAriaLabel),"aria-disabled":S}:void 0,prev:{icon:a.value?e.nextIcon:e.prevIcon,onClick:O=>w(O,s.value-1,"prev"),disabled:S,"aria-label":i(e.previousAriaLabel),"aria-disabled":S},next:{icon:a.value?e.prevIcon:e.nextIcon,onClick:O=>w(O,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:O=>w(O,p.value+f.value-1,"last"),disabled:E,"aria-label":i(e.lastAriaLabel),"aria-disabled":E}:void 0}});function C(){var E;const S=s.value-p.value;(E=b.value[S])==null||E.$el.focus()}function I(S){S.key===b_.left&&!e.disabled&&s.value>Number(e.start)?(s.value=s.value-1,Mt(C)):S.key===b_.right&&!e.disabled&&s.value<p.value+f.value-1&&(s.value=s.value+1,Mt(C))}return Ae(()=>h(e.tag,{ref:d,class:["v-pagination",l.value,e.class],style:e.style,role:"navigation","aria-label":i(e.ariaLabel),onKeydown:I,"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(x.value.first):h(se,he({_as:"VPaginationBtn"},x.value.first),null)]),h("li",{key:"prev",class:"v-pagination__prev","data-test":"v-pagination-prev"},[n.prev?n.prev(x.value.prev):h(se,he({_as:"VPaginationBtn"},x.value.prev),null)]),T.value.map((S,E)=>h("li",{key:S.key,class:["v-pagination__item",{"v-pagination__item--is-active":S.isActive}],"data-test":"v-pagination-item"},[n.item?n.item(S):h(se,he({_as:"VPaginationBtn"},S.props),{default:()=>[S.page]})])),h("li",{key:"next",class:"v-pagination__next","data-test":"v-pagination-next"},[n.next?n.next(x.value.next):h(se,he({_as:"VPaginationBtn"},x.value.next),null)]),e.showFirstLastPage&&h("li",{key:"last",class:"v-pagination__last","data-test":"v-pagination-last"},[n.last?n.last(x.value.last):h(se,he({_as:"VPaginationBtn"},x.value.last),null)])])]})),{}}}),DM=ue({prevIcon:{type:He,default:"$prev"},nextIcon:{type:He,default:"$next"},firstIcon:{type:He,default:"$first"},lastIcon:{type:He,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"),zk=_e()({name:"VDataTableFooter",props:DM(),setup(e,t){let{slots:n}=t;const{t:r}=Wr(),{page:s,pageCount:i,startIndex:o,stopIndex:a,itemsLength:l,itemsPerPage:u,setItemsPerPage:c}=JQ(),d=P(()=>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 Ae(()=>{var p;const f=Uk.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(Do,{items:d.value,modelValue:u.value,"onUpdate:modelValue":g=>c(Number(g)),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(Uk,he({modelValue:s.value,"onUpdate:modelValue":g=>s.value=g,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)])])}),{}}}),lp=aN({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:Fe(e.height),width:Fe(e.width),maxWidth:Fe(e.maxWidth),left:Fe(e.fixedOffset||null)}},{default:()=>{var s;return[(s=n.default)==null?void 0:s.call(n)]}})}),cJ=ue({headers:Array},"DataTable-header"),$M=Symbol.for("vuetify:data-table-headers"),LM={title:"",sortable:!1},dJ={...LM,width:48};function fJ(){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 Zy(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)Zy(n,t);return t}function FM(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&&FM(n.children,t);return t}function hJ(e){if(e.key){if(e.key==="data-table-group")return LM;if(["data-table-expand","data-table-select"].includes(e.key))return dJ}}function tS(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.children?Math.max(t,...e.children.map(n=>tS(n,t+1))):t}function pJ(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 mJ(e,t){const n=[];let r=0;const s=fJ(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-tS(u);if(a.push({...u,rowspan:d??1,colspan:u.children?Zy(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=>Zy(o)).flat(),headers:n}}function NM(e){const t=[];for(const n of e){const r={...hJ(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?NM(r.children):void 0};t.push(o)}return t}function gJ(e,t){const n=U([]),r=U([]),s=U({}),i=U({}),o=U({});On(()=>{var m,y,w;const u=(e.headers||Object.keys(e.items[0]??{}).map(b=>({key:b,title:ci(b)}))).slice(),c=FM(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"}),(w=t==null?void 0:t.showExpand)!=null&&w.value&&!c.has("data-table-expand")&&u.push({key:"data-table-expand"});const d=NM(u);pJ(d);const f=Math.max(...d.map(b=>tS(b)))+1,p=mJ(d,f);n.value=p.headers,r.value=p.columns;const g=p.headers.flat(1);for(const b of g)b.key&&(b.sortable&&(b.sort&&(s.value[b.key]=b.sort),b.sortRaw&&(i.value[b.key]=b.sortRaw)),b.filter&&(o.value[b.key]=b.filter))});const a={headers:n,columns:r,sortFunctions:s,sortRawFunctions:i,filterFunctions:o};return Gt($M,a),a}function Pm(){const e=Xe($M);if(!e)throw new Error("Missing headers!");return e}const BM=ue({color:String,disableSort:Boolean,fixedHeader:Boolean,multiSort:Boolean,sortAscIcon:{type:He,default:"$sortAsc"},sortDescIcon:{type:He,default:"$sortDesc"},headerProps:{type:Object},sticky:Boolean,...el(),...Bp()},"VDataTableHeaders"),Hk=_e()({name:"VDataTableHeaders",props:BM(),setup(e,t){let{slots:n}=t;const{t:r}=Wr(),{toggleSort:s,sortBy:i,isSorted:o}=MM(),{someSelected:a,allSelected:l,selectAll:u,showSelectAll:c}=Tm(),{columns:d,headers:f}=Pm(),{loaderClasses:p}=Pd(e);function g(S,E){if(!(!(e.sticky||e.fixedHeader)&&!S.fixed))return{position:"sticky",left:S.fixed?Fe(S.fixedOffset):void 0,top:e.sticky||e.fixedHeader?`calc(var(--v-table-header-height) * ${E})`:void 0}}function m(S){const E=i.value.find(O=>O.key===S.key);return E?E.order==="asc"?e.sortAscIcon:e.sortDescIcon:e.sortAscIcon}const{backgroundColorClasses:y,backgroundColorStyles:w}=dr(e,"color"),{displayClasses:b,mobile:_}=fi(e),T=P(()=>({headers:f.value,columns:d.value,toggleSort:s,isSorted:o,sortBy:i.value,someSelected:a.value,allSelected:l.value,selectAll:u,getSortIcon:m})),x=P(()=>["v-data-table__th",{"v-data-table__th--sticky":e.sticky||e.fixedHeader},b.value,p.value]),C=S=>{let{column:E,x:O,y:R}=S;const A=E.key==="data-table-select"||E.key==="data-table-expand",D=he(e.headerProps??{},E.headerProps??{});return h(lp,he({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},...x.value],style:{width:Fe(E.width),minWidth:Fe(E.minWidth),maxWidth:Fe(E.maxWidth),...g(E,R)},colspan:E.colspan,rowspan:E.rowspan,onClick:E.sortable?()=>s(E):void 0,fixed:E.fixed,nowrap:E.nowrap,lastFixed:E.lastFixed,noPadding:A},D),{default:()=>{var z;const L=`header.${E.key}`,W={column:E,selectAll:u,isSorted:o,toggleSort:s,sortBy:i.value,someSelected:a.value,allSelected:l.value,getSortIcon:m};return n[L]?n[L](W):E.key==="data-table-select"?((z=n["header.data-table-select"])==null?void 0:z.call(n,W))??(c.value&&h(mu,{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(J,{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:w.value},[i.value.findIndex(K=>K.key===E.key)+1])])}})},I=()=>{const S=he(e.headerProps??{}??{}),E=P(()=>d.value.filter(R=>(R==null?void 0:R.sortable)&&!e.disableSort)),O=P(()=>{if(d.value.find(A=>A.key==="data-table-select")!=null)return l.value?"$checkboxOn":a.value?"$checkboxIndeterminate":"$checkboxOff"});return h(lp,he({tag:"th",class:[...x.value],colspan:f.value.length+1},S),{default:()=>[h("div",{class:"v-data-table-header__content"},[h(Do,{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:O.value,"onClick:append":()=>u(!l.value)},{...n,chip:R=>{var A;return h(Sn,{onClick:(A=R.item.raw)!=null&&A.sortable?()=>s(R.item.raw):void 0,onMousedown:D=>{D.preventDefault(),D.stopPropagation()}},{default:()=>[R.item.title,h(J,{class:["v-data-table__td-sort-icon",o(R.item.raw)&&"v-data-table__td-sort-icon-active"],icon:m(R.item.raw),size:"small"},null)]})}})])]})};Ae(()=>_.value?h("tr",null,[h(I,null,null)]):h(Pe,null,[n.headers?n.headers(T.value):f.value.map((S,E)=>h("tr",null,[S.map((O,R)=>h(C,{column:O,x:R,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})])])]))}}),vJ=ue({item:{type:Object,required:!0}},"VDataTableGroupHeaderRow"),yJ=_e()({name:"VDataTableGroupHeaderRow",props:vJ(),setup(e,t){let{slots:n}=t;const{isGroupOpen:r,toggleGroup:s,extractRows:i}=EM(),{isSelected:o,isSomeSelected:a,select:l}=Tm(),{columns:u}=Pm(),c=P(()=>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 g=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:g,onClick:m}}))??h(lp,{class:"v-data-table-group-header-row__column"},{default:()=>[h(se,{size:"small",variant:"text",icon:g,onClick:m},null),h("span",null,[e.item.value]),h("span",null,[k("("),c.value.length,k(")")])]})}if(d.key==="data-table-select"){const g=o(c.value),m=a(c.value)&&!g,y=w=>l(c.value,w);return((p=n["data-table-select"])==null?void 0:p.call(n,{props:{modelValue:g,indeterminate:m,"onUpdate:modelValue":y}}))??h("td",null,[h(mu,{modelValue:g,indeterminate:m,"onUpdate:modelValue":y},null)])}return h("td",null,null)})])}}),bJ=ue({index:Number,item:Object,cellProps:[Object,Function],onClick:Nn(),onContextmenu:Nn(),onDblclick:Nn(),...el()},"VDataTableRow"),wJ=_e()({name:"VDataTableRow",props:bJ(),setup(e,t){let{slots:n}=t;const{displayClasses:r,mobile:s}=fi(e,"v-data-table__tr"),{isSelected:i,toggleSelect:o,someSelected:a,allSelected:l,selectAll:u}=Tm(),{isExpanded:c,toggleExpand:d}=kM(),{toggleSort:f,sortBy:p,isSorted:g}=MM(),{columns:m}=Pm();Ae(()=>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,w)=>{const b=e.item,_=`item.${y.key}`,T=`header.${y.key}`,x={index:e.index,item:b.raw,internalItem:b,value:Ba(b.columns,y.key),column:y,isSelected:i,toggleSelect:o,isExpanded:c,toggleExpand:d},C={column:y,selectAll:u,isSorted:g,toggleSort:f,sortBy:p.value,someSelected:a.value,allSelected:l.value,getSortIcon:()=>""},I=typeof e.cellProps=="function"?e.cellProps({index:x.index,item:x.item,internalItem:x.internalItem,value:x.value,column:y}):e.cellProps,S=typeof y.cellProps=="function"?y.cellProps({index:x.index,item:x.item,internalItem:x.internalItem,value:x.value}):y.cellProps;return h(lp,he({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},I,S),{default:()=>{var O,R,A,D;if(y.key==="data-table-select")return((O=n["item.data-table-select"])==null?void 0:O.call(n,{...x,props:{disabled:!b.selectable,modelValue:i([b]),onClick:kt(()=>o(b),["stop"])}}))??h(mu,{disabled:!b.selectable,modelValue:i([b]),onClick:kt(L=>o(b,e.index,L),["stop"])},null);if(y.key==="data-table-expand")return((R=n["item.data-table-expand"])==null?void 0:R.call(n,{...x,props:{icon:c(b)?"$collapse":"$expand",size:"small",variant:"text",onClick:kt(()=>d(b),["stop"])}}))??h(se,{icon:c(b)?"$collapse":"$expand",size:"small",variant:"text",onClick:kt(()=>d(b),["stop"])},null);if(n[_]&&!s.value)return n[_](x);const E=re(x.value);return s.value?h(Pe,null,[h("div",{class:"v-data-table__td-title"},[((A=n[T])==null?void 0:A.call(n,C))??y.title]),h("div",{class:"v-data-table__td-value"},[((D=n[_])==null?void 0:D.call(n,x))??E])]):E}})})]))}}),VM=ue({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],...el()},"VDataTableRows"),jk=_e()({name:"VDataTableRows",inheritAttrs:!1,props:VM(),setup(e,t){let{attrs:n,slots:r}=t;const{columns:s}=Pm(),{expandOnClick:i,toggleExpand:o,isExpanded:a}=kM(),{isSelected:l,toggleSelect:u}=Tm(),{toggleGroup:c,isGroupOpen:d}=EM(),{t:f}=Wr(),{mobile:p}=fi(e);return Ae(()=>{var g,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},[((g=r.loading)==null?void 0:g.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,w)=>{var T;if(y.type==="group"){const x={index:w,item:y,columns:s.value,isExpanded:a,toggleExpand:o,isSelected:l,toggleSelect:u,toggleGroup:c,isGroupOpen:d};return r["group-header"]?r["group-header"](x):h(yJ,he({key:`group-header_${y.id}`,item:y},N_(n,":group-header",()=>x)),r)}const b={index:w,item:y.raw,internalItem:y,columns:s.value,isExpanded:a,toggleExpand:o,isSelected:l,toggleSelect:u},_={...b,props:he({key:`item_${y.key??y.index}`,onClick:i.value?()=>{o(y)}:void 0,index:w,item:y,cellProps:e.cellProps,mobile:p.value},N_(n,":row",()=>b),typeof e.rowProps=="function"?e.rowProps({item:b.item,index:b.index,internalItem:b.internalItem}):e.rowProps)};return h(Pe,{key:_.props.key},[r.item?r.item(_):h(wJ,_.props,r),a(y)&&((T=r["expanded-row"])==null?void 0:T.call(r,b))])})])}),{}}}),UM=ue({fixedHeader:Boolean,fixedFooter:Boolean,height:[Number,String],hover:Boolean,...Ue(),...Rr(),...vt(),...$t()},"VTable"),eb=_e()({name:"VTable",props:UM(),setup(e,t){let{slots:n,emit:r}=t;const{themeClasses:s}=Zt(e),{densityClasses:i}=gs(e);return Ae(()=>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:Fe(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)]}})),{}}}),SJ=ue({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 _J(e,t,n,r){const s=e.returnObject?t:Fn(t,e.itemValue),i=Fn(t,e.itemSelectable,!0),o=r.reduce((a,l)=>(l.key!=null&&(a[l.key]=Fn(t,l.value)),a),{});return{type:"item",key:e.returnObject?Fn(t,e.itemValue):s,index:n,value:s,selectable:i,columns:o,raw:t}}function kJ(e,t,n){return t.map((r,s)=>_J(e,r,s,n))}function xJ(e,t){return{items:P(()=>kJ(e,e.items,t.value))}}const EJ=ue({...VM(),hideDefaultBody:Boolean,hideDefaultFooter:Boolean,hideDefaultHeader:Boolean,width:[String,Number],search:String,...UQ(),...HQ(),...cJ(),...SJ(),...tJ(),...rJ(),...BM(),...UM()},"DataTable"),CJ=ue({...YQ(),...EJ(),...NQ(),...DM()},"VDataTable"),TJ=_e()({name:"VDataTable",props:CJ(),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}=jQ(e),{sortBy:i,multiSort:o,mustSort:a}=sJ(e),{page:l,itemsPerPage:u}=XQ(e),{disableSort:c}=Vo(e),{columns:d,headers:f,sortFunctions:p,sortRawFunctions:g,filterFunctions:m}=gJ(e,{groupBy:s,showSelect:Te(e,"showSelect"),showExpand:Te(e,"showExpand")}),{items:y}=xJ(e,d),w=Te(e,"search"),{filteredItems:b}=VQ(e,y,w,{transform:Q=>Q.columns,customKeyFilter:m}),{toggleSort:_}=iJ({sortBy:i,multiSort:o,mustSort:a,page:l}),{sortByWithGroups:T,opened:x,extractRows:C,isGroupOpen:I,toggleGroup:S}=qQ({groupBy:s,sortBy:i,disableSort:c}),{sortedItems:E}=oJ(e,b,T,{transform:Q=>({...Q.raw,...Q.columns}),sortFunctions:p,sortRawFunctions:g}),{flatItems:O}=GQ(E,s,x),R=P(()=>O.value.length),{startIndex:A,stopIndex:D,pageCount:L,setItemsPerPage:W}=QQ({page:l,itemsPerPage:u,itemsLength:R}),{paginatedItems:z}=ZQ({items:O,startIndex:A,stopIndex:D,itemsPerPage:u}),K=P(()=>C(z.value)),{isSelected:G,select:H,selectAll:B,toggleSelect:ne,someSelected:q,allSelected:Y}=nJ(e,{allItems:y,currentPage:K}),{isExpanded:oe,toggleExpand:ie}=zQ(e);KQ({page:l,itemsPerPage:u,sortBy:i,groupBy:s,search:w}),Pr({VDataTableRows:{hideNoData:Te(e,"hideNoData"),noDataText:Te(e,"noDataText"),loading:Te(e,"loading"),loadingText:Te(e,"loadingText")}});const be=P(()=>({page:l.value,itemsPerPage:u.value,sortBy:i.value,pageCount:L.value,toggleSort:_,setItemsPerPage:W,someSelected:q.value,allSelected:Y.value,isSelected:G,select:H,selectAll:B,toggleSelect:ne,isExpanded:oe,toggleExpand:ie,isGroupOpen:I,toggleGroup:S,items:K.value.map(Q=>Q.raw),internalItems:K.value,groupedItems:z.value,columns:d.value,headers:f.value}));return Ae(()=>{const Q=zk.filterProps(e),X=Hk.filterProps(e),V=jk.filterProps(e),ge=eb.filterProps(e);return h(eb,he({class:["v-data-table",{"v-data-table--show-select":e.showSelect,"v-data-table--loading":e.loading},e.class],style:e.style},ge,{fixedHeader:e.fixedHeader||e.sticky}),{top:()=>{var Oe;return(Oe=r.top)==null?void 0:Oe.call(r,be.value)},default:()=>{var Oe,Ne,N,F,ee,pe;return r.default?r.default(be.value):h(Pe,null,[(Oe=r.colgroup)==null?void 0:Oe.call(r,be.value),!e.hideDefaultHeader&&h("thead",{key:"thead"},[h(Hk,X,r)]),(Ne=r.thead)==null?void 0:Ne.call(r,be.value),!e.hideDefaultBody&&h("tbody",null,[(N=r["body.prepend"])==null?void 0:N.call(r,be.value),r.body?r.body(be.value):h(jk,he(n,V,{items:z.value}),r),(F=r["body.append"])==null?void 0:F.call(r,be.value)]),(ee=r.tbody)==null?void 0:ee.call(r,be.value),(pe=r.tfoot)==null?void 0:pe.call(r,be.value)])},bottom:()=>r.bottom?r.bottom(be.value):!e.hideDefaultFooter&&h(Pe,null,[h(cn,null,null),h(zk,Q,{prepend:r["footer.prepend"]})])})}),{}}}),PJ=ue({...Ue(),...PG()},"VForm"),nS=_e()({name:"VForm",props:PJ(),emits:{"update:modelValue":e=>!0,submit:e=>!0},setup(e,t){let{slots:n,emit:r}=t;const s=RG(e),i=U();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 Ae(()=>{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)])}),Ki(s,i)}}),RJ=ue({disabled:Boolean,modelValue:{type:Boolean,default:null},...Vb()},"VHover"),qk=_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}=Ub(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}})}}}),IJ={class:"mt-4 mb-4"},AJ={key:0},OJ={key:1},MJ={key:0},DJ={key:1},$J=["colspan"],LJ=$e({__name:"PrintersView",setup(e){const t=Dt(),n=Ft(),r=U(!1),s=tr(),i=Xi(),o=vm(),a=tn(nn.AddOrUpdatePrinterDialog),l=U([]),u=U([]),c=U(""),d=U(""),f=U(),p=U(""),g=U([]),m=P(()=>o.hasFeature("printerGroupsApi")),y=P(()=>[{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 w(){return r.value=!0,await o.loadFeatures(),o.hasFeature("printerGroupsApi")&&(l.value=await hl.getGroupsWithPrinters()),r.value=!1,l}const b=wm({queryKey:["printerGroups"],queryFn:w}),_=P(()=>{var Y;if(!o.hasFeature("printerGroupsApi")||!((Y=u.value)!=null&&Y.length))return n.printers;const q=u.value.flatMap(oe=>oe.printers.map(ie=>ie.printerId))||[];return n.printers.filter(oe=>q.includes(oe.id))}),T=P(()=>s.printerCurrentEventReceivedAtById),x=P(()=>{if(!(!f.value&&f.value!==0))return l.value[f.value]}),C=q=>q?(Date.now()-q)/1e3:void 0,I=q=>l.value.filter(Y=>Y.printers.find(oe=>oe.printerId===q)),S=q=>l.value.filter(Y=>!Y.printers.find(oe=>oe.printerId===q)),E=q=>i.floorOfPrinter(q),O=q=>{n.setUpdateDialogPrinter(q),a.openDialog(q)},R=()=>{a.openDialog()},A=(q,Y)=>{if(console.log(q,Y),Y.isExpanded){const oe=g.value.findIndex(ie=>ie===q.id);g.value.splice(oe,1)}else g.value.push(q.id.toString())},D=()=>{tn(nn.ImportOctoFarmDialog).openDialog()},L=()=>{tn(nn.YamlImportExport).openDialog()},W=async()=>{var q,Y;if(!((Y=(q=c.value)==null?void 0:q.trim())!=null&&Y.length))throw new Error("Please set a non-empty group name");await hl.createGroup(c.value.trim()),await b.refetch(),c.value="",t.info("Created group")},z=()=>{var q;x.value&&(d.value=(q=x.value)==null?void 0:q.name)},K=async q=>{var oe,ie;if(!(q!=null&&q.id))throw new Error("Group id was not defined");if(!l.value.find(be=>be.id===q.id))throw new Error("Group was not found, please reload the page");if(!((ie=(oe=d.value)==null?void 0:oe.trim())!=null&&ie.length))throw new Error("Please set a non-empty group name");await hl.updateGroupName(q.id,d.value.trim()),await b.refetch()},G=async q=>{const Y=l.value.find(ie=>ie.id===q);if(!Y)throw new Error("Group was not found, please reload the page");const oe=Y.printers.length;oe>0&&!confirm(`This group contains ${oe} printers, are you sure to delete it?`)||(await hl.deleteGroup(q),await b.refetch(),t.info("Deleted group"))},H=async(q,Y)=>{await hl.addPrinterToGroup(q,Y),await b.refetch(),t.info("Added printer to group")},B=async(q,Y)=>{await hl.deletePrinterFromGroup(q,Y),await b.refetch(),t.info("Removed printer from group")},ne=async q=>{if(!q.id)throw new Error("Printer ID not set, cant toggle enabled");q.enabled=!q.enabled,await Xt.toggleEnabled(q.id,q.enabled)};return(q,Y)=>{const oe=In("v-list-item-group");return $(),me("div",null,[h(gt,null,{default:v(()=>[h(sn,null,{default:v(()=>[Y[11]||(Y[11]=k(" Printers ")),h(wn),m.value&&l.value.length?($(),te(Do,{key:0,modelValue:u.value,"onUpdate:modelValue":Y[0]||(Y[0]=ie=>u.value=ie),items:l.value,"return-object":!0,"item-title":"name",label:"Filter by groups",multiple:"",placeholder:"Select group to filter by","prepend-icon":"filter_list"},null,8,["modelValue","items"])):fe("",!0),h(ut,{modelValue:p.value,"onUpdate:modelValue":Y[1]||(Y[1]=ie=>p.value=ie),class:"p-2",clearable:"",label:"Printer search","prepend-icon":"search","single-line":""},null,8,["modelValue"])]),_:1}),h(Z(TJ),{expanded:g.value,headers:y.value,items:_.value,search:p.value,class:"elevation-1","item-key":"id","show-expand":"","single-expand":"","onClick:row":A},IC({"no-data":v(()=>[M("div",IJ,[_.value.length===0?($(),me("h3",AJ," No printer has been created yet. Create one here: ")):($(),me("h3",OJ," No printer has been found. Adjust your filters or search criteria. ")),h(hM)])]),top:v(()=>[h(pr,{flat:""},{default:v(()=>[h(xn,null,{default:v(()=>[k(" Showing "+re(_.value.length||0)+" printers ",1)]),_:1}),h(se,{class:"ml-3",type:"button",variant:"outlined",onClick:Y[2]||(Y[2]=ie=>D())},{default:v(()=>[h(J,null,{default:v(()=>Y[12]||(Y[12]=[k("publish")])),_:1}),Y[13]||(Y[13]=k(" Import OctoFarm Printers "))]),_:1}),h(se,{class:"ml-3",type:"button",variant:"outlined",onClick:Y[3]||(Y[3]=ie=>R())},{default:v(()=>[h(J,null,{default:v(()=>Y[14]||(Y[14]=[k("add")])),_:1}),Y[15]||(Y[15]=k(" Create Printer "))]),_:1}),h(se,{class:"ml-3",color:"primary",type:"button",onClick:Y[4]||(Y[4]=ie=>L())},{default:v(()=>[h(J,null,{default:v(()=>Y[16]||(Y[16]=[k("publish")])),_:1}),Y[17]||(Y[17]=k(" Import/Export YAML "))]),_:1}),h(wn)]),_:1})]),"item.enabled":v(({item:ie})=>[h(ap,{modelValue:ie.enabled,"onUpdate:modelValue":be=>ie.enabled=be,color:"primary",inset:"",onClickCapture:kt(be=>ne(ie),["stop"])},{default:v(()=>[k(re(ie.enabled),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onClickCapture"])]),"item.printerType":v(({item:ie})=>[k(re(Z(qA)(ie.printerType)),1)]),"item.name":v(({item:ie})=>[h(Sn,null,{default:v(()=>[k(re(ie.name||ie.printerURL),1)]),_:2},1024)]),"item.floor":v(({item:ie})=>[ie.id?($(),te(Sn,{key:0},{default:v(()=>{var be;return[k(re((be=E(ie.id))==null?void 0:be.name),1)]}),_:2},1024)):fe("",!0)]),"item.actions":v(({item:ie})=>[h(PQ,{printer:ie},null,8,["printer"]),h(MQ,{printer:ie},null,8,["printer"]),h(DQ,{printer:ie},null,8,["printer"]),h($Q,{printer:ie},null,8,["printer"]),h(LQ,{printer:ie},null,8,["printer"]),h(AQ,{printer:ie,"onUpdate:show":be=>O(ie)},null,8,["printer","onUpdate:show"])]),"item.socketupdate":v(({item:ie})=>[T.value[ie.id]?($(),me("span",MJ," Updated "+re(C(T.value[ie.id]))+" seconds ago ",1)):($(),me("span",DJ," No update received (silence) "))]),"expanded-row":v(({item:ie,columns:be})=>[M("td",{colspan:be.length},[h(TQ,{printer:ie},null,8,["printer"])],8,$J)]),_:2},[m.value?{name:"item.group",fn:v(({item:ie})=>[($(!0),me(Pe,null,Wt(I(ie.id),be=>($(),te(Sn,{key:be.id,class:"ml-2",closable:"",size:"small","onClick:close":Q=>B(be.id,ie.id)},{default:v(()=>[k(re(be.name),1)]),_:2},1032,["onClick:close"]))),128)),h(bm,{"offset-y":""},{activator:v(({props:be})=>[h(Sn,he({disabled:!l.value.length,class:"ml-2",size:"small"},be),{default:v(()=>[h(J,{size:"small"},{default:v(()=>Y[18]||(Y[18]=[k("add")])),_:1})]),_:2},1040,["disabled"])]),default:v(()=>[h(Vt,{density:"compact",style:{border:"1px solid dimgray"}},{default:v(()=>[h(jr,null,{default:v(()=>Y[19]||(Y[19]=[k(" ADD TO GROUP")])),_:1}),h(oe,null,{default:v(()=>[($(!0),me(Pe,null,Wt(S(ie.id),(be,Q)=>($(),te(Ve,{key:Q,onClick:X=>H(be.id,ie.id)},{default:v(()=>[h(dt,null,{default:v(()=>[k(re(be.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?($(),te(gt,{key:0,class:"mt-4"},{default:v(()=>[h(sn,null,{default:v(()=>Y[20]||(Y[20]=[k(" Printer Groups ")])),_:1}),h(en,null,{default:v(()=>[Y[26]||(Y[26]=M("h3",null,"Existing groups:",-1)),h(Vn,null,{default:v(()=>[h(ep,{modelValue:f.value,"onUpdate:modelValue":[Y[5]||(Y[5]=ie=>f.value=ie),Y[6]||(Y[6]=ie=>z())],column:"","selected-class":"primary--text"},{default:v(()=>[($(!0),me(Pe,null,Wt(l.value,ie=>($(),te(Sn,{key:ie.id,class:"mr-3",closable:"",size:"small","onClick:close":be=>G(ie.id)},{default:v(()=>[k(re(ie.name),1)]),_:2},1032,["onClick:close"]))),128))]),_:1},8,["modelValue"])]),_:1}),Y[27]||(Y[27]=M("h3",{class:"mt-3"},"Update group name",-1)),h(Vn,null,{default:v(()=>[x.value?fe("",!0):($(),te(dn,{key:0},{default:v(()=>Y[21]||(Y[21]=[k(" Select a group to update its name. ")])),_:1})),h(ut,{modelValue:d.value,"onUpdate:modelValue":Y[7]||(Y[7]=ie=>d.value=ie),disabled:!x.value,label:"Group Name",placeholder:"Type group name here"},{default:v(()=>Y[22]||(Y[22]=[k(" Name ")])),_:1},8,["modelValue","disabled"]),h(se,{onClick:Y[8]||(Y[8]=ie=>K(x.value))},{default:v(()=>Y[23]||(Y[23]=[k(" Update name ")])),_:1})]),_:1}),Y[28]||(Y[28]=M("h3",{class:"mt-3"},"Add group",-1)),h(Vn,null,{default:v(()=>[h(ut,{modelValue:c.value,"onUpdate:modelValue":Y[9]||(Y[9]=ie=>c.value=ie),label:"Group Name",placeholder:"Type group name here"},{default:v(()=>Y[24]||(Y[24]=[k(" Name ")])),_:1},8,["modelValue"]),h(se,{onClick:Y[10]||(Y[10]=ie=>W())},{default:v(()=>Y[25]||(Y[25]=[k(" Create new group")])),_:1})]),_:1})]),_:1})]),_:1})):fe("",!0)])}}}),js={grid:"grid",floors:"floors",octoprint:"octoprint",emergencyCommands:"emergencyCommands",users:"users",account:"account",serverProtection:"serverProtection",softwareUpgrade:"softwareUpgrade",diagnostics:"diagnostics",experimental:"experimental"},FJ={[js.grid]:{title:"Grid",icon:"grid_on",path:"/settings/grid",divider:!1},[js.floors]:{title:"Floors",icon:"house_siding",path:"/settings/floors",divider:!0},[js.octoprint]:{title:"OctoPrint",icon:"image",path:"/settings/octoprint",divider:!1},[js.emergencyCommands]:{title:"Emergency Commands",icon:"warning",path:"/settings/emergency-commands",divider:!0},[js.users]:{title:"Users",icon:"group",path:"/settings/user-management",divider:!1},[js.account]:{title:"Account",icon:"account_circle",path:"/settings/account",divider:!1},[js.serverProtection]:{title:"Server Protection",icon:"security",path:"/settings/server-protection",divider:!0},[js.softwareUpgrade]:{title:"Software Upgrade",icon:"upgrade",path:"/settings/software-upgrade",divider:!1},[js.diagnostics]:{title:"Diagnostics",icon:"bug_report",path:"/settings/diagnostics",divider:!1},[js.experimental]:{title:"Experimental",icon:"settings_applications",path:"/settings/experimental",divider:!1}},NJ=$e({__name:"SettingsView",setup(e){const t=U(FJ);return(n,r)=>{const s=In("router-view");return $(),me("div",null,[h(rt,{"no-gutters":""},{default:v(()=>[h(Aw,{permanent:!0},{default:v(()=>[h(Ve,null,{default:v(()=>[h(dt,{class:"text-h6"},{default:v(()=>r[0]||(r[0]=[k(" Settings ")])),_:1}),h(yt,null,{default:v(()=>r[1]||(r[1]=[k(" Adjust your FDM Monster ")])),_:1})]),_:1}),h(cn),h(Vt,{density:"compact",nav:""},{default:v(()=>[($(!0),me(Pe,null,Wt(Z(t),i=>($(),te(Ve,{key:i.title,to:i.path,link:"","prepend-icon":i.icon,title:i.title,"router-link":"",style:ss(i.divider?"border-bottom: 1px solid gray":"")},null,8,["to","prepend-icon","title","style"]))),128))]),_:1})]),_:1}),h(ze,null,{default:v(()=>[h(s)]),_:1})]),_:1})])}}});function BJ(e){const t=new Date(e);return new Intl.DateTimeFormat("default",{dateStyle:"long"}).format(t)}const VJ={key:0,class:"text--primary float-end mr-5 mt-2"},UJ={class:"text-grey-darken-4"},zJ={key:0,class:"text-success"},HJ={key:1,class:"text-error"},jJ={key:0},qJ={key:0},WJ={key:0},GJ={key:1},KJ={key:0},YJ={key:1},XJ=$e({__name:"UserManagementSettings",setup(e){const t=Dt(),n=U(!1),r=U(),s=U([]),i=U([]);async function o(){n.value=!0;try{r.value=await es.getProfile(),i.value=await es.listRoles(),s.value=await es.listUsers()}catch(m){throw n.value=!1,console.error(m),m}return n.value=!1,{users:s,roles:i,profile:r}}const a=wm({queryKey:["userRolesProfile"],queryFn:o});function l(m){return m.map(y=>{var w;return(w=i.value.find(b=>b.id==y))==null?void 0:w.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 es.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 es.setUserVerified(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} verified`:`User ${m.username} unverified`)}}async function f(m,y=!0){var w;if((w=r.value)!=null&&w.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 es.setRootUser(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} 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 es.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 g(){await tn(nn.CreateUserDialog).openDialog()}return(m,y)=>{const w=In("v-list-item-content");return $(),te(gt,null,{default:v(()=>[h(pr,{color:"primary"},{default:v(()=>{var b;return[h(lt,null,{default:v(()=>[h(J,null,{default:v(()=>y[1]||(y[1]=[k("settings")])),_:1})]),_:1}),h(xn,null,{default:v(()=>y[2]||(y[2]=[k(" Users ")])),_:1}),h(wn),h(se,{disabled:!((b=r.value)!=null&&b.isRootUser),class:"mt-2",color:"primary",onClick:y[0]||(y[0]=_=>g())},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>y[3]||(y[3]=[k("verified_user")])),_:1}),y[4]||(y[4]=M("span",null,"Create verified user",-1))]),_:1},8,["disabled"])]}),_:1}),n.value?($(),te(dM,{key:0,size:20,color:"#a70015",style:{margin:"250px",position:"absolute"}})):fe("",!0),h(Vt,{lines:"three"},{default:v(()=>[h(jr,null,{default:v(()=>y[5]||(y[5]=[k(" Showing all users ")])),_:1}),($(!0),me(Pe,null,Wt(s.value,(b,_)=>($(),te(Ve,{key:_,class:"pl-6",style:{"max-width":"800px","border-top":"1px solid grey","border-bottom":"1px solid grey"}},{default:v(()=>[h(w,{class:Fo(u(b)?"pl-6 grey darken-3":"pl-6 grey darken-4")},{default:v(()=>[h(dt,null,{default:v(()=>[k(" User '"+re(b.username)+"' ",1),u(b)?($(),me("strong",VJ," Your account ")):fe("",!0)]),_:2},1024),h(yt),M("span",UJ,[M("ul",null,[M("li",null,[b.isVerified?($(),me("span",zJ," Account verified ")):($(),me("span",HJ," Account not verified "))]),M("li",null,"Created at "+re(Z(BJ)(b.createdAt)),1),b.isDemoUser?($(),me("li",jJ,"Demo user account")):fe("",!0),M("li",null,[y[7]||(y[7]=k(" Role(s) ")),M("ul",null,[b.isRootUser?($(),me("li",qJ,[h(Sn,{class:"mb-2 mt-2",size:"small"},{default:v(()=>y[6]||(y[6]=[k(" OWNER ")])),_:1})])):fe("",!0),($(!0),me(Pe,null,Wt(l(b.roles),T=>($(),me("li",{key:T},[h(Sn,{class:"mb-2 mt-2",size:"small"},{default:v(()=>[k(re(T),1)]),_:2},1024)]))),128))])])])])]),_:2},1032,["class"]),h(hu,null,{default:v(()=>{var T,x;return[h(se,{disabled:u(b)||b.isRootUser,color:b.isVerified?"error darken-4":"success",onClick:C=>d(b,!b.isVerified)},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>y[8]||(y[8]=[k("shield")])),_:1}),b.isVerified?fe("",!0):($(),me("span",WJ," Verify account ")),b.isVerified?($(),me("span",GJ," Un-verify account ")):fe("",!0)]),_:2},1032,["disabled","color","onClick"]),h(se,{color:b.isRootUser?"error darken-4":"success",disabled:u(b)||!((T=r.value)!=null&&T.isRootUser),class:"mt-2",onClick:C=>f(b,!b.isRootUser)},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>y[9]||(y[9]=[k("key")])),_:1}),b.isRootUser?($(),me("span",KJ," Remove owner ")):fe("",!0),b.isRootUser?fe("",!0):($(),me("span",YJ," Set owner "))]),_:2},1032,["color","disabled","onClick"]),(x=r.value)!=null&&x.isRootUser?($(),te(Do,{key:0,items:i.value.map(C=>({text:C.name,value:C.id})),modelValue:b.roles,"onUpdate:modelValue":C=>b.roles=C,multiple:"",label:"Select roles",onChange:C=>p(b),class:"pt-6",style:{width:"15rem"}},null,8,["items","modelValue","onUpdate:modelValue","onChange"])):fe("",!0),h(se,{disabled:u(b)||b.isRootUser,class:"mt-2",color:"error-darken-2",onClick:C=>c(b)},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>y[10]||(y[10]=[k("delete")])),_:1}),y[11]||(y[11]=k(" Delete "))]),_:2},1032,["disabled","onClick"])]}),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})}}}),QJ=$e({name:"FdmSettings",props:{},setup:()=>({settingsStore:Fs(),printersStore:Ft(),snackbar:Dt(),printerStateStore:tr()}),data:()=>({fileHandlingSettings:{autoRemoveOldFilesBeforeUpload:!1,autoRemoveOldFilesAtBoot:!1,autoRemoveOldFilesCriteriumDays:7}}),computed:{},watch:{},async created(){const e=await Pn.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 Pn.setFileCleanSettings(this.fileHandlingSettings);this.fileHandlingSettings=e.printerFileClean},async purgeFiles(){await Di.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 SM.setGCodeAnalysis(t.id,!1);this.snackbar.openInfoMessage({title:`Finished disabling gcode analysis for ${e.length} online printers.`})}}});function JJ(e,t,n,r,s,i){return $(),te(gt,null,{default:v(()=>[h(pr,{color:"primary"},{default:v(()=>[h(lt,null,{default:v(()=>[h(J,null,{default:v(()=>t[8]||(t[8]=[k("settings")])),_:1})]),_:1}),h(xn,null,{default:v(()=>t[9]||(t[9]=[k(" OctoPrint Settings ")])),_:1})]),_:1}),h(Vt,{lines:"three"},{default:v(()=>[h(Ve,null,{default:v(()=>[h(dt,null,{default:v(()=>t[10]||(t[10]=[k(" Pre-upload file cleanup ")])),_:1}),h(yt,null,{default:v(()=>[t[12]||(t[12]=k(" Automatically cleanup old files to ensure the SD card has enough space. ")),t[13]||(t[13]=M("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:v(()=>t[11]||(t[11]=[k(" save file clean settings ")])),_:1})]),_:1})]),_:1}),h(Ve,null,{default:v(()=>{var o;return[h(dt,null,{default:v(()=>t[14]||(t[14]=[k(" Connection Timeout ")])),_:1}),(o=e.settingsStore.settings)!=null&&o.timeout?($(),te(yt,{key:0},{default:v(()=>[t[16]||(t[16]=k(" 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:v(()=>t[15]||(t[15]=[k(" save connection timeout ")])),_:1})]),_:1})):fe("",!0)]}),_:1}),h(Ve,null,{default:v(()=>[h(dt,null,{default:v(()=>t[17]||(t[17]=[k(" Clean file references ")])),_:1}),h(yt,null,{default:v(()=>[t[19]||(t[19]=k(" Clear out the file references for all printers - this does not remove them from OctoPrint! ")),t[20]||(t[20]=M("br",null,null,-1)),h(se,{color:"primary",onClick:t[6]||(t[6]=o=>e.purgeFiles())},{default:v(()=>t[18]||(t[18]=[k(" Purge file references ")])),_:1})]),_:1})]),_:1}),h(Ve,null,{default:v(()=>[h(dt,null,{default:v(()=>t[21]||(t[21]=[k(" Disable inefficient GCode analysis ")])),_:1}),h(yt,null,{default:v(()=>[t[23]||(t[23]=k(" Disable GCode analysis on all printers at once, preventing CPU intensive and inaccurate time/size estimates. ")),t[24]||(t[24]=M("br",null,null,-1)),h(se,{color:"primary",onClick:t[7]||(t[7]=o=>e.bulkDisableGCodeAnalysis())},{default:v(()=>t[22]||(t[22]=[k(" Bulk disable GCode Analysis ")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}const ZJ=Go(QJ,[["render",JJ]]),zM=$e({__name:"SettingsToolbar",props:["icon","title"],setup(e){const t=e;return(n,r)=>($(),te(pr,null,{default:v(()=>[h(lt,null,{default:v(()=>[h(J,null,{default:v(()=>[k(re(t.icon),1)]),_:1})]),_:1}),h(xn,null,{default:v(()=>[k(re(t.title),1)]),_:1}),Op(n.$slots,"default")]),_:3}))}}),eZ=$e({name:"FloorSettings",props:{},setup:()=>({printersStore:Ft(),floorStore:Xi(),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"))}}}),tZ={key:1};function nZ(e,t,n,r,s,i){const o=zM,a=In("v-list-item-action-text"),l=In("v-list-item-group"),u=In("v-edit-dialog"),c=In("v-list-item-content");return $(),te(gt,null,{default:v(()=>[h(o,{icon:"house_siding",title:"Floors"}),h(Vt,{subheader:"",lines:"three"},{default:v(()=>[h(jr,null,{default:v(()=>t[7]||(t[7]=[k("Floors")])),_:1}),h(Ve,null,{default:v(()=>[h(dt,null,{default:v(()=>t[8]||(t[8]=[k(" Create new floor ")])),_:1}),h(yt,null,{default:v(()=>[t[10]||(t[10]=k(" Creates an empty department/floor to view printer groups ")),t[11]||(t[11]=M("br",null,null,-1)),h(se,{color:"primary",onClick:t[0]||(t[0]=d=>e.createFloor())},{default:v(()=>t[9]||(t[9]=[k(" Create floor ")])),_:1})]),_:1})]),_:1})]),_:1}),h(cn),h(rt,{"no-gutters":""},{default:v(()=>[h(ze,null,{default:v(()=>[h(Vt,{density:"compact"},{default:v(()=>[h(l,{modelValue:e.selectedItem,"onUpdate:modelValue":t[1]||(t[1]=d=>e.selectedItem=d)},{default:v(()=>[($(!0),me(Pe,null,Wt(e.floors,d=>($(),te(Ve,{key:d.id},{default:v(()=>[h(dt,null,{default:v(()=>[k(re(d.name),1)]),_:2},1024),h(yt,null,{default:v(()=>[k(re(d.printers.length||0)+" assigned ",1)]),_:2},1024),h(a,null,{default:v(()=>[k(" Floor number: "+re(d.floor),1)]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),h(ze,null,{default:v(()=>[h(pr,null,{default:v(()=>[h(qk,null,{default:v(({isHovering:d,props:f})=>[h(xn,uv(xh(f)),{default:v(()=>[e.selectedFloor?($(),te(u,{key:0,onOpen:e.setEditedPrinterFloorName,onSave:e.updatePrinterFloorName},{input:v(()=>[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:v(()=>[h(se,{color:"secondary"},{default:v(()=>[d?($(),te(J,{key:0,size:"small"},{default:v(()=>t[12]||(t[12]=[k(" edit ")])),_:1})):fe("",!0),k(" "+re(e.selectedFloor.name),1)]),_:2},1024)]),_:2},1032,["onOpen","onSave"])):($(),me("span",tZ," Select a floor on the left "))]),_:2},1040)]),_:1}),h(qk,null,{default:v(({isHovering:d,props:f})=>[h(xn,uv(xh(f)),{default:v(()=>[e.selectedFloor?($(),te(u,{key:0,onOpen:e.setEditedPrinterFloorNumber,onSave:e.updatePrinterFloorNumber},{input:v(()=>[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:v(()=>[h(se,{color:"secondary"},{default:v(()=>[d?($(),te(J,{key:0,size:"small"},{default:v(()=>t[13]||(t[13]=[k(" edit ")])),_:1})):fe("",!0),k(" "+re(e.selectedFloor.floor),1)]),_:2},1024)]),_:2},1032,["onOpen","onSave"])):fe("",!0)]),_:2},1040)]),_:1}),h(wn),e.selectedFloor?($(),te(se,{key:0,color:"primary",onClick:t[6]||(t[6]=d=>e.clickDeleteFloor())},{default:v(()=>[h(J,null,{default:v(()=>t[14]||(t[14]=[k("delete")])),_:1}),t[15]||(t[15]=k(" Delete floor "))]),_:1})):fe("",!0)]),_:1}),e.selectedFloor?($(),te(Vt,{key:0},{default:v(()=>[($(!0),me(Pe,null,Wt(e.showAddedPrinters,d=>($(),te(Ve,{key:d},{default:v(()=>[e.printerInFloor(e.selectedFloor,d)?($(),te(c,{key:0},{default:v(()=>[h(dt,null,{default:v(()=>{var f;return[k(re((f=e.printerInFloor(e.selectedFloor,d))==null?void 0:f.name),1)]}),_:2},1024)]),_:2},1024)):fe("",!0),e.printerInFloor(e.selectedFloor,d)?($(),te(hu,{key:1},{default:v(()=>[h(se,{onClick:f=>e.deletePrinterFromFloor(e.selectedFloor,d)},{default:v(()=>[h(J,null,{default:v(()=>t[16]||(t[16]=[k("close")])),_:1}),t[17]||(t[17]=k(" Clear "))]),_:2},1032,["onClick"])]),_:2},1024)):fe("",!0)]),_:2},1024))),128))]),_:1})):fe("",!0)]),_:1})]),_:1})]),_:1})}const rZ=Go(eZ,[["render",nZ]]),sZ="/img/DavidZwart.jpg",HM="0.0.19",iZ={key:0},oZ={key:1},aZ=$e({__name:"AboutView",setup(e){const t=U(""),n=U(""),r=U(HM);return _t(async()=>{const s=await pa.getVersion();t.value=s.version,n.value=s.monsterPi}),(s,i)=>($(),te(gt,null,{default:v(()=>[h(sn,null,{default:v(()=>i[0]||(i[0]=[k(" About FDM Monster"),M("strong",null," © ",-1)])),_:1}),h(en,null,{default:v(()=>i[1]||(i[1]=[k(" The first prototype of FDM Monster"),M("strong",null," © ",-1),k(" was created by David Zwart in 2021 in collaboration with "),M("strong",null,[M("a",{href:"https://mtb3d.com"}," MTB3D ")],-1),k(". 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:v(()=>[i[4]||(i[4]=k(" 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]=M("br",null,null,-1)),i[6]||(i[6]=k(" This version uses the famous ")),i[7]||(i[7]=M("a",{href:"https://nodejs.org/en",target:"_blank"},[M("strong",null," Node.js framework ")],-1)),i[8]||(i[8]=k(" together with Awilix and ExpressJS for its server, and ")),i[9]||(i[9]=M("a",{href:"https://vuejs.org/",target:"_blank"},[M("strong",null," Vue 2 ")],-1)),i[10]||(i[10]=k(" and ")),i[11]||(i[11]=M("a",{href:"https://next.vuetifyjs.com/",target:"_blank"},[M("strong",null," Vuetify 2 ")],-1)),i[12]||(i[12]=k(" to set a base for FDM Monster Client")),i[13]||(i[13]=M("strong",null," © ",-1)),i[14]||(i[14]=k(" - the webapp. ")),i[15]||(i[15]=M("br",null,null,-1)),i[16]||(i[16]=M("br",null,null,-1)),M("strong",null," Your server's version is: "+re(t.value),1),i[17]||(i[17]=M("br",null,null,-1)),M("strong",null," Your clients's version is: "+re(r.value),1),i[18]||(i[18]=M("br",null,null,-1)),n.value?($(),me("strong",iZ,[k(" Your MonsterPi version is: "+re(n.value),1),i[2]||(i[2]=M("br",null,null,-1))])):($(),me("strong",oZ," No MonsterPi distro detected. ")),i[19]||(i[19]=M("br",null,null,-1)),h(se,{class:"mt-3",variant:"outlined",to:"/settings/software-upgrade"},{default:v(()=>i[3]||(i[3]=[k(" Visit Upgrade Settings ")])),_:1})]),_:1}),h(sn,null,{default:v(()=>i[20]||(i[20]=[k(" Documentation ")])),_:1}),h(en,null,{default:v(()=>[M("strong",null,[h(se,{color:"primary",href:"https://docs.fdm-monster.net",style:{color:"white"},target:"_blank"},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>i[21]||(i[21]=[k("menu_book")])),_:1}),i[22]||(i[22]=k(" FDM Monster documentation site "))]),_:1})]),i[23]||(i[23]=M("br",null,null,-1))]),_:1}),h(sn,null,{default:v(()=>[i[25]||(i[25]=k(" Bug reports ")),h(J,null,{default:v(()=>i[24]||(i[24]=[k("bug")])),_:1})]),_:1}),h(en,null,{default:v(()=>i[26]||(i[26]=[k(" Did you find a bug, or a feature that needs work? We would love to hear about it! "),M("br",null,null,-1),M("strong",null," We have multiple ways to report it: ",-1),M("h3",null,[M("ul",{class:"ml-5"},[M("li",null,"Mail to davidzwa@gmail.com"),M("li",null,[M("a",{href:"https://discord.gg/mwA8uP8CMc",style:{color:"white"},target:"_blank"}," Discord server ")]),M("li",null,[M("strong",null,[M("a",{href:"https://github.com/fdm-monster/fdm-monster/issues",style:{color:"white"},target:"_blank"},[k(" FDM Monster "),M("strong",null," © "),k(" Github Issues ")])])]),M("li",null,[M("a",{href:"https://fdm-monster.net",style:{color:"white"},target:"_blank"}," Website ")])])],-1)])),_:1}),h(sn,null,{default:v(()=>i[27]||(i[27]=[k(" About me ")])),_:1}),h(en,null,{default:v(()=>i[28]||(i[28]=[M("img",{src:sZ,width:"150px"},null,-1),M("h4",{class:"mt-2"},[M("a",{href:"https://www.linkedin.com/in/david-zwart-88514083/",style:{color:"white"},target:"_blank"}," LinkedIn "),M("a",{class:"ml-2",href:"https://github.com/davidzwa",style:{color:"white"},target:"_blank"}," Github Profile ")],-1),k(" David Zwart MSc., post-graduate from the TU Delft (Embedded Systems), author of FDM Monster"),M("strong",null," © ",-1)])),_:1})]),_:1}))}});/*!
67
+ * @kurkle/color v0.3.2
68
+ * https://github.com/kurkle/color#readme
69
+ * (c) 2023 Jukka Kurkela
70
+ * Released under the MIT License
71
+ */function jd(e){return e+.5|0}const bo=(e,t,n)=>Math.max(Math.min(e,n),t);function mc(e){return bo(jd(e*2.55),0,255)}function To(e){return bo(jd(e*255),0,255)}function Ti(e){return bo(jd(e/2.55)/100,0,1)}function Wk(e){return bo(jd(e*100),0,100)}const Qr={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},tb=[..."0123456789ABCDEF"],lZ=e=>tb[e&15],uZ=e=>tb[(e&240)>>4]+tb[e&15],kf=e=>(e&240)>>4===(e&15),cZ=e=>kf(e.r)&&kf(e.g)&&kf(e.b)&&kf(e.a);function dZ(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Qr[e[1]]*17,g:255&Qr[e[2]]*17,b:255&Qr[e[3]]*17,a:t===5?Qr[e[4]]*17:255}:(t===7||t===9)&&(n={r:Qr[e[1]]<<4|Qr[e[2]],g:Qr[e[3]]<<4|Qr[e[4]],b:Qr[e[5]]<<4|Qr[e[6]],a:t===9?Qr[e[7]]<<4|Qr[e[8]]:255})),n}const fZ=(e,t)=>e<255?t(e):"";function hZ(e){var t=cZ(e)?lZ:uZ;return e?"#"+t(e.r)+t(e.g)+t(e.b)+fZ(e.a,t):void 0}const pZ=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function jM(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 mZ(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 gZ(e,t,n){const r=jM(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 vZ(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 rS(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=vZ(n,r,s,c,i),l=l*60+.5),[l|0,u||0,a]}function sS(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(To)}function iS(e,t,n){return sS(jM,e,t,n)}function yZ(e,t,n){return sS(gZ,e,t,n)}function bZ(e,t,n){return sS(mZ,e,t,n)}function qM(e){return(e%360+360)%360}function wZ(e){const t=pZ.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?mc(+t[5]):To(+t[5]));const s=qM(+t[2]),i=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?r=yZ(s,i,o):t[1]==="hsv"?r=bZ(s,i,o):r=iS(s,i,o),{r:r[0],g:r[1],b:r[2],a:n}}function SZ(e,t){var n=rS(e);n[0]=qM(n[0]+t),n=iS(n),e.r=n[0],e.g=n[1],e.b=n[2]}function _Z(e){if(!e)return;const t=rS(e),n=t[0],r=Wk(t[1]),s=Wk(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${s}%, ${Ti(e.a)})`:`hsl(${n}, ${r}%, ${s}%)`}const Gk={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"},Kk={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 kZ(){const e={},t=Object.keys(Kk),n=Object.keys(Gk);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,Gk[i]);i=parseInt(Kk[o],16),e[a]=[i>>16&255,i>>8&255,i&255]}return e}let xf;function xZ(e){xf||(xf=kZ(),xf.transparent=[0,0,0,0]);const t=xf[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const EZ=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function CZ(e){const t=EZ.exec(e);let n=255,r,s,i;if(t){if(t[7]!==r){const o=+t[7];n=t[8]?mc(o):bo(o*255,0,255)}return r=+t[1],s=+t[3],i=+t[5],r=255&(t[2]?mc(r):bo(r,0,255)),s=255&(t[4]?mc(s):bo(s,0,255)),i=255&(t[6]?mc(i):bo(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}, ${Ti(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Ug=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,pl=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function PZ(e,t,n){const r=pl(Ti(e.r)),s=pl(Ti(e.g)),i=pl(Ti(e.b));return{r:To(Ug(r+n*(pl(Ti(t.r))-r))),g:To(Ug(s+n*(pl(Ti(t.g))-s))),b:To(Ug(i+n*(pl(Ti(t.b))-i))),a:e.a+n*(t.a-e.a)}}function Ef(e,t,n){if(e){let r=rS(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=iS(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function WM(e,t){return e&&Object.assign(t||{},e)}function Yk(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=To(e[3]))):(t=WM(e,{r:0,g:0,b:0,a:1}),t.a=To(t.a)),t}function RZ(e){return e.charAt(0)==="r"?CZ(e):wZ(e)}class cd{constructor(t){if(t instanceof cd)return t;const n=typeof t;let r;n==="object"?r=Yk(t):n==="string"&&(r=dZ(t)||xZ(t)||RZ(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=WM(this._rgb);return t&&(t.a=Ti(t.a)),t}set rgb(t){this._rgb=Yk(t)}rgbString(){return this._valid?TZ(this._rgb):void 0}hexString(){return this._valid?hZ(this._rgb):void 0}hslString(){return this._valid?_Z(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=PZ(this._rgb,t._rgb,n)),this}clone(){return new cd(this.rgb)}alpha(t){return this._rgb.a=To(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=jd(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 Ef(this._rgb,2,t),this}darken(t){return Ef(this._rgb,2,-t),this}saturate(t){return Ef(this._rgb,1,t),this}desaturate(t){return Ef(this._rgb,1,-t),this}rotate(t){return SZ(this._rgb,t),this}}/*!
72
+ * Chart.js v4.4.8
73
+ * https://www.chartjs.org
74
+ * (c) 2025 Chart.js Contributors
75
+ * Released under the MIT License
76
+ */function bi(){}const IZ=(()=>{let e=0;return()=>e++})();function Nt(e){return e==null}function _n(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 xt(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function ds(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function qs(e,t){return ds(e)?e:t}function At(e,t){return typeof e>"u"?t:e}const AZ=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Yt(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(_n(e))for(i=e.length,s=0;s<i;s++)t.call(n,e[s],s);else if(xt(e))for(o=Object.keys(e),i=o.length,s=0;s<i;s++)t.call(n,e[o[s]],o[s])}function up(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 cp(e){if(_n(e))return e.map(cp);if(xt(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let s=0;for(;s<r;++s)t[n[s]]=cp(e[n[s]]);return t}return e}function GM(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function OZ(e,t,n,r){if(!GM(e))return;const s=t[e],i=n[e];xt(s)&&xt(i)?dd(s,i,r):t[e]=cp(i)}function dd(e,t,n){const r=_n(t)?t:[t],s=r.length;if(!xt(e))return e;n=n||{};const i=n.merger||OZ;let o;for(let a=0;a<s;++a){if(o=r[a],!xt(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 Dc(e,t){return dd(e,t,{merger:MZ})}function MZ(e,t,n){if(!GM(e))return;const r=t[e],s=n[e];xt(r)&&xt(s)?Dc(r,s):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=cp(s))}const Xk={"":e=>e,x:e=>e.x,y:e=>e.y};function DZ(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 $Z(e){const t=DZ(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function yu(e,t){return(Xk[t]||(Xk[t]=$Z(t)))(e)}function oS(e){return e.charAt(0).toUpperCase()+e.slice(1)}const fd=e=>typeof e<"u",$o=e=>typeof e=="function",Qk=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function LZ(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const nr=Math.PI,Po=2*nr,dp=Number.POSITIVE_INFINITY,FZ=nr/180,Es=nr/2,ea=nr/4,Jk=nr*2/3,nb=Math.log10,Ro=Math.sign;function hh(e,t,n){return Math.abs(e-t)<n}function Zk(e){const t=Math.round(e);e=hh(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(nb(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function NZ(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 BZ(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function fp(e){return!BZ(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function VZ(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function UZ(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 ma(e){return e*(nr/180)}function zZ(e){return e*(180/nr)}function ex(e){if(!ds(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function HZ(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*nr&&(i+=Po),{angle:i,distance:s}}function jZ(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function ta(e){return(e%Po+Po)%Po}function qZ(e,t,n,r){const s=ta(e),i=ta(t),o=ta(n),a=ta(i-s),l=ta(o-s),u=ta(s-i),c=ta(s-o);return s===i||s===o||r&&i===o||a>l&&u<c}function Cs(e,t,n){return Math.max(t,Math.min(n,e))}function WZ(e){return Cs(e,-32768,32767)}function Ol(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function aS(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 rb=(e,t,n,r)=>aS(e,n,r?s=>{const i=e[s][t];return i<n||i===n&&e[s+1][t]===n}:s=>e[s][t]<n),GZ=(e,t,n)=>aS(e,n,r=>e[r][t]>=n);function KZ(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 KM=["push","pop","shift","splice","unshift"];function YZ(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),KM.forEach(n=>{const r="_onData"+oS(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 tx(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)&&(KM.forEach(i=>{delete e[i]}),delete e._chartjs)}function YM(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const XM=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function QM(e,t){let n=[],r=!1;return function(...s){n=s,r||(r=!0,XM.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 lS=e=>e==="start"?"left":e==="end"?"right":"center",Wn=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,QZ=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t,Cf=e=>e===0||e===1,nx=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Po/n)),rx=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Po/n)+1,$c={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*Es)+1,easeOutSine:e=>Math.sin(e*Es),easeInOutSine:e=>-.5*(Math.cos(nr*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=>Cf(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=>Cf(e)?e:nx(e,.075,.3),easeOutElastic:e=>Cf(e)?e:rx(e,.075,.3),easeInOutElastic(e){return Cf(e)?e:e<.5?.5*nx(e*2,.1125,.45):.5+.5*rx(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-$c.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?$c.easeInBounce(e*2)*.5:$c.easeOutBounce(e*2-1)*.5+.5};function JM(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function sx(e){return JM(e)?e:new cd(e)}function zg(e){return JM(e)?e:new cd(e).saturate(.5).darken(.1).hexString()}const JZ=["x","y","borderWidth","radius","tension"],ZZ=["color","borderColor","backgroundColor"];function eee(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:ZZ},numbers:{type:"number",properties:JZ}}),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 tee(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const ix=new Map;function nee(e,t){t=t||{};const n=e+JSON.stringify(t);let r=ix.get(n);return r||(r=new Intl.NumberFormat(e,t),ix.set(n,r)),r}function ZM(e,t,n){return nee(t,n).format(e)}const eD={values(e){return _n(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=ree(e,n)}const o=nb(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(nb(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?eD.numeric.call(this,e,t,n):""}};function ree(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 tD={formatters:eD};function see(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:tD.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 Xa=Object.create(null),sb=Object.create(null);function Lc(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 Hg(e,t,n){return typeof t=="string"?dd(Lc(e,t),n):dd(Lc(e,""),t)}class iee{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)=>zg(s.backgroundColor),this.hoverBorderColor=(r,s)=>zg(s.borderColor),this.hoverColor=(r,s)=>zg(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 Hg(this,t,n)}get(t){return Lc(this,t)}describe(t,n){return Hg(sb,t,n)}override(t,n){return Hg(Xa,t,n)}route(t,n,r,s){const i=Lc(this,t),o=Lc(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 xt(l)?Object.assign({},u,l):At(l,u)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var pn=new iee({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[eee,tee,see]);function oee(e){return!e||Nt(e.size)||Nt(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function ox(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 na(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 ax(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function lx(e,t,n,r){nD(e,t,n,r,null)}function nD(e,t,n,r,s){let i,o,a,l,u,c,d,f;const p=t.pointStyle,g=t.rotation,m=t.radius;let y=(g||0)*FZ;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,Po):e.arc(n,r,m,0,Po),e.closePath();break;case"triangle":c=s?s/2:m,e.moveTo(n+Math.sin(y)*c,r-Math.cos(y)*m),y+=Jk,e.lineTo(n+Math.sin(y)*c,r-Math.cos(y)*m),y+=Jk,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+ea)*l,d=Math.cos(y+ea)*(s?s/2-u:l),a=Math.sin(y+ea)*l,f=Math.sin(y+ea)*(s?s/2-u:l),e.arc(n-d,r-a,u,y-nr,y-Es),e.arc(n+f,r-o,u,y-Es,y),e.arc(n+d,r+a,u,y,y+Es),e.arc(n-f,r+o,u,y+Es,y+nr),e.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*m,c=s?s/2:l,e.rect(n-c,r-l,2*c,2*l);break}y+=ea;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+=ea;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+=ea,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 rD(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 uS(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function cS(e){e.restore()}function aee(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 lee(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 uee(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function hd(e,t,n,r,s,i={}){const o=_n(t)?t:[t],a=i.strokeWidth>0&&i.strokeColor!=="";let l,u;for(e.save(),e.font=s.string,aee(e,i),l=0;l<o.length;++l)u=o[l],i.backdrop&&uee(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),lee(e,n,r,u,i),r+=Number(s.lineHeight);e.restore()}function hp(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*nr,nr,!0),e.lineTo(n,r+i-o.bottomLeft),e.arc(n+o.bottomLeft,r+i-o.bottomLeft,o.bottomLeft,nr,Es,!0),e.lineTo(n+s-o.bottomRight,r+i),e.arc(n+s-o.bottomRight,r+i-o.bottomRight,o.bottomRight,Es,0,!0),e.lineTo(n+s,r+o.topRight),e.arc(n+s-o.topRight,r+o.topRight,o.topRight,0,-Es,!0),e.lineTo(n+o.topLeft,r)}const cee=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,dee=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function fee(e,t){const n=(""+e).match(cee);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 hee=e=>+e||0;function sD(e,t){const n={},r=xt(t),s=r?Object.keys(t):t,i=xt(e)?r?o=>At(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of s)n[o]=hee(i(o));return n}function iD(e){return sD(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Bl(e){return sD(e,["topLeft","topRight","bottomLeft","bottomRight"])}function fs(e){const t=iD(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(dee)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const s={family:At(e.family,t.family),lineHeight:fee(At(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:At(e.weight,t.weight),string:""};return s.string=oee(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 pee(e,t,n){const{min:r,max:s}=e,i=AZ(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 ju(e,t){return Object.assign(Object.create(e),t)}function dS(e,t=[""],n,r,s=()=>e[0]){const i=n||e;typeof r>"u"&&(r=uD("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:i,_fallback:r,_getTarget:s,override:a=>dS([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 aD(a,l,()=>_ee(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return cx(a).includes(l)},ownKeys(a){return cx(a)},set(a,l,u){const c=a._storage||(a._storage=s());return a[l]=c[l]=u,delete a._keys,!0}})}function bu(e,t,n,r){const s={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:oD(e,r),setContext:i=>bu(e,i,n,r),override:i=>bu(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 aD(i,o,()=>gee(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 oD(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:$o(n)?n:()=>n,isIndexable:$o(r)?r:()=>r}}const mee=(e,t)=>e?e+oS(t):t,fS=(e,t)=>xt(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function aD(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function gee(e,t,n){const{_proxy:r,_context:s,_subProxy:i,_descriptors:o}=e;let a=r[t];return $o(a)&&o.isScriptable(t)&&(a=vee(t,a,e,n)),_n(a)&&a.length&&(a=yee(t,a,e,o.isIndexable)),fS(t,a)&&(a=bu(a,s,i&&i[t],o)),a}function vee(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),fS(e,l)&&(l=hS(s._scopes,s,e,l)),l}function yee(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(xt(t[0])){const l=t,u=s._scopes.filter(c=>c!==l);t=[];for(const c of l){const d=hS(u,s,e,c);t.push(bu(d,i,o&&o[e],a))}}return t}function lD(e,t,n){return $o(e)?e(t,n):e}const bee=(e,t)=>e===!0?t:typeof e=="string"?yu(t,e):void 0;function wee(e,t,n,r,s){for(const i of t){const o=bee(n,i);if(o){e.add(o);const a=lD(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 hS(e,t,n,r){const s=t._rootScopes,i=lD(t._fallback,n,r),o=[...e,...s],a=new Set;a.add(r);let l=ux(a,o,n,i||n,r);return l===null||typeof i<"u"&&i!==n&&(l=ux(a,o,i,l,r),l===null)?!1:dS(Array.from(a),[""],s,i,()=>See(t,n,r))}function ux(e,t,n,r,s){for(;n;)n=wee(e,t,n,r,s);return n}function See(e,t,n){const r=e._getTarget();t in r||(r[t]={});const s=r[t];return _n(s)&&xt(n)?n:s||{}}function _ee(e,t,n,r){let s;for(const i of t)if(s=uD(mee(i,e),n),typeof s<"u")return fS(e,s)?hS(n,r,e,s):s}function uD(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function cx(e){let t=e._keys;return t||(t=e._keys=kee(e._scopes)),t}function kee(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 pS(){return typeof window<"u"&&typeof document<"u"}function mS(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function pp(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 Rm=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function xee(e,t){return Rm(e).getPropertyValue(t)}const Eee=["top","right","bottom","left"];function $a(e,t,n){const r={};n=n?"-"+n:"";for(let s=0;s<4;s++){const i=Eee[s];r[i]=parseFloat(e[t+"-"+i+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const Cee=(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(Cee(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 aa(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,s=Rm(n),i=s.boxSizing==="border-box",o=$a(s,"padding"),a=$a(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:g}=t;return i&&(p-=o.width+a.width,g-=o.height+a.height),{x:Math.round((l-d)/p*n.width/r),y:Math.round((u-f)/g*n.height/r)}}function Pee(e,t,n){let r,s;if(t===void 0||n===void 0){const i=e&&mS(e);if(!i)t=e.clientWidth,n=e.clientHeight;else{const o=i.getBoundingClientRect(),a=Rm(i),l=$a(a,"border","width"),u=$a(a,"padding");t=o.width-u.width-l.width,n=o.height-u.height-l.height,r=pp(a.maxWidth,i,"clientWidth"),s=pp(a.maxHeight,i,"clientHeight")}}return{width:t,height:n,maxWidth:r||dp,maxHeight:s||dp}}const Pf=e=>Math.round(e*10)/10;function Ree(e,t,n,r){const s=Rm(e),i=$a(s,"margin"),o=pp(s.maxWidth,e,"clientWidth")||dp,a=pp(s.maxHeight,e,"clientHeight")||dp,l=Pee(e,t,n);let{width:u,height:c}=l;if(s.boxSizing==="content-box"){const f=$a(s,"border","width"),p=$a(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=Pf(Math.min(u,o,l.maxWidth)),c=Pf(Math.min(c,a,l.maxHeight)),u&&!c&&(c=Pf(u/2)),(t!==void 0||n!==void 0)&&r&&l.height&&c>l.height&&(c=l.height,u=Pf(Math.floor(c*r))),{width:u,height:c}}function dx(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 Iee=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};pS()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function fx(e,t){const n=xee(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}const Aee=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 Vl(e,t,n){return e?Aee(t,n):Oee()}function cD(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 dD(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}/*!
77
+ * Chart.js v4.4.8
78
+ * https://www.chartjs.org
79
+ * (c) 2025 Chart.js Contributors
80
+ * Released under the MIT License
81
+ */class Mee{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=XM.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 _i=new Mee;const hx="transparent",Dee={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=sx(e||hx),s=r.valid&&sx(t||hx);return s&&s.valid?s.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class $ee{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||Dee[t.type||typeof o],this._easing=$c[t.easing]||$c.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 fD{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!xt(t))return;const n=Object.keys(pn.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const i=t[s];if(!xt(i))return;const o={};for(const a of n)o[a]=i[a];(_n(i.properties)&&i.properties||[s]).forEach(a=>{(a===s||!r.has(a))&&r.set(a,o)})})}_animateOptions(t,n){const r=n.options,s=Fee(t,r);if(!s)return[];const i=this._createAnimations(s,r);return r.$shared&&Lee(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 $ee(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 _i.add(this._chart,r),!0}}function Lee(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 Fee(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 px(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 Nee(e,t,n){if(n===!1)return!1;const r=px(e,n),s=px(t,n);return{top:s.end,right:r.end,bottom:s.start,left:r.start}}function Bee(e){let t,n,r,s;return xt(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 hD(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 mx(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],ds(u)&&(i||t===0||Ro(t)===Ro(u))&&(t+=u)}return!c&&!r.all?0:t}function Vee(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 jg(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function Uee(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function zee(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 Hee(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function gx(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 vx(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=Uee(i,o,r),d=t.length;let f;for(let p=0;p<d;++p){const g=t[p],{[l]:m,[u]:y}=g,w=g._stacks||(g._stacks={});f=w[u]=Hee(s,c,m),f[a]=y,f._top=gx(f,o,!0,r.type),f._bottom=gx(f,o,!1,r.type);const b=f._visualValues||(f._visualValues={});b[a]=y}}function qg(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function jee(e,t){return ju(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function qee(e,t,n){return ju(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function sc(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 Wg=e=>e==="reset"||e==="none",yx=(e,t)=>t?e:Object.assign({},e),Wee=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:hD(n,!0),values:null};class Fc{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=jg(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&&sc(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),s=(d,f,p,g)=>d==="x"?f:d==="r"?g:p,i=n.xAxisID=At(r.xAxisID,qg(t,"x")),o=n.yAxisID=At(r.yAxisID,qg(t,"y")),a=n.rAxisID=At(r.rAxisID,qg(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&&tx(this._data,this),t._stacked&&sc(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(xt(n)){const s=this._cachedMeta;this._data=Vee(n,s)}else if(r!==n){if(r){tx(r,this);const s=this._cachedMeta;sc(s),s._parsed=[]}n&&Object.isExtensible(n)&&YZ(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=jg(n.vScale,n),n.stack!==r.stack&&(s=!0,sc(n),n.stack=r.stack),this._resyncElements(t),(s||i!==n._stacked)&&(vx(this,n._parsed),n._stacked=jg(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{_n(s[t])?f=this.parseArrayData(r,s,t,n):xt(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&&vx(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,g;for(f=0,p=s;f<p;++f)g=f+r,d[f]={[a]:c||i.parse(u[g],g),[l]:o.parse(n[g],g)};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(yu(p,a),f),y:o.parse(yu(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:hD(s,!0),values:n._stacks[t.axis]._visualValues};return mx(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=mx(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}=zee(a);let f,p;function g(){p=s[f];const m=p[a.axis];return!ds(p[t.axis])||c>m||d<m}for(f=0;f<o&&!(!g()&&(this.updateRangeFromParsed(u,t,p,l),i));++f);if(i){for(f=o-1;f>=0;--f)if(!g()){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],ds(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=Bee(At(this.options.clip,Nee(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=qee(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=jee(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&&fd(r);if(a)return yx(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]),g=()=>this.getContext(r,s,n),m=u.resolveNamedOptions(f,p,g,d);return m.$shared&&(m.$shared=l,i[o]=Object.freeze(yx(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 fD(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||Wg(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){Wg(s)?Object.assign(t,r):this._resolveAnimations(n,s).update(t,r)}updateSharedOptions(t,n,r){t&&!Wg(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&&sc(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])}}ye(Fc,"defaults",{}),ye(Fc,"datasetElementType",null),ye(Fc,"dataElementType",null);function Gee(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=YM(r.sort((s,i)=>s-i))}return e._cache.$bar}function Kee(e){const t=e.iScale,n=Gee(t,e.type);let r=t._length,s,i,o,a;const l=()=>{o===32767||o===-32768||(fd(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 Yee(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 Qee(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 pD(e,t,n,r){return _n(e)?Qee(e,t,n,r):t[n.axis]=n.parse(e,r),t}function bx(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(pD(f,d,i,u));return l}function Gg(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function Jee(e,t,n){return e!==0?Ro(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function Zee(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 ete(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}=Zee(e);s==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?s=u:(n._bottom||0)===r?s=c:(i[wx(c,o,a,l)]=!0,s=u)),i[wx(s,o,a,l)]=!0,e.borderSkipped=i}function wx(e,t,n,r){return r?(e=tte(e,t,n),e=Sx(e,n,t)):e=Sx(e,t,n),e}function tte(e,t,n){return e===t?n:e===n?t:e}function Sx(e,t,n){return e==="start"?t:e==="end"?n:e}function nte(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class ph extends Fc{parsePrimitiveData(t,n,r,s){return bx(t,n,r,s)}parseArrayData(t,n,r,s){return bx(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,g,m;for(f=r,p=r+s;f<p;++f)m=n[f],g={},g[i.axis]=i.parse(yu(m,u),f),d.push(pD(yu(m,c),g,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=Gg(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 g=this.getParsed(p),m=i||Nt(g[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),y=this._calculateBarIndexPixels(p,c),w=(g._stacks||{})[a.axis],b={horizontal:u,base:m.base,enableBorderRadius:!w||Gg(g._custom)||o===w._top||o===w._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&&(b.options=d||this.resolveDataElementOptions(p,t[p].active?"active":s));const _=b.options||t[p].options;ete(b,_,w,o),nte(b,_,c.ratio),this.updateElement(t[p],p,b,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||Kee(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=Gg(u);let d=l[n.axis],f=0,p=r?this.applyStack(n,l,r):d,g,m;p!==d&&(f=p-d,p=d),c&&(d=u.barStart,p=u.barEnd-u.barStart,d!==0&&Ro(d)!==Ro(u.barEnd)&&(f=0),f+=d);const y=!Nt(i)&&!c?i:f;let w=n.getPixelForValue(y);if(this.chart.getDataVisibility(t)?g=n.getPixelForValue(f+p):g=w,m=g-w,Math.abs(m)<o){m=Jee(m,n,a)*o,d===a&&(w-=m/2);const b=n.getPixelForDecimal(0),_=n.getPixelForDecimal(1),T=Math.min(b,_),x=Math.max(b,_);w=Math.max(Math.min(w,x),T),g=w+m,r&&!c&&(l._stacks[n.axis]._visualValues[s]=n.getValueForPixel(g)-n.getValueForPixel(w))}if(w===n.getPixelForValue(a)){const b=Ro(m)*n.getLineWidthForValue(a)/2;w+=b,m-=b}return{size:m,base:w,head:g,center:g+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):Yee(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)}}ye(ph,"id","bar"),ye(ph,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),ye(ph,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function ra(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class gS{constructor(t){ye(this,"options");this.options=t||{}}static override(t){Object.assign(gS.prototype,t)}init(){}formats(){return ra()}parse(){return ra()}format(){return ra()}add(){return ra()}diff(){return ra()}startOf(){return ra()}endOf(){return ra()}}var rte={_date:gS};function ste(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?GZ:rb;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 g=f.slice(c.hi).findIndex(m=>!Nt(m[d.axis]));c.hi+=Math.max(0,g)}return c}}return{lo:0,hi:i.length-1}}function qd(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}=ste(i[a],t,o,s);for(let p=d;p<=f;++p){const g=c[p];g.skip||r(g,u,p)}}}function ite(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 Kg(e,t,n,r,s){const i=[];return!s&&!e.isPointInArea(t)||qd(e,n,t,function(a,l,u){!s&&!rD(a,e.chartArea,0)||a.inRange(t.x,t.y,r)&&i.push({element:a,datasetIndex:l,index:u})},!0),i}function ote(e,t,n,r){let s=[];function i(o,a,l){const{startAngle:u,endAngle:c}=o.getProps(["startAngle","endAngle"],r),{angle:d}=HZ(o,{x:t.x,y:t.y});qZ(d,u,c)&&s.push({element:o,datasetIndex:a,index:l})}return qd(e,n,t,i),s}function ate(e,t,n,r,s,i){let o=[];const a=ite(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 g=c.getCenterPoint(s);if(!(!!i||e.isPointInArea(g))&&!p)return;const y=a(t,g);y<l?(o=[{element:c,datasetIndex:d,index:f}],l=y):y===l&&o.push({element:c,datasetIndex:d,index:f})}return qd(e,n,t,u),o}function Yg(e,t,n,r,s,i){return!i&&!e.isPointInArea(t)?[]:n==="r"&&!r?ote(e,t,n,s):ate(e,t,n,r,s,i)}function _x(e,t,n,r,s){const i=[],o=n==="x"?"inXRange":"inYRange";let a=!1;return qd(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 lte={evaluateInteractionItems:qd,modes:{index(e,t,n,r){const s=aa(t,e),i=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?Kg(e,s,i,r,o):Yg(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=aa(t,e),i=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?Kg(e,s,i,r,o):Yg(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=aa(t,e),i=n.axis||"xy",o=n.includeInvisible||!1;return Kg(e,s,i,r,o)},nearest(e,t,n,r){const s=aa(t,e),i=n.axis||"xy",o=n.includeInvisible||!1;return Yg(e,s,i,n.intersect,r,o)},x(e,t,n,r){const s=aa(t,e);return _x(e,s,"x",n.intersect,r)},y(e,t,n,r){const s=aa(t,e);return _x(e,s,"y",n.intersect,r)}}};const mD=["left","top","right","bottom"];function ic(e,t){return e.filter(n=>n.pos===t)}function kx(e,t){return e.filter(n=>mD.indexOf(n.pos)===-1&&n.box.axis===t)}function oc(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 ute(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 cte(e){const t={};for(const n of e){const{stack:r,pos:s,stackWeight:i}=n;if(!r||!mD.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 dte(e,t){const n=cte(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 fte(e){const t=ute(e),n=oc(t.filter(u=>u.box.fullSize),!0),r=oc(ic(t,"left"),!0),s=oc(ic(t,"right")),i=oc(ic(t,"top"),!0),o=oc(ic(t,"bottom")),a=kx(t,"x"),l=kx(t,"y");return{fullSize:n,leftAndTop:r.concat(i),rightAndBottom:s.concat(l).concat(o).concat(a),chartArea:ic(t,"chartArea"),vertical:r.concat(s).concat(l),horizontal:i.concat(o).concat(a)}}function xx(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function gD(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 hte(e,t,n,r){const{pos:s,box:i}=n,o=e.maxPadding;if(!xt(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&&gD(o,i.getPadding());const a=Math.max(0,t.outerWidth-xx(o,e,"left","right")),l=Math.max(0,t.outerHeight-xx(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 pte(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 mte(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 gc(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,mte(a.horizontal,t));const{same:d,other:f}=hte(t,n,a,r);u|=d&&s.length,c=c||f,l.fullSize||s.push(a)}return u&&gc(s,t,n,r)||c}function Rf(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 Ex(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;fd(u.start)&&(o=u.start),l.fullSize?Rf(l,s.left,o,n.outerWidth-s.right-s.left,f):Rf(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;fd(u.start)&&(i=u.start),l.fullSize?Rf(l,i,s.top,f,n.outerHeight-s.bottom-s.top):Rf(l,i,t.top+u.placed,f,d),u.start=i,u.placed+=d,i=l.right}}t.x=i,t.y=o}var rs={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=fs(e.options.layout.padding),i=Math.max(t-s.width,0),o=Math.max(n-s.height,0),a=fte(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);gD(f,fs(r));const p=Object.assign({maxPadding:f,w:i,h:o,x:s.left,y:s.top},s),g=dte(l.concat(u),d);gc(a.fullSize,p,d,g),gc(l,p,d,g),gc(u,p,d,g)&&gc(l,p,d,g),pte(p),Ex(a.leftAndTop,p,d,g),p.x+=p.w,p.y+=p.h,Ex(a.rightAndBottom,p,d,g),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 vD{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 gte extends vD{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const mh="$chartjs",vte={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Cx=e=>e===null||e==="";function yte(e,t){const n=e.style,r=e.getAttribute("height"),s=e.getAttribute("width");if(e[mh]={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",Cx(s)){const i=fx(e,"width");i!==void 0&&(e.width=i)}if(Cx(r))if(e.style.height==="")e.height=e.width/(t||2);else{const i=fx(e,"height");i!==void 0&&(e.height=i)}return e}const yD=Iee?{passive:!0}:!1;function bte(e,t,n){e&&e.addEventListener(t,n,yD)}function wte(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,yD)}function Ste(e,t){const n=vte[e.type]||e.type,{x:r,y:s}=aa(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:s!==void 0?s:null}}function mp(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function _te(e,t,n){const r=e.canvas,s=new MutationObserver(i=>{let o=!1;for(const a of i)o=o||mp(a.addedNodes,r),o=o&&!mp(a.removedNodes,r);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function kte(e,t,n){const r=e.canvas,s=new MutationObserver(i=>{let o=!1;for(const a of i)o=o||mp(a.removedNodes,r),o=o&&!mp(a.addedNodes,r);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const pd=new Map;let Tx=0;function bD(){const e=window.devicePixelRatio;e!==Tx&&(Tx=e,pd.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function xte(e,t){pd.size||window.addEventListener("resize",bD),pd.set(e,t)}function Ete(e){pd.delete(e),pd.size||window.removeEventListener("resize",bD)}function Cte(e,t,n){const r=e.canvas,s=r&&mS(r);if(!s)return;const i=QM((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),xte(e,i),o}function Xg(e,t,n){n&&n.disconnect(),t==="resize"&&Ete(e)}function Tte(e,t,n){const r=e.canvas,s=QM(i=>{e.ctx!==null&&n(Ste(i,e))},e);return bte(r,t,s),s}class Pte extends vD{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(yte(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[mh])return!1;const r=n[mh].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[mh],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const s=t.$proxies||(t.$proxies={}),o={attach:_te,detach:kte,resize:Cte}[n]||Tte;s[n]=o(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),s=r[n];if(!s)return;({attach:Xg,detach:Xg,resize:Xg}[n]||wte)(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&&mS(t);return!!(n&&n.isConnected)}}function Rte(e){return!pS()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?gte:Pte}var Uf;let qu=(Uf=class{constructor(){ye(this,"x");ye(this,"y");ye(this,"active",!1);ye(this,"options");ye(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return fp(this.x)&&fp(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}},ye(Uf,"defaults",{}),ye(Uf,"defaultRoutes"),Uf);function Ite(e,t){const n=e.options.ticks,r=Ate(e),s=Math.min(n.maxTicksLimit||r,r),i=n.major.enabled?Mte(t):[],o=i.length,a=i[0],l=i[o-1],u=[];if(o>s)return Dte(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(If(t,u,c,Nt(p)?0:a-p,a),d=0,f=o-1;d<f;d++)If(t,u,c,i[d],i[d+1]);return If(t,u,c,l,Nt(p)?t.length:l+p),u}return If(t,u,c),u}function Ate(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=$te(e),s=t.length/n;if(!r)return Math.max(s,1);const i=NZ(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 Mte(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function Dte(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 If(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 $te(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 Lte=e=>e==="left"?"right":e==="right"?"left":e,Px=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Rx=(e,t)=>Math.min(t||e,e);function Ix(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 Fte(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 Nte(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 ac(e){return e.drawTicks?e.tickLength:0}function Ax(e,t){if(!e.display)return 0;const n=Zn(e.font,t),r=fs(e.padding);return(_n(e.text)?e.text.length:1)*n.lineHeight+r.height}function Bte(e,t){return ju(e,{scale:t,type:"scale"})}function Vte(e,t,n){return ju(e,{tick:n,index:t,type:"tick"})}function Ute(e,t,n){let r=lS(e);return(n&&t!=="right"||!n&&t==="right")&&(r=Lte(r)),r}function zte(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,g;const m=o-s,y=a-i;if(e.isHorizontal()){if(p=Wn(r,i,a),xt(n)){const w=Object.keys(n)[0],b=n[w];g=c[w].getPixelForValue(b)+m-t}else n==="center"?g=(u.bottom+u.top)/2+m-t:g=Px(e,n,t);f=a-i}else{if(xt(n)){const w=Object.keys(n)[0],b=n[w];p=c[w].getPixelForValue(b)-y+t}else n==="center"?p=(u.left+u.right)/2-y+t:p=Px(e,n,t);g=Wn(r,o,s),d=n==="left"?-Es:Es}return{titleX:p,titleY:g,maxWidth:f,rotation:d}}class Wu extends qu{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=qs(t,Number.POSITIVE_INFINITY),n=qs(n,Number.NEGATIVE_INFINITY),r=qs(r,Number.POSITIVE_INFINITY),s=qs(s,Number.NEGATIVE_INFINITY),{min:qs(t,r),max:qs(n,s),minDefined:ds(t),maxDefined:ds(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:qs(n,qs(r,n)),max:qs(r,qs(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(){Yt(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=pee(this,i,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?Ix(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=Ite(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(){Yt(this.options.afterUpdate,[this])}beforeSetDimensions(){Yt(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(){Yt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Yt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Yt(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=Yt(n.callback,[i.value,r,t],this)}afterTickToLabelConversion(){Yt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Yt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=Rx(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=Cs(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-ac(t.grid)-n.padding-Ax(t.title,this.chart.options.font),u=Math.sqrt(d*d+f*f),o=zZ(Math.min(Math.asin(Cs((c.highest.height+6)/a,-1,1)),Math.asin(Cs(l/u,-1,1))-Math.asin(Cs(f/u,-1,1)))),o=Math.max(s,Math.min(i,o))),this.labelRotation=o}afterCalculateLabelRotation(){Yt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Yt(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=Ax(s,n.options.font);if(a?(t.width=this.maxWidth,t.height=ac(i)+l):(t.height=this.maxHeight,t.width=ac(i)+l),r.display&&this.ticks.length){const{first:u,last:c,widest:d,highest:f}=this._getLabelSizes(),p=r.padding*2,g=ma(this.labelRotation),m=Math.cos(g),y=Math.sin(g);if(a){const w=r.mirror?0:y*d.width+m*f.height;t.height=Math.min(this.maxHeight,t.height+w+p)}else{const w=r.mirror?0:m*d.width+y*f.height;t.width=Math.min(this.maxWidth,t.width+w+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(){Yt(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=Ix(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/Rx(n,r));let u=0,c=0,d,f,p,g,m,y,w,b,_,T,x;for(d=0;d<n;d+=l){if(g=t[d].label,m=this._resolveTickFontOptions(d),s.font=y=m.string,w=i[y]=i[y]||{data:{},gc:[]},b=m.lineHeight,_=T=0,!Nt(g)&&!_n(g))_=ox(s,w.data,w.gc,_,g),T=b;else if(_n(g))for(f=0,p=g.length;f<p;++f)x=g[f],!Nt(x)&&!_n(x)&&(_=ox(s,w.data,w.gc,_,x),T+=b);o.push(_),a.push(T),u=Math.max(_,u),c=Math.max(T,c)}Nte(i,n);const C=o.indexOf(u),I=a.indexOf(c),S=E=>({width:o[E]||0,height:a[E]||0});return{first:S(0),last:S(n-1),widest:S(C),highest:S(I),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?na(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=Vte(this.getContext(),t,r))}return this.$context||(this.$context=Bte(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=ma(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=ac(i),p=[],g=a.setContext(this.getContext()),m=g.display?g.width:0,y=m/2,w=function(z){return na(r,z,m)};let b,_,T,x,C,I,S,E,O,R,A,D;if(o==="top")b=w(this.bottom),I=this.bottom-f,E=b-y,R=w(t.top)+y,D=t.bottom;else if(o==="bottom")b=w(this.top),R=t.top,D=w(t.bottom)-y,I=b+y,E=this.top+f;else if(o==="left")b=w(this.right),C=this.right-f,S=b-y,O=w(t.left)+y,A=t.right;else if(o==="right")b=w(this.left),O=t.left,A=w(t.right)-y,C=b+y,S=this.left+f;else if(n==="x"){if(o==="center")b=w((t.top+t.bottom)/2+.5);else if(xt(o)){const z=Object.keys(o)[0],K=o[z];b=w(this.chart.scales[z].getPixelForValue(K))}R=t.top,D=t.bottom,I=b+y,E=I+f}else if(n==="y"){if(o==="center")b=w((t.left+t.right)/2);else if(xt(o)){const z=Object.keys(o)[0],K=o[z];b=w(this.chart.scales[z].getPixelForValue(K))}C=b-y,S=C-f,O=t.left,A=t.right}const L=At(s.ticks.maxTicksLimit,d),W=Math.max(1,Math.ceil(d/L));for(_=0;_<d;_+=W){const z=this.getContext(_),K=i.setContext(z),G=a.setContext(z),H=K.lineWidth,B=K.color,ne=G.dash||[],q=G.dashOffset,Y=K.tickWidth,oe=K.tickColor,ie=K.tickBorderDash||[],be=K.tickBorderDashOffset;T=Fte(this,_,l),T!==void 0&&(x=na(r,T,H),u?C=S=O=A=x:I=E=R=D=x,p.push({tx1:C,ty1:I,tx2:S,ty2:E,x1:O,y1:R,x2:A,y2:D,width:H,color:B,borderDash:ne,borderDashOffset:q,tickWidth:Y,tickColor:oe,tickBorderDash:ie,tickBorderDashOffset:be}))}return this._ticksLength=d,this._borderValue=b,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=ac(r.grid),p=f+c,g=d?-c:p,m=-ma(this.labelRotation),y=[];let w,b,_,T,x,C,I,S,E,O,R,A,D="middle";if(s==="top")C=this.bottom-g,I=this._getXAxisLabelAlignment();else if(s==="bottom")C=this.top+g,I=this._getXAxisLabelAlignment();else if(s==="left"){const W=this._getYAxisLabelAlignment(f);I=W.textAlign,x=W.x}else if(s==="right"){const W=this._getYAxisLabelAlignment(f);I=W.textAlign,x=W.x}else if(n==="x"){if(s==="center")C=(t.top+t.bottom)/2+p;else if(xt(s)){const W=Object.keys(s)[0],z=s[W];C=this.chart.scales[W].getPixelForValue(z)+p}I=this._getXAxisLabelAlignment()}else if(n==="y"){if(s==="center")x=(t.left+t.right)/2-p;else if(xt(s)){const W=Object.keys(s)[0],z=s[W];x=this.chart.scales[W].getPixelForValue(z)}I=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?D="top":l==="end"&&(D="bottom"));const L=this._getLabelSizes();for(w=0,b=a.length;w<b;++w){_=a[w],T=_.label;const W=i.setContext(this.getContext(w));S=this.getPixelForTick(w)+i.labelOffset,E=this._resolveTickFontOptions(w),O=E.lineHeight,R=_n(T)?T.length:1;const z=R/2,K=W.color,G=W.textStrokeColor,H=W.textStrokeWidth;let B=I;o?(x=S,I==="inner"&&(w===b-1?B=this.options.reverse?"left":"right":w===0?B=this.options.reverse?"right":"left":B="center"),s==="top"?u==="near"||m!==0?A=-R*O+O/2:u==="center"?A=-L.highest.height/2-z*O+O:A=-L.highest.height+O/2:u==="near"||m!==0?A=O/2:u==="center"?A=L.highest.height/2-z*O:A=L.highest.height-R*O,d&&(A*=-1),m!==0&&!W.showLabelBackdrop&&(x+=O/2*Math.sin(m))):(C=S,A=(1-R)*O/2);let ne;if(W.showLabelBackdrop){const q=fs(W.backdropPadding),Y=L.heights[w],oe=L.widths[w];let ie=A-q.top,be=0-q.left;switch(D){case"middle":ie-=Y/2;break;case"bottom":ie-=Y;break}switch(I){case"center":be-=oe/2;break;case"right":be-=oe;break;case"inner":w===b-1?be-=oe:w>0&&(be-=oe/2);break}ne={left:be,top:ie,width:oe+q.width,height:Y+q.height,color:W.backdropColor}}y.push({label:T,font:E,textOffset:A,options:{rotation:m,color:K,strokeColor:G,strokeWidth:H,textAlign:B,textBaseline:D,translation:[x,C],backdrop:ne}})}return y}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-ma(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=na(t,this.left,o)-o/2,c=na(t,this.right,a)+a/2,d=f=l):(d=na(t,this.top,o)-o/2,f=na(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&&uS(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;hd(r,u,0,c,l,a)}s&&cS(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:s}}=this;if(!r.display)return;const i=Zn(r.font),o=fs(r.padding),a=r.align;let l=i.lineHeight/2;n==="bottom"||n==="center"||xt(n)?(l+=o.bottom,_n(r.text)&&(l+=i.lineHeight*(r.text.length-1))):l+=o.top;const{titleX:u,titleY:c,maxWidth:d,rotation:f}=zte(this,l,n,a);hd(t,r.text,0,0,i,{color:r.color,maxWidth:d,rotation:f,textAlign:Ute(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!==Wu.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 Af{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;qte(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,Hte(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 Xa[r])}}function Hte(e,t,n){const r=dd(Object.create(null),[n?pn.get(n):{},pn.get(t),e.defaults]);pn.set(t,r),e.defaultRoutes&&jte(t,e.defaultRoutes),e.descriptors&&pn.describe(t,e.descriptors)}function jte(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 qte(e){return"id"in e&&"defaults"in e}class Wte{constructor(){this.controllers=new Af(Fc,"datasets",!0),this.elements=new Af(qu,"elements"),this.plugins=new Af(Object,"plugins"),this.scales=new Af(Wu,"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=oS(t);Yt(r["before"+s],[],r),n[t](r),Yt(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 Xs=new Wte;class Gte{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(Yt(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=Kte(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 Kte(e){const t={},n=[],r=Object.keys(Xs.plugins.items);for(let i=0;i<r.length;i++)n.push(Xs.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 Yte(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=Yte(r[l],s);u!==null&&i.push({plugin:a,options:Qte(e.config,{plugin:a,local:n[l]},u,o)})}return i}function Qte(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 ib(e,t){const n=pn.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function Jte(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function Zte(e,t){return e===t?"_index_":"_value_"}function Ox(e){if(e==="x"||e==="y"||e==="r")return e}function ene(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function ob(e,...t){if(Ox(e))return e;for(const n of t){const r=n.axis||ene(n.position)||e.length>1&&Ox(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Mx(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function tne(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 Mx(e,"x",n[0])||Mx(e,"y",n[0])}return{}}function nne(e,t){const n=Xa[e.type]||{scales:{}},r=t.scales||{},s=ib(e.type,t),i=Object.create(null);return Object.keys(r).forEach(o=>{const a=r[o];if(!xt(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=ob(o,a,tne(o,e),pn.scales[a.type]),u=Zte(l,s),c=n.scales||{};i[o]=Dc(Object.create(null),[{axis:l},a,c[l],c[u]])}),e.data.datasets.forEach(o=>{const a=o.type||e.type,l=o.indexAxis||ib(a,t),c=(Xa[a]||{}).scales||{};Object.keys(c).forEach(d=>{const f=Jte(d,l),p=o[f+"AxisID"]||f;i[p]=i[p]||Object.create(null),Dc(i[p],[{axis:f},r[p],c[d]])})}),Object.keys(i).forEach(o=>{const a=i[o];Dc(a,[pn.scales[a.type],pn.scale])}),i}function wD(e){const t=e.options||(e.options={});t.plugins=At(t.plugins,{}),t.scales=nne(e,t)}function SD(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function rne(e){return e=e||{},e.data=SD(e.data),wD(e),e}const Dx=new Map,_D=new Set;function Of(e,t){let n=Dx.get(e);return n||(n=t(),Dx.set(e,n),_D.add(n)),n}const lc=(e,t,n)=>{const r=yu(t,n);r!==void 0&&e.add(r)};class sne{constructor(t){this._config=rne(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=SD(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(),wD(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Of(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Of(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Of(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return Of(`${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=>lc(l,t,d))),c.forEach(d=>lc(l,s,d)),c.forEach(d=>lc(l,Xa[i]||{},d)),c.forEach(d=>lc(l,pn,d)),c.forEach(d=>lc(l,sb,d))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),_D.has(n)&&o.set(n,u),u}chartOptionScopes(){const{options:t,type:n}=this;return[t,Xa[n]||{},pn.datasets[n]||{},{type:n},pn,sb]}resolveNamedOptions(t,n,r,s=[""]){const i={$shared:!0},{resolver:o,subPrefixes:a}=$x(this._resolverCache,t,s);let l=o;if(one(o,n)){i.$shared=!1,r=$o(r)?r():r;const u=this.createResolver(t,r,a);l=bu(o,r,u)}for(const u of n)i[u]=l[u];return i}createResolver(t,n,r=[""],s){const{resolver:i}=$x(this._resolverCache,t,r);return xt(n)?bu(i,n,void 0,s):i}}function $x(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:dS(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(s,i)),i}const ine=e=>xt(e)&&Object.getOwnPropertyNames(e).some(t=>$o(e[t]));function one(e,t){const{isScriptable:n,isIndexable:r}=oD(e);for(const s of t){const i=n(s),o=r(s),a=(o||i)&&e[s];if(i&&($o(a)||ine(a))||o&&_n(a))return!0}return!1}var ane="4.4.8";const lne=["top","bottom","left","right","chartArea"];function Lx(e,t){return e==="top"||e==="bottom"||lne.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 Nx(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Yt(n&&n.onComplete,[e],t)}function une(e){const t=e.chart,n=t.options.animation;Yt(n&&n.onProgress,[e],t)}function kD(e){return pS()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const gh={},Bx=e=>{const t=kD(e);return Object.values(gh).filter(n=>n.canvas===t).pop()};function cne(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 dne(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function Mf(e,t,n){return e.options.clip?e[n]:t[n]}function fne(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:Mf(n,t,"left"),right:Mf(n,t,"right"),top:Mf(r,t,"top"),bottom:Mf(r,t,"bottom")}:t}var Zi;let Im=(Zi=class{static register(...t){Xs.add(...t),Vx()}static unregister(...t){Xs.remove(...t),Vx()}constructor(t,n){const r=this.config=new sne(n),s=kD(t),i=Bx(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=IZ(),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 Gte,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=[],gh[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}_i.listen(this,"complete",Nx),_i.listen(this,"progress",une),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 Xs}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():dx(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ax(this.canvas,this.ctx),this}stop(){return _i.stop(this),this}resize(t,n){_i.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,dx(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),Yt(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=ob(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=ob(l,a),c=At(a.type,o.dtype);(a.position===void 0||Lx(a.position,u)!==Lx(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=Xs.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=>{rs.configure(this,o,o.options),rs.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||ib(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=Xs.getController(a),{datasetElementType:u,dataElementType:c}=pn.datasets[a];Object.assign(l,{dataElementType:Xs.getElement(c),datasetElementType:u&&Xs.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=>{rs.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!Qk(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;cne(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(!Qk(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;rs.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,$o(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&&(_i.has(this)?this.attached&&!_i.running(this)&&_i.start(this):(this.draw(),Nx({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=fne(t,this.chartArea),o={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(s&&uS(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&&cS(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return rD(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,s){const i=lte.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=ju(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);fd(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(),_i.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(),ax(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete gh[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}});!up(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=LZ(t),u=dne(t,this._lastEvent,r,l);r&&(this._lastEvent=null,Yt(i.onHover,[t,a,this],this),l&&Yt(i.onClick,[t,a,this],this));const c=!up(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)}},ye(Zi,"defaults",pn),ye(Zi,"instances",gh),ye(Zi,"overrides",Xa),ye(Zi,"registry",Xs),ye(Zi,"version",ane),ye(Zi,"getChart",Bx),Zi);function Vx(){return It(Im.instances,e=>e._plugins.invalidate())}function xD(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 wo(e,t,n,r){return e?0:Cs(t,n,r)}function hne(e,t,n){const r=e.options.borderWidth,s=e.borderSkipped,i=iD(r);return{t:wo(s.top,i.top,0,n),r:wo(s.right,i.right,0,t),b:wo(s.bottom,i.bottom,0,n),l:wo(s.left,i.left,0,t)}}function pne(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),s=e.options.borderRadius,i=Bl(s),o=Math.min(t,n),a=e.borderSkipped,l=r||xt(s);return{topLeft:wo(!l||a.top||a.left,i.topLeft,0,o),topRight:wo(!l||a.top||a.right,i.topRight,0,o),bottomLeft:wo(!l||a.bottom||a.left,i.bottomLeft,0,o),bottomRight:wo(!l||a.bottom||a.right,i.bottomRight,0,o)}}function mne(e){const t=xD(e),n=t.right-t.left,r=t.bottom-t.top,s=hne(e,n/2,r/2),i=pne(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 Qg(e,t,n,r){const s=t===null,i=n===null,a=e&&!(s&&i)&&xD(e,r);return a&&(s||Ol(t,a.left,a.right))&&(i||Ol(n,a.top,a.bottom))}function gne(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function vne(e,t){e.rect(t.x,t.y,t.w,t.h)}function Jg(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 vh extends qu{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}=mne(this),a=gne(o.radius)?hp:vne;t.save(),(o.w!==i.w||o.h!==i.h)&&(t.beginPath(),a(t,Jg(o,n,i)),t.clip(),a(t,Jg(i,-n,o)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),a(t,Jg(i,n)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,n,r){return Qg(this,t,n,r)}inXRange(t,n){return Qg(this,t,null,n)}inYRange(t,n){return Qg(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}}ye(vh,"id","bar"),ye(vh,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),ye(vh,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});const Ux=(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)}},yne=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class zx extends qu{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=Yt(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}=Ux(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((g,m)=>{const y=r+n/2+i.measureText(g.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,g=0,m=0;return this.legendItems.forEach((y,w)=>{const{itemWidth:b,itemHeight:_}=bne(r,n,i,y,s);w>0&&p+_+2*a>c&&(d+=f+a,u.push({width:f,height:p}),g+=f+a,m++,f=p=0),l[w]={left:g,top:p,col:m,width:b,height:_},f=Math.max(f,b),p+=_+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=Vl(i,this.left,this.width);if(this.isHorizontal()){let a=0,l=Wn(r,this.left+s,this.right-this.lineWidths[a]);for(const u of n)a!==u.row&&(a=u.row,l=Wn(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=Wn(r,this.top+t+s,this.bottom-this.columnSizes[a].height);for(const u of n)u.col!==a&&(a=u.col,l=Wn(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;uS(t,this),this._draw(),cS(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:s}=this,{align:i,labels:o}=t,a=pn.color,l=Vl(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:g,boxHeight:m,itemHeight:y}=Ux(o,d),w=function(C,I,S){if(isNaN(g)||g<=0||isNaN(m)||m<0)return;s.save();const E=At(S.lineWidth,1);if(s.fillStyle=At(S.fillStyle,a),s.lineCap=At(S.lineCap,"butt"),s.lineDashOffset=At(S.lineDashOffset,0),s.lineJoin=At(S.lineJoin,"miter"),s.lineWidth=E,s.strokeStyle=At(S.strokeStyle,a),s.setLineDash(At(S.lineDash,[])),o.usePointStyle){const O={radius:m*Math.SQRT2/2,pointStyle:S.pointStyle,rotation:S.rotation,borderWidth:E},R=l.xPlus(C,g/2),A=I+f;nD(s,O,R,A,o.pointStyleWidth&&g)}else{const O=I+Math.max((d-m)/2,0),R=l.leftForLtr(C,g),A=Bl(S.borderRadius);s.beginPath(),Object.values(A).some(D=>D!==0)?hp(s,{x:R,y:O,w:g,h:m,radius:A}):s.rect(R,O,g,m),s.fill(),E!==0&&s.stroke()}s.restore()},b=function(C,I,S){hd(s,S.text,C,I+y/2,u,{strikethrough:S.hidden,textAlign:l.textAlign(S.textAlign)})},_=this.isHorizontal(),T=this._computeTitleHeight();_?p={x:Wn(i,this.left+c,this.right-r[0]),y:this.top+c+T,line:0}:p={x:this.left+c,y:Wn(i,this.top+T+c,this.bottom-n[0].height),line:0},cD(this.ctx,t.textDirection);const x=y+c;this.legendItems.forEach((C,I)=>{s.strokeStyle=C.fontColor,s.fillStyle=C.fontColor;const S=s.measureText(C.text).width,E=l.textAlign(C.textAlign||(C.textAlign=o.textAlign)),O=g+f+S;let R=p.x,A=p.y;l.setWidth(this.width),_?I>0&&R+O+c>this.right&&(A=p.y+=x,p.line++,R=p.x=Wn(i,this.left+c,this.right-r[p.line])):I>0&&A+x>this.bottom&&(R=p.x=R+n[p.line].width+c,p.line++,A=p.y=Wn(i,this.top+T+c,this.bottom-n[p.line].height));const D=l.x(R);if(w(D,A,C),R=QZ(E,R+g+f,_?R+O:this.right,t.rtl),b(l.x(R),A,C),_)p.x+=O+c;else if(typeof C.text!="string"){const L=u.lineHeight;p.y+=ED(C,L)+c}else p.y+=x}),dD(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=Zn(n.font),s=fs(n.padding);if(!n.display)return;const i=Vl(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=Wn(t.align,d,this.right-f);else{const g=this.columnSizes.reduce((m,y)=>Math.max(m,y.height),0);c=u+Wn(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const p=Wn(a,d,d+f);o.textAlign=i.textAlign(lS(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=r.string,hd(o,n.text,p,c,r)}_computeTitleHeight(){const t=this.options.title,n=Zn(t.font),r=fs(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,s,i;if(Ol(t,this.left,this.right)&&Ol(n,this.top,this.bottom)){for(i=this.legendHitBoxes,r=0;r<i.length;++r)if(s=i[r],Ol(t,s.left,s.left+s.width)&&Ol(n,s.top,s.top+s.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!_ne(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const s=this._hoveredItem,i=yne(s,r);s&&!i&&Yt(n.onLeave,[t,s,this],this),this._hoveredItem=r,r&&!i&&Yt(n.onHover,[t,r,this],this)}else r&&Yt(n.onClick,[t,r,this],this)}}function bne(e,t,n,r,s){const i=wne(r,e,t,n),o=Sne(s,r,t.lineHeight);return{itemWidth:i,itemHeight:o}}function wne(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 Sne(e,t,n){let r=e;return typeof t.text!="string"&&(r=ED(t,n)),r}function ED(e,t){const n=e.text?e.text.length:0;return t*n}function _ne(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var kne={id:"legend",_element:zx,start(e,t,n){const r=e.legend=new zx({ctx:e.ctx,options:n,chart:e});rs.configure(e,r,n),rs.addBox(e,r)},stop(e){rs.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;rs.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=fs(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 CD extends qu{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=_n(r.text)?r.text.length:1;this._padding=fs(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=Wn(a,r,i),d=n+t,u=i-r):(o.position==="left"?(c=r+t,d=Wn(a,s,n),l=nr*-.5):(c=i-t,d=Wn(a,n,s),l=nr*.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);hd(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:u,textAlign:lS(n.align),textBaseline:"middle",translation:[o,a]})}}function xne(e,t){const n=new CD({ctx:e.ctx,options:t,chart:e});rs.configure(e,n,t),rs.addBox(e,n),e.titleBlock=n}var Ene={id:"title",_element:CD,start(e,t,n){xne(e,n)},stop(e){const t=e.titleBlock;rs.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;rs.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 vc={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=jZ(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 Gs(e,t){return t&&(_n(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function ki(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
82
+ `)>-1?e.split(`
83
+ `):e}function Cne(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 Hx(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,g=fs(t.padding);let m=g.height,y=0,w=r.reduce((T,x)=>T+x.before.length+x.lines.length+x.after.length,0);if(w+=e.beforeBody.length+e.afterBody.length,d&&(m+=d*u.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),w){const T=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=p*T+(w-p)*l.lineHeight+(w-1)*t.bodySpacing}f&&(m+=t.footerMarginTop+f*c.lineHeight+(f-1)*t.footerSpacing);let b=0;const _=function(T){y=Math.max(y,n.measureText(T).width+b)};return n.save(),n.font=u.string,It(e.title,_),n.font=l.string,It(e.beforeBody.concat(e.afterBody),_),b=t.displayColors?o+2+t.boxPadding:0,It(r,T=>{It(T.before,_),It(T.lines,_),It(T.after,_)}),b=0,n.font=c.string,It(e.footer,_),n.restore(),y+=g.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 Pne(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"),Pne(u,e,t,n)&&(u="center"),u}function jx(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 Ine(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function Ane(e,t,n){let{y:r,height:s}=e;return t==="top"?r+=n:t==="bottom"?r-=s+n:r-=s/2,r}function qx(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}=Bl(o);let g=Ine(t,a);const m=Ane(t,l,u);return l==="center"?a==="left"?g+=u:a==="right"&&(g-=u):a==="left"?g-=Math.max(c,f)+s:a==="right"&&(g+=Math.max(d,p)+s),{x:Cs(g,0,r.width-t.width),y:Cs(m,0,r.height-t.height)}}function Df(e,t,n){const r=fs(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function Wx(e){return Gs([],ki(e))}function One(e,t,n){return ju(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function Gx(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const TD={beforeTitle:bi,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:bi,beforeBody:bi,beforeLabel:bi,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:bi,afterBody:bi,beforeFooter:bi,footer:bi,afterFooter:bi};function vr(e,t,n,r){const s=e[t].call(n,r);return typeof s>"u"?TD[t].call(n,r):s}var av;let Kx=(av=class extends qu{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 fD(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=vr(r,"beforeTitle",this,t),i=vr(r,"title",this,t),o=vr(r,"afterTitle",this,t);let a=[];return a=Gs(a,ki(s)),a=Gs(a,ki(i)),a=Gs(a,ki(o)),a}getBeforeBody(t,n){return Wx(vr(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,s=[];return It(t,i=>{const o={before:[],lines:[],after:[]},a=Gx(r,i);Gs(o.before,ki(vr(a,"beforeLabel",this,i))),Gs(o.lines,vr(a,"label",this,i)),Gs(o.after,ki(vr(a,"afterLabel",this,i))),s.push(o)}),s}getAfterBody(t,n){return Wx(vr(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,s=vr(r,"beforeFooter",this,t),i=vr(r,"footer",this,t),o=vr(r,"afterFooter",this,t);let a=[];return a=Gs(a,ki(s)),a=Gs(a,ki(i)),a=Gs(a,ki(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(Cne(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=Gx(t.callbacks,c);s.push(vr(d,"labelColor",this,c)),i.push(vr(d,"labelPointStyle",this,c)),o.push(vr(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=vc[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=Hx(this,r),u=Object.assign({},a,l),c=jx(this.chart,r,u),d=qx(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}=Bl(a),{x:f,y:p}=t,{width:g,height:m}=n;let y,w,b,_,T,x;return i==="center"?(T=p+m/2,s==="left"?(y=f,w=y-o,_=T+o,x=T-o):(y=f+g,w=y+o,_=T-o,x=T+o),b=y):(s==="left"?w=f+Math.max(l,c)+o:s==="right"?w=f+g-Math.max(u,d)-o:w=this.caretX,i==="top"?(_=p,T=_-o,y=w-o,b=w+o):(_=p+m,T=_+o,y=w+o,b=w-o),x=_),{x1:y,x2:w,x3:b,y1:_,y2:T,y3:x}}drawTitle(t,n,r){const s=this.title,i=s.length;let o,a,l;if(i){const u=Vl(r.rtl,this.x,this.width);for(t.x=Df(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=Df(this,"left",i),f=s.x(d),p=l<c.lineHeight?(c.lineHeight-l)/2:0,g=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,w=g+l/2;t.strokeStyle=i.multiKeyBackground,t.fillStyle=i.multiKeyBackground,lx(t,m,y,w),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,lx(t,m,y,w)}else{t.lineWidth=xt(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),w=Bl(o.borderRadius);Object.values(w).some(b=>b!==0)?(t.beginPath(),t.fillStyle=i.multiKeyBackground,hp(t,{x:m,y:g,w:u,h:l,radius:w}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),hp(t,{x:y,y:g+1,w:u-2,h:l-2,radius:w}),t.fill()):(t.fillStyle=i.multiKeyBackground,t.fillRect(m,g,u,l),t.strokeRect(m,g,u,l),t.fillStyle=o.backgroundColor,t.fillRect(y,g+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 g=Vl(r.rtl,this.x,this.width),m=function(S){n.fillText(S,g.x(t.x+p),t.y+f/2),t.y+=f+i},y=g.textAlign(o);let w,b,_,T,x,C,I;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,t.x=Df(this,y,r),n.fillStyle=r.bodyColor,It(this.beforeBody,m),p=a&&y!=="right"?o==="center"?u/2+c:u+2+c:0,T=0,C=s.length;T<C;++T){for(w=s[T],b=this.labelTextColors[T],n.fillStyle=b,It(w.before,m),_=w.lines,a&&_.length&&(this._drawColorBox(n,t,T,g,r),f=Math.max(d.lineHeight,l)),x=0,I=_.length;x<I;++x)m(_[x]),f=d.lineHeight;It(w.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=Vl(r.rtl,this.x,this.width);for(t.x=Df(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:g}=Bl(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-g),n.quadraticCurveTo(a+u,l+c,a+u-g,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=vc[t.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=Hx(this,t),l=Object.assign({},o,this._size),u=jx(n,t,l),c=qx(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=fs(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),cD(t,n.textDirection),i.y+=o.top,this.drawTitle(i,t,n),this.drawBody(i,t,n),this.drawFooter(i,t,n),dD(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=!up(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||!up(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=vc[i.position].call(this,t,n);return o!==!1&&(r!==o.x||s!==o.y)}},ye(av,"positioners",vc),av);var Mne={id:"tooltip",_element:Kx,positioners:vc,afterInit(e,t,n){n&&(e.tooltip=new Kx({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:TD},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 Dne=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function $ne(e,t,n,r){const s=e.indexOf(t);if(s===-1)return Dne(e,t,n,r);const i=e.lastIndexOf(t);return s!==i?n:s}const Lne=(e,t)=>e===null?null:Cs(Math.round(e),0,t);function Yx(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class ab extends Wu{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:$ne(r,t,At(n,t),this._addedLabels),Lne(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 Yx.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}}ye(ab,"id","category"),ye(ab,"defaults",{ticks:{callback:Yx}});function Fne(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,g=c-1,{min:m,max:y}=t,w=!Nt(o),b=!Nt(a),_=!Nt(u),T=(y-m)/(d+1);let x=Zk((y-m)/g/p)*p,C,I,S,E;if(x<1e-14&&!w&&!b)return[{value:m},{value:y}];E=Math.ceil(y/x)-Math.floor(m/x),E>g&&(x=Zk(E*x/g/p)*p),Nt(l)||(C=Math.pow(10,l),x=Math.ceil(x*C)/C),s==="ticks"?(I=Math.floor(m/x)*x,S=Math.ceil(y/x)*x):(I=m,S=y),w&&b&&i&&VZ((a-o)/i,x/1e3)?(E=Math.round(Math.min((a-o)/x,c)),x=(a-o)/E,I=o,S=a):_?(I=w?o:I,S=b?a:S,E=u-1,x=(S-I)/E):(E=(S-I)/x,hh(E,Math.round(E),x/1e3)?E=Math.round(E):E=Math.ceil(E));const O=Math.max(ex(x),ex(I));C=Math.pow(10,Nt(l)?O:l),I=Math.round(I*C)/C,S=Math.round(S*C)/C;let R=0;for(w&&(f&&I!==o?(n.push({value:o}),I<o&&R++,hh(Math.round((I+R*x)*C)/C,o,Xx(o,T,e))&&R++):I<o&&R++);R<E;++R){const A=Math.round((I+R*x)*C)/C;if(b&&A>a)break;n.push({value:A})}return b&&f&&S!==a?n.length&&hh(n[n.length-1].value,a,Xx(a,T,e))?n[n.length-1].value=a:n.push({value:a}):(!b||S===a)&&n.push({value:S}),n}function Xx(e,t,{horizontal:n,minRotation:r}){const s=ma(r),i=(n?Math.sin(s):Math.cos(s))||.001,o=.75*t*(""+e).length;return Math.min(t/i,o)}class Nne extends Wu{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=Ro(s),u=Ro(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=Fne(s,i);return t.bounds==="ticks"&&UZ(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 lb extends Nne{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=ds(t)?t:0,this.max=ds(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=ma(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}}ye(lb,"id","linear"),ye(lb,"defaults",{ticks:{callback:tD.formatters.numeric}});const Am={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}},kr=Object.keys(Am);function Qx(e,t){return e-t}function Jx(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)),ds(o)||(o=typeof r=="string"?n.parse(o,r):n.parse(o)),o===null?null:(s&&(o=s==="week"&&(fp(i)||i===!0)?n.startOf(o,"isoWeek",i):n.startOf(o,s)),+o)}function Zx(e,t,n,r){const s=kr.length;for(let i=kr.indexOf(e);i<s-1;++i){const o=Am[kr[i]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(a*o.size))<=r)return kr[i]}return kr[s-1]}function Bne(e,t,n,r,s){for(let i=kr.length-1;i>=kr.indexOf(n);i--){const o=kr[i];if(Am[o].common&&e._adapter.diff(s,r,o)>=t-1)return o}return kr[n?kr.indexOf(n):0]}function Vne(e){for(let t=kr.indexOf(e)+1,n=kr.length;t<n;++t)if(Am[kr[t]].common)return kr[t]}function eE(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:s}=aS(n,t),i=n[r]>=t?n[r]:n[s];e[i]=!0}}function Une(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 tE(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:Une(e,r,s,n)}class gp extends Wu{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 rte._date(t.adapters.date);s.init(n),Dc(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:Jx(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=ds(s)&&!isNaN(s)?s:+n.startOf(Date.now(),r),i=ds(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=KZ(s,i,o);return this._unit=n.unit||(r.autoSkip?Zx(n.minUnit,this.min,this.max,this._getLabelCapacity(i)):Bne(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:Vne(this._unit),this.initOffsets(s),t.reverse&&a.reverse(),tE(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=Cs(n,0,o),r=Cs(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||Zx(i.minUnit,n,r,this._getLabelCapacity(n)),a=At(s.ticks.stepSize,1),l=o==="week"?i.isoWeekday:!1,u=fp(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 g=s.ticks.source==="data"&&this.getDataTimestamps();for(f=d,p=0;f<r;f=+t.add(f,a,o),p++)eE(c,f,g);return(f===r||s.bounds==="ticks"||p===1)&&eE(c,f,g),Object.keys(c).sort(Qx).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 Yt(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=ma(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,tE(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(Jx(this,s[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return YM(t.sort(Qx))}}ye(gp,"id","time"),ye(gp,"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 $f(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}=rb(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}=rb(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 nE extends gp{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=$f(n,this.min),this._tableRange=$f(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($f(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return $f(this._table,r*this._tableRange+this._minPos,!0)}}ye(nE,"id","timeseries"),ye(nE,"defaults",gp.defaults);const PD={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},zne={ariaLabel:{type:String},ariaDescribedby:{type:String}},Hne={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...PD,...zne},jne=JC[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function ml(e){return bd(e)?Be(e):e}function qne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return bd(t)?new Proxy(e,{}):e}function Wne(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function RD(e,t){e.labels=t}function ID(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 Gne(e,t){const n={labels:[],datasets:[]};return RD(n,e.labels),ID(n,e.datasets,t),n}const Kne=$e({props:Hne,setup(e,t){let{expose:n,slots:r}=t;const s=U(null),i=Ie(null);n({chart:i});const o=()=>{if(!s.value)return;const{type:u,data:c,options:d,plugins:f,datasetIdKey:p}=e,g=Gne(c,p),m=qne(g,c);i.value=new Im(s.value,{type:u,data:m,options:{...d},plugins:f})},a=()=>{const u=Be(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 _t(o),Ap(a),ke([()=>e.options,()=>e.data],(u,c)=>{let[d,f]=u,[p,g]=c;const m=Be(i.value);if(!m)return;let y=!1;if(d){const w=ml(d),b=ml(p);w&&w!==b&&(Wne(m,w),y=!0)}if(f){const w=ml(f.labels),b=ml(g.labels),_=ml(f.datasets),T=ml(g.datasets);w!==b&&(RD(m.config.data,w),y=!0),_&&_!==T&&(ID(m.config.data,_,e.datasetIdKey),y=!0)}y&&Mt(()=>{l(m)})},{deep:!0}),()=>hr("canvas",{role:"img",ariaLabel:e.ariaLabel,ariaDescribedby:e.ariaDescribedby,ref:s},[hr("p",{},[r.default?r.default():""])])}});function Yne(e,t){return Im.register(t),$e({props:PD,setup(n,r){let{expose:s}=r;const i=Ie(null),o=a=>{i.value=a==null?void 0:a.chart};return s({chart:i}),()=>hr(Kne,jne({ref:o},{type:e,...n}))}})}const Xne=Yne("bar",ph);function Qne(e,t){const n=typeof e=="string"?In(e):e,r=Jne(n,t);return{mounted:r,updated:r,unmounted(s){lT(null,s)}}}function Jne(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=vT(r.value)?r.value:{},l=()=>o??n.textContent,u=(s.ctx===r.instance.$?(f=Zne(s,r.instance.$))==null?void 0:f.provides:(p=s.ctx)==null?void 0:p.provides)??r.instance.$.provides,c=hr(e,he(i,a),l);c.appContext=Object.assign(Object.create(null),r.instance.$.appContext,{provides:u}),lT(c,n)}}function Zne(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 ere=Qne(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}}),tre={class:"ma-3"},nre={class:"ml-6"},rre={class:"ml-7 mt-3"},sre={key:0},ire={key:2},ore=$e({__name:"EmergencyCommands",setup(e){Im.register(ab,lb,vh,Ene,Mne,kne);const t=Ft(),n=U(!1),r=U(!1),s=U([]),i=U([]),o=U(NaN),a=U(NaN),l=U(NaN),u=U({labels:[],datasets:[{label:"OctoPrint Settings response times (ms)",data:[],borderColor:"#FF6384",backgroundColor:"#ffffff"}]}),c={color:"white",plugins:{title:{color:"red",text:"Response times (ms)",display:!0}},responsive:!0},d=P(()=>t.printers.length===0||t.printers.every(w=>!w.enabled)),f=P(()=>t.printers.length===0||t.printers.every(w=>!!w.enabled));async function p(){try{n.value=!0;const w=t.printers.map(C=>C.id),b=await Al.batchSettingsGet(w),_=b.map(C=>{var I,S;return((S=(I=C.value)==null?void 0:I.appearance)==null?void 0:S.name)||"ERROR"});i.value=b.filter(C=>!C.success).map(C=>({message:C.error}));const T=b.map(C=>C.time),x=b.map(C=>{var I,S;return((S=(I=C.value)==null?void 0:I.appearance)==null?void 0:S.name)??""});o.value=T.reduce((C,I)=>C+I,0)/T.length,l.value=Math.min(...T),a.value=Math.max(...T),u.value={labels:x,datasets:[{label:"OctoPrint Settings response times (ms)",data:T,borderColor:"#FF6384",backgroundColor:"#ffffff"}]},r.value=!0,s.value=_}finally{n.value=!1}}async function g(w){if(confirm("Are you sure you want to toggle all printers?")){n.value=!0;try{await Al.batchToggleEnabled(t.printers.map(b=>b.id),w)}finally{n.value=!1}}}async function m(){if(confirm("Are you sure you want to connect all USBs?"))try{await Al.batchConnectUsb(t.printers.map(w=>w.id))}finally{n.value=!1}}async function y(){confirm("Are you sure you want to connect all sockets?")&&(n.value=!0,await Al.batchConnectSocket(t.printers.map(w=>w.id)),n.value=!1)}return(w,b)=>($(),te(gt,null,{default:v(()=>[h(pr,{color:"primary"},{default:v(()=>[h(lt,null,{default:v(()=>[h(J,null,{default:v(()=>b[3]||(b[3]=[k("settings")])),_:1})]),_:1}),h(xn,null,{default:v(()=>b[4]||(b[4]=[k(" Emergency Commands")])),_:1})]),_:1}),h(Vt,{lines:"three",subheader:""},{default:v(()=>[h(jr,null,{default:v(()=>b[5]||(b[5]=[k(" Emergency Commands to rectify problematic situations ")])),_:1}),h(Ve,null,{default:v(()=>[h(dt,null,{default:v(()=>b[6]||(b[6]=[k(" Batch disabling")])),_:1}),h(yt,null,{default:v(()=>[b[9]||(b[9]=k(" Disable all printers in batch (will not affect print) ")),b[10]||(b[10]=M("br",null,null,-1)),h(se,{disabled:n.value||d.value,class:"ml-4",color:"primary",onClick:b[0]||(b[0]=_=>g(!1))},{default:v(()=>b[7]||(b[7]=[k(" Batch disable ")])),_:1},8,["disabled"]),n.value?($(),te(ni,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):fe("",!0),d.value?($(),te(J,{key:1,class:"ml-2",color:"warning"},{default:v(()=>b[8]||(b[8]=[k(" warning ")])),_:1})):fe("",!0)]),_:1})]),_:1}),h(Ve,null,{default:v(()=>[h(dt,null,{default:v(()=>b[11]||(b[11]=[k(" Batch enabling")])),_:1}),h(yt,null,{default:v(()=>[b[14]||(b[14]=k(" Enabling all printers in batch (will not affect print and it will skip printers in maintenance mode) ")),b[15]||(b[15]=M("br",null,null,-1)),h(se,{disabled:n.value||f.value,class:"ml-4",color:"primary",onClick:b[1]||(b[1]=_=>g(!0))},{default:v(()=>b[12]||(b[12]=[k(" Batch enable ")])),_:1},8,["disabled"]),n.value?($(),te(ni,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):fe("",!0),f.value?Bt(($(),te(J,{key:1,class:"ml-2",color:"warning"},{default:v(()=>b[13]||(b[13]=[k("warning ")])),_:1})),[[ere,"No printers available",void 0,{bottom:!0}]]):fe("",!0)]),_:1})]),_:1}),h(Ve,null,{default:v(()=>[h(dt,null,{default:v(()=>b[16]||(b[16]=[k(" Batch USB connect")])),_:1}),h(yt,null,{default:v(()=>[b[19]||(b[19]=k(" Connect all USB devices ")),b[20]||(b[20]=M("br",null,null,-1)),h(se,{disabled:n.value||d.value,class:"ml-4",color:"primary",onClick:m},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>b[17]||(b[17]=[k("usb")])),_:1}),b[18]||(b[18]=k(" Connect USBs "))]),_:1},8,["disabled"]),n.value?($(),te(ni,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):fe("",!0)]),_:1}),h(yt,{class:"mt-2"},{default:v(()=>[b[23]||(b[23]=k(" Connect all Sockets ")),b[24]||(b[24]=M("br",null,null,-1)),h(se,{disabled:n.value||d.value,class:"ml-4",color:"primary",onClick:y},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>b[21]||(b[21]=[k("hub")])),_:1}),b[22]||(b[22]=k(" Connect Sockets "))]),_:1},8,["disabled"])]),_:1}),n.value?($(),te(ni,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):fe("",!0)]),_:1})]),_:1}),M("div",tre,[h(dn,null,{default:v(()=>b[25]||(b[25]=[k(" Test all OctoPrint response times")])),_:1}),M("div",nre,[h(se,{loading:n.value,color:"primary",onClick:b[2]||(b[2]=_=>p())},{default:v(()=>b[26]||(b[26]=[k(" Measure network response times ")])),_:1},8,["loading"])]),M("div",rre,[r.value?($(),me("span",sre," Response times: ")):fe("",!0),r.value?($(),te(Z(Xne),{key:1,data:u.value,options:c,height:"100",style:{"background-color":"#272727"}},null,8,["data"])):($(),me("span",ire,"A graph will be shown, presenting the times in milliseconds (ms)")),n.value?($(),te(ni,{key:3,class:"ml-2",indeterminate:"",size:"30",width:"4"})):fe("",!0)])])]),_:1}))}}),are={class:"text-center"},lre=$e({__name:"NotFoundView",setup(e){const t=Wo(),n=()=>{t.go(-1)};return(r,s)=>($(),te(Vn,null,{default:v(()=>[s[6]||(s[6]=M("h2",{class:"text-center mt-lg-12"},"This page was not found.",-1)),s[7]||(s[7]=M("h1",{class:"text-center"},": (",-1)),s[8]||(s[8]=M("br",null,null,-1)),M("h4",are,[h(se,{class:"align-center",color:"primary",to:"/",variant:"elevated"},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>s[1]||(s[1]=[k("home")])),_:1}),s[2]||(s[2]=k(" Go home "))]),_:1}),s[5]||(s[5]=M("span",{class:"pa-5"}," or ",-1)),h(se,{class:"align-center",variant:"elevated",onClick:s[0]||(s[0]=i=>n())},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>s[3]||(s[3]=[k("arrow_left")])),_:1}),s[4]||(s[4]=k(" Go back "))]),_:1})])]),_:1}))}}),ure={key:0},cre={key:1},dre={key:2},fre={key:3},hre={key:4},pre=$e({__name:"PermissionDenied",setup(e){const t=YO(),n=P(()=>t.query);return(r,s)=>($(),te(Vn,{"fill-height":"",fluid:""},{default:v(()=>[h(cM,{color:"primary"},{default:v(()=>[h(xn,{class:"text-uppercase text-white"},{default:v(()=>s[0]||(s[0]=[M("span",{class:"font-weight-light"}," FDM ",-1),M("strong",null," Monster ",-1)])),_:1})]),_:1}),s[11]||(s[11]=M("img",{alt:"FDM Monster Background",class:"grid-bg-img align-content-center",src:eS,style:{opacity:"0.06"}},null,-1)),h(Sm,{"align-center":"",column:"","justify-center":""},{default:v(()=>[h(gt,{class:"flex align-center justify-center pa-lg-16 pa-sm-10",style:{width:"80%"}},{default:v(()=>[h(sn,null,{default:v(()=>[h(J,{class:"mr-4",size:"50"},{default:v(()=>s[1]||(s[1]=[k(" lock ")])),_:1}),s[2]||(s[2]=M("h3",null,"Permission Denied",-1))]),_:1}),h(pm,{class:"mt-1"},{default:v(()=>s[3]||(s[3]=[k(" You do not have permission to access a specific resource on this page. ")])),_:1}),n.value?($(),te(en,{key:0},{default:v(()=>{var i,o;return[n.value.page?($(),me("div",ure,[s[4]||(s[4]=k(" Page: ")),M("strong",null,re((i=n.value)==null?void 0:i.page),1)])):fe("",!0),n.value.permissions?($(),me("div",cre,[s[5]||(s[5]=k(" Required permission(s): ")),($(!0),me(Pe,null,Wt(n.value.permissions,a=>($(),me("strong",{key:a},re(a),1))),128))])):fe("",!0),n.value.roles?($(),me("div",dre,[s[6]||(s[6]=k(" Usable roles: ")),M("strong",null,re((o=n.value.roles)==null?void 0:o.join(", ")),1)])):fe("",!0),n.value.url?($(),me("div",fre,[s[7]||(s[7]=k(" Problematic API path: ")),M("strong",null,re(n.value.url),1)])):fe("",!0),n.value.error?($(),me("div",hre,[s[8]||(s[8]=k(" Error: ")),M("strong",null,re(n.value.error),1)])):fe("",!0)]}),_:1})):fe("",!0),h(Mn,{class:"mt-6"},{default:v(()=>[h(se,{class:"align-center",color:"primary",to:"/",variant:"elevated"},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>s[9]||(s[9]=[k("home")])),_:1}),s[10]||(s[10]=k(" Go home "))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}}),mre=$e({__name:"Logo",setup(e){return(t,n)=>($(),te(us,{src:Z(Qw),class:"shrink mr-1 pt-3 ml-1",contain:"",style:{opacity:"0.85"},width:"150"},null,8,["src"]))}}),gre=$e({__name:"LoginForm",setup(e){const t=as(),n=U(""),r=U(""),s=U(!1),i=U(""),o=Wo(),a=YO(),l=U(!1),u=Fr("auth:login"),c=Dt(),d=P(()=>{var m;return((m=r.value??"")==null?void 0:m.length)<3||(i.value??"").length<3});_t(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 g();if(!t.hasRefreshToken)return;await t.verifyOrRefreshLoginOnceOrLogout()&&await g()});async function f(){return await o.push({name:qt.Registration})}async function p(){var m,y,w,b;try{l.value=!0,await t.login(r.value,i.value),t.lastLogoutReason=null,i.value="",l.value=!1}catch(_){if(l.value=!1,((m=_==null?void 0:_.response)==null?void 0:m.status)===401){i.value="";const T=(w=(y=_==null?void 0:_.response)==null?void 0:y.data)==null?void 0:w.reasonCode,x=qb(T);T===_r.AccountNotVerified?c.error(x,"Please ask your administrator to verify your account and try again."):T===_r.PasswordChangeRequired&&c.error(x,"Your password needs to be changed. This feature is sadly not finished"),n.value=x;return}c.openErrorMessage({title:"Error logging in",subtitle:"Please test your connection and try again."}),n.value="Error logging in - status code "+((b=_==null?void 0:_.response)==null?void 0:b.status),i.value="";return}return n.value="",u.emit(!0),await g()}async function g(){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)=>($(),te(gt,{class:"pa-4",elevation:"10",style:{"border-radius":"10px"}},{default:v(()=>[h(en,null,{default:v(()=>[h(nS,null,{default:v(()=>[y[7]||(y[7]=M("label",null," Username ",-1)),h(ut,{modelValue:r.value,"onUpdate:modelValue":y[0]||(y[0]=w=>r.value=w),"prepend-icon":"person",autofocus:"",label:"Username",name:"login",type:"text",variant:"underlined",onKeyup:y[1]||(y[1]=_v(w=>d.value||p(),["enter"]))},null,8,["modelValue"]),h(ut,{modelValue:i.value,"onUpdate:modelValue":y[2]||(y[2]=w=>i.value=w),"append-inner-icon":s.value?"visibility_off":"visibility","onClick:appendInner":y[3]||(y[3]=w=>s.value=!s.value),type:s.value?"text":"password",label:"Password",name:"password",password:"","prepend-icon":"lock",variant:"underlined",onKeyup:y[4]||(y[4]=_v(w=>d.value||p(),["enter"]))},null,8,["modelValue","append-inner-icon","type"]),n.value?($(),te(dn,{key:0,class:"mt-6",color:"error",density:"compact",variant:"outlined"},{default:v(()=>[k(re(n.value),1)]),_:1})):fe("",!0),Z(t).lastLogoutReason?($(),te(dn,{key:1,class:"mt-6",color:"error-darken-1",density:"compact",variant:"outlined"},{default:v(()=>[k(" Reason for automatic logout: "+re(Z(t).lastLogoutReason),1)]),_:1})):fe("",!0)]),_:1})]),_:1}),h(Mn,null,{default:v(()=>[h(se,{loading:l.value,class:"pa-4",color:"primary",size:"lg",variant:"flat",style:{width:"100%"},onClick:y[5]||(y[5]=w=>p())},{default:v(()=>y[8]||(y[8]=[k(" Login ")])),_:1},8,["loading"])]),_:1}),h(Mn,null,{default:v(()=>[h(se,{disabled:!Z(t).registration,class:"pa-4",size:"lg",variant:"flat",style:{width:"100%"},onClick:y[6]||(y[6]=w=>f())},{default:v(()=>[k(" Register new account "+re(Z(t).registration?"":"(not enabled)")+" ",1),h(J,{class:"pl-5",icon:"right"})]),_:1},8,["disabled"])]),_:1})]),_:1}))}}),vre={class:"d-flex align-center",style:{"min-height":"calc(100vh - 148px)"}},yre={class:"pt-6 pl-6 d-flex flex-column align-center"},bre=$e({__name:"LoginView",setup(e){return(t,n)=>{const r=mre;return $(),te(rt,{class:"position-relative","no-gutters":""},{default:v(()=>[h(ze,{cols:"12",lg:"12"},{default:v(()=>[h(Vn,null,{default:v(()=>[M("div",vre,[h(rt,{justify:"center",class:"align-content-center"},{default:v(()=>[M("div",yre,[h(r),h(xn,{class:"text-uppercase text-red"},{default:v(()=>n[0]||(n[0]=[M("strong",null," FDM  ",-1),M("strong",null," Monster ",-1)])),_:1}),h(xn,{class:"mt-lg-6 mt-sm-5 mb-md-5"},{default:v(()=>n[1]||(n[1]=[k(" Login to your account ")])),_:1}),h(pm,{class:"text-grey mb-md-5"},{default:v(()=>n[2]||(n[2]=[k(" Welcome back! Please enter your details ")])),_:1})]),h(ze,{cols:"12",md:"12"},{default:v(()=>[h(gre,{class:"login-card"})]),_:1})]),_:1})])]),_:1})]),_:1})]),_:1})}}}),wre={class:"d-flex flex-column align-center"},Sre=$e({__name:"RegistrationForm",setup(e){const t=as(),n=Wo(),r=U(""),s=U(""),i=U(!1),o=U(!1),a=U(""),l=U(""),u=U(!1),c=Dt();async function d(){return await n.push({name:qt.Login})}const f=P(()=>{var g;return((g=s.value??"")==null?void 0:g.length)<3||(a.value??"").length<3||a.value!=l.value});_t(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 g;try{u.value=!0,await ia.registerAccount(s.value,a.value),u.value=!1}catch(m){if(u.value=!1,((g=m==null?void 0:m.response)==null?void 0:g.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(g,m)=>{const y=In("v-flex");return $(),te(Vn,{"fill-height":"",fluid:""},{default:v(()=>[h(Sm,{"align-content-center":"","justify-center":""},{default:v(()=>[h(y,{class:"d-flex flex-column align-content-center",md4:"",sm8:"",style:{"max-width":"450px","margin-top":"10%"},xs12:""},{default:v(()=>[M("div",wre,[h(us,{src:require("@/assets/logo.png"),class:"shrink mr-1 pt-3 ml-1",contain:"",style:{opacity:"0.85"},width:"150"},null,8,["src"]),h(xn,{class:"text-uppercase text-red"},{default:v(()=>m[8]||(m[8]=[M("strong",null," FDM  ",-1),M("strong",null," Monster ",-1)])),_:1}),h(xn,{class:"mt-lg-6 mt-sm-5"},{default:v(()=>m[9]||(m[9]=[k(" Register new account ")])),_:1}),h(pm,{class:"text-grey"},{default:v(()=>m[10]||(m[10]=[k(" Welcome! Please register your guest account ")])),_:1})]),h(gt,{class:"elevation-4 pa-4",style:{"border-radius":"10px"}},{default:v(()=>[h(en,null,{default:v(()=>[h(nS,null,{default:v(()=>[m[11]||(m[11]=M("label",null," Username ",-1)),h(ut,{modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=w=>s.value=w),rules:[w=>!!w||"Username is required",w=>((w==null?void 0:w.length)??0)>=3||"Username must be of length 3 or greater",w=>!w.toLowerCase().includes("admin")||"Username may not contain the word admin",w=>!w.toLowerCase().includes("root")||"Username may not contain the word root",w=>w.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]=w=>a.value=w),"append-icon":i.value?"visibility":"visibility_off",type:i.value?"text":"password",label:"Password",name:"password",rules:[w=>!!w||"Password is required",w=>!!w&&(w==null?void 0:w.length)>=8||"Password must be of length 8 or greater"],password:"","prepend-icon":"lock","onClick:append":m[2]||(m[2]=w=>i.value=!i.value)},null,8,["modelValue","append-icon","type","rules"]),h(ut,{id:"password",modelValue:l.value,"onUpdate:modelValue":m[3]||(m[3]=w=>l.value=w),"append-icon":o.value?"visibility":"visibility_off",type:o.value?"text":"password",rules:[w=>!!w||"Repeated password is required",w=>w===a.value||"Passwords are not equal"],label:"Repeated Password",name:"password",password:"","prepend-icon":"lock","onClick:append":m[4]||(m[4]=w=>o.value=!o.value),onKeyup:m[5]||(m[5]=_v(w=>f.value||p(),["enter"]))},null,8,["modelValue","append-icon","type","rules"]),r.value?($(),te(dn,{key:0,class:"mt-6",color:"error",density:"compact",variant:"outlined"},{default:v(()=>[k(re(r.value),1)]),_:1})):fe("",!0)]),_:1})]),_:1}),h(Mn,null,{default:v(()=>[h(se,{loading:u.value,class:"pa-4",color:"primary",size:"large",style:{width:"100%"},onClick:m[6]||(m[6]=w=>p())},{default:v(()=>m[12]||(m[12]=[k(" Register account ")])),_:1},8,["loading"])]),_:1}),h(Mn,null,{default:v(()=>[h(se,{style:{width:"100%"},class:"pa-4",size:"large",onClick:m[7]||(m[7]=w=>d())},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>m[13]||(m[13]=[k("arrow_left")])),_:1}),m[14]||(m[14]=k("Back to Login "))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}}}),_re=$e({__name:"RegistrationView",setup(e){return(t,n)=>($(),te(Vn,{"fill-height":"",fluid:""},{default:v(()=>[h(Sm,{"align-center":"","justify-center":""},{default:v(()=>[h(Sre)]),_:1})]),_:1}))}}),kre=["src"],xre=$e({__name:"CameraGridView",setup(e){const t=Ft(),n=tn(nn.AddOrUpdateCameraDialog),s=wm({queryKey:["cameraStream"],queryFn:async()=>(await sp.listCameraStreams()).map(c=>({printer:t.printers.find(d=>d.id===c.printerId),cameraStream:c}))}),i=AK({mutationFn:u=>sp.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)=>($(),me("div",null,[h(pr,null,{default:v(()=>[h(xn,{class:"mr-4"},{default:v(()=>c[1]||(c[1]=[k(" Camera Overview ")])),_:1}),h(se,{color:"primary",onClick:c[0]||(c[0]=d=>o())},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>c[2]||(c[2]=[k("add")])),_:1}),c[3]||(c[3]=k(" Add camera "))]),_:1})]),_:1}),h(rt,{class:"ma-0"},{default:v(()=>[($(!0),me(Pe,null,Wt(Z(s).data.value,d=>($(),me("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:v(()=>{var f;return[h(sn,null,{default:v(()=>{var p;return[d.cameraStream.printerId?($(),te(J,{key:0,class:"mr-2",size:"small"},{default:v(()=>c[4]||(c[4]=[k(" print ")])),_:1})):($(),te(J,{key:1,class:"mr-2",size:"small"},{default:v(()=>c[5]||(c[5]=[k(" camera_alt ")])),_:1})),k(" "+re((d==null?void 0:d.cameraStream.name)??((p=d==null?void 0:d.printer)==null?void 0:p.name)??"Camera"),1)]}),_:2},1024),M("img",{src:(f=d.cameraStream)==null?void 0:f.streamURL,width:"100%"},null,8,kre),c[10]||(c[10]=M("br",null,null,-1)),h(se,{class:"mr-1",size:"small",onClick:p=>a(d.cameraStream.id)},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>c[6]||(c[6]=[k("edit")])),_:1}),c[7]||(c[7]=k(" Update "))]),_:2},1032,["onClick"]),h(se,{size:"small",onClick:p=>l(d.cameraStream.id)},{default:v(()=>[h(J,{class:"mr-2"},{default:v(()=>c[8]||(c[8]=[k("delete")])),_:1}),c[9]||(c[9]=k(" Delete "))]),_:2},1032,["onClick"])]}),_:2},1024)]))),128))]),_:1})]))}}),Ere="/img/OIG.jpg";class Cre extends mr{static async postFirstTimeSetup(t){const n=De.completeFirstTimeSetupRoute;return await this.post(n,t)}}const Tre={class:"mt-6 border_all"},Pre={class:"d-flex flex-row align-center"},Rre={class:"d-flex flex-row align-center"},Ire={class:"d-flex flex-row align-center"},Are={class:"d-flex flex-row align-center"},Ore={class:"mt-4"},Mre={class:"mt-4"},Dre={class:"mt-14"},$re={class:"mb-5 mt-10"},Lre={class:"mt-14"},Fre=$e({__name:"FirstTimeSetupView",setup(e){const t=Wo(),n=Dt(),r=U(!1),s=as(),i=U({loginRequired:!0,registration:!1}),o=U({rootUsername:"admin",rootPassword:"",rootPassword2:""}),a=U(1);_t(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 Cre.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=In("v-stepper-step"),p=In("v-stepper-content"),g=In("v-stepper-items");return $(),te(Vn,null,{default:v(()=>[d[46]||(d[46]=M("img",{alt:"FDM Monster Background",class:"grid-bg-img align-content-center",src:eS,style:{opacity:"0.08"}},null,-1)),h(bO,{modelValue:a.value,"onUpdate:modelValue":d[10]||(d[10]=m=>a.value=m),class:"bg-grey-darken-4"},{default:v(()=>[h(Lw,null,{default:v(()=>[h(f,{complete:a.value>1,step:"1"},{default:v(()=>d[11]||(d[11]=[k(" Introduction ")])),_:1},8,["complete"]),h(cn),h(f,{complete:a.value>2,step:"2"},{default:v(()=>d[12]||(d[12]=[k(" Login and registration ")])),_:1},8,["complete"]),h(cn),h(f,{step:"3"},{default:v(()=>d[13]||(d[13]=[k(" Summary ")])),_:1})]),_:1}),h(g,null,{default:v(()=>[h(p,{class:"align-content-center align-center text-center",step:"1"},{default:v(()=>[d[17]||(d[17]=M("div",{class:"align-content-center align-center text-center"},[M("img",{class:"rounded-pill ma-4",src:Ere,style:{opacity:"0.7"},width:"400"}),k(" /> "),M("h1",null,"FDM Monster"),M("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:v(()=>d[14]||(d[14]=[k(" Start Setup ")])),_:1}),M("div",Tre,[h(J,{class:"mr-6"},{default:v(()=>d[15]||(d[15]=[k("question_mark")])),_:1}),d[16]||(d[16]=M("small",null,[k(" If you have questions at any point, reach out on "),M("a",{href:"https://github.com/fdm-monster/fdm-monster/issues"}," Github "),k(" or on "),M("a",{href:"https://discord.gg/mwA8uP8CMc"}," Discord "),k(". ")],-1))])]),_:1}),h(p,{class:"align-content-center align-center text-center",step:"2"},{default:v(()=>[M("h4",null,[h(J,{class:"mr-2"},{default:v(()=>d[18]||(d[18]=[k("settings")])),_:1}),d[19]||(d[19]=k(" Login"))]),h(nS,{modelValue:r.value,"onUpdate:modelValue":d[6]||(d[6]=m=>r.value=m)},{default:v(()=>[h(ap,{modelValue:i.value.loginRequired,"onUpdate:modelValue":d[1]||(d[1]=m=>i.value.loginRequired=m),class:"mt-5"},{message:v(()=>[M("span",Pre,[h(J,{color:i.value.loginRequired?"success":"",disabled:!i.value.loginRequired,class:"ml-3 mr-3"},{default:v(()=>d[20]||(d[20]=[k(" check ")])),_:1},8,["color","disabled"]),d[21]||(d[21]=k(" Login is required. "))]),M("span",Rre,[h(J,{color:i.value.loginRequired?"":"error",disabled:i.value.loginRequired,class:"ml-3 mr-3"},{default:v(()=>d[22]||(d[22]=[k(" close ")])),_:1},8,["color","disabled"]),d[23]||(d[23]=k(" No login is required. The admin role is assumed. "))])]),label:v(()=>d[24]||(d[24]=[k(" Enable Login ")])),_:1},8,["modelValue"]),i.value.loginRequired?fe("",!0):($(),te(dn,{key:0,color:"error-darken-4"},{default:v(()=>d[25]||(d[25]=[k(" You might be exposing your FDM Monster server publicly. Please take care evaluating the "),M("strong",null," Enable Login ",-1),k(" option. ")])),_:1})),h(ap,{modelValue:i.value.registration,"onUpdate:modelValue":d[2]||(d[2]=m=>i.value.registration=m),class:"mt-10 mb-10"},{message:v(()=>[M("span",Ire,[h(J,{color:i.value.registration?"success":"",disabled:!i.value.registration,class:"ml-3 mr-3"},{default:v(()=>d[26]||(d[26]=[k(" check ")])),_:1},8,["color","disabled"]),d[27]||(d[27]=k(" Accounts can be registered with a guest role. "))]),M("span",Are,[h(J,{color:i.value.registration?"":"error",disabled:i.value.registration,class:"ml-3 mr-3"},{default:v(()=>d[28]||(d[28]=[k(" close ")])),_:1},8,["color","disabled"]),d[29]||(d[29]=k(" No other accounts can be registered. "))])]),label:v(()=>d[30]||(d[30]=[k(" Enable Registration ")])),_:1},8,["modelValue"]),h(cn),M("h4",Ore,[h(J,{class:"mr-2"},{default:v(()=>d[31]||(d[31]=[k("shield")])),_:1}),d[32]||(d[32]=k(" 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:v(()=>[h(J,null,{default:v(()=>d[33]||(d[33]=[k("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:v(()=>[h(J,null,{default:v(()=>d[34]||(d[34]=[k("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:v(()=>[h(J,null,{default:v(()=>d[35]||(d[35]=[k("password")])),_:1})]),_:1},8,["modelValue","rules"])]),_:1},8,["modelValue"]),M("div",Mre,[h(se,{class:"mr-4",onClick:d[7]||(d[7]=m=>a.value=1)},{default:v(()=>d[36]||(d[36]=[k(" Back ")])),_:1}),h(se,{disabled:!r.value,color:"primary",onClick:d[8]||(d[8]=m=>l())},{default:v(()=>d[37]||(d[37]=[k(" Verify & Submit ")])),_:1},8,["disabled"])]),h(cn,{class:"mt-4"}),M("div",Dre,[h(J,{class:"mr-6"},{default:v(()=>d[38]||(d[38]=[k("question_mark")])),_:1}),d[39]||(d[39]=M("small",null,[k(" If you have questions at any point, reach out on "),M("a",{href:"https://github.com/fdm-monster/fdm-monster/issues"}," Github "),k(" or on "),M("a",{href:"https://discord.gg/mwA8uP8CMc"}," Discord "),k(". ")],-1))])]),_:1}),h(p,{class:"align-content-center align-center text-center",step:"3"},{default:v(()=>[M("div",$re,[h(J,{size:"100",class:"mr-5",color:"green circle"},{default:v(()=>d[40]||(d[40]=[k(" check_circle ")])),_:1}),d[41]||(d[41]=k(" Setup Completed "))]),d[45]||(d[45]=M("br",null,null,-1)),h(se,{color:"primary",class:"mr-4",onClick:d[9]||(d[9]=m=>u())},{default:v(()=>d[42]||(d[42]=[k(" Let's continue ")])),_:1}),M("div",Lre,[h(J,{class:"mr-6"},{default:v(()=>d[43]||(d[43]=[k("question_mark")])),_:1}),d[44]||(d[44]=M("small",null,[k(" If you have questions at any point, reach out on "),M("a",{href:"https://github.com/fdm-monster/fdm-monster/issues"}," Github "),k(" or on "),M("a",{href:"https://discord.gg/mwA8uP8CMc"}," Discord "),k(". ")],-1))])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}}}),Nre={class:"ml-4 mb-4"},Bre={class:"ml-4 mb-4"},Vre=$e({__name:"AccountSettings",setup(e){const t=Fs(),n=qw(),r=as(),s=Wo(),i=Dt(),o=U(),a=U(""),l=U({username:"",newPassword:"",oldPassword:"",repeatPassword:""});_t(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 es.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 es.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 XO(s)}return(d,f)=>{const p=In("v-list-item-content"),g=In("v-list-item-action-text");return $(),te(gt,null,{default:v(()=>[h(pr,{color:"primary"},{default:v(()=>[h(lt,null,{default:v(()=>[h(J,null,{default:v(()=>f[6]||(f[6]=[k("account_circle")])),_:1})]),_:1}),h(xn,null,{default:v(()=>f[7]||(f[7]=[k(" Account Settings ")])),_:1})]),_:1}),h(Vt,{subheader:"",lines:"three"},{default:v(()=>[h(Ve,null,{default:v(()=>[o.value?fe("",!0):($(),te(p,{key:0},{default:v(()=>[h(dn,{color:"primary"},{default:v(()=>f[8]||(f[8]=[k(" 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:v(()=>[h(Ve,null,{default:v(()=>[h(dt,null,{default:v(()=>f[9]||(f[9]=[k(" Username ")])),_:1}),h(g,null,{default:v(()=>[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}),M("div",Nre,[h(se,{disabled:!o.value,color:"primary",onClick:f[1]||(f[1]=m=>u())},{default:v(()=>f[10]||(f[10]=[k(" Change username ")])),_:1},8,["disabled"])]),h(cn),f[14]||(f[14]=M("br",null,null,-1)),h(Ve,null,{default:v(()=>[h(dt,null,{default:v(()=>f[11]||(f[11]=[k(" Old Password ")])),_:1}),h(g,null,{default:v(()=>[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(Ve,null,{default:v(()=>[h(dt,null,{default:v(()=>f[12]||(f[12]=[k(" New Password ")])),_:1}),h(g,null,{default:v(()=>[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(Ve,null,{default:v(()=>[h(dt,null,{default:v(()=>f[13]||(f[13]=[k(" Repeat New Password ")])),_:1}),h(g,null,{default:v(()=>[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}),M("div",Bre,[h(se,{disabled:!o.value,color:"primary",onClick:f[5]||(f[5]=m=>c())},{default:v(()=>f[15]||(f[15]=[k(" Change password ")])),_:1},8,["disabled"])]),h(cn)]),_:1})}}}),Ure=$e({__name:"GridSettings",setup(e){return(t,n)=>($(),te(rt,null,{default:v(()=>[h(ze,{cols:"12"},{default:v(()=>[h(gt,null,{default:v(()=>[h(zM,{icon:"grid_on",title:"Grid"}),h(wO)]),_:1})]),_:1})]),_:1}))}}),zre=$e({__name:"ServerProtectionSettings",setup(e){const t=Wo(),n=Dt(),r=as(),s=U(""),i=U(!1),o=U(!1),a=U(3200),l=U(!1),u=U(-1),c=U(14);async function d(){var _;const w=await Pn.getSettings();i.value=w.server.loginRequired,o.value=w.server.registration,s.value=((_=w.connection)==null?void 0:_.clientIp)??"127.0.0.1";const b=await Pn.getSettingsSensitive();a.value=b.credentials.jwtExpiresIn/60,l.value=b.credentials.refreshTokenAttempts!==-1,u.value=b.credentials.refreshTokenAttempts,c.value=b.credentials.refreshTokenExpiry/24/3600}_t(async()=>{await d()});function f(){l.value||(u.value=-1)}async function p(){const w=i.value;!w&&!confirm("Disabling login will expose your server. Continue?")||(await Pn.updateLoginRequiredSettings(w),await r.logout(!0),await r.checkAuthenticationRequirements(),w?await t.push({name:qt.Login}):await t.push({name:qt.Home}),n.info("Login Required settings updated"))}async function g(){await Pn.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(w=!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 Pn.updateCredentialSettings(a.value*60,u.value,c.value*24*3600),n.info("Login expiry settings updated")}return(w,b)=>($(),te(gt,null,{default:v(()=>[h(pr,{color:"primary"},{default:v(()=>[h(lt,null,{default:v(()=>[h(J,null,{default:v(()=>b[11]||(b[11]=[k("settings")])),_:1})]),_:1}),h(xn,null,{default:v(()=>b[12]||(b[12]=[k(" Server Protection Settings ")])),_:1})]),_:1}),h(Vt,{lines:"three"},{default:v(()=>[h(Ve,null,{default:v(()=>[h(dt,null,{default:v(()=>b[13]||(b[13]=[k(" Login Required ")])),_:1}),h(yt,null,{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:"12",md:"2"},{default:v(()=>[h(yn,{modelValue:i.value,"onUpdate:modelValue":b[0]||(b[0]=_=>i.value=_),label:"Require Login"},null,8,["modelValue"])]),_:1})]),_:1}),h(rt,null,{default:v(()=>[h(ze,null,{default:v(()=>[h(se,{color:"primary",onClick:b[1]||(b[1]=_=>p())},{default:v(()=>b[14]||(b[14]=[k(" save login required setting ")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),h(Ve,null,{default:v(()=>[h(dt,null,{default:v(()=>b[15]||(b[15]=[k(" Registration Enabled ")])),_:1}),h(yt,null,{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:"12",md:"2"},{default:v(()=>[h(yn,{modelValue:o.value,"onUpdate:modelValue":b[2]||(b[2]=_=>o.value=_),label:"Enable Registration"},null,8,["modelValue"])]),_:1})]),_:1}),h(rt,null,{default:v(()=>[h(ze,null,{default:v(()=>[h(se,{color:"primary",onClick:b[3]||(b[3]=_=>g())},{default:v(()=>b[16]||(b[16]=[k(" save registration enabled setting ")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),h(Ve,null,{default:v(()=>[h(dt,null,{default:v(()=>b[17]||(b[17]=[k(" Login Expiry Settings (advanced) ")])),_:1}),h(yt,null,{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:"12",md:"2"},{default:v(()=>[h(ut,{modelValue:a.value,"onUpdate:modelValue":b[4]||(b[4]=_=>a.value=_),rules:[_=>!!_&&_>=2&&_<=120],label:"JWT Expiry (minutes)"},null,8,["modelValue","rules"])]),_:1})]),_:1}),h(rt,null,{default:v(()=>[h(ze,{cols:"12",md:"2"},{default:v(()=>[h(yn,{modelValue:l.value,"onUpdate:modelValue":[b[5]||(b[5]=_=>l.value=_),b[6]||(b[6]=_=>f())],label:"Enable Refresh Token Attempts"},null,8,["modelValue"])]),_:1})]),_:1}),h(rt,null,{default:v(()=>[h(ze,{cols:"12",md:"2"},{default:v(()=>[h(ut,{modelValue:u.value,"onUpdate:modelValue":b[7]||(b[7]=_=>u.value=_),disabled:!l.value,rules:[_=>!!_&&_>=50],label:"Refresh Token Attempts (disabled: -1)",type:"number"},null,8,["modelValue","disabled","rules"])]),_:1})]),_:1}),h(rt,null,{default:v(()=>[h(ze,{cols:"12",md:"2"},{default:v(()=>[h(ut,{modelValue:c.value,"onUpdate:modelValue":b[8]||(b[8]=_=>c.value=_),rules:[_=>!!_&&_>=1&&_<=30],label:"Refresh Token Expiry (days)"},null,8,["modelValue","rules"])]),_:1})]),_:1}),h(dn,{color:"secondary"},{default:v(()=>[h(J,null,{default:v(()=>b[18]||(b[18]=[k("info")])),_:1}),b[19]||(b[19]=k("   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:v(()=>[h(ze,null,{default:v(()=>[h(se,{color:"primary",onClick:b[9]||(b[9]=_=>y())},{default:v(()=>b[20]||(b[20]=[k(" save login expiry settings ")])),_:1}),h(se,{color:"default",onClick:b[10]||(b[10]=_=>m())},{default:v(()=>b[21]||(b[21]=[k(" reset to default ")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}});var ub={exports:{}};const Hre="2.0.0",AD=256,jre=Number.MAX_SAFE_INTEGER||9007199254740991,qre=16,Wre=AD-6,Gre=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var Om={MAX_LENGTH:AD,MAX_SAFE_COMPONENT_LENGTH:qre,MAX_SAFE_BUILD_LENGTH:Wre,MAX_SAFE_INTEGER:jre,RELEASE_TYPES:Gre,SEMVER_SPEC_VERSION:Hre,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Zg={};const Kre=typeof process=="object"&&Zg&&Zg.NODE_DEBUG&&/\bsemver\b/i.test(Zg.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Mm=Kre;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:s}=Om,i=Mm;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]],g=y=>{for(const[w,b]of p)y=y.split(`${w}*`).join(`${w}{0,${b}}`).split(`${w}+`).join(`${w}{1,${b}}`);return y},m=(y,w,b)=>{const _=g(w),T=d++;i(y,T,w),c[y]=T,l[T]=w,u[T]=_,o[T]=new RegExp(w,b?"g":void 0),a[T]=new RegExp(_,b?"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*$")})(ub,ub.exports);var Wd=ub.exports;const Yre=Object.freeze({loose:!0}),Xre=Object.freeze({}),Qre=e=>e?typeof e!="object"?Yre:e:Xre;var vS=Qre;const rE=/^[0-9]+$/,OD=(e,t)=>{const n=rE.test(e),r=rE.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1},Jre=(e,t)=>OD(t,e);var MD={compareIdentifiers:OD,rcompareIdentifiers:Jre};const Lf=Mm,{MAX_LENGTH:sE,MAX_SAFE_INTEGER:Ff}=Om,{safeRe:iE,safeSrc:oE,t:Nf}=Wd,Zre=vS,{compareIdentifiers:gl}=MD;let ese=class Ks{constructor(t,n){if(n=Zre(n),t instanceof Ks){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>sE)throw new TypeError(`version is longer than ${sE} characters`);Lf("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const r=t.trim().match(n.loose?iE[Nf.LOOSE]:iE[Nf.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>Ff||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Ff||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Ff||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<Ff)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 Ks)){if(typeof t=="string"&&t===this.version)return 0;t=new Ks(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof Ks||(t=new Ks(t,this.options)),gl(this.major,t.major)||gl(this.minor,t.minor)||gl(this.patch,t.patch)}comparePre(t){if(t instanceof Ks||(t=new Ks(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 gl(r,s)}while(++n)}compareBuild(t){t instanceof Ks||(t=new Ks(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 gl(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?oE[Nf.PRERELEASELOOSE]:oE[Nf.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]),gl(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 gr=ese;const aE=gr,tse=(e,t,n=!1)=>{if(e instanceof aE)return e;try{return new aE(e,t)}catch(r){if(!n)return null;throw r}};var Gu=tse;const nse=Gu,rse=(e,t)=>{const n=nse(e,t);return n?n.version:null};var sse=rse;const ise=Gu,ose=(e,t)=>{const n=ise(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};var ase=ose;const lE=gr,lse=(e,t,n,r,s)=>{typeof n=="string"&&(s=r,r=n,n=void 0);try{return new lE(e instanceof lE?e.version:e,n).inc(t,r,s).version}catch{return null}};var use=lse;const uE=Gu,cse=(e,t)=>{const n=uE(e,null,!0),r=uE(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 dse=cse;const fse=gr,hse=(e,t)=>new fse(e,t).major;var pse=hse;const mse=gr,gse=(e,t)=>new mse(e,t).minor;var vse=gse;const yse=gr,bse=(e,t)=>new yse(e,t).patch;var wse=bse;const Sse=Gu,_se=(e,t)=>{const n=Sse(e,t);return n&&n.prerelease.length?n.prerelease:null};var kse=_se;const cE=gr,xse=(e,t,n)=>new cE(e,n).compare(new cE(t,n));var Ns=xse;const Ese=Ns,Cse=(e,t,n)=>Ese(t,e,n);var Tse=Cse;const Pse=Ns,Rse=(e,t)=>Pse(e,t,!0);var Ise=Rse;const dE=gr,Ase=(e,t,n)=>{const r=new dE(e,n),s=new dE(t,n);return r.compare(s)||r.compareBuild(s)};var yS=Ase;const Ose=yS,Mse=(e,t)=>e.sort((n,r)=>Ose(n,r,t));var Dse=Mse;const $se=yS,Lse=(e,t)=>e.sort((n,r)=>$se(r,n,t));var Fse=Lse;const Nse=Ns,Bse=(e,t,n)=>Nse(e,t,n)>0;var Dm=Bse;const Vse=Ns,Use=(e,t,n)=>Vse(e,t,n)<0;var bS=Use;const zse=Ns,Hse=(e,t,n)=>zse(e,t,n)===0;var DD=Hse;const jse=Ns,qse=(e,t,n)=>jse(e,t,n)!==0;var $D=qse;const Wse=Ns,Gse=(e,t,n)=>Wse(e,t,n)>=0;var wS=Gse;const Kse=Ns,Yse=(e,t,n)=>Kse(e,t,n)<=0;var SS=Yse;const Xse=DD,Qse=$D,Jse=Dm,Zse=wS,eie=bS,tie=SS,nie=(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 Qse(e,n,r);case">":return Jse(e,n,r);case">=":return Zse(e,n,r);case"<":return eie(e,n,r);case"<=":return tie(e,n,r);default:throw new TypeError(`Invalid operator: ${t}`)}};var LD=nie;const rie=gr,sie=Gu,{safeRe:Bf,t:Vf}=Wd,iie=(e,t)=>{if(e instanceof rie)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?Bf[Vf.COERCEFULL]:Bf[Vf.COERCE]);else{const l=t.includePrerelease?Bf[Vf.COERCERTLFULL]:Bf[Vf.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 sie(`${r}.${s}.${i}${o}${a}`,t)};var oie=iie;class aie{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 lie=aie,ev,fE;function Bs(){if(fE)return ev;fE=1;const e=/\s+/g;class t{constructor(W,z){if(z=s(z),W instanceof t)return W.loose===!!z.loose&&W.includePrerelease===!!z.includePrerelease?W:new t(W.raw,z);if(W instanceof i)return this.raw=W.value,this.set=[[W]],this.formatted=void 0,this;if(this.options=z,this.loose=!!z.loose,this.includePrerelease=!!z.includePrerelease,this.raw=W.trim().replace(e," "),this.set=this.raw.split("||").map(K=>this.parseRange(K.trim())).filter(K=>K.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const K=this.set[0];if(this.set=this.set.filter(G=>!m(G[0])),this.set.length===0)this.set=[K];else if(this.set.length>1){for(const G of this.set)if(G.length===1&&y(G[0])){this.set=[G];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let W=0;W<this.set.length;W++){W>0&&(this.formatted+="||");const z=this.set[W];for(let K=0;K<z.length;K++)K>0&&(this.formatted+=" "),this.formatted+=z[K].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(W){const K=((this.options.includePrerelease&&p)|(this.options.loose&&g))+":"+W,G=r.get(K);if(G)return G;const H=this.options.loose,B=H?l[u.HYPHENRANGELOOSE]:l[u.HYPHENRANGE];W=W.replace(B,A(this.options.includePrerelease)),o("hyphen replace",W),W=W.replace(l[u.COMPARATORTRIM],c),o("comparator trim",W),W=W.replace(l[u.TILDETRIM],d),o("tilde trim",W),W=W.replace(l[u.CARETTRIM],f),o("caret trim",W);let ne=W.split(" ").map(ie=>b(ie,this.options)).join(" ").split(/\s+/).map(ie=>R(ie,this.options));H&&(ne=ne.filter(ie=>(o("loose invalid filter",ie,this.options),!!ie.match(l[u.COMPARATORLOOSE])))),o("range list",ne);const q=new Map,Y=ne.map(ie=>new i(ie,this.options));for(const ie of Y){if(m(ie))return[ie];q.set(ie.value,ie)}q.size>1&&q.has("")&&q.delete("");const oe=[...q.values()];return r.set(K,oe),oe}intersects(W,z){if(!(W instanceof t))throw new TypeError("a Range is required");return this.set.some(K=>w(K,z)&&W.set.some(G=>w(G,z)&&K.every(H=>G.every(B=>H.intersects(B,z)))))}test(W){if(!W)return!1;if(typeof W=="string")try{W=new a(W,this.options)}catch{return!1}for(let z=0;z<this.set.length;z++)if(D(this.set[z],W,this.options))return!0;return!1}}ev=t;const n=lie,r=new n,s=vS,i=$m(),o=Mm,a=gr,{safeRe:l,t:u,comparatorTrimReplace:c,tildeTrimReplace:d,caretTrimReplace:f}=Wd,{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:g}=Om,m=L=>L.value==="<0.0.0-0",y=L=>L.value==="",w=(L,W)=>{let z=!0;const K=L.slice();let G=K.pop();for(;z&&K.length;)z=K.every(H=>G.intersects(H,W)),G=K.pop();return z},b=(L,W)=>(o("comp",L,W),L=C(L,W),o("caret",L),L=T(L,W),o("tildes",L),L=S(L,W),o("xrange",L),L=O(L,W),o("stars",L),L),_=L=>!L||L.toLowerCase()==="x"||L==="*",T=(L,W)=>L.trim().split(/\s+/).map(z=>x(z,W)).join(" "),x=(L,W)=>{const z=W.loose?l[u.TILDELOOSE]:l[u.TILDE];return L.replace(z,(K,G,H,B,ne)=>{o("tilde",L,K,G,H,B,ne);let q;return _(G)?q="":_(H)?q=`>=${G}.0.0 <${+G+1}.0.0-0`:_(B)?q=`>=${G}.${H}.0 <${G}.${+H+1}.0-0`:ne?(o("replaceTilde pr",ne),q=`>=${G}.${H}.${B}-${ne} <${G}.${+H+1}.0-0`):q=`>=${G}.${H}.${B} <${G}.${+H+1}.0-0`,o("tilde return",q),q})},C=(L,W)=>L.trim().split(/\s+/).map(z=>I(z,W)).join(" "),I=(L,W)=>{o("caret",L,W);const z=W.loose?l[u.CARETLOOSE]:l[u.CARET],K=W.includePrerelease?"-0":"";return L.replace(z,(G,H,B,ne,q)=>{o("caret",L,G,H,B,ne,q);let Y;return _(H)?Y="":_(B)?Y=`>=${H}.0.0${K} <${+H+1}.0.0-0`:_(ne)?H==="0"?Y=`>=${H}.${B}.0${K} <${H}.${+B+1}.0-0`:Y=`>=${H}.${B}.0${K} <${+H+1}.0.0-0`:q?(o("replaceCaret pr",q),H==="0"?B==="0"?Y=`>=${H}.${B}.${ne}-${q} <${H}.${B}.${+ne+1}-0`:Y=`>=${H}.${B}.${ne}-${q} <${H}.${+B+1}.0-0`:Y=`>=${H}.${B}.${ne}-${q} <${+H+1}.0.0-0`):(o("no pr"),H==="0"?B==="0"?Y=`>=${H}.${B}.${ne}${K} <${H}.${B}.${+ne+1}-0`:Y=`>=${H}.${B}.${ne}${K} <${H}.${+B+1}.0-0`:Y=`>=${H}.${B}.${ne} <${+H+1}.0.0-0`),o("caret return",Y),Y})},S=(L,W)=>(o("replaceXRanges",L,W),L.split(/\s+/).map(z=>E(z,W)).join(" ")),E=(L,W)=>{L=L.trim();const z=W.loose?l[u.XRANGELOOSE]:l[u.XRANGE];return L.replace(z,(K,G,H,B,ne,q)=>{o("xRange",L,K,G,H,B,ne,q);const Y=_(H),oe=Y||_(B),ie=oe||_(ne),be=ie;return G==="="&&be&&(G=""),q=W.includePrerelease?"-0":"",Y?G===">"||G==="<"?K="<0.0.0-0":K="*":G&&be?(oe&&(B=0),ne=0,G===">"?(G=">=",oe?(H=+H+1,B=0,ne=0):(B=+B+1,ne=0)):G==="<="&&(G="<",oe?H=+H+1:B=+B+1),G==="<"&&(q="-0"),K=`${G+H}.${B}.${ne}${q}`):oe?K=`>=${H}.0.0${q} <${+H+1}.0.0-0`:ie&&(K=`>=${H}.${B}.0${q} <${H}.${+B+1}.0-0`),o("xRange return",K),K})},O=(L,W)=>(o("replaceStars",L,W),L.trim().replace(l[u.STAR],"")),R=(L,W)=>(o("replaceGTE0",L,W),L.trim().replace(l[W.includePrerelease?u.GTE0PRE:u.GTE0],"")),A=L=>(W,z,K,G,H,B,ne,q,Y,oe,ie,be)=>(_(K)?z="":_(G)?z=`>=${K}.0.0${L?"-0":""}`:_(H)?z=`>=${K}.${G}.0${L?"-0":""}`:B?z=`>=${z}`:z=`>=${z}${L?"-0":""}`,_(Y)?q="":_(oe)?q=`<${+Y+1}.0.0-0`:_(ie)?q=`<${Y}.${+oe+1}.0-0`:be?q=`<=${Y}.${oe}.${ie}-${be}`:L?q=`<${Y}.${oe}.${+ie+1}-0`:q=`<=${q}`,`${z} ${q}`.trim()),D=(L,W,z)=>{for(let K=0;K<L.length;K++)if(!L[K].test(W))return!1;if(W.prerelease.length&&!z.includePrerelease){for(let K=0;K<L.length;K++)if(o(L[K].semver),L[K].semver!==i.ANY&&L[K].semver.prerelease.length>0){const G=L[K].semver;if(G.major===W.major&&G.minor===W.minor&&G.patch===W.patch)return!0}return!1}return!0};return ev}var tv,hE;function $m(){if(hE)return tv;hE=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(">")))}}tv=t;const n=vS,{safeRe:r,t:s}=Wd,i=LD,o=Mm,a=gr,l=Bs();return tv}const uie=Bs(),cie=(e,t,n)=>{try{t=new uie(t,n)}catch{return!1}return t.test(e)};var Lm=cie;const die=Bs(),fie=(e,t)=>new die(e,t).set.map(n=>n.map(r=>r.value).join(" ").trim().split(" "));var hie=fie;const pie=gr,mie=Bs(),gie=(e,t,n)=>{let r=null,s=null,i=null;try{i=new mie(t,n)}catch{return null}return e.forEach(o=>{i.test(o)&&(!r||s.compare(o)===-1)&&(r=o,s=new pie(r,n))}),r};var vie=gie;const yie=gr,bie=Bs(),wie=(e,t,n)=>{let r=null,s=null,i=null;try{i=new bie(t,n)}catch{return null}return e.forEach(o=>{i.test(o)&&(!r||s.compare(o)===1)&&(r=o,s=new yie(r,n))}),r};var Sie=wie;const nv=gr,_ie=Bs(),pE=Dm,kie=(e,t)=>{e=new _ie(e,t);let n=new nv("0.0.0");if(e.test(n)||(n=new nv("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 nv(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!i||pE(a,i))&&(i=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!n||pE(n,i))&&(n=i)}return n&&e.test(n)?n:null};var xie=kie;const Eie=Bs(),Cie=(e,t)=>{try{return new Eie(e,t).range||"*"}catch{return null}};var Tie=Cie;const Pie=gr,FD=$m(),{ANY:Rie}=FD,Iie=Bs(),Aie=Lm,mE=Dm,gE=bS,Oie=SS,Mie=wS,Die=(e,t,n,r)=>{e=new Pie(e,r),t=new Iie(t,r);let s,i,o,a,l;switch(n){case">":s=mE,i=Oie,o=gE,a=">",l=">=";break;case"<":s=gE,i=Mie,o=mE,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Aie(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 FD(">=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 _S=Die;const $ie=_S,Lie=(e,t,n)=>$ie(e,t,">",n);var Fie=Lie;const Nie=_S,Bie=(e,t,n)=>Nie(e,t,"<",n);var Vie=Bie;const vE=Bs(),Uie=(e,t,n)=>(e=new vE(e,n),t=new vE(t,n),e.intersects(t,n));var zie=Uie;const Hie=Lm,jie=Ns;var qie=(e,t,n)=>{const r=[];let s=null,i=null;const o=e.sort((c,d)=>jie(c,d,n));for(const c of o)Hie(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 yE=Bs(),kS=$m(),{ANY:rv}=kS,uc=Lm,xS=Ns,Wie=(e,t,n={})=>{if(e===t)return!0;e=new yE(e,n),t=new yE(t,n);let r=!1;e:for(const s of e.set){for(const i of t.set){const o=Kie(s,i,n);if(r=r||o!==null,o)continue e}if(r)return!1}return!0},Gie=[new kS(">=0.0.0-0")],bE=[new kS(">=0.0.0")],Kie=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===rv){if(t.length===1&&t[0].semver===rv)return!0;n.includePrerelease?e=Gie:e=bE}if(t.length===1&&t[0].semver===rv){if(n.includePrerelease)return!0;t=bE}const r=new Set;let s,i;for(const p of e)p.operator===">"||p.operator===">="?s=wE(s,p,n):p.operator==="<"||p.operator==="<="?i=SE(i,p,n):r.add(p.semver);if(r.size>1)return null;let o;if(s&&i){if(o=xS(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&&!uc(p,String(s),n)||i&&!uc(p,String(i),n))return null;for(const g of t)if(!uc(p,String(g),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=wE(s,p,n),a===p&&a!==s)return!1}else if(s.operator===">="&&!uc(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=SE(i,p,n),l===p&&l!==i)return!1}else if(i.operator==="<="&&!uc(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)},wE=(e,t,n)=>{if(!e)return t;const r=xS(e.semver,t.semver,n);return r>0?e:r<0||t.operator===">"&&e.operator===">="?t:e},SE=(e,t,n)=>{if(!e)return t;const r=xS(e.semver,t.semver,n);return r<0?e:r>0||t.operator==="<"&&e.operator==="<="?t:e};var Yie=Wie;const sv=Wd,_E=Om,Xie=gr,kE=MD,Qie=Gu,Jie=sse,Zie=ase,eoe=use,toe=dse,noe=pse,roe=vse,soe=wse,ioe=kse,ooe=Ns,aoe=Tse,loe=Ise,uoe=yS,coe=Dse,doe=Fse,foe=Dm,hoe=bS,poe=DD,moe=$D,goe=wS,voe=SS,yoe=LD,boe=oie,woe=$m(),Soe=Bs(),_oe=Lm,koe=hie,xoe=vie,Eoe=Sie,Coe=xie,Toe=Tie,Poe=_S,Roe=Fie,Ioe=Vie,Aoe=zie,Ooe=qie,Moe=Yie;var cc={parse:Qie,valid:Jie,clean:Zie,inc:eoe,diff:toe,major:noe,minor:roe,patch:soe,prerelease:ioe,compare:ooe,rcompare:aoe,compareLoose:loe,compareBuild:uoe,sort:coe,rsort:doe,gt:foe,lt:hoe,eq:poe,neq:moe,gte:goe,lte:voe,cmp:yoe,coerce:boe,Comparator:woe,Range:Soe,satisfies:_oe,toComparators:koe,maxSatisfying:xoe,minSatisfying:Eoe,minVersion:Coe,validRange:Toe,outside:Poe,gtr:Roe,ltr:Ioe,intersects:Aoe,simplifyRange:Ooe,subset:Moe,SemVer:Xie,re:sv.re,src:sv.src,tokens:sv.t,SEMVER_SPEC_VERSION:_E.SEMVER_SPEC_VERSION,RELEASE_TYPES:_E.RELEASE_TYPES,compareIdentifiers:kE.compareIdentifiers,rcompareIdentifiers:kE.rcompareIdentifiers};const Doe={key:0},$oe={key:1},Loe={key:0},Foe=$e({__name:"SoftwareUpgradeSettings",setup(e){const t=U(""),n=U(!0),r=U(!1),s=U(!1),i=U(""),o=U(""),a=U(HM),l=U(),u=U(),c=U(),d=U(!1),f=U([]);_t(async()=>{var E;await p();const S=await pa.getVersion();i.value=S.version,o.value=((E=S.monsterPi)==null?void 0:E.trim())||""});async function p(){n.value=!0,t.value="",r.value=!1;try{const S=await pa.getGithubRateLimit();if(S.rate.remaining===0){const O=new Date(S.rate.reset).toLocaleTimeString(),R=S.rate.reset*1e3-Date.now(),A=Math.ceil(R/6e4);t.value=`Server has reached a rate limit of the Github API. This limit will be reset at ${O} (in ${A} minutes)`,n.value=!1,r.value=!0;return}}catch{n.value=!1;return}try{const S=await pa.getClientReleases();l.value=S.current,u.value=S.minimum,f.value=S.releases}catch(S){t.value="An error occurred loading the releases: "+S.message}finally{n.value=!1}}const g=P(()=>f.value.filter(S=>{const E=cc.minor(S.tag_name)===cc.minor(u.value.tag_name),O=_(S),R=S.draft;return E&&(y()||d.value||!O)&&!R})),m=P(()=>y());function y(){const S=l.value;return _(S)}function w(S){return C(S)||!x(S,l.value)||T(S)}function b(S){const E=_(S)?`${S.tag_name}, unstable`:S.tag_name;return C(S)?`${E}, currently installed`:T(S)?`${E}, below minimum`:x(S,l.value)?E:`${E}, downgrade not allowed`}function _(S){var E;return(E=S==null?void 0:S.tag_name)!=null&&E.length?S.prerelease||S.tag_name.includes("rc")||S.tag_name.includes("unstable"):!1}function T(S){return cc.compare(S.tag_name,u.value.tag_name)===-1}function x(S,E){if(!E)throw new Error("No current release is known, cannot compare.");return s.value?!0:cc.compare(S.tag_name,E.tag_name)!==-1&&cc.compare(S.tag_name,u.value.tag_name)!==-1}function C(S){var E;return S.tag_name===((E=l.value)==null?void 0:E.tag_name)}async function I(S){confirm("Are you sure? This might cause breaking changes, if the server is outdated")&&(await pa.updateClientDistGithub(S,s.value),location.reload())}return(S,E)=>($(),te(gt,null,{default:v(()=>[h(pr,{color:"primary"},{default:v(()=>[h(lt,null,{default:v(()=>[h(J,null,{default:v(()=>E[5]||(E[5]=[k("upgrade")])),_:1})]),_:1}),h(xn,null,{default:v(()=>E[6]||(E[6]=[k(" Software Upgrade")])),_:1})]),_:1}),h(Vt,{lines:"three"},{default:v(()=>[h(Ve,null,{default:v(()=>[h(dt,null,{default:v(()=>E[7]||(E[7]=[k(" Current versions in use:")])),_:1}),h(yt,null,{default:v(()=>[k(" Your server's version is: "+re(i.value),1)]),_:1}),h(yt,null,{default:v(()=>[k(" Your client's version is: "+re(a.value),1)]),_:1}),h(yt,null,{default:v(()=>[o.value?($(),me("div",Doe,[E[8]||(E[8]=k(" MonsterPi: ")),E[9]||(E[9]=M("div",null,"Your MonsterPi version is:",-1)),k(" "+re(o.value),1)])):($(),me("div",$oe,E[10]||(E[10]=[k(" MonsterPi: "),M("div",null,"No MonsterPi distro was detected.",-1)])))]),_:1})]),_:1})]),_:1}),h(cn),h(Vt,{lines:"three",subheader:""},{default:v(()=>[h(Ve,null,{default:v(()=>[h(dt,null,{default:v(()=>E[11]||(E[11]=[k(" Server upgrade")])),_:1}),h(yt,null,{default:v(()=>E[12]||(E[12]=[k(" Please visit "),M("a",{href:"https://docs.fdm-monster.net/docs/installing/"}," the installation documentation ",-1),k(" for instructions on how to upgrade the server. ")])),_:1})]),_:1})]),_:1}),h(cn),h(Vt,{lines:"three"},{default:v(()=>[h(Ve,null,{default:v(()=>[h(dt,null,{default:v(()=>E[13]||(E[13]=[k(" Client upgrade")])),_:1}),h(yt,null,{default:v(()=>E[14]||(E[14]=[k(" Please visit "),M("a",{href:"https://docs.fdm-monster.net/docs/configuration/updating_client_bundle"}," the installation documentation ",-1),k(" for instructions on how to upgrade the client bundle. ")])),_:1}),h(yt,null,{default:v(()=>E[15]||(E[15]=[k(" Upgrade the client webapp for quickly retrieving small fixes and features ")])),_:1})]),_:1}),h(Ve,null,{default:v(()=>{var O,R,A;return[h(dt,null,{default:v(()=>E[16]||(E[16]=[k(" Select a release to upgrade to:")])),_:1}),h(yt,{class:"mt-2"},{default:v(()=>{var D;return[k(" Minimum required version: "+re((D=u.value)==null?void 0:D.tag_name),1)]}),_:1}),n.value?($(),me("span",Loe,[h(dn,null,{default:v(()=>E[17]||(E[17]=[k(" Loading releases... ")])),_:1})])):fe("",!0),!n.value&&!((O=g.value)!=null&&O.length)?($(),te(dn,{key:1},{default:v(()=>E[18]||(E[18]=[k(" No releases to show. ")])),_:1})):fe("",!0),h(uO,{modelValue:c.value,"onUpdate:modelValue":E[0]||(E[0]=D=>c.value=D)},{default:v(()=>[($(!0),me(Pe,null,Wt(g.value,D=>($(),te(Ty,{key:D.tag_name,disabled:w(D),label:b(D),value:D.tag_name},null,8,["disabled","label","value"]))),128))]),_:1},8,["modelValue"]),M("div",null,[d.value?($(),te(dn,{key:0,color:"primary","max-width":"500px"},{default:v(()=>E[19]||(E[19]=[k(" You are viewing prereleases, please install such versions at your own risk! ")])),_:1})):fe("",!0)]),M("div",null,[h(yn,{modelValue:s.value,"onUpdate:modelValue":E[1]||(E[1]=D=>s.value=D),label:"Allow downgrade"},null,8,["modelValue"]),h(yn,{modelValue:d.value,"onUpdate:modelValue":E[2]||(E[2]=D=>d.value=D),disabled:m.value,label:m.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:E[3]||(E[3]=D=>p())},{default:v(()=>E[20]||(E[20]=[k(" Reload release version list ")])),_:1}),h(se,{disabled:!((R=c.value)!=null&&R.length)||c.value===((A=l.value)==null?void 0:A.tag_name),class:"mt-2",color:"primary",variant:"flat",onClick:E[4]||(E[4]=D=>I(c.value))},{default:v(()=>[h(J,null,{default:v(()=>E[21]||(E[21]=[k("upgrade")])),_:1}),E[22]||(E[22]=k(" Upgrade/downgrade client "))]),_:1},8,["disabled"])]}),_:1})]),_:1})]),_:1}))}}),Noe=$e({__name:"DiagnosticsSettings",setup(e){const t=Dt(),n=Fs(),r=U(!1);_t(async()=>{var l;await n.loadSettings(),r.value=((l=n.serverSettings)==null?void 0:l.sentryDiagnosticsEnabled)||!1});async function s(){await Pn.setSentryDiagnosticsSettings(r.value),fM(r.value)}async function i(){const l=`Test Error ${Date.now()} Sentry enabled: ${r.value}`;try{throw new Error(l)}catch(u){ai(u),t.openInfoMessage({title:"Test report was sent",subtitle:`Content: ${l}`})}}async function o(){await np.downloadLogDump()}async function a(){await np.clearLogFilesOlderThanWeek(),t.openInfoMessage({title:"Action success",subtitle:"Log files older than a week have been deleted"})}return(l,u)=>($(),te(gt,null,{default:v(()=>[h(pr,{color:"primary"},{default:v(()=>[h(lt,null,{default:v(()=>[h(J,null,{default:v(()=>u[5]||(u[5]=[k("bug_report")])),_:1})]),_:1}),h(xn,null,{default:v(()=>u[6]||(u[6]=[k(" Diagnostics")])),_:1})]),_:1}),h(Vt,{lines:"three",subheader:""},{default:v(()=>[h(jr,null,{default:v(()=>u[7]||(u[7]=[k(" Diagnostics to provide bug reports to the developers of this software ")])),_:1}),h(Ve,null,{default:v(()=>[h(dt,null,{default:v(()=>u[8]||(u[8]=[k(" Remote Sentry diagnostic reports: ")])),_:1}),h(yt,null,{default:v(()=>[h(yn,{modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=c=>r.value=c),label:"Enable remote Sentry diagnostic reports"},null,8,["modelValue"])]),_:1}),h(yt,null,{default:v(()=>[h(se,{color:"primary",onClick:u[1]||(u[1]=c=>s())},{default:v(()=>[h(J,{class:"pr-2"},{default:v(()=>u[9]||(u[9]=[k("save")])),_:1}),u[10]||(u[10]=k(" Save "))]),_:1}),h(se,{color:"secondary",onClick:u[2]||(u[2]=c=>i())},{default:v(()=>[h(J,{class:"pr-2"},{default:v(()=>u[11]||(u[11]=[k("bug_report")])),_:1}),u[12]||(u[12]=k(" Test Error "))]),_:1})]),_:1})]),_:1}),h(cn),h(Ve,null,{default:v(()=>[h(dt,null,{default:v(()=>u[13]||(u[13]=[k(" Logs Dump")])),_:1}),h(yt,null,{default:v(()=>u[14]||(u[14]=[k(" Download a .zip file containing all logs from the server ")])),_:1}),h(yt,null,{default:v(()=>[u[17]||(u[17]=M("br",null,null,-1)),h(se,{color:"primary",onClick:u[3]||(u[3]=c=>o())},{default:v(()=>[h(J,null,{default:v(()=>u[15]||(u[15]=[k("download")])),_:1}),u[16]||(u[16]=k(" Download Log Files (.zip) "))]),_:1})]),_:1})]),_:1}),h(Ve,null,{default:v(()=>[h(dt,null,{default:v(()=>u[18]||(u[18]=[k(" Clear log files")])),_:1}),h(yt,null,{default:v(()=>[u[21]||(u[21]=M("br",null,null,-1)),h(se,{color:"default",onClick:u[4]||(u[4]=c=>a())},{default:v(()=>[h(J,null,{default:v(()=>u[19]||(u[19]=[k("download")])),_:1}),u[20]||(u[20]=k(" Clear log files older than a week "))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}});class Boe extends mr{static async getCompletions(){const t=`${De.printCompletionRoute}`;return await this.get(t)}}const ND=$e({__name:"PrintStatistics",setup(e){const t=U([]),n=U([]),r=U(""),s=Ft(),i=Xi();_t(async()=>{await o()}),ke([()=>r.value],()=>{u()});const o=async()=>{t.value=[],n.value=[],t.value=await Boe.getCompletions(),u()},a=c=>s.printer(c),l=c=>i.floorOfPrinter(c),u=()=>{var p;const c=s.printers.map(g=>g.id),d=c.length?t.value.filter(g=>c.includes(g.printerId)):t.value,f=(p=r.value)!=null&&p.length?d.filter(g=>{const m=s.printers.find(y=>y.id===g.printerId);return m?(m.name+m.printerURL).toLowerCase().includes(r.value.toLowerCase()):!1}):d;n.value=f.sort((g,m)=>g.failureCount===m.failureCount?g.printCount>m.printCount?-1:1:g.failureCount>m.failureCount?-1:1)};return(c,d)=>($(),te(rp,{height:"100%",width:"100%"},{default:v(()=>[h(Vn,null,{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,null,{default:v(()=>[h(J,null,{default:v(()=>d[2]||(d[2]=[k("filter_list")])),_:1}),d[3]||(d[3]=k(" Filter by printer name (optional) "))]),_:1}),h(ze,null,{default:v(()=>[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(dn,null,{default:v(()=>[d[5]||(d[5]=k(" Please reload here if you want updated results: ")),h(se,{color:"primary",size:"x-small",onClick:d[1]||(d[1]=f=>o())},{default:v(()=>d[4]||(d[4]=[k(" Reload ")])),_:1})]),_:1}),h(eb,{dark:""},{default:v(()=>[d[11]||(d[11]=M("thead",null,[M("tr",null,[M("th",{class:"text-left"},"Printer name"),M("th",{class:"text-left"},"Floor"),M("th",{class:"text-left"},"Fail/ Success/ Total"),M("th",{class:"text-left"},"Last success"),M("th",{class:"text-left"},"Last failure"),M("th",{class:"text-left"},"Successes (week/48H/24H)"),M("th",{class:"text-left"},"Failures (week/48H/24H)")])],-1)),M("tbody",null,[($(!0),me(Pe,null,Wt(n.value,f=>{var p,g,m,y;return $(),me("tr",{key:f.printerId},[M("td",null,re(((p=a(f.printerId))==null?void 0:p.name)??"?"),1),M("td",null,re(((g=l(f.printerId))==null?void 0:g.name)??"?"),1),M("td",null,[k(" × "+re(f.failureCount)+" / 🗸 "+re(f.successCount)+" ",1),M("strong",null," ~"+re(f.printCount),1)]),M("td",null,re(Date.now()-((m=f.lastSuccess)==null?void 0:m.createdAt)||"-"),1),M("td",null,[h(nt,{location:"bottom"},IC({default:v(()=>{var w,b,_,T;return[M("span",null,[k(re(((w=f.lastFailure)==null?void 0:w.status)||"-")+" ",1),d[7]||(d[7]=M("br",null,null,-1)),k(" "+re((b=f.lastFailure)==null?void 0:b.createdAt)+" ",1),d[8]||(d[8]=M("br",null,null,-1)),M("small",null,re((_=f.lastFailure)==null?void 0:_.fileName),1),d[9]||(d[9]=M("br",null,null,-1)),M("strong",null,re((T=f.lastFailure)==null?void 0:T.completionLog),1),d[10]||(d[10]=M("br",null,null,-1))])]}),_:2},[(y=f.lastFailure)!=null&&y.status?{name:"activator",fn:v(({props:w})=>[h(J,he({ref_for:!0},w),{default:v(()=>d[6]||(d[6]=[k("info")])),_:2},1040)]),key:"0"}:void 0]),1024)]),M("td",null,re(f.successEventsLastWeek)+" "+re(f.successEventsLast48H)+" "+re(f.successEventsLast24H),1),M("td",null,re(f.failureEventsLastWeek)+" "+re(f.failureEventsLast48H)+" "+re(f.failureEventsLast24H),1)])}),128))])]),_:1})]),_:1}))}}),Voe=$e({name:"PrintStatisticsView",components:{PrintStatistics:ND}});function Uoe(e,t,n,r,s,i){const o=ND;return $(),te(Vn,null,{default:v(()=>[h(o)]),_:1})}const zoe=Go(Voe,[["render",Uoe]]),Hoe=$e({__name:"ExperimentalSettings",setup(e){const t=U(!1),n=U(!1),r=U(!1);async function s(){const l=await Pn.getSettings();t.value=l.server.experimentalMoonrakerSupport,n.value=l.server.experimentalTypeormSupport,r.value=l.server.experimentalClientSupport}_t(async()=>{await s()});const i=async()=>{await Pn.updateExperimentalMoonrakerSupport(t.value),await Pn.updateExperimentalClientSupport(r.value),await s()},o=async()=>{await Pn.updateExperimentalMoonrakerSupport(!1),await Pn.updateExperimentalClientSupport(!1),await s()},a=async()=>{await Pn.updateExperimentalClientSupport(r.value),window.location.reload()};return(l,u)=>($(),te(rt,null,{default:v(()=>[h(ze,{cols:"12"},{default:v(()=>[h(gt,null,{default:v(()=>[h(sn,null,{default:v(()=>u[3]||(u[3]=[M("h2",null,"Settings",-1)])),_:1}),h(en,null,{default:v(()=>[h(rt,null,{default:v(()=>[h(ze,{cols:"12",md:"6"},{default:v(()=>[h(gt,null,{default:v(()=>[h(sn,null,{default:v(()=>[M("h3",null,[u[6]||(u[6]=k(" Experimental Features ")),h(nt,{bottom:""},{activator:v(({props:c})=>[h(J,he({class:"help-icon"},c),{default:v(()=>u[4]||(u[4]=[k("help_outline")])),_:2},1040)]),default:v(()=>[u[5]||(u[5]=M("span",{class:"tooltip-content"}," Moonraker support is currently in beta, use at your own risk. ",-1))]),_:1})])]),_:1}),h(en,null,{default:v(()=>[h(yn,{modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=c=>t.value=c),label:"Enable Experimental Moonraker Support","hide-details":""},{label:v(()=>u[7]||(u[7]=[M("span",null,"Enable Experimental Moonraker Support",-1)])),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(ze,{cols:"12",md:"6"},{default:v(()=>[h(gt,null,{default:v(()=>[h(sn,null,{default:v(()=>[M("h3",null,[u[10]||(u[10]=k(" Database Settings ")),h(nt,{bottom:""},{activator:v(({props:c})=>[h(J,uv(xh(c)),{default:v(()=>u[8]||(u[8]=[k("help_outline")])),_:2},1040)]),default:v(()=>[u[9]||(u[9]=M("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:v(()=>[h(yn,{modelValue:n.value,"onUpdate:modelValue":u[1]||(u[1]=c=>n.value=c),label:"Enable TypeORM Support","hide-details":"",disabled:""},{label:v(()=>u[11]||(u[11]=[M("span",null,"Enable TypeORM Support",-1)])),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(ze,{cols:"12",md:"6"},{default:v(()=>[h(gt,null,{default:v(()=>[h(sn,null,{default:v(()=>[M("h3",null,[u[14]||(u[14]=k(" Experimental Features ")),h(nt,{bottom:""},{activator:v(({props:c})=>[h(J,he({class:"help-icon"},c),{default:v(()=>u[12]||(u[12]=[k("help_outline")])),_:2},1040)]),default:v(()=>[u[13]||(u[13]=M("span",{class:"tooltip-content"}," Enables the next version of the FDM Monster UI (experimental). ",-1))]),_:1})])]),_:1}),h(en,null,{default:v(()=>[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:v(()=>u[15]||(u[15]=[M("span",null,"Enable Next Client Version (Experimental)",-1)])),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),h(Mn,null,{default:v(()=>[h(wn),h(se,{color:"primary",onClick:i},{default:v(()=>u[16]||(u[16]=[k("Save Settings")])),_:1}),h(se,{onClick:o},{default:v(()=>u[17]||(u[17]=[k("Reset to Default")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}}),jn={requiresAuth:!0},iv={requiresAuth:!1},ES=eY({history:R9("/"),routes:[{path:"/",name:qt.Home,meta:jn,component:_Q},{path:"/first-time-setup",name:qt.FirstTimeSetup,meta:iv,component:Fre},{path:"/login",name:qt.Login,meta:iv,component:bre},{path:"/registration",name:qt.Registration,meta:iv,component:_re},{path:"/printers",name:qt.PrintersView,meta:jn,component:LJ},{path:"/cameras",name:qt.CameraGridView,component:xre},{path:"/settings",component:NJ,meta:jn,children:[{path:"",meta:jn,redirect:"/settings/grid"},{path:"account",meta:jn,component:Vre},{path:"server-protection",meta:jn,component:zre},{path:"grid",meta:jn,component:Ure},{path:"floors",meta:jn,component:rZ},{path:"user-management",meta:jn,component:XJ},{path:"octoprint",meta:jn,component:ZJ},{path:"emergency-commands",meta:jn,component:ore},{path:"software-upgrade",meta:jn,component:Foe},{path:"diagnostics",meta:jn,component:Noe},{path:"experimental",meta:jn,component:Hoe}]},{path:"/statistics",name:qt.PrintStatistics,meta:jn,component:zoe},{path:"/about",name:"About",component:aZ},{path:"/permission-denied",name:qt.PermissionDenied,meta:jn,component:pre},{path:"/:pathMatch(.*)*",name:"NotFound",component:lre}]});ES.beforeEach(async(e,t,n)=>{var s,i;const r=as();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 joe={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"},qoe={component:e=>hr(PN,{...e,class:"material-icons"})};function BD(){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=La();return a.run(()=>{const l=sN(r.defaults),u=v2(r.display,r.ssr),c=wN(r.theme),d=IN(r.icons),f=NN(r.locale),p=vG(r.date,f),g=xW(r.goTo,f);function m(w){for(const _ in o)w.directive(_,o[_]);for(const _ in i)w.component(_,i[_]);for(const _ in s)w.component(_,_u({...s[_],name:_,aliasName:s[_].name}));const b=La();if(b.run(()=>{c.install(w)}),w.onUnmount(()=>b.stop()),w.provide(nu,l),w.provide(Nv,u),w.provide(Wc,c),w.provide(Ov,d),w.provide(Mh,f),w.provide(gG,p.options),w.provide(sk,p.instance),w.provide(pA,g),Et&&r.ssr)if(w.$nuxt)w.$nuxt.hook("app:suspense:resolve",()=>{u.update()});else{const{mount:_}=w;w.mount=function(){const T=_(...arguments);return Mt(()=>u.update()),w.mount=_,T}}w.mixin({computed:{$vuetify(){return vn({defaults:vl.call(this,nu),display:vl.call(this,Nv),theme:vl.call(this,Wc),icons:vl.call(this,Ov),locale:vl.call(this,Mh),date:vl.call(this,sk)})}}})}function y(){a.stop()}return{install:m,unmount:y,defaults:l,display:u,theme:c,icons:d,locale:f,date:p,goTo:g}})}const Woe="3.8.1";BD.version=Woe;function vl(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 Goe=BD({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:joe,sets:{md:qoe}}}),Koe=uF();function Yoe(e){e.use(Goe).use(RK).use(Koe)}const xE=(e,t,n)=>{const r=Ft(),s=Zw(),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=vp;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=dQ(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=yM(t,p)}s.queueUploads(d),r.clearSelectedPrinters()}}else e.ondrop=async o=>{o.preventDefault(),e.style.border=vp,i.openInfoMessage({title:"No action performed",subtitle:"Please select one or more printers",warning:!0})}},vp="1px solid #2b2a27",Xoe="background-color 0.5s ease",EE="1px solid red";function Qoe(){return{mounted:(e,t,n)=>{var r;e.style.border=vp,e.style.transition=Xoe,e.ondragenter=s=>{s.preventDefault(),e.style.border=EE},e.ondragover=s=>{s.preventDefault(),e.style.border=EE},e.ondragleave=s=>{s.preventDefault(),e.style.border=vp},xE(e,(r=t.value)==null?void 0:r.printers,n.appContext)},beforeUpdate:(e,t,n)=>{xE(e,t.value,n.appContext)}}}const ov="1px solid #2b2a27",Joe="1px solid gray",CE=(e,t,n)=>{const r=t==null?void 0:t.printerSet,s=Xi();if(r){e.ondrop=null,e.ondragover=null,e.ondragleave=null;return}e.style.border=ov,e.ondrop=async i=>{var d;if(e.style.border=ov,i.preventDefault(),!i.dataTransfer)return;const o=i.dataTransfer.getData("text"),a=JSON.parse(o);if(!tQ(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 ts.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=Joe,i.preventDefault()))},e.ondragleave=i=>{e.style.border=ov,i.preventDefault()}};function Zoe(){return{mounted:(e,t,n)=>{CE(e,t.value,n.appContext)},beforeUpdate:(e,t,n)=>{CE(e,t.value,n.appContext)}}}const Ko=oF(HX);console.log("[DEV: false][PROD: true]","0.0.19");nW({app:Ko,dsn:"https://f64683e8d1cb4ac291434993cff1bf9b@o4503975545733120.ingest.sentry.io/4503975546912768",integrations:[iW({router:ES}),kq()],release:"0.0.19",environment:"production",enabled:!0,tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1});Ko.config.errorHandler=e=>{var t;if(e instanceof NP){console.error(`An error was caught [${e.name}]:
84
+ ${e.message}
85
+ ${(t=e.config)==null?void 0:t.url}
86
+ ${e.stack}`),Dt().openErrorMessage({title:"An error occurred",subtitle:e.message,timeout:5e3});return}else console.error(`An error was caught [${e.name}]:
87
+ ${e.message}
88
+ ${e.stack}`);Dt().openErrorMessage({title:"An error occurred",subtitle:e.message,timeout:5e3}),ai(e)};Ko.directive("drop-upload",Qoe());Ko.directive("drop-printer-position",Zoe());Yoe(Ko);Ko.provide("appConstants",oY());Ko.use(ES);Ko.mount("#app");
89
+ //# sourceMappingURL=index-DSjIJ3yY.js.map