39 lines
252 KiB
JavaScript
39 lines
252 KiB
JavaScript
var Yc=Object.defineProperty;var Gc=(e,t,i)=>t in e?Yc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var K=(e,t,i)=>Gc(e,typeof t!="symbol"?t+"":t,i);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))s(n);new MutationObserver(n=>{for(const o of n)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function i(n){const o={};return n.integrity&&(o.integrity=n.integrity),n.referrerPolicy&&(o.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?o.credentials="include":n.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(n){if(n.ep)return;n.ep=!0;const o=i(n);fetch(n.href,o)}})();/**
|
||
* @vue/shared v3.5.41
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**/function wo(e){const t=Object.create(null);for(const i of e.split(","))t[i]=1;return i=>i in t}const ut={},bi=[],ye=()=>{},Ka=()=>!1,cn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),un=e=>e.startsWith("onUpdate:"),Mt=Object.assign,So=(e,t)=>{const i=e.indexOf(t);i>-1&&e.splice(i,1)},qc=Object.prototype.hasOwnProperty,st=(e,t)=>qc.call(e,t),V=Array.isArray,_i=e=>ps(e)==="[object Map]",Ya=e=>ps(e)==="[object Set]",er=e=>ps(e)==="[object Date]",U=e=>typeof e=="function",gt=e=>typeof e=="string",ve=e=>typeof e=="symbol",ot=e=>e!==null&&typeof e=="object",Ga=e=>(ot(e)||U(e))&&U(e.then)&&U(e.catch),qa=Object.prototype.toString,ps=e=>qa.call(e),Xc=e=>ps(e).slice(8,-1),Xa=e=>ps(e)==="[object Object]",Mo=e=>gt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Vi=wo(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),hn=e=>{const t=Object.create(null);return i=>t[i]||(t[i]=e(i))},Qc=/-\w/g,te=hn(e=>e.replace(Qc,t=>t.slice(1).toUpperCase())),Jc=/\B([A-Z])/g,je=hn(e=>e.replace(Jc,"-$1").toLowerCase()),Qa=hn(e=>e.charAt(0).toUpperCase()+e.slice(1)),On=hn(e=>e?`on${Qa(e)}`:""),_e=(e,t)=>!Object.is(e,t),An=(e,...t)=>{for(let i=0;i<e.length;i++)e[i](...t)},Ja=(e,t,i,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:i})},Zc=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let ir;const fn=()=>ir||(ir=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function dn(e){if(V(e)){const t={};for(let i=0;i<e.length;i++){const s=e[i],n=gt(s)?su(s):dn(s);if(n)for(const o in n)t[o]=n[o]}return t}else if(gt(e)||ot(e))return e}const tu=/;(?![^(]*\))/g,eu=/:([^]+)/,iu=/\/\*[^]*?\*\//g;function su(e){const t={};return e.replace(iu,"").split(tu).forEach(i=>{if(i){const s=i.split(eu);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function ri(e){let t="";if(gt(e))t=e;else if(V(e))for(let i=0;i<e.length;i++){const s=ri(e[i]);s&&(t+=s+" ")}else if(ot(e))for(const i in e)e[i]&&(t+=i+" ");return t.trim()}const nu="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",ou=wo(nu);function Za(e){return!!e||e===""}function ru(e,t){if(e.length!==t.length)return!1;let i=!0;for(let s=0;i&&s<e.length;s++)i=Co(e[s],t[s]);return i}function Co(e,t){if(e===t)return!0;let i=er(e),s=er(t);if(i||s)return i&&s?e.getTime()===t.getTime():!1;if(i=ve(e),s=ve(t),i||s)return e===t;if(i=V(e),s=V(t),i||s)return i&&s?ru(e,t):!1;if(i=ot(e),s=ot(t),i||s){if(!i||!s)return!1;const n=Object.keys(e).length,o=Object.keys(t).length;if(n!==o)return!1;for(const r in e){const a=e.hasOwnProperty(r),l=t.hasOwnProperty(r);if(a&&!l||!a&&l||!Co(e[r],t[r]))return!1}}return String(e)===String(t)}const tl=e=>!!(e&&e.__v_isRef===!0),dt=e=>gt(e)?e:e==null?"":V(e)||ot(e)&&(e.toString===qa||!U(e.toString))?tl(e)?dt(e.value):JSON.stringify(e,el,2):String(e),el=(e,t)=>tl(t)?el(e,t.value):_i(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((i,[s,n],o)=>(i[Dn(s,o)+" =>"]=n,i),{})}:Ya(t)?{[`Set(${t.size})`]:[...t.values()].map(i=>Dn(i))}:ve(t)?Dn(t):ot(t)&&!V(t)&&!Xa(t)?String(t):t,Dn=(e,t="")=>{var i;return ve(e)?`Symbol(${(i=e.description)!=null?i:t})`:e};/**
|
||
* @vue/reactivity v3.5.41
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**/let St;class au{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&St&&(St.active?(this.parent=St,this.index=(St.scopes||(St.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,i;if(this.scopes){const s=this.scopes.slice();for(t=0,i=s.length;t<i;t++)s[t].pause()}for(t=0,i=this.effects.length;t<i;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,i;if(this.scopes){const n=this.scopes.slice();for(t=0,i=n.length;t<i;t++)n[t].resume()}const s=this.effects.slice();for(t=0,i=s.length;t<i;t++)s[t].resume()}}run(t){if(this._active){const i=St;try{return St=this,t()}finally{St=i}}}on(){++this._on===1&&(this.prevScope=St,St=this)}off(){if(this._on>0&&--this._on===0){if(St===this)St=this.prevScope;else{let t=St;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let i,s;for(i=0,s=this.effects.length;i<s;i++)this.effects[i].stop();for(this.effects.length=0,i=0,s=this.cleanups.length;i<s;i++)this.cleanups[i]();if(this.cleanups.length=0,this.scopes){const n=this.scopes.slice();for(i=0,s=n.length;i<s;i++)n[i].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const n=this.parent.scopes.pop();n&&n!==this&&(this.parent.scopes[this.index]=n,n.index=this.index)}this.parent=void 0}}}function lu(){return St}let ct;const En=new WeakSet;class il{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,St&&(St.active?St.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,En.has(this)&&(En.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||nl(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,sr(this),ol(this);const t=ct,i=ee;ct=this,ee=!0;try{return this.fn()}finally{rl(this),ct=t,ee=i,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Po(t);this.deps=this.depsTail=void 0,sr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?En.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Qn(this)&&this.run()}get dirty(){return Qn(this)}}let sl=0,ji,Ui;function nl(e,t=!1){if(e.flags|=8,t){e.next=Ui,Ui=e;return}e.next=ji,ji=e}function To(){sl++}function ko(){if(--sl>0)return;if(Ui){let t=Ui;for(Ui=void 0;t;){const i=t.next;t.next=void 0,t.flags&=-9,t=i}}let e;for(;ji;){let t=ji;for(ji=void 0;t;){const i=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=i}}if(e)throw e}function ol(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function rl(e){let t,i=e.depsTail,s=i;for(;s;){const n=s.prevDep;s.version===-1?(s===i&&(i=n),Po(s),cu(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=n}e.deps=t,e.depsTail=i}function Qn(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(al(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function al(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===is)||(e.globalVersion=is,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Qn(e))))return;e.flags|=2;const t=e.dep,i=ct,s=ee;ct=e,ee=!0;try{ol(e);const n=e.fn(e._value);(t.version===0||_e(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(n){throw t.version++,n}finally{ct=i,ee=s,rl(e),e.flags&=-3}}function Po(e,t=!1){const{dep:i,prevSub:s,nextSub:n}=e;if(s&&(s.nextSub=n,e.prevSub=void 0),n&&(n.prevSub=s,e.nextSub=void 0),i.subs===e&&(i.subs=s,!s&&i.computed)){i.computed.flags&=-5;for(let o=i.computed.deps;o;o=o.nextDep)Po(o,!0)}!t&&!--i.sc&&i.map&&i.map.delete(i.key)}function cu(e){const{prevDep:t,nextDep:i}=e;t&&(t.nextDep=i,e.prevDep=void 0),i&&(i.prevDep=t,e.nextDep=void 0)}let ee=!0;const ll=[];function Ae(){ll.push(ee),ee=!1}function De(){const e=ll.pop();ee=e===void 0?!0:e}function sr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const i=ct;ct=void 0;try{t()}finally{ct=i}}}let is=0;class uu{constructor(t,i){this.sub=t,this.dep=i,this.version=i.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Oo{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!ct||!ee||ct===this.computed)return;let i=this.activeLink;if(i===void 0||i.sub!==ct)i=this.activeLink=new uu(ct,this),ct.deps?(i.prevDep=ct.depsTail,ct.depsTail.nextDep=i,ct.depsTail=i):ct.deps=ct.depsTail=i,cl(i);else if(i.version===-1&&(i.version=this.version,i.nextDep)){const s=i.nextDep;s.prevDep=i.prevDep,i.prevDep&&(i.prevDep.nextDep=s),i.prevDep=ct.depsTail,i.nextDep=void 0,ct.depsTail.nextDep=i,ct.depsTail=i,ct.deps===i&&(ct.deps=s)}return i}trigger(t){this.version++,is++,this.notify(t)}notify(t){To();try{for(let i=this.subs;i;i=i.prevSub)i.sub.notify()&&i.sub.dep.notify()}finally{ko()}}}function cl(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)cl(s)}const i=e.dep.subs;i!==e&&(e.prevSub=i,i&&(i.nextSub=e)),e.dep.subs=e}}const Jn=new WeakMap,ii=Symbol(""),Zn=Symbol(""),ss=Symbol("");function kt(e,t,i){if(ee&&ct){let s=Jn.get(e);s||Jn.set(e,s=new Map);let n=s.get(i);n||(s.set(i,n=new Oo),n.map=s,n.key=i),n.track()}}function Oe(e,t,i,s,n,o){const r=Jn.get(e);if(!r){is++;return}const a=l=>{l&&l.trigger()};if(To(),t==="clear")r.forEach(a);else{const l=V(e),c=l&&Mo(i);if(l&&i==="length"){const u=Number(s);r.forEach((h,f)=>{(f==="length"||f===ss||!ve(f)&&f>=u)&&a(h)})}else switch((i!==void 0||r.has(void 0))&&a(r.get(i)),c&&a(r.get(ss)),t){case"add":l?c&&a(r.get("length")):(a(r.get(ii)),_i(e)&&a(r.get(Zn)));break;case"delete":l||(a(r.get(ii)),_i(e)&&a(r.get(Zn)));break;case"set":_i(e)&&a(r.get(ii));break}}ko()}function hi(e){const t=tt(e);return t===e?t:(kt(t,"iterate",ss),Xt(e)?t:t.map(se))}function gn(e){return kt(e=tt(e),"iterate",ss),e}function pe(e,t){return Ee(e)?wi(si(e)?se(t):t):se(t)}const hu={__proto__:null,[Symbol.iterator](){return In(this,Symbol.iterator,e=>pe(this,e))},concat(...e){return hi(this).concat(...e.map(t=>V(t)?hi(t):t))},entries(){return In(this,"entries",e=>(e[1]=pe(this,e[1]),e))},every(e,t){return we(this,"every",e,t,void 0,arguments)},filter(e,t){return we(this,"filter",e,t,i=>i.map(s=>pe(this,s)),arguments)},find(e,t){return we(this,"find",e,t,i=>pe(this,i),arguments)},findIndex(e,t){return we(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return we(this,"findLast",e,t,i=>pe(this,i),arguments)},findLastIndex(e,t){return we(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return we(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ln(this,"includes",e)},indexOf(...e){return Ln(this,"indexOf",e)},join(e){return hi(this).join(e)},lastIndexOf(...e){return Ln(this,"lastIndexOf",e)},map(e,t){return we(this,"map",e,t,void 0,arguments)},pop(){return Di(this,"pop")},push(...e){return Di(this,"push",e)},reduce(e,...t){return nr(this,"reduce",e,t)},reduceRight(e,...t){return nr(this,"reduceRight",e,t)},shift(){return Di(this,"shift")},some(e,t){return we(this,"some",e,t,void 0,arguments)},splice(...e){return Di(this,"splice",e)},toReversed(){return hi(this).toReversed()},toSorted(e){return hi(this).toSorted(e)},toSpliced(...e){return hi(this).toSpliced(...e)},unshift(...e){return Di(this,"unshift",e)},values(){return In(this,"values",e=>pe(this,e))}};function In(e,t,i){const s=gn(e),n=s[t]();return s!==e&&!Xt(e)&&(n._next=n.next,n.next=()=>{const o=n._next();return o.done||(o.value=i(o.value)),o}),n}const fu=Array.prototype;function we(e,t,i,s,n,o){const r=gn(e),a=r!==e&&!Xt(e),l=r[t];if(l!==fu[t]){const h=l.apply(e,o);return a?se(h):h}let c=i;r!==e&&(a?c=function(h,f){return i.call(this,pe(e,h),f,e)}:i.length>2&&(c=function(h,f){return i.call(this,h,f,e)}));const u=l.call(r,c,s);return a&&n?n(u):u}function nr(e,t,i,s){const n=gn(e),o=n!==e&&!Xt(e);let r=i,a=!1;n!==e&&(o?(a=s.length===0,r=function(c,u,h){return a&&(a=!1,c=pe(e,c)),i.call(this,c,pe(e,u),h,e)}):i.length>3&&(r=function(c,u,h){return i.call(this,c,u,h,e)}));const l=n[t](r,...s);return a?pe(e,l):l}function Ln(e,t,i){const s=tt(e);kt(s,"iterate",ss);const n=s[t](...i);return(n===-1||n===!1)&&ms(i[0])?(i[0]=tt(i[0]),s[t](...i)):n}function Di(e,t,i=[]){Ae(),To();const s=tt(e)[t].apply(e,i);return ko(),De(),s}const du=wo("__proto__,__v_isRef,__isVue"),ul=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ve));function gu(e){ve(e)||(e=String(e));const t=tt(this);return kt(t,"has",e),t.hasOwnProperty(e)}class hl{constructor(t=!1,i=!1){this._isReadonly=t,this._isShallow=i}get(t,i,s){if(i==="__v_skip")return t.__v_skip;const n=this._isReadonly,o=this._isShallow;if(i==="__v_isReactive")return!n;if(i==="__v_isReadonly")return n;if(i==="__v_isShallow")return o;if(i==="__v_raw")return s===(n?o?Mu:pl:o?gl:dl).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const r=V(t);if(!n){let l;if(r&&(l=hu[i]))return l;if(i==="hasOwnProperty")return gu}const a=Reflect.get(t,i,Ot(t)?t:s);if((ve(i)?ul.has(i):du(i))||(n||kt(t,"get",i),o))return a;if(Ot(a)){const l=r&&Mo(i)?a:a.value;return n&&ot(l)?eo(l):l}return ot(a)?n?eo(a):Do(a):a}}class fl extends hl{constructor(t=!1){super(!1,t)}set(t,i,s,n){let o=t[i];const r=V(t)&&Mo(i);if(!this._isShallow){const c=Ee(o);if(!Xt(s)&&!Ee(s)&&(o=tt(o),s=tt(s)),!r&&Ot(o)&&!Ot(s))return c||(o.value=s),!0}const a=r?Number(i)<t.length:st(t,i),l=Reflect.set(t,i,s,Ot(t)?t:n);return t===tt(n)&&l&&(a?_e(s,o)&&Oe(t,"set",i,s):Oe(t,"add",i,s)),l}deleteProperty(t,i){const s=st(t,i);t[i];const n=Reflect.deleteProperty(t,i);return n&&s&&Oe(t,"delete",i,void 0),n}has(t,i){const s=Reflect.has(t,i);return(!ve(i)||!ul.has(i))&&kt(t,"has",i),s}ownKeys(t){return kt(t,"iterate",V(t)?"length":ii),Reflect.ownKeys(t)}}class pu extends hl{constructor(t=!1){super(!0,t)}set(t,i){return!0}deleteProperty(t,i){return!0}}const mu=new fl,bu=new pu,_u=new fl(!0);const to=e=>e,ws=e=>Reflect.getPrototypeOf(e);function xu(e,t,i){return function(...s){const n=this.__v_raw,o=tt(n),r=_i(o),a=e==="entries"||e===Symbol.iterator&&r,l=e==="keys"&&r,c=n[e](...s),u=i?to:t?wi:se;return!t&&kt(o,"iterate",l?Zn:ii),Mt(Object.create(c),{next(){const{value:h,done:f}=c.next();return f?{value:h,done:f}:{value:a?[u(h[0]),u(h[1])]:u(h),done:f}}})}}function Ss(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function yu(e,t){const i={get(n){const o=this.__v_raw,r=tt(o),a=tt(n);e||(_e(n,a)&&kt(r,"get",n),kt(r,"get",a));const{has:l}=ws(r),c=t?to:e?wi:se;if(l.call(r,n))return c(o.get(n));if(l.call(r,a))return c(o.get(a));o!==r&&o.get(n)},get size(){const n=this.__v_raw;return!e&&kt(tt(n),"iterate",ii),n.size},has(n){const o=this.__v_raw,r=tt(o),a=tt(n);return e||(_e(n,a)&&kt(r,"has",n),kt(r,"has",a)),n===a?o.has(n):o.has(n)||o.has(a)},forEach(n,o){const r=this,a=r.__v_raw,l=tt(a),c=t?to:e?wi:se;return!e&&kt(l,"iterate",ii),a.forEach((u,h)=>n.call(o,c(u),c(h),r))}};return Mt(i,e?{add:Ss("add"),set:Ss("set"),delete:Ss("delete"),clear:Ss("clear")}:{add(n){const o=tt(this),r=ws(o),a=tt(n),l=!t&&!Xt(n)&&!Ee(n)?a:n;return r.has.call(o,l)||_e(n,l)&&r.has.call(o,n)||_e(a,l)&&r.has.call(o,a)||(o.add(l),Oe(o,"add",l,l)),this},set(n,o){!t&&!Xt(o)&&!Ee(o)&&(o=tt(o));const r=tt(this),{has:a,get:l}=ws(r);let c=a.call(r,n);c||(n=tt(n),c=a.call(r,n));const u=l.call(r,n);return r.set(n,o),c?_e(o,u)&&Oe(r,"set",n,o):Oe(r,"add",n,o),this},delete(n){const o=tt(this),{has:r,get:a}=ws(o);let l=r.call(o,n);l||(n=tt(n),l=r.call(o,n)),a&&a.call(o,n);const c=o.delete(n);return l&&Oe(o,"delete",n,void 0),c},clear(){const n=tt(this),o=n.size!==0,r=n.clear();return o&&Oe(n,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(n=>{i[n]=xu(n,e,t)}),i}function Ao(e,t){const i=yu(e,t);return(s,n,o)=>n==="__v_isReactive"?!e:n==="__v_isReadonly"?e:n==="__v_raw"?s:Reflect.get(st(i,n)&&n in s?i:s,n,o)}const vu={get:Ao(!1,!1)},wu={get:Ao(!1,!0)},Su={get:Ao(!0,!1)};const dl=new WeakMap,gl=new WeakMap,pl=new WeakMap,Mu=new WeakMap;function Cu(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Do(e){return Ee(e)?e:Eo(e,!1,mu,vu,dl)}function Tu(e){return Eo(e,!1,_u,wu,gl)}function eo(e){return Eo(e,!0,bu,Su,pl)}function Eo(e,t,i,s,n){if(!ot(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const o=n.get(e);if(o)return o;const r=Cu(Xc(e));if(r===0)return e;const a=new Proxy(e,r===2?s:i);return n.set(e,a),a}function si(e){return Ee(e)?si(e.__v_raw):!!(e&&e.__v_isReactive)}function Ee(e){return!!(e&&e.__v_isReadonly)}function Xt(e){return!!(e&&e.__v_isShallow)}function ms(e){return e?!!e.__v_raw:!1}function tt(e){const t=e&&e.__v_raw;return t?tt(t):e}function ku(e){return!st(e,"__v_skip")&&Object.isExtensible(e)&&Ja(e,"__v_skip",!0),e}const se=e=>ot(e)?Do(e):e,wi=e=>ot(e)?eo(e):e;function Ot(e){return e?e.__v_isRef===!0:!1}function Kt(e){return ml(e,!1)}function io(e){return ml(e,!0)}function ml(e,t){return Ot(e)?e:new Pu(e,t)}class Pu{constructor(t,i){this.dep=new Oo,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=i?t:tt(t),this._value=i?t:se(t),this.__v_isShallow=i}get value(){return this.dep.track(),this._value}set value(t){const i=this._rawValue,s=this.__v_isShallow||Xt(t)||Ee(t);t=s?t:tt(t),_e(t,i)&&(this._rawValue=t,this._value=s?t:se(t),this.dep.trigger())}}function bl(e){return Ot(e)?e.value:e}const Ou={get:(e,t,i)=>t==="__v_raw"?e:bl(Reflect.get(e,t,i)),set:(e,t,i,s)=>{const n=e[t];return Ot(n)&&!Ot(i)?(n.value=i,!0):Reflect.set(e,t,i,s)}};function _l(e){return si(e)?e:new Proxy(e,Ou)}class Au{constructor(t,i,s){this.fn=t,this.setter=i,this._value=void 0,this.dep=new Oo(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=is-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!i,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&ct!==this)return nl(this,!0),!0}get value(){const t=this.dep.track();return al(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Du(e,t,i=!1){let s,n;return U(e)?s=e:(s=e.get,n=e.set),new Au(s,n,i)}const Ms={},Ks=new WeakMap;let Qe;function Eu(e,t=!1,i=Qe){if(i){let s=Ks.get(i);s||Ks.set(i,s=[]),s.push(e)}}function Iu(e,t,i=ut){const{immediate:s,deep:n,once:o,scheduler:r,augmentJob:a,call:l}=i,c=w=>n?w:Xt(w)||n===!1||n===0?Be(w,1):Be(w);let u,h,f,d,_=!1,p=!1;if(Ot(e)?(h=()=>e.value,_=Xt(e)):si(e)?(h=()=>c(e),_=!0):V(e)?(p=!0,_=e.some(w=>si(w)||Xt(w)),h=()=>e.map(w=>{if(Ot(w))return w.value;if(si(w))return c(w);if(U(w))return l?l(w,2):w()})):U(e)?t?h=l?()=>l(e,2):e:h=()=>{if(f){Ae();try{f()}finally{De()}}const w=Qe;Qe=u;try{return l?l(e,3,[d]):e(d)}finally{Qe=w}}:h=ye,t&&n){const w=h,v=n===!0?1/0:n;h=()=>Be(w(),v)}const m=lu(),x=()=>{u.stop(),m&&m.active&&So(m.effects,u)};if(o&&t){const w=t;t=(...v)=>{const D=w(...v);return x(),D}}let M=p?new Array(e.length).fill(Ms):Ms;const C=w=>{if(!(!(u.flags&1)||!u.dirty&&!w))if(t){const v=u.run();if(w||n||_||(p?v.some((D,E)=>_e(D,M[E])):_e(v,M))){f&&f();const D=Qe;Qe=u;try{const E=[v,M===Ms?void 0:p&&M[0]===Ms?[]:M,d];M=v,l?l(t,3,E):t(...E)}finally{Qe=D}}}else u.run()};return a&&a(C),u=new il(h),u.scheduler=r?()=>r(C,!1):C,d=w=>Eu(w,!1,u),f=u.onStop=()=>{const w=Ks.get(u);if(w){if(l)l(w,4);else for(const v of w)v();Ks.delete(u)}},t?s?C(!0):M=u.run():r?r(C.bind(null,!0),!0):u.run(),x.pause=u.pause.bind(u),x.resume=u.resume.bind(u),x.stop=x,x}function Be(e,t=1/0,i){if(t<=0||!ot(e)||e.__v_skip||(i=i||new Map,(i.get(e)||0)>=t))return e;if(i.set(e,t),t--,Ot(e))Be(e.value,t,i);else if(V(e))for(let s=0;s<e.length;s++)Be(e[s],t,i);else if(Ya(e)||_i(e))e.forEach(s=>{Be(s,t,i)});else if(Xa(e)){for(const s in e)Be(e[s],t,i);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Be(e[s],t,i)}return e}/**
|
||
* @vue/runtime-core v3.5.41
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**/function bs(e,t,i,s){try{return s?e(...s):e()}catch(n){pn(n,t,i)}}function ne(e,t,i,s){if(U(e)){const n=bs(e,t,i,s);return n&&Ga(n)&&n.catch(o=>{pn(o,t,i)}),n}if(V(e)){const n=[];for(let o=0;o<e.length;o++)n.push(ne(e[o],t,i,s));return n}}function pn(e,t,i,s=!0){const n=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||ut;if(t){let a=t.parent;const l=t.proxy,c=`https://vuejs.org/error-reference/#runtime-${i}`;for(;a;){const u=a.ec;if(u){for(let h=0;h<u.length;h++)if(u[h](e,l,c)===!1)return}a=a.parent}if(o){Ae(),bs(o,null,10,[e,l,c]),De();return}}Lu(e,i,n,s,r)}function Lu(e,t,i,s=!0,n=!1){if(n)throw e;console.error(e)}const Lt=[];let fe=-1;const xi=[];let He=null,gi=0;const xl=Promise.resolve();let Ys=null;function yl(e){const t=Ys||xl;return e?t.then(this?e.bind(this):e):t}function Ru(e){let t=fe+1,i=Lt.length;for(;t<i;){const s=t+i>>>1,n=Lt[s],o=ns(n);o<e||o===e&&n.flags&2?t=s+1:i=s}return t}function Io(e){if(!(e.flags&1)){const t=ns(e),i=Lt[Lt.length-1];!i||!(e.flags&2)&&t>=ns(i)?Lt.push(e):Lt.splice(Ru(t),0,e),e.flags|=1,vl()}}function vl(){Ys||(Ys=xl.then(Sl))}function Fu(e){if(!V(e))He&&e.id===-1?He.splice(gi+1,0,e):e.flags&1||(xi.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)xi.push(e[t]);vl()}function or(e,t,i=fe+1){for(;i<Lt.length;i++){const s=Lt[i];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;Lt.splice(i,1),i--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function wl(e){if(xi.length){const t=[...new Set(xi)].sort((i,s)=>ns(i)-ns(s));if(xi.length=0,He){for(let i=0;i<t.length;i++)He.push(t[i]);return}for(He=t,gi=0;gi<He.length;gi++){const i=He[gi];i.flags&4&&(i.flags&=-2),i.flags&8||i(),i.flags&=-2}He=null,gi=0}}const ns=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Sl(e){try{for(fe=0;fe<Lt.length;fe++){const t=Lt[fe];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),bs(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;fe<Lt.length;fe++){const t=Lt[fe];t&&(t.flags&=-2)}fe=-1,Lt.length=0,wl(),Ys=null,(Lt.length||xi.length)&&Sl()}}let xe=null,Ml=null;function Gs(e){const t=xe;return xe=e,Ml=e&&e.type.__scopeId||null,t}function Hu(e,t=xe,i){if(!t||e._n)return e;const s=(...n)=>{s._d&&Qs(-1);const o=Gs(t),r=ni.length;let a;try{a=e(...n)}finally{for(let l=ni.length;l>r;l--)Yl();Gs(o),s._d&&Qs(1)}return a};return s._n=!0,s._c=!0,s._d=!0,s}function Ke(e,t,i,s){const n=e.dirs,o=t&&t.dirs;for(let r=0;r<n.length;r++){const a=n[r];o&&(a.oldValue=o[r].value);let l=a.dir[s];l&&(Ae(),ne(l,i,8,[e.el,a,e,t]),De())}}function Bu(e,t){if(Rt){let i=Rt.provides;const s=Rt.parent&&Rt.parent.provides;s===i&&(i=Rt.provides=Object.create(s)),i[e]=t}}function Ns(e,t,i=!1){const s=Rh();if(s||yi){let n=yi?yi._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(n&&e in n)return n[e];if(arguments.length>1)return i&&U(t)?t.call(s&&s.proxy):t}}const Nu=Symbol.for("v-scx"),zu=()=>Ns(Nu);function Ki(e,t,i){return Cl(e,t,i)}function Cl(e,t,i=ut){const{immediate:s,deep:n,flush:o,once:r}=i,a=Mt({},i),l=t&&s||!t&&o!=="post";let c;if(as){if(o==="sync"){const d=zu();c=d.__watcherHandles||(d.__watcherHandles=[])}else if(!l){const d=()=>{};return d.stop=ye,d.resume=ye,d.pause=ye,d}}const u=Rt;a.call=(d,_,p)=>ne(d,u,_,p);let h=!1;o==="post"?a.scheduler=d=>{Nt(d,u&&u.suspense)}:o!=="sync"&&(h=!0,a.scheduler=(d,_)=>{_?d():Io(d)}),a.augmentJob=d=>{t&&(d.flags|=4),h&&(d.flags|=2,u&&(d.id=u.uid,d.i=u))};const f=Iu(e,t,a);return as&&(c?c.push(f):l&&f()),f}function Wu(e,t,i){const s=this.proxy,n=gt(e)?e.includes(".")?Tl(s,e):()=>s[e]:e.bind(s,s);let o;U(t)?o=t:(o=t.handler,i=t);const r=ys(this),a=Cl(n,o.bind(s),i);return r(),a}function Tl(e,t){const i=t.split(".");return()=>{let s=e;for(let n=0;n<i.length&&s;n++)s=s[i[n]];return s}}const $u=Symbol("_vte"),mn=e=>e.__isTeleport,Rn=Symbol("_leaveCb");function Vu(e){let t=e[0];if(e.length>1){for(const i of e)if(i.type!==Ie){t=i;break}}return t}function kl(e){if(!Ro(e))return mn(e.type)&&e.children?Vu(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:i}=e;if(i){if(t&16)return i[0];if(t&32&&U(i.default))return i.default()}}function Lo(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const i=e.component.subTree;Lo(mn(i.type)&&kl(i)||i,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ki(e,t){return U(e)?Mt({name:e.name},t,{setup:e}):e}function Pl(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function rr(e,t){let i;return!!((i=Object.getOwnPropertyDescriptor(e,t))&&!i.configurable)}const qs=new WeakMap;function Yi(e,t,i,s,n=!1){if(V(e)){e.forEach((p,m)=>Yi(p,t&&(V(t)?t[m]:t),i,s,n));return}if(Gi(s)&&!n){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Yi(e,t,i,s.component.subTree);return}const o=s.shapeFlag&4?Bo(s.component):s.el,r=n?null:o,{i:a,r:l}=e,c=t&&t.r,u=a.refs===ut?a.refs={}:a.refs,h=a.setupState,f=tt(h),d=h===ut?Ka:p=>rr(u,p)?!1:st(f,p),_=(p,m)=>!(m&&rr(u,m));if(c!=null&&c!==l){if(ar(t),gt(c))u[c]=null,d(c)&&(h[c]=null);else if(Ot(c)){const p=t;_(c,p.k)&&(c.value=null),p.k&&(u[p.k]=null)}}if(U(l))bs(l,a,12,[r,u]);else{const p=gt(l),m=Ot(l);if(p||m){const x=()=>{if(e.f){const M=p?d(l)?h[l]:u[l]:_()||!e.k?l.value:u[e.k];if(n)V(M)&&So(M,o);else if(V(M))M.includes(o)||M.push(o);else if(p)u[l]=[o],d(l)&&(h[l]=u[l]);else{const C=[o];_(l,e.k)&&(l.value=C),e.k&&(u[e.k]=C)}}else p?(u[l]=r,d(l)&&(h[l]=r)):m&&(_(l,e.k)&&(l.value=r),e.k&&(u[e.k]=r))};if(r){const M=()=>{x(),qs.delete(e)};M.id=-1,qs.set(e,M),Nt(M,i)}else ar(e),x()}}}function ar(e){const t=qs.get(e);t&&(t.flags|=8,qs.delete(e))}fn().requestIdleCallback;fn().cancelIdleCallback;const Gi=e=>!!e.type.__asyncLoader,Ro=e=>e.type.__isKeepAlive;function ju(e,t){Ol(e,"a",t)}function Uu(e,t){Ol(e,"da",t)}function Ol(e,t,i=Rt){const s=e.__wdc||(e.__wdc=()=>{let n=i;for(;n;){if(n.isDeactivated)return;n=n.parent}return e()});if(bn(t,s,i),i){let n=i.parent;for(;n&&n.parent;)Ro(n.parent.vnode)&&Ku(s,t,i,n),n=n.parent}}function Ku(e,t,i,s){const n=bn(t,e,s,!0);xs(()=>{So(s[t],n)},i)}function bn(e,t,i=Rt,s=!1){if(i){const n=i[e]||(i[e]=[]),o=t.__weh||(t.__weh=(...r)=>{Ae();const a=ys(i),l=ne(t,i,e,r);return a(),De(),l});return s?n.unshift(o):n.push(o),o}}const Le=e=>(t,i=Rt)=>{(!as||e==="sp")&&bn(e,(...s)=>t(...s),i)},Yu=Le("bm"),_s=Le("m"),Gu=Le("bu"),qu=Le("u"),Xu=Le("bum"),xs=Le("um"),Qu=Le("sp"),Ju=Le("rtg"),Zu=Le("rtc");function th(e,t=Rt){bn("ec",e,t)}const eh=Symbol.for("v-ndc");function ih(e,t,i,s){let n;const o=i,r=V(e);if(r||gt(e)){const a=r&&si(e);let l=!1,c=!1;a&&(l=!Xt(e),c=Ee(e),e=gn(e)),n=new Array(e.length);for(let u=0,h=e.length;u<h;u++)n[u]=t(l?c?wi(se(e[u])):se(e[u]):e[u],u,void 0,o)}else if(typeof e=="number"){n=new Array(e);for(let a=0;a<e;a++)n[a]=t(a+1,a,void 0,o)}else if(ot(e))if(e[Symbol.iterator])n=Array.from(e,(a,l)=>t(a,l,void 0,o));else{const a=Object.keys(e);n=new Array(a.length);for(let l=0,c=a.length;l<c;l++){const u=a[l];n[l]=t(e[u],u,l,o)}}else n=[];return n}const so=e=>e?Ql(e)?Bo(e):so(e.parent):null,qi=Mt(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=>so(e.parent),$root:e=>so(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Dl(e),$forceUpdate:e=>e.f||(e.f=()=>{Io(e.update)}),$nextTick:e=>e.n||(e.n=yl.bind(e.proxy)),$watch:e=>Wu.bind(e)}),Fn=(e,t)=>e!==ut&&!e.__isScriptSetup&&st(e,t),sh={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:i,setupState:s,data:n,props:o,accessCache:r,type:a,appContext:l}=e;if(t[0]!=="$"){const f=r[t];if(f!==void 0)switch(f){case 1:return s[t];case 2:return n[t];case 4:return i[t];case 3:return o[t]}else{if(Fn(s,t))return r[t]=1,s[t];if(n!==ut&&st(n,t))return r[t]=2,n[t];if(st(o,t))return r[t]=3,o[t];if(i!==ut&&st(i,t))return r[t]=4,i[t];no&&(r[t]=0)}}const c=qi[t];let u,h;if(c)return t==="$attrs"&&kt(e.attrs,"get",""),c(e);if((u=a.__cssModules)&&(u=u[t]))return u;if(i!==ut&&st(i,t))return r[t]=4,i[t];if(h=l.config.globalProperties,st(h,t))return h[t]},set({_:e},t,i){const{data:s,setupState:n,ctx:o}=e;return Fn(n,t)?(n[t]=i,!0):s!==ut&&st(s,t)?(s[t]=i,!0):st(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=i,!0)},has({_:{data:e,setupState:t,accessCache:i,ctx:s,appContext:n,props:o,type:r}},a){let l;return!!(i[a]||e!==ut&&a[0]!=="$"&&st(e,a)||Fn(t,a)||st(o,a)||st(s,a)||st(qi,a)||st(n.config.globalProperties,a)||(l=r.__cssModules)&&l[a])},defineProperty(e,t,i){return i.get!=null?e._.accessCache[t]=0:st(i,"value")&&this.set(e,t,i.value,null),Reflect.defineProperty(e,t,i)}};function lr(e){return V(e)?e.reduce((t,i)=>(t[i]=null,t),{}):e}let no=!0;function nh(e){const t=Dl(e),i=e.proxy,s=e.ctx;no=!1,t.beforeCreate&&cr(t.beforeCreate,e,"bc");const{data:n,computed:o,methods:r,watch:a,provide:l,inject:c,created:u,beforeMount:h,mounted:f,beforeUpdate:d,updated:_,activated:p,deactivated:m,beforeDestroy:x,beforeUnmount:M,destroyed:C,unmounted:w,render:v,renderTracked:D,renderTriggered:E,errorCaptured:L,serverPrefetch:N,expose:j,inheritAttrs:H,components:B,directives:lt,filters:et}=t;if(c&&oh(c,s,null),r)for(const Y in r){const Q=r[Y];U(Q)&&(s[Y]=Q.bind(i))}if(n){const Y=n.call(i,i);ot(Y)&&(e.data=Do(Y))}if(no=!0,o)for(const Y in o){const Q=o[Y],Dt=U(Q)?Q.bind(i,i):U(Q.get)?Q.get.bind(i,i):ye,Ft=!U(Q)&&U(Q.set)?Q.set.bind(i):ye,Et=$t({get:Dt,set:Ft});Object.defineProperty(s,Y,{enumerable:!0,configurable:!0,get:()=>Et.value,set:mt=>Et.value=mt})}if(a)for(const Y in a)Al(a[Y],s,i,Y);if(l){const Y=U(l)?l.call(i):l;Reflect.ownKeys(Y).forEach(Q=>{Bu(Q,Y[Q])})}u&&cr(u,e,"c");function G(Y,Q){V(Q)?Q.forEach(Dt=>Y(Dt.bind(i))):Q&&Y(Q.bind(i))}if(G(Yu,h),G(_s,f),G(Gu,d),G(qu,_),G(ju,p),G(Uu,m),G(th,L),G(Zu,D),G(Ju,E),G(Xu,M),G(xs,w),G(Qu,N),V(j))if(j.length){const Y=e.exposed||(e.exposed={});j.forEach(Q=>{Object.defineProperty(Y,Q,{get:()=>i[Q],set:Dt=>i[Q]=Dt,enumerable:!0})})}else e.exposed||(e.exposed={});v&&e.render===ye&&(e.render=v),H!=null&&(e.inheritAttrs=H),B&&(e.components=B),lt&&(e.directives=lt),N&&Pl(e)}function oh(e,t,i=ye){V(e)&&(e=oo(e));for(const s in e){const n=e[s];let o;ot(n)?"default"in n?o=Ns(n.from||s,n.default,!0):o=Ns(n.from||s):o=Ns(n),Ot(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):t[s]=o}}function cr(e,t,i){ne(V(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,i)}function Al(e,t,i,s){let n=s.includes(".")?Tl(i,s):()=>i[s];if(gt(e)){const o=t[e];U(o)&&Ki(n,o)}else if(U(e))Ki(n,e.bind(i));else if(ot(e))if(V(e))e.forEach(o=>Al(o,t,i,s));else{const o=U(e.handler)?e.handler.bind(i):t[e.handler];U(o)&&Ki(n,o,e)}}function Dl(e){const t=e.type,{mixins:i,extends:s}=t,{mixins:n,optionsCache:o,config:{optionMergeStrategies:r}}=e.appContext,a=o.get(t);let l;return a?l=a:!n.length&&!i&&!s?l=t:(l={},n.length&&n.forEach(c=>Xs(l,c,r,!0)),Xs(l,t,r)),ot(t)&&o.set(t,l),l}function Xs(e,t,i,s=!1){const{mixins:n,extends:o}=t;o&&Xs(e,o,i,!0),n&&n.forEach(r=>Xs(e,r,i,!0));for(const r in t)if(!(s&&r==="expose")){const a=rh[r]||i&&i[r];e[r]=a?a(e[r],t[r]):t[r]}return e}const rh={data:ur,props:hr,emits:hr,methods:Bi,computed:Bi,beforeCreate:It,created:It,beforeMount:It,mounted:It,beforeUpdate:It,updated:It,beforeDestroy:It,beforeUnmount:It,destroyed:It,unmounted:It,activated:It,deactivated:It,errorCaptured:It,serverPrefetch:It,components:Bi,directives:Bi,watch:lh,provide:ur,inject:ah};function ur(e,t){return t?e?function(){return Mt(U(e)?e.call(this,this):e,U(t)?t.call(this,this):t)}:t:e}function ah(e,t){return Bi(oo(e),oo(t))}function oo(e){if(V(e)){const t={};for(let i=0;i<e.length;i++)t[e[i]]=e[i];return t}return e}function It(e,t){return e?[...new Set([].concat(e,t))]:t}function Bi(e,t){return e?Mt(Object.create(null),e,t):t}function hr(e,t){return e?V(e)&&V(t)?[...new Set([...e,...t])]:Mt(Object.create(null),lr(e),lr(t??{})):t}function lh(e,t){if(!e)return t;if(!t)return e;const i=Mt(Object.create(null),e);for(const s in t)i[s]=It(e[s],t[s]);return i}function El(){return{app:null,config:{isNativeTag:Ka,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 ch=0;function uh(e,t){return function(s,n=null){U(s)||(s=Mt({},s)),n!=null&&!ot(n)&&(n=null);const o=El(),r=new WeakSet,a=[];let l=!1;const c=o.app={_uid:ch++,_component:s,_props:n,_container:null,_context:o,_instance:null,version:Zl,get config(){return o.config},set config(u){},use(u,...h){return r.has(u)||(u&&U(u.install)?(r.add(u),u.install(c,...h)):U(u)&&(r.add(u),u(c,...h))),c},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),c},component(u,h){return h?(o.components[u]=h,c):o.components[u]},directive(u,h){return h?(o.directives[u]=h,c):o.directives[u]},mount(u,h,f){if(!l){const d=c._ceVNode||it(s,n);return d.appContext=o,f===!0?f="svg":f===!1&&(f=void 0),e(d,u,f),l=!0,c._container=u,u.__vue_app__=c,Bo(d.component)}},onUnmount(u){a.push(u)},unmount(){l&&(ne(a,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,h){return o.provides[u]=h,c},runWithContext(u){const h=yi;yi=c;try{return u()}finally{yi=h}}};return c}}let yi=null;const hh=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${te(t)}Modifiers`]||e[`${je(t)}Modifiers`];function fh(e,t,...i){if(e.isUnmounted)return;const s=e.vnode.props||ut;let n=i;const o=t.startsWith("update:"),r=o&&hh(s,t.slice(7));r&&(r.trim&&(n=i.map(u=>gt(u)?u.trim():u)),r.number&&(n=i.map(Zc)));let a,l=s[a=On(t)]||s[a=On(te(t))];!l&&o&&(l=s[a=On(je(t))]),l&&ne(l,e,6,n);const c=s[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,ne(c,e,6,n)}}const dh=new WeakMap;function Il(e,t,i=!1){const s=i?dh:t.emitsCache,n=s.get(e);if(n!==void 0)return n;const o=e.emits;let r={},a=!1;if(!U(e)){const l=c=>{const u=Il(c,t,!0);u&&(a=!0,Mt(r,u))};!i&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!a?(ot(e)&&s.set(e,null),null):(V(o)?o.forEach(l=>r[l]=null):Mt(r,o),ot(e)&&s.set(e,r),r)}function _n(e,t){return!e||!cn(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),st(e,t[0].toLowerCase()+t.slice(1))||st(e,je(t))||st(e,t))}function fr(e){const{type:t,vnode:i,proxy:s,withProxy:n,propsOptions:[o],slots:r,attrs:a,emit:l,render:c,renderCache:u,props:h,data:f,setupState:d,ctx:_,inheritAttrs:p}=e,m=Gs(e);let x,M;try{if(i.shapeFlag&4){const w=n||s,v=w;x=be(c.call(v,w,u,h,d,f,_)),M=a}else{const w=t;x=be(w.length>1?w(h,{attrs:a,slots:r,emit:l}):w(h,null)),M=t.props?a:gh(a)}}catch(w){ni.length=0,pn(w,e,1),x=it(Ie)}let C=x;if(M&&p!==!1){const w=Object.keys(M),{shapeFlag:v}=C;w.length&&v&7&&(o&&w.some(un)&&(M=ph(M,o)),C=Si(C,M,!1,!0))}if(i.dirs&&(C=Si(C,null,!1,!0),C.dirs=C.dirs?C.dirs.concat(i.dirs):i.dirs),i.transition){const w=mn(C.type)&&kl(C)||C;Lo(w,i.transition)}return x=C,Gs(m),x}const gh=e=>{let t;for(const i in e)(i==="class"||i==="style"||cn(i))&&((t||(t={}))[i]=e[i]);return t},ph=(e,t)=>{const i={};for(const s in e)(!un(s)||!(s.slice(9)in t))&&(i[s]=e[s]);return i};function mh(e,t,i){const{props:s,children:n,component:o}=e,{props:r,children:a,patchFlag:l}=t,c=o.emitsOptions;if(t.dirs||t.transition)return!0;if(i&&l>=0){if(l&1024)return!0;if(l&16)return s?dr(s,r,c):!!r;if(l&8){const u=t.dynamicProps;for(let h=0;h<u.length;h++){const f=u[h];if(Ll(r,s,f)&&!_n(c,f))return!0}}}else return(n||a)&&(!a||!a.$stable)?!0:s===r?!1:s?r?dr(s,r,c):!0:!!r;return!1}function dr(e,t,i){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let n=0;n<s.length;n++){const o=s[n];if(Ll(t,e,o)&&!_n(i,o))return!0}return!1}function Ll(e,t,i){const s=e[i],n=t[i];return i==="style"&&ot(s)&&ot(n)?!Co(s,n):s!==n}function bh({vnode:e,parent:t,suspense:i},s){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.suspense.vnode.el=n.el=s,e=n),n===e)(e=t.vnode).el=s,t=t.parent;else break}i&&i.activeBranch===e&&(i.vnode.el=s)}const Rl={},Fl=()=>Object.create(Rl),Hl=e=>Object.getPrototypeOf(e)===Rl;function _h(e,t,i,s=!1){const n={},o=Fl();e.propsDefaults=Object.create(null),Bl(e,t,n,o);for(const r in e.propsOptions[0])r in n||(n[r]=void 0);i?e.props=s?n:Tu(n):e.type.props?e.props=n:e.props=o,e.attrs=o}function xh(e,t,i,s){const{props:n,attrs:o,vnode:{patchFlag:r}}=e,a=tt(n),[l]=e.propsOptions;let c=!1;if((s||r>0)&&!(r&16)){if(r&8){const u=e.vnode.dynamicProps;for(let h=0;h<u.length;h++){let f=u[h];if(_n(e.emitsOptions,f))continue;const d=t[f];if(l)if(st(o,f))d!==o[f]&&(o[f]=d,c=!0);else{const _=te(f);n[_]=ro(l,a,_,d,e,!1)}else d!==o[f]&&(o[f]=d,c=!0)}}}else{Bl(e,t,n,o)&&(c=!0);let u;for(const h in a)(!t||!st(t,h)&&((u=je(h))===h||!st(t,u)))&&(l?i&&(i[h]!==void 0||i[u]!==void 0)&&(n[h]=ro(l,a,h,void 0,e,!0)):delete n[h]);if(o!==a)for(const h in o)(!t||!st(t,h))&&(delete o[h],c=!0)}c&&Oe(e.attrs,"set","")}function Bl(e,t,i,s){const[n,o]=e.propsOptions;let r=!1,a;if(t)for(let l in t){if(Vi(l))continue;const c=t[l];let u;n&&st(n,u=te(l))?!o||!o.includes(u)?i[u]=c:(a||(a={}))[u]=c:_n(e.emitsOptions,l)||(!(l in s)||c!==s[l])&&(s[l]=c,r=!0)}if(o){const l=tt(i),c=a||ut;for(let u=0;u<o.length;u++){const h=o[u];i[h]=ro(n,l,h,c[h],e,!st(c,h))}}return r}function ro(e,t,i,s,n,o){const r=e[i];if(r!=null){const a=st(r,"default");if(a&&s===void 0){const l=r.default;if(r.type!==Function&&!r.skipFactory&&U(l)){const{propsDefaults:c}=n;if(i in c)s=c[i];else{const u=ys(n);s=c[i]=l.call(null,t),u()}}else s=l;n.ce&&n.ce._setProp(i,s)}r[0]&&(o&&!a?s=!1:r[1]&&(s===""||s===je(i))&&(s=!0))}return s}const yh=new WeakMap;function Nl(e,t,i=!1){const s=i?yh:t.propsCache,n=s.get(e);if(n)return n;const o=e.props,r={},a=[];let l=!1;if(!U(e)){const u=h=>{l=!0;const[f,d]=Nl(h,t,!0);Mt(r,f),d&&a.push(...d)};!i&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!l)return ot(e)&&s.set(e,bi),bi;if(V(o))for(let u=0;u<o.length;u++){const h=te(o[u]);gr(h)&&(r[h]=ut)}else if(o)for(const u in o){const h=te(u);if(gr(h)){const f=o[u],d=r[h]=V(f)||U(f)?{type:f}:Mt({},f),_=d.type;let p=!1,m=!0;if(V(_))for(let x=0;x<_.length;++x){const M=_[x],C=U(M)&&M.name;if(C==="Boolean"){p=!0;break}else C==="String"&&(m=!1)}else p=U(_)&&_.name==="Boolean";d[0]=p,d[1]=m,(p||st(d,"default"))&&a.push(h)}}const c=[r,a];return ot(e)&&s.set(e,c),c}function gr(e){return e[0]!=="$"&&!Vi(e)}const Fo=e=>e==="_"||e==="_ctx"||e==="$stable",Ho=e=>V(e)?e.map(be):[be(e)],vh=(e,t,i)=>{if(t._n)return t;const s=Hu((...n)=>Ho(t(...n)),i);return s._c=!1,s},zl=(e,t,i)=>{const s=e._ctx;for(const n in e){if(Fo(n))continue;const o=e[n];if(U(o))t[n]=vh(n,o,s);else if(o!=null){const r=Ho(o);t[n]=()=>r}}},Wl=(e,t)=>{const i=Ho(t);e.slots.default=()=>i},$l=(e,t,i)=>{for(const s in t)(i||!Fo(s))&&(e[s]=t[s])},wh=(e,t,i)=>{const s=e.slots=Fl();if(e.vnode.shapeFlag&32){const n=t._;n?($l(s,t,i),i&&Ja(s,"_",n,!0)):zl(t,s)}else t&&Wl(e,t)},Sh=(e,t,i)=>{const{vnode:s,slots:n}=e;let o=!0,r=ut;if(s.shapeFlag&32){const a=t._;a?i&&a===1?o=!1:$l(n,t,i):(o=!t.$stable,zl(t,n)),r=t}else t&&(Wl(e,t),r={default:1});if(o)for(const a in n)!Fo(a)&&r[a]==null&&delete n[a]},Nt=Ph;function Mh(e){return Ch(e)}function Ch(e,t){const i=fn();i.__VUE__=!0;const{insert:s,remove:n,patchProp:o,createElement:r,createText:a,createComment:l,setText:c,setElementText:u,parentNode:h,nextSibling:f,setScopeId:d=ye,insertStaticContent:_}=e,p=(g,b,y,O=null,P=null,T=null,R=void 0,I=null,A=!!b.dynamicChildren)=>{if(g===b)return;g&&!Ei(g,b)&&(O=Ue(g),mt(g,P,T,!0),g=null),b.patchFlag===-2&&(A=!1,b.dynamicChildren=null);const{type:k,ref:W,shapeFlag:F}=b;switch(k){case xn:m(g,b,y,O);break;case Ie:x(g,b,y,O);break;case zs:g==null&&M(b,y,O,R);break;case me:B(g,b,y,O,P,T,R,I,A);break;default:F&1?v(g,b,y,O,P,T,R,I,A):F&6?lt(g,b,y,O,P,T,R,I,A):(F&64||F&128)&&k.process(g,b,y,O,P,T,R,I,A,Re)}W!=null&&P?Yi(W,g&&g.ref,T,b||g,!b):W==null&&g&&g.ref!=null&&Yi(g.ref,null,T,g,!0)},m=(g,b,y,O)=>{if(g==null)s(b.el=a(b.children),y,O);else{const P=b.el=g.el;b.children!==g.children&&c(P,b.children)}},x=(g,b,y,O)=>{g==null?s(b.el=l(b.children||""),y,O):b.el=g.el},M=(g,b,y,O)=>{[g.el,g.anchor]=_(g.children,b,y,O,g.el,g.anchor)},C=({el:g,anchor:b},y,O)=>{let P;for(;g&&g!==b;)P=f(g),s(g,y,O),g=P;s(b,y,O)},w=({el:g,anchor:b})=>{let y;for(;g&&g!==b;)y=f(g),n(g),g=y;n(b)},v=(g,b,y,O,P,T,R,I,A)=>{if(b.type==="svg"?R="svg":b.type==="math"&&(R="mathml"),g==null)D(b,y,O,P,T,R,I,A);else{const k=g.el&&g.el._isVueCE?g.el:null;try{k&&k._beginPatch(),N(g,b,P,T,R,I,A)}finally{k&&k._endPatch()}}},D=(g,b,y,O,P,T,R,I)=>{let A,k;const{props:W,shapeFlag:F,transition:z,dirs:$}=g;if(A=g.el=r(g.type,T,W&&W.is,W),F&8?u(A,g.children):F&16&&L(g.children,A,null,O,P,Hn(g,T),R,I),$&&Ke(g,null,O,"created"),E(A,g,g.scopeId,R,O),W){for(const at in W)at!=="value"&&!Vi(at)&&o(A,at,null,W[at],T,O);"value"in W&&o(A,"value",null,W.value,T),(k=W.onVnodeBeforeMount)&&ce(k,O,g)}$&&Ke(g,null,O,"beforeMount");const Z=Th(P,z);Z&&z.beforeEnter(A),s(A,b,y),((k=W&&W.onVnodeMounted)||Z||$)&&Nt(()=>{try{k&&ce(k,O,g),Z&&z.enter(A),$&&Ke(g,null,O,"mounted")}finally{}},P)},E=(g,b,y,O,P)=>{if(y&&d(g,y),O)for(let T=0;T<O.length;T++)d(g,O[T]);if(P){let T=P.subTree;if(b===T||Kl(T.type)&&(T.ssContent===b||T.ssFallback===b)){const R=P.vnode;E(g,R,R.scopeId,R.slotScopeIds,P.parent)}}},L=(g,b,y,O,P,T,R,I,A=0)=>{for(let k=A;k<g.length;k++){const W=g[k]=I?ke(g[k]):be(g[k]);p(null,W,b,y,O,P,T,R,I)}},N=(g,b,y,O,P,T,R)=>{const I=b.el=g.el;let{patchFlag:A,dynamicChildren:k,dirs:W}=b;A|=g.patchFlag&16;const F=g.props||ut,z=b.props||ut;let $;if(y&&Ye(y,!1),($=z.onVnodeBeforeUpdate)&&ce($,y,b,g),W&&Ke(b,g,y,"beforeUpdate"),y&&Ye(y,!0),k&&(!g.dynamicChildren||g.dynamicChildren.length!==k.length)&&(A=0,R=!1,k=null),(F.innerHTML&&z.innerHTML==null||F.textContent&&z.textContent==null)&&u(I,""),k?j(g.dynamicChildren,k,I,y,O,Hn(b,P),T):R||Q(g,b,I,null,y,O,Hn(b,P),T,!1),A>0){if(A&16)H(I,F,z,y,P);else if(A&2&&F.class!==z.class&&o(I,"class",null,z.class,P),A&4&&o(I,"style",F.style,z.style,P),A&8){const Z=b.dynamicProps;for(let at=0;at<Z.length;at++){const rt=Z[at],bt=F[rt],wt=z[rt];(wt!==bt||rt==="value")&&o(I,rt,bt,wt,P,y)}}A&1&&g.children!==b.children&&u(I,b.children)}else!R&&k==null&&H(I,F,z,y,P);(($=z.onVnodeUpdated)||W)&&Nt(()=>{$&&ce($,y,b,g),W&&Ke(b,g,y,"updated")},O)},j=(g,b,y,O,P,T,R)=>{for(let I=0;I<b.length;I++){const A=g[I],k=b[I],W=A.el&&(A.type===me||!Ei(A,k)||A.shapeFlag&198)?h(A.el):y;p(A,k,W,null,O,P,T,R,!0)}},H=(g,b,y,O,P)=>{if(b!==y){if(b!==ut)for(const T in b)!Vi(T)&&!(T in y)&&o(g,T,b[T],null,P,O);for(const T in y){if(Vi(T))continue;const R=y[T],I=b[T];R!==I&&T!=="value"&&o(g,T,I,R,P,O)}"value"in y&&o(g,"value",b.value,y.value,P)}},B=(g,b,y,O,P,T,R,I,A)=>{const k=b.el=g?g.el:a(""),W=b.anchor=g?g.anchor:a("");let{patchFlag:F,dynamicChildren:z,slotScopeIds:$}=b;$&&(I=I?I.concat($):$),g==null?(s(k,y,O),s(W,y,O),L(b.children||[],y,W,P,T,R,I,A)):F>0&&F&64&&z&&g.dynamicChildren&&g.dynamicChildren.length===z.length?(j(g.dynamicChildren,z,y,P,T,R,I),(b.key!=null||P&&b===P.subTree)&&Vl(g,b,!0)):Q(g,b,y,W,P,T,R,I,A)},lt=(g,b,y,O,P,T,R,I,A)=>{b.slotScopeIds=I,g==null?b.shapeFlag&512?P.ctx.activate(b,y,O,R,A):et(b,y,O,P,T,R,A):q(g,b,A)},et=(g,b,y,O,P,T,R)=>{const I=g.component=Lh(g,O,P);if(Ro(g)&&(I.ctx.renderer=Re),Fh(I,!1,R),I.asyncDep){if(P&&P.registerDep(I,G,R),!g.el){const A=I.subTree=it(Ie);x(null,A,b,y),g.placeholder=A.el}}else G(I,g,b,y,P,T,R)},q=(g,b,y)=>{const O=b.component=g.component;if(mh(g,b,y))if(O.asyncDep&&!O.asyncResolved){Y(O,b,y);return}else O.next=b,O.update();else b.el=g.el,O.vnode=b},G=(g,b,y,O,P,T,R)=>{const I=()=>{if(g.isMounted){let{next:F,bu:z,u:$,parent:Z,vnode:at}=g;{const ae=jl(g);if(ae){F&&(F.el=at.el,Y(g,F,R)),ae.asyncDep.then(()=>{Nt(()=>{g.isUnmounted||k()},P)});return}}let rt=F,bt;Ye(g,!1),F?(F.el=at.el,Y(g,F,R)):F=at,z&&An(z),(bt=F.props&&F.props.onVnodeBeforeUpdate)&&ce(bt,Z,F,at),Ye(g,!0);const wt=fr(g),re=g.subTree;g.subTree=wt,p(re,wt,h(re.el),Ue(re),g,P,T),F.el=wt.el,rt===null&&bh(g,wt.el),$&&Nt($,P),(bt=F.props&&F.props.onVnodeUpdated)&&Nt(()=>ce(bt,Z,F,at),P)}else{let F;const{el:z,props:$}=b,{bm:Z,m:at,parent:rt,root:bt,type:wt}=g,re=Gi(b);Ye(g,!1),Z&&An(Z),!re&&(F=$&&$.onVnodeBeforeMount)&&ce(F,rt,b),Ye(g,!0);{bt.ce&&bt.ce._hasShadowRoot()&&bt.ce._injectChildStyle(wt,g.parent?g.parent.type:void 0);const ae=g.subTree=fr(g);p(null,ae,y,O,g,P,T),b.el=ae.el}if(at&&Nt(at,P),!re&&(F=$&&$.onVnodeMounted)){const ae=b;Nt(()=>ce(F,rt,ae),P)}(b.shapeFlag&256||rt&&Gi(rt.vnode)&&rt.vnode.shapeFlag&256)&&g.a&&Nt(g.a,P),g.isMounted=!0,b=y=O=null}};g.scope.on();const A=g.effect=new il(I);g.scope.off();const k=g.update=A.run.bind(A),W=g.job=A.runIfDirty.bind(A);W.i=g,W.id=g.uid,A.scheduler=()=>Io(W),Ye(g,!0),k()},Y=(g,b,y)=>{b.component=g;const O=g.vnode.props;g.vnode=b,g.next=null,xh(g,b.props,O,y),Sh(g,b.children,y),Ae(),or(g),De()},Q=(g,b,y,O,P,T,R,I,A=!1)=>{const k=g&&g.children,W=g?g.shapeFlag:0,F=b.children,{patchFlag:z,shapeFlag:$}=b;if(z>0){if(z&128){Ft(k,F,y,O,P,T,R,I,A);return}else if(z&256){Dt(k,F,y,O,P,T,R,I,A);return}}$&8?(W&16&&Ct(k,P,T),F!==k&&u(y,F)):W&16?$&16?Ft(k,F,y,O,P,T,R,I,A):Ct(k,P,T,!0):(W&8&&u(y,""),$&16&&L(F,y,O,P,T,R,I,A))},Dt=(g,b,y,O,P,T,R,I,A)=>{g=g||bi,b=b||bi;const k=g.length,W=b.length,F=Math.min(k,W);let z;for(z=0;z<F;z++){const $=b[z]=A?ke(b[z]):be(b[z]);p(g[z],$,y,null,P,T,R,I,A)}k>W?Ct(g,P,T,!0,!1,F):L(b,y,O,P,T,R,I,A,F)},Ft=(g,b,y,O,P,T,R,I,A)=>{let k=0;const W=b.length;let F=g.length-1,z=W-1;for(;k<=F&&k<=z;){const $=g[k],Z=b[k]=A?ke(b[k]):be(b[k]);if(Ei($,Z))p($,Z,y,null,P,T,R,I,A);else break;k++}for(;k<=F&&k<=z;){const $=g[F],Z=b[z]=A?ke(b[z]):be(b[z]);if(Ei($,Z))p($,Z,y,null,P,T,R,I,A);else break;F--,z--}if(k>F){if(k<=z){const $=z+1,Z=$<W?b[$].el:O;for(;k<=z;)p(null,b[k]=A?ke(b[k]):be(b[k]),y,Z,P,T,R,I,A),k++}}else if(k>z)for(;k<=F;)mt(g[k],P,T,!0),k++;else{const $=k,Z=k,at=new Map;for(k=Z;k<=z;k++){const Wt=b[k]=A?ke(b[k]):be(b[k]);Wt.key!=null&&at.set(Wt.key,k)}let rt,bt=0;const wt=z-Z+1;let re=!1,ae=0;const Ai=new Array(wt);for(k=0;k<wt;k++)Ai[k]=0;for(k=$;k<=F;k++){const Wt=g[k];if(bt>=wt){mt(Wt,P,T,!0);continue}let le;if(Wt.key!=null)le=at.get(Wt.key);else for(rt=Z;rt<=z;rt++)if(Ai[rt-Z]===0&&Ei(Wt,b[rt])){le=rt;break}le===void 0?mt(Wt,P,T,!0):(Ai[le-Z]=k+1,le>=ae?ae=le:re=!0,p(Wt,b[le],y,null,P,T,R,I,A),bt++)}const Jo=re?kh(Ai):bi;for(rt=Jo.length-1,k=wt-1;k>=0;k--){const Wt=Z+k,le=b[Wt],Zo=b[Wt+1],tr=Wt+1<W?Zo.el||Ul(Zo):O;Ai[k]===0?p(null,le,y,tr,P,T,R,I,A):re&&(rt<0||k!==Jo[rt]?Et(le,y,tr,2):rt--)}}},Et=(g,b,y,O,P=null)=>{const{el:T,type:R,transition:I,children:A,shapeFlag:k}=g;if(k&6){Et(g.component.subTree,b,y,O);return}if(k&128){g.suspense.move(b,y,O);return}if(k&64){R.move(g,b,y,Re);return}if(R===me){s(T,b,y);for(let F=0;F<A.length;F++)Et(A[F],b,y,O);s(g.anchor,b,y);return}if(R===zs){C(g,b,y);return}if(O!==2&&k&1&&I)if(O===0)I.persisted&&!T[Rn]?s(T,b,y):(I.beforeEnter(T),s(T,b,y),Nt(()=>I.enter(T),P));else{const{leave:F,delayLeave:z,afterLeave:$}=I,Z=()=>{g.ctx.isUnmounted?n(T):s(T,b,y)},at=()=>{const rt=T._isLeaving||!!T[Rn];T._isLeaving&&T[Rn](!0),I.persisted&&!rt?Z():F(T,()=>{Z(),$&&$()})};z?z(T,Z,at):at()}else s(T,b,y)},mt=(g,b,y,O=!1,P=!1)=>{const{type:T,props:R,ref:I,children:A,dynamicChildren:k,shapeFlag:W,patchFlag:F,dirs:z,cacheIndex:$,memo:Z}=g;if(F===-2&&(P=!1),I!=null&&(Ae(),Yi(I,null,y,g,!0),De()),$!=null&&(b.renderCache[$]=void 0),W&256){b.ctx.deactivate(g);return}const at=W&1&&z,rt=!Gi(g);let bt;if(rt&&(bt=R&&R.onVnodeBeforeUnmount)&&ce(bt,b,g),W&6)oe(g.component,y,O);else{if(W&128){g.suspense.unmount(y,O);return}at&&Ke(g,null,b,"beforeUnmount"),W&64?g.type.remove(g,b,y,Re,O):k&&!k.hasOnce&&(T!==me||F>0&&F&64)?Ct(k,b,y,!1,!0):(T===me&&F&384||!P&&W&16)&&Ct(A,b,y),O&&Jt(g)}const wt=Z!=null&&$==null;(rt&&(bt=R&&R.onVnodeUnmounted)||at||wt)&&Nt(()=>{bt&&ce(bt,b,g),at&&Ke(g,null,b,"unmounted"),wt&&(g.el=null)},y)},Jt=g=>{const{type:b,el:y,anchor:O,transition:P}=g;if(b===me){jt(y,O);return}if(b===zs){w(g);return}const T=()=>{n(y),P&&!P.persisted&&P.afterLeave&&P.afterLeave()};if(g.shapeFlag&1&&P&&!P.persisted){const{leave:R,delayLeave:I}=P,A=()=>R(y,T);I?I(g.el,T,A):A()}else T()},jt=(g,b)=>{let y;for(;g!==b;)y=f(g),n(g),g=y;n(b)},oe=(g,b,y)=>{const{bum:O,scope:P,job:T,subTree:R,um:I,m:A,a:k}=g;pr(A),pr(k),O&&An(O),P.stop(),T&&(T.flags|=8,mt(R,g,b,y)),I&&Nt(I,b),Nt(()=>{g.isUnmounted=!0},b)},Ct=(g,b,y,O=!1,P=!1,T=0)=>{for(let R=T;R<g.length;R++)mt(g[R],b,y,O,P)},Ue=g=>{if(g.shapeFlag&6)return Ue(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const b=f(g.anchor||g.el),y=b&&b[$u];return y?f(y):b};let ui=!1;const Oi=(g,b,y)=>{let O;g==null?b._vnode&&(mt(b._vnode,null,null,!0),O=b._vnode.component):p(b._vnode||null,g,b,null,null,null,y),b._vnode=g,ui||(ui=!0,or(O),wl(),ui=!1)},Re={p,um:mt,m:Et,r:Jt,mt:et,mc:L,pc:Q,pbc:j,n:Ue,o:e};return{render:Oi,hydrate:void 0,createApp:uh(Oi)}}function Hn({type:e,props:t},i){return i==="svg"&&e==="foreignObject"||i==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:i}function Ye({effect:e,job:t},i){i?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Th(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Vl(e,t,i=!1){const s=e.children,n=t.children;if(V(s)&&V(n))for(let o=0;o<s.length;o++){const r=s[o];let a=n[o];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=n[o]=ke(n[o]),a.el=r.el),!i&&a.patchFlag!==-2&&Vl(r,a)),a.type===xn&&(a.patchFlag===-1&&(a=n[o]=ke(a)),a.el=r.el),a.type===Ie&&!a.el&&(a.el=r.el)}}function kh(e){const t=e.slice(),i=[0];let s,n,o,r,a;const l=e.length;for(s=0;s<l;s++){const c=e[s];if(c!==0){if(n=i[i.length-1],e[n]<c){t[s]=n,i.push(s);continue}for(o=0,r=i.length-1;o<r;)a=o+r>>1,e[i[a]]<c?o=a+1:r=a;c<e[i[o]]&&(o>0&&(t[s]=i[o-1]),i[o]=s)}}for(o=i.length,r=i[o-1];o-- >0;)i[o]=r,r=t[r];return i}function jl(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:jl(t)}function pr(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Ul(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Ul(t.subTree):null}const Kl=e=>e.__isSuspense;function Ph(e,t){t&&t.pendingBranch?V(e)?t.effects.push(...e):t.effects.push(e):Fu(e)}const me=Symbol.for("v-fgt"),xn=Symbol.for("v-txt"),Ie=Symbol.for("v-cmt"),zs=Symbol.for("v-stc"),ni=[];let Vt=null;function _t(e=!1){ni.push(Vt=e?null:[])}function Yl(){ni.pop(),Vt=ni[ni.length-1]||null}let os=1;function Qs(e,t=!1){os+=e,e<0&&Vt&&t&&(Vt.hasOnce=!0)}function Gl(e){return e.dynamicChildren=os>0?Vt||bi:null,Yl(),os>0&&Vt&&Vt.push(e),e}function yt(e,t,i,s,n,o){return Gl(S(e,t,i,s,n,o,!0))}function ql(e,t,i,s,n){return Gl(it(e,t,i,s,n,!0))}function Js(e){return e?e.__v_isVNode===!0:!1}function Ei(e,t){return e.type===t.type&&e.key===t.key}const Xl=({key:e})=>e??null,Ws=({ref:e,ref_key:t,ref_for:i})=>(typeof e=="number"&&(e=""+e),e!=null?gt(e)||Ot(e)||U(e)?{i:xe,r:e,k:t,f:!!i}:e:null);function S(e,t=null,i=null,s=0,n=null,o=e===me?0:1,r=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Xl(t),ref:t&&Ws(t),scopeId:Ml,slotScopeIds:null,children:i,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:n,dynamicChildren:null,appContext:null,ctx:xe};return a?(Zs(l,i),o&128&&e.normalize(l)):i&&(l.shapeFlag|=gt(i)?8:16),os>0&&!r&&Vt&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&Vt.push(l),l}const it=Oh;function Oh(e,t=null,i=null,s=0,n=null,o=!1){if((!e||e===eh)&&(e=Ie),Js(e)){const a=Si(e,t,!0);return i&&Zs(a,i),os>0&&!o&&Vt&&(a.shapeFlag&6?Vt[Vt.indexOf(e)]=a:Vt.push(a)),a.patchFlag=-2,a}if(zh(e)&&(e=e.__vccOpts),t){t=Ah(t);let{class:a,style:l}=t;a&&!gt(a)&&(t.class=ri(a)),ot(l)&&(ms(l)&&!V(l)&&(l=Mt({},l)),t.style=dn(l))}const r=gt(e)?1:Kl(e)?128:mn(e)?64:ot(e)?4:U(e)?2:0;return S(e,t,i,s,n,r,o,!0)}function Ah(e){return e?ms(e)||Hl(e)?Mt({},e):e:null}function Si(e,t,i=!1,s=!1){const{props:n,ref:o,patchFlag:r,children:a,transition:l}=e,c=t?Dh(n||{},t):n,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&Xl(c),ref:t&&t.ref?i&&o?V(o)?o.concat(Ws(t)):[o,Ws(t)]:Ws(t):o,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!==me?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Si(e.ssContent),ssFallback:e.ssFallback&&Si(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&s&&Lo(u,l.clone(u)),u}function pi(e=" ",t=0){return it(xn,null,e,t)}function mr(e,t){const i=it(zs,null,e);return i.staticCount=t,i}function Yt(e="",t=!1){return t?(_t(),ql(Ie,null,e)):it(Ie,null,e)}function be(e){return e==null||typeof e=="boolean"?it(Ie):V(e)?it(me,null,e.slice()):Js(e)?ke(e):it(xn,null,String(e))}function ke(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Si(e)}function Zs(e,t){let i=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(V(t))i=16;else if(typeof t=="object")if(s&65){const n=t.default;n&&(n._c&&(n._d=!1),Zs(e,n()),n._c&&(n._d=!0));return}else{i=32;const n=t._;!n&&!Hl(t)?t._ctx=xe:n===3&&xe&&(xe.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(U(t)){if(s&65){Zs(e,{default:t});return}t={default:t,_ctx:xe},i=32}else t=String(t),s&64?(i=16,t=[pi(t)]):i=8;e.children=t,e.shapeFlag|=i}function Dh(...e){const t={};for(let i=0;i<e.length;i++){const s=e[i];for(const n in s)if(n==="class")t.class!==s.class&&(t.class=ri([t.class,s.class]));else if(n==="style")t.style=dn([t.style,s.style]);else if(cn(n)){const o=t[n],r=s[n];r&&o!==r&&!(V(o)&&o.includes(r))?t[n]=o?[].concat(o,r):r:r==null&&o==null&&!un(n)&&(t[n]=r)}else n!==""&&(t[n]=s[n])}return t}function ce(e,t,i,s=null){ne(e,t,7,[i,s])}const Eh=El();let Ih=0;function Lh(e,t,i){const s=e.type,n=(t?t.appContext:e.appContext)||Eh,o={uid:Ih++,vnode:e,type:s,parent:t,appContext:n,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new au(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(n.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Nl(s,n),emitsOptions:Il(s,n),emit:null,emitted:null,propsDefaults:ut,inheritAttrs:s.inheritAttrs,ctx:ut,data:ut,props:ut,attrs:ut,slots:ut,refs:ut,setupState:ut,setupContext:null,suspense:i,suspenseId:i?i.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 o.ctx={_:o},o.root=t?t.root:o,o.emit=fh.bind(null,o),e.ce&&e.ce(o),o}let Rt=null;const Rh=()=>Rt||xe;let tn,rs;{const e=fn(),t=(i,s)=>{let n;return(n=e[i])||(n=e[i]=[]),n.push(s),o=>{n.length>1?n.forEach(r=>r(o)):n[0](o)}};tn=t("__VUE_INSTANCE_SETTERS__",i=>Rt=i),rs=t("__VUE_SSR_SETTERS__",i=>as=i)}const ys=e=>{const t=Rt;return tn(e),e.scope.on(),()=>{e.scope.off(),tn(t)}},br=()=>{Rt&&Rt.scope.off(),tn(null)};function Ql(e){return e.vnode.shapeFlag&4}let as=!1;function Fh(e,t=!1,i=!1){t&&rs(t);const{props:s,children:n}=e.vnode,o=Ql(e);_h(e,s,o,t),wh(e,n,i||t);const r=o?Hh(e,t):void 0;return t&&rs(!1),r}function Hh(e,t){const i=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,sh);const{setup:s}=i;if(s){Ae();const n=e.setupContext=s.length>1?Nh(e):null,o=ys(e),r=bs(s,e,0,[e.props,n]),a=Ga(r);if(De(),o(),(a||e.sp)&&!Gi(e)&&Pl(e),a){if(r.then(br,br),t)return r.then(l=>{rs(!0);try{_r(e,l,t)}finally{rs(!1)}}).catch(l=>{pn(l,e,0)});e.asyncDep=r}else _r(e,r)}else Jl(e)}function _r(e,t,i){U(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ot(t)&&(e.setupState=_l(t)),Jl(e)}function Jl(e,t,i){const s=e.type;e.render||(e.render=s.render||ye);{const n=ys(e);Ae();try{nh(e)}finally{De(),n()}}}const Bh={get(e,t){return kt(e,"get",""),e[t]}};function Nh(e){const t=i=>{e.exposed=i||{}};return{attrs:new Proxy(e.attrs,Bh),slots:e.slots,emit:e.emit,expose:t}}function Bo(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(_l(ku(e.exposed)),{get(t,i){if(i in t)return t[i];if(i in qi)return qi[i](e)},has(t,i){return i in t||i in qi}})):e.proxy}function zh(e){return U(e)&&"__vccOpts"in e}const $t=(e,t)=>Du(e,t,as);function ao(e,t,i){try{Qs(-1);const s=arguments.length;return s===2?ot(t)&&!V(t)?Js(t)?it(e,null,[t]):it(e,t):it(e,null,t):(s>3?i=Array.prototype.slice.call(arguments,2):s===3&&Js(i)&&(i=[i]),it(e,t,i))}finally{Qs(1)}}const Zl="3.5.41";/**
|
||
* @vue/runtime-dom v3.5.41
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**/let lo;const xr=typeof window<"u"&&window.trustedTypes;if(xr)try{lo=xr.createPolicy("vue",{createHTML:e=>e})}catch{}const tc=lo?e=>lo.createHTML(e):e=>e,Wh="http://www.w3.org/2000/svg",$h="http://www.w3.org/1998/Math/MathML",Te=typeof document<"u"?document:null,yr=Te&&Te.createElement("template"),Vh={insert:(e,t,i)=>{t.insertBefore(e,i||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,i,s)=>{const n=t==="svg"?Te.createElementNS(Wh,e):t==="mathml"?Te.createElementNS($h,e):i?Te.createElement(e,{is:i}):Te.createElement(e);return e==="select"&&s&&s.multiple!=null&&n.setAttribute("multiple",s.multiple),n},createText:e=>Te.createTextNode(e),createComment:e=>Te.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Te.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,i,s,n,o){const r=i?i.previousSibling:t.lastChild;if(n&&(n===o||n.nextSibling))for(;t.insertBefore(n.cloneNode(!0),i),!(n===o||!(n=n.nextSibling)););else{yr.innerHTML=tc(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const a=yr.content;if(s==="svg"||s==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,i)}return[r?r.nextSibling:t.firstChild,i?i.previousSibling:t.lastChild]}},jh=Symbol("_vtc");function Uh(e,t,i){const s=e[jh];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):i?e.setAttribute("class",t):e.className=t}const vr=Symbol("_vod"),Kh=Symbol("_vsh"),Yh=Symbol(""),Gh=/(?:^|;)\s*display\s*:/;function qh(e,t,i){const s=e.style,n=gt(i);let o=!1;if(i&&!n){if(t)if(gt(t))for(const r of t.split(";")){const a=r.slice(0,r.indexOf(":")).trim();i[a]==null&&Ni(s,a,"")}else for(const r in t)i[r]==null&&Ni(s,r,"");for(const r in i){r==="display"&&(o=!0);const a=i[r];a!=null?Qh(e,r,!gt(t)&&t?t[r]:void 0,a)||Ni(s,r,a):Ni(s,r,"")}}else if(n){if(t!==i){const r=s[Yh];r&&(i+=";"+r),s.cssText=i,o=Gh.test(i)}}else t&&e.removeAttribute("style");vr in e&&(e[vr]=o?s.display:"",e[Kh]&&(s.display="none"))}const wr=/\s*!important$/;function Ni(e,t,i){if(V(i))i.forEach(s=>Ni(e,t,s));else if(i==null&&(i=""),t.startsWith("--"))e.setProperty(t,i);else{const s=Xh(e,t);wr.test(i)?e.setProperty(je(s),i.replace(wr,""),"important"):e[s]=i}}const Sr=["Webkit","Moz","ms"],Bn={};function Xh(e,t){const i=Bn[t];if(i)return i;let s=te(t);if(s!=="filter"&&s in e)return Bn[t]=s;s=Qa(s);for(let n=0;n<Sr.length;n++){const o=Sr[n]+s;if(o in e)return Bn[t]=o}return t}function Qh(e,t,i,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&>(s)&&i===s}const Mr="http://www.w3.org/1999/xlink";function Cr(e,t,i,s,n,o=ou(t)){s&&t.startsWith("xlink:")?i==null?e.removeAttributeNS(Mr,t.slice(6,t.length)):e.setAttributeNS(Mr,t,i):i==null||o&&!Za(i)?e.removeAttribute(t):e.setAttribute(t,o?"":ve(i)?String(i):i)}function Tr(e,t,i,s,n){if(t==="innerHTML"||t==="textContent"){i!=null&&(e[t]=t==="innerHTML"?tc(i):i);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const a=o==="OPTION"?e.getAttribute("value")||"":e.value,l=i==null?e.type==="checkbox"?"on":"":String(i);(a!==l||!("_value"in e))&&(e.value=l),i==null&&e.removeAttribute(t),e._value=i;return}let r=!1;if(i===""||i==null){const a=typeof e[t];a==="boolean"?i=Za(i):i==null&&a==="string"?(i="",r=!0):a==="number"&&(i=0,r=!0)}try{e[t]=i}catch{}r&&e.removeAttribute(n||t)}function Jh(e,t,i,s){e.addEventListener(t,i,s)}function Zh(e,t,i,s){e.removeEventListener(t,i,s)}const kr=Symbol("_vei");function tf(e,t,i,s,n=null){const o=e[kr]||(e[kr]={}),r=o[t];if(s&&r)r.value=s;else{const[a,l]=nf(t);if(s){const c=o[t]=af(s,n);Jh(e,a,c,l)}else r&&(Zh(e,a,r,l),o[t]=void 0)}}const ef=/(Once|Passive|Capture)$/,sf=/^on:?(?:Once|Passive|Capture)$/;function nf(e){let t,i;for(;(i=e.match(ef))&&!sf.test(e);)t||(t={}),e=e.slice(0,e.length-i[1].length),t[i[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):je(e.slice(2)),t]}let Nn=0;const of=Promise.resolve(),rf=()=>Nn||(of.then(()=>Nn=0),Nn=Date.now());function af(e,t){const i=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=i.attached)return;const n=i.value;if(V(n)){const o=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{o.call(s),s._stopped=!0};const r=n.slice(),a=[s];for(let l=0;l<r.length&&!s._stopped;l++){const c=r[l];c&&ne(c,t,5,a)}}else ne(n,t,5,[s])};return i.value=e,i.attached=rf(),i}const Pr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,lf=(e,t,i,s,n,o)=>{const r=n==="svg";t==="class"?Uh(e,s,r):t==="style"?qh(e,i,s):cn(t)?un(t)||tf(e,t,i,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):cf(e,t,s,r))?(Tr(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Cr(e,t,s,r,o,t!=="value")):e._isVueCE&&(uf(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!gt(s)))?Tr(e,te(t),s,o,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Cr(e,t,s,r))};function cf(e,t,i,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Pr(t)&&U(i));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const n=e.tagName;if(n==="IMG"||n==="VIDEO"||n==="CANVAS"||n==="SOURCE")return!1}return Pr(t)&>(i)?!1:t in e}function uf(e,t){const i=e._def.props;if(!i)return!1;const s=te(t);return Array.isArray(i)?i.some(n=>te(n)===s):Object.keys(i).some(n=>te(n)===s)}const hf=["ctrl","shift","alt","meta"],ff={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)=>hf.some(i=>e[`${i}Key`]&&!t.includes(i))},ec=(e,t)=>{if(!e)return e;const i=e._withMods||(e._withMods={}),s=t.join(".");return i[s]||(i[s]=(n,...o)=>{for(let r=0;r<t.length;r++){const a=ff[t[r]];if(a&&a(n,t))return}return e(n,...o)})},df={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Or=(e,t)=>{const i=e._withKeys||(e._withKeys={}),s=t.join(".");return i[s]||(i[s]=n=>{if(!("key"in n))return;const o=je(n.key);if(t.some(r=>r===o||df[r]===o))return e(n)})},gf=Mt({patchProp:lf},Vh);let Ar;function pf(){return Ar||(Ar=Mh(gf))}const mf=(...e)=>{const t=pf().createApp(...e),{mount:i}=t;return t.mount=s=>{const n=_f(s);if(!n)return;const o=t._component;!U(o)&&!o.render&&!o.template&&(o.template=n.innerHTML),n.nodeType===1&&(n.textContent="");const r=i(n,!1,bf(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),r},t};function bf(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function _f(e){return gt(e)?document.querySelector(e):e}const xf={class:"retro-window hero-header"},yf={class:"retro-window-content hero-content"},vf={class:"hero-top-row"},wf={class:"hero-actions"},Sf=["title"],Mf={key:0,class:"retro-well ios-install-well"},Cf={class:"ios-guide-header"},Tf={class:"retro-well ticker-well"},kf={class:"ticker-container"},Pf={class:"ticker-text"},Of={class:"ticker-item"},Af=ki({__name:"HouseHero",props:{lastUpdated:{}},emits:["refresh","theme-changed","crt-changed"],setup(e,{emit:t}){const i=t,s=Kt(!0),n=Kt(!0),o=Kt(!1),r=Kt(!1);let a=null;function l(f){if(!f)return"";try{return new Date(f).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{return f}}function c(){s.value=!s.value;const f=s.value?"dark":"light";document.documentElement.setAttribute("data-theme",f),localStorage.setItem("grabengasse_theme",f),i("theme-changed",f)}function u(){n.value=!n.value,localStorage.setItem("grabengasse_crt",n.value?"true":"false"),i("crt-changed",n.value)}async function h(){if(a){a.prompt();const{outcome:f}=await a.userChoice;f==="accepted"&&(o.value=!1,a=null)}else/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream?r.value=!r.value:alert(`To install this app on your device:
|
||
|
||
• Android: Tap the browser menu (⋮) -> 'Install App' or 'Add to Home screen'
|
||
• iPhone/iPad: Tap Share (⎋) -> 'Add to Home Screen (⊞)'
|
||
• Chrome/Edge: Click the install icon in the URL bar (⊕)`)}return _s(()=>{const f=localStorage.getItem("grabengasse_theme")||"dark";s.value=f==="dark",document.documentElement.setAttribute("data-theme",f);const d=localStorage.getItem("grabengasse_crt");d!==null&&(n.value=d==="true"),window.addEventListener("beforeinstallprompt",_=>{_.preventDefault(),a=_,o.value=!0}),window.addEventListener("appinstalled",()=>{o.value=!1,a=null})}),(f,d)=>(_t(),yt("header",xf,[d[15]||(d[15]=mr('<div class="retro-window-header" data-v-03236e61><div class="retro-window-title" data-v-03236e61><span class="system-icon" data-v-03236e61>🕹️</span><span data-v-03236e61>CITY TELEMETRY // GRABENGASSE 7</span></div><div class="retro-window-controls" data-v-03236e61><span class="retro-btn-box" data-v-03236e61>_</span><span class="retro-btn-box" data-v-03236e61>□</span><span class="retro-btn-box" data-v-03236e61>×</span></div></div>',1)),S("div",yf,[S("div",vf,[d[6]||(d[6]=mr('<div class="hero-brand" data-v-03236e61><div class="city-crest" data-v-03236e61><span class="crest-icon" data-v-03236e61>🏛️</span></div><div class="brand-text" data-v-03236e61><h1 class="brand-title" data-v-03236e61>GRABENGASSE 7</h1><div class="brand-meta" data-v-03236e61><span class="meta-tag" data-v-03236e61>REGENSBURG</span><span class="meta-separator" data-v-03236e61>•</span><span class="meta-tag" data-v-03236e61>ELEV 342M</span><span class="meta-separator" data-v-03236e61>•</span><span class="meta-tag" data-v-03236e61>WS-90</span></div></div></div>',1)),S("div",wf,[d[5]||(d[5]=S("div",{class:"retro-badge badge-green action-badge"},[S("span",{class:"retro-blinker"}),S("span",null,"WS-90 LIVE")],-1)),S("button",{class:"retro-btn theme-toggle",onClick:c,title:s.value?"Switch to 16-Bit Bright Theme (Amiga/SNES Day)":"Switch to 16-Bit Dark Theme (CRT Night)"},[S("span",null,dt(s.value?"☀️":"🌙"),1),S("span",null,dt(s.value?"DAY":"NIGHT"),1)],8,Sf),S("button",{class:ri(["retro-btn crt-toggle",{active:n.value}]),onClick:u,title:"Toggle Retro CRT Scanline Filter"},[d[2]||(d[2]=S("span",null,"📺",-1)),S("span",null,dt(n.value?"CRT ON":"CRT OFF"),1)],2),S("button",{class:ri(["retro-btn install-btn",{"btn-accent":o.value}]),onClick:h,title:"Install Grabengasse 7 as a native Android/Apple Home Screen App"},[...d[3]||(d[3]=[S("span",null,"📲",-1),S("span",null,"INSTALL",-1)])],2),S("button",{class:"retro-btn sync-btn",onClick:d[0]||(d[0]=_=>f.$emit("refresh")),title:"Poll latest metrics"},[...d[4]||(d[4]=[S("span",null,"🔄",-1),S("span",null,"SYNC",-1)])])])]),r.value?(_t(),yt("div",Mf,[S("div",Cf,[d[7]||(d[7]=S("span",null,"🍎 INSTALL ON APPLE iOS / SAFARI:",-1)),S("button",{class:"retro-btn-box",onClick:d[1]||(d[1]=_=>r.value=!1)},"×")]),d[8]||(d[8]=S("div",{class:"ios-guide-body"},[S("span",null,[pi("1. Tap the "),S("strong",null,"Share button (⎋)"),pi(" in Safari")]),S("span",null,[pi("2. Scroll and select "),S("strong",null,"'Add to Home Screen (⊞)'")]),S("span",null,[pi("3. Tap "),S("strong",null,"'Add'"),pi(" to launch as a standalone app!")])],-1))])):Yt("",!0),S("div",Tf,[d[14]||(d[14]=S("div",{class:"ticker-label"},"NEWS:",-1)),S("div",kf,[S("div",Pf,[d[9]||(d[9]=S("span",null,"*** GRABENGASSE 7 WEATHER REPORT: METEOROLOGICAL TELEMETRY ACTIVE ***",-1)),d[10]||(d[10]=S("span",{class:"ticker-item"},"STATION: SHELLY WS90 (PROMETHEUS)",-1)),d[11]||(d[11]=S("span",{class:"ticker-item"},"LOCATION: REGENSBURG HISTORIC DISTRICT",-1)),d[12]||(d[12]=S("span",{class:"ticker-item"},"PWA READY: INSTALLABLE AS STANDALONE ANDROID & APPLE APP",-1)),S("span",Of,"LAST SYNC: "+dt(e.lastUpdated?l(e.lastUpdated):"CONNECTING..."),1),d[13]||(d[13]=S("span",{class:"ticker-item"},"ADVISORY: CLICK ANY METRIC FOR 16-BIT HISTORICAL GRAPH INSPECTOR",-1))])])])])]))}}),yn=(e,t)=>{const i=e.__vccOpts||e;for(const[s,n]of t)i[s]=n;return i},Df=yn(Af,[["__scopeId","data-v-03236e61"]]),Ef={class:"row-left"},If={class:"row-icon-box"},Lf={class:"row-icon"},Rf={class:"row-text-group"},Ff={class:"row-title"},Hf={class:"row-sub-group"},Bf={key:1,class:"row-subtext"},Nf={class:"row-right"},zf={class:"row-value-well"},Wf={class:"row-primary-val"},$f={key:0,class:"row-primary-unit"},Vf=ki({__name:"WeatherMetricCard",props:{title:{},icon:{},value:{},unit:{},subText:{},subBadge:{},subBadgeColor:{},highlight:{type:Boolean}},emits:["inspect"],setup(e){const t=e,i=$t(()=>t.value===null||t.value===void 0?"--":typeof t.value=="number"?Number.isInteger(t.value)?t.value.toString():t.value.toFixed(1):t.value),s=$t(()=>t.subBadgeColor?{borderColor:t.subBadgeColor,color:t.subBadgeColor}:{});return(n,o)=>(_t(),yt("div",{class:ri(["retro-metric-row",{"row-highlight":e.highlight}]),onClick:o[0]||(o[0]=r=>n.$emit("inspect")),role:"button",tabindex:"0",onKeydown:[o[1]||(o[1]=Or(r=>n.$emit("inspect"),["enter"])),o[2]||(o[2]=Or(ec(r=>n.$emit("inspect"),["prevent"]),["space"]))],title:"Click or tap to view 16-bit history graph & telemetry"},[S("div",Ef,[S("div",If,[S("span",Lf,dt(e.icon),1)]),S("div",Rf,[S("div",Ff,dt(e.title),1),S("div",Hf,[e.subBadge?(_t(),yt("span",{key:0,class:"retro-badge sub-badge",style:dn(s.value)},dt(e.subBadge),5)):Yt("",!0),e.subText?(_t(),yt("span",Bf,dt(e.subText),1)):Yt("",!0)])])]),S("div",Nf,[S("div",zf,[S("span",Wf,dt(i.value),1),e.unit?(_t(),yt("span",$f,dt(e.unit),1)):Yt("",!0)]),o[3]||(o[3]=S("div",{class:"row-inspect-btn"},[S("span",{class:"inspect-arrow"},"▶"),S("span",{class:"inspect-text"},"GRAPH")],-1))])],34))}}),Ht=yn(Vf,[["__scopeId","data-v-7c873dc9"]]);/*!
|
||
* @kurkle/color v0.3.4
|
||
* https://github.com/kurkle/color#readme
|
||
* (c) 2024 Jukka Kurkela
|
||
* Released under the MIT License
|
||
*/function vs(e){return e+.5|0}const Ne=(e,t,i)=>Math.max(Math.min(e,i),t);function zi(e){return Ne(vs(e*2.55),0,255)}function $e(e){return Ne(vs(e*255),0,255)}function Pe(e){return Ne(vs(e/2.55)/100,0,1)}function Dr(e){return Ne(vs(e*100),0,100)}const Ut={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},co=[..."0123456789ABCDEF"],jf=e=>co[e&15],Uf=e=>co[(e&240)>>4]+co[e&15],Cs=e=>(e&240)>>4===(e&15),Kf=e=>Cs(e.r)&&Cs(e.g)&&Cs(e.b)&&Cs(e.a);function Yf(e){var t=e.length,i;return e[0]==="#"&&(t===4||t===5?i={r:255&Ut[e[1]]*17,g:255&Ut[e[2]]*17,b:255&Ut[e[3]]*17,a:t===5?Ut[e[4]]*17:255}:(t===7||t===9)&&(i={r:Ut[e[1]]<<4|Ut[e[2]],g:Ut[e[3]]<<4|Ut[e[4]],b:Ut[e[5]]<<4|Ut[e[6]],a:t===9?Ut[e[7]]<<4|Ut[e[8]]:255})),i}const Gf=(e,t)=>e<255?t(e):"";function qf(e){var t=Kf(e)?jf:Uf;return e?"#"+t(e.r)+t(e.g)+t(e.b)+Gf(e.a,t):void 0}const Xf=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function ic(e,t,i){const s=t*Math.min(i,1-i),n=(o,r=(o+e/30)%12)=>i-s*Math.max(Math.min(r-3,9-r,1),-1);return[n(0),n(8),n(4)]}function Qf(e,t,i){const s=(n,o=(n+e/60)%6)=>i-i*t*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function Jf(e,t,i){const s=ic(e,1,.5);let n;for(t+i>1&&(n=1/(t+i),t*=n,i*=n),n=0;n<3;n++)s[n]*=1-t-i,s[n]+=t;return s}function Zf(e,t,i,s,n){return e===n?(t-i)/s+(t<i?6:0):t===n?(i-e)/s+2:(e-t)/s+4}function No(e){const i=e.r/255,s=e.g/255,n=e.b/255,o=Math.max(i,s,n),r=Math.min(i,s,n),a=(o+r)/2;let l,c,u;return o!==r&&(u=o-r,c=a>.5?u/(2-o-r):u/(o+r),l=Zf(i,s,n,u,o),l=l*60+.5),[l|0,c||0,a]}function zo(e,t,i,s){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,i,s)).map($e)}function Wo(e,t,i){return zo(ic,e,t,i)}function td(e,t,i){return zo(Jf,e,t,i)}function ed(e,t,i){return zo(Qf,e,t,i)}function sc(e){return(e%360+360)%360}function id(e){const t=Xf.exec(e);let i=255,s;if(!t)return;t[5]!==s&&(i=t[6]?zi(+t[5]):$e(+t[5]));const n=sc(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?s=td(n,o,r):t[1]==="hsv"?s=ed(n,o,r):s=Wo(n,o,r),{r:s[0],g:s[1],b:s[2],a:i}}function sd(e,t){var i=No(e);i[0]=sc(i[0]+t),i=Wo(i),e.r=i[0],e.g=i[1],e.b=i[2]}function nd(e){if(!e)return;const t=No(e),i=t[0],s=Dr(t[1]),n=Dr(t[2]);return e.a<255?`hsla(${i}, ${s}%, ${n}%, ${Pe(e.a)})`:`hsl(${i}, ${s}%, ${n}%)`}const Er={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"},Ir={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 od(){const e={},t=Object.keys(Ir),i=Object.keys(Er);let s,n,o,r,a;for(s=0;s<t.length;s++){for(r=a=t[s],n=0;n<i.length;n++)o=i[n],a=a.replace(o,Er[o]);o=parseInt(Ir[r],16),e[a]=[o>>16&255,o>>8&255,o&255]}return e}let Ts;function rd(e){Ts||(Ts=od(),Ts.transparent=[0,0,0,0]);const t=Ts[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const ad=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function ld(e){const t=ad.exec(e);let i=255,s,n,o;if(t){if(t[7]!==s){const r=+t[7];i=t[8]?zi(r):Ne(r*255,0,255)}return s=+t[1],n=+t[3],o=+t[5],s=255&(t[2]?zi(s):Ne(s,0,255)),n=255&(t[4]?zi(n):Ne(n,0,255)),o=255&(t[6]?zi(o):Ne(o,0,255)),{r:s,g:n,b:o,a:i}}}function cd(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Pe(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const zn=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,fi=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function ud(e,t,i){const s=fi(Pe(e.r)),n=fi(Pe(e.g)),o=fi(Pe(e.b));return{r:$e(zn(s+i*(fi(Pe(t.r))-s))),g:$e(zn(n+i*(fi(Pe(t.g))-n))),b:$e(zn(o+i*(fi(Pe(t.b))-o))),a:e.a+i*(t.a-e.a)}}function ks(e,t,i){if(e){let s=No(e);s[t]=Math.max(0,Math.min(s[t]+s[t]*i,t===0?360:1)),s=Wo(s),e.r=s[0],e.g=s[1],e.b=s[2]}}function nc(e,t){return e&&Object.assign(t||{},e)}function Lr(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=$e(e[3]))):(t=nc(e,{r:0,g:0,b:0,a:1}),t.a=$e(t.a)),t}function hd(e){return e.charAt(0)==="r"?ld(e):id(e)}class ls{constructor(t){if(t instanceof ls)return t;const i=typeof t;let s;i==="object"?s=Lr(t):i==="string"&&(s=Yf(t)||rd(t)||hd(t)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var t=nc(this._rgb);return t&&(t.a=Pe(t.a)),t}set rgb(t){this._rgb=Lr(t)}rgbString(){return this._valid?cd(this._rgb):void 0}hexString(){return this._valid?qf(this._rgb):void 0}hslString(){return this._valid?nd(this._rgb):void 0}mix(t,i){if(t){const s=this.rgb,n=t.rgb;let o;const r=i===o?.5:i,a=2*r-1,l=s.a-n.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,s.r=255&c*s.r+o*n.r+.5,s.g=255&c*s.g+o*n.g+.5,s.b=255&c*s.b+o*n.b+.5,s.a=r*s.a+(1-r)*n.a,this.rgb=s}return this}interpolate(t,i){return t&&(this._rgb=ud(this._rgb,t._rgb,i)),this}clone(){return new ls(this.rgb)}alpha(t){return this._rgb.a=$e(t),this}clearer(t){const i=this._rgb;return i.a*=1-t,this}greyscale(){const t=this._rgb,i=vs(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=i,this}opaquer(t){const i=this._rgb;return i.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 ks(this._rgb,2,t),this}darken(t){return ks(this._rgb,2,-t),this}saturate(t){return ks(this._rgb,1,t),this}desaturate(t){return ks(this._rgb,1,-t),this}rotate(t){return sd(this._rgb,t),this}}/*!
|
||
* Chart.js v4.5.1
|
||
* https://www.chartjs.org
|
||
* (c) 2025 Chart.js Contributors
|
||
* Released under the MIT License
|
||
*/function Se(){}const fd=(()=>{let e=0;return()=>e++})();function ht(e){return e==null}function xt(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 J(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function At(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function ue(e,t){return At(e)?e:t}function X(e,t){return typeof e>"u"?t:e}const dd=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function ft(e,t,i){if(e&&typeof e.call=="function")return e.apply(i,t)}function nt(e,t,i,s){let n,o,r;if(xt(e))for(o=e.length,n=0;n<o;n++)t.call(i,e[n],n);else if(J(e))for(r=Object.keys(e),o=r.length,n=0;n<o;n++)t.call(i,e[r[n]],r[n])}function en(e,t){let i,s,n,o;if(!e||!t||e.length!==t.length)return!1;for(i=0,s=e.length;i<s;++i)if(n=e[i],o=t[i],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function sn(e){if(xt(e))return e.map(sn);if(J(e)){const t=Object.create(null),i=Object.keys(e),s=i.length;let n=0;for(;n<s;++n)t[i[n]]=sn(e[i[n]]);return t}return e}function oc(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function gd(e,t,i,s){if(!oc(e))return;const n=t[e],o=i[e];J(n)&&J(o)?cs(n,o,s):t[e]=sn(o)}function cs(e,t,i){const s=xt(t)?t:[t],n=s.length;if(!J(e))return e;i=i||{};const o=i.merger||gd;let r;for(let a=0;a<n;++a){if(r=s[a],!J(r))continue;const l=Object.keys(r);for(let c=0,u=l.length;c<u;++c)o(l[c],e,r,i)}return e}function Xi(e,t){return cs(e,t,{merger:pd})}function pd(e,t,i){if(!oc(e))return;const s=t[e],n=i[e];J(s)&&J(n)?Xi(s,n):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=sn(n))}const Rr={"":e=>e,x:e=>e.x,y:e=>e.y};function md(e){const t=e.split("."),i=[];let s="";for(const n of t)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(i.push(s),s="");return i}function bd(e){const t=md(e);return i=>{for(const s of t){if(s==="")break;i=i&&i[s]}return i}}function nn(e,t){return(Rr[t]||(Rr[t]=bd(t)))(e)}function $o(e){return e.charAt(0).toUpperCase()+e.slice(1)}const on=e=>typeof e<"u",Ve=e=>typeof e=="function",Fr=(e,t)=>{if(e.size!==t.size)return!1;for(const i of e)if(!t.has(i))return!1;return!0};function _d(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const vt=Math.PI,ie=2*vt,xd=ie+vt,rn=Number.POSITIVE_INFINITY,yd=vt/180,Zt=vt/2,Ge=vt/4,Hr=vt*2/3,rc=Math.log10,Mi=Math.sign;function Qi(e,t,i){return Math.abs(e-t)<i}function Br(e){const t=Math.round(e);e=Qi(e,t,e/1e3)?t:e;const i=Math.pow(10,Math.floor(rc(e))),s=e/i;return(s<=1?1:s<=2?2:s<=5?5:10)*i}function vd(e){const t=[],i=Math.sqrt(e);let s;for(s=1;s<i;s++)e%s===0&&(t.push(s),t.push(e/s));return i===(i|0)&&t.push(i),t.sort((n,o)=>n-o).pop(),t}function wd(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function us(e){return!wd(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function Sd(e,t){const i=Math.round(e);return i-t<=e&&i+t>=e}function Md(e,t,i){let s,n,o;for(s=0,n=e.length;s<n;s++)o=e[s][i],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function ti(e){return e*(vt/180)}function Cd(e){return e*(180/vt)}function Nr(e){if(!At(e))return;let t=1,i=0;for(;Math.round(e*t)/t!==e;)t*=10,i++;return i}function Td(e,t){const i=t.x-e.x,s=t.y-e.y,n=Math.sqrt(i*i+s*s);let o=Math.atan2(s,i);return o<-.5*vt&&(o+=ie),{angle:o,distance:n}}function uo(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function kd(e,t){return(e-t+xd)%ie-vt}function ge(e){return(e%ie+ie)%ie}function ac(e,t,i,s){const n=ge(e),o=ge(t),r=ge(i),a=ge(o-n),l=ge(r-n),c=ge(n-o),u=ge(n-r);return n===o||n===r||s&&o===r||a>l&&c<u}function Gt(e,t,i){return Math.max(t,Math.min(i,e))}function Pd(e){return Gt(e,-32768,32767)}function mi(e,t,i,s=1e-6){return e>=Math.min(t,i)-s&&e<=Math.max(t,i)+s}function Vo(e,t,i){i=i||(r=>e[r]<t);let s=e.length-1,n=0,o;for(;s-n>1;)o=n+s>>1,i(o)?n=o:s=o;return{lo:n,hi:s}}const ei=(e,t,i,s)=>Vo(e,i,s?n=>{const o=e[n][t];return o<i||o===i&&e[n+1][t]===i}:n=>e[n][t]<i),Od=(e,t,i)=>Vo(e,i,s=>e[s][t]>=i);function Ad(e,t,i){let s=0,n=e.length;for(;s<n&&e[s]<t;)s++;for(;n>s&&e[n-1]>i;)n--;return s>0||n<e.length?e.slice(s,n):e}const lc=["push","pop","shift","splice","unshift"];function Dd(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),lc.forEach(i=>{const s="_onData"+$o(i),n=e[i];Object.defineProperty(e,i,{configurable:!0,enumerable:!1,value(...o){const r=n.apply(this,o);return e._chartjs.listeners.forEach(a=>{typeof a[s]=="function"&&a[s](...o)}),r}})})}function zr(e,t){const i=e._chartjs;if(!i)return;const s=i.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),!(s.length>0)&&(lc.forEach(o=>{delete e[o]}),delete e._chartjs)}function Ed(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const cc=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function uc(e,t){let i=[],s=!1;return function(...n){i=n,s||(s=!0,cc.call(window,()=>{s=!1,e.apply(t,i)}))}}function Id(e,t){let i;return function(...s){return t?(clearTimeout(i),i=setTimeout(e,t,s)):e.apply(this,s),t}}const jo=e=>e==="start"?"left":e==="end"?"right":"center",Tt=(e,t,i)=>e==="start"?t:e==="end"?i:(t+i)/2,Ld=(e,t,i,s)=>e===(s?"left":"right")?i:e==="center"?(t+i)/2:t;function Rd(e,t,i){const s=t.length;let n=0,o=s;if(e._sorted){const{iScale:r,vScale:a,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=r.axis,{min:h,max:f,minDefined:d,maxDefined:_}=r.getUserBounds();if(d){if(n=Math.min(ei(l,u,h).lo,i?s:ei(t,u,r.getPixelForValue(h)).lo),c){const p=l.slice(0,n+1).reverse().findIndex(m=>!ht(m[a.axis]));n-=Math.max(0,p)}n=Gt(n,0,s-1)}if(_){let p=Math.max(ei(l,r.axis,f,!0).hi+1,i?0:ei(t,u,r.getPixelForValue(f),!0).hi+1);if(c){const m=l.slice(p-1).findIndex(x=>!ht(x[a.axis]));p+=Math.max(0,m)}o=Gt(p,n,s)-n}else o=s-n}return{start:n,count:o}}function Fd(e){const{xScale:t,yScale:i,_scaleRanges:s}=e,n={xmin:t.min,xmax:t.max,ymin:i.min,ymax:i.max};if(!s)return e._scaleRanges=n,!0;const o=s.xmin!==t.min||s.xmax!==t.max||s.ymin!==i.min||s.ymax!==i.max;return Object.assign(s,n),o}const Ps=e=>e===0||e===1,Wr=(e,t,i)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*ie/i)),$r=(e,t,i)=>Math.pow(2,-10*e)*Math.sin((e-t)*ie/i)+1,Ji={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*Zt)+1,easeOutSine:e=>Math.sin(e*Zt),easeInOutSine:e=>-.5*(Math.cos(vt*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=>Ps(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=>Ps(e)?e:Wr(e,.075,.3),easeOutElastic:e=>Ps(e)?e:$r(e,.075,.3),easeInOutElastic(e){return Ps(e)?e:e<.5?.5*Wr(e*2,.1125,.45):.5+.5*$r(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-Ji.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?Ji.easeInBounce(e*2)*.5:Ji.easeOutBounce(e*2-1)*.5+.5};function Uo(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Vr(e){return Uo(e)?e:new ls(e)}function Wn(e){return Uo(e)?e:new ls(e).saturate(.5).darken(.1).hexString()}const Hd=["x","y","borderWidth","radius","tension"],Bd=["color","borderColor","backgroundColor"];function Nd(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:Bd},numbers:{type:"number",properties:Hd}}),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 zd(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const jr=new Map;function Wd(e,t){t=t||{};const i=e+JSON.stringify(t);let s=jr.get(i);return s||(s=new Intl.NumberFormat(e,t),jr.set(i,s)),s}function hc(e,t,i){return Wd(t,i).format(e)}const $d={values(e){return xt(e)?e:""+e},numeric(e,t,i){if(e===0)return"0";const s=this.chart.options.locale;let n,o=e;if(i.length>1){const c=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(c<1e-4||c>1e15)&&(n="scientific"),o=Vd(e,i)}const r=rc(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:n,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),hc(e,s,l)}};function Vd(e,t){let i=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(i)>=1&&e!==Math.floor(e)&&(i=e-Math.floor(e)),i}var fc={formatters:$d};function jd(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,i)=>i.lineWidth,tickColor:(t,i)=>i.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:fc.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 ai=Object.create(null),ho=Object.create(null);function Zi(e,t){if(!t)return e;const i=t.split(".");for(let s=0,n=i.length;s<n;++s){const o=i[s];e=e[o]||(e[o]=Object.create(null))}return e}function $n(e,t,i){return typeof t=="string"?cs(Zi(e,t),i):cs(Zi(e,""),t)}class Ud{constructor(t,i){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=s=>s.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(s,n)=>Wn(n.backgroundColor),this.hoverBorderColor=(s,n)=>Wn(n.borderColor),this.hoverColor=(s,n)=>Wn(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(i)}set(t,i){return $n(this,t,i)}get(t){return Zi(this,t)}describe(t,i){return $n(ho,t,i)}override(t,i){return $n(ai,t,i)}route(t,i,s,n){const o=Zi(this,t),r=Zi(this,s),a="_"+i;Object.defineProperties(o,{[a]:{value:o[i],writable:!0},[i]:{enumerable:!0,get(){const l=this[a],c=r[n];return J(l)?Object.assign({},c,l):X(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(i=>i(this))}}var pt=new Ud({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Nd,zd,jd]);function Kd(e){return!e||ht(e.size)||ht(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Ur(e,t,i,s,n){let o=t[n];return o||(o=t[n]=e.measureText(n).width,i.push(n)),o>s&&(s=o),s}function qe(e,t,i){const s=e.currentDevicePixelRatio,n=i!==0?Math.max(i/2,.5):0;return Math.round((t-n)*s)/s+n}function Kr(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function fo(e,t,i,s){dc(e,t,i,s,null)}function dc(e,t,i,s,n){let o,r,a,l,c,u,h,f;const d=t.pointStyle,_=t.rotation,p=t.radius;let m=(_||0)*yd;if(d&&typeof d=="object"&&(o=d.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){e.save(),e.translate(i,s),e.rotate(m),e.drawImage(d,-d.width/2,-d.height/2,d.width,d.height),e.restore();return}if(!(isNaN(p)||p<=0)){switch(e.beginPath(),d){default:n?e.ellipse(i,s,n/2,p,0,0,ie):e.arc(i,s,p,0,ie),e.closePath();break;case"triangle":u=n?n/2:p,e.moveTo(i+Math.sin(m)*u,s-Math.cos(m)*p),m+=Hr,e.lineTo(i+Math.sin(m)*u,s-Math.cos(m)*p),m+=Hr,e.lineTo(i+Math.sin(m)*u,s-Math.cos(m)*p),e.closePath();break;case"rectRounded":c=p*.516,l=p-c,r=Math.cos(m+Ge)*l,h=Math.cos(m+Ge)*(n?n/2-c:l),a=Math.sin(m+Ge)*l,f=Math.sin(m+Ge)*(n?n/2-c:l),e.arc(i-h,s-a,c,m-vt,m-Zt),e.arc(i+f,s-r,c,m-Zt,m),e.arc(i+h,s+a,c,m,m+Zt),e.arc(i-f,s+r,c,m+Zt,m+vt),e.closePath();break;case"rect":if(!_){l=Math.SQRT1_2*p,u=n?n/2:l,e.rect(i-u,s-l,2*u,2*l);break}m+=Ge;case"rectRot":h=Math.cos(m)*(n?n/2:p),r=Math.cos(m)*p,a=Math.sin(m)*p,f=Math.sin(m)*(n?n/2:p),e.moveTo(i-h,s-a),e.lineTo(i+f,s-r),e.lineTo(i+h,s+a),e.lineTo(i-f,s+r),e.closePath();break;case"crossRot":m+=Ge;case"cross":h=Math.cos(m)*(n?n/2:p),r=Math.cos(m)*p,a=Math.sin(m)*p,f=Math.sin(m)*(n?n/2:p),e.moveTo(i-h,s-a),e.lineTo(i+h,s+a),e.moveTo(i+f,s-r),e.lineTo(i-f,s+r);break;case"star":h=Math.cos(m)*(n?n/2:p),r=Math.cos(m)*p,a=Math.sin(m)*p,f=Math.sin(m)*(n?n/2:p),e.moveTo(i-h,s-a),e.lineTo(i+h,s+a),e.moveTo(i+f,s-r),e.lineTo(i-f,s+r),m+=Ge,h=Math.cos(m)*(n?n/2:p),r=Math.cos(m)*p,a=Math.sin(m)*p,f=Math.sin(m)*(n?n/2:p),e.moveTo(i-h,s-a),e.lineTo(i+h,s+a),e.moveTo(i+f,s-r),e.lineTo(i-f,s+r);break;case"line":r=n?n/2:Math.cos(m)*p,a=Math.sin(m)*p,e.moveTo(i-r,s-a),e.lineTo(i+r,s+a);break;case"dash":e.moveTo(i,s),e.lineTo(i+Math.cos(m)*(n?n/2:p),s+Math.sin(m)*p);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function hs(e,t,i){return i=i||.5,!t||e&&e.x>t.left-i&&e.x<t.right+i&&e.y>t.top-i&&e.y<t.bottom+i}function vn(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function wn(e){e.restore()}function Yd(e,t,i,s,n){if(!t)return e.lineTo(i.x,i.y);if(n==="middle"){const o=(t.x+i.x)/2;e.lineTo(o,t.y),e.lineTo(o,i.y)}else n==="after"!=!!s?e.lineTo(t.x,i.y):e.lineTo(i.x,t.y);e.lineTo(i.x,i.y)}function Gd(e,t,i,s){if(!t)return e.lineTo(i.x,i.y);e.bezierCurveTo(s?t.cp1x:t.cp2x,s?t.cp1y:t.cp2y,s?i.cp2x:i.cp1x,s?i.cp2y:i.cp1y,i.x,i.y)}function qd(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),ht(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 Xd(e,t,i,s,n){if(n.strikethrough||n.underline){const o=e.measureText(s),r=t-o.actualBoundingBoxLeft,a=t+o.actualBoundingBoxRight,l=i-o.actualBoundingBoxAscent,c=i+o.actualBoundingBoxDescent,u=n.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=n.decorationWidth||2,e.moveTo(r,u),e.lineTo(a,u),e.stroke()}}function Qd(e,t){const i=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=i}function fs(e,t,i,s,n,o={}){const r=xt(t)?t:[t],a=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(e.save(),e.font=n.string,qd(e,o),l=0;l<r.length;++l)c=r[l],o.backdrop&&Qd(e,o.backdrop),a&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),ht(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(c,i,s,o.maxWidth)),e.fillText(c,i,s,o.maxWidth),Xd(e,i,s,c,o),s+=Number(n.lineHeight);e.restore()}function go(e,t){const{x:i,y:s,w:n,h:o,radius:r}=t;e.arc(i+r.topLeft,s+r.topLeft,r.topLeft,1.5*vt,vt,!0),e.lineTo(i,s+o-r.bottomLeft),e.arc(i+r.bottomLeft,s+o-r.bottomLeft,r.bottomLeft,vt,Zt,!0),e.lineTo(i+n-r.bottomRight,s+o),e.arc(i+n-r.bottomRight,s+o-r.bottomRight,r.bottomRight,Zt,0,!0),e.lineTo(i+n,s+r.topRight),e.arc(i+n-r.topRight,s+r.topRight,r.topRight,0,-Zt,!0),e.lineTo(i+r.topLeft,s)}const Jd=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Zd=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function tg(e,t){const i=(""+e).match(Jd);if(!i||i[1]==="normal")return t*1.2;switch(e=+i[2],i[3]){case"px":return e;case"%":e/=100;break}return t*e}const eg=e=>+e||0;function gc(e,t){const i={},s=J(t),n=s?Object.keys(t):t,o=J(e)?s?r=>X(e[r],e[t[r]]):r=>e[r]:()=>e;for(const r of n)i[r]=eg(o(r));return i}function ig(e){return gc(e,{top:"y",right:"x",bottom:"y",left:"x"})}function ts(e){return gc(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Qt(e){const t=ig(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Pt(e,t){e=e||{},t=t||pt.font;let i=X(e.size,t.size);typeof i=="string"&&(i=parseInt(i,10));let s=X(e.style,t.style);s&&!(""+s).match(Zd)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:X(e.family,t.family),lineHeight:tg(X(e.lineHeight,t.lineHeight),i),size:i,style:s,weight:X(e.weight,t.weight),string:""};return n.string=Kd(n),n}function Os(e,t,i,s){let n,o,r;for(n=0,o=e.length;n<o;++n)if(r=e[n],r!==void 0&&r!==void 0)return r}function sg(e,t,i){const{min:s,max:n}=e,o=dd(t,(n-s)/2),r=(a,l)=>i&&a===0?0:a+l;return{min:r(s,-Math.abs(o)),max:r(n,o)}}function li(e,t){return Object.assign(Object.create(e),t)}function Ko(e,t=[""],i,s,n=()=>e[0]){const o=i||e;typeof s>"u"&&(s=_c("_fallback",e));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:s,_getTarget:n,override:a=>Ko([a,...e],t,o,s)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return mc(a,l,()=>hg(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return Gr(a).includes(l)},ownKeys(a){return Gr(a)},set(a,l,c){const u=a._storage||(a._storage=n());return a[l]=u[l]=c,delete a._keys,!0}})}function Ci(e,t,i,s){const n={_cacheable:!1,_proxy:e,_context:t,_subProxy:i,_stack:new Set,_descriptors:pc(e,s),setContext:o=>Ci(e,o,i,s),override:o=>Ci(e.override(o),t,i,s)};return new Proxy(n,{deleteProperty(o,r){return delete o[r],delete e[r],!0},get(o,r,a){return mc(o,r,()=>og(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(e,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,r)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,r){return Reflect.has(e,r)},ownKeys(){return Reflect.ownKeys(e)},set(o,r,a){return e[r]=a,delete o[r],!0}})}function pc(e,t={scriptable:!0,indexable:!0}){const{_scriptable:i=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=e;return{allKeys:n,scriptable:i,indexable:s,isScriptable:Ve(i)?i:()=>i,isIndexable:Ve(s)?s:()=>s}}const ng=(e,t)=>e?e+$o(t):t,Yo=(e,t)=>J(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function mc(e,t,i){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const s=i();return e[t]=s,s}function og(e,t,i){const{_proxy:s,_context:n,_subProxy:o,_descriptors:r}=e;let a=s[t];return Ve(a)&&r.isScriptable(t)&&(a=rg(t,a,e,i)),xt(a)&&a.length&&(a=ag(t,a,e,r.isIndexable)),Yo(t,a)&&(a=Ci(a,n,o&&o[t],r)),a}function rg(e,t,i,s){const{_proxy:n,_context:o,_subProxy:r,_stack:a}=i;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(o,r||s);return a.delete(e),Yo(e,l)&&(l=Go(n._scopes,n,e,l)),l}function ag(e,t,i,s){const{_proxy:n,_context:o,_subProxy:r,_descriptors:a}=i;if(typeof o.index<"u"&&s(e))return t[o.index%t.length];if(J(t[0])){const l=t,c=n._scopes.filter(u=>u!==l);t=[];for(const u of l){const h=Go(c,n,e,u);t.push(Ci(h,o,r&&r[e],a))}}return t}function bc(e,t,i){return Ve(e)?e(t,i):e}const lg=(e,t)=>e===!0?t:typeof e=="string"?nn(t,e):void 0;function cg(e,t,i,s,n){for(const o of t){const r=lg(i,o);if(r){e.add(r);const a=bc(r._fallback,i,n);if(typeof a<"u"&&a!==i&&a!==s)return a}else if(r===!1&&typeof s<"u"&&i!==s)return null}return!1}function Go(e,t,i,s){const n=t._rootScopes,o=bc(t._fallback,i,s),r=[...e,...n],a=new Set;a.add(s);let l=Yr(a,r,i,o||i,s);return l===null||typeof o<"u"&&o!==i&&(l=Yr(a,r,o,l,s),l===null)?!1:Ko(Array.from(a),[""],n,o,()=>ug(t,i,s))}function Yr(e,t,i,s,n){for(;i;)i=cg(e,t,i,s,n);return i}function ug(e,t,i){const s=e._getTarget();t in s||(s[t]={});const n=s[t];return xt(n)&&J(i)?i:n||{}}function hg(e,t,i,s){let n;for(const o of t)if(n=_c(ng(o,e),i),typeof n<"u")return Yo(e,n)?Go(i,s,e,n):n}function _c(e,t){for(const i of t){if(!i)continue;const s=i[e];if(typeof s<"u")return s}}function Gr(e){let t=e._keys;return t||(t=e._keys=fg(e._scopes)),t}function fg(e){const t=new Set;for(const i of e)for(const s of Object.keys(i).filter(n=>!n.startsWith("_")))t.add(s);return Array.from(t)}const dg=Number.EPSILON||1e-14,Ti=(e,t)=>t<e.length&&!e[t].skip&&e[t],xc=e=>e==="x"?"y":"x";function gg(e,t,i,s){const n=e.skip?t:e,o=t,r=i.skip?t:i,a=uo(o,n),l=uo(r,o);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const h=s*c,f=s*u;return{previous:{x:o.x-h*(r.x-n.x),y:o.y-h*(r.y-n.y)},next:{x:o.x+f*(r.x-n.x),y:o.y+f*(r.y-n.y)}}}function pg(e,t,i){const s=e.length;let n,o,r,a,l,c=Ti(e,0);for(let u=0;u<s-1;++u)if(l=c,c=Ti(e,u+1),!(!l||!c)){if(Qi(t[u],0,dg)){i[u]=i[u+1]=0;continue}n=i[u]/t[u],o=i[u+1]/t[u],a=Math.pow(n,2)+Math.pow(o,2),!(a<=9)&&(r=3/Math.sqrt(a),i[u]=n*r*t[u],i[u+1]=o*r*t[u])}}function mg(e,t,i="x"){const s=xc(i),n=e.length;let o,r,a,l=Ti(e,0);for(let c=0;c<n;++c){if(r=a,a=l,l=Ti(e,c+1),!a)continue;const u=a[i],h=a[s];r&&(o=(u-r[i])/3,a[`cp1${i}`]=u-o,a[`cp1${s}`]=h-o*t[c]),l&&(o=(l[i]-u)/3,a[`cp2${i}`]=u+o,a[`cp2${s}`]=h+o*t[c])}}function bg(e,t="x"){const i=xc(t),s=e.length,n=Array(s).fill(0),o=Array(s);let r,a,l,c=Ti(e,0);for(r=0;r<s;++r)if(a=l,l=c,c=Ti(e,r+1),!!l){if(c){const u=c[t]-l[t];n[r]=u!==0?(c[i]-l[i])/u:0}o[r]=a?c?Mi(n[r-1])!==Mi(n[r])?0:(n[r-1]+n[r])/2:n[r-1]:n[r]}pg(e,n,o),mg(e,o,t)}function As(e,t,i){return Math.max(Math.min(e,i),t)}function _g(e,t){let i,s,n,o,r,a=hs(e[0],t);for(i=0,s=e.length;i<s;++i)r=o,o=a,a=i<s-1&&hs(e[i+1],t),o&&(n=e[i],r&&(n.cp1x=As(n.cp1x,t.left,t.right),n.cp1y=As(n.cp1y,t.top,t.bottom)),a&&(n.cp2x=As(n.cp2x,t.left,t.right),n.cp2y=As(n.cp2y,t.top,t.bottom)))}function xg(e,t,i,s,n){let o,r,a,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")bg(e,n);else{let c=s?e[e.length-1]:e[0];for(o=0,r=e.length;o<r;++o)a=e[o],l=gg(c,a,e[Math.min(o+1,r-(s?0:1))%r],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}t.capBezierPoints&&_g(e,i)}function qo(){return typeof window<"u"&&typeof document<"u"}function Xo(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function an(e,t,i){let s;return typeof e=="string"?(s=parseInt(e,10),e.indexOf("%")!==-1&&(s=s/100*t.parentNode[i])):s=e,s}const Sn=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function yg(e,t){return Sn(e).getPropertyValue(t)}const vg=["top","right","bottom","left"];function oi(e,t,i){const s={};i=i?"-"+i:"";for(let n=0;n<4;n++){const o=vg[n];s[o]=parseFloat(e[t+"-"+o+i])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const wg=(e,t,i)=>(e>0||t>0)&&(!i||!i.shadowRoot);function Sg(e,t){const i=e.touches,s=i&&i.length?i[0]:e,{offsetX:n,offsetY:o}=s;let r=!1,a,l;if(wg(n,o,e.target))a=n,l=o;else{const c=t.getBoundingClientRect();a=s.clientX-c.left,l=s.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function Je(e,t){if("native"in e)return e;const{canvas:i,currentDevicePixelRatio:s}=t,n=Sn(i),o=n.boxSizing==="border-box",r=oi(n,"padding"),a=oi(n,"border","width"),{x:l,y:c,box:u}=Sg(e,i),h=r.left+(u&&a.left),f=r.top+(u&&a.top);let{width:d,height:_}=t;return o&&(d-=r.width+a.width,_-=r.height+a.height),{x:Math.round((l-h)/d*i.width/s),y:Math.round((c-f)/_*i.height/s)}}function Mg(e,t,i){let s,n;if(t===void 0||i===void 0){const o=e&&Xo(e);if(!o)t=e.clientWidth,i=e.clientHeight;else{const r=o.getBoundingClientRect(),a=Sn(o),l=oi(a,"border","width"),c=oi(a,"padding");t=r.width-c.width-l.width,i=r.height-c.height-l.height,s=an(a.maxWidth,o,"clientWidth"),n=an(a.maxHeight,o,"clientHeight")}}return{width:t,height:i,maxWidth:s||rn,maxHeight:n||rn}}const ze=e=>Math.round(e*10)/10;function Cg(e,t,i,s){const n=Sn(e),o=oi(n,"margin"),r=an(n.maxWidth,e,"clientWidth")||rn,a=an(n.maxHeight,e,"clientHeight")||rn,l=Mg(e,t,i);let{width:c,height:u}=l;if(n.boxSizing==="content-box"){const f=oi(n,"border","width"),d=oi(n,"padding");c-=d.width+f.width,u-=d.height+f.height}return c=Math.max(0,c-o.width),u=Math.max(0,s?c/s:u-o.height),c=ze(Math.min(c,r,l.maxWidth)),u=ze(Math.min(u,a,l.maxHeight)),c&&!u&&(u=ze(c/2)),(t!==void 0||i!==void 0)&&s&&l.height&&u>l.height&&(u=l.height,c=ze(Math.floor(u*s))),{width:c,height:u}}function qr(e,t,i){const s=t||1,n=ze(e.height*s),o=ze(e.width*s);e.height=ze(e.height),e.width=ze(e.width);const r=e.canvas;return r.style&&(i||!r.style.height&&!r.style.width)&&(r.style.height=`${e.height}px`,r.style.width=`${e.width}px`),e.currentDevicePixelRatio!==s||r.height!==n||r.width!==o?(e.currentDevicePixelRatio=s,r.height=n,r.width=o,e.ctx.setTransform(s,0,0,s,0,0),!0):!1}const Tg=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};qo()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function Xr(e,t){const i=yg(e,t),s=i&&i.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function Ze(e,t,i,s){return{x:e.x+i*(t.x-e.x),y:e.y+i*(t.y-e.y)}}function kg(e,t,i,s){return{x:e.x+i*(t.x-e.x),y:s==="middle"?i<.5?e.y:t.y:s==="after"?i<1?e.y:t.y:i>0?t.y:e.y}}function Pg(e,t,i,s){const n={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},r=Ze(e,n,i),a=Ze(n,o,i),l=Ze(o,t,i),c=Ze(r,a,i),u=Ze(a,l,i);return Ze(c,u,i)}const Og=function(e,t){return{x(i){return e+e+t-i},setWidth(i){t=i},textAlign(i){return i==="center"?i:i==="right"?"left":"right"},xPlus(i,s){return i-s},leftForLtr(i,s){return i-s}}},Ag=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function vi(e,t,i){return e?Og(t,i):Ag()}function yc(e,t){let i,s;(t==="ltr"||t==="rtl")&&(i=e.canvas.style,s=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",t,"important"),e.prevTextDirection=s)}function vc(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function wc(e){return e==="angle"?{between:ac,compare:kd,normalize:ge}:{between:mi,compare:(t,i)=>t-i,normalize:t=>t}}function Qr({start:e,end:t,count:i,loop:s,style:n}){return{start:e%i,end:t%i,loop:s&&(t-e+1)%i===0,style:n}}function Dg(e,t,i){const{property:s,start:n,end:o}=i,{between:r,normalize:a}=wc(s),l=t.length;let{start:c,end:u,loop:h}=e,f,d;if(h){for(c+=l,u+=l,f=0,d=l;f<d&&r(a(t[c%l][s]),n,o);++f)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:h,style:e.style}}function Sc(e,t,i){if(!i)return[e];const{property:s,start:n,end:o}=i,r=t.length,{compare:a,between:l,normalize:c}=wc(s),{start:u,end:h,loop:f,style:d}=Dg(e,t,i),_=[];let p=!1,m=null,x,M,C;const w=()=>l(n,C,x)&&a(n,C)!==0,v=()=>a(o,x)===0||l(o,C,x),D=()=>p||w(),E=()=>!p||v();for(let L=u,N=u;L<=h;++L)M=t[L%r],!M.skip&&(x=c(M[s]),x!==C&&(p=l(x,n,o),m===null&&D()&&(m=a(x,n)===0?L:N),m!==null&&E()&&(_.push(Qr({start:m,end:L,loop:f,count:r,style:d})),m=null),N=L,C=x));return m!==null&&_.push(Qr({start:m,end:h,loop:f,count:r,style:d})),_}function Mc(e,t){const i=[],s=e.segments;for(let n=0;n<s.length;n++){const o=Sc(s[n],e.points,t);o.length&&i.push(...o)}return i}function Eg(e,t,i,s){let n=0,o=t-1;if(i&&!s)for(;n<t&&!e[n].skip;)n++;for(;n<t&&e[n].skip;)n++;for(n%=t,i&&(o+=n);o>n&&e[o%t].skip;)o--;return o%=t,{start:n,end:o}}function Ig(e,t,i,s){const n=e.length,o=[];let r=t,a=e[t],l;for(l=t+1;l<=i;++l){const c=e[l%n];c.skip||c.stop?a.skip||(s=!1,o.push({start:t%n,end:(l-1)%n,loop:s}),t=r=c.stop?l:null):(r=l,a.skip&&(t=l)),a=c}return r!==null&&o.push({start:t%n,end:r%n,loop:s}),o}function Lg(e,t){const i=e.points,s=e.options.spanGaps,n=i.length;if(!n)return[];const o=!!e._loop,{start:r,end:a}=Eg(i,n,o,s);if(s===!0)return Jr(e,[{start:r,end:a,loop:o}],i,t);const l=a<r?a+n:a,c=!!e._fullLoop&&r===0&&a===n-1;return Jr(e,Ig(i,r,l,c),i,t)}function Jr(e,t,i,s){return!s||!s.setContext||!i?t:Rg(e,t,i,s)}function Rg(e,t,i,s){const n=e._chart.getContext(),o=Zr(e.options),{_datasetIndex:r,options:{spanGaps:a}}=e,l=i.length,c=[];let u=o,h=t[0].start,f=h;function d(_,p,m,x){const M=a?-1:1;if(_!==p){for(_+=l;i[_%l].skip;)_-=M;for(;i[p%l].skip;)p+=M;_%l!==p%l&&(c.push({start:_%l,end:p%l,loop:m,style:x}),u=x,h=p%l)}}for(const _ of t){h=a?h:_.start;let p=i[h%l],m;for(f=h+1;f<=_.end;f++){const x=i[f%l];m=Zr(s.setContext(li(n,{type:"segment",p0:p,p1:x,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:r}))),Fg(m,u)&&d(h,f-1,_.loop,u),p=x,u=m}h<f-1&&d(h,f-1,_.loop,u)}return c}function Zr(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Fg(e,t){if(!t)return!1;const i=[],s=function(n,o){return Uo(o)?(i.includes(o)||i.push(o),i.indexOf(o)):o};return JSON.stringify(e,s)!==JSON.stringify(t,s)}function Ds(e,t,i){return e.options.clip?e[i]:t[i]}function Hg(e,t){const{xScale:i,yScale:s}=e;return i&&s?{left:Ds(i,t,"left"),right:Ds(i,t,"right"),top:Ds(s,t,"top"),bottom:Ds(s,t,"bottom")}:t}function Cc(e,t){const i=t._clip;if(i.disabled)return!1;const s=Hg(t,e.chartArea);return{left:i.left===!1?0:s.left-(i.left===!0?0:i.left),right:i.right===!1?e.width:s.right+(i.right===!0?0:i.right),top:i.top===!1?0:s.top-(i.top===!0?0:i.top),bottom:i.bottom===!1?e.height:s.bottom+(i.bottom===!0?0:i.bottom)}}/*!
|
||
* Chart.js v4.5.1
|
||
* https://www.chartjs.org
|
||
* (c) 2025 Chart.js Contributors
|
||
* Released under the MIT License
|
||
*/class Bg{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,i,s,n){const o=i.listeners[n],r=i.duration;o.forEach(a=>a({chart:t,initial:i.initial,numSteps:r,currentStep:Math.min(s-i.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=cc.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let i=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;const o=s.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(n.draw(),this._notify(n,s,t,"progress")),o.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),i+=o.length}),this._lastDate=t,i===0&&(this._running=!1)}_getAnims(t){const i=this._charts;let s=i.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},i.set(t,s)),s}listen(t,i,s){this._getAnims(t).listeners[i].push(s)}add(t,i){!i||!i.length||this._getAnims(t).items.push(...i)}has(t){return this._getAnims(t).items.length>0}start(t){const i=this._charts.get(t);i&&(i.running=!0,i.start=Date.now(),i.duration=i.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;const i=this._charts.get(t);return!(!i||!i.running||!i.items.length)}stop(t){const i=this._charts.get(t);if(!i||!i.items.length)return;const s=i.items;let n=s.length-1;for(;n>=0;--n)s[n].cancel();i.items=[],this._notify(t,i,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Me=new Bg;const ta="transparent",Ng={boolean(e,t,i){return i>.5?t:e},color(e,t,i){const s=Vr(e||ta),n=s.valid&&Vr(t||ta);return n&&n.valid?n.mix(s,i).hexString():t},number(e,t,i){return e+(t-e)*i}};class zg{constructor(t,i,s,n){const o=i[s];n=Os([t.to,n,o,t.from]);const r=Os([t.from,o,n]);this._active=!0,this._fn=t.fn||Ng[t.type||typeof r],this._easing=Ji[t.easing]||Ji.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=i,this._prop=s,this._from=r,this._to=n,this._promises=void 0}active(){return this._active}update(t,i,s){if(this._active){this._notify(!1);const n=this._target[this._prop],o=s-this._start,r=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Os([t.to,i,n,t.from]),this._from=Os([t.from,n,i])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const i=t-this._start,s=this._duration,n=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||i<s),!this._active){this._target[n]=a,this._notify(!0);return}if(i<0){this._target[n]=o;return}l=i/s%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((i,s)=>{t.push({res:i,rej:s})})}_notify(t){const i=t?"res":"rej",s=this._promises||[];for(let n=0;n<s.length;n++)s[n][i]()}}class Tc{constructor(t,i){this._chart=t,this._properties=new Map,this.configure(i)}configure(t){if(!J(t))return;const i=Object.keys(pt.animation),s=this._properties;Object.getOwnPropertyNames(t).forEach(n=>{const o=t[n];if(!J(o))return;const r={};for(const a of i)r[a]=o[a];(xt(o.properties)&&o.properties||[n]).forEach(a=>{(a===n||!s.has(a))&&s.set(a,r)})})}_animateOptions(t,i){const s=i.options,n=$g(t,s);if(!n)return[];const o=this._createAnimations(n,s);return s.$shared&&Wg(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,i){const s=this._properties,n=[],o=t.$animations||(t.$animations={}),r=Object.keys(i),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(t,i));continue}const u=i[c];let h=o[c];const f=s.get(c);if(h)if(f&&h.active()){h.update(f,u,a);continue}else h.cancel();if(!f||!f.duration){t[c]=u;continue}o[c]=h=new zg(f,t,c,u),n.push(h)}return n}update(t,i){if(this._properties.size===0){Object.assign(t,i);return}const s=this._createAnimations(t,i);if(s.length)return Me.add(this._chart,s),!0}}function Wg(e,t){const i=[],s=Object.keys(t);for(let n=0;n<s.length;n++){const o=e[s[n]];o&&o.active()&&i.push(o.wait())}return Promise.all(i)}function $g(e,t){if(!t)return;let i=e.options;if(!i){e.options=t;return}return i.$shared&&(e.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i}function ea(e,t){const i=e&&e.options||{},s=i.reverse,n=i.min===void 0?t:0,o=i.max===void 0?t:0;return{start:s?o:n,end:s?n:o}}function Vg(e,t,i){if(i===!1)return!1;const s=ea(e,i),n=ea(t,i);return{top:n.end,right:s.end,bottom:n.start,left:s.start}}function jg(e){let t,i,s,n;return J(e)?(t=e.top,i=e.right,s=e.bottom,n=e.left):t=i=s=n=e,{top:t,right:i,bottom:s,left:n,disabled:e===!1}}function kc(e,t){const i=[],s=e._getSortedDatasetMetas(t);let n,o;for(n=0,o=s.length;n<o;++n)i.push(s[n].index);return i}function ia(e,t,i,s={}){const n=e.keys,o=s.mode==="single";let r,a,l,c;if(t===null)return;let u=!1;for(r=0,a=n.length;r<a;++r){if(l=+n[r],l===i){if(u=!0,s.all)continue;break}c=e.values[l],At(c)&&(o||t===0||Mi(t)===Mi(c))&&(t+=c)}return!u&&!s.all?0:t}function Ug(e,t){const{iScale:i,vScale:s}=t,n=i.axis==="x"?"x":"y",o=s.axis==="x"?"x":"y",r=Object.keys(e),a=new Array(r.length);let l,c,u;for(l=0,c=r.length;l<c;++l)u=r[l],a[l]={[n]:u,[o]:e[u]};return a}function Vn(e,t){const i=e&&e.options.stacked;return i||i===void 0&&t.stack!==void 0}function Kg(e,t,i){return`${e.id}.${t.id}.${i.stack||i.type}`}function Yg(e){const{min:t,max:i,minDefined:s,maxDefined:n}=e.getUserBounds();return{min:s?t:Number.NEGATIVE_INFINITY,max:n?i:Number.POSITIVE_INFINITY}}function Gg(e,t,i){const s=e[t]||(e[t]={});return s[i]||(s[i]={})}function sa(e,t,i,s){for(const n of t.getMatchingVisibleMetas(s).reverse()){const o=e[n.index];if(i&&o>0||!i&&o<0)return n.index}return null}function na(e,t){const{chart:i,_cachedMeta:s}=e,n=i._stacks||(i._stacks={}),{iScale:o,vScale:r,index:a}=s,l=o.axis,c=r.axis,u=Kg(o,r,s),h=t.length;let f;for(let d=0;d<h;++d){const _=t[d],{[l]:p,[c]:m}=_,x=_._stacks||(_._stacks={});f=x[c]=Gg(n,u,p),f[a]=m,f._top=sa(f,r,!0,s.type),f._bottom=sa(f,r,!1,s.type);const M=f._visualValues||(f._visualValues={});M[a]=m}}function jn(e,t){const i=e.scales;return Object.keys(i).filter(s=>i[s].axis===t).shift()}function qg(e,t){return li(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Xg(e,t,i){return li(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:i,index:t,mode:"default",type:"data"})}function Ii(e,t){const i=e.controller.index,s=e.vScale&&e.vScale.axis;if(s){t=t||e._parsed;for(const n of t){const o=n._stacks;if(!o||o[s]===void 0||o[s][i]===void 0)return;delete o[s][i],o[s]._visualValues!==void 0&&o[s]._visualValues[i]!==void 0&&delete o[s]._visualValues[i]}}}const Un=e=>e==="reset"||e==="none",oa=(e,t)=>t?e:Object.assign({},e),Qg=(e,t,i)=>e&&!t.hidden&&t._stacked&&{keys:kc(i,!0),values:null};class es{constructor(t,i){this.chart=t,this._ctx=t.ctx,this.index=i,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=Vn(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&&Ii(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,i=this._cachedMeta,s=this.getDataset(),n=(h,f,d,_)=>h==="x"?f:h==="r"?_:d,o=i.xAxisID=X(s.xAxisID,jn(t,"x")),r=i.yAxisID=X(s.yAxisID,jn(t,"y")),a=i.rAxisID=X(s.rAxisID,jn(t,"r")),l=i.indexAxis,c=i.iAxisID=n(l,o,r,a),u=i.vAxisID=n(l,r,o,a);i.xScale=this.getScaleForId(o),i.yScale=this.getScaleForId(r),i.rScale=this.getScaleForId(a),i.iScale=this.getScaleForId(c),i.vScale=this.getScaleForId(u)}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 i=this._cachedMeta;return t===i.iScale?i.vScale:i.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&zr(this._data,this),t._stacked&&Ii(t)}_dataCheck(){const t=this.getDataset(),i=t.data||(t.data=[]),s=this._data;if(J(i)){const n=this._cachedMeta;this._data=Ug(i,n)}else if(s!==i){if(s){zr(s,this);const n=this._cachedMeta;Ii(n),n._parsed=[]}i&&Object.isExtensible(i)&&Dd(i,this),this._syncList=[],this._data=i}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const i=this._cachedMeta,s=this.getDataset();let n=!1;this._dataCheck();const o=i._stacked;i._stacked=Vn(i.vScale,i),i.stack!==s.stack&&(n=!0,Ii(i),i.stack=s.stack),this._resyncElements(t),(n||o!==i._stacked)&&(na(this,i._parsed),i._stacked=Vn(i.vScale,i))}configure(){const t=this.chart.config,i=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),i,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,i){const{_cachedMeta:s,_data:n}=this,{iScale:o,_stacked:r}=s,a=o.axis;let l=t===0&&i===n.length?!0:s._sorted,c=t>0&&s._parsed[t-1],u,h,f;if(this._parsing===!1)s._parsed=n,s._sorted=!0,f=n;else{xt(n[t])?f=this.parseArrayData(s,n,t,i):J(n[t])?f=this.parseObjectData(s,n,t,i):f=this.parsePrimitiveData(s,n,t,i);const d=()=>h[a]===null||c&&h[a]<c[a];for(u=0;u<i;++u)s._parsed[u+t]=h=f[u],l&&(d()&&(l=!1),c=h);s._sorted=l}r&&na(this,f)}parsePrimitiveData(t,i,s,n){const{iScale:o,vScale:r}=t,a=o.axis,l=r.axis,c=o.getLabels(),u=o===r,h=new Array(n);let f,d,_;for(f=0,d=n;f<d;++f)_=f+s,h[f]={[a]:u||o.parse(c[_],_),[l]:r.parse(i[_],_)};return h}parseArrayData(t,i,s,n){const{xScale:o,yScale:r}=t,a=new Array(n);let l,c,u,h;for(l=0,c=n;l<c;++l)u=l+s,h=i[u],a[l]={x:o.parse(h[0],u),y:r.parse(h[1],u)};return a}parseObjectData(t,i,s,n){const{xScale:o,yScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(n);let u,h,f,d;for(u=0,h=n;u<h;++u)f=u+s,d=i[f],c[u]={x:o.parse(nn(d,a),f),y:r.parse(nn(d,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,i,s){const n=this.chart,o=this._cachedMeta,r=i[t.axis],a={keys:kc(n,!0),values:i._stacks[t.axis]._visualValues};return ia(a,r,o.index,{mode:s})}updateRangeFromParsed(t,i,s,n){const o=s[i.axis];let r=o===null?NaN:o;const a=n&&s._stacks[i.axis];n&&a&&(n.values=a,r=ia(n,o,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,i){const s=this._cachedMeta,n=s._parsed,o=s._sorted&&t===s.iScale,r=n.length,a=this._getOtherScale(t),l=Qg(i,s,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:h}=Yg(a);let f,d;function _(){d=n[f];const p=d[a.axis];return!At(d[t.axis])||u>p||h<p}for(f=0;f<r&&!(!_()&&(this.updateRangeFromParsed(c,t,d,l),o));++f);if(o){for(f=r-1;f>=0;--f)if(!_()){this.updateRangeFromParsed(c,t,d,l);break}}return c}getAllParsedValues(t){const i=this._cachedMeta._parsed,s=[];let n,o,r;for(n=0,o=i.length;n<o;++n)r=i[n][t.axis],At(r)&&s.push(r);return s}getMaxOverflow(){return!1}getLabelAndValue(t){const i=this._cachedMeta,s=i.iScale,n=i.vScale,o=this.getParsed(t);return{label:s?""+s.getLabelForValue(o[s.axis]):"",value:n?""+n.getLabelForValue(o[n.axis]):""}}_update(t){const i=this._cachedMeta;this.update(t||"default"),i._clip=jg(X(this.options.clip,Vg(i.xScale,i.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,i=this.chart,s=this._cachedMeta,n=s.data||[],o=i.chartArea,r=[],a=this._drawStart||0,l=this._drawCount||n.length-a,c=this.options.drawActiveElementsOnTop;let u;for(s.dataset&&s.dataset.draw(t,o,a,l),u=a;u<a+l;++u){const h=n[u];h.hidden||(h.active&&c?r.push(h):h.draw(t,o))}for(u=0;u<r.length;++u)r[u].draw(t,o)}getStyle(t,i){const s=i?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(t||0,s)}getContext(t,i,s){const n=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const r=this._cachedMeta.data[t];o=r.$context||(r.$context=Xg(this.getContext(),t,r)),o.parsed=this.getParsed(t),o.raw=n.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=qg(this.chart.getContext(),this.index)),o.dataset=n,o.index=o.datasetIndex=this.index;return o.active=!!i,o.mode=s,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,i){return this._resolveElementOptions(this.dataElementType.id,i,t)}_resolveElementOptions(t,i="default",s){const n=i==="active",o=this._cachedDataOpts,r=t+"-"+i,a=o[r],l=this.enableOptionSharing&&on(s);if(a)return oa(a,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),h=n?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),d=Object.keys(pt.elements[t]),_=()=>this.getContext(s,n,i),p=c.resolveNamedOptions(f,d,_,h);return p.$shared&&(p.$shared=l,o[r]=Object.freeze(oa(p,l))),p}_resolveAnimations(t,i,s){const n=this.chart,o=this._cachedDataOpts,r=`animation-${i}`,a=o[r];if(a)return a;let l;if(n.options.animation!==!1){const u=this.chart.config,h=u.datasetAnimationScopeKeys(this._type,i),f=u.getOptionScopes(this.getDataset(),h);l=u.createResolver(f,this.getContext(t,s,i))}const c=new Tc(n,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,i){return!i||Un(t)||this.chart._animationsDisabled}_getSharedOptions(t,i){const s=this.resolveDataElementOptions(t,i),n=this._sharedOptions,o=this.getSharedOptions(s),r=this.includeOptions(i,o)||o!==n;return this.updateSharedOptions(o,i,s),{sharedOptions:o,includeOptions:r}}updateElement(t,i,s,n){Un(n)?Object.assign(t,s):this._resolveAnimations(i,n).update(t,s)}updateSharedOptions(t,i,s){t&&!Un(i)&&this._resolveAnimations(void 0,i).update(t,s)}_setStyle(t,i,s,n){t.active=n;const o=this.getStyle(i,n);this._resolveAnimations(i,s,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,i,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,i,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const i=this._data,s=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const n=s.length,o=i.length,r=Math.min(o,n);r&&this.parse(0,r),o>n?this._insertElements(n,o-n,t):o<n&&this._removeElements(o,n-o)}_insertElements(t,i,s=!0){const n=this._cachedMeta,o=n.data,r=t+i;let a;const l=c=>{for(c.length+=i,a=c.length-1;a>=r;a--)c[a]=c[a-i]};for(l(o),a=t;a<r;++a)o[a]=new this.dataElementType;this._parsing&&l(n._parsed),this.parse(t,i),s&&this.updateElements(o,t,i,"reset")}updateElements(t,i,s,n){}_removeElements(t,i){const s=this._cachedMeta;if(this._parsing){const n=s._parsed.splice(t,i);s._stacked&&Ii(s,n)}s.data.splice(t,i)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[i,s,n]=t;this[i](s,n)}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,i){i&&this._sync(["_removeElements",t,i]);const s=arguments.length-2;s&&this._sync(["_insertElements",t,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}K(es,"defaults",{}),K(es,"datasetElementType",null),K(es,"dataElementType",null);class $s extends es{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const i=this._cachedMeta,{dataset:s,data:n=[],_dataset:o}=i,r=this.chart._animationsDisabled;let{start:a,count:l}=Rd(i,n,r);this._drawStart=a,this._drawCount=l,Fd(i)&&(a=0,l=n.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!o._decimated,s.points=n;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(s,void 0,{animated:!r,options:c},t),this.updateElements(n,a,l,t)}updateElements(t,i,s,n){const o=n==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:h}=this._getSharedOptions(i,n),f=r.axis,d=a.axis,{spanGaps:_,segment:p}=this.options,m=us(_)?_:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||o||n==="none",M=i+s,C=t.length;let w=i>0&&this.getParsed(i-1);for(let v=0;v<C;++v){const D=t[v],E=x?D:{};if(v<i||v>=M){E.skip=!0;continue}const L=this.getParsed(v),N=ht(L[d]),j=E[f]=r.getPixelForValue(L[f],v),H=E[d]=o||N?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,L,l):L[d],v);E.skip=isNaN(j)||isNaN(H)||N,E.stop=v>0&&Math.abs(L[f]-w[f])>m,p&&(E.parsed=L,E.raw=c.data[v]),h&&(E.options=u||this.resolveDataElementOptions(v,D.active?"active":n)),x||this.updateElement(D,v,E,n),w=L}}getMaxOverflow(){const t=this._cachedMeta,i=t.dataset,s=i.options&&i.options.borderWidth||0,n=t.data||[];if(!n.length)return s;const o=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,o,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}K($s,"id","line"),K($s,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),K($s,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});function Xe(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Qo{constructor(t){K(this,"options");this.options=t||{}}static override(t){Object.assign(Qo.prototype,t)}init(){}formats(){return Xe()}parse(){return Xe()}format(){return Xe()}add(){return Xe()}diff(){return Xe()}startOf(){return Xe()}endOf(){return Xe()}}var Jg={_date:Qo};function Zg(e,t,i,s){const{controller:n,data:o,_sorted:r}=e,a=n._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&r&&o.length){const c=a._reversePixels?Od:ei;if(s){if(n._sharedOptions){const u=o[0],h=typeof u.getRange=="function"&&u.getRange(t);if(h){const f=c(o,t,i-h),d=c(o,t,i+h);return{lo:f.lo,hi:d.hi}}}}else{const u=c(o,t,i);if(l){const{vScale:h}=n._cachedMeta,{_parsed:f}=e,d=f.slice(0,u.lo+1).reverse().findIndex(p=>!ht(p[h.axis]));u.lo-=Math.max(0,d);const _=f.slice(u.hi).findIndex(p=>!ht(p[h.axis]));u.hi+=Math.max(0,_)}return u}}return{lo:0,hi:o.length-1}}function Mn(e,t,i,s,n){const o=e.getSortedVisibleDatasetMetas(),r=i[t];for(let a=0,l=o.length;a<l;++a){const{index:c,data:u}=o[a],{lo:h,hi:f}=Zg(o[a],t,r,n);for(let d=h;d<=f;++d){const _=u[d];_.skip||s(_,c,d)}}}function tp(e){const t=e.indexOf("x")!==-1,i=e.indexOf("y")!==-1;return function(s,n){const o=t?Math.abs(s.x-n.x):0,r=i?Math.abs(s.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(r,2))}}function Kn(e,t,i,s,n){const o=[];return!n&&!e.isPointInArea(t)||Mn(e,i,t,function(a,l,c){!n&&!hs(a,e.chartArea,0)||a.inRange(t.x,t.y,s)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function ep(e,t,i,s){let n=[];function o(r,a,l){const{startAngle:c,endAngle:u}=r.getProps(["startAngle","endAngle"],s),{angle:h}=Td(r,{x:t.x,y:t.y});ac(h,c,u)&&n.push({element:r,datasetIndex:a,index:l})}return Mn(e,i,t,o),n}function ip(e,t,i,s,n,o){let r=[];const a=tp(i);let l=Number.POSITIVE_INFINITY;function c(u,h,f){const d=u.inRange(t.x,t.y,n);if(s&&!d)return;const _=u.getCenterPoint(n);if(!(!!o||e.isPointInArea(_))&&!d)return;const m=a(t,_);m<l?(r=[{element:u,datasetIndex:h,index:f}],l=m):m===l&&r.push({element:u,datasetIndex:h,index:f})}return Mn(e,i,t,c),r}function Yn(e,t,i,s,n,o){return!o&&!e.isPointInArea(t)?[]:i==="r"&&!s?ep(e,t,i,n):ip(e,t,i,s,n,o)}function ra(e,t,i,s,n){const o=[],r=i==="x"?"inXRange":"inYRange";let a=!1;return Mn(e,i,t,(l,c,u)=>{l[r]&&l[r](t[i],n)&&(o.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(t.x,t.y,n))}),s&&!a?[]:o}var sp={modes:{index(e,t,i,s){const n=Je(t,e),o=i.axis||"x",r=i.includeInvisible||!1,a=i.intersect?Kn(e,n,o,s,r):Yn(e,n,o,!1,s,r),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,h=c.data[u];h&&!h.skip&&l.push({element:h,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,i,s){const n=Je(t,e),o=i.axis||"xy",r=i.includeInvisible||!1;let a=i.intersect?Kn(e,n,o,s,r):Yn(e,n,o,!1,s,r);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let u=0;u<c.length;++u)a.push({element:c[u],datasetIndex:l,index:u})}return a},point(e,t,i,s){const n=Je(t,e),o=i.axis||"xy",r=i.includeInvisible||!1;return Kn(e,n,o,s,r)},nearest(e,t,i,s){const n=Je(t,e),o=i.axis||"xy",r=i.includeInvisible||!1;return Yn(e,n,o,i.intersect,s,r)},x(e,t,i,s){const n=Je(t,e);return ra(e,n,"x",i.intersect,s)},y(e,t,i,s){const n=Je(t,e);return ra(e,n,"y",i.intersect,s)}}};const Pc=["left","top","right","bottom"];function Li(e,t){return e.filter(i=>i.pos===t)}function aa(e,t){return e.filter(i=>Pc.indexOf(i.pos)===-1&&i.box.axis===t)}function Ri(e,t){return e.sort((i,s)=>{const n=t?s:i,o=t?i:s;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function np(e){const t=[];let i,s,n,o,r,a;for(i=0,s=(e||[]).length;i<s;++i)n=e[i],{position:o,options:{stack:r,stackWeight:a=1}}=n,t.push({index:i,box:n,pos:o,horizontal:n.isHorizontal(),weight:n.weight,stack:r&&o+r,stackWeight:a});return t}function op(e){const t={};for(const i of e){const{stack:s,pos:n,stackWeight:o}=i;if(!s||!Pc.includes(n))continue;const r=t[s]||(t[s]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=o}return t}function rp(e,t){const i=op(e),{vBoxMaxWidth:s,hBoxMaxHeight:n}=t;let o,r,a;for(o=0,r=e.length;o<r;++o){a=e[o];const{fullSize:l}=a.box,c=i[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*s:l&&t.availableWidth,a.height=n):(a.width=s,a.height=u?u*n:l&&t.availableHeight)}return i}function ap(e){const t=np(e),i=Ri(t.filter(c=>c.box.fullSize),!0),s=Ri(Li(t,"left"),!0),n=Ri(Li(t,"right")),o=Ri(Li(t,"top"),!0),r=Ri(Li(t,"bottom")),a=aa(t,"x"),l=aa(t,"y");return{fullSize:i,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(r).concat(a),chartArea:Li(t,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(r).concat(a)}}function la(e,t,i,s){return Math.max(e[i],t[i])+Math.max(e[s],t[s])}function Oc(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 lp(e,t,i,s){const{pos:n,box:o}=i,r=e.maxPadding;if(!J(n)){i.size&&(e[n]-=i.size);const h=s[i.stack]||{size:0,count:1};h.size=Math.max(h.size,i.horizontal?o.height:o.width),i.size=h.size/h.count,e[n]+=i.size}o.getPadding&&Oc(r,o.getPadding());const a=Math.max(0,t.outerWidth-la(r,e,"left","right")),l=Math.max(0,t.outerHeight-la(r,e,"top","bottom")),c=a!==e.w,u=l!==e.h;return e.w=a,e.h=l,i.horizontal?{same:c,other:u}:{same:u,other:c}}function cp(e){const t=e.maxPadding;function i(s){const n=Math.max(t[s]-e[s],0);return e[s]+=n,n}e.y+=i("top"),e.x+=i("left"),i("right"),i("bottom")}function up(e,t){const i=t.maxPadding;function s(n){const o={left:0,top:0,right:0,bottom:0};return n.forEach(r=>{o[r]=Math.max(t[r],i[r])}),o}return s(e?["left","right"]:["top","bottom"])}function Wi(e,t,i,s){const n=[];let o,r,a,l,c,u;for(o=0,r=e.length,c=0;o<r;++o){a=e[o],l=a.box,l.update(a.width||t.w,a.height||t.h,up(a.horizontal,t));const{same:h,other:f}=lp(t,i,a,s);c|=h&&n.length,u=u||f,l.fullSize||n.push(a)}return c&&Wi(n,t,i,s)||u}function Es(e,t,i,s,n){e.top=i,e.left=t,e.right=t+s,e.bottom=i+n,e.width=s,e.height=n}function ca(e,t,i,s){const n=i.padding;let{x:o,y:r}=t;for(const a of e){const l=a.box,c=s[a.stack]||{placed:0,weight:1},u=a.stackWeight/c.weight||1;if(a.horizontal){const h=t.w*u,f=c.size||l.height;on(c.start)&&(r=c.start),l.fullSize?Es(l,n.left,r,i.outerWidth-n.right-n.left,f):Es(l,t.left+c.placed,r,h,f),c.start=r,c.placed+=h,r=l.bottom}else{const h=t.h*u,f=c.size||l.width;on(c.start)&&(o=c.start),l.fullSize?Es(l,o,n.top,f,i.outerHeight-n.bottom-n.top):Es(l,o,t.top+c.placed,f,h),c.start=o,c.placed+=h,o=l.right}}t.x=o,t.y=r}var qt={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(i){t.draw(i)}}]},e.boxes.push(t)},removeBox(e,t){const i=e.boxes?e.boxes.indexOf(t):-1;i!==-1&&e.boxes.splice(i,1)},configure(e,t,i){t.fullSize=i.fullSize,t.position=i.position,t.weight=i.weight},update(e,t,i,s){if(!e)return;const n=Qt(e.options.layout.padding),o=Math.max(t-n.width,0),r=Math.max(i-n.height,0),a=ap(e.boxes),l=a.vertical,c=a.horizontal;nt(e.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});const u=l.reduce((p,m)=>m.box.options&&m.box.options.display===!1?p:p+1,0)||1,h=Object.freeze({outerWidth:t,outerHeight:i,padding:n,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/u,hBoxMaxHeight:r/2}),f=Object.assign({},n);Oc(f,Qt(s));const d=Object.assign({maxPadding:f,w:o,h:r,x:n.left,y:n.top},n),_=rp(l.concat(c),h);Wi(a.fullSize,d,h,_),Wi(l,d,h,_),Wi(c,d,h,_)&&Wi(l,d,h,_),cp(d),ca(a.leftAndTop,d,h,_),d.x+=d.w,d.y+=d.h,ca(a.rightAndBottom,d,h,_),e.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w},nt(a.chartArea,p=>{const m=p.box;Object.assign(m,e.chartArea),m.update(d.w,d.h,{left:0,top:0,right:0,bottom:0})})}};class Ac{acquireContext(t,i){}releaseContext(t){return!1}addEventListener(t,i,s){}removeEventListener(t,i,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,i,s,n){return i=Math.max(0,i||t.width),s=s||t.height,{width:i,height:Math.max(0,n?Math.floor(i/n):s)}}isAttached(t){return!0}updateConfig(t){}}class hp extends Ac{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Vs="$chartjs",fp={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ua=e=>e===null||e==="";function dp(e,t){const i=e.style,s=e.getAttribute("height"),n=e.getAttribute("width");if(e[Vs]={initial:{height:s,width:n,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",ua(n)){const o=Xr(e,"width");o!==void 0&&(e.width=o)}if(ua(s))if(e.style.height==="")e.height=e.width/(t||2);else{const o=Xr(e,"height");o!==void 0&&(e.height=o)}return e}const Dc=Tg?{passive:!0}:!1;function gp(e,t,i){e&&e.addEventListener(t,i,Dc)}function pp(e,t,i){e&&e.canvas&&e.canvas.removeEventListener(t,i,Dc)}function mp(e,t){const i=fp[e.type]||e.type,{x:s,y:n}=Je(e,t);return{type:i,chart:t,native:e,x:s!==void 0?s:null,y:n!==void 0?n:null}}function ln(e,t){for(const i of e)if(i===t||i.contains(t))return!0}function bp(e,t,i){const s=e.canvas,n=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||ln(a.addedNodes,s),r=r&&!ln(a.removedNodes,s);r&&i()});return n.observe(document,{childList:!0,subtree:!0}),n}function _p(e,t,i){const s=e.canvas,n=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||ln(a.removedNodes,s),r=r&&!ln(a.addedNodes,s);r&&i()});return n.observe(document,{childList:!0,subtree:!0}),n}const ds=new Map;let ha=0;function Ec(){const e=window.devicePixelRatio;e!==ha&&(ha=e,ds.forEach((t,i)=>{i.currentDevicePixelRatio!==e&&t()}))}function xp(e,t){ds.size||window.addEventListener("resize",Ec),ds.set(e,t)}function yp(e){ds.delete(e),ds.size||window.removeEventListener("resize",Ec)}function vp(e,t,i){const s=e.canvas,n=s&&Xo(s);if(!n)return;const o=uc((a,l)=>{const c=n.clientWidth;i(a,l),c<n.clientWidth&&i()},window),r=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||o(c,u)});return r.observe(n),xp(e,o),r}function Gn(e,t,i){i&&i.disconnect(),t==="resize"&&yp(e)}function wp(e,t,i){const s=e.canvas,n=uc(o=>{e.ctx!==null&&i(mp(o,e))},e);return gp(s,t,n),n}class Sp extends Ac{acquireContext(t,i){const s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?(dp(t,i),s):null}releaseContext(t){const i=t.canvas;if(!i[Vs])return!1;const s=i[Vs].initial;["height","width"].forEach(o=>{const r=s[o];ht(r)?i.removeAttribute(o):i.setAttribute(o,r)});const n=s.style||{};return Object.keys(n).forEach(o=>{i.style[o]=n[o]}),i.width=i.width,delete i[Vs],!0}addEventListener(t,i,s){this.removeEventListener(t,i);const n=t.$proxies||(t.$proxies={}),r={attach:bp,detach:_p,resize:vp}[i]||wp;n[i]=r(t,i,s)}removeEventListener(t,i){const s=t.$proxies||(t.$proxies={}),n=s[i];if(!n)return;({attach:Gn,detach:Gn,resize:Gn}[i]||pp)(t,i,n),s[i]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,i,s,n){return Cg(t,i,s,n)}isAttached(t){const i=t&&Xo(t);return!!(i&&i.isConnected)}}function Mp(e){return!qo()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?hp:Sp}var Bs;let ci=(Bs=class{constructor(){K(this,"x");K(this,"y");K(this,"active",!1);K(this,"options");K(this,"$animations")}tooltipPosition(t){const{x:i,y:s}=this.getProps(["x","y"],t);return{x:i,y:s}}hasValue(){return us(this.x)&&us(this.y)}getProps(t,i){const s=this.$animations;if(!i||!s)return this;const n={};return t.forEach(o=>{n[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),n}},K(Bs,"defaults",{}),K(Bs,"defaultRoutes"),Bs);function Cp(e,t){const i=e.options.ticks,s=Tp(e),n=Math.min(i.maxTicksLimit||s,s),o=i.major.enabled?Pp(t):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>n)return Op(t,c,o,r/n),c;const u=kp(o,t,n);if(r>0){let h,f;const d=r>1?Math.round((l-a)/(r-1)):null;for(Is(t,c,u,ht(d)?0:a-d,a),h=0,f=r-1;h<f;h++)Is(t,c,u,o[h],o[h+1]);return Is(t,c,u,l,ht(d)?t.length:l+d),c}return Is(t,c,u),c}function Tp(e){const t=e.options.offset,i=e._tickSize(),s=e._length/i+(t?0:1),n=e._maxLength/i;return Math.floor(Math.min(s,n))}function kp(e,t,i){const s=Ap(e),n=t.length/i;if(!s)return Math.max(n,1);const o=vd(s);for(let r=0,a=o.length-1;r<a;r++){const l=o[r];if(l>n)return l}return Math.max(n,1)}function Pp(e){const t=[];let i,s;for(i=0,s=e.length;i<s;i++)e[i].major&&t.push(i);return t}function Op(e,t,i,s){let n=0,o=i[0],r;for(s=Math.ceil(s),r=0;r<e.length;r++)r===o&&(t.push(e[r]),n++,o=i[n*s])}function Is(e,t,i,s,n){const o=X(s,0),r=Math.min(X(n,e.length),e.length);let a=0,l,c,u;for(i=Math.ceil(i),n&&(l=n-s,i=l/Math.floor(l/i)),u=o;u<0;)a++,u=Math.round(o+a*i);for(c=Math.max(o,0);c<r;c++)c===u&&(t.push(e[c]),a++,u=Math.round(o+a*i))}function Ap(e){const t=e.length;let i,s;if(t<2)return!1;for(s=e[0],i=1;i<t;++i)if(e[i]-e[i-1]!==s)return!1;return s}const Dp=e=>e==="left"?"right":e==="right"?"left":e,fa=(e,t,i)=>t==="top"||t==="left"?e[t]+i:e[t]-i,da=(e,t)=>Math.min(t||e,e);function ga(e,t){const i=[],s=e.length/t,n=e.length;let o=0;for(;o<n;o+=s)i.push(e[Math.floor(o)]);return i}function Ep(e,t,i){const s=e.ticks.length,n=Math.min(t,s-1),o=e._startPixel,r=e._endPixel,a=1e-6;let l=e.getPixelForTick(n),c;if(!(i&&(s===1?c=Math.max(l-o,r-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(n-1))/2,l+=n<t?c:-c,l<o-a||l>r+a)))return l}function Ip(e,t){nt(e,i=>{const s=i.gc,n=s.length/2;let o;if(n>t){for(o=0;o<n;++o)delete i.data[s[o]];s.splice(0,n)}})}function Fi(e){return e.drawTicks?e.tickLength:0}function pa(e,t){if(!e.display)return 0;const i=Pt(e.font,t),s=Qt(e.padding);return(xt(e.text)?e.text.length:1)*i.lineHeight+s.height}function Lp(e,t){return li(e,{scale:t,type:"scale"})}function Rp(e,t,i){return li(e,{tick:i,index:t,type:"tick"})}function Fp(e,t,i){let s=jo(e);return(i&&t!=="right"||!i&&t==="right")&&(s=Dp(s)),s}function Hp(e,t,i,s){const{top:n,left:o,bottom:r,right:a,chart:l}=e,{chartArea:c,scales:u}=l;let h=0,f,d,_;const p=r-n,m=a-o;if(e.isHorizontal()){if(d=Tt(s,o,a),J(i)){const x=Object.keys(i)[0],M=i[x];_=u[x].getPixelForValue(M)+p-t}else i==="center"?_=(c.bottom+c.top)/2+p-t:_=fa(e,i,t);f=a-o}else{if(J(i)){const x=Object.keys(i)[0],M=i[x];d=u[x].getPixelForValue(M)-m+t}else i==="center"?d=(c.left+c.right)/2-m+t:d=fa(e,i,t);_=Tt(s,r,n),h=i==="left"?-Zt:Zt}return{titleX:d,titleY:_,maxWidth:f,rotation:h}}class Pi extends ci{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,i){return t}getUserBounds(){let{_userMin:t,_userMax:i,_suggestedMin:s,_suggestedMax:n}=this;return t=ue(t,Number.POSITIVE_INFINITY),i=ue(i,Number.NEGATIVE_INFINITY),s=ue(s,Number.POSITIVE_INFINITY),n=ue(n,Number.NEGATIVE_INFINITY),{min:ue(t,s),max:ue(i,n),minDefined:At(t),maxDefined:At(i)}}getMinMax(t){let{min:i,max:s,minDefined:n,maxDefined:o}=this.getUserBounds(),r;if(n&&o)return{min:i,max:s};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)r=a[l].controller.getMinMax(this,t),n||(i=Math.min(i,r.min)),o||(s=Math.max(s,r.max));return i=o&&i>s?s:i,s=n&&i>s?i:s,{min:ue(i,ue(s,i)),max:ue(s,ue(i,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ft(this.options.beforeUpdate,[this])}update(t,i,s){const{beginAtZero:n,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=i,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=sg(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?ga(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=Cp(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,i,s;this.isHorizontal()?(i=this.left,s=this.right):(i=this.top,s=this.bottom,t=!t),this._startPixel=i,this._endPixel=s,this._reversePixels=t,this._length=s-i,this._alignToPixels=this.options.alignToPixels}afterUpdate(){ft(this.options.afterUpdate,[this])}beforeSetDimensions(){ft(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(){ft(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),ft(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ft(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const i=this.options.ticks;let s,n,o;for(s=0,n=t.length;s<n;s++)o=t[s],o.label=ft(i.callback,[o.value,s,t],this)}afterTickToLabelConversion(){ft(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ft(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,i=t.ticks,s=da(this.ticks.length,t.ticks.maxTicksLimit),n=i.minRotation||0,o=i.maxRotation;let r=n,a,l,c;if(!this._isVisible()||!i.display||n>=o||s<=1||!this.isHorizontal()){this.labelRotation=n;return}const u=this._getLabelSizes(),h=u.widest.width,f=u.highest.height,d=Gt(this.chart.width-h,0,this.maxWidth);a=t.offset?this.maxWidth/s:d/(s-1),h+6>a&&(a=d/(s-(t.offset?.5:1)),l=this.maxHeight-Fi(t.grid)-i.padding-pa(t.title,this.chart.options.font),c=Math.sqrt(h*h+f*f),r=Cd(Math.min(Math.asin(Gt((u.highest.height+6)/a,-1,1)),Math.asin(Gt(l/c,-1,1))-Math.asin(Gt(f/c,-1,1)))),r=Math.max(n,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){ft(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ft(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:i,options:{ticks:s,title:n,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const l=pa(n,i.options.font);if(a?(t.width=this.maxWidth,t.height=Fi(o)+l):(t.height=this.maxHeight,t.width=Fi(o)+l),s.display&&this.ticks.length){const{first:c,last:u,widest:h,highest:f}=this._getLabelSizes(),d=s.padding*2,_=ti(this.labelRotation),p=Math.cos(_),m=Math.sin(_);if(a){const x=s.mirror?0:m*h.width+p*f.height;t.height=Math.min(this.maxHeight,t.height+x+d)}else{const x=s.mirror?0:p*h.width+m*f.height;t.width=Math.min(this.maxWidth,t.width+x+d)}this._calculatePadding(c,u,m,p)}}this._handleMargins(),a?(this.width=this._length=i.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=i.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,i,s,n){const{ticks:{align:o,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,d=0;l?c?(f=n*t.width,d=s*i.height):(f=s*t.height,d=n*i.width):o==="start"?d=i.width:o==="end"?f=t.width:o!=="inner"&&(f=t.width/2,d=i.width/2),this.paddingLeft=Math.max((f-u+r)*this.width/(this.width-u),0),this.paddingRight=Math.max((d-h+r)*this.width/(this.width-h),0)}else{let u=i.height/2,h=t.height/2;o==="start"?(u=0,h=t.height):o==="end"&&(u=i.height,h=0),this.paddingTop=u+r,this.paddingBottom=h+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){ft(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:i}=this.options;return i==="top"||i==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let i,s;for(i=0,s=t.length;i<s;i++)ht(t[i].label)&&(t.splice(i,1),s--,i--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const i=this.options.ticks.sampleSize;let s=this.ticks;i<s.length&&(s=ga(s,i)),this._labelSizes=t=this._computeLabelSizes(s,s.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,i,s){const{ctx:n,_longestTextCache:o}=this,r=[],a=[],l=Math.floor(i/da(i,s));let c=0,u=0,h,f,d,_,p,m,x,M,C,w,v;for(h=0;h<i;h+=l){if(_=t[h].label,p=this._resolveTickFontOptions(h),n.font=m=p.string,x=o[m]=o[m]||{data:{},gc:[]},M=p.lineHeight,C=w=0,!ht(_)&&!xt(_))C=Ur(n,x.data,x.gc,C,_),w=M;else if(xt(_))for(f=0,d=_.length;f<d;++f)v=_[f],!ht(v)&&!xt(v)&&(C=Ur(n,x.data,x.gc,C,v),w+=M);r.push(C),a.push(w),c=Math.max(C,c),u=Math.max(w,u)}Ip(o,i);const D=r.indexOf(c),E=a.indexOf(u),L=N=>({width:r[N]||0,height:a[N]||0});return{first:L(0),last:L(i-1),widest:L(D),highest:L(E),widths:r,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,i){return NaN}getValueForPixel(t){}getPixelForTick(t){const i=this.ticks;return t<0||t>i.length-1?null:this.getPixelForValue(i[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const i=this._startPixel+t*this._length;return Pd(this._alignToPixels?qe(this.chart,i,0):i)}getDecimalForPixel(t){const i=(t-this._startPixel)/this._length;return this._reversePixels?1-i:i}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:i}=this;return t<0&&i<0?i:t>0&&i>0?t:0}getContext(t){const i=this.ticks||[];if(t>=0&&t<i.length){const s=i[t];return s.$context||(s.$context=Rp(this.getContext(),t,s))}return this.$context||(this.$context=Lp(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,i=ti(this.labelRotation),s=Math.abs(Math.cos(i)),n=Math.abs(Math.sin(i)),o=this._getLabelSizes(),r=t.autoSkipPadding||0,a=o?o.widest.width+r:0,l=o?o.highest.height+r:0;return this.isHorizontal()?l*s>a*n?a/s:l/n:l*n<a*s?l/s:a/n}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const i=this.axis,s=this.chart,n=this.options,{grid:o,position:r,border:a}=n,l=o.offset,c=this.isHorizontal(),h=this.ticks.length+(l?1:0),f=Fi(o),d=[],_=a.setContext(this.getContext()),p=_.display?_.width:0,m=p/2,x=function(G){return qe(s,G,p)};let M,C,w,v,D,E,L,N,j,H,B,lt;if(r==="top")M=x(this.bottom),E=this.bottom-f,N=M-m,H=x(t.top)+m,lt=t.bottom;else if(r==="bottom")M=x(this.top),H=t.top,lt=x(t.bottom)-m,E=M+m,N=this.top+f;else if(r==="left")M=x(this.right),D=this.right-f,L=M-m,j=x(t.left)+m,B=t.right;else if(r==="right")M=x(this.left),j=t.left,B=x(t.right)-m,D=M+m,L=this.left+f;else if(i==="x"){if(r==="center")M=x((t.top+t.bottom)/2+.5);else if(J(r)){const G=Object.keys(r)[0],Y=r[G];M=x(this.chart.scales[G].getPixelForValue(Y))}H=t.top,lt=t.bottom,E=M+m,N=E+f}else if(i==="y"){if(r==="center")M=x((t.left+t.right)/2);else if(J(r)){const G=Object.keys(r)[0],Y=r[G];M=x(this.chart.scales[G].getPixelForValue(Y))}D=M-m,L=D-f,j=t.left,B=t.right}const et=X(n.ticks.maxTicksLimit,h),q=Math.max(1,Math.ceil(h/et));for(C=0;C<h;C+=q){const G=this.getContext(C),Y=o.setContext(G),Q=a.setContext(G),Dt=Y.lineWidth,Ft=Y.color,Et=Q.dash||[],mt=Q.dashOffset,Jt=Y.tickWidth,jt=Y.tickColor,oe=Y.tickBorderDash||[],Ct=Y.tickBorderDashOffset;w=Ep(this,C,l),w!==void 0&&(v=qe(s,w,Dt),c?D=L=j=B=v:E=N=H=lt=v,d.push({tx1:D,ty1:E,tx2:L,ty2:N,x1:j,y1:H,x2:B,y2:lt,width:Dt,color:Ft,borderDash:Et,borderDashOffset:mt,tickWidth:Jt,tickColor:jt,tickBorderDash:oe,tickBorderDashOffset:Ct}))}return this._ticksLength=h,this._borderValue=M,d}_computeLabelItems(t){const i=this.axis,s=this.options,{position:n,ticks:o}=s,r=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:u,mirror:h}=o,f=Fi(s.grid),d=f+u,_=h?-u:d,p=-ti(this.labelRotation),m=[];let x,M,C,w,v,D,E,L,N,j,H,B,lt="middle";if(n==="top")D=this.bottom-_,E=this._getXAxisLabelAlignment();else if(n==="bottom")D=this.top+_,E=this._getXAxisLabelAlignment();else if(n==="left"){const q=this._getYAxisLabelAlignment(f);E=q.textAlign,v=q.x}else if(n==="right"){const q=this._getYAxisLabelAlignment(f);E=q.textAlign,v=q.x}else if(i==="x"){if(n==="center")D=(t.top+t.bottom)/2+d;else if(J(n)){const q=Object.keys(n)[0],G=n[q];D=this.chart.scales[q].getPixelForValue(G)+d}E=this._getXAxisLabelAlignment()}else if(i==="y"){if(n==="center")v=(t.left+t.right)/2-d;else if(J(n)){const q=Object.keys(n)[0],G=n[q];v=this.chart.scales[q].getPixelForValue(G)}E=this._getYAxisLabelAlignment(f).textAlign}i==="y"&&(l==="start"?lt="top":l==="end"&&(lt="bottom"));const et=this._getLabelSizes();for(x=0,M=a.length;x<M;++x){C=a[x],w=C.label;const q=o.setContext(this.getContext(x));L=this.getPixelForTick(x)+o.labelOffset,N=this._resolveTickFontOptions(x),j=N.lineHeight,H=xt(w)?w.length:1;const G=H/2,Y=q.color,Q=q.textStrokeColor,Dt=q.textStrokeWidth;let Ft=E;r?(v=L,E==="inner"&&(x===M-1?Ft=this.options.reverse?"left":"right":x===0?Ft=this.options.reverse?"right":"left":Ft="center"),n==="top"?c==="near"||p!==0?B=-H*j+j/2:c==="center"?B=-et.highest.height/2-G*j+j:B=-et.highest.height+j/2:c==="near"||p!==0?B=j/2:c==="center"?B=et.highest.height/2-G*j:B=et.highest.height-H*j,h&&(B*=-1),p!==0&&!q.showLabelBackdrop&&(v+=j/2*Math.sin(p))):(D=L,B=(1-H)*j/2);let Et;if(q.showLabelBackdrop){const mt=Qt(q.backdropPadding),Jt=et.heights[x],jt=et.widths[x];let oe=B-mt.top,Ct=0-mt.left;switch(lt){case"middle":oe-=Jt/2;break;case"bottom":oe-=Jt;break}switch(E){case"center":Ct-=jt/2;break;case"right":Ct-=jt;break;case"inner":x===M-1?Ct-=jt:x>0&&(Ct-=jt/2);break}Et={left:Ct,top:oe,width:jt+mt.width,height:Jt+mt.height,color:q.backdropColor}}m.push({label:w,font:N,textOffset:B,options:{rotation:p,color:Y,strokeColor:Q,strokeWidth:Dt,textAlign:Ft,textBaseline:lt,translation:[v,D],backdrop:Et}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:i}=this.options;if(-ti(this.labelRotation))return t==="top"?"left":"right";let n="center";return i.align==="start"?n="left":i.align==="end"?n="right":i.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:i,ticks:{crossAlign:s,mirror:n,padding:o}}=this.options,r=this._getLabelSizes(),a=t+o,l=r.widest.width;let c,u;return i==="left"?n?(u=this.right+o,s==="near"?c="left":s==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,s==="near"?c="right":s==="center"?(c="center",u-=l/2):(c="left",u=this.left)):i==="right"?n?(u=this.left+o,s==="near"?c="right":s==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,s==="near"?c="left":s==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,i=this.options.position;if(i==="left"||i==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(i==="top"||i==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:i},left:s,top:n,width:o,height:r}=this;i&&(t.save(),t.fillStyle=i,t.fillRect(s,n,o,r),t.restore())}getLineWidthForValue(t){const i=this.options.grid;if(!this._isVisible()||!i.display)return 0;const n=this.ticks.findIndex(o=>o.value===t);return n>=0?i.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const i=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,r;const a=(l,c,u)=>{!u.width||!u.color||(s.save(),s.lineWidth=u.width,s.strokeStyle=u.color,s.setLineDash(u.borderDash||[]),s.lineDashOffset=u.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(i.display)for(o=0,r=n.length;o<r;++o){const l=n[o];i.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),i.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:i,options:{border:s,grid:n}}=this,o=s.setContext(this.getContext()),r=s.display?o.width:0;if(!r)return;const a=n.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,h,f;this.isHorizontal()?(c=qe(t,this.left,r)-r/2,u=qe(t,this.right,a)+a/2,h=f=l):(h=qe(t,this.top,r)-r/2,f=qe(t,this.bottom,a)+a/2,c=u=l),i.save(),i.lineWidth=o.width,i.strokeStyle=o.color,i.beginPath(),i.moveTo(c,h),i.lineTo(u,f),i.stroke(),i.restore()}drawLabels(t){if(!this.options.ticks.display)return;const s=this.ctx,n=this._computeLabelArea();n&&vn(s,n);const o=this.getLabelItems(t);for(const r of o){const a=r.options,l=r.font,c=r.label,u=r.textOffset;fs(s,c,0,u,l,a)}n&&wn(s)}drawTitle(){const{ctx:t,options:{position:i,title:s,reverse:n}}=this;if(!s.display)return;const o=Pt(s.font),r=Qt(s.padding),a=s.align;let l=o.lineHeight/2;i==="bottom"||i==="center"||J(i)?(l+=r.bottom,xt(s.text)&&(l+=o.lineHeight*(s.text.length-1))):l+=r.top;const{titleX:c,titleY:u,maxWidth:h,rotation:f}=Hp(this,l,i,a);fs(t,s.text,0,0,o,{color:s.color,maxWidth:h,rotation:f,textAlign:Fp(a,i,n),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,i=t.ticks&&t.ticks.z||0,s=X(t.grid&&t.grid.z,-1),n=X(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Pi.prototype.draw?[{z:i,draw:o=>{this.draw(o)}}]:[{z:s,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:i,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const i=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[];let o,r;for(o=0,r=i.length;o<r;++o){const a=i[o];a[s]===this.id&&(!t||a.type===t)&&n.push(a)}return n}_resolveTickFontOptions(t){const i=this.options.ticks.setContext(this.getContext(t));return Pt(i.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Ls{constructor(t,i,s){this.type=t,this.scope=i,this.override=s,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const i=Object.getPrototypeOf(t);let s;zp(i)&&(s=this.register(i));const n=this.items,o=t.id,r=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in n||(n[o]=t,Bp(t,r,s),this.override&&pt.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){const i=this.items,s=t.id,n=this.scope;s in i&&delete i[s],n&&s in pt[n]&&(delete pt[n][s],this.override&&delete ai[s])}}function Bp(e,t,i){const s=cs(Object.create(null),[i?pt.get(i):{},pt.get(t),e.defaults]);pt.set(t,s),e.defaultRoutes&&Np(t,e.defaultRoutes),e.descriptors&&pt.describe(t,e.descriptors)}function Np(e,t){Object.keys(t).forEach(i=>{const s=i.split("."),n=s.pop(),o=[e].concat(s).join("."),r=t[i].split("."),a=r.pop(),l=r.join(".");pt.route(o,n,l,a)})}function zp(e){return"id"in e&&"defaults"in e}class Wp{constructor(){this.controllers=new Ls(es,"datasets",!0),this.elements=new Ls(ci,"elements"),this.plugins=new Ls(Object,"plugins"),this.scales=new Ls(Pi,"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,i,s){[...i].forEach(n=>{const o=s||this._getRegistryForType(n);s||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):nt(n,r=>{const a=s||this._getRegistryForType(r);this._exec(t,a,r)})})}_exec(t,i,s){const n=$o(t);ft(s["before"+n],[],s),i[t](s),ft(s["after"+n],[],s)}_getRegistryForType(t){for(let i=0;i<this._typedRegistries.length;i++){const s=this._typedRegistries[i];if(s.isForType(t))return s}return this.plugins}_get(t,i,s){const n=i.get(t);if(n===void 0)throw new Error('"'+t+'" is not a registered '+s+".");return n}}var de=new Wp;class $p{constructor(){this._init=void 0}notify(t,i,s,n){if(i==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),this._init===void 0)return;const o=n?this._descriptors(t).filter(n):this._descriptors(t),r=this._notify(o,t,i,s);return i==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),r}_notify(t,i,s,n){n=n||{};for(const o of t){const r=o.plugin,a=r[s],l=[i,n,o.options];if(ft(a,l,r)===!1&&n.cancelable)return!1}return!0}invalidate(){ht(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const i=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),i}_createDescriptors(t,i){const s=t&&t.config,n=X(s.options&&s.options.plugins,{}),o=Vp(s);return n===!1&&!i?[]:Up(t,o,n,i)}_notifyStateChanges(t){const i=this._oldCache||[],s=this._cache,n=(o,r)=>o.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(n(i,s),t,"stop"),this._notify(n(s,i),t,"start")}}function Vp(e){const t={},i=[],s=Object.keys(de.plugins.items);for(let o=0;o<s.length;o++)i.push(de.getPlugin(s[o]));const n=e.plugins||[];for(let o=0;o<n.length;o++){const r=n[o];i.indexOf(r)===-1&&(i.push(r),t[r.id]=!0)}return{plugins:i,localIds:t}}function jp(e,t){return!t&&e===!1?null:e===!0?{}:e}function Up(e,{plugins:t,localIds:i},s,n){const o=[],r=e.getContext();for(const a of t){const l=a.id,c=jp(s[l],n);c!==null&&o.push({plugin:a,options:Kp(e.config,{plugin:a,local:i[l]},c,r)})}return o}function Kp(e,{plugin:t,local:i},s,n){const o=e.pluginScopeKeys(t),r=e.getOptionScopes(s,o);return i&&t.defaults&&r.push(t.defaults),e.createResolver(r,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function po(e,t){const i=pt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||i.indexAxis||"x"}function Yp(e,t){let i=e;return e==="_index_"?i=t:e==="_value_"&&(i=t==="x"?"y":"x"),i}function Gp(e,t){return e===t?"_index_":"_value_"}function ma(e){if(e==="x"||e==="y"||e==="r")return e}function qp(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function mo(e,...t){if(ma(e))return e;for(const i of t){const s=i.axis||qp(i.position)||e.length>1&&ma(e[0].toLowerCase());if(s)return s}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function ba(e,t,i){if(i[t+"AxisID"]===e)return{axis:t}}function Xp(e,t){if(t.data&&t.data.datasets){const i=t.data.datasets.filter(s=>s.xAxisID===e||s.yAxisID===e);if(i.length)return ba(e,"x",i[0])||ba(e,"y",i[0])}return{}}function Qp(e,t){const i=ai[e.type]||{scales:{}},s=t.scales||{},n=po(e.type,t),o=Object.create(null);return Object.keys(s).forEach(r=>{const a=s[r];if(!J(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const l=mo(r,a,Xp(r,e),pt.scales[a.type]),c=Gp(l,n),u=i.scales||{};o[r]=Xi(Object.create(null),[{axis:l},a,u[l],u[c]])}),e.data.datasets.forEach(r=>{const a=r.type||e.type,l=r.indexAxis||po(a,t),u=(ai[a]||{}).scales||{};Object.keys(u).forEach(h=>{const f=Yp(h,l),d=r[f+"AxisID"]||f;o[d]=o[d]||Object.create(null),Xi(o[d],[{axis:f},s[d],u[h]])})}),Object.keys(o).forEach(r=>{const a=o[r];Xi(a,[pt.scales[a.type],pt.scale])}),o}function Ic(e){const t=e.options||(e.options={});t.plugins=X(t.plugins,{}),t.scales=Qp(e,t)}function Lc(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Jp(e){return e=e||{},e.data=Lc(e.data),Ic(e),e}const _a=new Map,Rc=new Set;function Rs(e,t){let i=_a.get(e);return i||(i=t(),_a.set(e,i),Rc.add(i)),i}const Hi=(e,t,i)=>{const s=nn(t,i);s!==void 0&&e.add(s)};class Zp{constructor(t){this._config=Jp(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=Lc(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(),Ic(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Rs(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,i){return Rs(`${t}.transition.${i}`,()=>[[`datasets.${t}.transitions.${i}`,`transitions.${i}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,i){return Rs(`${t}-${i}`,()=>[[`datasets.${t}.elements.${i}`,`datasets.${t}`,`elements.${i}`,""]])}pluginScopeKeys(t){const i=t.id,s=this.type;return Rs(`${s}-plugin-${i}`,()=>[[`plugins.${i}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,i){const s=this._scopeCache;let n=s.get(t);return(!n||i)&&(n=new Map,s.set(t,n)),n}getOptionScopes(t,i,s){const{options:n,type:o}=this,r=this._cachedScopes(t,s),a=r.get(i);if(a)return a;const l=new Set;i.forEach(u=>{t&&(l.add(t),u.forEach(h=>Hi(l,t,h))),u.forEach(h=>Hi(l,n,h)),u.forEach(h=>Hi(l,ai[o]||{},h)),u.forEach(h=>Hi(l,pt,h)),u.forEach(h=>Hi(l,ho,h))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Rc.has(i)&&r.set(i,c),c}chartOptionScopes(){const{options:t,type:i}=this;return[t,ai[i]||{},pt.datasets[i]||{},{type:i},pt,ho]}resolveNamedOptions(t,i,s,n=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=xa(this._resolverCache,t,n);let l=r;if(em(r,i)){o.$shared=!1,s=Ve(s)?s():s;const c=this.createResolver(t,s,a);l=Ci(r,s,c)}for(const c of i)o[c]=l[c];return o}createResolver(t,i,s=[""],n){const{resolver:o}=xa(this._resolverCache,t,s);return J(i)?Ci(o,i,void 0,n):o}}function xa(e,t,i){let s=e.get(t);s||(s=new Map,e.set(t,s));const n=i.join();let o=s.get(n);return o||(o={resolver:Ko(t,i),subPrefixes:i.filter(a=>!a.toLowerCase().includes("hover"))},s.set(n,o)),o}const tm=e=>J(e)&&Object.getOwnPropertyNames(e).some(t=>Ve(e[t]));function em(e,t){const{isScriptable:i,isIndexable:s}=pc(e);for(const n of t){const o=i(n),r=s(n),a=(r||o)&&e[n];if(o&&(Ve(a)||tm(a))||r&&xt(a))return!0}return!1}var im="4.5.1";const sm=["top","bottom","left","right","chartArea"];function ya(e,t){return e==="top"||e==="bottom"||sm.indexOf(e)===-1&&t==="x"}function va(e,t){return function(i,s){return i[e]===s[e]?i[t]-s[t]:i[e]-s[e]}}function wa(e){const t=e.chart,i=t.options.animation;t.notifyPlugins("afterRender"),ft(i&&i.onComplete,[e],t)}function nm(e){const t=e.chart,i=t.options.animation;ft(i&&i.onProgress,[e],t)}function Fc(e){return qo()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const js={},Sa=e=>{const t=Fc(e);return Object.values(js).filter(i=>i.canvas===t).pop()};function om(e,t,i){const s=Object.keys(e);for(const n of s){const o=+n;if(o>=t){const r=e[n];delete e[n],(i>0||o>t)&&(e[o+i]=r)}}}function rm(e,t,i,s){return!i||e.type==="mouseout"?null:s?t:e}var Fe;let Cn=(Fe=class{static register(...t){de.add(...t),Ma()}static unregister(...t){de.remove(...t),Ma()}constructor(t,i){const s=this.config=new Zp(i),n=Fc(t),o=Sa(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||Mp(n)),this.platform.updateConfig(s);const a=this.platform.acquireContext(n,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=fd(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new $p,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Id(h=>this.update(h),r.resizeDelay||0),this._dataChanges=[],js[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Me.listen(this,"complete",wa),Me.listen(this,"progress",nm),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:i},width:s,height:n,_aspectRatio:o}=this;return ht(t)?i&&o?o:n?s/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return de}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():qr(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Kr(this.canvas,this.ctx),this}stop(){return Me.stop(this),this}resize(t,i){Me.running(this)?this._resizeBeforeDraw={width:t,height:i}:this._resize(t,i)}_resize(t,i){const s=this.options,n=this.canvas,o=s.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(n,t,i,o),a=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,qr(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),ft(s.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const i=this.options.scales||{};nt(i,(s,n)=>{s.id=n})}buildOrUpdateScales(){const t=this.options,i=t.scales,s=this.scales,n=Object.keys(s).reduce((r,a)=>(r[a]=!1,r),{});let o=[];i&&(o=o.concat(Object.keys(i).map(r=>{const a=i[r],l=mo(r,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),nt(o,r=>{const a=r.options,l=a.id,c=mo(l,a),u=X(a.type,r.dtype);(a.position===void 0||ya(a.position,c)!==ya(r.dposition))&&(a.position=r.dposition),n[l]=!0;let h=null;if(l in s&&s[l].type===u)h=s[l];else{const f=de.getScale(u);h=new f({id:l,type:u,ctx:this.ctx,chart:this}),s[h.id]=h}h.init(a,t)}),nt(n,(r,a)=>{r||delete s[a]}),nt(s,r=>{qt.configure(this,r,r.options),qt.addBox(this,r)})}_updateMetasets(){const t=this._metasets,i=this.data.datasets.length,s=t.length;if(t.sort((n,o)=>n.index-o.index),s>i){for(let n=i;n<s;++n)this._destroyDatasetMeta(n);t.splice(i,s-i)}this._sortedMetasets=t.slice(0).sort(va("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:i}}=this;t.length>i.length&&delete this._stacks,t.forEach((s,n)=>{i.filter(o=>o===s._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],i=this.data.datasets;let s,n;for(this._removeUnreferencedMetasets(),s=0,n=i.length;s<n;s++){const o=i[s];let r=this.getDatasetMeta(s);const a=o.type||this.config.type;if(r.type&&r.type!==a&&(this._destroyDatasetMeta(s),r=this.getDatasetMeta(s)),r.type=a,r.indexAxis=o.indexAxis||po(a,this.options),r.order=o.order||0,r.index=s,r.label=""+o.label,r.visible=this.isDatasetVisible(s),r.controller)r.controller.updateIndex(s),r.controller.linkScales();else{const l=de.getController(a),{datasetElementType:c,dataElementType:u}=pt.datasets[a];Object.assign(l,{dataElementType:de.getElement(u),datasetElementType:c&&de.getElement(c)}),r.controller=new l(this,s),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){nt(this.data.datasets,(t,i)=>{this.getDatasetMeta(i).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const i=this.config;i.update();const s=this._options=i.createResolver(i.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:h}=this.getDatasetMeta(c),f=!n&&o.indexOf(h)===-1;h.buildOrUpdateElements(f),r=Math.max(+h.getMaxOverflow(),r)}r=this._minPadding=s.layout.autoPadding?r:0,this._updateLayout(r),n||nt(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(va("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){nt(this.scales,t=>{qt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,i=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!Fr(i,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,i=this._getUniformDataChanges()||[];for(const{method:s,start:n,count:o}of i){const r=s==="_removeElements"?-o:o;om(t,n,r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const i=this.data.datasets.length,s=o=>new Set(t.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),n=s(0);for(let o=1;o<i;o++)if(!Fr(n,s(o)))return;return Array.from(n).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;qt.update(this,this.width,this.height,t);const i=this.chartArea,s=i.width<=0||i.height<=0;this._layers=[],nt(this.boxes,n=>{s&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let i=0,s=this.data.datasets.length;i<s;++i)this.getDatasetMeta(i).controller.configure();for(let i=0,s=this.data.datasets.length;i<s;++i)this._updateDataset(i,Ve(t)?t({datasetIndex:i}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,i){const s=this.getDatasetMeta(t),n={meta:s,index:t,mode:i,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",n)!==!1&&(s.controller._update(i),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Me.has(this)?this.attached&&!Me.running(this)&&Me.start(this):(this.draw(),wa({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:s,height:n}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(s,n)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const i=this._layers;for(t=0;t<i.length&&i[t].z<=0;++t)i[t].draw(this.chartArea);for(this._drawDatasets();t<i.length;++t)i[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const i=this._sortedMetasets,s=[];let n,o;for(n=0,o=i.length;n<o;++n){const r=i[n];(!t||r.visible)&&s.push(r)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let i=t.length-1;i>=0;--i)this._drawDataset(t[i]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const i=this.ctx,s={meta:t,index:t.index,cancelable:!0},n=Cc(this,t);this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(n&&vn(i,n),t.controller.draw(),n&&wn(i),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return hs(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,i,s,n){const o=sp.modes[i];return typeof o=="function"?o(this,t,s,n):[]}getDatasetMeta(t){const i=this.data.datasets[t],s=this._metasets;let n=s.filter(o=>o&&o._dataset===i).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:i&&i.order||0,index:t,_dataset:i,_parsed:[],_sorted:!1},s.push(n)),n}getContext(){return this.$context||(this.$context=li(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const i=this.data.datasets[t];if(!i)return!1;const s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!i.hidden}setDatasetVisibility(t,i){const s=this.getDatasetMeta(t);s.hidden=!i}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,i,s){const n=s?"show":"hide",o=this.getDatasetMeta(t),r=o.controller._resolveAnimations(void 0,n);on(i)?(o.data[i].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),r.update(o,{visible:s}),this.update(a=>a.datasetIndex===t?n:void 0))}hide(t,i){this._updateVisibility(t,i,!1)}show(t,i){this._updateVisibility(t,i,!0)}_destroyDatasetMeta(t){const i=this._metasets[t];i&&i.controller&&i.controller._destroy(),delete this._metasets[t]}_stop(){let t,i;for(this.stop(),Me.remove(this),t=0,i=this.data.datasets.length;t<i;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:i}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Kr(t,i),this.platform.releaseContext(i),this.canvas=null,this.ctx=null),delete js[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,i=this.platform,s=(o,r)=>{i.addEventListener(this,o,r),t[o]=r},n=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};nt(this.options.events,o=>s(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,i=this.platform,s=(l,c)=>{i.addEventListener(this,l,c),t[l]=c},n=(l,c)=>{t[l]&&(i.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const a=()=>{n("attach",a),this.attached=!0,this.resize(),s("resize",o),s("detach",r)};r=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),s("attach",a)},i.isAttached(this.canvas)?a():r()}unbindEvents(){nt(this._listeners,(t,i)=>{this.platform.removeEventListener(this,i,t)}),this._listeners={},nt(this._responsiveListeners,(t,i)=>{this.platform.removeEventListener(this,i,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,i,s){const n=s?"set":"remove";let o,r,a,l;for(i==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){r=t[a];const c=r&&this.getDatasetMeta(r.datasetIndex).controller;c&&c[n+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const i=this._active||[],s=t.map(({datasetIndex:o,index:r})=>{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!en(s,i)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,i))}notifyPlugins(t,i,s){return this._plugins.notify(this,t,i,s)}isPluginEnabled(t){return this._plugins._cache.filter(i=>i.plugin.id===t).length===1}_updateHoverStyles(t,i,s){const n=this.options.hover,o=(l,c)=>l.filter(u=>!c.some(h=>u.datasetIndex===h.datasetIndex&&u.index===h.index)),r=o(i,t),a=s?t:o(t,i);r.length&&this.updateHoverStyle(r,n.mode,!1),a.length&&n.mode&&this.updateHoverStyle(a,n.mode,!0)}_eventHandler(t,i){const s={event:t,replay:i,cancelable:!0,inChartArea:this.isPointInArea(t)},n=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,n)===!1)return;const o=this._handleEvent(t,i,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,n),(o||s.changed)&&this.render(),this}_handleEvent(t,i,s){const{_active:n=[],options:o}=this,r=i,a=this._getActiveElements(t,n,s,r),l=_d(t),c=rm(t,this._lastEvent,s,l);s&&(this._lastEvent=null,ft(o.onHover,[t,a,this],this),l&&ft(o.onClick,[t,a,this],this));const u=!en(a,n);return(u||i)&&(this._active=a,this._updateHoverStyles(a,n,i)),this._lastEvent=c,u}_getActiveElements(t,i,s,n){if(t.type==="mouseout")return[];if(!s)return i;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}},K(Fe,"defaults",pt),K(Fe,"instances",js),K(Fe,"overrides",ai),K(Fe,"registry",de),K(Fe,"version",im),K(Fe,"getChart",Sa),Fe);function Ma(){return nt(Cn.instances,e=>e._plugins.invalidate())}function Hc(e,t,i=t){e.lineCap=X(i.borderCapStyle,t.borderCapStyle),e.setLineDash(X(i.borderDash,t.borderDash)),e.lineDashOffset=X(i.borderDashOffset,t.borderDashOffset),e.lineJoin=X(i.borderJoinStyle,t.borderJoinStyle),e.lineWidth=X(i.borderWidth,t.borderWidth),e.strokeStyle=X(i.borderColor,t.borderColor)}function am(e,t,i){e.lineTo(i.x,i.y)}function lm(e){return e.stepped?Yd:e.tension||e.cubicInterpolationMode==="monotone"?Gd:am}function Bc(e,t,i={}){const s=e.length,{start:n=0,end:o=s-1}=i,{start:r,end:a}=t,l=Math.max(n,r),c=Math.min(o,a),u=n<r&&o<r||n>a&&o>a;return{count:s,start:l,loop:t.loop,ilen:c<l&&!u?s+c-l:c-l}}function cm(e,t,i,s){const{points:n,options:o}=t,{count:r,start:a,loop:l,ilen:c}=Bc(n,i,s),u=lm(o);let{move:h=!0,reverse:f}=s||{},d,_,p;for(d=0;d<=c;++d)_=n[(a+(f?c-d:d))%r],!_.skip&&(h?(e.moveTo(_.x,_.y),h=!1):u(e,p,_,f,o.stepped),p=_);return l&&(_=n[(a+(f?c:0))%r],u(e,p,_,f,o.stepped)),!!l}function um(e,t,i,s){const n=t.points,{count:o,start:r,ilen:a}=Bc(n,i,s),{move:l=!0,reverse:c}=s||{};let u=0,h=0,f,d,_,p,m,x;const M=w=>(r+(c?a-w:w))%o,C=()=>{p!==m&&(e.lineTo(u,m),e.lineTo(u,p),e.lineTo(u,x))};for(l&&(d=n[M(0)],e.moveTo(d.x,d.y)),f=0;f<=a;++f){if(d=n[M(f)],d.skip)continue;const w=d.x,v=d.y,D=w|0;D===_?(v<p?p=v:v>m&&(m=v),u=(h*u+w)/++h):(C(),e.lineTo(w,v),_=D,h=0,p=m=v),x=v}C()}function bo(e){const t=e.options,i=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!i?um:cm}function hm(e){return e.stepped?kg:e.tension||e.cubicInterpolationMode==="monotone"?Pg:Ze}function fm(e,t,i,s){let n=t._path;n||(n=t._path=new Path2D,t.path(n,i,s)&&n.closePath()),Hc(e,t.options),e.stroke(n)}function dm(e,t,i,s){const{segments:n,options:o}=t,r=bo(t);for(const a of n)Hc(e,o,a.style),e.beginPath(),r(e,t,a,{start:i,end:i+s-1})&&e.closePath(),e.stroke()}const gm=typeof Path2D=="function";function pm(e,t,i,s){gm&&!t.options.segment?fm(e,t,i,s):dm(e,t,i,s)}class We extends ci{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,i){const s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){const n=s.spanGaps?this._loop:this._fullLoop;xg(this._points,s,t,n,i),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Lg(this,this.options.segment))}first(){const t=this.segments,i=this.points;return t.length&&i[t[0].start]}last(){const t=this.segments,i=this.points,s=t.length;return s&&i[t[s-1].end]}interpolate(t,i){const s=this.options,n=t[i],o=this.points,r=Mc(this,{property:i,start:n,end:n});if(!r.length)return;const a=[],l=hm(s);let c,u;for(c=0,u=r.length;c<u;++c){const{start:h,end:f}=r[c],d=o[h],_=o[f];if(d===_){a.push(d);continue}const p=Math.abs((n-d[i])/(_[i]-d[i])),m=l(d,_,p,s.stepped);m[i]=t[i],a.push(m)}return a.length===1?a[0]:a}pathSegment(t,i,s){return bo(this)(t,this,i,s)}path(t,i,s){const n=this.segments,o=bo(this);let r=this._loop;i=i||0,s=s||this.points.length-i;for(const a of n)r&=o(t,this,a,{start:i,end:i+s-1});return!!r}draw(t,i,s,n){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),pm(t,this,s,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}K(We,"id","line"),K(We,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),K(We,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),K(We,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Ca(e,t,i,s){const n=e.options,{[i]:o}=e.getProps([i],s);return Math.abs(t-o)<n.radius+n.hitRadius}class Us extends ci{constructor(i){super();K(this,"parsed");K(this,"skip");K(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,i&&Object.assign(this,i)}inRange(i,s,n){const o=this.options,{x:r,y:a}=this.getProps(["x","y"],n);return Math.pow(i-r,2)+Math.pow(s-a,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(i,s){return Ca(this,i,"x",s)}inYRange(i,s){return Ca(this,i,"y",s)}getCenterPoint(i){const{x:s,y:n}=this.getProps(["x","y"],i);return{x:s,y:n}}size(i){i=i||this.options||{};let s=i.radius||0;s=Math.max(s,s&&i.hoverRadius||0);const n=s&&i.borderWidth||0;return(s+n)*2}draw(i,s){const n=this.options;this.skip||n.radius<.1||!hs(this,s,this.size(n)/2)||(i.strokeStyle=n.borderColor,i.lineWidth=n.borderWidth,i.fillStyle=n.backgroundColor,fo(i,n,this.x,this.y))}getRange(){const i=this.options||{};return i.radius+i.hitRadius}}K(Us,"id","point"),K(Us,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),K(Us,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function mm(e,t,i){const s=e.segments,n=e.points,o=t.points,r=[];for(const a of s){let{start:l,end:c}=a;c=Tn(l,c,n);const u=_o(i,n[l],n[c],a.loop);if(!t.segments){r.push({source:a,target:u,start:n[l],end:n[c]});continue}const h=Mc(t,u);for(const f of h){const d=_o(i,o[f.start],o[f.end],f.loop),_=Sc(a,n,d);for(const p of _)r.push({source:p,target:f,start:{[i]:Ta(u,d,"start",Math.max)},end:{[i]:Ta(u,d,"end",Math.min)}})}}return r}function _o(e,t,i,s){if(s)return;let n=t[e],o=i[e];return e==="angle"&&(n=ge(n),o=ge(o)),{property:e,start:n,end:o}}function bm(e,t){const{x:i=null,y:s=null}=e||{},n=t.points,o=[];return t.segments.forEach(({start:r,end:a})=>{a=Tn(r,a,n);const l=n[r],c=n[a];s!==null?(o.push({x:l.x,y:s}),o.push({x:c.x,y:s})):i!==null&&(o.push({x:i,y:l.y}),o.push({x:i,y:c.y}))}),o}function Tn(e,t,i){for(;t>e;t--){const s=i[t];if(!isNaN(s.x)&&!isNaN(s.y))break}return t}function Ta(e,t,i,s){return e&&t?s(e[i],t[i]):e?e[i]:t?t[i]:0}function Nc(e,t){let i=[],s=!1;return xt(e)?(s=!0,i=e):i=bm(e,t),i.length?new We({points:i,options:{tension:0},_loop:s,_fullLoop:s}):null}function ka(e){return e&&e.fill!==!1}function _m(e,t,i){let n=e[t].fill;const o=[t];let r;if(!i)return n;for(;n!==!1&&o.indexOf(n)===-1;){if(!At(n))return n;if(r=e[n],!r)return!1;if(r.visible)return n;o.push(n),n=r.fill}return!1}function xm(e,t,i){const s=Sm(e);if(J(s))return isNaN(s.value)?!1:s;let n=parseFloat(s);return At(n)&&Math.floor(n)===n?ym(s[0],t,n,i):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function ym(e,t,i,s){return(e==="-"||e==="+")&&(i=t+i),i===t||i<0||i>=s?!1:i}function vm(e,t){let i=null;return e==="start"?i=t.bottom:e==="end"?i=t.top:J(e)?i=t.getPixelForValue(e.value):t.getBasePixel&&(i=t.getBasePixel()),i}function wm(e,t,i){let s;return e==="start"?s=i:e==="end"?s=t.options.reverse?t.min:t.max:J(e)?s=e.value:s=t.getBaseValue(),s}function Sm(e){const t=e.options,i=t.fill;let s=X(i&&i.target,i);return s===void 0&&(s=!!t.backgroundColor),s===!1||s===null?!1:s===!0?"origin":s}function Mm(e){const{scale:t,index:i,line:s}=e,n=[],o=s.segments,r=s.points,a=Cm(t,i);a.push(Nc({x:null,y:t.bottom},s));for(let l=0;l<o.length;l++){const c=o[l];for(let u=c.start;u<=c.end;u++)Tm(n,r[u],a)}return new We({points:n,options:{}})}function Cm(e,t){const i=[],s=e.getMatchingVisibleMetas("line");for(let n=0;n<s.length;n++){const o=s[n];if(o.index===t)break;o.hidden||i.unshift(o.dataset)}return i}function Tm(e,t,i){const s=[];for(let n=0;n<i.length;n++){const o=i[n],{first:r,last:a,point:l}=km(o,t,"x");if(!(!l||r&&a)){if(r)s.unshift(l);else if(e.push(l),!a)break}}e.push(...s)}function km(e,t,i){const s=e.interpolate(t,i);if(!s)return{};const n=s[i],o=e.segments,r=e.points;let a=!1,l=!1;for(let c=0;c<o.length;c++){const u=o[c],h=r[u.start][i],f=r[u.end][i];if(mi(n,h,f)){a=n===h,l=n===f;break}}return{first:a,last:l,point:s}}class zc{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,i,s){const{x:n,y:o,radius:r}=this;return i=i||{start:0,end:ie},t.arc(n,o,r,i.end,i.start,!0),!s.bounds}interpolate(t){const{x:i,y:s,radius:n}=this,o=t.angle;return{x:i+Math.cos(o)*n,y:s+Math.sin(o)*n,angle:o}}}function Pm(e){const{chart:t,fill:i,line:s}=e;if(At(i))return Om(t,i);if(i==="stack")return Mm(e);if(i==="shape")return!0;const n=Am(e);return n instanceof zc?n:Nc(n,s)}function Om(e,t){const i=e.getDatasetMeta(t);return i&&e.isDatasetVisible(t)?i.dataset:null}function Am(e){return(e.scale||{}).getPointPositionForValue?Em(e):Dm(e)}function Dm(e){const{scale:t={},fill:i}=e,s=vm(i,t);if(At(s)){const n=t.isHorizontal();return{x:n?s:null,y:n?null:s}}return null}function Em(e){const{scale:t,fill:i}=e,s=t.options,n=t.getLabels().length,o=s.reverse?t.max:t.min,r=wm(i,t,o),a=[];if(s.grid.circular){const l=t.getPointPositionForValue(0,o);return new zc({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(r)})}for(let l=0;l<n;++l)a.push(t.getPointPositionForValue(l,r));return a}function qn(e,t,i){const s=Pm(t),{chart:n,index:o,line:r,scale:a,axis:l}=t,c=r.options,u=c.fill,h=c.backgroundColor,{above:f=h,below:d=h}=u||{},_=n.getDatasetMeta(o),p=Cc(n,_);s&&r.points.length&&(vn(e,i),Im(e,{line:r,target:s,above:f,below:d,area:i,scale:a,axis:l,clip:p}),wn(e))}function Im(e,t){const{line:i,target:s,above:n,below:o,area:r,scale:a,clip:l}=t,c=i._loop?"angle":t.axis;e.save();let u=o;o!==n&&(c==="x"?(Pa(e,s,r.top),Xn(e,{line:i,target:s,color:n,scale:a,property:c,clip:l}),e.restore(),e.save(),Pa(e,s,r.bottom)):c==="y"&&(Oa(e,s,r.left),Xn(e,{line:i,target:s,color:o,scale:a,property:c,clip:l}),e.restore(),e.save(),Oa(e,s,r.right),u=n)),Xn(e,{line:i,target:s,color:u,scale:a,property:c,clip:l}),e.restore()}function Pa(e,t,i){const{segments:s,points:n}=t;let o=!0,r=!1;e.beginPath();for(const a of s){const{start:l,end:c}=a,u=n[l],h=n[Tn(l,c,n)];o?(e.moveTo(u.x,u.y),o=!1):(e.lineTo(u.x,i),e.lineTo(u.x,u.y)),r=!!t.pathSegment(e,a,{move:r}),r?e.closePath():e.lineTo(h.x,i)}e.lineTo(t.first().x,i),e.closePath(),e.clip()}function Oa(e,t,i){const{segments:s,points:n}=t;let o=!0,r=!1;e.beginPath();for(const a of s){const{start:l,end:c}=a,u=n[l],h=n[Tn(l,c,n)];o?(e.moveTo(u.x,u.y),o=!1):(e.lineTo(i,u.y),e.lineTo(u.x,u.y)),r=!!t.pathSegment(e,a,{move:r}),r?e.closePath():e.lineTo(i,h.y)}e.lineTo(i,t.first().y),e.closePath(),e.clip()}function Xn(e,t){const{line:i,target:s,property:n,color:o,scale:r,clip:a}=t,l=mm(i,s,n);for(const{source:c,target:u,start:h,end:f}of l){const{style:{backgroundColor:d=o}={}}=c,_=s!==!0;e.save(),e.fillStyle=d,Lm(e,r,a,_&&_o(n,h,f)),e.beginPath();const p=!!i.pathSegment(e,c);let m;if(_){p?e.closePath():Aa(e,s,f,n);const x=!!s.pathSegment(e,u,{move:p,reverse:!0});m=p&&x,m||Aa(e,s,h,n)}e.closePath(),e.fill(m?"evenodd":"nonzero"),e.restore()}}function Lm(e,t,i,s){const n=t.chart.chartArea,{property:o,start:r,end:a}=s||{};if(o==="x"||o==="y"){let l,c,u,h;o==="x"?(l=r,c=n.top,u=a,h=n.bottom):(l=n.left,c=r,u=n.right,h=a),e.beginPath(),i&&(l=Math.max(l,i.left),u=Math.min(u,i.right),c=Math.max(c,i.top),h=Math.min(h,i.bottom)),e.rect(l,c,u-l,h-c),e.clip()}}function Aa(e,t,i,s){const n=t.interpolate(i,s);n&&e.lineTo(n.x,n.y)}var Rm={id:"filler",afterDatasetsUpdate(e,t,i){const s=(e.data.datasets||[]).length,n=[];let o,r,a,l;for(r=0;r<s;++r)o=e.getDatasetMeta(r),a=o.dataset,l=null,a&&a.options&&a instanceof We&&(l={visible:e.isDatasetVisible(r),index:r,fill:xm(a,r,s),chart:e,axis:o.controller.options.indexAxis,scale:o.vScale,line:a}),o.$filler=l,n.push(l);for(r=0;r<s;++r)l=n[r],!(!l||l.fill===!1)&&(l.fill=_m(n,r,i.propagate))},beforeDraw(e,t,i){const s=i.drawTime==="beforeDraw",n=e.getSortedVisibleDatasetMetas(),o=e.chartArea;for(let r=n.length-1;r>=0;--r){const a=n[r].$filler;a&&(a.line.updateControlPoints(o,a.axis),s&&a.fill&&qn(e.ctx,a,o))}},beforeDatasetsDraw(e,t,i){if(i.drawTime!=="beforeDatasetsDraw")return;const s=e.getSortedVisibleDatasetMetas();for(let n=s.length-1;n>=0;--n){const o=s[n].$filler;ka(o)&&qn(e.ctx,o,e.chartArea)}},beforeDatasetDraw(e,t,i){const s=t.meta.$filler;!ka(s)||i.drawTime!=="beforeDatasetDraw"||qn(e.ctx,s,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Da=(e,t)=>{let{boxHeight:i=t,boxWidth:s=t}=e;return e.usePointStyle&&(i=Math.min(i,t),s=e.pointStyleWidth||Math.min(s,t)),{boxWidth:s,boxHeight:i,itemHeight:Math.max(t,i)}},Fm=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Ea extends ci{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,i,s){this.maxWidth=t,this.maxHeight=i,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let i=ft(t.generateLabels,[this.chart],this)||[];t.filter&&(i=i.filter(s=>t.filter(s,this.chart.data))),t.sort&&(i=i.sort((s,n)=>t.sort(s,n,this.chart.data))),this.options.reverse&&i.reverse(),this.legendItems=i}fit(){const{options:t,ctx:i}=this;if(!t.display){this.width=this.height=0;return}const s=t.labels,n=Pt(s.font),o=n.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=Da(s,o);let c,u;i.font=n.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(r,o,a,l)+10):(u=this.maxHeight,c=this._fitCols(r,n,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,i,s,n){const{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=n+a;let h=t;o.textAlign="left",o.textBaseline="middle";let f=-1,d=-u;return this.legendItems.forEach((_,p)=>{const m=s+i/2+o.measureText(_.text).width;(p===0||c[c.length-1]+m+2*a>r)&&(h+=u,c[c.length-(p>0?0:1)]=0,d+=u,f++),l[p]={left:0,top:d,row:f,width:m,height:n},c[c.length-1]+=m+a}),h}_fitCols(t,i,s,n){const{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=r-t;let h=a,f=0,d=0,_=0,p=0;return this.legendItems.forEach((m,x)=>{const{itemWidth:M,itemHeight:C}=Hm(s,i,o,m,n);x>0&&d+C+2*a>u&&(h+=f+a,c.push({width:f,height:d}),_+=f+a,p++,f=d=0),l[x]={left:_,top:d,col:p,width:M,height:C},f=Math.max(f,M),d+=C+a}),h+=f,c.push({width:f,height:d}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:i,options:{align:s,labels:{padding:n},rtl:o}}=this,r=vi(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=Tt(s,this.left+n,this.right-this.lineWidths[a]);for(const c of i)a!==c.row&&(a=c.row,l=Tt(s,this.left+n,this.right-this.lineWidths[a])),c.top+=this.top+t+n,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+n}else{let a=0,l=Tt(s,this.top+t+n,this.bottom-this.columnSizes[a].height);for(const c of i)c.col!==a&&(a=c.col,l=Tt(s,this.top+t+n,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+n,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;vn(t,this),this._draw(),wn(t)}}_draw(){const{options:t,columnSizes:i,lineWidths:s,ctx:n}=this,{align:o,labels:r}=t,a=pt.color,l=vi(t.rtl,this.left,this.width),c=Pt(r.font),{padding:u}=r,h=c.size,f=h/2;let d;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;const{boxWidth:_,boxHeight:p,itemHeight:m}=Da(r,h),x=function(D,E,L){if(isNaN(_)||_<=0||isNaN(p)||p<0)return;n.save();const N=X(L.lineWidth,1);if(n.fillStyle=X(L.fillStyle,a),n.lineCap=X(L.lineCap,"butt"),n.lineDashOffset=X(L.lineDashOffset,0),n.lineJoin=X(L.lineJoin,"miter"),n.lineWidth=N,n.strokeStyle=X(L.strokeStyle,a),n.setLineDash(X(L.lineDash,[])),r.usePointStyle){const j={radius:p*Math.SQRT2/2,pointStyle:L.pointStyle,rotation:L.rotation,borderWidth:N},H=l.xPlus(D,_/2),B=E+f;dc(n,j,H,B,r.pointStyleWidth&&_)}else{const j=E+Math.max((h-p)/2,0),H=l.leftForLtr(D,_),B=ts(L.borderRadius);n.beginPath(),Object.values(B).some(lt=>lt!==0)?go(n,{x:H,y:j,w:_,h:p,radius:B}):n.rect(H,j,_,p),n.fill(),N!==0&&n.stroke()}n.restore()},M=function(D,E,L){fs(n,L.text,D,E+m/2,c,{strikethrough:L.hidden,textAlign:l.textAlign(L.textAlign)})},C=this.isHorizontal(),w=this._computeTitleHeight();C?d={x:Tt(o,this.left+u,this.right-s[0]),y:this.top+u+w,line:0}:d={x:this.left+u,y:Tt(o,this.top+w+u,this.bottom-i[0].height),line:0},yc(this.ctx,t.textDirection);const v=m+u;this.legendItems.forEach((D,E)=>{n.strokeStyle=D.fontColor,n.fillStyle=D.fontColor;const L=n.measureText(D.text).width,N=l.textAlign(D.textAlign||(D.textAlign=r.textAlign)),j=_+f+L;let H=d.x,B=d.y;l.setWidth(this.width),C?E>0&&H+j+u>this.right&&(B=d.y+=v,d.line++,H=d.x=Tt(o,this.left+u,this.right-s[d.line])):E>0&&B+v>this.bottom&&(H=d.x=H+i[d.line].width+u,d.line++,B=d.y=Tt(o,this.top+w+u,this.bottom-i[d.line].height));const lt=l.x(H);if(x(lt,B,D),H=Ld(N,H+_+f,C?H+j:this.right,t.rtl),M(l.x(H),B,D),C)d.x+=j+u;else if(typeof D.text!="string"){const et=c.lineHeight;d.y+=Wc(D,et)+u}else d.y+=v}),vc(this.ctx,t.textDirection)}drawTitle(){const t=this.options,i=t.title,s=Pt(i.font),n=Qt(i.padding);if(!i.display)return;const o=vi(t.rtl,this.left,this.width),r=this.ctx,a=i.position,l=s.size/2,c=n.top+l;let u,h=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,h=Tt(t.align,h,this.right-f);else{const _=this.columnSizes.reduce((p,m)=>Math.max(p,m.height),0);u=c+Tt(t.align,this.top,this.bottom-_-t.labels.padding-this._computeTitleHeight())}const d=Tt(a,h,h+f);r.textAlign=o.textAlign(jo(a)),r.textBaseline="middle",r.strokeStyle=i.color,r.fillStyle=i.color,r.font=s.string,fs(r,i.text,d,u,s)}_computeTitleHeight(){const t=this.options.title,i=Pt(t.font),s=Qt(t.padding);return t.display?i.lineHeight+s.height:0}_getLegendItemAt(t,i){let s,n,o;if(mi(t,this.left,this.right)&&mi(i,this.top,this.bottom)){for(o=this.legendHitBoxes,s=0;s<o.length;++s)if(n=o[s],mi(t,n.left,n.left+n.width)&&mi(i,n.top,n.top+n.height))return this.legendItems[s]}return null}handleEvent(t){const i=this.options;if(!zm(t.type,i))return;const s=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const n=this._hoveredItem,o=Fm(n,s);n&&!o&&ft(i.onLeave,[t,n,this],this),this._hoveredItem=s,s&&!o&&ft(i.onHover,[t,s,this],this)}else s&&ft(i.onClick,[t,s,this],this)}}function Hm(e,t,i,s,n){const o=Bm(s,e,t,i),r=Nm(n,s,t.lineHeight);return{itemWidth:o,itemHeight:r}}function Bm(e,t,i,s){let n=e.text;return n&&typeof n!="string"&&(n=n.reduce((o,r)=>o.length>r.length?o:r)),t+i.size/2+s.measureText(n).width}function Nm(e,t,i){let s=e;return typeof t.text!="string"&&(s=Wc(t,i)),s}function Wc(e,t){const i=e.text?e.text.length:0;return t*i}function zm(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Wm={id:"legend",_element:Ea,start(e,t,i){const s=e.legend=new Ea({ctx:e.ctx,options:i,chart:e});qt.configure(e,s,i),qt.addBox(e,s)},stop(e){qt.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,i){const s=e.legend;qt.configure(e,s,i),s.options=i},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,i){const s=t.datasetIndex,n=i.chart;n.isDatasetVisible(s)?(n.hide(s),t.hidden=!0):(n.show(s),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:i,pointStyle:s,textAlign:n,color:o,useBorderRadius:r,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(i?0:void 0),u=Qt(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:s||c.pointStyle,rotation:c.rotation,textAlign:n||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color: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 $c extends ci{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,i){const s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=i;const n=xt(s.text)?s.text.length:1;this._padding=Qt(s.padding);const o=n*Pt(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:i,left:s,bottom:n,right:o,options:r}=this,a=r.align;let l=0,c,u,h;return this.isHorizontal()?(u=Tt(a,s,o),h=i+t,c=o-s):(r.position==="left"?(u=s+t,h=Tt(a,n,i),l=vt*-.5):(u=o-t,h=Tt(a,i,n),l=vt*.5),c=n-i),{titleX:u,titleY:h,maxWidth:c,rotation:l}}draw(){const t=this.ctx,i=this.options;if(!i.display)return;const s=Pt(i.font),o=s.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);fs(t,i.text,0,0,s,{color:i.color,maxWidth:l,rotation:c,textAlign:jo(i.align),textBaseline:"middle",translation:[r,a]})}}function $m(e,t){const i=new $c({ctx:e.ctx,options:t,chart:e});qt.configure(e,i,t),qt.addBox(e,i),e.titleBlock=i}var Vm={id:"title",_element:$c,start(e,t,i){$m(e,i)},stop(e){const t=e.titleBlock;qt.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,i){const s=e.titleBlock;qt.configure(e,s,i),s.options=i},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 $i={average(e){if(!e.length)return!1;let t,i,s=new Set,n=0,o=0;for(t=0,i=e.length;t<i;++t){const a=e[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();s.add(l.x),n+=l.y,++o}}return o===0||s.size===0?!1:{x:[...s].reduce((a,l)=>a+l)/s.size,y:n/o}},nearest(e,t){if(!e.length)return!1;let i=t.x,s=t.y,n=Number.POSITIVE_INFINITY,o,r,a;for(o=0,r=e.length;o<r;++o){const l=e[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=uo(t,c);u<n&&(n=u,a=l)}}if(a){const l=a.tooltipPosition();i=l.x,s=l.y}return{x:i,y:s}}};function he(e,t){return t&&(xt(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Ce(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
||
`)>-1?e.split(`
|
||
`):e}function jm(e,t){const{element:i,datasetIndex:s,index:n}=t,o=e.getDatasetMeta(s).controller,{label:r,value:a}=o.getLabelAndValue(n);return{chart:e,label:r,parsed:o.getParsed(n),raw:e.data.datasets[s].data[n],formattedValue:a,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:i}}function Ia(e,t){const i=e.chart.ctx,{body:s,footer:n,title:o}=e,{boxWidth:r,boxHeight:a}=t,l=Pt(t.bodyFont),c=Pt(t.titleFont),u=Pt(t.footerFont),h=o.length,f=n.length,d=s.length,_=Qt(t.padding);let p=_.height,m=0,x=s.reduce((w,v)=>w+v.before.length+v.lines.length+v.after.length,0);if(x+=e.beforeBody.length+e.afterBody.length,h&&(p+=h*c.lineHeight+(h-1)*t.titleSpacing+t.titleMarginBottom),x){const w=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;p+=d*w+(x-d)*l.lineHeight+(x-1)*t.bodySpacing}f&&(p+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let M=0;const C=function(w){m=Math.max(m,i.measureText(w).width+M)};return i.save(),i.font=c.string,nt(e.title,C),i.font=l.string,nt(e.beforeBody.concat(e.afterBody),C),M=t.displayColors?r+2+t.boxPadding:0,nt(s,w=>{nt(w.before,C),nt(w.lines,C),nt(w.after,C)}),M=0,i.font=u.string,nt(e.footer,C),i.restore(),m+=_.width,{width:m,height:p}}function Um(e,t){const{y:i,height:s}=t;return i<s/2?"top":i>e.height-s/2?"bottom":"center"}function Km(e,t,i,s){const{x:n,width:o}=s,r=i.caretSize+i.caretPadding;if(e==="left"&&n+o+r>t.width||e==="right"&&n-o-r<0)return!0}function Ym(e,t,i,s){const{x:n,width:o}=i,{width:r,chartArea:{left:a,right:l}}=e;let c="center";return s==="center"?c=n<=(a+l)/2?"left":"right":n<=o/2?c="left":n>=r-o/2&&(c="right"),Km(c,e,t,i)&&(c="center"),c}function La(e,t,i){const s=i.yAlign||t.yAlign||Um(e,i);return{xAlign:i.xAlign||t.xAlign||Ym(e,t,i,s),yAlign:s}}function Gm(e,t){let{x:i,width:s}=e;return t==="right"?i-=s:t==="center"&&(i-=s/2),i}function qm(e,t,i){let{y:s,height:n}=e;return t==="top"?s+=i:t==="bottom"?s-=n+i:s-=n/2,s}function Ra(e,t,i,s){const{caretSize:n,caretPadding:o,cornerRadius:r}=e,{xAlign:a,yAlign:l}=i,c=n+o,{topLeft:u,topRight:h,bottomLeft:f,bottomRight:d}=ts(r);let _=Gm(t,a);const p=qm(t,l,c);return l==="center"?a==="left"?_+=c:a==="right"&&(_-=c):a==="left"?_-=Math.max(u,f)+n:a==="right"&&(_+=Math.max(h,d)+n),{x:Gt(_,0,s.width-t.width),y:Gt(p,0,s.height-t.height)}}function Fs(e,t,i){const s=Qt(i.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-s.right:e.x+s.left}function Fa(e){return he([],Ce(e))}function Xm(e,t,i){return li(e,{tooltip:t,tooltipItems:i,type:"tooltip"})}function Ha(e,t){const i=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return i?e.override(i):e}const Vc={beforeTitle:Se,title(e){if(e.length>0){const t=e[0],i=t.chart.data.labels,s=i?i.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(s>0&&t.dataIndex<s)return i[t.dataIndex]}return""},afterTitle:Se,beforeBody:Se,beforeLabel:Se,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 i=e.formattedValue;return ht(i)||(t+=i),t},labelColor(e){const i=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:i.borderColor,backgroundColor:i.backgroundColor,borderWidth:i.borderWidth,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const i=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:i.pointStyle,rotation:i.rotation}},afterLabel:Se,afterBody:Se,beforeFooter:Se,footer:Se,afterFooter:Se};function Bt(e,t,i,s){const n=e[t].call(i,s);return typeof n>"u"?Vc[t].call(i,s):n}class xo extends ci{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 i=this.chart,s=this.options.setContext(this.getContext()),n=s.enabled&&i.options.animation&&s.animations,o=new Tc(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=Xm(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,i){const{callbacks:s}=i,n=Bt(s,"beforeTitle",this,t),o=Bt(s,"title",this,t),r=Bt(s,"afterTitle",this,t);let a=[];return a=he(a,Ce(n)),a=he(a,Ce(o)),a=he(a,Ce(r)),a}getBeforeBody(t,i){return Fa(Bt(i.callbacks,"beforeBody",this,t))}getBody(t,i){const{callbacks:s}=i,n=[];return nt(t,o=>{const r={before:[],lines:[],after:[]},a=Ha(s,o);he(r.before,Ce(Bt(a,"beforeLabel",this,o))),he(r.lines,Bt(a,"label",this,o)),he(r.after,Ce(Bt(a,"afterLabel",this,o))),n.push(r)}),n}getAfterBody(t,i){return Fa(Bt(i.callbacks,"afterBody",this,t))}getFooter(t,i){const{callbacks:s}=i,n=Bt(s,"beforeFooter",this,t),o=Bt(s,"footer",this,t),r=Bt(s,"afterFooter",this,t);let a=[];return a=he(a,Ce(n)),a=he(a,Ce(o)),a=he(a,Ce(r)),a}_createItems(t){const i=this._active,s=this.chart.data,n=[],o=[],r=[];let a=[],l,c;for(l=0,c=i.length;l<c;++l)a.push(jm(this.chart,i[l]));return t.filter&&(a=a.filter((u,h,f)=>t.filter(u,h,f,s))),t.itemSort&&(a=a.sort((u,h)=>t.itemSort(u,h,s))),nt(a,u=>{const h=Ha(t.callbacks,u);n.push(Bt(h,"labelColor",this,u)),o.push(Bt(h,"labelPointStyle",this,u)),r.push(Bt(h,"labelTextColor",this,u))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=r,this.dataPoints=a,a}update(t,i){const s=this.options.setContext(this.getContext()),n=this._active;let o,r=[];if(!n.length)this.opacity!==0&&(o={opacity:0});else{const a=$i[s.position].call(this,n,this._eventPosition);r=this._createItems(s),this.title=this.getTitle(r,s),this.beforeBody=this.getBeforeBody(r,s),this.body=this.getBody(r,s),this.afterBody=this.getAfterBody(r,s),this.footer=this.getFooter(r,s);const l=this._size=Ia(this,s),c=Object.assign({},a,l),u=La(this.chart,s,c),h=Ra(s,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:h.x,y:h.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=r,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:i})}drawCaret(t,i,s,n){const o=this.getCaretPosition(t,s,n);i.lineTo(o.x1,o.y1),i.lineTo(o.x2,o.y2),i.lineTo(o.x3,o.y3)}getCaretPosition(t,i,s){const{xAlign:n,yAlign:o}=this,{caretSize:r,cornerRadius:a}=s,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:h}=ts(a),{x:f,y:d}=t,{width:_,height:p}=i;let m,x,M,C,w,v;return o==="center"?(w=d+p/2,n==="left"?(m=f,x=m-r,C=w+r,v=w-r):(m=f+_,x=m+r,C=w-r,v=w+r),M=m):(n==="left"?x=f+Math.max(l,u)+r:n==="right"?x=f+_-Math.max(c,h)-r:x=this.caretX,o==="top"?(C=d,w=C-r,m=x-r,M=x+r):(C=d+p,w=C+r,m=x+r,M=x-r),v=C),{x1:m,x2:x,x3:M,y1:C,y2:w,y3:v}}drawTitle(t,i,s){const n=this.title,o=n.length;let r,a,l;if(o){const c=vi(s.rtl,this.x,this.width);for(t.x=Fs(this,s.titleAlign,s),i.textAlign=c.textAlign(s.titleAlign),i.textBaseline="middle",r=Pt(s.titleFont),a=s.titleSpacing,i.fillStyle=s.titleColor,i.font=r.string,l=0;l<o;++l)i.fillText(n[l],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+a,l+1===o&&(t.y+=s.titleMarginBottom-a)}}_drawColorBox(t,i,s,n,o){const r=this.labelColors[s],a=this.labelPointStyles[s],{boxHeight:l,boxWidth:c}=o,u=Pt(o.bodyFont),h=Fs(this,"left",o),f=n.x(h),d=l<u.lineHeight?(u.lineHeight-l)/2:0,_=i.y+d;if(o.usePointStyle){const p={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},m=n.leftForLtr(f,c)+c/2,x=_+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,fo(t,p,m,x),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,fo(t,p,m,x)}else{t.lineWidth=J(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;const p=n.leftForLtr(f,c),m=n.leftForLtr(n.xPlus(f,1),c-2),x=ts(r.borderRadius);Object.values(x).some(M=>M!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,go(t,{x:p,y:_,w:c,h:l,radius:x}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),go(t,{x:m,y:_+1,w:c-2,h:l-2,radius:x}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(p,_,c,l),t.strokeRect(p,_,c,l),t.fillStyle=r.backgroundColor,t.fillRect(m,_+1,c-2,l-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,i,s){const{body:n}=this,{bodySpacing:o,bodyAlign:r,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=s,h=Pt(s.bodyFont);let f=h.lineHeight,d=0;const _=vi(s.rtl,this.x,this.width),p=function(L){i.fillText(L,_.x(t.x+d),t.y+f/2),t.y+=f+o},m=_.textAlign(r);let x,M,C,w,v,D,E;for(i.textAlign=r,i.textBaseline="middle",i.font=h.string,t.x=Fs(this,m,s),i.fillStyle=s.bodyColor,nt(this.beforeBody,p),d=a&&m!=="right"?r==="center"?c/2+u:c+2+u:0,w=0,D=n.length;w<D;++w){for(x=n[w],M=this.labelTextColors[w],i.fillStyle=M,nt(x.before,p),C=x.lines,a&&C.length&&(this._drawColorBox(i,t,w,_,s),f=Math.max(h.lineHeight,l)),v=0,E=C.length;v<E;++v)p(C[v]),f=h.lineHeight;nt(x.after,p)}d=0,f=h.lineHeight,nt(this.afterBody,p),t.y-=o}drawFooter(t,i,s){const n=this.footer,o=n.length;let r,a;if(o){const l=vi(s.rtl,this.x,this.width);for(t.x=Fs(this,s.footerAlign,s),t.y+=s.footerMarginTop,i.textAlign=l.textAlign(s.footerAlign),i.textBaseline="middle",r=Pt(s.footerFont),i.fillStyle=s.footerColor,i.font=r.string,a=0;a<o;++a)i.fillText(n[a],l.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+s.footerSpacing}}drawBackground(t,i,s,n){const{xAlign:o,yAlign:r}=this,{x:a,y:l}=t,{width:c,height:u}=s,{topLeft:h,topRight:f,bottomLeft:d,bottomRight:_}=ts(n.cornerRadius);i.fillStyle=n.backgroundColor,i.strokeStyle=n.borderColor,i.lineWidth=n.borderWidth,i.beginPath(),i.moveTo(a+h,l),r==="top"&&this.drawCaret(t,i,s,n),i.lineTo(a+c-f,l),i.quadraticCurveTo(a+c,l,a+c,l+f),r==="center"&&o==="right"&&this.drawCaret(t,i,s,n),i.lineTo(a+c,l+u-_),i.quadraticCurveTo(a+c,l+u,a+c-_,l+u),r==="bottom"&&this.drawCaret(t,i,s,n),i.lineTo(a+d,l+u),i.quadraticCurveTo(a,l+u,a,l+u-d),r==="center"&&o==="left"&&this.drawCaret(t,i,s,n),i.lineTo(a,l+h),i.quadraticCurveTo(a,l,a+h,l),i.closePath(),i.fill(),n.borderWidth>0&&i.stroke()}_updateAnimationTarget(t){const i=this.chart,s=this.$animations,n=s&&s.x,o=s&&s.y;if(n||o){const r=$i[t.position].call(this,this._active,this._eventPosition);if(!r)return;const a=this._size=Ia(this,t),l=Object.assign({},r,this._size),c=La(i,t,l),u=Ra(t,l,c,i);(n._to!==u.x||o._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const i=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(i);const n={width:this.width,height:this.height},o={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const r=Qt(i.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;i.enabled&&a&&(t.save(),t.globalAlpha=s,this.drawBackground(o,t,n,i),yc(t,i.textDirection),o.y+=r.top,this.drawTitle(o,t,i),this.drawBody(o,t,i),this.drawFooter(o,t,i),vc(t,i.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,i){const s=this._active,n=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!en(s,n),r=this._positionChanged(n,i);(o||r)&&(this._active=n,this._eventPosition=i,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,i,s=!0){if(i&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,o=this._active||[],r=this._getActiveElements(t,o,i,s),a=this._positionChanged(r,t),l=i||!en(r,o)||a;return l&&(this._active=r,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,i))),l}_getActiveElements(t,i,s,n){const o=this.options;if(t.type==="mouseout")return[];if(!n)return i.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const r=this.chart.getElementsAtEventForMode(t,o.mode,o,s);return o.reverse&&r.reverse(),r}_positionChanged(t,i){const{caretX:s,caretY:n,options:o}=this,r=$i[o.position].call(this,t,i);return r!==!1&&(s!==r.x||n!==r.y)}}K(xo,"positioners",$i);var Qm={id:"tooltip",_element:xo,positioners:$i,afterInit(e,t,i){i&&(e.tooltip=new xo({chart:e,options:i}))},beforeUpdate(e,t,i){e.tooltip&&e.tooltip.initialize(i)},reset(e,t,i){e.tooltip&&e.tooltip.initialize(i)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const i={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",i)}},afterEvent(e,t){if(e.tooltip){const i=t.replay;e.tooltip.handleEvent(t.event,i,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:Vc},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 Jm=(e,t,i,s)=>(typeof t=="string"?(i=e.push(t)-1,s.unshift({index:i,label:t})):isNaN(t)&&(i=null),i);function Zm(e,t,i,s){const n=e.indexOf(t);if(n===-1)return Jm(e,t,i,s);const o=e.lastIndexOf(t);return n!==o?i:n}const tb=(e,t)=>e===null?null:Gt(Math.round(e),0,t);function Ba(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class yo extends Pi{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const i=this._addedLabels;if(i.length){const s=this.getLabels();for(const{index:n,label:o}of i)s[n]===o&&s.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,i){if(ht(t))return null;const s=this.getLabels();return i=isFinite(i)&&s[i]===t?i:Zm(s,t,X(i,t),this._addedLabels),tb(i,s.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:i}=this.getUserBounds();let{min:s,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(s=0),i||(n=this.getLabels().length-1)),this.min=s,this.max=n}buildTicks(){const t=this.min,i=this.max,s=this.options.offset,n=[];let o=this.getLabels();o=t===0&&i===o.length-1?o:o.slice(t,i+1),this._valueRange=Math.max(o.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let r=t;r<=i;r++)n.push({value:r});return n}getLabelForValue(t){return Ba.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 i=this.ticks;return t<0||t>i.length-1?null:this.getPixelForValue(i[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}K(yo,"id","category"),K(yo,"defaults",{ticks:{callback:Ba}});function eb(e,t){const i=[],{bounds:n,step:o,min:r,max:a,precision:l,count:c,maxTicks:u,maxDigits:h,includeBounds:f}=e,d=o||1,_=u-1,{min:p,max:m}=t,x=!ht(r),M=!ht(a),C=!ht(c),w=(m-p)/(h+1);let v=Br((m-p)/_/d)*d,D,E,L,N;if(v<1e-14&&!x&&!M)return[{value:p},{value:m}];N=Math.ceil(m/v)-Math.floor(p/v),N>_&&(v=Br(N*v/_/d)*d),ht(l)||(D=Math.pow(10,l),v=Math.ceil(v*D)/D),n==="ticks"?(E=Math.floor(p/v)*v,L=Math.ceil(m/v)*v):(E=p,L=m),x&&M&&o&&Sd((a-r)/o,v/1e3)?(N=Math.round(Math.min((a-r)/v,u)),v=(a-r)/N,E=r,L=a):C?(E=x?r:E,L=M?a:L,N=c-1,v=(L-E)/N):(N=(L-E)/v,Qi(N,Math.round(N),v/1e3)?N=Math.round(N):N=Math.ceil(N));const j=Math.max(Nr(v),Nr(E));D=Math.pow(10,ht(l)?j:l),E=Math.round(E*D)/D,L=Math.round(L*D)/D;let H=0;for(x&&(f&&E!==r?(i.push({value:r}),E<r&&H++,Qi(Math.round((E+H*v)*D)/D,r,Na(r,w,e))&&H++):E<r&&H++);H<N;++H){const B=Math.round((E+H*v)*D)/D;if(M&&B>a)break;i.push({value:B})}return M&&f&&L!==a?i.length&&Qi(i[i.length-1].value,a,Na(a,w,e))?i[i.length-1].value=a:i.push({value:a}):(!M||L===a)&&i.push({value:L}),i}function Na(e,t,{horizontal:i,minRotation:s}){const n=ti(s),o=(i?Math.sin(n):Math.cos(n))||.001,r=.75*t*(""+e).length;return Math.min(t/o,r)}class ib extends Pi{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,i){return ht(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:i,maxDefined:s}=this.getUserBounds();let{min:n,max:o}=this;const r=l=>n=i?n:l,a=l=>o=s?o:l;if(t){const l=Mi(n),c=Mi(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(n===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||r(n-l)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:i,stepSize:s}=t,n;return s?(n=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),i=i||11),i&&(n=Math.min(i,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,i=t.ticks;let s=this.getTickLimit();s=Math.max(2,s);const n={maxTicks:s,bounds:t.bounds,min:t.min,max:t.max,precision:i.precision,step:i.stepSize,count:i.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:i.minRotation||0,includeBounds:i.includeBounds!==!1},o=this._range||this,r=eb(n,o);return t.bounds==="ticks"&&Md(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let i=this.min,s=this.max;if(super.configure(),this.options.offset&&t.length){const n=(s-i)/Math.max(t.length-1,1)/2;i-=n,s+=n}this._startValue=i,this._endValue=s,this._valueRange=s-i}getLabelForValue(t){return hc(t,this.chart.options.locale,this.options.ticks.format)}}class vo extends ib{determineDataLimits(){const{min:t,max:i}=this.getMinMax(!0);this.min=At(t)?t:0,this.max=At(i)?i:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),i=t?this.width:this.height,s=ti(this.options.ticks.minRotation),n=(t?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(i/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}K(vo,"id","linear"),K(vo,"defaults",{ticks:{callback:fc.formatters.numeric}});const kn={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}},zt=Object.keys(kn);function za(e,t){return e-t}function Wa(e,t){if(ht(t))return null;const i=e._adapter,{parser:s,round:n,isoWeekday:o}=e._parseOpts;let r=t;return typeof s=="function"&&(r=s(r)),At(r)||(r=typeof s=="string"?i.parse(r,s):i.parse(r)),r===null?null:(n&&(r=n==="week"&&(us(o)||o===!0)?i.startOf(r,"isoWeek",o):i.startOf(r,n)),+r)}function $a(e,t,i,s){const n=zt.length;for(let o=zt.indexOf(e);o<n-1;++o){const r=kn[zt[o]],a=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((i-t)/(a*r.size))<=s)return zt[o]}return zt[n-1]}function sb(e,t,i,s,n){for(let o=zt.length-1;o>=zt.indexOf(i);o--){const r=zt[o];if(kn[r].common&&e._adapter.diff(n,s,r)>=t-1)return r}return zt[i?zt.indexOf(i):0]}function nb(e){for(let t=zt.indexOf(e)+1,i=zt.length;t<i;++t)if(kn[zt[t]].common)return zt[t]}function Va(e,t,i){if(!i)e[t]=!0;else if(i.length){const{lo:s,hi:n}=Vo(i,t),o=i[s]>=t?i[s]:i[n];e[o]=!0}}function ob(e,t,i,s){const n=e._adapter,o=+n.startOf(t[0].value,s),r=t[t.length-1].value;let a,l;for(a=o;a<=r;a=+n.add(a,1,s))l=i[a],l>=0&&(t[l].major=!0);return t}function ja(e,t,i){const s=[],n={},o=t.length;let r,a;for(r=0;r<o;++r)a=t[r],n[a]=r,s.push({value:a,major:!1});return o===0||!i?s:ob(e,s,n,i)}class gs extends Pi{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,i={}){const s=t.time||(t.time={}),n=this._adapter=new Jg._date(t.adapters.date);n.init(i),Xi(s.displayFormats,n.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(t),this._normalized=i.normalized}parse(t,i){return t===void 0?null:Wa(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,i=this._adapter,s=t.time.unit||"day";let{min:n,max:o,minDefined:r,maxDefined:a}=this.getUserBounds();function l(c){!r&&!isNaN(c.min)&&(n=Math.min(n,c.min)),!a&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!r||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),n=At(n)&&!isNaN(n)?n:+i.startOf(Date.now(),s),o=At(o)&&!isNaN(o)?o:+i.endOf(Date.now(),s)+1,this.min=Math.min(n,o-1),this.max=Math.max(n+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let i=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return t.length&&(i=t[0],s=t[t.length-1]),{min:i,max:s}}buildTicks(){const t=this.options,i=t.time,s=t.ticks,n=s.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const o=this.min,r=this.max,a=Ad(n,o,r);return this._unit=i.unit||(s.autoSkip?$a(i.minUnit,this.min,this.max,this._getLabelCapacity(o)):sb(this,a.length,i.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit==="year"?void 0:nb(this._unit),this.initOffsets(n),t.reverse&&a.reverse(),ja(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let i=0,s=0,n,o;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?i=1-n:i=(this.getDecimalForValue(t[1])-n)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?s=o:s=(o-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;i=Gt(i,0,r),s=Gt(s,0,r),this._offsets={start:i,end:s,factor:1/(i+1+s)}}_generate(){const t=this._adapter,i=this.min,s=this.max,n=this.options,o=n.time,r=o.unit||$a(o.minUnit,i,s,this._getLabelCapacity(i)),a=X(n.ticks.stepSize,1),l=r==="week"?o.isoWeekday:!1,c=us(l)||l===!0,u={};let h=i,f,d;if(c&&(h=+t.startOf(h,"isoWeek",l)),h=+t.startOf(h,c?"day":r),t.diff(s,i,r)>1e5*a)throw new Error(i+" and "+s+" are too far apart with stepSize of "+a+" "+r);const _=n.ticks.source==="data"&&this.getDataTimestamps();for(f=h,d=0;f<s;f=+t.add(f,a,r),d++)Va(u,f,_);return(f===s||n.bounds==="ticks"||d===1)&&Va(u,f,_),Object.keys(u).sort(za).map(p=>+p)}getLabelForValue(t){const i=this._adapter,s=this.options.time;return s.tooltipFormat?i.format(t,s.tooltipFormat):i.format(t,s.displayFormats.datetime)}format(t,i){const n=this.options.time.displayFormats,o=this._unit,r=i||n[o];return this._adapter.format(t,r)}_tickFormatFunction(t,i,s,n){const o=this.options,r=o.ticks.callback;if(r)return ft(r,[t,i,s],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],h=c&&a[c],f=s[i],d=c&&h&&f&&f.major;return this._adapter.format(t,n||(d?h:u))}generateTickLabels(t){let i,s,n;for(i=0,s=t.length;i<s;++i)n=t[i],n.label=this._tickFormatFunction(n.value,i,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const i=this._offsets,s=this.getDecimalForValue(t);return this.getPixelForDecimal((i.start+s)*i.factor)}getValueForPixel(t){const i=this._offsets,s=this.getDecimalForPixel(t)/i.factor-i.end;return this.min+s*(this.max-this.min)}_getLabelSize(t){const i=this.options.ticks,s=this.ctx.measureText(t).width,n=ti(this.isHorizontal()?i.maxRotation:i.minRotation),o=Math.cos(n),r=Math.sin(n),a=this._resolveTickFontOptions(0).size;return{w:s*o+a*r,h:s*r+a*o}}_getLabelCapacity(t){const i=this.options.time,s=i.displayFormats,n=s[i.unit]||s.millisecond,o=this._tickFormatFunction(t,0,ja(this,[t],this._majorUnit),n),r=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],i,s;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(i=0,s=n.length;i<s;++i)t=t.concat(n[i].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let i,s;if(t.length)return t;const n=this.getLabels();for(i=0,s=n.length;i<s;++i)t.push(Wa(this,n[i]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Ed(t.sort(za))}}K(gs,"id","time"),K(gs,"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 Hs(e,t,i){let s=0,n=e.length-1,o,r,a,l;i?(t>=e[s].pos&&t<=e[n].pos&&({lo:s,hi:n}=ei(e,"pos",t)),{pos:o,time:a}=e[s],{pos:r,time:l}=e[n]):(t>=e[s].time&&t<=e[n].time&&({lo:s,hi:n}=ei(e,"time",t)),{time:o,pos:a}=e[s],{time:r,pos:l}=e[n]);const c=r-o;return c?a+(l-a)*(t-o)/c:a}class Ua extends gs{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),i=this._table=this.buildLookupTable(t);this._minPos=Hs(i,this.min),this._tableRange=Hs(i,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:i,max:s}=this,n=[],o=[];let r,a,l,c,u;for(r=0,a=t.length;r<a;++r)c=t[r],c>=i&&c<=s&&n.push(c);if(n.length<2)return[{time:i,pos:0},{time:s,pos:1}];for(r=0,a=n.length;r<a;++r)u=n[r+1],l=n[r-1],c=n[r],Math.round((u+l)/2)!==c&&o.push({time:c,pos:r/(a-1)});return o}_generate(){const t=this.min,i=this.max;let s=super.getDataTimestamps();return(!s.includes(t)||!s.length)&&s.splice(0,0,t),(!s.includes(i)||s.length===1)&&s.push(i),s.sort((n,o)=>n-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const i=this.getDataTimestamps(),s=this.getLabelTimestamps();return i.length&&s.length?t=this.normalize(i.concat(s)):t=i.length?i:s,t=this._cache.all=t,t}getDecimalForValue(t){return(Hs(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const i=this._offsets,s=this.getDecimalForPixel(t)/i.factor-i.end;return Hs(this._table,s*this._tableRange+this._minPos,!0)}}K(Ua,"id","timeseries"),K(Ua,"defaults",gs.defaults);const jc={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},rb={ariaLabel:{type:String},ariaDescribedby:{type:String}},ab={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...jc,...rb},lb=Zl[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function di(e){return ms(e)?tt(e):e}function cb(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return ms(t)?new Proxy(e,{}):e}function ub(e,t){const i=e.options;i&&t&&Object.assign(i,t)}function Uc(e,t){e.labels=t}function Kc(e,t,i){const s=[];e.datasets=t.map(n=>{const o=e.datasets.find(r=>r[i]===n[i]);return!o||!n.data||s.includes(o)?{...n}:(s.push(o),Object.assign(o,n),o)})}function hb(e,t){const i={labels:[],datasets:[]};return Uc(i,e.labels),Kc(i,e.datasets,t),i}const fb=ki({props:ab,setup(e,t){let{expose:i,slots:s}=t;const n=Kt(null),o=io(null);i({chart:o});const r=()=>{if(!n.value)return;const{type:c,data:u,options:h,plugins:f,datasetIdKey:d}=e,_=hb(u,d),p=cb(_,u);o.value=new Cn(n.value,{type:c,data:p,options:{...h},plugins:f})},a=()=>{const c=tt(o.value);c&&(e.destroyDelay>0?setTimeout(()=>{c.destroy(),o.value=null},e.destroyDelay):(c.destroy(),o.value=null))},l=c=>{c.update(e.updateMode)};return _s(r),xs(a),Ki([()=>e.options,()=>e.data],(c,u)=>{let[h,f]=c,[d,_]=u;const p=tt(o.value);if(!p)return;let m=!1;if(h){const x=di(h),M=di(d);x&&x!==M&&(ub(p,x),m=!0)}if(f){const x=di(f.labels),M=di(_.labels),C=di(f.datasets),w=di(_.datasets);x!==M&&(Uc(p.config.data,x),m=!0),C&&C!==w&&(Kc(p.config.data,C,e.datasetIdKey),m=!0)}m&&yl(()=>{l(p)})},{deep:!0}),()=>ao("canvas",{role:"img","aria-label":e.ariaLabel,"aria-describedby":e.ariaDescribedby,ref:n},[ao("p",{},[s.default?s.default():""])])}});function db(e,t){return Cn.register(t),ki({props:jc,setup(i,s){let{expose:n}=s;const o=io(null),r=io(null);Ki(()=>{var l;return((l=r.value)==null?void 0:l.chart)??null},l=>{o.value=l},{flush:"sync"}),n({chart:o});const a=l=>{r.value=l};return()=>ao(fb,lb({ref:a},{type:e,...i}))}})}const gb=db("line",$s);function pb(e,t){if(e==null||t===void 0||t===null||t<=0)return null;const i=17.625,s=243.04;try{const n=i*e/(s+e)+Math.log(t/100),o=s*n/(i-n);return Math.round(o*10)/10}catch{return null}}function mb(e){return e==null?{text:"Unknown",color:"var(--retro-text-dim)"}:e<10?{text:"Dry / Crisp",color:"var(--retro-text-cyan)"}:e<=15?{text:"Pleasant / Fresh",color:"var(--retro-text-green)"}:e<=18?{text:"Comfortable",color:"var(--retro-text-amber)"}:e<=21?{text:"Humid / Warm",color:"var(--retro-text-amber)"}:{text:"Muggy / Oppressive",color:"var(--retro-text-red)"}}function bb(e){if(e==null)return"N/A";const t=["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"],i=Math.floor(e/22.5+.5);return t[i%16]}function _b(e){return e==null?{label:"Low",color:"var(--retro-text-green)"}:e<3?{label:"Low",color:"var(--retro-text-green)"}:e<6?{label:"Moderate",color:"var(--retro-text-amber)"}:e<8?{label:"High",color:"var(--retro-text-amber)"}:e<11?{label:"Very High",color:"var(--retro-text-red)"}:{label:"Extreme",color:"var(--retro-accent-purple)"}}function xb(e){if(!e||e.length===0)return{min:null,max:null,avg:null,current:null};let t=e[0].value,i=e[0].value,s=0;for(const r of e)r.value<t&&(t=r.value),r.value>i&&(i=r.value),s+=r.value;const n=Math.round(s/e.length*10)/10,o=e[e.length-1].value;return{min:Math.round(t*10)/10,max:Math.round(i*10)/10,avg:n,current:Math.round(o*10)/10}}const yb={class:"retro-screen-container",role:"dialog","aria-modal":"true"},vb={class:"retro-window-header screen-header"},wb={class:"screen-title"},Sb={class:"screen-icon"},Mb={class:"screen-body"},Cb={class:"stats-ledger-strip"},Tb={class:"ledger-item primary-ledger"},kb={class:"ledger-val-row"},Pb={class:"ledger-val highlight"},Ob={key:0,class:"ledger-unit"},Ab={class:"ledger-item"},Db={class:"ledger-val-row"},Eb={class:"ledger-val"},Ib={key:0,class:"ledger-unit-sm"},Lb={class:"ledger-item"},Rb={class:"ledger-val-row"},Fb={class:"ledger-val"},Hb={key:0,class:"ledger-unit-sm"},Bb={class:"ledger-item"},Nb={class:"ledger-val-row"},zb={class:"ledger-val"},Wb={key:0,class:"ledger-unit-sm"},$b={class:"timeframe-toolbar"},Vb={class:"timeframe-group"},jb=["onClick"],Ub={class:"retro-well chart-canvas-well"},Kb={key:0,class:"chart-canvas-wrapper"},Yb={key:1,class:"loading-state"},Gb={key:0,class:"advisory-strip"},qb={class:"advisory-text"},Xb=ki({__name:"MetricDetailModal",props:{metricKey:{},title:{},icon:{},value:{},unit:{},subText:{},history:{},theme:{}},emits:["close","change-timeframe"],setup(e,{emit:t}){Cn.register(yo,vo,Us,We,Vm,Qm,Wm,gs,Rm);const i=e,s=t,n=Kt(24),o=[{label:"24H",hours:24},{label:"7D",hours:168},{label:"30D",hours:720},{label:"1Y",hours:8760}];function r(m){n.value=m,s("change-timeframe",m)}function a(){s("close")}function l(m){m.key==="Escape"&&a()}_s(()=>{window.addEventListener("keydown",l)}),xs(()=>{window.removeEventListener("keydown",l)});const c=$t(()=>i.value===null||i.value===void 0?"--":typeof i.value=="number"?Number.isInteger(i.value)?i.value.toString():i.value.toFixed(1):i.value);function u(m){const x=new Date(m*1e3);return n.value<=24?x.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):n.value<=168?`${x.toLocaleDateString([],{weekday:"short"})} ${x.getHours()}h`:x.toLocaleDateString([],{month:"numeric",day:"numeric"})}const h=$t(()=>{if(!i.history||!i.history.metrics)return[];const m=i.history.metrics[i.metricKey];return(m==null?void 0:m.data)||[]}),f=$t(()=>xb(h.value)),d=$t(()=>{var M,C,w,v,D,E,L,N,j;if(!i.history||!i.history.metrics)return{labels:[],datasets:[]};const m=i.history.metrics;if(i.metricKey==="temperature"||i.metricKey==="apparent_temperature"||i.metricKey==="dew_point"){const H=((M=m.temperature)==null?void 0:M.data)||[],B=((C=m.apparent_temperature)==null?void 0:C.data)||[],lt=((w=m.dew_point)==null?void 0:w.data)||[];return{labels:(H.length>0?H:B).map(q=>u(q.timestamp)),datasets:[{label:"Temp (°C)",data:H.map(q=>q.value),borderColor:"#fbbf24",backgroundColor:"rgba(251, 191, 36, 0.12)",fill:!0,tension:.25,borderWidth:2,pointRadius:n.value>168?0:2},{label:"Feels Like",data:B.map(q=>q.value),borderColor:"#f43f5e",backgroundColor:"transparent",borderDash:[4,4],tension:.25,borderWidth:2,pointRadius:0},{label:"Dew Point",data:lt.map(q=>q.value),borderColor:"#00f0ff",backgroundColor:"transparent",tension:.25,borderWidth:2,pointRadius:0}]}}if(i.metricKey==="humidity"){const H=((v=m.humidity)==null?void 0:v.data)||[];return{labels:H.map(B=>u(B.timestamp)),datasets:[{label:"Humidity (%)",data:H.map(B=>B.value),borderColor:"#00f0ff",backgroundColor:"rgba(0, 240, 255, 0.15)",fill:!0,tension:.25,borderWidth:2,pointRadius:n.value>168?0:2}]}}if(i.metricKey==="wind_speed"||i.metricKey==="gust_speed"){const H=((D=m.wind_speed)==null?void 0:D.data)||[],B=((E=m.gust_speed)==null?void 0:E.data)||[];return{labels:(H.length>0?H:B).map(et=>u(et.timestamp)),datasets:[{label:"Wind (km/h)",data:H.map(et=>et.value),borderColor:"#10b981",backgroundColor:"rgba(16, 185, 129, 0.15)",fill:!0,tension:.2,borderWidth:2,pointRadius:0},{label:"Gust (km/h)",data:B.map(et=>et.value),borderColor:"#fbbf24",backgroundColor:"transparent",borderDash:[3,3],tension:.2,borderWidth:2,pointRadius:0}]}}if(i.metricKey==="illuminance_lux"||i.metricKey==="uv_index"){const H=((L=m.illuminance_lux)==null?void 0:L.data)||[],B=((N=m.uv_index)==null?void 0:N.data)||[];return{labels:(H.length>0?H:B).map(et=>u(et.timestamp)),datasets:[{label:"Solar (LUX)",data:H.map(et=>et.value),borderColor:"#fbbf24",backgroundColor:"rgba(251, 191, 36, 0.15)",fill:!0,tension:.2,borderWidth:2,yAxisID:"y",pointRadius:0},{label:"UV Index",data:B.map(et=>et.value),borderColor:"#c084fc",backgroundColor:"transparent",borderWidth:2,tension:.2,yAxisID:"y1",pointRadius:0}]}}if(i.metricKey==="pressure"){const H=((j=m.pressure)==null?void 0:j.data)||[];return{labels:H.map(B=>u(B.timestamp)),datasets:[{label:"Pressure (hPa)",data:H.map(B=>B.value),borderColor:"#38bdf8",backgroundColor:"rgba(56, 189, 248, 0.12)",fill:!0,tension:.25,borderWidth:2,pointRadius:n.value>168?0:2}]}}const x=h.value;return{labels:x.map(H=>u(H.timestamp)),datasets:[{label:`${i.title} (${i.unit||""})`,data:x.map(H=>H.value),borderColor:"#fbbf24",backgroundColor:"rgba(251, 191, 36, 0.15)",fill:!0,tension:.25,borderWidth:2,pointRadius:0}]}}),_=$t(()=>{const m=i.theme==="light",x=m?"#1e293b":"#f1f5f9",M=m?"rgba(0, 0, 0, 0.1)":"rgba(255, 255, 255, 0.08)",C=i.metricKey==="illuminance_lux"||i.metricKey==="uv_index";return{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"top",labels:{color:x,font:{family:"'Press Start 2P', monospace",size:8},boxWidth:10,padding:6}},tooltip:{mode:"index",intersect:!1,backgroundColor:m?"#e2e8f0":"#111827",titleColor:x,bodyColor:x,borderColor:m?"#94a3b8":"#374151",borderWidth:2,titleFont:{family:"'Press Start 2P', monospace",size:8},bodyFont:{family:"'Space Mono', monospace",size:10}}},scales:{x:{grid:{color:M},ticks:{color:x,font:{family:"'Space Mono', monospace",size:9},maxTicksLimit:6}},y:{type:"linear",display:!0,position:"left",grid:{color:M},ticks:{color:x,font:{family:"'Space Mono', monospace",size:9}}},...C?{y1:{type:"linear",display:!0,position:"right",min:0,max:12,grid:{drawOnChartArea:!1},ticks:{color:"#c084fc",font:{family:"'Space Mono', monospace",size:9},stepSize:3}}}:{}}}}),p=$t(()=>i.metricKey==="temperature"||i.metricKey==="apparent_temperature"||i.metricKey==="dew_point"?"Dew point represents saturation temperature. Condensation forms when temp reaches dew point.":i.metricKey==="humidity"?"Ideal relative humidity is 40%–60%. Above 70% promotes condensation and muggy conditions.":i.metricKey==="wind_speed"||i.metricKey==="gust_speed"?"Wind velocity measured by Shelly WS90 ultrasonic anemometer at 10m elevation.":i.metricKey==="illuminance_lux"||i.metricKey==="uv_index"?"Solar illuminance measures daylight LUX. UV Index above 6 requires protection.":i.metricKey==="pressure"?"Standard sea level pressure is 1013.25 hPa. Rising pressure indicates fair weather.":null);return(m,x)=>(_t(),yt("div",{class:"retro-screen-backdrop",onClick:ec(a,["self"])},[S("div",yb,[S("div",vb,[S("button",{class:"retro-btn back-btn",onClick:a,title:"Return to metrics list (Esc)"},[...x[0]||(x[0]=[S("span",{class:"back-arrow"},"◀",-1),S("span",null,"BACK",-1)])]),S("div",wb,[S("span",Sb,dt(e.icon),1),S("span",null,dt(e.title),1)]),S("div",{class:"screen-controls"},[S("button",{class:"retro-btn-box close-box",onClick:a,title:"Close (Esc)"},"×")])]),S("div",Mb,[S("div",Cb,[S("div",Tb,[x[1]||(x[1]=S("span",{class:"ledger-label"},"CURRENT",-1)),S("div",kb,[S("span",Pb,dt(c.value),1),e.unit?(_t(),yt("span",Ob,dt(e.unit),1)):Yt("",!0)])]),S("div",Ab,[x[3]||(x[3]=S("span",{class:"ledger-label"},"24H MIN",-1)),S("div",Db,[x[2]||(x[2]=S("span",{class:"ledger-arrow arrow-down"},"▼",-1)),S("span",Eb,dt(f.value.min!==null?f.value.min:"--"),1),e.unit?(_t(),yt("span",Ib,dt(e.unit),1)):Yt("",!0)])]),S("div",Lb,[x[5]||(x[5]=S("span",{class:"ledger-label"},"24H MAX",-1)),S("div",Rb,[x[4]||(x[4]=S("span",{class:"ledger-arrow arrow-up"},"▲",-1)),S("span",Fb,dt(f.value.max!==null?f.value.max:"--"),1),e.unit?(_t(),yt("span",Hb,dt(e.unit),1)):Yt("",!0)])]),S("div",Bb,[x[7]||(x[7]=S("span",{class:"ledger-label"},"24H AVG",-1)),S("div",Nb,[x[6]||(x[6]=S("span",{class:"ledger-arrow arrow-avg"},"~",-1)),S("span",zb,dt(f.value.avg!==null?f.value.avg:"--"),1),e.unit?(_t(),yt("span",Wb,dt(e.unit),1)):Yt("",!0)])])]),S("div",$b,[S("div",Vb,[(_t(),yt(me,null,ih(o,M=>S("button",{key:M.hours,class:ri(["retro-btn tf-btn",{active:n.value===M.hours}]),onClick:C=>r(M.hours)},dt(M.label),11,jb)),64))]),x[8]||(x[8]=S("div",{class:"telemetry-badge"},[S("span",{class:"retro-blinker"}),S("span",null,"PROMETHEUS ENGINE")],-1))]),S("div",Ub,[d.value.labels.length>0?(_t(),yt("div",Kb,[it(bl(gb),{data:d.value,options:_.value},null,8,["data","options"])])):(_t(),yt("div",Yb,[...x[9]||(x[9]=[S("span",{class:"retro-blinker"},null,-1),S("span",null,"QUERYING PROMETHEUS GRAPH SENSORS...",-1)])]))]),p.value?(_t(),yt("div",Gb,[x[10]||(x[10]=S("span",{class:"advisory-icon"},"💡",-1)),S("span",qb,dt(p.value),1)])):Yt("",!0)])])]))}}),Qb=yn(Xb,[["__scopeId","data-v-ab273825"]]),Jb={class:"app-container"},Zb={key:0,class:"crt-overlay"},t_={class:"container"},e_={key:0,class:"retro-window error-banner-window"},i_={class:"retro-window-content error-content"},s_={class:"error-msg"},n_={class:"group-section"},o_={class:"metrics-list-stack"},r_={class:"group-section"},a_={class:"metrics-list-stack"},l_={class:"group-section"},c_={class:"metrics-list-stack"},u_={class:"group-section"},h_={class:"metrics-list-stack"},f_={class:"group-section"},d_={class:"metrics-list-stack"},g_=ki({__name:"App",setup(e){const t=Kt(null),i=Kt(void 0),s=Kt(null),n=Kt("dark"),o=Kt(!0),r=Kt(null);let a=null;const l=$t(()=>{var w,v,D,E;return((w=t.value)==null?void 0:w.dew_point)!==void 0&&((v=t.value)==null?void 0:v.dew_point)!==null?t.value.dew_point:pb((D=t.value)==null?void 0:D.temperature,(E=t.value)==null?void 0:E.humidity)}),c=$t(()=>mb(l.value)),u=$t(()=>{var w;return bb((w=t.value)==null?void 0:w.wind_direction)}),h=$t(()=>{var w;return _b((w=t.value)==null?void 0:w.uv_index)});function f(w){if(!w)return"";try{return new Date(w).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{return w}}function d(w,v,D,E,L,N){r.value={key:w,title:v,icon:D,value:E,unit:L,subText:N}}function _(){r.value=null}function p(w){n.value=w}function m(w){o.value=w}async function x(){try{const w=await fetch("/api/v1/weather/current");if(!w.ok)throw new Error(`HTTP ${w.status}`);const v=await w.json();t.value=v,s.value=null}catch(w){console.error("Error fetching current metrics:",w),s.value="Station Telemetry Offline. Retrying link to Prometheus..."}}async function M(w=24){try{const v=await fetch(`/api/v1/weather/history?hours=${w}`);if(!v.ok)throw new Error(`HTTP ${v.status}`);const D=await v.json();i.value=D}catch(v){console.error("Error fetching history:",v)}}async function C(){await Promise.all([x(),M(24)])}return _s(()=>{const w=localStorage.getItem("grabengasse_theme")||"dark";n.value=w;const v=localStorage.getItem("grabengasse_crt");v!==null&&(o.value=v==="true"),C(),a=window.setInterval(x,3e4)}),xs(()=>{a&&clearInterval(a)}),(w,v)=>{var D,E,L,N,j,H,B,lt,et,q,G,Y,Q,Dt,Ft,Et,mt,Jt,jt,oe,Ct,Ue,ui,Oi,Re,Pn,g;return _t(),yt("div",Jb,[o.value?(_t(),yt("div",Zb)):Yt("",!0),S("main",t_,[it(Df,{lastUpdated:(D=t.value)==null?void 0:D.updated_at,onRefresh:C,onThemeChanged:p,onCrtChanged:m},null,8,["lastUpdated"]),s.value?(_t(),yt("div",e_,[v[14]||(v[14]=S("div",{class:"retro-window-header error-header"},[S("div",{class:"retro-window-title"},[S("span",null,"⚠️"),S("span",null,"SYSTEM ALERT // COMMUNICATION INTERRUPTED")])],-1)),S("div",i_,[S("span",s_,dt(s.value),1),S("button",{onClick:C,class:"retro-btn btn-accent"},"RETRY LINK")])])):Yt("",!0),S("section",n_,[v[15]||(v[15]=S("div",{class:"group-header-bar"},[S("div",{class:"group-title"},[S("span",null,"🌡️"),S("span",null,"TEMPERATURE & THERMAL CLIMATE")]),S("span",{class:"group-hint"},"[CLICK FOR FULL-SCREEN GRAPH]")],-1)),S("div",o_,[it(Ht,{title:"Temperature",icon:"🌡️",value:(E=t.value)==null?void 0:E.temperature,unit:"°C",subText:(L=t.value)!=null&&L.apparent_temperature?`Feels ${t.value.apparent_temperature.toFixed(1)}°C`:void 0,highlight:!0,onInspect:v[0]||(v[0]=b=>{var y;return d("temperature","Current Temperature","🌡️",(y=t.value)==null?void 0:y.temperature,"°C","Ambient Dry-Bulb Reading")})},null,8,["value","subText"]),it(Ht,{title:"Dew Point",icon:"🌫️",value:l.value,unit:"°C",subBadge:c.value.text,subText:"Atmospheric Saturation",onInspect:v[1]||(v[1]=b=>d("dew_point","Dew Point (Calculated)","🌫️",l.value,"°C",`Atmospheric Saturation: ${c.value.text}`))},null,8,["value","subBadge"]),it(Ht,{title:"Feels Like",icon:"🌤️",value:(N=t.value)==null?void 0:N.apparent_temperature,unit:"°C",subText:"Thermal Comfort Index",onInspect:v[2]||(v[2]=b=>{var y;return d("apparent_temperature","Apparent Temperature (Feels Like)","🌤️",(y=t.value)==null?void 0:y.apparent_temperature,"°C","Calculated Thermal Comfort Index")})},null,8,["value"]),it(Ht,{title:"Rel. Humidity",icon:"💧",value:(j=t.value)==null?void 0:j.humidity,unit:"%",subText:(H=t.value)!=null&&H.humidity?`${t.value.humidity>65?"High Moisture":"Normal Range"}`:void 0,onInspect:v[3]||(v[3]=b=>{var y;return d("humidity","Relative Humidity","💧",(y=t.value)==null?void 0:y.humidity,"%","Air Moisture Saturation Level")})},null,8,["value","subText"])])]),S("section",r_,[v[16]||(v[16]=S("div",{class:"group-header-bar"},[S("div",{class:"group-title"},[S("span",null,"🌧️"),S("span",null,"ATMOSPHERE & PRECIPITATION")]),S("span",{class:"group-hint"},"[CLICK FOR FULL-SCREEN GRAPH]")],-1)),S("div",a_,[it(Ht,{title:"Pressure",icon:"🧭",value:(B=t.value)==null?void 0:B.pressure,unit:"hPa",subText:(lt=t.value)!=null&<.pressure?t.value.pressure>=1013?"High Pressure (Fair)":"Low Pressure System":void 0,onInspect:v[4]||(v[4]=b=>{var y;return d("pressure","Atmospheric Pressure","🧭",(y=t.value)==null?void 0:y.pressure,"hPa","Barometric Surface Pressure")})},null,8,["value","subText"]),it(Ht,{title:"Rainfall Condition",icon:"🌧️",value:((et=t.value)==null?void 0:et.rain_status_label)||(((q=t.value)==null?void 0:q.rain_status)===1?"Wet (Rain)":"Dry"),unit:"",subBadge:((G=t.value)==null?void 0:G.rain_status)===1?"PRECIPITATION":"NO RAIN",subBadgeColor:((Y=t.value)==null?void 0:Y.rain_status)===1?"#38bdf8":"#10b981",subText:"Optical Rain Sensor State",onInspect:v[5]||(v[5]=b=>{var y;return d("pressure","Precipitation & Barometric Log","🌧️",(y=t.value)==null?void 0:y.rain_status_label,"","Live Precipitation & Barometric Log")})},null,8,["value","subBadge","subBadgeColor"])])]),S("section",l_,[v[17]||(v[17]=S("div",{class:"group-header-bar"},[S("div",{class:"group-title"},[S("span",null,"💨"),S("span",null,"WIND VELOCITY & GUST DYNAMICS")]),S("span",{class:"group-hint"},"[CLICK FOR FULL-SCREEN GRAPH]")],-1)),S("div",c_,[it(Ht,{title:"Wind Speed",icon:"💨",value:(Q=t.value)==null?void 0:Q.wind_speed,unit:"km/h",subText:`Direction: ${u.value}`,onInspect:v[6]||(v[6]=b=>{var y;return d("wind_speed","Wind Speed & Flow","💨",(y=t.value)==null?void 0:y.wind_speed,"km/h",`Sustained Velocity • Heading ${u.value}`)})},null,8,["value","subText"]),it(Ht,{title:"Peak Gusts",icon:"🌪️",value:(Dt=t.value)==null?void 0:Dt.gust_speed,unit:"km/h",subText:(Ft=t.value)!=null&&Ft.gust_speed?`Peak: ${t.value.gust_speed.toFixed(1)} km/h`:void 0,onInspect:v[7]||(v[7]=b=>{var y;return d("gust_speed","Gust Velocity Dynamics","🌪️",(y=t.value)==null?void 0:y.gust_speed,"km/h","Maximum Gust Speed in Sample Window")})},null,8,["value","subText"]),it(Ht,{title:"Wind Bearing",icon:"🧭",value:u.value,unit:"",subText:((Et=t.value)==null?void 0:Et.wind_direction)!==void 0&&((mt=t.value)==null?void 0:mt.wind_direction)!==null?`Angle: ${Math.round(t.value.wind_direction)}°`:void 0,subBadge:`${Math.round(((Jt=t.value)==null?void 0:Jt.wind_direction)??0)}°`,onInspect:v[8]||(v[8]=b=>{var y;return d("wind_speed","Wind Direction & Dynamics","🧭",`${u.value} (${Math.round(((y=t.value)==null?void 0:y.wind_direction)??0)}°)`,"","Compass Rose Bearing & Flow")})},null,8,["value","subText","subBadge"])])]),S("section",u_,[v[18]||(v[18]=S("div",{class:"group-header-bar"},[S("div",{class:"group-title"},[S("span",null,"☀️"),S("span",null,"SOLAR ILLUMINANCE & UV RADIATION")]),S("span",{class:"group-hint"},"[CLICK FOR FULL-SCREEN GRAPH]")],-1)),S("div",h_,[it(Ht,{title:"Solar Illuminance",icon:"☀️",value:(jt=t.value)==null?void 0:jt.illuminance_lux,unit:"LUX",subText:(oe=t.value)!=null&&oe.illuminance_lux&&t.value.illuminance_lux>1e4?"Direct Sunlight":"Ambient Light",onInspect:v[9]||(v[9]=b=>{var y;return d("illuminance_lux","Solar Illuminance","☀️",(y=t.value)==null?void 0:y.illuminance_lux,"LUX","Photometric Illuminance from Solar Sensor")})},null,8,["value","subText"]),it(Ht,{title:"UV Index",icon:"🔆",value:((Ct=t.value)==null?void 0:Ct.uv_index)??0,unit:"UVI",subBadge:h.value.label,subText:`Exposure: ${h.value.label}`,onInspect:v[10]||(v[10]=b=>{var y;return d("uv_index","Solar UV Index","🔆",((y=t.value)==null?void 0:y.uv_index)??0,"UVI",`Ultraviolet Radiation Index (${h.value.label})`)})},null,8,["value","subBadge","subText"])])]),S("section",f_,[v[19]||(v[19]=S("div",{class:"group-header-bar"},[S("div",{class:"group-title"},[S("span",null,"📡"),S("span",null,"STATION TELEMETRY & LINK QUALITY")]),S("span",{class:"group-hint"},"[STATION STATUS]")],-1)),S("div",d_,[it(Ht,{title:"Station Battery",icon:"🔋",value:((Ue=t.value)==null?void 0:Ue.battery_percent)!==null&&((ui=t.value)==null?void 0:ui.battery_percent)!==void 0?t.value.battery_percent:"100",unit:"%",subBadge:(Oi=t.value)!=null&&Oi.battery_percent&&t.value.battery_percent>30?"HEALTHY":"GOOD",subText:"Solar Power Buffer",onInspect:v[11]||(v[11]=b=>{var y;return d("battery_percent","Station Battery Level","🔋",(y=t.value)==null?void 0:y.battery_percent,"%","Onboard Power Cell Capacity")})},null,8,["value","subBadge"]),it(Ht,{title:"Signal Quality (LQI)",icon:"📶",value:((Re=t.value)==null?void 0:Re.linkquality_lqi)!==null&&((Pn=t.value)==null?void 0:Pn.linkquality_lqi)!==void 0?t.value.linkquality_lqi:"255",unit:"LQI",subText:"Shelly / Zigbee Link",onInspect:v[12]||(v[12]=b=>{var y;return d("linkquality_lqi","Link Quality Indicator","📶",(y=t.value)==null?void 0:y.linkquality_lqi,"LQI","RF Signal Quality Indicator")})},null,8,["value"]),it(Ht,{title:"Telemetry Status",icon:"⏱️",value:"ACTIVE",unit:"",subText:(g=t.value)!=null&&g.updated_at?`Sync: ${f(t.value.updated_at)}`:"Live Stream",onInspect:v[13]||(v[13]=b=>d("temperature","Live Telemetry Link","⏱️","ONLINE","","Prometheus Real-Time Metrics Pipeline"))},null,8,["subText"])])])]),r.value?(_t(),ql(Qb,{key:1,metricKey:r.value.key,title:r.value.title,icon:r.value.icon,value:r.value.value,unit:r.value.unit,subText:r.value.subText,history:i.value,theme:n.value,onClose:_,onChangeTimeframe:M},null,8,["metricKey","title","icon","value","unit","subText","history","theme"])):Yt("",!0),v[20]||(v[20]=S("footer",{class:"app-footer container"},[S("p",null,"GRABENGASSE 7 • REGENSBURG // 16-BIT METEOROLOGICAL STATION"),S("p",{class:"footer-sub"},"SHELLY WS90 INTEGRATION • PROMETHEUS TIME-SERIES ENGINE • V1.0")],-1))])}}}),p_=yn(g_,[["__scopeId","data-v-ef404ead"]]);mf(p_).mount("#app");"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/sw.js").then(e=>{console.log("[PWA] ServiceWorker registered with scope:",e.scope)}).catch(e=>{console.warn("[PWA] ServiceWorker registration failed:",e)})});
|