cc-token-usage 3.0.0

Analyze Claude Code session token usage, costs, and efficiency
Documentation
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Claude Code Token Analyzer</title>
  <script type="module" crossorigin>(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function s(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=s(i);fetch(i.href,o)}})();/**
* @vue/shared v3.5.31
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function jo(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const _t={},As=[],we=()=>{},Cl=()=>!1,wi=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Si=e=>e.startsWith("onUpdate:"),Et=Object.assign,Bo=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},Fu=Object.prototype.hasOwnProperty,ht=(e,t)=>Fu.call(e,t),et=Array.isArray,Os=e=>Dn(e)==="[object Map]",Tl=e=>Dn(e)==="[object Set]",wa=e=>Dn(e)==="[object Date]",it=e=>typeof e=="function",At=e=>typeof e=="string",ue=e=>typeof e=="symbol",pt=e=>e!==null&&typeof e=="object",Dl=e=>(pt(e)||it(e))&&it(e.then)&&it(e.catch),Pl=Object.prototype.toString,Dn=e=>Pl.call(e),Iu=e=>Dn(e).slice(8,-1),Al=e=>Dn(e)==="[object Object]",Vo=e=>At(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,sn=jo(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Mi=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},ju=/-\w/g,le=Mi(e=>e.replace(ju,t=>t.slice(1).toUpperCase())),Bu=/\B([A-Z])/g,bs=Mi(e=>e.replace(Bu,"-$1").toLowerCase()),Ol=Mi(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ui=Mi(e=>e?`on${Ol(e)}`:""),ke=(e,t)=>!Object.is(e,t),ti=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},zl=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},Ho=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Sa;const Ci=()=>Sa||(Sa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function qt(e){if(et(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],i=At(n)?Nu(n):qt(n);if(i)for(const o in i)t[o]=i[o]}return t}else if(At(e)||pt(e))return e}const Vu=/;(?![^(]*\))/g,Hu=/:([^]+)/,Wu=/\/\*[^]*?\*\//g;function Nu(e){const t={};return e.replace(Wu,"").split(Vu).forEach(s=>{if(s){const n=s.split(Hu);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Rt(e){let t="";if(At(e))t=e;else if(et(e))for(let s=0;s<e.length;s++){const n=Rt(e[s]);n&&(t+=n+" ")}else if(pt(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const Ku="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Uu=jo(Ku);function Ll(e){return!!e||e===""}function Yu(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=Wo(e[n],t[n]);return s}function Wo(e,t){if(e===t)return!0;let s=wa(e),n=wa(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=ue(e),n=ue(t),s||n)return e===t;if(s=et(e),n=et(t),s||n)return s&&n?Yu(e,t):!1;if(s=pt(e),n=pt(t),s||n){if(!s||!n)return!1;const i=Object.keys(e).length,o=Object.keys(t).length;if(i!==o)return!1;for(const a in e){const r=e.hasOwnProperty(a),l=t.hasOwnProperty(a);if(r&&!l||!r&&l||!Wo(e[a],t[a]))return!1}}return String(e)===String(t)}const Rl=e=>!!(e&&e.__v_isRef===!0),k=e=>At(e)?e:e==null?"":et(e)||pt(e)&&(e.toString===Pl||!it(e.toString))?Rl(e)?k(e.value):JSON.stringify(e,$l,2):String(e),$l=(e,t)=>Rl(t)?$l(e,t.value):Os(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,i],o)=>(s[Yi(n,o)+" =>"]=i,s),{})}:Tl(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Yi(s))}:ue(t)?Yi(t):pt(t)&&!et(t)&&!Al(t)?String(t):t,Yi=(e,t="")=>{var s;return ue(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/**
* @vue/reactivity v3.5.31
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Xt;class Xu{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Xt,!t&&Xt&&(this.index=(Xt.scopes||(Xt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].pause();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=Xt;try{return Xt=this,t()}finally{Xt=s}}}on(){++this._on===1&&(this.prevScope=Xt,Xt=this)}off(){this._on>0&&--this._on===0&&(Xt=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){for(s=0,n=this.scopes.length;s<n;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function qu(){return Xt}let yt;const Xi=new WeakSet;class El{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,Xt&&Xt.active&&Xt.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Xi.has(this)&&(Xi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Il(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ma(this),jl(this);const t=yt,s=ce;yt=this,ce=!0;try{return this.fn()}finally{Bl(this),yt=t,ce=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Uo(t);this.deps=this.depsTail=void 0,Ma(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Xi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){vo(this)&&this.run()}get dirty(){return vo(this)}}let Fl=0,nn,on;function Il(e,t=!1){if(e.flags|=8,t){e.next=on,on=e;return}e.next=nn,nn=e}function No(){Fl++}function Ko(){if(--Fl>0)return;if(on){let t=on;for(on=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;nn;){let t=nn;for(nn=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function jl(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Bl(e){let t,s=e.depsTail,n=s;for(;n;){const i=n.prevDep;n.version===-1?(n===s&&(s=i),Uo(n),Gu(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=s}function vo(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Vl(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Vl(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===pn)||(e.globalVersion=pn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!vo(e))))return;e.flags|=2;const t=e.dep,s=yt,n=ce;yt=e,ce=!0;try{jl(e);const i=e.fn(e._value);(t.version===0||ke(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{yt=s,ce=n,Bl(e),e.flags&=-3}}function Uo(e,t=!1){const{dep:s,prevSub:n,nextSub:i}=e;if(n&&(n.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let o=s.computed.deps;o;o=o.nextDep)Uo(o,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Gu(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let ce=!0;const Hl=[];function Ie(){Hl.push(ce),ce=!1}function je(){const e=Hl.pop();ce=e===void 0?!0:e}function Ma(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=yt;yt=void 0;try{t()}finally{yt=s}}}let pn=0;class Zu{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Yo{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(!yt||!ce||yt===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==yt)s=this.activeLink=new Zu(yt,this),yt.deps?(s.prevDep=yt.depsTail,yt.depsTail.nextDep=s,yt.depsTail=s):yt.deps=yt.depsTail=s,Wl(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=yt.depsTail,s.nextDep=void 0,yt.depsTail.nextDep=s,yt.depsTail=s,yt.deps===s&&(yt.deps=n)}return s}trigger(t){this.version++,pn++,this.notify(t)}notify(t){No();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{Ko()}}}function Wl(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Wl(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const yo=new WeakMap,fs=Symbol(""),xo=Symbol(""),gn=Symbol("");function It(e,t,s){if(ce&&yt){let n=yo.get(e);n||yo.set(e,n=new Map);let i=n.get(s);i||(n.set(s,i=new Yo),i.map=n,i.key=s),i.track()}}function Re(e,t,s,n,i,o){const a=yo.get(e);if(!a){pn++;return}const r=l=>{l&&l.trigger()};if(No(),t==="clear")a.forEach(r);else{const l=et(e),c=l&&Vo(s);if(l&&s==="length"){const u=Number(n);a.forEach((h,d)=>{(d==="length"||d===gn||!ue(d)&&d>=u)&&r(h)})}else switch((s!==void 0||a.has(void 0))&&r(a.get(s)),c&&r(a.get(gn)),t){case"add":l?c&&r(a.get("length")):(r(a.get(fs)),Os(e)&&r(a.get(xo)));break;case"delete":l||(r(a.get(fs)),Os(e)&&r(a.get(xo)));break;case"set":Os(e)&&r(a.get(fs));break}}Ko()}function ks(e){const t=lt(e);return t===e?t:(It(t,"iterate",gn),re(e)?t:t.map(he))}function Ti(e){return It(e=lt(e),"iterate",gn),e}function ye(e,t){return Be(e)?Is(ps(e)?he(t):t):he(t)}const Ju={__proto__:null,[Symbol.iterator](){return qi(this,Symbol.iterator,e=>ye(this,e))},concat(...e){return ks(this).concat(...e.map(t=>et(t)?ks(t):t))},entries(){return qi(this,"entries",e=>(e[1]=ye(this,e[1]),e))},every(e,t){return Te(this,"every",e,t,void 0,arguments)},filter(e,t){return Te(this,"filter",e,t,s=>s.map(n=>ye(this,n)),arguments)},find(e,t){return Te(this,"find",e,t,s=>ye(this,s),arguments)},findIndex(e,t){return Te(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Te(this,"findLast",e,t,s=>ye(this,s),arguments)},findLastIndex(e,t){return Te(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Te(this,"forEach",e,t,void 0,arguments)},includes(...e){return Gi(this,"includes",e)},indexOf(...e){return Gi(this,"indexOf",e)},join(e){return ks(this).join(e)},lastIndexOf(...e){return Gi(this,"lastIndexOf",e)},map(e,t){return Te(this,"map",e,t,void 0,arguments)},pop(){return Ns(this,"pop")},push(...e){return Ns(this,"push",e)},reduce(e,...t){return Ca(this,"reduce",e,t)},reduceRight(e,...t){return Ca(this,"reduceRight",e,t)},shift(){return Ns(this,"shift")},some(e,t){return Te(this,"some",e,t,void 0,arguments)},splice(...e){return Ns(this,"splice",e)},toReversed(){return ks(this).toReversed()},toSorted(e){return ks(this).toSorted(e)},toSpliced(...e){return ks(this).toSpliced(...e)},unshift(...e){return Ns(this,"unshift",e)},values(){return qi(this,"values",e=>ye(this,e))}};function qi(e,t,s){const n=Ti(e),i=n[t]();return n!==e&&!re(e)&&(i._next=i.next,i.next=()=>{const o=i._next();return o.done||(o.value=s(o.value)),o}),i}const Qu=Array.prototype;function Te(e,t,s,n,i,o){const a=Ti(e),r=a!==e&&!re(e),l=a[t];if(l!==Qu[t]){const h=l.apply(e,o);return r?he(h):h}let c=s;a!==e&&(r?c=function(h,d){return s.call(this,ye(e,h),d,e)}:s.length>2&&(c=function(h,d){return s.call(this,h,d,e)}));const u=l.call(a,c,n);return r&&i?i(u):u}function Ca(e,t,s,n){const i=Ti(e),o=i!==e&&!re(e);let a=s,r=!1;i!==e&&(o?(r=n.length===0,a=function(c,u,h){return r&&(r=!1,c=ye(e,c)),s.call(this,c,ye(e,u),h,e)}):s.length>3&&(a=function(c,u,h){return s.call(this,c,u,h,e)}));const l=i[t](a,...n);return r?ye(e,l):l}function Gi(e,t,s){const n=lt(e);It(n,"iterate",gn);const i=n[t](...s);return(i===-1||i===!1)&&Pn(s[0])?(s[0]=lt(s[0]),n[t](...s)):i}function Ns(e,t,s=[]){Ie(),No();const n=lt(e)[t].apply(e,s);return Ko(),je(),n}const th=jo("__proto__,__v_isRef,__isVue"),Nl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ue));function eh(e){ue(e)||(e=String(e));const t=lt(this);return It(t,"has",e),t.hasOwnProperty(e)}class Kl{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const i=this._isReadonly,o=this._isShallow;if(s==="__v_isReactive")return!i;if(s==="__v_isReadonly")return i;if(s==="__v_isShallow")return o;if(s==="__v_raw")return n===(i?o?hh:ql:o?Xl:Yl).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const a=et(t);if(!i){let l;if(a&&(l=Ju[s]))return l;if(s==="hasOwnProperty")return eh}const r=Reflect.get(t,s,Vt(t)?t:n);if((ue(s)?Nl.has(s):th(s))||(i||It(t,"get",s),o))return r;if(Vt(r)){const l=a&&Vo(s)?r:r.value;return i&&pt(l)?wo(l):l}return pt(r)?i?wo(r):Di(r):r}}class Ul extends Kl{constructor(t=!1){super(!1,t)}set(t,s,n,i){let o=t[s];const a=et(t)&&Vo(s);if(!this._isShallow){const c=Be(o);if(!re(n)&&!Be(n)&&(o=lt(o),n=lt(n)),!a&&Vt(o)&&!Vt(n))return c||(o.value=n),!0}const r=a?Number(s)<t.length:ht(t,s),l=Reflect.set(t,s,n,Vt(t)?t:i);return t===lt(i)&&(r?ke(n,o)&&Re(t,"set",s,n):Re(t,"add",s,n)),l}deleteProperty(t,s){const n=ht(t,s);t[s];const i=Reflect.deleteProperty(t,s);return i&&n&&Re(t,"delete",s,void 0),i}has(t,s){const n=Reflect.has(t,s);return(!ue(s)||!Nl.has(s))&&It(t,"has",s),n}ownKeys(t){return It(t,"iterate",et(t)?"length":fs),Reflect.ownKeys(t)}}class sh extends Kl{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const nh=new Ul,ih=new sh,oh=new Ul(!0);const ko=e=>e,Fn=e=>Reflect.getPrototypeOf(e);function ah(e,t,s){return function(...n){const i=this.__v_raw,o=lt(i),a=Os(o),r=e==="entries"||e===Symbol.iterator&&a,l=e==="keys"&&a,c=i[e](...n),u=s?ko:t?Is:he;return!t&&It(o,"iterate",l?xo:fs),Et(Object.create(c),{next(){const{value:h,done:d}=c.next();return d?{value:h,done:d}:{value:r?[u(h[0]),u(h[1])]:u(h),done:d}}})}}function In(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function rh(e,t){const s={get(i){const o=this.__v_raw,a=lt(o),r=lt(i);e||(ke(i,r)&&It(a,"get",i),It(a,"get",r));const{has:l}=Fn(a),c=t?ko:e?Is:he;if(l.call(a,i))return c(o.get(i));if(l.call(a,r))return c(o.get(r));o!==a&&o.get(i)},get size(){const i=this.__v_raw;return!e&&It(lt(i),"iterate",fs),i.size},has(i){const o=this.__v_raw,a=lt(o),r=lt(i);return e||(ke(i,r)&&It(a,"has",i),It(a,"has",r)),i===r?o.has(i):o.has(i)||o.has(r)},forEach(i,o){const a=this,r=a.__v_raw,l=lt(r),c=t?ko:e?Is:he;return!e&&It(l,"iterate",fs),r.forEach((u,h)=>i.call(o,c(u),c(h),a))}};return Et(s,e?{add:In("add"),set:In("set"),delete:In("delete"),clear:In("clear")}:{add(i){const o=lt(this),a=Fn(o),r=lt(i),l=!t&&!re(i)&&!Be(i)?r:i;return a.has.call(o,l)||ke(i,l)&&a.has.call(o,i)||ke(r,l)&&a.has.call(o,r)||(o.add(l),Re(o,"add",l,l)),this},set(i,o){!t&&!re(o)&&!Be(o)&&(o=lt(o));const a=lt(this),{has:r,get:l}=Fn(a);let c=r.call(a,i);c||(i=lt(i),c=r.call(a,i));const u=l.call(a,i);return a.set(i,o),c?ke(o,u)&&Re(a,"set",i,o):Re(a,"add",i,o),this},delete(i){const o=lt(this),{has:a,get:r}=Fn(o);let l=a.call(o,i);l||(i=lt(i),l=a.call(o,i)),r&&r.call(o,i);const c=o.delete(i);return l&&Re(o,"delete",i,void 0),c},clear(){const i=lt(this),o=i.size!==0,a=i.clear();return o&&Re(i,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(i=>{s[i]=ah(i,e,t)}),s}function Xo(e,t){const s=rh(e,t);return(n,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?n:Reflect.get(ht(s,i)&&i in n?s:n,i,o)}const lh={get:Xo(!1,!1)},ch={get:Xo(!1,!0)},uh={get:Xo(!0,!1)};const Yl=new WeakMap,Xl=new WeakMap,ql=new WeakMap,hh=new WeakMap;function dh(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function fh(e){return e.__v_skip||!Object.isExtensible(e)?0:dh(Iu(e))}function Di(e){return Be(e)?e:qo(e,!1,nh,lh,Yl)}function ph(e){return qo(e,!1,oh,ch,Xl)}function wo(e){return qo(e,!0,ih,uh,ql)}function qo(e,t,s,n,i){if(!pt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=fh(e);if(o===0)return e;const a=i.get(e);if(a)return a;const r=new Proxy(e,o===2?n:s);return i.set(e,r),r}function ps(e){return Be(e)?ps(e.__v_raw):!!(e&&e.__v_isReactive)}function Be(e){return!!(e&&e.__v_isReadonly)}function re(e){return!!(e&&e.__v_isShallow)}function Pn(e){return e?!!e.__v_raw:!1}function lt(e){const t=e&&e.__v_raw;return t?lt(t):e}function gh(e){return!ht(e,"__v_skip")&&Object.isExtensible(e)&&zl(e,"__v_skip",!0),e}const he=e=>pt(e)?Di(e):e,Is=e=>pt(e)?wo(e):e;function Vt(e){return e?e.__v_isRef===!0:!1}function kt(e){return Zl(e,!1)}function Gl(e){return Zl(e,!0)}function Zl(e,t){return Vt(e)?e:new _h(e,t)}class _h{constructor(t,s){this.dep=new Yo,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:lt(t),this._value=s?t:he(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||re(t)||Be(t);t=n?t:lt(t),ke(t,s)&&(this._rawValue=t,this._value=n?t:he(t),this.dep.trigger())}}function S(e){return Vt(e)?e.value:e}const mh={get:(e,t,s)=>t==="__v_raw"?e:S(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const i=e[t];return Vt(i)&&!Vt(s)?(i.value=s,!0):Reflect.set(e,t,s,n)}};function Jl(e){return ps(e)?e:new Proxy(e,mh)}class bh{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new Yo(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=pn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&yt!==this)return Il(this,!0),!0}get value(){const t=this.dep.track();return Vl(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function vh(e,t,s=!1){let n,i;return it(e)?n=e:(n=e.get,i=e.set),new bh(n,i,s)}const jn={},ri=new WeakMap;let cs;function yh(e,t=!1,s=cs){if(s){let n=ri.get(s);n||ri.set(s,n=[]),n.push(e)}}function xh(e,t,s=_t){const{immediate:n,deep:i,once:o,scheduler:a,augmentJob:r,call:l}=s,c=C=>i?C:re(C)||i===!1||i===0?$e(C,1):$e(C);let u,h,d,f,g=!1,p=!1;if(Vt(e)?(h=()=>e.value,g=re(e)):ps(e)?(h=()=>c(e),g=!0):et(e)?(p=!0,g=e.some(C=>ps(C)||re(C)),h=()=>e.map(C=>{if(Vt(C))return C.value;if(ps(C))return c(C);if(it(C))return l?l(C,2):C()})):it(e)?t?h=l?()=>l(e,2):e:h=()=>{if(d){Ie();try{d()}finally{je()}}const C=cs;cs=u;try{return l?l(e,3,[f]):e(f)}finally{cs=C}}:h=we,t&&i){const C=h,A=i===!0?1/0:i;h=()=>$e(C(),A)}const _=qu(),v=()=>{u.stop(),_&&_.active&&Bo(_.effects,u)};if(o&&t){const C=t;t=(...A)=>{C(...A),v()}}let w=p?new Array(e.length).fill(jn):jn;const T=C=>{if(!(!(u.flags&1)||!u.dirty&&!C))if(t){const A=u.run();if(i||g||(p?A.some((z,D)=>ke(z,w[D])):ke(A,w))){d&&d();const z=cs;cs=u;try{const D=[A,w===jn?void 0:p&&w[0]===jn?[]:w,f];w=A,l?l(t,3,D):t(...D)}finally{cs=z}}}else u.run()};return r&&r(T),u=new El(h),u.scheduler=a?()=>a(T,!1):T,f=C=>yh(C,!1,u),d=u.onStop=()=>{const C=ri.get(u);if(C){if(l)l(C,4);else for(const A of C)A();ri.delete(u)}},t?n?T(!0):w=u.run():a?a(T.bind(null,!0),!0):u.run(),v.pause=u.pause.bind(u),v.resume=u.resume.bind(u),v.stop=v,v}function $e(e,t=1/0,s){if(t<=0||!pt(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,Vt(e))$e(e.value,t,s);else if(et(e))for(let n=0;n<e.length;n++)$e(e[n],t,s);else if(Tl(e)||Os(e))e.forEach(n=>{$e(n,t,s)});else if(Al(e)){for(const n in e)$e(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&$e(e[n],t,s)}return e}/**
* @vue/runtime-core v3.5.31
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function An(e,t,s,n){try{return n?e(...n):e()}catch(i){Pi(i,t,s)}}function Me(e,t,s,n){if(it(e)){const i=An(e,t,s,n);return i&&Dl(i)&&i.catch(o=>{Pi(o,t,s)}),i}if(et(e)){const i=[];for(let o=0;o<e.length;o++)i.push(Me(e[o],t,s,n));return i}}function Pi(e,t,s,n=!0){const i=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:a}=t&&t.appContext.config||_t;if(t){let r=t.parent;const l=t.proxy,c=`https://vuejs.org/error-reference/#runtime-${s}`;for(;r;){const u=r.ec;if(u){for(let h=0;h<u.length;h++)if(u[h](e,l,c)===!1)return}r=r.parent}if(o){Ie(),An(o,null,10,[e,l,c]),je();return}}kh(e,s,i,n,a)}function kh(e,t,s,n=!0,i=!1){if(i)throw e;console.error(e)}const Wt=[];let be=-1;const zs=[];let Ue=null,Ds=0;const Ql=Promise.resolve();let li=null;function tc(e){const t=li||Ql;return e?t.then(this?e.bind(this):e):t}function wh(e){let t=be+1,s=Wt.length;for(;t<s;){const n=t+s>>>1,i=Wt[n],o=_n(i);o<e||o===e&&i.flags&2?t=n+1:s=n}return t}function Go(e){if(!(e.flags&1)){const t=_n(e),s=Wt[Wt.length-1];!s||!(e.flags&2)&&t>=_n(s)?Wt.push(e):Wt.splice(wh(t),0,e),e.flags|=1,ec()}}function ec(){li||(li=Ql.then(nc))}function Sh(e){et(e)?zs.push(...e):Ue&&e.id===-1?Ue.splice(Ds+1,0,e):e.flags&1||(zs.push(e),e.flags|=1),ec()}function Ta(e,t,s=be+1){for(;s<Wt.length;s++){const n=Wt[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Wt.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function sc(e){if(zs.length){const t=[...new Set(zs)].sort((s,n)=>_n(s)-_n(n));if(zs.length=0,Ue){Ue.push(...t);return}for(Ue=t,Ds=0;Ds<Ue.length;Ds++){const s=Ue[Ds];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}Ue=null,Ds=0}}const _n=e=>e.id==null?e.flags&2?-1:1/0:e.id;function nc(e){try{for(be=0;be<Wt.length;be++){const t=Wt[be];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),An(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;be<Wt.length;be++){const t=Wt[be];t&&(t.flags&=-2)}be=-1,Wt.length=0,sc(),li=null,(Wt.length||zs.length)&&nc()}}let jt=null,ic=null;function ci(e){const t=jt;return jt=e,ic=e&&e.type.__scopeId||null,t}function Zo(e,t=jt,s){if(!t||e._n)return e;const n=(...i)=>{n._d&&di(-1);const o=ci(t);let a;try{a=e(...i)}finally{ci(o),n._d&&di(1)}return a};return n._n=!0,n._c=!0,n._d=!0,n}function Mh(e,t){if(jt===null)return e;const s=Ri(jt),n=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[o,a,r,l=_t]=t[i];o&&(it(o)&&(o={mounted:o,updated:o}),o.deep&&$e(a),n.push({dir:o,instance:s,value:a,oldValue:void 0,arg:r,modifiers:l}))}return e}function ns(e,t,s,n){const i=e.dirs,o=t&&t.dirs;for(let a=0;a<i.length;a++){const r=i[a];o&&(r.oldValue=o[a].value);let l=r.dir[n];l&&(Ie(),Me(l,s,8,[e.el,r,e,t]),je())}}function Ch(e,t){if(Nt){let s=Nt.provides;const n=Nt.parent&&Nt.parent.provides;n===s&&(s=Nt.provides=Object.create(n)),s[e]=t}}function ei(e,t,s=!1){const n=Cd();if(n||Rs){let i=Rs?Rs._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return s&&it(t)?t.call(n&&n.proxy):t}}const Th=Symbol.for("v-scx"),Dh=()=>ei(Th);function Ph(e,t){return Jo(e,null,t)}function an(e,t,s){return Jo(e,t,s)}function Jo(e,t,s=_t){const{immediate:n,deep:i,flush:o,once:a}=s,r=Et({},s),l=t&&n||!t&&o!=="post";let c;if(vn){if(o==="sync"){const f=Dh();c=f.__watcherHandles||(f.__watcherHandles=[])}else if(!l){const f=()=>{};return f.stop=we,f.resume=we,f.pause=we,f}}const u=Nt;r.call=(f,g,p)=>Me(f,u,g,p);let h=!1;o==="post"?r.scheduler=f=>{Yt(f,u&&u.suspense)}:o!=="sync"&&(h=!0,r.scheduler=(f,g)=>{g?f():Go(f)}),r.augmentJob=f=>{t&&(f.flags|=4),h&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const d=xh(e,t,r);return vn&&(c?c.push(d):l&&d()),d}function Ah(e,t,s){const n=this.proxy,i=At(e)?e.includes(".")?oc(n,e):()=>n[e]:e.bind(n,n);let o;it(t)?o=t:(o=t.handler,s=t);const a=On(this),r=Jo(i,o.bind(n),s);return a(),r}function oc(e,t){const s=t.split(".");return()=>{let n=e;for(let i=0;i<s.length&&n;i++)n=n[s[i]];return n}}const Oh=Symbol("_vte"),zh=e=>e.__isTeleport,Lh=Symbol("_leaveCb");function Qo(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Qo(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Lt(e,t){return it(e)?Et({name:e.name},t,{setup:e}):e}function ac(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Da(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const ui=new WeakMap;function rn(e,t,s,n,i=!1){if(et(e)){e.forEach((p,_)=>rn(p,t&&(et(t)?t[_]:t),s,n,i));return}if(Ls(n)&&!i){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&rn(e,t,s,n.component.subTree);return}const o=n.shapeFlag&4?Ri(n.component):n.el,a=i?null:o,{i:r,r:l}=e,c=t&&t.r,u=r.refs===_t?r.refs={}:r.refs,h=r.setupState,d=lt(h),f=h===_t?Cl:p=>Da(u,p)?!1:ht(d,p),g=(p,_)=>!(_&&Da(u,_));if(c!=null&&c!==l){if(Pa(t),At(c))u[c]=null,f(c)&&(h[c]=null);else if(Vt(c)){const p=t;g(c,p.k)&&(c.value=null),p.k&&(u[p.k]=null)}}if(it(l))An(l,r,12,[a,u]);else{const p=At(l),_=Vt(l);if(p||_){const v=()=>{if(e.f){const w=p?f(l)?h[l]:u[l]:g()||!e.k?l.value:u[e.k];if(i)et(w)&&Bo(w,o);else if(et(w))w.includes(o)||w.push(o);else if(p)u[l]=[o],f(l)&&(h[l]=u[l]);else{const T=[o];g(l,e.k)&&(l.value=T),e.k&&(u[e.k]=T)}}else p?(u[l]=a,f(l)&&(h[l]=a)):_&&(g(l,e.k)&&(l.value=a),e.k&&(u[e.k]=a))};if(a){const w=()=>{v(),ui.delete(e)};w.id=-1,ui.set(e,w),Yt(w,s)}else Pa(e),v()}}}function Pa(e){const t=ui.get(e);t&&(t.flags|=8,ui.delete(e))}Ci().requestIdleCallback;Ci().cancelIdleCallback;const Ls=e=>!!e.type.__asyncLoader,rc=e=>e.type.__isKeepAlive;function Rh(e,t){lc(e,"a",t)}function $h(e,t){lc(e,"da",t)}function lc(e,t,s=Nt){const n=e.__wdc||(e.__wdc=()=>{let i=s;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Ai(t,n,s),s){let i=s.parent;for(;i&&i.parent;)rc(i.parent.vnode)&&Eh(n,t,s,i),i=i.parent}}function Eh(e,t,s,n){const i=Ai(t,e,n,!0);Oi(()=>{Bo(n[t],i)},s)}function Ai(e,t,s=Nt,n=!1){if(s){const i=s[e]||(s[e]=[]),o=t.__weh||(t.__weh=(...a)=>{Ie();const r=On(s),l=Me(t,s,e,a);return r(),je(),l});return n?i.unshift(o):i.push(o),o}}const Ne=e=>(t,s=Nt)=>{(!vn||e==="sp")&&Ai(e,(...n)=>t(...n),s)},Fh=Ne("bm"),Kt=Ne("m"),Ih=Ne("bu"),jh=Ne("u"),cc=Ne("bum"),Oi=Ne("um"),Bh=Ne("sp"),Vh=Ne("rtg"),Hh=Ne("rtc");function Wh(e,t=Nt){Ai("ec",e,t)}const Nh=Symbol.for("v-ndc");function Gt(e,t,s,n){let i;const o=s,a=et(e);if(a||At(e)){const r=a&&ps(e);let l=!1,c=!1;r&&(l=!re(e),c=Be(e),e=Ti(e)),i=new Array(e.length);for(let u=0,h=e.length;u<h;u++)i[u]=t(l?c?Is(he(e[u])):he(e[u]):e[u],u,void 0,o)}else if(typeof e=="number"){i=new Array(e);for(let r=0;r<e;r++)i[r]=t(r+1,r,void 0,o)}else if(pt(e))if(e[Symbol.iterator])i=Array.from(e,(r,l)=>t(r,l,void 0,o));else{const r=Object.keys(e);i=new Array(r.length);for(let l=0,c=r.length;l<c;l++){const u=r[l];i[l]=t(e[u],u,l,o)}}else i=[];return i}function Kh(e,t,s={},n,i){if(jt.ce||jt.parent&&Ls(jt.parent)&&jt.parent.ce){const c=Object.keys(s).length>0;return s.name=t,V(),ae(mt,null,[Z("slot",s,n)],c?-2:64)}let o=e[t];o&&o._c&&(o._d=!1),V();const a=o&&uc(o(s)),r=s.key||a&&a.key,l=ae(mt,{key:(r&&!ue(r)?r:`_${t}`)+(!a&&n?"_fb":"")},a||[],a&&e._===1?64:-2);return o&&o._c&&(o._d=!0),l}function uc(e){return e.some(t=>bn(t)?!(t.type===Ve||t.type===mt&&!uc(t.children)):!0)?e:null}const So=e=>e?Ac(e)?Ri(e):So(e.parent):null,ln=Et(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=>dc(e),$forceUpdate:e=>e.f||(e.f=()=>{Go(e.update)}),$nextTick:e=>e.n||(e.n=tc.bind(e.proxy)),$watch:e=>Ah.bind(e)}),Zi=(e,t)=>e!==_t&&!e.__isScriptSetup&&ht(e,t),Uh={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:i,props:o,accessCache:a,type:r,appContext:l}=e;if(t[0]!=="$"){const d=a[t];if(d!==void 0)switch(d){case 1:return n[t];case 2:return i[t];case 4:return s[t];case 3:return o[t]}else{if(Zi(n,t))return a[t]=1,n[t];if(i!==_t&&ht(i,t))return a[t]=2,i[t];if(ht(o,t))return a[t]=3,o[t];if(s!==_t&&ht(s,t))return a[t]=4,s[t];Mo&&(a[t]=0)}}const c=ln[t];let u,h;if(c)return t==="$attrs"&&It(e.attrs,"get",""),c(e);if((u=r.__cssModules)&&(u=u[t]))return u;if(s!==_t&&ht(s,t))return a[t]=4,s[t];if(h=l.config.globalProperties,ht(h,t))return h[t]},set({_:e},t,s){const{data:n,setupState:i,ctx:o}=e;return Zi(i,t)?(i[t]=s,!0):n!==_t&&ht(n,t)?(n[t]=s,!0):ht(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:i,props:o,type:a}},r){let l;return!!(s[r]||e!==_t&&r[0]!=="$"&&ht(e,r)||Zi(t,r)||ht(o,r)||ht(n,r)||ht(ln,r)||ht(i.config.globalProperties,r)||(l=a.__cssModules)&&l[r])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:ht(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function Aa(e){return et(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let Mo=!0;function Yh(e){const t=dc(e),s=e.proxy,n=e.ctx;Mo=!1,t.beforeCreate&&Oa(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:a,watch:r,provide:l,inject:c,created:u,beforeMount:h,mounted:d,beforeUpdate:f,updated:g,activated:p,deactivated:_,beforeDestroy:v,beforeUnmount:w,destroyed:T,unmounted:C,render:A,renderTracked:z,renderTriggered:D,errorCaptured:P,serverPrefetch:R,expose:U,inheritAttrs:$,components:X,directives:nt,filters:ut}=t;if(c&&Xh(c,n,null),a)for(const y in a){const L=a[y];it(L)&&(n[y]=L.bind(s))}if(i){const y=i.call(s,s);pt(y)&&(e.data=Di(y))}if(Mo=!0,o)for(const y in o){const L=o[y],M=it(L)?L.bind(s,s):it(L.get)?L.get.bind(s,s):we,q=!it(L)&&it(L.set)?L.set.bind(s):we,St=E({get:M,set:q});Object.defineProperty(n,y,{enumerable:!0,configurable:!0,get:()=>St.value,set:Tt=>St.value=Tt})}if(r)for(const y in r)hc(r[y],n,s,y);if(l){const y=it(l)?l.call(s):l;Reflect.ownKeys(y).forEach(L=>{Ch(L,y[L])})}u&&Oa(u,e,"c");function G(y,L){et(L)?L.forEach(M=>y(M.bind(s))):L&&y(L.bind(s))}if(G(Fh,h),G(Kt,d),G(Ih,f),G(jh,g),G(Rh,p),G($h,_),G(Wh,P),G(Hh,z),G(Vh,D),G(cc,w),G(Oi,C),G(Bh,R),et(U))if(U.length){const y=e.exposed||(e.exposed={});U.forEach(L=>{Object.defineProperty(y,L,{get:()=>s[L],set:M=>s[L]=M,enumerable:!0})})}else e.exposed||(e.exposed={});A&&e.render===we&&(e.render=A),$!=null&&(e.inheritAttrs=$),X&&(e.components=X),nt&&(e.directives=nt),R&&ac(e)}function Xh(e,t,s=we){et(e)&&(e=Co(e));for(const n in e){const i=e[n];let o;pt(i)?"default"in i?o=ei(i.from||n,i.default,!0):o=ei(i.from||n):o=ei(i),Vt(o)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:a=>o.value=a}):t[n]=o}}function Oa(e,t,s){Me(et(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function hc(e,t,s,n){let i=n.includes(".")?oc(s,n):()=>s[n];if(At(e)){const o=t[e];it(o)&&an(i,o)}else if(it(e))an(i,e.bind(s));else if(pt(e))if(et(e))e.forEach(o=>hc(o,t,s,n));else{const o=it(e.handler)?e.handler.bind(s):t[e.handler];it(o)&&an(i,o,e)}}function dc(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:a}}=e.appContext,r=o.get(t);let l;return r?l=r:!i.length&&!s&&!n?l=t:(l={},i.length&&i.forEach(c=>hi(l,c,a,!0)),hi(l,t,a)),pt(t)&&o.set(t,l),l}function hi(e,t,s,n=!1){const{mixins:i,extends:o}=t;o&&hi(e,o,s,!0),i&&i.forEach(a=>hi(e,a,s,!0));for(const a in t)if(!(n&&a==="expose")){const r=qh[a]||s&&s[a];e[a]=r?r(e[a],t[a]):t[a]}return e}const qh={data:za,props:La,emits:La,methods:Js,computed:Js,beforeCreate:Ht,created:Ht,beforeMount:Ht,mounted:Ht,beforeUpdate:Ht,updated:Ht,beforeDestroy:Ht,beforeUnmount:Ht,destroyed:Ht,unmounted:Ht,activated:Ht,deactivated:Ht,errorCaptured:Ht,serverPrefetch:Ht,components:Js,directives:Js,watch:Zh,provide:za,inject:Gh};function za(e,t){return t?e?function(){return Et(it(e)?e.call(this,this):e,it(t)?t.call(this,this):t)}:t:e}function Gh(e,t){return Js(Co(e),Co(t))}function Co(e){if(et(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function Ht(e,t){return e?[...new Set([].concat(e,t))]:t}function Js(e,t){return e?Et(Object.create(null),e,t):t}function La(e,t){return e?et(e)&&et(t)?[...new Set([...e,...t])]:Et(Object.create(null),Aa(e),Aa(t??{})):t}function Zh(e,t){if(!e)return t;if(!t)return e;const s=Et(Object.create(null),e);for(const n in t)s[n]=Ht(e[n],t[n]);return s}function fc(){return{app:null,config:{isNativeTag:Cl,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 Jh=0;function Qh(e,t){return function(n,i=null){it(n)||(n=Et({},n)),i!=null&&!pt(i)&&(i=null);const o=fc(),a=new WeakSet,r=[];let l=!1;const c=o.app={_uid:Jh++,_component:n,_props:i,_container:null,_context:o,_instance:null,version:zc,get config(){return o.config},set config(u){},use(u,...h){return a.has(u)||(u&&it(u.install)?(a.add(u),u.install(c,...h)):it(u)&&(a.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,d){if(!l){const f=c._ceVNode||Z(n,i);return f.appContext=o,d===!0?d="svg":d===!1&&(d=void 0),e(f,u,d),l=!0,c._container=u,u.__vue_app__=c,Ri(f.component)}},onUnmount(u){r.push(u)},unmount(){l&&(Me(r,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=Rs;Rs=c;try{return u()}finally{Rs=h}}};return c}}let Rs=null;const td=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${le(t)}Modifiers`]||e[`${bs(t)}Modifiers`];function ed(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||_t;let i=s;const o=t.startsWith("update:"),a=o&&td(n,t.slice(7));a&&(a.trim&&(i=s.map(u=>At(u)?u.trim():u)),a.number&&(i=s.map(Ho)));let r,l=n[r=Ui(t)]||n[r=Ui(le(t))];!l&&o&&(l=n[r=Ui(bs(t))]),l&&Me(l,e,6,i);const c=n[r+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[r])return;e.emitted[r]=!0,Me(c,e,6,i)}}const sd=new WeakMap;function pc(e,t,s=!1){const n=s?sd:t.emitsCache,i=n.get(e);if(i!==void 0)return i;const o=e.emits;let a={},r=!1;if(!it(e)){const l=c=>{const u=pc(c,t,!0);u&&(r=!0,Et(a,u))};!s&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!r?(pt(e)&&n.set(e,null),null):(et(o)?o.forEach(l=>a[l]=null):Et(a,o),pt(e)&&n.set(e,a),a)}function zi(e,t){return!e||!wi(t)?!1:(t=t.slice(2).replace(/Once$/,""),ht(e,t[0].toLowerCase()+t.slice(1))||ht(e,bs(t))||ht(e,t))}function Ra(e){const{type:t,vnode:s,proxy:n,withProxy:i,propsOptions:[o],slots:a,attrs:r,emit:l,render:c,renderCache:u,props:h,data:d,setupState:f,ctx:g,inheritAttrs:p}=e,_=ci(e);let v,w;try{if(s.shapeFlag&4){const C=i||n,A=C;v=xe(c.call(A,C,u,h,f,d,g)),w=r}else{const C=t;v=xe(C.length>1?C(h,{attrs:r,slots:a,emit:l}):C(h,null)),w=t.props?r:nd(r)}}catch(C){cn.length=0,Pi(C,e,1),v=Z(Ve)}let T=v;if(w&&p!==!1){const C=Object.keys(w),{shapeFlag:A}=T;C.length&&A&7&&(o&&C.some(Si)&&(w=id(w,o)),T=js(T,w,!1,!0))}return s.dirs&&(T=js(T,null,!1,!0),T.dirs=T.dirs?T.dirs.concat(s.dirs):s.dirs),s.transition&&Qo(T,s.transition),v=T,ci(_),v}const nd=e=>{let t;for(const s in e)(s==="class"||s==="style"||wi(s))&&((t||(t={}))[s]=e[s]);return t},id=(e,t)=>{const s={};for(const n in e)(!Si(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function od(e,t,s){const{props:n,children:i,component:o}=e,{props:a,children:r,patchFlag:l}=t,c=o.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&l>=0){if(l&1024)return!0;if(l&16)return n?$a(n,a,c):!!a;if(l&8){const u=t.dynamicProps;for(let h=0;h<u.length;h++){const d=u[h];if(gc(a,n,d)&&!zi(c,d))return!0}}}else return(i||r)&&(!r||!r.$stable)?!0:n===a?!1:n?a?$a(n,a,c):!0:!!a;return!1}function $a(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let i=0;i<n.length;i++){const o=n[i];if(gc(t,e,o)&&!zi(s,o))return!0}return!1}function gc(e,t,s){const n=e[s],i=t[s];return s==="style"&&pt(n)&&pt(i)?!Wo(n,i):n!==i}function ad({vnode:e,parent:t,suspense:s},n){for(;t;){const i=t.subTree;if(i.suspense&&i.suspense.activeBranch===e&&(i.suspense.vnode.el=i.el=n,e=i),i===e)(e=t.vnode).el=n,t=t.parent;else break}s&&s.activeBranch===e&&(s.vnode.el=n)}const _c={},mc=()=>Object.create(_c),bc=e=>Object.getPrototypeOf(e)===_c;function rd(e,t,s,n=!1){const i={},o=mc();e.propsDefaults=Object.create(null),vc(e,t,i,o);for(const a in e.propsOptions[0])a in i||(i[a]=void 0);s?e.props=n?i:ph(i):e.type.props?e.props=i:e.props=o,e.attrs=o}function ld(e,t,s,n){const{props:i,attrs:o,vnode:{patchFlag:a}}=e,r=lt(i),[l]=e.propsOptions;let c=!1;if((n||a>0)&&!(a&16)){if(a&8){const u=e.vnode.dynamicProps;for(let h=0;h<u.length;h++){let d=u[h];if(zi(e.emitsOptions,d))continue;const f=t[d];if(l)if(ht(o,d))f!==o[d]&&(o[d]=f,c=!0);else{const g=le(d);i[g]=To(l,r,g,f,e,!1)}else f!==o[d]&&(o[d]=f,c=!0)}}}else{vc(e,t,i,o)&&(c=!0);let u;for(const h in r)(!t||!ht(t,h)&&((u=bs(h))===h||!ht(t,u)))&&(l?s&&(s[h]!==void 0||s[u]!==void 0)&&(i[h]=To(l,r,h,void 0,e,!0)):delete i[h]);if(o!==r)for(const h in o)(!t||!ht(t,h))&&(delete o[h],c=!0)}c&&Re(e.attrs,"set","")}function vc(e,t,s,n){const[i,o]=e.propsOptions;let a=!1,r;if(t)for(let l in t){if(sn(l))continue;const c=t[l];let u;i&&ht(i,u=le(l))?!o||!o.includes(u)?s[u]=c:(r||(r={}))[u]=c:zi(e.emitsOptions,l)||(!(l in n)||c!==n[l])&&(n[l]=c,a=!0)}if(o){const l=lt(s),c=r||_t;for(let u=0;u<o.length;u++){const h=o[u];s[h]=To(i,l,h,c[h],e,!ht(c,h))}}return a}function To(e,t,s,n,i,o){const a=e[s];if(a!=null){const r=ht(a,"default");if(r&&n===void 0){const l=a.default;if(a.type!==Function&&!a.skipFactory&&it(l)){const{propsDefaults:c}=i;if(s in c)n=c[s];else{const u=On(i);n=c[s]=l.call(null,t),u()}}else n=l;i.ce&&i.ce._setProp(s,n)}a[0]&&(o&&!r?n=!1:a[1]&&(n===""||n===bs(s))&&(n=!0))}return n}const cd=new WeakMap;function yc(e,t,s=!1){const n=s?cd:t.propsCache,i=n.get(e);if(i)return i;const o=e.props,a={},r=[];let l=!1;if(!it(e)){const u=h=>{l=!0;const[d,f]=yc(h,t,!0);Et(a,d),f&&r.push(...f)};!s&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!l)return pt(e)&&n.set(e,As),As;if(et(o))for(let u=0;u<o.length;u++){const h=le(o[u]);Ea(h)&&(a[h]=_t)}else if(o)for(const u in o){const h=le(u);if(Ea(h)){const d=o[u],f=a[h]=et(d)||it(d)?{type:d}:Et({},d),g=f.type;let p=!1,_=!0;if(et(g))for(let v=0;v<g.length;++v){const w=g[v],T=it(w)&&w.name;if(T==="Boolean"){p=!0;break}else T==="String"&&(_=!1)}else p=it(g)&&g.name==="Boolean";f[0]=p,f[1]=_,(p||ht(f,"default"))&&r.push(h)}}const c=[a,r];return pt(e)&&n.set(e,c),c}function Ea(e){return e[0]!=="$"&&!sn(e)}const ta=e=>e==="_"||e==="_ctx"||e==="$stable",ea=e=>et(e)?e.map(xe):[xe(e)],ud=(e,t,s)=>{if(t._n)return t;const n=Zo((...i)=>ea(t(...i)),s);return n._c=!1,n},xc=(e,t,s)=>{const n=e._ctx;for(const i in e){if(ta(i))continue;const o=e[i];if(it(o))t[i]=ud(i,o,n);else if(o!=null){const a=ea(o);t[i]=()=>a}}},kc=(e,t)=>{const s=ea(t);e.slots.default=()=>s},wc=(e,t,s)=>{for(const n in t)(s||!ta(n))&&(e[n]=t[n])},hd=(e,t,s)=>{const n=e.slots=mc();if(e.vnode.shapeFlag&32){const i=t._;i?(wc(n,t,s),s&&zl(n,"_",i,!0)):xc(t,n)}else t&&kc(e,t)},dd=(e,t,s)=>{const{vnode:n,slots:i}=e;let o=!0,a=_t;if(n.shapeFlag&32){const r=t._;r?s&&r===1?o=!1:wc(i,t,s):(o=!t.$stable,xc(t,i)),a=t}else t&&(kc(e,t),a={default:1});if(o)for(const r in i)!ta(r)&&a[r]==null&&delete i[r]},Yt=md;function fd(e){return pd(e)}function pd(e,t){const s=Ci();s.__VUE__=!0;const{insert:n,remove:i,patchProp:o,createElement:a,createText:r,createComment:l,setText:c,setElementText:u,parentNode:h,nextSibling:d,setScopeId:f=we,insertStaticContent:g}=e,p=(b,x,O,B=null,F=null,I=null,K=void 0,N=null,H=!!x.dynamicChildren)=>{if(b===x)return;b&&!Ks(b,x)&&(B=En(b),Tt(b,F,I,!0),b=null),x.patchFlag===-2&&(H=!1,x.dynamicChildren=null);const{type:j,ref:Q,shapeFlag:Y}=x;switch(j){case Li:_(b,x,O,B);break;case Ve:v(b,x,O,B);break;case si:b==null&&w(x,O,B,K);break;case mt:X(b,x,O,B,F,I,K,N,H);break;default:Y&1?A(b,x,O,B,F,I,K,N,H):Y&6?nt(b,x,O,B,F,I,K,N,H):(Y&64||Y&128)&&j.process(b,x,O,B,F,I,K,N,H,Hs)}Q!=null&&F?rn(Q,b&&b.ref,I,x||b,!x):Q==null&&b&&b.ref!=null&&rn(b.ref,null,I,b,!0)},_=(b,x,O,B)=>{if(b==null)n(x.el=r(x.children),O,B);else{const F=x.el=b.el;x.children!==b.children&&c(F,x.children)}},v=(b,x,O,B)=>{b==null?n(x.el=l(x.children||""),O,B):x.el=b.el},w=(b,x,O,B)=>{[b.el,b.anchor]=g(b.children,x,O,B,b.el,b.anchor)},T=({el:b,anchor:x},O,B)=>{let F;for(;b&&b!==x;)F=d(b),n(b,O,B),b=F;n(x,O,B)},C=({el:b,anchor:x})=>{let O;for(;b&&b!==x;)O=d(b),i(b),b=O;i(x)},A=(b,x,O,B,F,I,K,N,H)=>{if(x.type==="svg"?K="svg":x.type==="math"&&(K="mathml"),b==null)z(x,O,B,F,I,K,N,H);else{const j=b.el&&b.el._isVueCE?b.el:null;try{j&&j._beginPatch(),R(b,x,F,I,K,N,H)}finally{j&&j._endPatch()}}},z=(b,x,O,B,F,I,K,N)=>{let H,j;const{props:Q,shapeFlag:Y,transition:J,dirs:tt}=b;if(H=b.el=a(b.type,I,Q&&Q.is,Q),Y&8?u(H,b.children):Y&16&&P(b.children,H,null,B,F,Ji(b,I),K,N),tt&&ns(b,null,B,"created"),D(H,b,b.scopeId,K,B),Q){for(const gt in Q)gt!=="value"&&!sn(gt)&&o(H,gt,null,Q[gt],I,B);"value"in Q&&o(H,"value",null,Q.value,I),(j=Q.onVnodeBeforeMount)&&_e(j,B,b)}tt&&ns(b,null,B,"beforeMount");const ct=gd(F,J);ct&&J.beforeEnter(H),n(H,x,O),((j=Q&&Q.onVnodeMounted)||ct||tt)&&Yt(()=>{try{j&&_e(j,B,b),ct&&J.enter(H),tt&&ns(b,null,B,"mounted")}finally{}},F)},D=(b,x,O,B,F)=>{if(O&&f(b,O),B)for(let I=0;I<B.length;I++)f(b,B[I]);if(F){let I=F.subTree;if(x===I||Tc(I.type)&&(I.ssContent===x||I.ssFallback===x)){const K=F.vnode;D(b,K,K.scopeId,K.slotScopeIds,F.parent)}}},P=(b,x,O,B,F,I,K,N,H=0)=>{for(let j=H;j<b.length;j++){const Q=b[j]=N?ze(b[j]):xe(b[j]);p(null,Q,x,O,B,F,I,K,N)}},R=(b,x,O,B,F,I,K)=>{const N=x.el=b.el;let{patchFlag:H,dynamicChildren:j,dirs:Q}=x;H|=b.patchFlag&16;const Y=b.props||_t,J=x.props||_t;let tt;if(O&&is(O,!1),(tt=J.onVnodeBeforeUpdate)&&_e(tt,O,x,b),Q&&ns(x,b,O,"beforeUpdate"),O&&is(O,!0),(Y.innerHTML&&J.innerHTML==null||Y.textContent&&J.textContent==null)&&u(N,""),j?U(b.dynamicChildren,j,N,O,B,Ji(x,F),I):K||L(b,x,N,null,O,B,Ji(x,F),I,!1),H>0){if(H&16)$(N,Y,J,O,F);else if(H&2&&Y.class!==J.class&&o(N,"class",null,J.class,F),H&4&&o(N,"style",Y.style,J.style,F),H&8){const ct=x.dynamicProps;for(let gt=0;gt<ct.length;gt++){const vt=ct[gt],Dt=Y[vt],$t=J[vt];($t!==Dt||vt==="value")&&o(N,vt,Dt,$t,F,O)}}H&1&&b.children!==x.children&&u(N,x.children)}else!K&&j==null&&$(N,Y,J,O,F);((tt=J.onVnodeUpdated)||Q)&&Yt(()=>{tt&&_e(tt,O,x,b),Q&&ns(x,b,O,"updated")},B)},U=(b,x,O,B,F,I,K)=>{for(let N=0;N<x.length;N++){const H=b[N],j=x[N],Q=H.el&&(H.type===mt||!Ks(H,j)||H.shapeFlag&198)?h(H.el):O;p(H,j,Q,null,B,F,I,K,!0)}},$=(b,x,O,B,F)=>{if(x!==O){if(x!==_t)for(const I in x)!sn(I)&&!(I in O)&&o(b,I,x[I],null,F,B);for(const I in O){if(sn(I))continue;const K=O[I],N=x[I];K!==N&&I!=="value"&&o(b,I,N,K,F,B)}"value"in O&&o(b,"value",x.value,O.value,F)}},X=(b,x,O,B,F,I,K,N,H)=>{const j=x.el=b?b.el:r(""),Q=x.anchor=b?b.anchor:r("");let{patchFlag:Y,dynamicChildren:J,slotScopeIds:tt}=x;tt&&(N=N?N.concat(tt):tt),b==null?(n(j,O,B),n(Q,O,B),P(x.children||[],O,Q,F,I,K,N,H)):Y>0&&Y&64&&J&&b.dynamicChildren&&b.dynamicChildren.length===J.length?(U(b.dynamicChildren,J,O,F,I,K,N),(x.key!=null||F&&x===F.subTree)&&Sc(b,x,!0)):L(b,x,O,Q,F,I,K,N,H)},nt=(b,x,O,B,F,I,K,N,H)=>{x.slotScopeIds=N,b==null?x.shapeFlag&512?F.ctx.activate(x,O,B,K,H):ut(x,O,B,F,I,K,H):st(b,x,H)},ut=(b,x,O,B,F,I,K)=>{const N=b.component=Md(b,B,F);if(rc(b)&&(N.ctx.renderer=Hs),Td(N,!1,K),N.asyncDep){if(F&&F.registerDep(N,G,K),!b.el){const H=N.subTree=Z(Ve);v(null,H,x,O),b.placeholder=H.el}}else G(N,b,x,O,F,I,K)},st=(b,x,O)=>{const B=x.component=b.component;if(od(b,x,O))if(B.asyncDep&&!B.asyncResolved){y(B,x,O);return}else B.next=x,B.update();else x.el=b.el,B.vnode=x},G=(b,x,O,B,F,I,K)=>{const N=()=>{if(b.isMounted){let{next:Y,bu:J,u:tt,parent:ct,vnode:gt}=b;{const pe=Mc(b);if(pe){Y&&(Y.el=gt.el,y(b,Y,K)),pe.asyncDep.then(()=>{Yt(()=>{b.isUnmounted||j()},F)});return}}let vt=Y,Dt;is(b,!1),Y?(Y.el=gt.el,y(b,Y,K)):Y=gt,J&&ti(J),(Dt=Y.props&&Y.props.onVnodeBeforeUpdate)&&_e(Dt,ct,Y,gt),is(b,!0);const $t=Ra(b),fe=b.subTree;b.subTree=$t,p(fe,$t,h(fe.el),En(fe),b,F,I),Y.el=$t.el,vt===null&&ad(b,$t.el),tt&&Yt(tt,F),(Dt=Y.props&&Y.props.onVnodeUpdated)&&Yt(()=>_e(Dt,ct,Y,gt),F)}else{let Y;const{el:J,props:tt}=x,{bm:ct,m:gt,parent:vt,root:Dt,type:$t}=b,fe=Ls(x);is(b,!1),ct&&ti(ct),!fe&&(Y=tt&&tt.onVnodeBeforeMount)&&_e(Y,vt,x),is(b,!0);{Dt.ce&&Dt.ce._hasShadowRoot()&&Dt.ce._injectChildStyle($t,b.parent?b.parent.type:void 0);const pe=b.subTree=Ra(b);p(null,pe,O,B,b,F,I),x.el=pe.el}if(gt&&Yt(gt,F),!fe&&(Y=tt&&tt.onVnodeMounted)){const pe=x;Yt(()=>_e(Y,vt,pe),F)}(x.shapeFlag&256||vt&&Ls(vt.vnode)&&vt.vnode.shapeFlag&256)&&b.a&&Yt(b.a,F),b.isMounted=!0,x=O=B=null}};b.scope.on();const H=b.effect=new El(N);b.scope.off();const j=b.update=H.run.bind(H),Q=b.job=H.runIfDirty.bind(H);Q.i=b,Q.id=b.uid,H.scheduler=()=>Go(Q),is(b,!0),j()},y=(b,x,O)=>{x.component=b;const B=b.vnode.props;b.vnode=x,b.next=null,ld(b,x.props,B,O),dd(b,x.children,O),Ie(),Ta(b),je()},L=(b,x,O,B,F,I,K,N,H=!1)=>{const j=b&&b.children,Q=b?b.shapeFlag:0,Y=x.children,{patchFlag:J,shapeFlag:tt}=x;if(J>0){if(J&128){q(j,Y,O,B,F,I,K,N,H);return}else if(J&256){M(j,Y,O,B,F,I,K,N,H);return}}tt&8?(Q&16&&Qt(j,F,I),Y!==j&&u(O,Y)):Q&16?tt&16?q(j,Y,O,B,F,I,K,N,H):Qt(j,F,I,!0):(Q&8&&u(O,""),tt&16&&P(Y,O,B,F,I,K,N,H))},M=(b,x,O,B,F,I,K,N,H)=>{b=b||As,x=x||As;const j=b.length,Q=x.length,Y=Math.min(j,Q);let J;for(J=0;J<Y;J++){const tt=x[J]=H?ze(x[J]):xe(x[J]);p(b[J],tt,O,null,F,I,K,N,H)}j>Q?Qt(b,F,I,!0,!1,Y):P(x,O,B,F,I,K,N,H,Y)},q=(b,x,O,B,F,I,K,N,H)=>{let j=0;const Q=x.length;let Y=b.length-1,J=Q-1;for(;j<=Y&&j<=J;){const tt=b[j],ct=x[j]=H?ze(x[j]):xe(x[j]);if(Ks(tt,ct))p(tt,ct,O,null,F,I,K,N,H);else break;j++}for(;j<=Y&&j<=J;){const tt=b[Y],ct=x[J]=H?ze(x[J]):xe(x[J]);if(Ks(tt,ct))p(tt,ct,O,null,F,I,K,N,H);else break;Y--,J--}if(j>Y){if(j<=J){const tt=J+1,ct=tt<Q?x[tt].el:B;for(;j<=J;)p(null,x[j]=H?ze(x[j]):xe(x[j]),O,ct,F,I,K,N,H),j++}}else if(j>J)for(;j<=Y;)Tt(b[j],F,I,!0),j++;else{const tt=j,ct=j,gt=new Map;for(j=ct;j<=J;j++){const te=x[j]=H?ze(x[j]):xe(x[j]);te.key!=null&&gt.set(te.key,j)}let vt,Dt=0;const $t=J-ct+1;let fe=!1,pe=0;const Ws=new Array($t);for(j=0;j<$t;j++)Ws[j]=0;for(j=tt;j<=Y;j++){const te=b[j];if(Dt>=$t){Tt(te,F,I,!0);continue}let ge;if(te.key!=null)ge=gt.get(te.key);else for(vt=ct;vt<=J;vt++)if(Ws[vt-ct]===0&&Ks(te,x[vt])){ge=vt;break}ge===void 0?Tt(te,F,I,!0):(Ws[ge-ct]=j+1,ge>=pe?pe=ge:fe=!0,p(te,x[ge],O,null,F,I,K,N,H),Dt++)}const ya=fe?_d(Ws):As;for(vt=ya.length-1,j=$t-1;j>=0;j--){const te=ct+j,ge=x[te],xa=x[te+1],ka=te+1<Q?xa.el||Cc(xa):B;Ws[j]===0?p(null,ge,O,ka,F,I,K,N,H):fe&&(vt<0||j!==ya[vt]?St(ge,O,ka,2):vt--)}}},St=(b,x,O,B,F=null)=>{const{el:I,type:K,transition:N,children:H,shapeFlag:j}=b;if(j&6){St(b.component.subTree,x,O,B);return}if(j&128){b.suspense.move(x,O,B);return}if(j&64){K.move(b,x,O,Hs);return}if(K===mt){n(I,x,O);for(let Y=0;Y<H.length;Y++)St(H[Y],x,O,B);n(b.anchor,x,O);return}if(K===si){T(b,x,O);return}if(B!==2&&j&1&&N)if(B===0)N.beforeEnter(I),n(I,x,O),Yt(()=>N.enter(I),F);else{const{leave:Y,delayLeave:J,afterLeave:tt}=N,ct=()=>{b.ctx.isUnmounted?i(I):n(I,x,O)},gt=()=>{I._isLeaving&&I[Lh](!0),Y(I,()=>{ct(),tt&&tt()})};J?J(I,ct,gt):gt()}else n(I,x,O)},Tt=(b,x,O,B=!1,F=!1)=>{const{type:I,props:K,ref:N,children:H,dynamicChildren:j,shapeFlag:Q,patchFlag:Y,dirs:J,cacheIndex:tt,memo:ct}=b;if(Y===-2&&(F=!1),N!=null&&(Ie(),rn(N,null,O,b,!0),je()),tt!=null&&(x.renderCache[tt]=void 0),Q&256){x.ctx.deactivate(b);return}const gt=Q&1&&J,vt=!Ls(b);let Dt;if(vt&&(Dt=K&&K.onVnodeBeforeUnmount)&&_e(Dt,x,b),Q&6)ss(b.component,O,B);else{if(Q&128){b.suspense.unmount(O,B);return}gt&&ns(b,null,x,"beforeUnmount"),Q&64?b.type.remove(b,x,O,Hs,B):j&&!j.hasOnce&&(I!==mt||Y>0&&Y&64)?Qt(j,x,O,!1,!0):(I===mt&&Y&384||!F&&Q&16)&&Qt(H,x,O),B&&Ke(b)}const $t=ct!=null&&tt==null;(vt&&(Dt=K&&K.onVnodeUnmounted)||gt||$t)&&Yt(()=>{Dt&&_e(Dt,x,b),gt&&ns(b,null,x,"unmounted"),$t&&(b.el=null)},O)},Ke=b=>{const{type:x,el:O,anchor:B,transition:F}=b;if(x===mt){Ce(O,B);return}if(x===si){C(b);return}const I=()=>{i(O),F&&!F.persisted&&F.afterLeave&&F.afterLeave()};if(b.shapeFlag&1&&F&&!F.persisted){const{leave:K,delayLeave:N}=F,H=()=>K(O,I);N?N(b.el,I,H):H()}else I()},Ce=(b,x)=>{let O;for(;b!==x;)O=d(b),i(b),b=O;i(x)},ss=(b,x,O)=>{const{bum:B,scope:F,job:I,subTree:K,um:N,m:H,a:j}=b;Fa(H),Fa(j),B&&ti(B),F.stop(),I&&(I.flags|=8,Tt(K,b,x,O)),N&&Yt(N,x),Yt(()=>{b.isUnmounted=!0},x)},Qt=(b,x,O,B=!1,F=!1,I=0)=>{for(let K=I;K<b.length;K++)Tt(b[K],x,O,B,F)},En=b=>{if(b.shapeFlag&6)return En(b.component.subTree);if(b.shapeFlag&128)return b.suspense.next();const x=d(b.anchor||b.el),O=x&&x[Oh];return O?d(O):x};let Ki=!1;const va=(b,x,O)=>{let B;b==null?x._vnode&&(Tt(x._vnode,null,null,!0),B=x._vnode.component):p(x._vnode||null,b,x,null,null,null,O),x._vnode=b,Ki||(Ki=!0,Ta(B),sc(),Ki=!1)},Hs={p,um:Tt,m:St,r:Ke,mt:ut,mc:P,pc:L,pbc:U,n:En,o:e};return{render:va,hydrate:void 0,createApp:Qh(va)}}function Ji({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function is({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function gd(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Sc(e,t,s=!1){const n=e.children,i=t.children;if(et(n)&&et(i))for(let o=0;o<n.length;o++){const a=n[o];let r=i[o];r.shapeFlag&1&&!r.dynamicChildren&&((r.patchFlag<=0||r.patchFlag===32)&&(r=i[o]=ze(i[o]),r.el=a.el),!s&&r.patchFlag!==-2&&Sc(a,r)),r.type===Li&&(r.patchFlag===-1&&(r=i[o]=ze(r)),r.el=a.el),r.type===Ve&&!r.el&&(r.el=a.el)}}function _d(e){const t=e.slice(),s=[0];let n,i,o,a,r;const l=e.length;for(n=0;n<l;n++){const c=e[n];if(c!==0){if(i=s[s.length-1],e[i]<c){t[n]=i,s.push(n);continue}for(o=0,a=s.length-1;o<a;)r=o+a>>1,e[s[r]]<c?o=r+1:a=r;c<e[s[o]]&&(o>0&&(t[n]=s[o-1]),s[o]=n)}}for(o=s.length,a=s[o-1];o-- >0;)s[o]=a,a=t[a];return s}function Mc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Mc(t)}function Fa(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Cc(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Cc(t.subTree):null}const Tc=e=>e.__isSuspense;function md(e,t){t&&t.pendingBranch?et(e)?t.effects.push(...e):t.effects.push(e):Sh(e)}const mt=Symbol.for("v-fgt"),Li=Symbol.for("v-txt"),Ve=Symbol.for("v-cmt"),si=Symbol.for("v-stc"),cn=[];let ie=null;function V(e=!1){cn.push(ie=e?null:[])}function bd(){cn.pop(),ie=cn[cn.length-1]||null}let mn=1;function di(e,t=!1){mn+=e,e<0&&ie&&t&&(ie.hasOnce=!0)}function Dc(e){return e.dynamicChildren=mn>0?ie||As:null,bd(),mn>0&&ie&&ie.push(e),e}function W(e,t,s,n,i,o){return Dc(m(e,t,s,n,i,o,!0))}function ae(e,t,s,n,i){return Dc(Z(e,t,s,n,i,!0))}function bn(e){return e?e.__v_isVNode===!0:!1}function Ks(e,t){return e.type===t.type&&e.key===t.key}const Pc=({key:e})=>e??null,ni=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?At(e)||Vt(e)||it(e)?{i:jt,r:e,k:t,f:!!s}:e:null);function m(e,t=null,s=null,n=0,i=null,o=e===mt?0:1,a=!1,r=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Pc(t),ref:t&&ni(t),scopeId:ic,slotScopeIds:null,children:s,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:n,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:jt};return r?(sa(l,s),o&128&&e.normalize(l)):s&&(l.shapeFlag|=At(s)?8:16),mn>0&&!a&&ie&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&ie.push(l),l}const Z=vd;function vd(e,t=null,s=null,n=0,i=null,o=!1){if((!e||e===Nh)&&(e=Ve),bn(e)){const r=js(e,t,!0);return s&&sa(r,s),mn>0&&!o&&ie&&(r.shapeFlag&6?ie[ie.indexOf(e)]=r:ie.push(r)),r.patchFlag=-2,r}if(Od(e)&&(e=e.__vccOpts),t){t=yd(t);let{class:r,style:l}=t;r&&!At(r)&&(t.class=Rt(r)),pt(l)&&(Pn(l)&&!et(l)&&(l=Et({},l)),t.style=qt(l))}const a=At(e)?1:Tc(e)?128:zh(e)?64:pt(e)?4:it(e)?2:0;return m(e,t,s,n,i,a,o,!0)}function yd(e){return e?Pn(e)||bc(e)?Et({},e):e:null}function js(e,t,s=!1,n=!1){const{props:i,ref:o,patchFlag:a,children:r,transition:l}=e,c=t?kd(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&Pc(c),ref:t&&t.ref?s&&o?et(o)?o.concat(ni(t)):[o,ni(t)]:ni(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:r,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==mt?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&js(e.ssContent),ssFallback:e.ssFallback&&js(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&n&&Qo(u,l.clone(u)),u}function He(e=" ",t=0){return Z(Li,null,e,t)}function xd(e,t){const s=Z(si,null,e);return s.staticCount=t,s}function rt(e="",t=!1){return t?(V(),ae(Ve,null,e)):Z(Ve,null,e)}function xe(e){return e==null||typeof e=="boolean"?Z(Ve):et(e)?Z(mt,null,e.slice()):bn(e)?ze(e):Z(Li,null,String(e))}function ze(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:js(e)}function sa(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(et(t))s=16;else if(typeof t=="object")if(n&65){const i=t.default;i&&(i._c&&(i._d=!1),sa(e,i()),i._c&&(i._d=!0));return}else{s=32;const i=t._;!i&&!bc(t)?t._ctx=jt:i===3&&jt&&(jt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else it(t)?(t={default:t,_ctx:jt},s=32):(t=String(t),n&64?(s=16,t=[He(t)]):s=8);e.children=t,e.shapeFlag|=s}function kd(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const i in n)if(i==="class")t.class!==n.class&&(t.class=Rt([t.class,n.class]));else if(i==="style")t.style=qt([t.style,n.style]);else if(wi(i)){const o=t[i],a=n[i];a&&o!==a&&!(et(o)&&o.includes(a))?t[i]=o?[].concat(o,a):a:a==null&&o==null&&!Si(i)&&(t[i]=a)}else i!==""&&(t[i]=n[i])}return t}function _e(e,t,s,n=null){Me(e,t,7,[s,n])}const wd=fc();let Sd=0;function Md(e,t,s){const n=e.type,i=(t?t.appContext:e.appContext)||wd,o={uid:Sd++,vnode:e,type:n,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Xu(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:yc(n,i),emitsOptions:pc(n,i),emit:null,emitted:null,propsDefaults:_t,inheritAttrs:n.inheritAttrs,ctx:_t,data:_t,props:_t,attrs:_t,slots:_t,refs:_t,setupState:_t,setupContext:null,suspense:s,suspenseId:s?s.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=ed.bind(null,o),e.ce&&e.ce(o),o}let Nt=null;const Cd=()=>Nt||jt;let fi,Do;{const e=Ci(),t=(s,n)=>{let i;return(i=e[s])||(i=e[s]=[]),i.push(n),o=>{i.length>1?i.forEach(a=>a(o)):i[0](o)}};fi=t("__VUE_INSTANCE_SETTERS__",s=>Nt=s),Do=t("__VUE_SSR_SETTERS__",s=>vn=s)}const On=e=>{const t=Nt;return fi(e),e.scope.on(),()=>{e.scope.off(),fi(t)}},Ia=()=>{Nt&&Nt.scope.off(),fi(null)};function Ac(e){return e.vnode.shapeFlag&4}let vn=!1;function Td(e,t=!1,s=!1){t&&Do(t);const{props:n,children:i}=e.vnode,o=Ac(e);rd(e,n,o,t),hd(e,i,s||t);const a=o?Dd(e,t):void 0;return t&&Do(!1),a}function Dd(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Uh);const{setup:n}=s;if(n){Ie();const i=e.setupContext=n.length>1?Ad(e):null,o=On(e),a=An(n,e,0,[e.props,i]),r=Dl(a);if(je(),o(),(r||e.sp)&&!Ls(e)&&ac(e),r){if(a.then(Ia,Ia),t)return a.then(l=>{ja(e,l)}).catch(l=>{Pi(l,e,0)});e.asyncDep=a}else ja(e,a)}else Oc(e)}function ja(e,t,s){it(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:pt(t)&&(e.setupState=Jl(t)),Oc(e)}function Oc(e,t,s){const n=e.type;e.render||(e.render=n.render||we);{const i=On(e);Ie();try{Yh(e)}finally{je(),i()}}}const Pd={get(e,t){return It(e,"get",""),e[t]}};function Ad(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,Pd),slots:e.slots,emit:e.emit,expose:t}}function Ri(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Jl(gh(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in ln)return ln[s](e)},has(t,s){return s in t||s in ln}})):e.proxy}function Od(e){return it(e)&&"__vccOpts"in e}const E=(e,t)=>vh(e,t,vn);function Po(e,t,s){try{di(-1);const n=arguments.length;return n===2?pt(t)&&!et(t)?bn(t)?Z(e,null,[t]):Z(e,t):Z(e,null,t):(n>3?s=Array.prototype.slice.call(arguments,2):n===3&&bn(s)&&(s=[s]),Z(e,t,s))}finally{di(1)}}const zc="3.5.31";/**
* @vue/runtime-dom v3.5.31
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Ao;const Ba=typeof window<"u"&&window.trustedTypes;if(Ba)try{Ao=Ba.createPolicy("vue",{createHTML:e=>e})}catch{}const Lc=Ao?e=>Ao.createHTML(e):e=>e,zd="http://www.w3.org/2000/svg",Ld="http://www.w3.org/1998/Math/MathML",Oe=typeof document<"u"?document:null,Va=Oe&&Oe.createElement("template"),Rd={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const i=t==="svg"?Oe.createElementNS(zd,e):t==="mathml"?Oe.createElementNS(Ld,e):s?Oe.createElement(e,{is:s}):Oe.createElement(e);return e==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:e=>Oe.createTextNode(e),createComment:e=>Oe.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Oe.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,i,o){const a=s?s.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),s),!(i===o||!(i=i.nextSibling)););else{Va.innerHTML=Lc(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const r=Va.content;if(n==="svg"||n==="mathml"){const l=r.firstChild;for(;l.firstChild;)r.appendChild(l.firstChild);r.removeChild(l)}t.insertBefore(r,s)}return[a?a.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},$d=Symbol("_vtc");function Ed(e,t,s){const n=e[$d];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Ha=Symbol("_vod"),Fd=Symbol("_vsh"),Id=Symbol(""),jd=/(?:^|;)\s*display\s*:/;function Bd(e,t,s){const n=e.style,i=At(s);let o=!1;if(s&&!i){if(t)if(At(t))for(const a of t.split(";")){const r=a.slice(0,a.indexOf(":")).trim();s[r]==null&&ii(n,r,"")}else for(const a in t)s[a]==null&&ii(n,a,"");for(const a in s)a==="display"&&(o=!0),ii(n,a,s[a])}else if(i){if(t!==s){const a=n[Id];a&&(s+=";"+a),n.cssText=s,o=jd.test(s)}}else t&&e.removeAttribute("style");Ha in e&&(e[Ha]=o?n.display:"",e[Fd]&&(n.display="none"))}const Wa=/\s*!important$/;function ii(e,t,s){if(et(s))s.forEach(n=>ii(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Vd(e,t);Wa.test(s)?e.setProperty(bs(n),s.replace(Wa,""),"important"):e[n]=s}}const Na=["Webkit","Moz","ms"],Qi={};function Vd(e,t){const s=Qi[t];if(s)return s;let n=le(t);if(n!=="filter"&&n in e)return Qi[t]=n;n=Ol(n);for(let i=0;i<Na.length;i++){const o=Na[i]+n;if(o in e)return Qi[t]=o}return t}const Ka="http://www.w3.org/1999/xlink";function Ua(e,t,s,n,i,o=Uu(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Ka,t.slice(6,t.length)):e.setAttributeNS(Ka,t,s):s==null||o&&!Ll(s)?e.removeAttribute(t):e.setAttribute(t,o?"":ue(s)?String(s):s)}function Ya(e,t,s,n,i){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?Lc(s):s);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const r=o==="OPTION"?e.getAttribute("value")||"":e.value,l=s==null?e.type==="checkbox"?"on":"":String(s);(r!==l||!("_value"in e))&&(e.value=l),s==null&&e.removeAttribute(t),e._value=s;return}let a=!1;if(s===""||s==null){const r=typeof e[t];r==="boolean"?s=Ll(s):s==null&&r==="string"?(s="",a=!0):r==="number"&&(s=0,a=!0)}try{e[t]=s}catch{}a&&e.removeAttribute(i||t)}function Ps(e,t,s,n){e.addEventListener(t,s,n)}function Hd(e,t,s,n){e.removeEventListener(t,s,n)}const Xa=Symbol("_vei");function Wd(e,t,s,n,i=null){const o=e[Xa]||(e[Xa]={}),a=o[t];if(n&&a)a.value=n;else{const[r,l]=Nd(t);if(n){const c=o[t]=Yd(n,i);Ps(e,r,c,l)}else a&&(Hd(e,r,a,l),o[t]=void 0)}}const qa=/(?:Once|Passive|Capture)$/;function Nd(e){let t;if(qa.test(e)){t={};let n;for(;n=e.match(qa);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):bs(e.slice(2)),t]}let to=0;const Kd=Promise.resolve(),Ud=()=>to||(Kd.then(()=>to=0),to=Date.now());function Yd(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;Me(Xd(n,s.value),t,5,[n])};return s.value=e,s.attached=Ud(),s}function Xd(e,t){if(et(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>i=>!i._stopped&&n&&n(i))}else return t}const Ga=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,qd=(e,t,s,n,i,o)=>{const a=i==="svg";t==="class"?Ed(e,n,a):t==="style"?Bd(e,s,n):wi(t)?Si(t)||Wd(e,t,s,n,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Gd(e,t,n,a))?(Ya(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Ua(e,t,n,a,o,t!=="value")):e._isVueCE&&(Zd(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!At(n)))?Ya(e,le(t),n,o,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Ua(e,t,n,a))};function Gd(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ga(t)&&it(s));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 i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return Ga(t)&&At(s)?!1:t in e}function Zd(e,t){const s=e._def.props;if(!s)return!1;const n=le(t);return Array.isArray(s)?s.some(i=>le(i)===n):Object.keys(s).some(i=>le(i)===n)}const Za=e=>{const t=e.props["onUpdate:modelValue"]||!1;return et(t)?s=>ti(t,s):t};function Jd(e){e.target.composing=!0}function Ja(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const eo=Symbol("_assign");function Qa(e,t,s){return t&&(e=e.trim()),s&&(e=Ho(e)),e}const Qd={created(e,{modifiers:{lazy:t,trim:s,number:n}},i){e[eo]=Za(i);const o=n||i.props&&i.props.type==="number";Ps(e,t?"change":"input",a=>{a.target.composing||e[eo](Qa(e.value,s,o))}),(s||o)&&Ps(e,"change",()=>{e.value=Qa(e.value,s,o)}),t||(Ps(e,"compositionstart",Jd),Ps(e,"compositionend",Ja),Ps(e,"change",Ja))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:i,number:o}},a){if(e[eo]=Za(a),e.composing)return;const r=(o||e.type==="number")&&!/^0\d/.test(e.value)?Ho(e.value):e.value,l=t??"";if(r===l)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(n&&t===s||i&&e.value.trim()===l)||(e.value=l)}},tf=Et({patchProp:qd},Rd);let tr;function ef(){return tr||(tr=fd(tf))}const sf=((...e)=>{const t=ef().createApp(...e),{mount:s}=t;return t.mount=n=>{const i=of(n);if(!i)return;const o=t._component;!it(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const a=s(i,!1,nf(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),a},t});function nf(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function of(e){return At(e)?document.querySelector(e):e}const Rc="cc-dashboard-theme";function af(){if(typeof window>"u")return"dark";const e=localStorage.getItem(Rc);return e==="light"||e==="dark"?e:window.matchMedia?.("(prefers-color-scheme: light)").matches?"light":"dark"}const ws=kt(af());function $c(){Ph(()=>{const t=document.documentElement;ws.value==="light"?t.setAttribute("data-theme","light"):t.removeAttribute("data-theme"),localStorage.setItem(Rc,ws.value)});function e(){ws.value=ws.value==="dark"?"light":"dark"}return{theme:ws,toggleTheme:e,isDark:()=>ws.value==="dark"}}const Ec="cc-dashboard-locale",rf={"nav.overview":{en:"Overview",zh:"概览"},"nav.trends":{en:"Trends",zh:"趋势"},"nav.projects":{en:"Projects",zh:"项目"},"nav.sessions":{en:"Sessions",zh:"会话"},"nav.heatmap":{en:"Heatmap",zh:"热力图"},"nav.wrapped":{en:"Wrapped",zh:"年度总结"},"kpi.sessions":{en:"Sessions",zh:"会话数"},"kpi.turns":{en:"Turns",zh:"对话轮次"},"kpi.claude_wrote":{en:"Claude Wrote",zh:"Claude 输出"},"kpi.claude_read":{en:"Claude Read",zh:"Claude 读取"},"kpi.cache_hit":{en:"Cache Hit Rate",zh:"缓存命中率"},"kpi.api_cost":{en:"API Cost",zh:"API 费用"},"kpi.daily_avg":{en:"Daily Avg",zh:"日均费用"},"kpi.peak_context":{en:"Peak Context",zh:"峰值上下文"},"kpi.compactions":{en:"Compactions",zh:"压缩次数"},"kpi.avg_duration":{en:"Avg Duration",zh:"平均时长"},"kpi.output_ratio":{en:"Output Ratio",zh:"输出比率"},"overview.model_distribution":{en:"Model Distribution",zh:"模型分布"},"overview.cost_composition":{en:"Cost Composition",zh:"费用构成"},"overview.top_tools":{en:"Top Tools",zh:"工具排行"},"overview.top_projects":{en:"Top Projects",zh:"项目排行"},"overview.efficiency_metrics":{en:"Efficiency Metrics",zh:"效率指标"},"overview.summary_stats":{en:"Summary Stats",zh:"汇总统计"},"overview.cache_saved":{en:"Cache saved you",zh:"缓存为你节省了"},"overview.reads_free":{en:"of reads were free",zh:"的读取免费"},"overview.subscription":{en:"Subscription",zh:"订阅"},"overview.value_multiplier":{en:"value multiplier",zh:"倍价值"},"overview.agent_driven":{en:"agent-driven",zh:"由 Agent 驱动"},"overview.total_cost_center":{en:"Total Cost",zh:"总费用"},"overview.output_input_ratio":{en:"output / input tokens",zh:"输出 / 输入 token"},"overview.dollar_per_turn":{en:"$/turn",zh:"$/轮"},"kpi.input_tokens":{en:"Input Tokens",zh:"输入 Token"},"kpi.total_cost":{en:"Total Cost",zh:"总费用"},"kpi.cache_savings":{en:"Cache Savings",zh:"缓存节省"},"kpi.output_tokens":{en:"Output Tokens",zh:"输出 Token"},"kpi.cost_per_turn":{en:"Cost per Turn",zh:"每轮费用"},"kpi.avg_output_turn":{en:"Avg Output/Turn",zh:"平均输出/轮"},"kpi.tokens":{en:"tokens",zh:"tokens"},"cost.cache_read":{en:"Cache Read",zh:"缓存读取"},"cost.cache_write":{en:"Cache Write",zh:"缓存写入"},"cost.output":{en:"Output",zh:"输出"},"cost.input":{en:"Input",zh:"输入"},"summary.daily_avg_cost":{en:"Daily Avg Cost",zh:"日均费用"},"summary.compactions":{en:"Total Compactions",zh:"总压缩次数"},"summary.peak_context":{en:"Peak Context",zh:"峰值上下文"},"summary.avg_duration":{en:"Avg Session Duration",zh:"平均会话时长"},"summary.most_expensive":{en:"Most Expensive Session",zh:"最贵会话"},"heatmap.title":{en:"Activity Heatmap",zh:"活跃热力图"},"heatmap.metric_turns":{en:"Turns",zh:"轮次"},"heatmap.metric_cost":{en:"Cost",zh:"费用"},"heatmap.metric_sessions":{en:"Sessions",zh:"会话"},"heatmap.legend_less":{en:"Less",zh:"少"},"heatmap.legend_more":{en:"More",zh:"多"},"heatmap.tooltip_date":{en:"Date",zh:"日期"},"heatmap.tooltip_turns":{en:"Turns",zh:"轮次"},"heatmap.tooltip_cost":{en:"Cost",zh:"费用"},"heatmap.tooltip_sessions":{en:"Sessions",zh:"会话"},"heatmap.active_days":{en:"Active Days",zh:"活跃天数"},"heatmap.current_streak":{en:"Current Streak",zh:"当前连续"},"heatmap.longest_streak":{en:"Longest Streak",zh:"最长连续"},"heatmap.busiest_day":{en:"Busiest Day",zh:"最忙碌日"},"heatmap.days":{en:"days",zh:"天"},"heatmap.no_activity":{en:"No activity",zh:"无活动"},"heatmap.hour_distribution":{en:"Weekday x Hour Distribution",zh:"星期 x 小时分布"},"heatmap.weekday_mon":{en:"Mon",zh:"一"},"heatmap.weekday_tue":{en:"Tue",zh:"二"},"heatmap.weekday_wed":{en:"Wed",zh:"三"},"heatmap.weekday_thu":{en:"Thu",zh:"四"},"heatmap.weekday_fri":{en:"Fri",zh:"五"},"heatmap.weekday_sat":{en:"Sat",zh:"六"},"heatmap.weekday_sun":{en:"Sun",zh:"日"},"heatmap.stats":{en:"Statistics",zh:"统计"},"heatmap.contributions_in_range":{en:"contributions in the last year",zh:"次贡献(过去一年)"},"projects.kpi_total_projects":{en:"Total Projects",zh:"项目总数"},"projects.kpi_total_cost":{en:"Total Cost",zh:"总费用"},"projects.kpi_avg_cost":{en:"Avg Cost / Project",zh:"项目均费"},"projects.ranking_title":{en:"Project Ranking",zh:"项目排行"},"projects.col_name":{en:"Project Name",zh:"项目名称"},"projects.col_sessions":{en:"Sessions",zh:"会话数"},"projects.col_turns":{en:"Turns",zh:"轮次"},"projects.col_agent_turns":{en:"Agent Turns",zh:"Agent 轮次"},"projects.col_cost_per_session":{en:"$/Session",zh:"$/会话"},"projects.col_model":{en:"Model",zh:"模型"},"projects.col_total_cost":{en:"Total Cost",zh:"总费用"},"projects.col_session_id":{en:"Session ID",zh:"会话 ID"},"projects.col_duration":{en:"Duration",zh:"时长"},"projects.col_cost":{en:"Cost",zh:"费用"},"projects.col_cache_hit":{en:"Cache Hit%",zh:"缓存命中%"},"projects.sessions_for":{en:"Sessions for",zh:"会话列表 -"},"projects.no_sessions":{en:"No session data available for this project.",zh:"该项目暂无会话数据。"},"trends.title":{en:"Trends",zh:"趋势"},"trends.daily":{en:"Daily",zh:"日"},"trends.monthly":{en:"Monthly",zh:"月"},"trends.log_scale":{en:"Log",zh:"对数"},"trends.linear_scale":{en:"Linear",zh:"线性"},"trends.usage_trend":{en:"Usage Trend",zh:"使用趋势"},"trends.sessions_per_day":{en:"Sessions per Day",zh:"每日会话数"},"trends.sessions_per_month":{en:"Sessions per Month",zh:"每月会话数"},"trends.cost_per_turn_trend":{en:"Cost per Turn Trend",zh:"每轮费用趋势"},"trends.summary":{en:"Summary",zh:"趋势摘要"},"trends.total_cost":{en:"Total Cost",zh:"总费用"},"trends.avg_daily_cost":{en:"Avg Daily Cost",zh:"日均费用"},"trends.avg_monthly_cost":{en:"Avg Monthly Cost",zh:"月均费用"},"trends.total_turns":{en:"Total Turns",zh:"总轮次"},"trends.avg_cost_per_turn":{en:"Avg Cost/Turn",zh:"平均每轮费用"},"trends.cost":{en:"Cost ($)",zh:"费用 ($)"},"trends.turns":{en:"Turns",zh:"轮次"},"trends.cost_per_turn":{en:"Cost/Turn ($)",zh:"每轮费用 ($)"},"trends.sessions":{en:"Sessions",zh:"会话数"},"sessions.kpi_total_sessions":{en:"Total Sessions",zh:"总会话数"},"sessions.kpi_total_cost":{en:"Total Cost",zh:"总费用"},"sessions.kpi_avg_cost":{en:"Avg Cost / Session",zh:"会话均费"},"sessions.kpi_avg_duration":{en:"Avg Duration",zh:"平均时长"},"sessions.table_title":{en:"Session List",zh:"会话列表"},"sessions.search_placeholder":{en:"Search by session ID or project...",zh:"按会话 ID 或项目搜索..."},"sessions.sort_by_cost":{en:"By Cost",zh:"按费用"},"sessions.sort_by_date":{en:"By Date",zh:"按日期"},"sessions.sort_by_turns":{en:"By Turns",zh:"按轮次"},"sessions.filter_all":{en:"All",zh:"全部"},"sessions.col_session_id":{en:"Session ID",zh:"会话 ID"},"sessions.col_project":{en:"Project",zh:"项目"},"sessions.col_turns":{en:"Turns",zh:"轮次"},"sessions.col_duration":{en:"Duration",zh:"时长"},"sessions.col_cost":{en:"Cost",zh:"费用"},"sessions.col_model":{en:"Model",zh:"模型"},"sessions.col_cache_hit":{en:"Cache Hit%",zh:"缓存命中%"},"sessions.col_date":{en:"Date",zh:"日期"},"sessions.detail_title":{en:"Title",zh:"标题"},"sessions.detail_tags":{en:"Tags",zh:"标签"},"sessions.detail_mode":{en:"Mode",zh:"模式"},"sessions.detail_branch":{en:"Branch",zh:"分支"},"sessions.detail_agent_breakdown":{en:"Agent Breakdown",zh:"Agent 分解"},"sessions.detail_agent_type":{en:"Agent Type",zh:"Agent 类型"},"sessions.detail_agent_desc":{en:"Description",zh:"描述"},"sessions.detail_agent_turns":{en:"Turns",zh:"轮次"},"sessions.detail_agent_output":{en:"Output Tokens",zh:"输出 Token"},"sessions.detail_agent_cost":{en:"Cost",zh:"费用"},"sessions.detail_metadata":{en:"Metadata",zh:"元数据"},"sessions.detail_autonomy":{en:"Autonomy Ratio",zh:"自主比"},"sessions.detail_api_errors":{en:"API Errors",zh:"API 错误"},"sessions.detail_max_context":{en:"Max Context",zh:"最大上下文"},"sessions.detail_compactions":{en:"Compactions",zh:"压缩次数"},"sessions.detail_service_tier":{en:"Service Tier",zh:"服务层级"},"sessions.detail_output_tokens":{en:"Output Tokens",zh:"输出 Token"},"sessions.detail_agent_cost_label":{en:"Agent Cost",zh:"Agent 费用"},"sessions.detail_cache_hit":{en:"Cache Hit Rate",zh:"缓存命中率"},"sessions.no_sessions":{en:"No session data available.",zh:"暂无会话数据。"},"sessions.no_agents":{en:"No agent data.",zh:"无 Agent 数据。"},"sessions.no_title":{en:"(untitled)",zh:"(无标题)"},"session.subagents":{en:"Subagents",zh:"子智能体"},"session.plugins":{en:"Plugins",zh:"插件"},"session.skills":{en:"Skills",zh:"技能"},"session.hooks":{en:"Hooks",zh:"钩子"},"sessions.hook_invocations_unit":{en:"invocations",zh:"次调用"},"sessions.hook_errors_unit":{en:"errors",zh:"错误"},"sessions.hook_prevented_unit":{en:"prevented",zh:"阻止"},"sessions.chip_times":{en:"×",zh:"×"},"sessions.chip_calls":{en:"calls",zh:"次调用"},"sessions.chip_and_more":{en:"...and {n} more",zh:"...另外 {n} 个"},"sessions.orphan_tag":{en:"(orphan)",zh:"(孤儿)"},"sessions.orphan_banner":{en:"Orphaned session: parent jsonl was deleted but subagent files remain on disk. Totals still include this session.",zh:"孤儿会话:父级 jsonl 已被删除,但子智能体文件仍存在。该会话的统计仍计入全局总计。"},"common.coming_soon":{en:"Coming soon",zh:"即将推出"},"common.theme_toggle":{en:"Toggle theme",zh:"切换主题"},"common.lang_toggle":{en:"Language",zh:"语言"},"common.turns":{en:"turns",zh:"轮"},"common.sessions":{en:"sessions",zh:"个会话"},"footer.generated_by":{en:"Generated by",zh:"由"},"footer.suffix":{en:"",zh:"生成"},"wrapped.hero_title_pre":{en:"Your",zh:"你的"},"wrapped.hero_title_suf":{en:"Claude Code Wrapped",zh:"Claude Code 年度总结"},"wrapped.active_of":{en:"active of",zh:"活跃 /"},"wrapped.days_in":{en:"days in",zh:"天,"},"wrapped.archetype_desc.Architect":{en:"You design systems that think for themselves",zh:"你设计能自主思考的系统"},"wrapped.archetype_desc.Sprinter":{en:"Fast iterations, rapid results",zh:"快速迭代,极速产出"},"wrapped.archetype_desc.NightOwl":{en:"The city sleeps, your code doesn't",zh:"城市入睡,代码不眠"},"wrapped.archetype_desc.Delegator":{en:"You orchestrate agents like a symphony",zh:"你像指挥交响乐一样编排 Agent"},"wrapped.archetype_desc.Explorer":{en:"Every project is a new frontier",zh:"每个项目都是新的疆界"},"wrapped.archetype_desc.Marathoner":{en:"Endurance is your superpower",zh:"耐力是你的超能力"},"wrapped.activity_stats":{en:"Activity Stats",zh:"活跃统计"},"wrapped.active_days":{en:"Active Days",zh:"活跃天数"},"wrapped.longest_streak":{en:"Longest Streak",zh:"最长连续"},"wrapped.consecutive_days":{en:"consecutive days",zh:"连续天数"},"wrapped.ghost_days":{en:"Ghost Days",zh:"沉寂天数"},"wrapped.days_offline":{en:"days offline",zh:"天未活跃"},"wrapped.total_sessions":{en:"Total Sessions",zh:"总会话数"},"wrapped.sessions":{en:"sessions",zh:"个会话"},"wrapped.total_turns":{en:"Total Turns",zh:"总对话轮次"},"wrapped.agent_driven":{en:"agent-driven",zh:"由 Agent 驱动"},"wrapped.total_cost":{en:"Total Cost",zh:"总费用"},"wrapped.output_tokens":{en:"output tokens",zh:"输出 token"},"wrapped.peak_patterns":{en:"Peak Patterns",zh:"高峰模式"},"wrapped.peak_hour":{en:"Peak Hour",zh:"高峰时段"},"wrapped.peak_day":{en:"Peak Day",zh:"高峰日"},"wrapped.autonomy_ratio":{en:"Autonomy",zh:"自主比"},"wrapped.turns_per_prompt":{en:"turns per prompt",zh:"轮次/提示"},"wrapped.avg_duration":{en:"Avg Duration",zh:"平均时长"},"wrapped.per_session":{en:"per session",zh:"每会话"},"wrapped.avg_cost":{en:"Avg Cost",zh:"平均费用"},"wrapped.weekday.Monday":{en:"Monday",zh:"周一"},"wrapped.weekday.Tuesday":{en:"Tuesday",zh:"周二"},"wrapped.weekday.Wednesday":{en:"Wednesday",zh:"周三"},"wrapped.weekday.Thursday":{en:"Thursday",zh:"周四"},"wrapped.weekday.Friday":{en:"Friday",zh:"周五"},"wrapped.weekday.Saturday":{en:"Saturday",zh:"周六"},"wrapped.weekday.Sunday":{en:"Sunday",zh:"周日"},"wrapped.rankings":{en:"Rankings",zh:"排行榜"},"wrapped.top_tools":{en:"Top 5 Tools",zh:"Top 5 工具"},"wrapped.top_projects":{en:"Top 5 Projects",zh:"Top 5 项目"},"wrapped.models":{en:"Models by Turns",zh:"模型(按轮次)"},"wrapped.records":{en:"Records",zh:"记录"},"wrapped.most_expensive_session":{en:"Most Expensive Session",zh:"最贵会话"},"wrapped.longest_session":{en:"Longest Session",zh:"最长会话"},"wrapped.of_total_spend":{en:"of total spend",zh:"占总花费"},"wrapped.hours_total":{en:"hours total",zh:"小时"},"wrapped.the_archetype.Architect":{en:"The Architect",zh:"架构师"},"wrapped.the_archetype.Sprinter":{en:"The Sprinter",zh:"冲刺者"},"wrapped.the_archetype.NightOwl":{en:"The Night Owl",zh:"夜猫子"},"wrapped.the_archetype.Delegator":{en:"The Delegator",zh:"指挥官"},"wrapped.the_archetype.Explorer":{en:"The Explorer",zh:"探索者"},"wrapped.the_archetype.Marathoner":{en:"The Marathoner",zh:"马拉松选手"},"wrapped.no_data":{en:"No wrapped data available.",zh:"暂无年度总结数据。"}};function lf(){if(typeof window>"u")return"en";const e=localStorage.getItem(Ec);return e==="en"||e==="zh"?e:navigator.language.toLowerCase().startsWith("zh")?"zh":"en"}const Ss=kt(lf());function ts(){function e(n){const i=rf[n];return i?i[Ss.value]??i.en??n:n}function t(){Ss.value=Ss.value==="en"?"zh":"en",localStorage.setItem(Ec,Ss.value)}const s=E(()=>Ss.value==="en"?"EN":"中");return{locale:Ss,t:e,toggleLocale:t,localeLabel:s}}const cf={class:"sidebar"},uf={class:"sidebar-nav"},hf=["onClick"],df={class:"nav-icon"},ff={class:"nav-label"},pf={class:"sidebar-footer"},gf=["title"],_f={key:0},mf={key:1},bf=["title"],vf=Lt({__name:"Sidebar",props:{activePage:{}},emits:["navigate"],setup(e,{emit:t}){const s=t,{theme:n,toggleTheme:i}=$c(),{t:o,toggleLocale:a,localeLabel:r}=ts(),l=[{page:"overview",icon:"◉",labelKey:"nav.overview"},{page:"trends",icon:"▲",labelKey:"nav.trends"},{page:"projects",icon:"■",labelKey:"nav.projects"},{page:"sessions",icon:"☰",labelKey:"nav.sessions"},{page:"heatmap",icon:"▒",labelKey:"nav.heatmap"},{page:"wrapped",icon:"✦",labelKey:"nav.wrapped"}];return(c,u)=>(V(),W("aside",cf,[u[2]||(u[2]=m("div",{class:"sidebar-header"},[m("h1",{class:"sidebar-title"},[He("CC Token"),m("br"),He("Analyzer")])],-1)),m("nav",uf,[(V(),W(mt,null,Gt(l,h=>m("button",{key:h.page,class:Rt(["nav-item",{active:e.activePage===h.page}]),onClick:d=>s("navigate",h.page)},[m("span",df,k(h.icon),1),m("span",ff,k(S(o)(h.labelKey)),1)],10,hf)),64))]),m("div",pf,[m("button",{class:"footer-btn",onClick:u[0]||(u[0]=(...h)=>S(i)&&S(i)(...h)),title:S(o)("common.theme_toggle")},[S(n)==="dark"?(V(),W("span",_f,"☼")):(V(),W("span",mf,"☾"))],8,gf),m("button",{class:"footer-btn",onClick:u[1]||(u[1]=(...h)=>S(a)&&S(a)(...h)),title:S(o)("common.lang_toggle")},k(S(r)),9,bf)])]))}}),Ft=(e,t)=>{const s=e.__vccOpts||e;for(const[n,i]of t)s[n]=i;return s},yf=Ft(vf,[["__scopeId","data-v-1b1bb978"]]),xf={class:"kpi-card"},kf={class:"kpi-value"},wf={class:"kpi-label"},Sf={key:0,class:"kpi-subtitle"},Mf=Lt({__name:"KpiCard",props:{value:{},label:{},subtitle:{}},setup(e){return(t,s)=>(V(),W("div",xf,[m("div",kf,k(e.value),1),m("div",wf,k(e.label),1),e.subtitle?(V(),W("div",Sf,k(e.subtitle),1)):rt("",!0)]))}}),Mt=Ft(Mf,[["__scopeId","data-v-6c3b803c"]]);/*!
 * @kurkle/color v0.3.4
 * https://github.com/kurkle/color#readme
 * (c) 2024 Jukka Kurkela
 * Released under the MIT License
 */function zn(e){return e+.5|0}const Ye=(e,t,s)=>Math.max(Math.min(e,s),t);function Qs(e){return Ye(zn(e*2.55),0,255)}function Je(e){return Ye(zn(e*255),0,255)}function Le(e){return Ye(zn(e/2.55)/100,0,1)}function er(e){return Ye(zn(e*100),0,100)}const oe={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},Oo=[..."0123456789ABCDEF"],Cf=e=>Oo[e&15],Tf=e=>Oo[(e&240)>>4]+Oo[e&15],Bn=e=>(e&240)>>4===(e&15),Df=e=>Bn(e.r)&&Bn(e.g)&&Bn(e.b)&&Bn(e.a);function Pf(e){var t=e.length,s;return e[0]==="#"&&(t===4||t===5?s={r:255&oe[e[1]]*17,g:255&oe[e[2]]*17,b:255&oe[e[3]]*17,a:t===5?oe[e[4]]*17:255}:(t===7||t===9)&&(s={r:oe[e[1]]<<4|oe[e[2]],g:oe[e[3]]<<4|oe[e[4]],b:oe[e[5]]<<4|oe[e[6]],a:t===9?oe[e[7]]<<4|oe[e[8]]:255})),s}const Af=(e,t)=>e<255?t(e):"";function Of(e){var t=Df(e)?Cf:Tf;return e?"#"+t(e.r)+t(e.g)+t(e.b)+Af(e.a,t):void 0}const zf=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Fc(e,t,s){const n=t*Math.min(s,1-s),i=(o,a=(o+e/30)%12)=>s-n*Math.max(Math.min(a-3,9-a,1),-1);return[i(0),i(8),i(4)]}function Lf(e,t,s){const n=(i,o=(i+e/60)%6)=>s-s*t*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function Rf(e,t,s){const n=Fc(e,1,.5);let i;for(t+s>1&&(i=1/(t+s),t*=i,s*=i),i=0;i<3;i++)n[i]*=1-t-s,n[i]+=t;return n}function $f(e,t,s,n,i){return e===i?(t-s)/n+(t<s?6:0):t===i?(s-e)/n+2:(e-t)/n+4}function na(e){const s=e.r/255,n=e.g/255,i=e.b/255,o=Math.max(s,n,i),a=Math.min(s,n,i),r=(o+a)/2;let l,c,u;return o!==a&&(u=o-a,c=r>.5?u/(2-o-a):u/(o+a),l=$f(s,n,i,u,o),l=l*60+.5),[l|0,c||0,r]}function ia(e,t,s,n){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,s,n)).map(Je)}function oa(e,t,s){return ia(Fc,e,t,s)}function Ef(e,t,s){return ia(Rf,e,t,s)}function Ff(e,t,s){return ia(Lf,e,t,s)}function Ic(e){return(e%360+360)%360}function If(e){const t=zf.exec(e);let s=255,n;if(!t)return;t[5]!==n&&(s=t[6]?Qs(+t[5]):Je(+t[5]));const i=Ic(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?n=Ef(i,o,a):t[1]==="hsv"?n=Ff(i,o,a):n=oa(i,o,a),{r:n[0],g:n[1],b:n[2],a:s}}function jf(e,t){var s=na(e);s[0]=Ic(s[0]+t),s=oa(s),e.r=s[0],e.g=s[1],e.b=s[2]}function Bf(e){if(!e)return;const t=na(e),s=t[0],n=er(t[1]),i=er(t[2]);return e.a<255?`hsla(${s}, ${n}%, ${i}%, ${Le(e.a)})`:`hsl(${s}, ${n}%, ${i}%)`}const sr={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"},nr={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 Vf(){const e={},t=Object.keys(nr),s=Object.keys(sr);let n,i,o,a,r;for(n=0;n<t.length;n++){for(a=r=t[n],i=0;i<s.length;i++)o=s[i],r=r.replace(o,sr[o]);o=parseInt(nr[a],16),e[r]=[o>>16&255,o>>8&255,o&255]}return e}let Vn;function Hf(e){Vn||(Vn=Vf(),Vn.transparent=[0,0,0,0]);const t=Vn[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Wf=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Nf(e){const t=Wf.exec(e);let s=255,n,i,o;if(t){if(t[7]!==n){const a=+t[7];s=t[8]?Qs(a):Ye(a*255,0,255)}return n=+t[1],i=+t[3],o=+t[5],n=255&(t[2]?Qs(n):Ye(n,0,255)),i=255&(t[4]?Qs(i):Ye(i,0,255)),o=255&(t[6]?Qs(o):Ye(o,0,255)),{r:n,g:i,b:o,a:s}}}function Kf(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Le(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const so=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Ms=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Uf(e,t,s){const n=Ms(Le(e.r)),i=Ms(Le(e.g)),o=Ms(Le(e.b));return{r:Je(so(n+s*(Ms(Le(t.r))-n))),g:Je(so(i+s*(Ms(Le(t.g))-i))),b:Je(so(o+s*(Ms(Le(t.b))-o))),a:e.a+s*(t.a-e.a)}}function Hn(e,t,s){if(e){let n=na(e);n[t]=Math.max(0,Math.min(n[t]+n[t]*s,t===0?360:1)),n=oa(n),e.r=n[0],e.g=n[1],e.b=n[2]}}function jc(e,t){return e&&Object.assign(t||{},e)}function ir(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=Je(e[3]))):(t=jc(e,{r:0,g:0,b:0,a:1}),t.a=Je(t.a)),t}function Yf(e){return e.charAt(0)==="r"?Nf(e):If(e)}class yn{constructor(t){if(t instanceof yn)return t;const s=typeof t;let n;s==="object"?n=ir(t):s==="string"&&(n=Pf(t)||Hf(t)||Yf(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=jc(this._rgb);return t&&(t.a=Le(t.a)),t}set rgb(t){this._rgb=ir(t)}rgbString(){return this._valid?Kf(this._rgb):void 0}hexString(){return this._valid?Of(this._rgb):void 0}hslString(){return this._valid?Bf(this._rgb):void 0}mix(t,s){if(t){const n=this.rgb,i=t.rgb;let o;const a=s===o?.5:s,r=2*a-1,l=n.a-i.a,c=((r*l===-1?r:(r+l)/(1+r*l))+1)/2;o=1-c,n.r=255&c*n.r+o*i.r+.5,n.g=255&c*n.g+o*i.g+.5,n.b=255&c*n.b+o*i.b+.5,n.a=a*n.a+(1-a)*i.a,this.rgb=n}return this}interpolate(t,s){return t&&(this._rgb=Uf(this._rgb,t._rgb,s)),this}clone(){return new yn(this.rgb)}alpha(t){return this._rgb.a=Je(t),this}clearer(t){const s=this._rgb;return s.a*=1-t,this}greyscale(){const t=this._rgb,s=zn(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=s,this}opaquer(t){const s=this._rgb;return s.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 Hn(this._rgb,2,t),this}darken(t){return Hn(this._rgb,2,-t),this}saturate(t){return Hn(this._rgb,1,t),this}desaturate(t){return Hn(this._rgb,1,-t),this}rotate(t){return jf(this._rgb,t),this}}/*!
 * Chart.js v4.5.1
 * https://www.chartjs.org
 * (c) 2025 Chart.js Contributors
 * Released under the MIT License
 */function De(){}const Xf=(()=>{let e=0;return()=>e++})();function dt(e){return e==null}function Ot(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 at(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Pt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function se(e,t){return Pt(e)?e:t}function ot(e,t){return typeof e>"u"?t:e}const qf=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,Bc=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function xt(e,t,s){if(e&&typeof e.call=="function")return e.apply(s,t)}function ft(e,t,s,n){let i,o,a;if(Ot(e))for(o=e.length,i=0;i<o;i++)t.call(s,e[i],i);else if(at(e))for(a=Object.keys(e),o=a.length,i=0;i<o;i++)t.call(s,e[a[i]],a[i])}function pi(e,t){let s,n,i,o;if(!e||!t||e.length!==t.length)return!1;for(s=0,n=e.length;s<n;++s)if(i=e[s],o=t[s],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return!1;return!0}function gi(e){if(Ot(e))return e.map(gi);if(at(e)){const t=Object.create(null),s=Object.keys(e),n=s.length;let i=0;for(;i<n;++i)t[s[i]]=gi(e[s[i]]);return t}return e}function Vc(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function Gf(e,t,s,n){if(!Vc(e))return;const i=t[e],o=s[e];at(i)&&at(o)?xn(i,o,n):t[e]=gi(o)}function xn(e,t,s){const n=Ot(t)?t:[t],i=n.length;if(!at(e))return e;s=s||{};const o=s.merger||Gf;let a;for(let r=0;r<i;++r){if(a=n[r],!at(a))continue;const l=Object.keys(a);for(let c=0,u=l.length;c<u;++c)o(l[c],e,a,s)}return e}function un(e,t){return xn(e,t,{merger:Zf})}function Zf(e,t,s){if(!Vc(e))return;const n=t[e],i=s[e];at(n)&&at(i)?un(n,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=gi(i))}const or={"":e=>e,x:e=>e.x,y:e=>e.y};function Jf(e){const t=e.split("."),s=[];let n="";for(const i of t)n+=i,n.endsWith("\\")?n=n.slice(0,-1)+".":(s.push(n),n="");return s}function Qf(e){const t=Jf(e);return s=>{for(const n of t){if(n==="")break;s=s&&s[n]}return s}}function _s(e,t){return(or[t]||(or[t]=Qf(t)))(e)}function aa(e){return e.charAt(0).toUpperCase()+e.slice(1)}const kn=e=>typeof e<"u",Qe=e=>typeof e=="function",ar=(e,t)=>{if(e.size!==t.size)return!1;for(const s of e)if(!t.has(s))return!1;return!0};function tp(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const bt=Math.PI,wt=2*bt,ep=wt+bt,_i=Number.POSITIVE_INFINITY,sp=bt/180,zt=bt/2,os=bt/4,rr=bt*2/3,Xe=Math.log10,Se=Math.sign;function hn(e,t,s){return Math.abs(e-t)<s}function lr(e){const t=Math.round(e);e=hn(e,t,e/1e3)?t:e;const s=Math.pow(10,Math.floor(Xe(e))),n=e/s;return(n<=1?1:n<=2?2:n<=5?5:10)*s}function np(e){const t=[],s=Math.sqrt(e);let n;for(n=1;n<s;n++)e%n===0&&(t.push(n),t.push(e/n));return s===(s|0)&&t.push(s),t.sort((i,o)=>i-o).pop(),t}function ip(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function wn(e){return!ip(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function op(e,t){const s=Math.round(e);return s-t<=e&&s+t>=e}function Hc(e,t,s){let n,i,o;for(n=0,i=e.length;n<i;n++)o=e[n][s],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function Ee(e){return e*(bt/180)}function ap(e){return e*(180/bt)}function cr(e){if(!Pt(e))return;let t=1,s=0;for(;Math.round(e*t)/t!==e;)t*=10,s++;return s}function Wc(e,t){const s=t.x-e.x,n=t.y-e.y,i=Math.sqrt(s*s+n*n);let o=Math.atan2(n,s);return o<-.5*bt&&(o+=wt),{angle:o,distance:i}}function zo(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function rp(e,t){return(e-t+ep)%wt-bt}function ne(e){return(e%wt+wt)%wt}function Sn(e,t,s,n){const i=ne(e),o=ne(t),a=ne(s),r=ne(o-i),l=ne(a-i),c=ne(i-o),u=ne(i-a);return i===o||i===a||n&&o===a||r>l&&c<u}function Bt(e,t,s){return Math.max(t,Math.min(s,e))}function lp(e){return Bt(e,-32768,32767)}function Fe(e,t,s,n=1e-6){return e>=Math.min(t,s)-n&&e<=Math.max(t,s)+n}function ra(e,t,s){s=s||(a=>e[a]<t);let n=e.length-1,i=0,o;for(;n-i>1;)o=i+n>>1,s(o)?i=o:n=o;return{lo:i,hi:n}}const ds=(e,t,s,n)=>ra(e,s,n?i=>{const o=e[i][t];return o<s||o===s&&e[i+1][t]===s}:i=>e[i][t]<s),cp=(e,t,s)=>ra(e,s,n=>e[n][t]>=s);function up(e,t,s){let n=0,i=e.length;for(;n<i&&e[n]<t;)n++;for(;i>n&&e[i-1]>s;)i--;return n>0||i<e.length?e.slice(n,i):e}const Nc=["push","pop","shift","splice","unshift"];function hp(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Nc.forEach(s=>{const n="_onData"+aa(s),i=e[s];Object.defineProperty(e,s,{configurable:!0,enumerable:!1,value(...o){const a=i.apply(this,o);return e._chartjs.listeners.forEach(r=>{typeof r[n]=="function"&&r[n](...o)}),a}})})}function ur(e,t){const s=e._chartjs;if(!s)return;const n=s.listeners,i=n.indexOf(t);i!==-1&&n.splice(i,1),!(n.length>0)&&(Nc.forEach(o=>{delete e[o]}),delete e._chartjs)}function Kc(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const Uc=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function Yc(e,t){let s=[],n=!1;return function(...i){s=i,n||(n=!0,Uc.call(window,()=>{n=!1,e.apply(t,s)}))}}function dp(e,t){let s;return function(...n){return t?(clearTimeout(s),s=setTimeout(e,t,n)):e.apply(this,n),t}}const Xc=e=>e==="start"?"left":e==="end"?"right":"center",ee=(e,t,s)=>e==="start"?t:e==="end"?s:(t+s)/2,fp=(e,t,s,n)=>e===(n?"left":"right")?s:e==="center"?(t+s)/2:t;function pp(e,t,s){const n=t.length;let i=0,o=n;if(e._sorted){const{iScale:a,vScale:r,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=a.axis,{min:h,max:d,minDefined:f,maxDefined:g}=a.getUserBounds();if(f){if(i=Math.min(ds(l,u,h).lo,s?n:ds(t,u,a.getPixelForValue(h)).lo),c){const p=l.slice(0,i+1).reverse().findIndex(_=>!dt(_[r.axis]));i-=Math.max(0,p)}i=Bt(i,0,n-1)}if(g){let p=Math.max(ds(l,a.axis,d,!0).hi+1,s?0:ds(t,u,a.getPixelForValue(d),!0).hi+1);if(c){const _=l.slice(p-1).findIndex(v=>!dt(v[r.axis]));p+=Math.max(0,_)}o=Bt(p,i,n)-i}else o=n-i}return{start:i,count:o}}function gp(e){const{xScale:t,yScale:s,_scaleRanges:n}=e,i={xmin:t.min,xmax:t.max,ymin:s.min,ymax:s.max};if(!n)return e._scaleRanges=i,!0;const o=n.xmin!==t.min||n.xmax!==t.max||n.ymin!==s.min||n.ymax!==s.max;return Object.assign(n,i),o}const Wn=e=>e===0||e===1,hr=(e,t,s)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*wt/s)),dr=(e,t,s)=>Math.pow(2,-10*e)*Math.sin((e-t)*wt/s)+1,dn={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(bt*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=>Wn(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=>Wn(e)?e:hr(e,.075,.3),easeOutElastic:e=>Wn(e)?e:dr(e,.075,.3),easeInOutElastic(e){return Wn(e)?e:e<.5?.5*hr(e*2,.1125,.45):.5+.5*dr(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-dn.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?dn.easeInBounce(e*2)*.5:dn.easeOutBounce(e*2-1)*.5+.5};function la(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function fr(e){return la(e)?e:new yn(e)}function no(e){return la(e)?e:new yn(e).saturate(.5).darken(.1).hexString()}const _p=["x","y","borderWidth","radius","tension"],mp=["color","borderColor","backgroundColor"];function bp(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:mp},numbers:{type:"number",properties:_p}}),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 vp(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const pr=new Map;function yp(e,t){t=t||{};const s=e+JSON.stringify(t);let n=pr.get(s);return n||(n=new Intl.NumberFormat(e,t),pr.set(s,n)),n}function $i(e,t,s){return yp(t,s).format(e)}const qc={values(e){return Ot(e)?e:""+e},numeric(e,t,s){if(e===0)return"0";const n=this.chart.options.locale;let i,o=e;if(s.length>1){const c=Math.max(Math.abs(s[0].value),Math.abs(s[s.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),o=xp(e,s)}const a=Xe(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:i,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),$i(e,n,l)},logarithmic(e,t,s){if(e===0)return"0";const n=s[t].significand||e/Math.pow(10,Math.floor(Xe(e)));return[1,2,3,5,10,15].includes(n)||t>.8*s.length?qc.numeric.call(this,e,t,s):""}};function xp(e,t){let s=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(s)>=1&&e!==Math.floor(e)&&(s=e-Math.floor(e)),s}var ca={formatters:qc};function kp(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,s)=>s.lineWidth,tickColor:(t,s)=>s.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:ca.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 ms=Object.create(null),Lo=Object.create(null);function fn(e,t){if(!t)return e;const s=t.split(".");for(let n=0,i=s.length;n<i;++n){const o=s[n];e=e[o]||(e[o]=Object.create(null))}return e}function io(e,t,s){return typeof t=="string"?xn(fn(e,t),s):xn(fn(e,""),t)}class wp{constructor(t,s){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=n=>n.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=(n,i)=>no(i.backgroundColor),this.hoverBorderColor=(n,i)=>no(i.borderColor),this.hoverColor=(n,i)=>no(i.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(s)}set(t,s){return io(this,t,s)}get(t){return fn(this,t)}describe(t,s){return io(Lo,t,s)}override(t,s){return io(ms,t,s)}route(t,s,n,i){const o=fn(this,t),a=fn(this,n),r="_"+s;Object.defineProperties(o,{[r]:{value:o[s],writable:!0},[s]:{enumerable:!0,get(){const l=this[r],c=a[i];return at(l)?Object.assign({},c,l):ot(l,c)},set(l){this[r]=l}}})}apply(t){t.forEach(s=>s(this))}}var Ct=new wp({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[bp,vp,kp]);function Sp(e){return!e||dt(e.size)||dt(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function gr(e,t,s,n,i){let o=t[i];return o||(o=t[i]=e.measureText(i).width,s.push(i)),o>n&&(n=o),n}function as(e,t,s){const n=e.currentDevicePixelRatio,i=s!==0?Math.max(s/2,.5):0;return Math.round((t-i)*n)/n+i}function _r(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function Ro(e,t,s,n){Gc(e,t,s,n,null)}function Gc(e,t,s,n,i){let o,a,r,l,c,u,h,d;const f=t.pointStyle,g=t.rotation,p=t.radius;let _=(g||0)*sp;if(f&&typeof f=="object"&&(o=f.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){e.save(),e.translate(s,n),e.rotate(_),e.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),e.restore();return}if(!(isNaN(p)||p<=0)){switch(e.beginPath(),f){default:i?e.ellipse(s,n,i/2,p,0,0,wt):e.arc(s,n,p,0,wt),e.closePath();break;case"triangle":u=i?i/2:p,e.moveTo(s+Math.sin(_)*u,n-Math.cos(_)*p),_+=rr,e.lineTo(s+Math.sin(_)*u,n-Math.cos(_)*p),_+=rr,e.lineTo(s+Math.sin(_)*u,n-Math.cos(_)*p),e.closePath();break;case"rectRounded":c=p*.516,l=p-c,a=Math.cos(_+os)*l,h=Math.cos(_+os)*(i?i/2-c:l),r=Math.sin(_+os)*l,d=Math.sin(_+os)*(i?i/2-c:l),e.arc(s-h,n-r,c,_-bt,_-zt),e.arc(s+d,n-a,c,_-zt,_),e.arc(s+h,n+r,c,_,_+zt),e.arc(s-d,n+a,c,_+zt,_+bt),e.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*p,u=i?i/2:l,e.rect(s-u,n-l,2*u,2*l);break}_+=os;case"rectRot":h=Math.cos(_)*(i?i/2:p),a=Math.cos(_)*p,r=Math.sin(_)*p,d=Math.sin(_)*(i?i/2:p),e.moveTo(s-h,n-r),e.lineTo(s+d,n-a),e.lineTo(s+h,n+r),e.lineTo(s-d,n+a),e.closePath();break;case"crossRot":_+=os;case"cross":h=Math.cos(_)*(i?i/2:p),a=Math.cos(_)*p,r=Math.sin(_)*p,d=Math.sin(_)*(i?i/2:p),e.moveTo(s-h,n-r),e.lineTo(s+h,n+r),e.moveTo(s+d,n-a),e.lineTo(s-d,n+a);break;case"star":h=Math.cos(_)*(i?i/2:p),a=Math.cos(_)*p,r=Math.sin(_)*p,d=Math.sin(_)*(i?i/2:p),e.moveTo(s-h,n-r),e.lineTo(s+h,n+r),e.moveTo(s+d,n-a),e.lineTo(s-d,n+a),_+=os,h=Math.cos(_)*(i?i/2:p),a=Math.cos(_)*p,r=Math.sin(_)*p,d=Math.sin(_)*(i?i/2:p),e.moveTo(s-h,n-r),e.lineTo(s+h,n+r),e.moveTo(s+d,n-a),e.lineTo(s-d,n+a);break;case"line":a=i?i/2:Math.cos(_)*p,r=Math.sin(_)*p,e.moveTo(s-a,n-r),e.lineTo(s+a,n+r);break;case"dash":e.moveTo(s,n),e.lineTo(s+Math.cos(_)*(i?i/2:p),n+Math.sin(_)*p);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function Mn(e,t,s){return s=s||.5,!t||e&&e.x>t.left-s&&e.x<t.right+s&&e.y>t.top-s&&e.y<t.bottom+s}function Ei(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Fi(e){e.restore()}function Mp(e,t,s,n,i){if(!t)return e.lineTo(s.x,s.y);if(i==="middle"){const o=(t.x+s.x)/2;e.lineTo(o,t.y),e.lineTo(o,s.y)}else i==="after"!=!!n?e.lineTo(t.x,s.y):e.lineTo(s.x,t.y);e.lineTo(s.x,s.y)}function Cp(e,t,s,n){if(!t)return e.lineTo(s.x,s.y);e.bezierCurveTo(n?t.cp1x:t.cp2x,n?t.cp1y:t.cp2y,n?s.cp2x:s.cp1x,n?s.cp2y:s.cp1y,s.x,s.y)}function Tp(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),dt(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 Dp(e,t,s,n,i){if(i.strikethrough||i.underline){const o=e.measureText(n),a=t-o.actualBoundingBoxLeft,r=t+o.actualBoundingBoxRight,l=s-o.actualBoundingBoxAscent,c=s+o.actualBoundingBoxDescent,u=i.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(a,u),e.lineTo(r,u),e.stroke()}}function Pp(e,t){const s=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=s}function mi(e,t,s,n,i,o={}){const a=Ot(t)?t:[t],r=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,Tp(e,o),l=0;l<a.length;++l)c=a[l],o.backdrop&&Pp(e,o.backdrop),r&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),dt(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(c,s,n,o.maxWidth)),e.fillText(c,s,n,o.maxWidth),Dp(e,s,n,c,o),n+=Number(i.lineHeight);e.restore()}function bi(e,t){const{x:s,y:n,w:i,h:o,radius:a}=t;e.arc(s+a.topLeft,n+a.topLeft,a.topLeft,1.5*bt,bt,!0),e.lineTo(s,n+o-a.bottomLeft),e.arc(s+a.bottomLeft,n+o-a.bottomLeft,a.bottomLeft,bt,zt,!0),e.lineTo(s+i-a.bottomRight,n+o),e.arc(s+i-a.bottomRight,n+o-a.bottomRight,a.bottomRight,zt,0,!0),e.lineTo(s+i,n+a.topRight),e.arc(s+i-a.topRight,n+a.topRight,a.topRight,0,-zt,!0),e.lineTo(s+a.topLeft,n)}const Ap=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Op=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function zp(e,t){const s=(""+e).match(Ap);if(!s||s[1]==="normal")return t*1.2;switch(e=+s[2],s[3]){case"px":return e;case"%":e/=100;break}return t*e}const Lp=e=>+e||0;function ua(e,t){const s={},n=at(t),i=n?Object.keys(t):t,o=at(e)?n?a=>ot(e[a],e[t[a]]):a=>e[a]:()=>e;for(const a of i)s[a]=Lp(o(a));return s}function Zc(e){return ua(e,{top:"y",right:"x",bottom:"y",left:"x"})}function $s(e){return ua(e,["topLeft","topRight","bottomLeft","bottomRight"])}function de(e){const t=Zc(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Jt(e,t){e=e||{},t=t||Ct.font;let s=ot(e.size,t.size);typeof s=="string"&&(s=parseInt(s,10));let n=ot(e.style,t.style);n&&!(""+n).match(Op)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const i={family:ot(e.family,t.family),lineHeight:zp(ot(e.lineHeight,t.lineHeight),s),size:s,style:n,weight:ot(e.weight,t.weight),string:""};return i.string=Sp(i),i}function Nn(e,t,s,n){let i,o,a;for(i=0,o=e.length;i<o;++i)if(a=e[i],a!==void 0&&a!==void 0)return a}function Rp(e,t,s){const{min:n,max:i}=e,o=Bc(t,(i-n)/2),a=(r,l)=>s&&r===0?0:r+l;return{min:a(n,-Math.abs(o)),max:a(i,o)}}function vs(e,t){return Object.assign(Object.create(e),t)}function ha(e,t=[""],s,n,i=()=>e[0]){const o=s||e;typeof n>"u"&&(n=eu("_fallback",e));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:n,_getTarget:i,override:r=>ha([r,...e],t,o,n)};return new Proxy(a,{deleteProperty(r,l){return delete r[l],delete r._keys,delete e[0][l],!0},get(r,l){return Qc(r,l,()=>Hp(l,t,e,r))},getOwnPropertyDescriptor(r,l){return Reflect.getOwnPropertyDescriptor(r._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(r,l){return br(r).includes(l)},ownKeys(r){return br(r)},set(r,l,c){const u=r._storage||(r._storage=i());return r[l]=u[l]=c,delete r._keys,!0}})}function Bs(e,t,s,n){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:s,_stack:new Set,_descriptors:Jc(e,n),setContext:o=>Bs(e,o,s,n),override:o=>Bs(e.override(o),t,s,n)};return new Proxy(i,{deleteProperty(o,a){return delete o[a],delete e[a],!0},get(o,a,r){return Qc(o,a,()=>Ep(o,a,r))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(e,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,a)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,a){return Reflect.has(e,a)},ownKeys(){return Reflect.ownKeys(e)},set(o,a,r){return e[a]=r,delete o[a],!0}})}function Jc(e,t={scriptable:!0,indexable:!0}){const{_scriptable:s=t.scriptable,_indexable:n=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:s,indexable:n,isScriptable:Qe(s)?s:()=>s,isIndexable:Qe(n)?n:()=>n}}const $p=(e,t)=>e?e+aa(t):t,da=(e,t)=>at(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Qc(e,t,s){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const n=s();return e[t]=n,n}function Ep(e,t,s){const{_proxy:n,_context:i,_subProxy:o,_descriptors:a}=e;let r=n[t];return Qe(r)&&a.isScriptable(t)&&(r=Fp(t,r,e,s)),Ot(r)&&r.length&&(r=Ip(t,r,e,a.isIndexable)),da(t,r)&&(r=Bs(r,i,o&&o[t],a)),r}function Fp(e,t,s,n){const{_proxy:i,_context:o,_subProxy:a,_stack:r}=s;if(r.has(e))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+e);r.add(e);let l=t(o,a||n);return r.delete(e),da(e,l)&&(l=fa(i._scopes,i,e,l)),l}function Ip(e,t,s,n){const{_proxy:i,_context:o,_subProxy:a,_descriptors:r}=s;if(typeof o.index<"u"&&n(e))return t[o.index%t.length];if(at(t[0])){const l=t,c=i._scopes.filter(u=>u!==l);t=[];for(const u of l){const h=fa(c,i,e,u);t.push(Bs(h,o,a&&a[e],r))}}return t}function tu(e,t,s){return Qe(e)?e(t,s):e}const jp=(e,t)=>e===!0?t:typeof e=="string"?_s(t,e):void 0;function Bp(e,t,s,n,i){for(const o of t){const a=jp(s,o);if(a){e.add(a);const r=tu(a._fallback,s,i);if(typeof r<"u"&&r!==s&&r!==n)return r}else if(a===!1&&typeof n<"u"&&s!==n)return null}return!1}function fa(e,t,s,n){const i=t._rootScopes,o=tu(t._fallback,s,n),a=[...e,...i],r=new Set;r.add(n);let l=mr(r,a,s,o||s,n);return l===null||typeof o<"u"&&o!==s&&(l=mr(r,a,o,l,n),l===null)?!1:ha(Array.from(r),[""],i,o,()=>Vp(t,s,n))}function mr(e,t,s,n,i){for(;s;)s=Bp(e,t,s,n,i);return s}function Vp(e,t,s){const n=e._getTarget();t in n||(n[t]={});const i=n[t];return Ot(i)&&at(s)?s:i||{}}function Hp(e,t,s,n){let i;for(const o of t)if(i=eu($p(o,e),s),typeof i<"u")return da(e,i)?fa(s,n,e,i):i}function eu(e,t){for(const s of t){if(!s)continue;const n=s[e];if(typeof n<"u")return n}}function br(e){let t=e._keys;return t||(t=e._keys=Wp(e._scopes)),t}function Wp(e){const t=new Set;for(const s of e)for(const n of Object.keys(s).filter(i=>!i.startsWith("_")))t.add(n);return Array.from(t)}const Np=Number.EPSILON||1e-14,Vs=(e,t)=>t<e.length&&!e[t].skip&&e[t],su=e=>e==="x"?"y":"x";function Kp(e,t,s,n){const i=e.skip?t:e,o=t,a=s.skip?t:s,r=zo(o,i),l=zo(a,o);let c=r/(r+l),u=l/(r+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const h=n*c,d=n*u;return{previous:{x:o.x-h*(a.x-i.x),y:o.y-h*(a.y-i.y)},next:{x:o.x+d*(a.x-i.x),y:o.y+d*(a.y-i.y)}}}function Up(e,t,s){const n=e.length;let i,o,a,r,l,c=Vs(e,0);for(let u=0;u<n-1;++u)if(l=c,c=Vs(e,u+1),!(!l||!c)){if(hn(t[u],0,Np)){s[u]=s[u+1]=0;continue}i=s[u]/t[u],o=s[u+1]/t[u],r=Math.pow(i,2)+Math.pow(o,2),!(r<=9)&&(a=3/Math.sqrt(r),s[u]=i*a*t[u],s[u+1]=o*a*t[u])}}function Yp(e,t,s="x"){const n=su(s),i=e.length;let o,a,r,l=Vs(e,0);for(let c=0;c<i;++c){if(a=r,r=l,l=Vs(e,c+1),!r)continue;const u=r[s],h=r[n];a&&(o=(u-a[s])/3,r[`cp1${s}`]=u-o,r[`cp1${n}`]=h-o*t[c]),l&&(o=(l[s]-u)/3,r[`cp2${s}`]=u+o,r[`cp2${n}`]=h+o*t[c])}}function Xp(e,t="x"){const s=su(t),n=e.length,i=Array(n).fill(0),o=Array(n);let a,r,l,c=Vs(e,0);for(a=0;a<n;++a)if(r=l,l=c,c=Vs(e,a+1),!!l){if(c){const u=c[t]-l[t];i[a]=u!==0?(c[s]-l[s])/u:0}o[a]=r?c?Se(i[a-1])!==Se(i[a])?0:(i[a-1]+i[a])/2:i[a-1]:i[a]}Up(e,i,o),Yp(e,o,t)}function Kn(e,t,s){return Math.max(Math.min(e,s),t)}function qp(e,t){let s,n,i,o,a,r=Mn(e[0],t);for(s=0,n=e.length;s<n;++s)a=o,o=r,r=s<n-1&&Mn(e[s+1],t),o&&(i=e[s],a&&(i.cp1x=Kn(i.cp1x,t.left,t.right),i.cp1y=Kn(i.cp1y,t.top,t.bottom)),r&&(i.cp2x=Kn(i.cp2x,t.left,t.right),i.cp2y=Kn(i.cp2y,t.top,t.bottom)))}function Gp(e,t,s,n,i){let o,a,r,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")Xp(e,i);else{let c=n?e[e.length-1]:e[0];for(o=0,a=e.length;o<a;++o)r=e[o],l=Kp(c,r,e[Math.min(o+1,a-(n?0:1))%a],t.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,c=r}t.capBezierPoints&&qp(e,s)}function pa(){return typeof window<"u"&&typeof document<"u"}function ga(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function vi(e,t,s){let n;return typeof e=="string"?(n=parseInt(e,10),e.indexOf("%")!==-1&&(n=n/100*t.parentNode[s])):n=e,n}const Ii=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function Zp(e,t){return Ii(e).getPropertyValue(t)}const Jp=["top","right","bottom","left"];function gs(e,t,s){const n={};s=s?"-"+s:"";for(let i=0;i<4;i++){const o=Jp[i];n[o]=parseFloat(e[t+"-"+o+s])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const Qp=(e,t,s)=>(e>0||t>0)&&(!s||!s.shadowRoot);function tg(e,t){const s=e.touches,n=s&&s.length?s[0]:e,{offsetX:i,offsetY:o}=n;let a=!1,r,l;if(Qp(i,o,e.target))r=i,l=o;else{const c=t.getBoundingClientRect();r=n.clientX-c.left,l=n.clientY-c.top,a=!0}return{x:r,y:l,box:a}}function us(e,t){if("native"in e)return e;const{canvas:s,currentDevicePixelRatio:n}=t,i=Ii(s),o=i.boxSizing==="border-box",a=gs(i,"padding"),r=gs(i,"border","width"),{x:l,y:c,box:u}=tg(e,s),h=a.left+(u&&r.left),d=a.top+(u&&r.top);let{width:f,height:g}=t;return o&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((l-h)/f*s.width/n),y:Math.round((c-d)/g*s.height/n)}}function eg(e,t,s){let n,i;if(t===void 0||s===void 0){const o=e&&ga(e);if(!o)t=e.clientWidth,s=e.clientHeight;else{const a=o.getBoundingClientRect(),r=Ii(o),l=gs(r,"border","width"),c=gs(r,"padding");t=a.width-c.width-l.width,s=a.height-c.height-l.height,n=vi(r.maxWidth,o,"clientWidth"),i=vi(r.maxHeight,o,"clientHeight")}}return{width:t,height:s,maxWidth:n||_i,maxHeight:i||_i}}const qe=e=>Math.round(e*10)/10;function sg(e,t,s,n){const i=Ii(e),o=gs(i,"margin"),a=vi(i.maxWidth,e,"clientWidth")||_i,r=vi(i.maxHeight,e,"clientHeight")||_i,l=eg(e,t,s);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const d=gs(i,"border","width"),f=gs(i,"padding");c-=f.width+d.width,u-=f.height+d.height}return c=Math.max(0,c-o.width),u=Math.max(0,n?c/n:u-o.height),c=qe(Math.min(c,a,l.maxWidth)),u=qe(Math.min(u,r,l.maxHeight)),c&&!u&&(u=qe(c/2)),(t!==void 0||s!==void 0)&&n&&l.height&&u>l.height&&(u=l.height,c=qe(Math.floor(u*n))),{width:c,height:u}}function vr(e,t,s){const n=t||1,i=qe(e.height*n),o=qe(e.width*n);e.height=qe(e.height),e.width=qe(e.width);const a=e.canvas;return a.style&&(s||!a.style.height&&!a.style.width)&&(a.style.height=`${e.height}px`,a.style.width=`${e.width}px`),e.currentDevicePixelRatio!==n||a.height!==i||a.width!==o?(e.currentDevicePixelRatio=n,a.height=i,a.width=o,e.ctx.setTransform(n,0,0,n,0,0),!0):!1}const ng=(function(){let e=!1;try{const t={get passive(){return e=!0,!1}};pa()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e})();function yr(e,t){const s=Zp(e,t),n=s&&s.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function hs(e,t,s,n){return{x:e.x+s*(t.x-e.x),y:e.y+s*(t.y-e.y)}}function ig(e,t,s,n){return{x:e.x+s*(t.x-e.x),y:n==="middle"?s<.5?e.y:t.y:n==="after"?s<1?e.y:t.y:s>0?t.y:e.y}}function og(e,t,s,n){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},a=hs(e,i,s),r=hs(i,o,s),l=hs(o,t,s),c=hs(a,r,s),u=hs(r,l,s);return hs(c,u,s)}const ag=function(e,t){return{x(s){return e+e+t-s},setWidth(s){t=s},textAlign(s){return s==="center"?s:s==="right"?"left":"right"},xPlus(s,n){return s-n},leftForLtr(s,n){return s-n}}},rg=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Es(e,t,s){return e?ag(t,s):rg()}function nu(e,t){let s,n;(t==="ltr"||t==="rtl")&&(s=e.canvas.style,n=[s.getPropertyValue("direction"),s.getPropertyPriority("direction")],s.setProperty("direction",t,"important"),e.prevTextDirection=n)}function iu(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function ou(e){return e==="angle"?{between:Sn,compare:rp,normalize:ne}:{between:Fe,compare:(t,s)=>t-s,normalize:t=>t}}function xr({start:e,end:t,count:s,loop:n,style:i}){return{start:e%s,end:t%s,loop:n&&(t-e+1)%s===0,style:i}}function lg(e,t,s){const{property:n,start:i,end:o}=s,{between:a,normalize:r}=ou(n),l=t.length;let{start:c,end:u,loop:h}=e,d,f;if(h){for(c+=l,u+=l,d=0,f=l;d<f&&a(r(t[c%l][n]),i,o);++d)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:h,style:e.style}}function au(e,t,s){if(!s)return[e];const{property:n,start:i,end:o}=s,a=t.length,{compare:r,between:l,normalize:c}=ou(n),{start:u,end:h,loop:d,style:f}=lg(e,t,s),g=[];let p=!1,_=null,v,w,T;const C=()=>l(i,T,v)&&r(i,T)!==0,A=()=>r(o,v)===0||l(o,T,v),z=()=>p||C(),D=()=>!p||A();for(let P=u,R=u;P<=h;++P)w=t[P%a],!w.skip&&(v=c(w[n]),v!==T&&(p=l(v,i,o),_===null&&z()&&(_=r(v,i)===0?P:R),_!==null&&D()&&(g.push(xr({start:_,end:P,loop:d,count:a,style:f})),_=null),R=P,T=v));return _!==null&&g.push(xr({start:_,end:h,loop:d,count:a,style:f})),g}function ru(e,t){const s=[],n=e.segments;for(let i=0;i<n.length;i++){const o=au(n[i],e.points,t);o.length&&s.push(...o)}return s}function cg(e,t,s,n){let i=0,o=t-1;if(s&&!n)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,s&&(o+=i);o>i&&e[o%t].skip;)o--;return o%=t,{start:i,end:o}}function ug(e,t,s,n){const i=e.length,o=[];let a=t,r=e[t],l;for(l=t+1;l<=s;++l){const c=e[l%i];c.skip||c.stop?r.skip||(n=!1,o.push({start:t%i,end:(l-1)%i,loop:n}),t=a=c.stop?l:null):(a=l,r.skip&&(t=l)),r=c}return a!==null&&o.push({start:t%i,end:a%i,loop:n}),o}function hg(e,t){const s=e.points,n=e.options.spanGaps,i=s.length;if(!i)return[];const o=!!e._loop,{start:a,end:r}=cg(s,i,o,n);if(n===!0)return kr(e,[{start:a,end:r,loop:o}],s,t);const l=r<a?r+i:r,c=!!e._fullLoop&&a===0&&r===i-1;return kr(e,ug(s,a,l,c),s,t)}function kr(e,t,s,n){return!n||!n.setContext||!s?t:dg(e,t,s,n)}function dg(e,t,s,n){const i=e._chart.getContext(),o=wr(e.options),{_datasetIndex:a,options:{spanGaps:r}}=e,l=s.length,c=[];let u=o,h=t[0].start,d=h;function f(g,p,_,v){const w=r?-1:1;if(g!==p){for(g+=l;s[g%l].skip;)g-=w;for(;s[p%l].skip;)p+=w;g%l!==p%l&&(c.push({start:g%l,end:p%l,loop:_,style:v}),u=v,h=p%l)}}for(const g of t){h=r?h:g.start;let p=s[h%l],_;for(d=h+1;d<=g.end;d++){const v=s[d%l];_=wr(n.setContext(vs(i,{type:"segment",p0:p,p1:v,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:a}))),fg(_,u)&&f(h,d-1,g.loop,u),p=v,u=_}h<d-1&&f(h,d-1,g.loop,u)}return c}function wr(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 s=[],n=function(i,o){return la(o)?(s.includes(o)||s.push(o),s.indexOf(o)):o};return JSON.stringify(e,n)!==JSON.stringify(t,n)}function Un(e,t,s){return e.options.clip?e[s]:t[s]}function pg(e,t){const{xScale:s,yScale:n}=e;return s&&n?{left:Un(s,t,"left"),right:Un(s,t,"right"),top:Un(n,t,"top"),bottom:Un(n,t,"bottom")}:t}function lu(e,t){const s=t._clip;if(s.disabled)return!1;const n=pg(t,e.chartArea);return{left:s.left===!1?0:n.left-(s.left===!0?0:s.left),right:s.right===!1?e.width:n.right+(s.right===!0?0:s.right),top:s.top===!1?0:n.top-(s.top===!0?0:s.top),bottom:s.bottom===!1?e.height:n.bottom+(s.bottom===!0?0:s.bottom)}}/*!
 * Chart.js v4.5.1
 * https://www.chartjs.org
 * (c) 2025 Chart.js Contributors
 * Released under the MIT License
 */class gg{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,s,n,i){const o=s.listeners[i],a=s.duration;o.forEach(r=>r({chart:t,initial:s.initial,numSteps:a,currentStep:Math.min(n-s.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=Uc.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let s=0;this._charts.forEach((n,i)=>{if(!n.running||!n.items.length)return;const o=n.items;let a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(t),r=!0):(o[a]=o[o.length-1],o.pop());r&&(i.draw(),this._notify(i,n,t,"progress")),o.length||(n.running=!1,this._notify(i,n,t,"complete"),n.initial=!1),s+=o.length}),this._lastDate=t,s===0&&(this._running=!1)}_getAnims(t){const s=this._charts;let n=s.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},s.set(t,n)),n}listen(t,s,n){this._getAnims(t).listeners[s].push(n)}add(t,s){!s||!s.length||this._getAnims(t).items.push(...s)}has(t){return this._getAnims(t).items.length>0}start(t){const s=this._charts.get(t);s&&(s.running=!0,s.start=Date.now(),s.duration=s.items.reduce((n,i)=>Math.max(n,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const s=this._charts.get(t);return!(!s||!s.running||!s.items.length)}stop(t){const s=this._charts.get(t);if(!s||!s.items.length)return;const n=s.items;let i=n.length-1;for(;i>=0;--i)n[i].cancel();s.items=[],this._notify(t,s,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Pe=new gg;const Sr="transparent",_g={boolean(e,t,s){return s>.5?t:e},color(e,t,s){const n=fr(e||Sr),i=n.valid&&fr(t||Sr);return i&&i.valid?i.mix(n,s).hexString():t},number(e,t,s){return e+(t-e)*s}};class mg{constructor(t,s,n,i){const o=s[n];i=Nn([t.to,i,o,t.from]);const a=Nn([t.from,o,i]);this._active=!0,this._fn=t.fn||_g[t.type||typeof a],this._easing=dn[t.easing]||dn.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=s,this._prop=n,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(t,s,n){if(this._active){this._notify(!1);const i=this._target[this._prop],o=n-this._start,a=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Nn([t.to,s,i,t.from]),this._from=Nn([t.from,i,s])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const s=t-this._start,n=this._duration,i=this._prop,o=this._from,a=this._loop,r=this._to;let l;if(this._active=o!==r&&(a||s<n),!this._active){this._target[i]=r,this._notify(!0);return}if(s<0){this._target[i]=o;return}l=s/n%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,r,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((s,n)=>{t.push({res:s,rej:n})})}_notify(t){const s=t?"res":"rej",n=this._promises||[];for(let i=0;i<n.length;i++)n[i][s]()}}class cu{constructor(t,s){this._chart=t,this._properties=new Map,this.configure(s)}configure(t){if(!at(t))return;const s=Object.keys(Ct.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const o=t[i];if(!at(o))return;const a={};for(const r of s)a[r]=o[r];(Ot(o.properties)&&o.properties||[i]).forEach(r=>{(r===i||!n.has(r))&&n.set(r,a)})})}_animateOptions(t,s){const n=s.options,i=vg(t,n);if(!i)return[];const o=this._createAnimations(i,n);return n.$shared&&bg(t.options.$animations,n).then(()=>{t.options=n},()=>{}),o}_createAnimations(t,s){const n=this._properties,i=[],o=t.$animations||(t.$animations={}),a=Object.keys(s),r=Date.now();let l;for(l=a.length-1;l>=0;--l){const c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,s));continue}const u=s[c];let h=o[c];const d=n.get(c);if(h)if(d&&h.active()){h.update(d,u,r);continue}else h.cancel();if(!d||!d.duration){t[c]=u;continue}o[c]=h=new mg(d,t,c,u),i.push(h)}return i}update(t,s){if(this._properties.size===0){Object.assign(t,s);return}const n=this._createAnimations(t,s);if(n.length)return Pe.add(this._chart,n),!0}}function bg(e,t){const s=[],n=Object.keys(t);for(let i=0;i<n.length;i++){const o=e[n[i]];o&&o.active()&&s.push(o.wait())}return Promise.all(s)}function vg(e,t){if(!t)return;let s=e.options;if(!s){e.options=t;return}return s.$shared&&(e.options=s=Object.assign({},s,{$shared:!1,$animations:{}})),s}function Mr(e,t){const s=e&&e.options||{},n=s.reverse,i=s.min===void 0?t:0,o=s.max===void 0?t:0;return{start:n?o:i,end:n?i:o}}function yg(e,t,s){if(s===!1)return!1;const n=Mr(e,s),i=Mr(t,s);return{top:i.end,right:n.end,bottom:i.start,left:n.start}}function xg(e){let t,s,n,i;return at(e)?(t=e.top,s=e.right,n=e.bottom,i=e.left):t=s=n=i=e,{top:t,right:s,bottom:n,left:i,disabled:e===!1}}function uu(e,t){const s=[],n=e._getSortedDatasetMetas(t);let i,o;for(i=0,o=n.length;i<o;++i)s.push(n[i].index);return s}function Cr(e,t,s,n={}){const i=e.keys,o=n.mode==="single";let a,r,l,c;if(t===null)return;let u=!1;for(a=0,r=i.length;a<r;++a){if(l=+i[a],l===s){if(u=!0,n.all)continue;break}c=e.values[l],Pt(c)&&(o||t===0||Se(t)===Se(c))&&(t+=c)}return!u&&!n.all?0:t}function kg(e,t){const{iScale:s,vScale:n}=t,i=s.axis==="x"?"x":"y",o=n.axis==="x"?"x":"y",a=Object.keys(e),r=new Array(a.length);let l,c,u;for(l=0,c=a.length;l<c;++l)u=a[l],r[l]={[i]:u,[o]:e[u]};return r}function oo(e,t){const s=e&&e.options.stacked;return s||s===void 0&&t.stack!==void 0}function wg(e,t,s){return`${e.id}.${t.id}.${s.stack||s.type}`}function Sg(e){const{min:t,max:s,minDefined:n,maxDefined:i}=e.getUserBounds();return{min:n?t:Number.NEGATIVE_INFINITY,max:i?s:Number.POSITIVE_INFINITY}}function Mg(e,t,s){const n=e[t]||(e[t]={});return n[s]||(n[s]={})}function Tr(e,t,s,n){for(const i of t.getMatchingVisibleMetas(n).reverse()){const o=e[i.index];if(s&&o>0||!s&&o<0)return i.index}return null}function Dr(e,t){const{chart:s,_cachedMeta:n}=e,i=s._stacks||(s._stacks={}),{iScale:o,vScale:a,index:r}=n,l=o.axis,c=a.axis,u=wg(o,a,n),h=t.length;let d;for(let f=0;f<h;++f){const g=t[f],{[l]:p,[c]:_}=g,v=g._stacks||(g._stacks={});d=v[c]=Mg(i,u,p),d[r]=_,d._top=Tr(d,a,!0,n.type),d._bottom=Tr(d,a,!1,n.type);const w=d._visualValues||(d._visualValues={});w[r]=_}}function ao(e,t){const s=e.scales;return Object.keys(s).filter(n=>s[n].axis===t).shift()}function Cg(e,t){return vs(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Tg(e,t,s){return vs(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:s,index:t,mode:"default",type:"data"})}function Us(e,t){const s=e.controller.index,n=e.vScale&&e.vScale.axis;if(n){t=t||e._parsed;for(const i of t){const o=i._stacks;if(!o||o[n]===void 0||o[n][s]===void 0)return;delete o[n][s],o[n]._visualValues!==void 0&&o[n]._visualValues[s]!==void 0&&delete o[n]._visualValues[s]}}}const ro=e=>e==="reset"||e==="none",Pr=(e,t)=>t?e:Object.assign({},e),Dg=(e,t,s)=>e&&!t.hidden&&t._stacked&&{keys:uu(s,!0),values:null};class ji{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,s){this.chart=t,this._ctx=t.ctx,this.index=s,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=oo(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&&Us(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,s=this._cachedMeta,n=this.getDataset(),i=(h,d,f,g)=>h==="x"?d:h==="r"?g:f,o=s.xAxisID=ot(n.xAxisID,ao(t,"x")),a=s.yAxisID=ot(n.yAxisID,ao(t,"y")),r=s.rAxisID=ot(n.rAxisID,ao(t,"r")),l=s.indexAxis,c=s.iAxisID=i(l,o,a,r),u=s.vAxisID=i(l,a,o,r);s.xScale=this.getScaleForId(o),s.yScale=this.getScaleForId(a),s.rScale=this.getScaleForId(r),s.iScale=this.getScaleForId(c),s.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 s=this._cachedMeta;return t===s.iScale?s.vScale:s.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&ur(this._data,this),t._stacked&&Us(t)}_dataCheck(){const t=this.getDataset(),s=t.data||(t.data=[]),n=this._data;if(at(s)){const i=this._cachedMeta;this._data=kg(s,i)}else if(n!==s){if(n){ur(n,this);const i=this._cachedMeta;Us(i),i._parsed=[]}s&&Object.isExtensible(s)&&hp(s,this),this._syncList=[],this._data=s}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const s=this._cachedMeta,n=this.getDataset();let i=!1;this._dataCheck();const o=s._stacked;s._stacked=oo(s.vScale,s),s.stack!==n.stack&&(i=!0,Us(s),s.stack=n.stack),this._resyncElements(t),(i||o!==s._stacked)&&(Dr(this,s._parsed),s._stacked=oo(s.vScale,s))}configure(){const t=this.chart.config,s=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),s,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,s){const{_cachedMeta:n,_data:i}=this,{iScale:o,_stacked:a}=n,r=o.axis;let l=t===0&&s===i.length?!0:n._sorted,c=t>0&&n._parsed[t-1],u,h,d;if(this._parsing===!1)n._parsed=i,n._sorted=!0,d=i;else{Ot(i[t])?d=this.parseArrayData(n,i,t,s):at(i[t])?d=this.parseObjectData(n,i,t,s):d=this.parsePrimitiveData(n,i,t,s);const f=()=>h[r]===null||c&&h[r]<c[r];for(u=0;u<s;++u)n._parsed[u+t]=h=d[u],l&&(f()&&(l=!1),c=h);n._sorted=l}a&&Dr(this,d)}parsePrimitiveData(t,s,n,i){const{iScale:o,vScale:a}=t,r=o.axis,l=a.axis,c=o.getLabels(),u=o===a,h=new Array(i);let d,f,g;for(d=0,f=i;d<f;++d)g=d+n,h[d]={[r]:u||o.parse(c[g],g),[l]:a.parse(s[g],g)};return h}parseArrayData(t,s,n,i){const{xScale:o,yScale:a}=t,r=new Array(i);let l,c,u,h;for(l=0,c=i;l<c;++l)u=l+n,h=s[u],r[l]={x:o.parse(h[0],u),y:a.parse(h[1],u)};return r}parseObjectData(t,s,n,i){const{xScale:o,yScale:a}=t,{xAxisKey:r="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let u,h,d,f;for(u=0,h=i;u<h;++u)d=u+n,f=s[d],c[u]={x:o.parse(_s(f,r),d),y:a.parse(_s(f,l),d)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,s,n){const i=this.chart,o=this._cachedMeta,a=s[t.axis],r={keys:uu(i,!0),values:s._stacks[t.axis]._visualValues};return Cr(r,a,o.index,{mode:n})}updateRangeFromParsed(t,s,n,i){const o=n[s.axis];let a=o===null?NaN:o;const r=i&&n._stacks[s.axis];i&&r&&(i.values=r,a=Cr(i,o,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,s){const n=this._cachedMeta,i=n._parsed,o=n._sorted&&t===n.iScale,a=i.length,r=this._getOtherScale(t),l=Dg(s,n,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:h}=Sg(r);let d,f;function g(){f=i[d];const p=f[r.axis];return!Pt(f[t.axis])||u>p||h<p}for(d=0;d<a&&!(!g()&&(this.updateRangeFromParsed(c,t,f,l),o));++d);if(o){for(d=a-1;d>=0;--d)if(!g()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const s=this._cachedMeta._parsed,n=[];let i,o,a;for(i=0,o=s.length;i<o;++i)a=s[i][t.axis],Pt(a)&&n.push(a);return n}getMaxOverflow(){return!1}getLabelAndValue(t){const s=this._cachedMeta,n=s.iScale,i=s.vScale,o=this.getParsed(t);return{label:n?""+n.getLabelForValue(o[n.axis]):"",value:i?""+i.getLabelForValue(o[i.axis]):""}}_update(t){const s=this._cachedMeta;this.update(t||"default"),s._clip=xg(ot(this.options.clip,yg(s.xScale,s.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,s=this.chart,n=this._cachedMeta,i=n.data||[],o=s.chartArea,a=[],r=this._drawStart||0,l=this._drawCount||i.length-r,c=this.options.drawActiveElementsOnTop;let u;for(n.dataset&&n.dataset.draw(t,o,r,l),u=r;u<r+l;++u){const h=i[u];h.hidden||(h.active&&c?a.push(h):h.draw(t,o))}for(u=0;u<a.length;++u)a[u].draw(t,o)}getStyle(t,s){const n=s?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,s,n){const i=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];o=a.$context||(a.$context=Tg(this.getContext(),t,a)),o.parsed=this.getParsed(t),o.raw=i.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=Cg(this.chart.getContext(),this.index)),o.dataset=i,o.index=o.datasetIndex=this.index;return o.active=!!s,o.mode=n,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,s){return this._resolveElementOptions(this.dataElementType.id,s,t)}_resolveElementOptions(t,s="default",n){const i=s==="active",o=this._cachedDataOpts,a=t+"-"+s,r=o[a],l=this.enableOptionSharing&&kn(n);if(r)return Pr(r,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),h=i?[`${t}Hover`,"hover",t,""]:[t,""],d=c.getOptionScopes(this.getDataset(),u),f=Object.keys(Ct.elements[t]),g=()=>this.getContext(n,i,s),p=c.resolveNamedOptions(d,f,g,h);return p.$shared&&(p.$shared=l,o[a]=Object.freeze(Pr(p,l))),p}_resolveAnimations(t,s,n){const i=this.chart,o=this._cachedDataOpts,a=`animation-${s}`,r=o[a];if(r)return r;let l;if(i.options.animation!==!1){const u=this.chart.config,h=u.datasetAnimationScopeKeys(this._type,s),d=u.getOptionScopes(this.getDataset(),h);l=u.createResolver(d,this.getContext(t,n,s))}const c=new cu(i,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,s){return!s||ro(t)||this.chart._animationsDisabled}_getSharedOptions(t,s){const n=this.resolveDataElementOptions(t,s),i=this._sharedOptions,o=this.getSharedOptions(n),a=this.includeOptions(s,o)||o!==i;return this.updateSharedOptions(o,s,n),{sharedOptions:o,includeOptions:a}}updateElement(t,s,n,i){ro(i)?Object.assign(t,n):this._resolveAnimations(s,i).update(t,n)}updateSharedOptions(t,s,n){t&&!ro(s)&&this._resolveAnimations(void 0,s).update(t,n)}_setStyle(t,s,n,i){t.active=i;const o=this.getStyle(s,i);this._resolveAnimations(s,n,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,s,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,s,n){this._setStyle(t,n,"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 s=this._data,n=this._cachedMeta.data;for(const[r,l,c]of this._syncList)this[r](l,c);this._syncList=[];const i=n.length,o=s.length,a=Math.min(o,i);a&&this.parse(0,a),o>i?this._insertElements(i,o-i,t):o<i&&this._removeElements(o,i-o)}_insertElements(t,s,n=!0){const i=this._cachedMeta,o=i.data,a=t+s;let r;const l=c=>{for(c.length+=s,r=c.length-1;r>=a;r--)c[r]=c[r-s]};for(l(o),r=t;r<a;++r)o[r]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,s),n&&this.updateElements(o,t,s,"reset")}updateElements(t,s,n,i){}_removeElements(t,s){const n=this._cachedMeta;if(this._parsing){const i=n._parsed.splice(t,s);n._stacked&&Us(n,i)}n.data.splice(t,s)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[s,n,i]=t;this[s](n,i)}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,s){s&&this._sync(["_removeElements",t,s]);const n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function Pg(e,t){if(!e._cache.$bar){const s=e.getMatchingVisibleMetas(t);let n=[];for(let i=0,o=s.length;i<o;i++)n=n.concat(s[i].controller.getAllParsedValues(e));e._cache.$bar=Kc(n.sort((i,o)=>i-o))}return e._cache.$bar}function Ag(e){const t=e.iScale,s=Pg(t,e.type);let n=t._length,i,o,a,r;const l=()=>{a===32767||a===-32768||(kn(r)&&(n=Math.min(n,Math.abs(a-r)||n)),r=a)};for(i=0,o=s.length;i<o;++i)a=t.getPixelForValue(s[i]),l();for(r=void 0,i=0,o=t.ticks.length;i<o;++i)a=t.getPixelForTick(i),l();return n}function Og(e,t,s,n){const i=s.barThickness;let o,a;return dt(i)?(o=t.min*s.categoryPercentage,a=s.barPercentage):(o=i*n,a=1),{chunk:o/n,ratio:a,start:t.pixels[e]-o/2}}function zg(e,t,s,n){const i=t.pixels,o=i[e];let a=e>0?i[e-1]:null,r=e<i.length-1?i[e+1]:null;const l=s.categoryPercentage;a===null&&(a=o-(r===null?t.end-t.start:r-o)),r===null&&(r=o+o-a);const c=o-(o-Math.min(a,r))/2*l;return{chunk:Math.abs(r-a)/2*l/n,ratio:s.barPercentage,start:c}}function Lg(e,t,s,n){const i=s.parse(e[0],n),o=s.parse(e[1],n),a=Math.min(i,o),r=Math.max(i,o);let l=a,c=r;Math.abs(a)>Math.abs(r)&&(l=r,c=a),t[s.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:o,min:a,max:r}}function hu(e,t,s,n){return Ot(e)?Lg(e,t,s,n):t[s.axis]=s.parse(e,n),t}function Ar(e,t,s,n){const i=e.iScale,o=e.vScale,a=i.getLabels(),r=i===o,l=[];let c,u,h,d;for(c=s,u=s+n;c<u;++c)d=t[c],h={},h[i.axis]=r||i.parse(a[c],c),l.push(hu(d,h,o,c));return l}function lo(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function Rg(e,t,s){return e!==0?Se(e):(t.isHorizontal()?1:-1)*(t.min>=s?1:-1)}function $g(e){let t,s,n,i,o;return e.horizontal?(t=e.base>e.x,s="left",n="right"):(t=e.base<e.y,s="bottom",n="top"),t?(i="end",o="start"):(i="start",o="end"),{start:s,end:n,reverse:t,top:i,bottom:o}}function Eg(e,t,s,n){let i=t.borderSkipped;const o={};if(!i){e.borderSkipped=o;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:r,reverse:l,top:c,bottom:u}=$g(e);i==="middle"&&s&&(e.enableBorderRadius=!0,(s._top||0)===n?i=c:(s._bottom||0)===n?i=u:(o[Or(u,a,r,l)]=!0,i=c)),o[Or(i,a,r,l)]=!0,e.borderSkipped=o}function Or(e,t,s,n){return n?(e=Fg(e,t,s),e=zr(e,s,t)):e=zr(e,t,s),e}function Fg(e,t,s){return e===t?s:e===s?t:e}function zr(e,t,s){return e==="start"?t:e==="end"?s:e}function Ig(e,{inflateAmount:t},s){e.inflateAmount=t==="auto"?s===1?.33:0:t}class du extends ji{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,s,n,i){return Ar(t,s,n,i)}parseArrayData(t,s,n,i){return Ar(t,s,n,i)}parseObjectData(t,s,n,i){const{iScale:o,vScale:a}=t,{xAxisKey:r="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?r:l,u=a.axis==="x"?r:l,h=[];let d,f,g,p;for(d=n,f=n+i;d<f;++d)p=s[d],g={},g[o.axis]=o.parse(_s(p,c),d),h.push(hu(_s(p,u),g,a,d));return h}updateRangeFromParsed(t,s,n,i){super.updateRangeFromParsed(t,s,n,i);const o=n._custom;o&&s===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const s=this._cachedMeta,{iScale:n,vScale:i}=s,o=this.getParsed(t),a=o._custom,r=lo(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(o[i.axis]);return{label:""+n.getLabelForValue(o[n.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const s=this._cachedMeta;this.updateElements(s.data,0,s.data.length,t)}updateElements(t,s,n,i){const o=i==="reset",{index:a,_cachedMeta:{vScale:r}}=this,l=r.getBasePixel(),c=r.isHorizontal(),u=this._getRuler(),{sharedOptions:h,includeOptions:d}=this._getSharedOptions(s,i);for(let f=s;f<s+n;f++){const g=this.getParsed(f),p=o||dt(g[r.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),_=this._calculateBarIndexPixels(f,u),v=(g._stacks||{})[r.axis],w={horizontal:c,base:p.base,enableBorderRadius:!v||lo(g._custom)||a===v._top||a===v._bottom,x:c?p.head:_.center,y:c?_.center:p.head,height:c?_.size:Math.abs(p.size),width:c?Math.abs(p.size):_.size};d&&(w.options=h||this.resolveDataElementOptions(f,t[f].active?"active":i));const T=w.options||t[f].options;Eg(w,T,v,a),Ig(w,T,u.ratio),this.updateElement(t[f],f,w,i)}}_getStacks(t,s){const{iScale:n}=this._cachedMeta,i=n.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),o=n.options.stacked,a=[],r=this._cachedMeta.controller.getParsed(s),l=r&&r[n.axis],c=u=>{const h=u._parsed.find(f=>f[n.axis]===l),d=h&&h[u.vScale.axis];if(dt(d)||isNaN(d))return!0};for(const u of i)if(!(s!==void 0&&c(u))&&((o===!1||a.indexOf(u.stack)===-1||o===void 0&&u.stack===void 0)&&a.push(u.stack),u.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,s=this.chart.options.indexAxis;return Object.keys(t).filter(n=>t[n].axis===s).shift()}_getAxis(){const t={},s=this.getFirstScaleIdForIndexAxis();for(const n of this.chart.data.datasets)t[ot(this.chart.options.indexAxis==="x"?n.xAxisID:n.yAxisID,s)]=!0;return Object.keys(t)}_getStackIndex(t,s,n){const i=this._getStacks(t,n),o=s!==void 0?i.indexOf(s):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,s=this._cachedMeta,n=s.iScale,i=[];let o,a;for(o=0,a=s.data.length;o<a;++o)i.push(n.getPixelForValue(this.getParsed(o)[n.axis],o));const r=t.barThickness;return{min:r||Ag(s),pixels:i,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:t.grouped,ratio:r?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:s,_stacked:n,index:i},options:{base:o,minBarLength:a}}=this,r=o||0,l=this.getParsed(t),c=l._custom,u=lo(c);let h=l[s.axis],d=0,f=n?this.applyStack(s,l,n):h,g,p;f!==h&&(d=f-h,f=h),u&&(h=c.barStart,f=c.barEnd-c.barStart,h!==0&&Se(h)!==Se(c.barEnd)&&(d=0),d+=h);const _=!dt(o)&&!u?o:d;let v=s.getPixelForValue(_);if(this.chart.getDataVisibility(t)?g=s.getPixelForValue(d+f):g=v,p=g-v,Math.abs(p)<a){p=Rg(p,s,r)*a,h===r&&(v-=p/2);const w=s.getPixelForDecimal(0),T=s.getPixelForDecimal(1),C=Math.min(w,T),A=Math.max(w,T);v=Math.max(Math.min(v,A),C),g=v+p,n&&!u&&(l._stacks[s.axis]._visualValues[i]=s.getValueForPixel(g)-s.getValueForPixel(v))}if(v===s.getPixelForValue(r)){const w=Se(p)*s.getLineWidthForValue(r)/2;v+=w,p-=w}return{size:p,base:v,head:g,center:g+p/2}}_calculateBarIndexPixels(t,s){const n=s.scale,i=this.options,o=i.skipNull,a=ot(i.maxBarThickness,1/0);let r,l;const c=this._getAxisCount();if(s.grouped){const u=o?this._getStackCount(t):s.stackCount,h=i.barThickness==="flex"?zg(t,s,i,u*c):Og(t,s,i,u*c),d=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,f=this._getAxis().indexOf(ot(d,this.getFirstScaleIdForIndexAxis())),g=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0)+f;r=h.start+h.chunk*g+h.chunk/2,l=Math.min(a,h.chunk*h.ratio)}else r=n.getPixelForValue(this.getParsed(t)[n.axis],t),l=Math.min(a,s.min*s.ratio);return{base:r-l/2,head:r+l/2,center:r,size:l}}draw(){const t=this._cachedMeta,s=t.vScale,n=t.data,i=n.length;let o=0;for(;o<i;++o)this.getParsed(o)[s.axis]!==null&&!n[o].hidden&&n[o].draw(this._ctx)}}function jg(e,t,s){let n=1,i=1,o=0,a=0;if(t<wt){const r=e,l=r+t,c=Math.cos(r),u=Math.sin(r),h=Math.cos(l),d=Math.sin(l),f=(T,C,A)=>Sn(T,r,l,!0)?1:Math.max(C,C*s,A,A*s),g=(T,C,A)=>Sn(T,r,l,!0)?-1:Math.min(C,C*s,A,A*s),p=f(0,c,h),_=f(zt,u,d),v=g(bt,c,h),w=g(bt+zt,u,d);n=(p-v)/2,i=(_-w)/2,o=-(p+v)/2,a=-(_+w)/2}return{ratioX:n,ratioY:i,offsetX:o,offsetY:a}}class Bg extends ji{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const s=t.data,{labels:{pointStyle:n,textAlign:i,color:o,useBorderRadius:a,borderRadius:r}}=t.legend.options;return s.labels.length&&s.datasets.length?s.labels.map((l,c)=>{const h=t.getDatasetMeta(0).controller.getStyle(c);return{text:l,fillStyle:h.backgroundColor,fontColor:o,hidden:!t.getDataVisibility(c),lineDash:h.borderDash,lineDashOffset:h.borderDashOffset,lineJoin:h.borderJoinStyle,lineWidth:h.borderWidth,strokeStyle:h.borderColor,textAlign:i,pointStyle:n,borderRadius:a&&(r||h.borderRadius),index:c}}):[]}},onClick(t,s,n){n.chart.toggleDataVisibility(s.index),n.chart.update()}}}};constructor(t,s){super(t,s),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,s){const n=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=n;else{let o=l=>+n[l];if(at(n[t])){const{key:l="value"}=this._parsing;o=c=>+_s(n[c],l)}let a,r;for(a=t,r=t+s;a<r;++a)i._parsed[a]=o(a)}}_getRotation(){return Ee(this.options.rotation-90)}_getCircumference(){return Ee(this.options.circumference)}_getRotationExtents(){let t=wt,s=-wt;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const i=this.chart.getDatasetMeta(n).controller,o=i._getRotation(),a=i._getCircumference();t=Math.min(t,o),s=Math.max(s,o+a)}return{rotation:t,circumference:s-t}}update(t){const s=this.chart,{chartArea:n}=s,i=this._cachedMeta,o=i.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,r=Math.max((Math.min(n.width,n.height)-a)/2,0),l=Math.min(qf(this.options.cutout,r),1),c=this._getRingWeight(this.index),{circumference:u,rotation:h}=this._getRotationExtents(),{ratioX:d,ratioY:f,offsetX:g,offsetY:p}=jg(h,u,l),_=(n.width-a)/d,v=(n.height-a)/f,w=Math.max(Math.min(_,v)/2,0),T=Bc(this.options.radius,w),C=Math.max(T*l,0),A=(T-C)/this._getVisibleDatasetWeightTotal();this.offsetX=g*T,this.offsetY=p*T,i.total=this.calculateTotal(),this.outerRadius=T-A*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-A*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,s){const n=this.options,i=this._cachedMeta,o=this._getCircumference();return s&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*o/wt)}updateElements(t,s,n,i){const o=i==="reset",a=this.chart,r=a.chartArea,c=a.options.animation,u=(r.left+r.right)/2,h=(r.top+r.bottom)/2,d=o&&c.animateScale,f=d?0:this.innerRadius,g=d?0:this.outerRadius,{sharedOptions:p,includeOptions:_}=this._getSharedOptions(s,i);let v=this._getRotation(),w;for(w=0;w<s;++w)v+=this._circumference(w,o);for(w=s;w<s+n;++w){const T=this._circumference(w,o),C=t[w],A={x:u+this.offsetX,y:h+this.offsetY,startAngle:v,endAngle:v+T,circumference:T,outerRadius:g,innerRadius:f};_&&(A.options=p||this.resolveDataElementOptions(w,C.active?"active":i)),v+=T,this.updateElement(C,w,A,i)}}calculateTotal(){const t=this._cachedMeta,s=t.data;let n=0,i;for(i=0;i<s.length;i++){const o=t._parsed[i];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(i)&&!s[i].hidden&&(n+=Math.abs(o))}return n}calculateCircumference(t){const s=this._cachedMeta.total;return s>0&&!isNaN(t)?wt*(Math.abs(t)/s):0}getLabelAndValue(t){const s=this._cachedMeta,n=this.chart,i=n.data.labels||[],o=$i(s._parsed[t],n.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let s=0;const n=this.chart;let i,o,a,r,l;if(!t){for(i=0,o=n.data.datasets.length;i<o;++i)if(n.isDatasetVisible(i)){a=n.getDatasetMeta(i),t=a.data,r=a.controller;break}}if(!t)return 0;for(i=0,o=t.length;i<o;++i)l=r.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(s=Math.max(s,l.borderWidth||0,l.hoverBorderWidth||0));return s}getMaxOffset(t){let s=0;for(let n=0,i=t.length;n<i;++n){const o=this.resolveDataElementOptions(n);s=Math.max(s,o.offset||0,o.hoverOffset||0)}return s}_getRingWeightOffset(t){let s=0;for(let n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(s+=this._getRingWeight(n));return s}_getRingWeight(t){return Math.max(ot(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class fu extends ji{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const s=this._cachedMeta,{dataset:n,data:i=[],_dataset:o}=s,a=this.chart._animationsDisabled;let{start:r,count:l}=pp(s,i,a);this._drawStart=r,this._drawCount=l,gp(s)&&(r=0,l=i.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!o._decimated,n.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(n,void 0,{animated:!a,options:c},t),this.updateElements(i,r,l,t)}updateElements(t,s,n,i){const o=i==="reset",{iScale:a,vScale:r,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:h}=this._getSharedOptions(s,i),d=a.axis,f=r.axis,{spanGaps:g,segment:p}=this.options,_=wn(g)?g:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||o||i==="none",w=s+n,T=t.length;let C=s>0&&this.getParsed(s-1);for(let A=0;A<T;++A){const z=t[A],D=v?z:{};if(A<s||A>=w){D.skip=!0;continue}const P=this.getParsed(A),R=dt(P[f]),U=D[d]=a.getPixelForValue(P[d],A),$=D[f]=o||R?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,P,l):P[f],A);D.skip=isNaN(U)||isNaN($)||R,D.stop=A>0&&Math.abs(P[d]-C[d])>_,p&&(D.parsed=P,D.raw=c.data[A]),h&&(D.options=u||this.resolveDataElementOptions(A,z.active?"active":i)),v||this.updateElement(z,A,D,i),C=P}}getMaxOverflow(){const t=this._cachedMeta,s=t.dataset,n=s.options&&s.options.borderWidth||0,i=t.data||[];if(!i.length)return n;const o=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(n,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}function rs(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class _a{static override(t){Object.assign(_a.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return rs()}parse(){return rs()}format(){return rs()}add(){return rs()}diff(){return rs()}startOf(){return rs()}endOf(){return rs()}}var Vg={_date:_a};function Hg(e,t,s,n){const{controller:i,data:o,_sorted:a}=e,r=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(r&&t===r.axis&&t!=="r"&&a&&o.length){const c=r._reversePixels?cp:ds;if(n){if(i._sharedOptions){const u=o[0],h=typeof u.getRange=="function"&&u.getRange(t);if(h){const d=c(o,t,s-h),f=c(o,t,s+h);return{lo:d.lo,hi:f.hi}}}}else{const u=c(o,t,s);if(l){const{vScale:h}=i._cachedMeta,{_parsed:d}=e,f=d.slice(0,u.lo+1).reverse().findIndex(p=>!dt(p[h.axis]));u.lo-=Math.max(0,f);const g=d.slice(u.hi).findIndex(p=>!dt(p[h.axis]));u.hi+=Math.max(0,g)}return u}}return{lo:0,hi:o.length-1}}function Bi(e,t,s,n,i){const o=e.getSortedVisibleDatasetMetas(),a=s[t];for(let r=0,l=o.length;r<l;++r){const{index:c,data:u}=o[r],{lo:h,hi:d}=Hg(o[r],t,a,i);for(let f=h;f<=d;++f){const g=u[f];g.skip||n(g,c,f)}}}function Wg(e){const t=e.indexOf("x")!==-1,s=e.indexOf("y")!==-1;return function(n,i){const o=t?Math.abs(n.x-i.x):0,a=s?Math.abs(n.y-i.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function co(e,t,s,n,i){const o=[];return!i&&!e.isPointInArea(t)||Bi(e,s,t,function(r,l,c){!i&&!Mn(r,e.chartArea,0)||r.inRange(t.x,t.y,n)&&o.push({element:r,datasetIndex:l,index:c})},!0),o}function Ng(e,t,s,n){let i=[];function o(a,r,l){const{startAngle:c,endAngle:u}=a.getProps(["startAngle","endAngle"],n),{angle:h}=Wc(a,{x:t.x,y:t.y});Sn(h,c,u)&&i.push({element:a,datasetIndex:r,index:l})}return Bi(e,s,t,o),i}function Kg(e,t,s,n,i,o){let a=[];const r=Wg(s);let l=Number.POSITIVE_INFINITY;function c(u,h,d){const f=u.inRange(t.x,t.y,i);if(n&&!f)return;const g=u.getCenterPoint(i);if(!(!!o||e.isPointInArea(g))&&!f)return;const _=r(t,g);_<l?(a=[{element:u,datasetIndex:h,index:d}],l=_):_===l&&a.push({element:u,datasetIndex:h,index:d})}return Bi(e,s,t,c),a}function uo(e,t,s,n,i,o){return!o&&!e.isPointInArea(t)?[]:s==="r"&&!n?Ng(e,t,s,i):Kg(e,t,s,n,i,o)}function Lr(e,t,s,n,i){const o=[],a=s==="x"?"inXRange":"inYRange";let r=!1;return Bi(e,s,t,(l,c,u)=>{l[a]&&l[a](t[s],i)&&(o.push({element:l,datasetIndex:c,index:u}),r=r||l.inRange(t.x,t.y,i))}),n&&!r?[]:o}var Ug={modes:{index(e,t,s,n){const i=us(t,e),o=s.axis||"x",a=s.includeInvisible||!1,r=s.intersect?co(e,i,o,n,a):uo(e,i,o,!1,n,a),l=[];return r.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=r[0].index,h=c.data[u];h&&!h.skip&&l.push({element:h,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,s,n){const i=us(t,e),o=s.axis||"xy",a=s.includeInvisible||!1;let r=s.intersect?co(e,i,o,n,a):uo(e,i,o,!1,n,a);if(r.length>0){const l=r[0].datasetIndex,c=e.getDatasetMeta(l).data;r=[];for(let u=0;u<c.length;++u)r.push({element:c[u],datasetIndex:l,index:u})}return r},point(e,t,s,n){const i=us(t,e),o=s.axis||"xy",a=s.includeInvisible||!1;return co(e,i,o,n,a)},nearest(e,t,s,n){const i=us(t,e),o=s.axis||"xy",a=s.includeInvisible||!1;return uo(e,i,o,s.intersect,n,a)},x(e,t,s,n){const i=us(t,e);return Lr(e,i,"x",s.intersect,n)},y(e,t,s,n){const i=us(t,e);return Lr(e,i,"y",s.intersect,n)}}};const pu=["left","top","right","bottom"];function Ys(e,t){return e.filter(s=>s.pos===t)}function Rr(e,t){return e.filter(s=>pu.indexOf(s.pos)===-1&&s.box.axis===t)}function Xs(e,t){return e.sort((s,n)=>{const i=t?n:s,o=t?s:n;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function Yg(e){const t=[];let s,n,i,o,a,r;for(s=0,n=(e||[]).length;s<n;++s)i=e[s],{position:o,options:{stack:a,stackWeight:r=1}}=i,t.push({index:s,box:i,pos:o,horizontal:i.isHorizontal(),weight:i.weight,stack:a&&o+a,stackWeight:r});return t}function Xg(e){const t={};for(const s of e){const{stack:n,pos:i,stackWeight:o}=s;if(!n||!pu.includes(i))continue;const a=t[n]||(t[n]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return t}function qg(e,t){const s=Xg(e),{vBoxMaxWidth:n,hBoxMaxHeight:i}=t;let o,a,r;for(o=0,a=e.length;o<a;++o){r=e[o];const{fullSize:l}=r.box,c=s[r.stack],u=c&&r.stackWeight/c.weight;r.horizontal?(r.width=u?u*n:l&&t.availableWidth,r.height=i):(r.width=n,r.height=u?u*i:l&&t.availableHeight)}return s}function Gg(e){const t=Yg(e),s=Xs(t.filter(c=>c.box.fullSize),!0),n=Xs(Ys(t,"left"),!0),i=Xs(Ys(t,"right")),o=Xs(Ys(t,"top"),!0),a=Xs(Ys(t,"bottom")),r=Rr(t,"x"),l=Rr(t,"y");return{fullSize:s,leftAndTop:n.concat(o),rightAndBottom:i.concat(l).concat(a).concat(r),chartArea:Ys(t,"chartArea"),vertical:n.concat(i).concat(l),horizontal:o.concat(a).concat(r)}}function $r(e,t,s,n){return Math.max(e[s],t[s])+Math.max(e[n],t[n])}function gu(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 Zg(e,t,s,n){const{pos:i,box:o}=s,a=e.maxPadding;if(!at(i)){s.size&&(e[i]-=s.size);const h=n[s.stack]||{size:0,count:1};h.size=Math.max(h.size,s.horizontal?o.height:o.width),s.size=h.size/h.count,e[i]+=s.size}o.getPadding&&gu(a,o.getPadding());const r=Math.max(0,t.outerWidth-$r(a,e,"left","right")),l=Math.max(0,t.outerHeight-$r(a,e,"top","bottom")),c=r!==e.w,u=l!==e.h;return e.w=r,e.h=l,s.horizontal?{same:c,other:u}:{same:u,other:c}}function Jg(e){const t=e.maxPadding;function s(n){const i=Math.max(t[n]-e[n],0);return e[n]+=i,i}e.y+=s("top"),e.x+=s("left"),s("right"),s("bottom")}function Qg(e,t){const s=t.maxPadding;function n(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(a=>{o[a]=Math.max(t[a],s[a])}),o}return n(e?["left","right"]:["top","bottom"])}function tn(e,t,s,n){const i=[];let o,a,r,l,c,u;for(o=0,a=e.length,c=0;o<a;++o){r=e[o],l=r.box,l.update(r.width||t.w,r.height||t.h,Qg(r.horizontal,t));const{same:h,other:d}=Zg(t,s,r,n);c|=h&&i.length,u=u||d,l.fullSize||i.push(r)}return c&&tn(i,t,s,n)||u}function Yn(e,t,s,n,i){e.top=s,e.left=t,e.right=t+n,e.bottom=s+i,e.width=n,e.height=i}function Er(e,t,s,n){const i=s.padding;let{x:o,y:a}=t;for(const r of e){const l=r.box,c=n[r.stack]||{placed:0,weight:1},u=r.stackWeight/c.weight||1;if(r.horizontal){const h=t.w*u,d=c.size||l.height;kn(c.start)&&(a=c.start),l.fullSize?Yn(l,i.left,a,s.outerWidth-i.right-i.left,d):Yn(l,t.left+c.placed,a,h,d),c.start=a,c.placed+=h,a=l.bottom}else{const h=t.h*u,d=c.size||l.width;kn(c.start)&&(o=c.start),l.fullSize?Yn(l,o,i.top,d,s.outerHeight-i.bottom-i.top):Yn(l,o,t.top+c.placed,d,h),c.start=o,c.placed+=h,o=l.right}}t.x=o,t.y=a}var Ge={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(s){t.draw(s)}}]},e.boxes.push(t)},removeBox(e,t){const s=e.boxes?e.boxes.indexOf(t):-1;s!==-1&&e.boxes.splice(s,1)},configure(e,t,s){t.fullSize=s.fullSize,t.position=s.position,t.weight=s.weight},update(e,t,s,n){if(!e)return;const i=de(e.options.layout.padding),o=Math.max(t-i.width,0),a=Math.max(s-i.height,0),r=Gg(e.boxes),l=r.vertical,c=r.horizontal;ft(e.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});const u=l.reduce((p,_)=>_.box.options&&_.box.options.display===!1?p:p+1,0)||1,h=Object.freeze({outerWidth:t,outerHeight:s,padding:i,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/u,hBoxMaxHeight:a/2}),d=Object.assign({},i);gu(d,de(n));const f=Object.assign({maxPadding:d,w:o,h:a,x:i.left,y:i.top},i),g=qg(l.concat(c),h);tn(r.fullSize,f,h,g),tn(l,f,h,g),tn(c,f,h,g)&&tn(l,f,h,g),Jg(f),Er(r.leftAndTop,f,h,g),f.x+=f.w,f.y+=f.h,Er(r.rightAndBottom,f,h,g),e.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},ft(r.chartArea,p=>{const _=p.box;Object.assign(_,e.chartArea),_.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class _u{acquireContext(t,s){}releaseContext(t){return!1}addEventListener(t,s,n){}removeEventListener(t,s,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,s,n,i){return s=Math.max(0,s||t.width),n=n||t.height,{width:s,height:Math.max(0,i?Math.floor(s/i):n)}}isAttached(t){return!0}updateConfig(t){}}class t_ extends _u{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const oi="$chartjs",e_={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Fr=e=>e===null||e==="";function s_(e,t){const s=e.style,n=e.getAttribute("height"),i=e.getAttribute("width");if(e[oi]={initial:{height:n,width:i,style:{display:s.display,height:s.height,width:s.width}}},s.display=s.display||"block",s.boxSizing=s.boxSizing||"border-box",Fr(i)){const o=yr(e,"width");o!==void 0&&(e.width=o)}if(Fr(n))if(e.style.height==="")e.height=e.width/(t||2);else{const o=yr(e,"height");o!==void 0&&(e.height=o)}return e}const mu=ng?{passive:!0}:!1;function n_(e,t,s){e&&e.addEventListener(t,s,mu)}function i_(e,t,s){e&&e.canvas&&e.canvas.removeEventListener(t,s,mu)}function o_(e,t){const s=e_[e.type]||e.type,{x:n,y:i}=us(e,t);return{type:s,chart:t,native:e,x:n!==void 0?n:null,y:i!==void 0?i:null}}function yi(e,t){for(const s of e)if(s===t||s.contains(t))return!0}function a_(e,t,s){const n=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||yi(r.addedNodes,n),a=a&&!yi(r.removedNodes,n);a&&s()});return i.observe(document,{childList:!0,subtree:!0}),i}function r_(e,t,s){const n=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||yi(r.removedNodes,n),a=a&&!yi(r.addedNodes,n);a&&s()});return i.observe(document,{childList:!0,subtree:!0}),i}const Cn=new Map;let Ir=0;function bu(){const e=window.devicePixelRatio;e!==Ir&&(Ir=e,Cn.forEach((t,s)=>{s.currentDevicePixelRatio!==e&&t()}))}function l_(e,t){Cn.size||window.addEventListener("resize",bu),Cn.set(e,t)}function c_(e){Cn.delete(e),Cn.size||window.removeEventListener("resize",bu)}function u_(e,t,s){const n=e.canvas,i=n&&ga(n);if(!i)return;const o=Yc((r,l)=>{const c=i.clientWidth;s(r,l),c<i.clientWidth&&s()},window),a=new ResizeObserver(r=>{const l=r[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||o(c,u)});return a.observe(i),l_(e,o),a}function ho(e,t,s){s&&s.disconnect(),t==="resize"&&c_(e)}function h_(e,t,s){const n=e.canvas,i=Yc(o=>{e.ctx!==null&&s(o_(o,e))},e);return n_(n,t,i),i}class d_ extends _u{acquireContext(t,s){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(s_(t,s),n):null}releaseContext(t){const s=t.canvas;if(!s[oi])return!1;const n=s[oi].initial;["height","width"].forEach(o=>{const a=n[o];dt(a)?s.removeAttribute(o):s.setAttribute(o,a)});const i=n.style||{};return Object.keys(i).forEach(o=>{s.style[o]=i[o]}),s.width=s.width,delete s[oi],!0}addEventListener(t,s,n){this.removeEventListener(t,s);const i=t.$proxies||(t.$proxies={}),a={attach:a_,detach:r_,resize:u_}[s]||h_;i[s]=a(t,s,n)}removeEventListener(t,s){const n=t.$proxies||(t.$proxies={}),i=n[s];if(!i)return;({attach:ho,detach:ho,resize:ho}[s]||i_)(t,s,i),n[s]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,s,n,i){return sg(t,s,n,i)}isAttached(t){const s=t&&ga(t);return!!(s&&s.isConnected)}}function f_(e){return!pa()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?t_:d_}let es=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:s,y:n}=this.getProps(["x","y"],t);return{x:s,y:n}}hasValue(){return wn(this.x)&&wn(this.y)}getProps(t,s){const n=this.$animations;if(!s||!n)return this;const i={};return t.forEach(o=>{i[o]=n[o]&&n[o].active()?n[o]._to:this[o]}),i}};function p_(e,t){const s=e.options.ticks,n=g_(e),i=Math.min(s.maxTicksLimit||n,n),o=s.major.enabled?m_(t):[],a=o.length,r=o[0],l=o[a-1],c=[];if(a>i)return b_(t,c,o,a/i),c;const u=__(o,t,i);if(a>0){let h,d;const f=a>1?Math.round((l-r)/(a-1)):null;for(Xn(t,c,u,dt(f)?0:r-f,r),h=0,d=a-1;h<d;h++)Xn(t,c,u,o[h],o[h+1]);return Xn(t,c,u,l,dt(f)?t.length:l+f),c}return Xn(t,c,u),c}function g_(e){const t=e.options.offset,s=e._tickSize(),n=e._length/s+(t?0:1),i=e._maxLength/s;return Math.floor(Math.min(n,i))}function __(e,t,s){const n=v_(e),i=t.length/s;if(!n)return Math.max(i,1);const o=np(n);for(let a=0,r=o.length-1;a<r;a++){const l=o[a];if(l>i)return l}return Math.max(i,1)}function m_(e){const t=[];let s,n;for(s=0,n=e.length;s<n;s++)e[s].major&&t.push(s);return t}function b_(e,t,s,n){let i=0,o=s[0],a;for(n=Math.ceil(n),a=0;a<e.length;a++)a===o&&(t.push(e[a]),i++,o=s[i*n])}function Xn(e,t,s,n,i){const o=ot(n,0),a=Math.min(ot(i,e.length),e.length);let r=0,l,c,u;for(s=Math.ceil(s),i&&(l=i-n,s=l/Math.floor(l/s)),u=o;u<0;)r++,u=Math.round(o+r*s);for(c=Math.max(o,0);c<a;c++)c===u&&(t.push(e[c]),r++,u=Math.round(o+r*s))}function v_(e){const t=e.length;let s,n;if(t<2)return!1;for(n=e[0],s=1;s<t;++s)if(e[s]-e[s-1]!==n)return!1;return n}const y_=e=>e==="left"?"right":e==="right"?"left":e,jr=(e,t,s)=>t==="top"||t==="left"?e[t]+s:e[t]-s,Br=(e,t)=>Math.min(t||e,e);function Vr(e,t){const s=[],n=e.length/t,i=e.length;let o=0;for(;o<i;o+=n)s.push(e[Math.floor(o)]);return s}function x_(e,t,s){const n=e.ticks.length,i=Math.min(t,n-1),o=e._startPixel,a=e._endPixel,r=1e-6;let l=e.getPixelForTick(i),c;if(!(s&&(n===1?c=Math.max(l-o,a-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<o-r||l>a+r)))return l}function k_(e,t){ft(e,s=>{const n=s.gc,i=n.length/2;let o;if(i>t){for(o=0;o<i;++o)delete s.data[n[o]];n.splice(0,i)}})}function qs(e){return e.drawTicks?e.tickLength:0}function Hr(e,t){if(!e.display)return 0;const s=Jt(e.font,t),n=de(e.padding);return(Ot(e.text)?e.text.length:1)*s.lineHeight+n.height}function w_(e,t){return vs(e,{scale:t,type:"scale"})}function S_(e,t,s){return vs(e,{tick:s,index:t,type:"tick"})}function M_(e,t,s){let n=Xc(e);return(s&&t!=="right"||!s&&t==="right")&&(n=y_(n)),n}function C_(e,t,s,n){const{top:i,left:o,bottom:a,right:r,chart:l}=e,{chartArea:c,scales:u}=l;let h=0,d,f,g;const p=a-i,_=r-o;if(e.isHorizontal()){if(f=ee(n,o,r),at(s)){const v=Object.keys(s)[0],w=s[v];g=u[v].getPixelForValue(w)+p-t}else s==="center"?g=(c.bottom+c.top)/2+p-t:g=jr(e,s,t);d=r-o}else{if(at(s)){const v=Object.keys(s)[0],w=s[v];f=u[v].getPixelForValue(w)-_+t}else s==="center"?f=(c.left+c.right)/2-_+t:f=jr(e,s,t);g=ee(n,a,i),h=s==="left"?-zt:zt}return{titleX:f,titleY:g,maxWidth:d,rotation:h}}class ys extends es{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,s){return t}getUserBounds(){let{_userMin:t,_userMax:s,_suggestedMin:n,_suggestedMax:i}=this;return t=se(t,Number.POSITIVE_INFINITY),s=se(s,Number.NEGATIVE_INFINITY),n=se(n,Number.POSITIVE_INFINITY),i=se(i,Number.NEGATIVE_INFINITY),{min:se(t,n),max:se(s,i),minDefined:Pt(t),maxDefined:Pt(s)}}getMinMax(t){let{min:s,max:n,minDefined:i,maxDefined:o}=this.getUserBounds(),a;if(i&&o)return{min:s,max:n};const r=this.getMatchingVisibleMetas();for(let l=0,c=r.length;l<c;++l)a=r[l].controller.getMinMax(this,t),i||(s=Math.min(s,a.min)),o||(n=Math.max(n,a.max));return s=o&&s>n?n:s,n=i&&s>n?s:n,{min:se(s,se(n,s)),max:se(n,se(s,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){xt(this.options.beforeUpdate,[this])}update(t,s,n){const{beginAtZero:i,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=s,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Rp(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=r<this.ticks.length;this._convertTicksToLabels(l?Vr(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=p_(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,s,n;this.isHorizontal()?(s=this.left,n=this.right):(s=this.top,n=this.bottom,t=!t),this._startPixel=s,this._endPixel=n,this._reversePixels=t,this._length=n-s,this._alignToPixels=this.options.alignToPixels}afterUpdate(){xt(this.options.afterUpdate,[this])}beforeSetDimensions(){xt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){xt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),xt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){xt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const s=this.options.ticks;let n,i,o;for(n=0,i=t.length;n<i;n++)o=t[n],o.label=xt(s.callback,[o.value,n,t],this)}afterTickToLabelConversion(){xt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){xt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,s=t.ticks,n=Br(this.ticks.length,t.ticks.maxTicksLimit),i=s.minRotation||0,o=s.maxRotation;let a=i,r,l,c;if(!this._isVisible()||!s.display||i>=o||n<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),h=u.widest.width,d=u.highest.height,f=Bt(this.chart.width-h,0,this.maxWidth);r=t.offset?this.maxWidth/n:f/(n-1),h+6>r&&(r=f/(n-(t.offset?.5:1)),l=this.maxHeight-qs(t.grid)-s.padding-Hr(t.title,this.chart.options.font),c=Math.sqrt(h*h+d*d),a=ap(Math.min(Math.asin(Bt((u.highest.height+6)/r,-1,1)),Math.asin(Bt(l/c,-1,1))-Math.asin(Bt(d/c,-1,1)))),a=Math.max(i,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){xt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){xt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:s,options:{ticks:n,title:i,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){const l=Hr(i,s.options.font);if(r?(t.width=this.maxWidth,t.height=qs(o)+l):(t.height=this.maxHeight,t.width=qs(o)+l),n.display&&this.ticks.length){const{first:c,last:u,widest:h,highest:d}=this._getLabelSizes(),f=n.padding*2,g=Ee(this.labelRotation),p=Math.cos(g),_=Math.sin(g);if(r){const v=n.mirror?0:_*h.width+p*d.height;t.height=Math.min(this.maxHeight,t.height+v+f)}else{const v=n.mirror?0:p*h.width+_*d.height;t.width=Math.min(this.maxWidth,t.width+v+f)}this._calculatePadding(c,u,_,p)}}this._handleMargins(),r?(this.width=this._length=s.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=s.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,s,n,i){const{ticks:{align:o,padding:a},position:r}=this.options,l=this.labelRotation!==0,c=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,f=0;l?c?(d=i*t.width,f=n*s.height):(d=n*t.height,f=i*s.width):o==="start"?f=s.width:o==="end"?d=t.width:o!=="inner"&&(d=t.width/2,f=s.width/2),this.paddingLeft=Math.max((d-u+a)*this.width/(this.width-u),0),this.paddingRight=Math.max((f-h+a)*this.width/(this.width-h),0)}else{let u=s.height/2,h=t.height/2;o==="start"?(u=0,h=t.height):o==="end"&&(u=s.height,h=0),this.paddingTop=u+a,this.paddingBottom=h+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){xt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:s}=this.options;return s==="top"||s==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let s,n;for(s=0,n=t.length;s<n;s++)dt(t[s].label)&&(t.splice(s,1),n--,s--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const s=this.options.ticks.sampleSize;let n=this.ticks;s<n.length&&(n=Vr(n,s)),this._labelSizes=t=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,s,n){const{ctx:i,_longestTextCache:o}=this,a=[],r=[],l=Math.floor(s/Br(s,n));let c=0,u=0,h,d,f,g,p,_,v,w,T,C,A;for(h=0;h<s;h+=l){if(g=t[h].label,p=this._resolveTickFontOptions(h),i.font=_=p.string,v=o[_]=o[_]||{data:{},gc:[]},w=p.lineHeight,T=C=0,!dt(g)&&!Ot(g))T=gr(i,v.data,v.gc,T,g),C=w;else if(Ot(g))for(d=0,f=g.length;d<f;++d)A=g[d],!dt(A)&&!Ot(A)&&(T=gr(i,v.data,v.gc,T,A),C+=w);a.push(T),r.push(C),c=Math.max(T,c),u=Math.max(C,u)}k_(o,s);const z=a.indexOf(c),D=r.indexOf(u),P=R=>({width:a[R]||0,height:r[R]||0});return{first:P(0),last:P(s-1),widest:P(z),highest:P(D),widths:a,heights:r}}getLabelForValue(t){return t}getPixelForValue(t,s){return NaN}getValueForPixel(t){}getPixelForTick(t){const s=this.ticks;return t<0||t>s.length-1?null:this.getPixelForValue(s[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const s=this._startPixel+t*this._length;return lp(this._alignToPixels?as(this.chart,s,0):s)}getDecimalForPixel(t){const s=(t-this._startPixel)/this._length;return this._reversePixels?1-s:s}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:s}=this;return t<0&&s<0?s:t>0&&s>0?t:0}getContext(t){const s=this.ticks||[];if(t>=0&&t<s.length){const n=s[t];return n.$context||(n.$context=S_(this.getContext(),t,n))}return this.$context||(this.$context=w_(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,s=Ee(this.labelRotation),n=Math.abs(Math.cos(s)),i=Math.abs(Math.sin(s)),o=this._getLabelSizes(),a=t.autoSkipPadding||0,r=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return this.isHorizontal()?l*n>r*i?r/n:l/i:l*i<r*n?l/n:r/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const s=this.axis,n=this.chart,i=this.options,{grid:o,position:a,border:r}=i,l=o.offset,c=this.isHorizontal(),h=this.ticks.length+(l?1:0),d=qs(o),f=[],g=r.setContext(this.getContext()),p=g.display?g.width:0,_=p/2,v=function(G){return as(n,G,p)};let w,T,C,A,z,D,P,R,U,$,X,nt;if(a==="top")w=v(this.bottom),D=this.bottom-d,R=w-_,$=v(t.top)+_,nt=t.bottom;else if(a==="bottom")w=v(this.top),$=t.top,nt=v(t.bottom)-_,D=w+_,R=this.top+d;else if(a==="left")w=v(this.right),z=this.right-d,P=w-_,U=v(t.left)+_,X=t.right;else if(a==="right")w=v(this.left),U=t.left,X=v(t.right)-_,z=w+_,P=this.left+d;else if(s==="x"){if(a==="center")w=v((t.top+t.bottom)/2+.5);else if(at(a)){const G=Object.keys(a)[0],y=a[G];w=v(this.chart.scales[G].getPixelForValue(y))}$=t.top,nt=t.bottom,D=w+_,R=D+d}else if(s==="y"){if(a==="center")w=v((t.left+t.right)/2);else if(at(a)){const G=Object.keys(a)[0],y=a[G];w=v(this.chart.scales[G].getPixelForValue(y))}z=w-_,P=z-d,U=t.left,X=t.right}const ut=ot(i.ticks.maxTicksLimit,h),st=Math.max(1,Math.ceil(h/ut));for(T=0;T<h;T+=st){const G=this.getContext(T),y=o.setContext(G),L=r.setContext(G),M=y.lineWidth,q=y.color,St=L.dash||[],Tt=L.dashOffset,Ke=y.tickWidth,Ce=y.tickColor,ss=y.tickBorderDash||[],Qt=y.tickBorderDashOffset;C=x_(this,T,l),C!==void 0&&(A=as(n,C,M),c?z=P=U=X=A:D=R=$=nt=A,f.push({tx1:z,ty1:D,tx2:P,ty2:R,x1:U,y1:$,x2:X,y2:nt,width:M,color:q,borderDash:St,borderDashOffset:Tt,tickWidth:Ke,tickColor:Ce,tickBorderDash:ss,tickBorderDashOffset:Qt}))}return this._ticksLength=h,this._borderValue=w,f}_computeLabelItems(t){const s=this.axis,n=this.options,{position:i,ticks:o}=n,a=this.isHorizontal(),r=this.ticks,{align:l,crossAlign:c,padding:u,mirror:h}=o,d=qs(n.grid),f=d+u,g=h?-u:f,p=-Ee(this.labelRotation),_=[];let v,w,T,C,A,z,D,P,R,U,$,X,nt="middle";if(i==="top")z=this.bottom-g,D=this._getXAxisLabelAlignment();else if(i==="bottom")z=this.top+g,D=this._getXAxisLabelAlignment();else if(i==="left"){const st=this._getYAxisLabelAlignment(d);D=st.textAlign,A=st.x}else if(i==="right"){const st=this._getYAxisLabelAlignment(d);D=st.textAlign,A=st.x}else if(s==="x"){if(i==="center")z=(t.top+t.bottom)/2+f;else if(at(i)){const st=Object.keys(i)[0],G=i[st];z=this.chart.scales[st].getPixelForValue(G)+f}D=this._getXAxisLabelAlignment()}else if(s==="y"){if(i==="center")A=(t.left+t.right)/2-f;else if(at(i)){const st=Object.keys(i)[0],G=i[st];A=this.chart.scales[st].getPixelForValue(G)}D=this._getYAxisLabelAlignment(d).textAlign}s==="y"&&(l==="start"?nt="top":l==="end"&&(nt="bottom"));const ut=this._getLabelSizes();for(v=0,w=r.length;v<w;++v){T=r[v],C=T.label;const st=o.setContext(this.getContext(v));P=this.getPixelForTick(v)+o.labelOffset,R=this._resolveTickFontOptions(v),U=R.lineHeight,$=Ot(C)?C.length:1;const G=$/2,y=st.color,L=st.textStrokeColor,M=st.textStrokeWidth;let q=D;a?(A=P,D==="inner"&&(v===w-1?q=this.options.reverse?"left":"right":v===0?q=this.options.reverse?"right":"left":q="center"),i==="top"?c==="near"||p!==0?X=-$*U+U/2:c==="center"?X=-ut.highest.height/2-G*U+U:X=-ut.highest.height+U/2:c==="near"||p!==0?X=U/2:c==="center"?X=ut.highest.height/2-G*U:X=ut.highest.height-$*U,h&&(X*=-1),p!==0&&!st.showLabelBackdrop&&(A+=U/2*Math.sin(p))):(z=P,X=(1-$)*U/2);let St;if(st.showLabelBackdrop){const Tt=de(st.backdropPadding),Ke=ut.heights[v],Ce=ut.widths[v];let ss=X-Tt.top,Qt=0-Tt.left;switch(nt){case"middle":ss-=Ke/2;break;case"bottom":ss-=Ke;break}switch(D){case"center":Qt-=Ce/2;break;case"right":Qt-=Ce;break;case"inner":v===w-1?Qt-=Ce:v>0&&(Qt-=Ce/2);break}St={left:Qt,top:ss,width:Ce+Tt.width,height:Ke+Tt.height,color:st.backdropColor}}_.push({label:C,font:R,textOffset:X,options:{rotation:p,color:y,strokeColor:L,strokeWidth:M,textAlign:q,textBaseline:nt,translation:[A,z],backdrop:St}})}return _}_getXAxisLabelAlignment(){const{position:t,ticks:s}=this.options;if(-Ee(this.labelRotation))return t==="top"?"left":"right";let i="center";return s.align==="start"?i="left":s.align==="end"?i="right":s.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:s,ticks:{crossAlign:n,mirror:i,padding:o}}=this.options,a=this._getLabelSizes(),r=t+o,l=a.widest.width;let c,u;return s==="left"?i?(u=this.right+o,n==="near"?c="left":n==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-r,n==="near"?c="right":n==="center"?(c="center",u-=l/2):(c="left",u=this.left)):s==="right"?i?(u=this.left+o,n==="near"?c="right":n==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+r,n==="near"?c="left":n==="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,s=this.options.position;if(s==="left"||s==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(s==="top"||s==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:s},left:n,top:i,width:o,height:a}=this;s&&(t.save(),t.fillStyle=s,t.fillRect(n,i,o,a),t.restore())}getLineWidthForValue(t){const s=this.options.grid;if(!this._isVisible()||!s.display)return 0;const i=this.ticks.findIndex(o=>o.value===t);return i>=0?s.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const s=this.options.grid,n=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const r=(l,c,u)=>{!u.width||!u.color||(n.save(),n.lineWidth=u.width,n.strokeStyle=u.color,n.setLineDash(u.borderDash||[]),n.lineDashOffset=u.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(c.x,c.y),n.stroke(),n.restore())};if(s.display)for(o=0,a=i.length;o<a;++o){const l=i[o];s.drawOnChartArea&&r({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),s.drawTicks&&r({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:s,options:{border:n,grid:i}}=this,o=n.setContext(this.getContext()),a=n.display?o.width:0;if(!a)return;const r=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,h,d;this.isHorizontal()?(c=as(t,this.left,a)-a/2,u=as(t,this.right,r)+r/2,h=d=l):(h=as(t,this.top,a)-a/2,d=as(t,this.bottom,r)+r/2,c=u=l),s.save(),s.lineWidth=o.width,s.strokeStyle=o.color,s.beginPath(),s.moveTo(c,h),s.lineTo(u,d),s.stroke(),s.restore()}drawLabels(t){if(!this.options.ticks.display)return;const n=this.ctx,i=this._computeLabelArea();i&&Ei(n,i);const o=this.getLabelItems(t);for(const a of o){const r=a.options,l=a.font,c=a.label,u=a.textOffset;mi(n,c,0,u,l,r)}i&&Fi(n)}drawTitle(){const{ctx:t,options:{position:s,title:n,reverse:i}}=this;if(!n.display)return;const o=Jt(n.font),a=de(n.padding),r=n.align;let l=o.lineHeight/2;s==="bottom"||s==="center"||at(s)?(l+=a.bottom,Ot(n.text)&&(l+=o.lineHeight*(n.text.length-1))):l+=a.top;const{titleX:c,titleY:u,maxWidth:h,rotation:d}=C_(this,l,s,r);mi(t,n.text,0,0,o,{color:n.color,maxWidth:h,rotation:d,textAlign:M_(r,s,i),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,s=t.ticks&&t.ticks.z||0,n=ot(t.grid&&t.grid.z,-1),i=ot(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==ys.prototype.draw?[{z:s,draw:o=>{this.draw(o)}}]:[{z:n,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:s,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const s=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",i=[];let o,a;for(o=0,a=s.length;o<a;++o){const r=s[o];r[n]===this.id&&(!t||r.type===t)&&i.push(r)}return i}_resolveTickFontOptions(t){const s=this.options.ticks.setContext(this.getContext(t));return Jt(s.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class qn{constructor(t,s,n){this.type=t,this.scope=s,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const s=Object.getPrototypeOf(t);let n;P_(s)&&(n=this.register(s));const i=this.items,o=t.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in i||(i[o]=t,T_(t,a,n),this.override&&Ct.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const s=this.items,n=t.id,i=this.scope;n in s&&delete s[n],i&&n in Ct[i]&&(delete Ct[i][n],this.override&&delete ms[n])}}function T_(e,t,s){const n=xn(Object.create(null),[s?Ct.get(s):{},Ct.get(t),e.defaults]);Ct.set(t,n),e.defaultRoutes&&D_(t,e.defaultRoutes),e.descriptors&&Ct.describe(t,e.descriptors)}function D_(e,t){Object.keys(t).forEach(s=>{const n=s.split("."),i=n.pop(),o=[e].concat(n).join("."),a=t[s].split("."),r=a.pop(),l=a.join(".");Ct.route(o,i,l,r)})}function P_(e){return"id"in e&&"defaults"in e}class A_{constructor(){this.controllers=new qn(ji,"datasets",!0),this.elements=new qn(es,"elements"),this.plugins=new qn(Object,"plugins"),this.scales=new qn(ys,"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,s,n){[...s].forEach(i=>{const o=n||this._getRegistryForType(i);n||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):ft(i,a=>{const r=n||this._getRegistryForType(a);this._exec(t,r,a)})})}_exec(t,s,n){const i=aa(t);xt(n["before"+i],[],n),s[t](n),xt(n["after"+i],[],n)}_getRegistryForType(t){for(let s=0;s<this._typedRegistries.length;s++){const n=this._typedRegistries[s];if(n.isForType(t))return n}return this.plugins}_get(t,s,n){const i=s.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+n+".");return i}}var ve=new A_;class O_{constructor(){this._init=void 0}notify(t,s,n,i){if(s==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),this._init===void 0)return;const o=i?this._descriptors(t).filter(i):this._descriptors(t),a=this._notify(o,t,s,n);return s==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),a}_notify(t,s,n,i){i=i||{};for(const o of t){const a=o.plugin,r=a[n],l=[s,i,o.options];if(xt(r,l,a)===!1&&i.cancelable)return!1}return!0}invalidate(){dt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const s=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),s}_createDescriptors(t,s){const n=t&&t.config,i=ot(n.options&&n.options.plugins,{}),o=z_(n);return i===!1&&!s?[]:R_(t,o,i,s)}_notifyStateChanges(t){const s=this._oldCache||[],n=this._cache,i=(o,a)=>o.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(i(s,n),t,"stop"),this._notify(i(n,s),t,"start")}}function z_(e){const t={},s=[],n=Object.keys(ve.plugins.items);for(let o=0;o<n.length;o++)s.push(ve.getPlugin(n[o]));const i=e.plugins||[];for(let o=0;o<i.length;o++){const a=i[o];s.indexOf(a)===-1&&(s.push(a),t[a.id]=!0)}return{plugins:s,localIds:t}}function L_(e,t){return!t&&e===!1?null:e===!0?{}:e}function R_(e,{plugins:t,localIds:s},n,i){const o=[],a=e.getContext();for(const r of t){const l=r.id,c=L_(n[l],i);c!==null&&o.push({plugin:r,options:$_(e.config,{plugin:r,local:s[l]},c,a)})}return o}function $_(e,{plugin:t,local:s},n,i){const o=e.pluginScopeKeys(t),a=e.getOptionScopes(n,o);return s&&t.defaults&&a.push(t.defaults),e.createResolver(a,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function $o(e,t){const s=Ct.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||s.indexAxis||"x"}function E_(e,t){let s=e;return e==="_index_"?s=t:e==="_value_"&&(s=t==="x"?"y":"x"),s}function F_(e,t){return e===t?"_index_":"_value_"}function Wr(e){if(e==="x"||e==="y"||e==="r")return e}function I_(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Eo(e,...t){if(Wr(e))return e;for(const s of t){const n=s.axis||I_(s.position)||e.length>1&&Wr(e[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Nr(e,t,s){if(s[t+"AxisID"]===e)return{axis:t}}function j_(e,t){if(t.data&&t.data.datasets){const s=t.data.datasets.filter(n=>n.xAxisID===e||n.yAxisID===e);if(s.length)return Nr(e,"x",s[0])||Nr(e,"y",s[0])}return{}}function B_(e,t){const s=ms[e.type]||{scales:{}},n=t.scales||{},i=$o(e.type,t),o=Object.create(null);return Object.keys(n).forEach(a=>{const r=n[a];if(!at(r))return console.error(`Invalid scale configuration for scale: ${a}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=Eo(a,r,j_(a,e),Ct.scales[r.type]),c=F_(l,i),u=s.scales||{};o[a]=un(Object.create(null),[{axis:l},r,u[l],u[c]])}),e.data.datasets.forEach(a=>{const r=a.type||e.type,l=a.indexAxis||$o(r,t),u=(ms[r]||{}).scales||{};Object.keys(u).forEach(h=>{const d=E_(h,l),f=a[d+"AxisID"]||d;o[f]=o[f]||Object.create(null),un(o[f],[{axis:d},n[f],u[h]])})}),Object.keys(o).forEach(a=>{const r=o[a];un(r,[Ct.scales[r.type],Ct.scale])}),o}function vu(e){const t=e.options||(e.options={});t.plugins=ot(t.plugins,{}),t.scales=B_(e,t)}function yu(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function V_(e){return e=e||{},e.data=yu(e.data),vu(e),e}const Kr=new Map,xu=new Set;function Gn(e,t){let s=Kr.get(e);return s||(s=t(),Kr.set(e,s),xu.add(s)),s}const Gs=(e,t,s)=>{const n=_s(t,s);n!==void 0&&e.add(n)};class H_{constructor(t){this._config=V_(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=yu(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(),vu(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Gn(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,s){return Gn(`${t}.transition.${s}`,()=>[[`datasets.${t}.transitions.${s}`,`transitions.${s}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,s){return Gn(`${t}-${s}`,()=>[[`datasets.${t}.elements.${s}`,`datasets.${t}`,`elements.${s}`,""]])}pluginScopeKeys(t){const s=t.id,n=this.type;return Gn(`${n}-plugin-${s}`,()=>[[`plugins.${s}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,s){const n=this._scopeCache;let i=n.get(t);return(!i||s)&&(i=new Map,n.set(t,i)),i}getOptionScopes(t,s,n){const{options:i,type:o}=this,a=this._cachedScopes(t,n),r=a.get(s);if(r)return r;const l=new Set;s.forEach(u=>{t&&(l.add(t),u.forEach(h=>Gs(l,t,h))),u.forEach(h=>Gs(l,i,h)),u.forEach(h=>Gs(l,ms[o]||{},h)),u.forEach(h=>Gs(l,Ct,h)),u.forEach(h=>Gs(l,Lo,h))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),xu.has(s)&&a.set(s,c),c}chartOptionScopes(){const{options:t,type:s}=this;return[t,ms[s]||{},Ct.datasets[s]||{},{type:s},Ct,Lo]}resolveNamedOptions(t,s,n,i=[""]){const o={$shared:!0},{resolver:a,subPrefixes:r}=Ur(this._resolverCache,t,i);let l=a;if(N_(a,s)){o.$shared=!1,n=Qe(n)?n():n;const c=this.createResolver(t,n,r);l=Bs(a,n,c)}for(const c of s)o[c]=l[c];return o}createResolver(t,s,n=[""],i){const{resolver:o}=Ur(this._resolverCache,t,n);return at(s)?Bs(o,s,void 0,i):o}}function Ur(e,t,s){let n=e.get(t);n||(n=new Map,e.set(t,n));const i=s.join();let o=n.get(i);return o||(o={resolver:ha(t,s),subPrefixes:s.filter(r=>!r.toLowerCase().includes("hover"))},n.set(i,o)),o}const W_=e=>at(e)&&Object.getOwnPropertyNames(e).some(t=>Qe(e[t]));function N_(e,t){const{isScriptable:s,isIndexable:n}=Jc(e);for(const i of t){const o=s(i),a=n(i),r=(a||o)&&e[i];if(o&&(Qe(r)||W_(r))||a&&Ot(r))return!0}return!1}var K_="4.5.1";const U_=["top","bottom","left","right","chartArea"];function Yr(e,t){return e==="top"||e==="bottom"||U_.indexOf(e)===-1&&t==="x"}function Xr(e,t){return function(s,n){return s[e]===n[e]?s[t]-n[t]:s[e]-n[e]}}function qr(e){const t=e.chart,s=t.options.animation;t.notifyPlugins("afterRender"),xt(s&&s.onComplete,[e],t)}function Y_(e){const t=e.chart,s=t.options.animation;xt(s&&s.onProgress,[e],t)}function ku(e){return pa()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const ai={},Gr=e=>{const t=ku(e);return Object.values(ai).filter(s=>s.canvas===t).pop()};function X_(e,t,s){const n=Object.keys(e);for(const i of n){const o=+i;if(o>=t){const a=e[i];delete e[i],(s>0||o>t)&&(e[o+s]=a)}}}function q_(e,t,s,n){return!s||e.type==="mouseout"?null:n?t:e}let We=class{static defaults=Ct;static instances=ai;static overrides=ms;static registry=ve;static version=K_;static getChart=Gr;static register(...t){ve.add(...t),Zr()}static unregister(...t){ve.remove(...t),Zr()}constructor(t,s){const n=this.config=new H_(s),i=ku(t),o=Gr(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||f_(i)),this.platform.updateConfig(n);const r=this.platform.acquireContext(i,a.aspectRatio),l=r&&r.canvas,c=l&&l.height,u=l&&l.width;if(this.id=Xf(),this.ctx=r,this.canvas=l,this.width=u,this.height=c,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new O_,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=dp(h=>this.update(h),a.resizeDelay||0),this._dataChanges=[],ai[this.id]=this,!r||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Pe.listen(this,"complete",qr),Pe.listen(this,"progress",Y_),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:s},width:n,height:i,_aspectRatio:o}=this;return dt(t)?s&&o?o:i?n/i: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 ve}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():vr(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return _r(this.canvas,this.ctx),this}stop(){return Pe.stop(this),this}resize(t,s){Pe.running(this)?this._resizeBeforeDraw={width:t,height:s}:this._resize(t,s)}_resize(t,s){const n=this.options,i=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,t,s,o),r=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,vr(this,r,!0)&&(this.notifyPlugins("resize",{size:a}),xt(n.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const s=this.options.scales||{};ft(s,(n,i)=>{n.id=i})}buildOrUpdateScales(){const t=this.options,s=t.scales,n=this.scales,i=Object.keys(n).reduce((a,r)=>(a[r]=!1,a),{});let o=[];s&&(o=o.concat(Object.keys(s).map(a=>{const r=s[a],l=Eo(a,r),c=l==="r",u=l==="x";return{options:r,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),ft(o,a=>{const r=a.options,l=r.id,c=Eo(l,r),u=ot(r.type,a.dtype);(r.position===void 0||Yr(r.position,c)!==Yr(a.dposition))&&(r.position=a.dposition),i[l]=!0;let h=null;if(l in n&&n[l].type===u)h=n[l];else{const d=ve.getScale(u);h=new d({id:l,type:u,ctx:this.ctx,chart:this}),n[h.id]=h}h.init(r,t)}),ft(i,(a,r)=>{a||delete n[r]}),ft(n,a=>{Ge.configure(this,a,a.options),Ge.addBox(this,a)})}_updateMetasets(){const t=this._metasets,s=this.data.datasets.length,n=t.length;if(t.sort((i,o)=>i.index-o.index),n>s){for(let i=s;i<n;++i)this._destroyDatasetMeta(i);t.splice(s,n-s)}this._sortedMetasets=t.slice(0).sort(Xr("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:s}}=this;t.length>s.length&&delete this._stacks,t.forEach((n,i)=>{s.filter(o=>o===n._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],s=this.data.datasets;let n,i;for(this._removeUnreferencedMetasets(),n=0,i=s.length;n<i;n++){const o=s[n];let a=this.getDatasetMeta(n);const r=o.type||this.config.type;if(a.type&&a.type!==r&&(this._destroyDatasetMeta(n),a=this.getDatasetMeta(n)),a.type=r,a.indexAxis=o.indexAxis||$o(r,this.options),a.order=o.order||0,a.index=n,a.label=""+o.label,a.visible=this.isDatasetVisible(n),a.controller)a.controller.updateIndex(n),a.controller.linkScales();else{const l=ve.getController(r),{datasetElementType:c,dataElementType:u}=Ct.datasets[r];Object.assign(l,{dataElementType:ve.getElement(u),datasetElementType:c&&ve.getElement(c)}),a.controller=new l(this,n),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){ft(this.data.datasets,(t,s)=>{this.getDatasetMeta(s).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const s=this.config;s.update();const n=this._options=s.createResolver(s.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:h}=this.getDatasetMeta(c),d=!i&&o.indexOf(h)===-1;h.buildOrUpdateElements(d),a=Math.max(+h.getMaxOverflow(),a)}a=this._minPadding=n.layout.autoPadding?a:0,this._updateLayout(a),i||ft(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Xr("z","_idx"));const{_active:r,_lastEvent:l}=this;l?this._eventHandler(l,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){ft(this.scales,t=>{Ge.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,s=new Set(Object.keys(this._listeners)),n=new Set(t.events);(!ar(s,n)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,s=this._getUniformDataChanges()||[];for(const{method:n,start:i,count:o}of s){const a=n==="_removeElements"?-o:o;X_(t,i,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const s=this.data.datasets.length,n=o=>new Set(t.filter(a=>a[0]===o).map((a,r)=>r+","+a.splice(1).join(","))),i=n(0);for(let o=1;o<s;o++)if(!ar(i,n(o)))return;return Array.from(i).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;Ge.update(this,this.width,this.height,t);const s=this.chartArea,n=s.width<=0||s.height<=0;this._layers=[],ft(this.boxes,i=>{n&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let s=0,n=this.data.datasets.length;s<n;++s)this.getDatasetMeta(s).controller.configure();for(let s=0,n=this.data.datasets.length;s<n;++s)this._updateDataset(s,Qe(t)?t({datasetIndex:s}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,s){const n=this.getDatasetMeta(t),i={meta:n,index:t,mode:s,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(n.controller._update(s),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Pe.has(this)?this.attached&&!Pe.running(this)&&Pe.start(this):(this.draw(),qr({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:n,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(n,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const s=this._layers;for(t=0;t<s.length&&s[t].z<=0;++t)s[t].draw(this.chartArea);for(this._drawDatasets();t<s.length;++t)s[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const s=this._sortedMetasets,n=[];let i,o;for(i=0,o=s.length;i<o;++i){const a=s[i];(!t||a.visible)&&n.push(a)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let s=t.length-1;s>=0;--s)this._drawDataset(t[s]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const s=this.ctx,n={meta:t,index:t.index,cancelable:!0},i=lu(this,t);this.notifyPlugins("beforeDatasetDraw",n)!==!1&&(i&&Ei(s,i),t.controller.draw(),i&&Fi(s),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return Mn(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,s,n,i){const o=Ug.modes[s];return typeof o=="function"?o(this,t,n,i):[]}getDatasetMeta(t){const s=this.data.datasets[t],n=this._metasets;let i=n.filter(o=>o&&o._dataset===s).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:s&&s.order||0,index:t,_dataset:s,_parsed:[],_sorted:!1},n.push(i)),i}getContext(){return this.$context||(this.$context=vs(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const s=this.data.datasets[t];if(!s)return!1;const n=this.getDatasetMeta(t);return typeof n.hidden=="boolean"?!n.hidden:!s.hidden}setDatasetVisibility(t,s){const n=this.getDatasetMeta(t);n.hidden=!s}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,s,n){const i=n?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,i);kn(s)?(o.data[s].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),a.update(o,{visible:n}),this.update(r=>r.datasetIndex===t?i:void 0))}hide(t,s){this._updateVisibility(t,s,!1)}show(t,s){this._updateVisibility(t,s,!0)}_destroyDatasetMeta(t){const s=this._metasets[t];s&&s.controller&&s.controller._destroy(),delete this._metasets[t]}_stop(){let t,s;for(this.stop(),Pe.remove(this),t=0,s=this.data.datasets.length;t<s;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:s}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),_r(t,s),this.platform.releaseContext(s),this.canvas=null,this.ctx=null),delete ai[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,s=this.platform,n=(o,a)=>{s.addEventListener(this,o,a),t[o]=a},i=(o,a,r)=>{o.offsetX=a,o.offsetY=r,this._eventHandler(o)};ft(this.options.events,o=>n(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,s=this.platform,n=(l,c)=>{s.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(s.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let a;const r=()=>{i("attach",r),this.attached=!0,this.resize(),n("resize",o),n("detach",a)};a=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),n("attach",r)},s.isAttached(this.canvas)?r():a()}unbindEvents(){ft(this._listeners,(t,s)=>{this.platform.removeEventListener(this,s,t)}),this._listeners={},ft(this._responsiveListeners,(t,s)=>{this.platform.removeEventListener(this,s,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,s,n){const i=n?"set":"remove";let o,a,r,l;for(s==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),r=0,l=t.length;r<l;++r){a=t[r];const c=a&&this.getDatasetMeta(a.datasetIndex).controller;c&&c[i+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const s=this._active||[],n=t.map(({datasetIndex:o,index:a})=>{const r=this.getDatasetMeta(o);if(!r)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:r.data[a],index:a}});!pi(n,s)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,s))}notifyPlugins(t,s,n){return this._plugins.notify(this,t,s,n)}isPluginEnabled(t){return this._plugins._cache.filter(s=>s.plugin.id===t).length===1}_updateHoverStyles(t,s,n){const i=this.options.hover,o=(l,c)=>l.filter(u=>!c.some(h=>u.datasetIndex===h.datasetIndex&&u.index===h.index)),a=o(s,t),r=n?t:o(t,s);a.length&&this.updateHoverStyle(a,i.mode,!1),r.length&&i.mode&&this.updateHoverStyle(r,i.mode,!0)}_eventHandler(t,s){const n={event:t,replay:s,cancelable:!0,inChartArea:this.isPointInArea(t)},i=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",n,i)===!1)return;const o=this._handleEvent(t,s,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,i),(o||n.changed)&&this.render(),this}_handleEvent(t,s,n){const{_active:i=[],options:o}=this,a=s,r=this._getActiveElements(t,i,n,a),l=tp(t),c=q_(t,this._lastEvent,n,l);n&&(this._lastEvent=null,xt(o.onHover,[t,r,this],this),l&&xt(o.onClick,[t,r,this],this));const u=!pi(r,i);return(u||s)&&(this._active=r,this._updateHoverStyles(r,i,s)),this._lastEvent=c,u}_getActiveElements(t,s,n,i){if(t.type==="mouseout")return[];if(!n)return s;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}};function Zr(){return ft(We.instances,e=>e._plugins.invalidate())}function G_(e,t,s){const{startAngle:n,x:i,y:o,outerRadius:a,innerRadius:r,options:l}=t,{borderWidth:c,borderJoinStyle:u}=l,h=Math.min(c/a,ne(n-s));if(e.beginPath(),e.arc(i,o,a-c/2,n+h/2,s-h/2),r>0){const d=Math.min(c/r,ne(n-s));e.arc(i,o,r+c/2,s-d/2,n+d/2,!0)}else{const d=Math.min(c/2,a*ne(n-s));if(u==="round")e.arc(i,o,d,s-bt/2,n+bt/2,!0);else if(u==="bevel"){const f=2*d*d,g=-f*Math.cos(s+bt/2)+i,p=-f*Math.sin(s+bt/2)+o,_=f*Math.cos(n+bt/2)+i,v=f*Math.sin(n+bt/2)+o;e.lineTo(g,p),e.lineTo(_,v)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function Z_(e,t,s){const{startAngle:n,pixelMargin:i,x:o,y:a,outerRadius:r,innerRadius:l}=t;let c=i/r;e.beginPath(),e.arc(o,a,r,n-c,s+c),l>i?(c=i/l,e.arc(o,a,l,s+c,n-c,!0)):e.arc(o,a,i,s+zt,n-zt),e.closePath(),e.clip()}function J_(e){return ua(e,["outerStart","outerEnd","innerStart","innerEnd"])}function Q_(e,t,s,n){const i=J_(e.options.borderRadius),o=(s-t)/2,a=Math.min(o,n*t/2),r=l=>{const c=(s-Math.min(o,l))*n/2;return Bt(l,0,Math.min(o,c))};return{outerStart:r(i.outerStart),outerEnd:r(i.outerEnd),innerStart:Bt(i.innerStart,0,a),innerEnd:Bt(i.innerEnd,0,a)}}function Cs(e,t,s,n){return{x:s+e*Math.cos(t),y:n+e*Math.sin(t)}}function xi(e,t,s,n,i,o){const{x:a,y:r,startAngle:l,pixelMargin:c,innerRadius:u}=t,h=Math.max(t.outerRadius+n+s-c,0),d=u>0?u+n+s+c:0;let f=0;const g=i-l;if(n){const st=u>0?u-n:0,G=h>0?h-n:0,y=(st+G)/2,L=y!==0?g*y/(y+n):g;f=(g-L)/2}const p=Math.max(.001,g*h-s/bt)/h,_=(g-p)/2,v=l+_+f,w=i-_-f,{outerStart:T,outerEnd:C,innerStart:A,innerEnd:z}=Q_(t,d,h,w-v),D=h-T,P=h-C,R=v+T/D,U=w-C/P,$=d+A,X=d+z,nt=v+A/$,ut=w-z/X;if(e.beginPath(),o){const st=(R+U)/2;if(e.arc(a,r,h,R,st),e.arc(a,r,h,st,U),C>0){const M=Cs(P,U,a,r);e.arc(M.x,M.y,C,U,w+zt)}const G=Cs(X,w,a,r);if(e.lineTo(G.x,G.y),z>0){const M=Cs(X,ut,a,r);e.arc(M.x,M.y,z,w+zt,ut+Math.PI)}const y=(w-z/d+(v+A/d))/2;if(e.arc(a,r,d,w-z/d,y,!0),e.arc(a,r,d,y,v+A/d,!0),A>0){const M=Cs($,nt,a,r);e.arc(M.x,M.y,A,nt+Math.PI,v-zt)}const L=Cs(D,v,a,r);if(e.lineTo(L.x,L.y),T>0){const M=Cs(D,R,a,r);e.arc(M.x,M.y,T,v-zt,R)}}else{e.moveTo(a,r);const st=Math.cos(R)*h+a,G=Math.sin(R)*h+r;e.lineTo(st,G);const y=Math.cos(U)*h+a,L=Math.sin(U)*h+r;e.lineTo(y,L)}e.closePath()}function tm(e,t,s,n,i){const{fullCircles:o,startAngle:a,circumference:r}=t;let l=t.endAngle;if(o){xi(e,t,s,n,l,i);for(let c=0;c<o;++c)e.fill();isNaN(r)||(l=a+(r%wt||wt))}return xi(e,t,s,n,l,i),e.fill(),l}function em(e,t,s,n,i){const{fullCircles:o,startAngle:a,circumference:r,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:h,borderDashOffset:d,borderRadius:f}=l,g=l.borderAlign==="inner";if(!c)return;e.setLineDash(h||[]),e.lineDashOffset=d,g?(e.lineWidth=c*2,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let p=t.endAngle;if(o){xi(e,t,s,n,p,i);for(let _=0;_<o;++_)e.stroke();isNaN(r)||(p=a+(r%wt||wt))}g&&Z_(e,t,p),l.selfJoin&&p-a>=bt&&f===0&&u!=="miter"&&G_(e,t,p),o||(xi(e,t,s,n,p,i),e.stroke())}class sm extends es{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,s,n){const i=this.getProps(["x","y"],n),{angle:o,distance:a}=Wc(i,{x:t,y:s}),{startAngle:r,endAngle:l,innerRadius:c,outerRadius:u,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),d=(this.options.spacing+this.options.borderWidth)/2,f=ot(h,l-r),g=Sn(o,r,l)&&r!==l,p=f>=wt||g,_=Fe(a,c+d,u+d);return p&&_}getCenterPoint(t){const{x:s,y:n,startAngle:i,endAngle:o,innerRadius:a,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:l,spacing:c}=this.options,u=(i+o)/2,h=(a+r+c+l)/2;return{x:s+Math.cos(u)*h,y:n+Math.sin(u)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:s,circumference:n}=this,i=(s.offset||0)/4,o=(s.spacing||0)/2,a=s.circular;if(this.pixelMargin=s.borderAlign==="inner"?.33:0,this.fullCircles=n>wt?Math.floor(n/wt):0,n===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const r=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(r)*i,Math.sin(r)*i);const l=1-Math.sin(Math.min(bt,n||0)),c=i*l;t.fillStyle=s.backgroundColor,t.strokeStyle=s.borderColor,tm(t,this,c,o,a),em(t,this,c,o,a),t.restore()}}function wu(e,t,s=t){e.lineCap=ot(s.borderCapStyle,t.borderCapStyle),e.setLineDash(ot(s.borderDash,t.borderDash)),e.lineDashOffset=ot(s.borderDashOffset,t.borderDashOffset),e.lineJoin=ot(s.borderJoinStyle,t.borderJoinStyle),e.lineWidth=ot(s.borderWidth,t.borderWidth),e.strokeStyle=ot(s.borderColor,t.borderColor)}function nm(e,t,s){e.lineTo(s.x,s.y)}function im(e){return e.stepped?Mp:e.tension||e.cubicInterpolationMode==="monotone"?Cp:nm}function Su(e,t,s={}){const n=e.length,{start:i=0,end:o=n-1}=s,{start:a,end:r}=t,l=Math.max(i,a),c=Math.min(o,r),u=i<a&&o<a||i>r&&o>r;return{count:n,start:l,loop:t.loop,ilen:c<l&&!u?n+c-l:c-l}}function om(e,t,s,n){const{points:i,options:o}=t,{count:a,start:r,loop:l,ilen:c}=Su(i,s,n),u=im(o);let{move:h=!0,reverse:d}=n||{},f,g,p;for(f=0;f<=c;++f)g=i[(r+(d?c-f:f))%a],!g.skip&&(h?(e.moveTo(g.x,g.y),h=!1):u(e,p,g,d,o.stepped),p=g);return l&&(g=i[(r+(d?c:0))%a],u(e,p,g,d,o.stepped)),!!l}function am(e,t,s,n){const i=t.points,{count:o,start:a,ilen:r}=Su(i,s,n),{move:l=!0,reverse:c}=n||{};let u=0,h=0,d,f,g,p,_,v;const w=C=>(a+(c?r-C:C))%o,T=()=>{p!==_&&(e.lineTo(u,_),e.lineTo(u,p),e.lineTo(u,v))};for(l&&(f=i[w(0)],e.moveTo(f.x,f.y)),d=0;d<=r;++d){if(f=i[w(d)],f.skip)continue;const C=f.x,A=f.y,z=C|0;z===g?(A<p?p=A:A>_&&(_=A),u=(h*u+C)/++h):(T(),e.lineTo(C,A),g=z,h=0,p=_=A),v=A}T()}function Fo(e){const t=e.options,s=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!s?am:om}function rm(e){return e.stepped?ig:e.tension||e.cubicInterpolationMode==="monotone"?og:hs}function lm(e,t,s,n){let i=t._path;i||(i=t._path=new Path2D,t.path(i,s,n)&&i.closePath()),wu(e,t.options),e.stroke(i)}function cm(e,t,s,n){const{segments:i,options:o}=t,a=Fo(t);for(const r of i)wu(e,o,r.style),e.beginPath(),a(e,t,r,{start:s,end:s+n-1})&&e.closePath(),e.stroke()}const um=typeof Path2D=="function";function hm(e,t,s,n){um&&!t.options.segment?lm(e,t,s,n):cm(e,t,s,n)}class Ln extends es{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,s){const n=this.options;if((n.tension||n.cubicInterpolationMode==="monotone")&&!n.stepped&&!this._pointsUpdated){const i=n.spanGaps?this._loop:this._fullLoop;Gp(this._points,n,t,i,s),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=hg(this,this.options.segment))}first(){const t=this.segments,s=this.points;return t.length&&s[t[0].start]}last(){const t=this.segments,s=this.points,n=t.length;return n&&s[t[n-1].end]}interpolate(t,s){const n=this.options,i=t[s],o=this.points,a=ru(this,{property:s,start:i,end:i});if(!a.length)return;const r=[],l=rm(n);let c,u;for(c=0,u=a.length;c<u;++c){const{start:h,end:d}=a[c],f=o[h],g=o[d];if(f===g){r.push(f);continue}const p=Math.abs((i-f[s])/(g[s]-f[s])),_=l(f,g,p,n.stepped);_[s]=t[s],r.push(_)}return r.length===1?r[0]:r}pathSegment(t,s,n){return Fo(this)(t,this,s,n)}path(t,s,n){const i=this.segments,o=Fo(this);let a=this._loop;s=s||0,n=n||this.points.length-s;for(const r of i)a&=o(t,this,r,{start:s,end:s+n-1});return!!a}draw(t,s,n,i){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),hm(t,this,n,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Jr(e,t,s,n){const i=e.options,{[s]:o}=e.getProps([s],n);return Math.abs(t-o)<i.radius+i.hitRadius}class Mu extends es{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,s,n){const i=this.options,{x:o,y:a}=this.getProps(["x","y"],n);return Math.pow(t-o,2)+Math.pow(s-a,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,s){return Jr(this,t,"x",s)}inYRange(t,s){return Jr(this,t,"y",s)}getCenterPoint(t){const{x:s,y:n}=this.getProps(["x","y"],t);return{x:s,y:n}}size(t){t=t||this.options||{};let s=t.radius||0;s=Math.max(s,s&&t.hoverRadius||0);const n=s&&t.borderWidth||0;return(s+n)*2}draw(t,s){const n=this.options;this.skip||n.radius<.1||!Mn(this,s,this.size(n)/2)||(t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.fillStyle=n.backgroundColor,Ro(t,n,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Cu(e,t){const{x:s,y:n,base:i,width:o,height:a}=e.getProps(["x","y","base","width","height"],t);let r,l,c,u,h;return e.horizontal?(h=a/2,r=Math.min(s,i),l=Math.max(s,i),c=n-h,u=n+h):(h=o/2,r=s-h,l=s+h,c=Math.min(n,i),u=Math.max(n,i)),{left:r,top:c,right:l,bottom:u}}function Ze(e,t,s,n){return e?0:Bt(t,s,n)}function dm(e,t,s){const n=e.options.borderWidth,i=e.borderSkipped,o=Zc(n);return{t:Ze(i.top,o.top,0,s),r:Ze(i.right,o.right,0,t),b:Ze(i.bottom,o.bottom,0,s),l:Ze(i.left,o.left,0,t)}}function fm(e,t,s){const{enableBorderRadius:n}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,o=$s(i),a=Math.min(t,s),r=e.borderSkipped,l=n||at(i);return{topLeft:Ze(!l||r.top||r.left,o.topLeft,0,a),topRight:Ze(!l||r.top||r.right,o.topRight,0,a),bottomLeft:Ze(!l||r.bottom||r.left,o.bottomLeft,0,a),bottomRight:Ze(!l||r.bottom||r.right,o.bottomRight,0,a)}}function pm(e){const t=Cu(e),s=t.right-t.left,n=t.bottom-t.top,i=dm(e,s/2,n/2),o=fm(e,s/2,n/2);return{outer:{x:t.left,y:t.top,w:s,h:n,radius:o},inner:{x:t.left+i.l,y:t.top+i.t,w:s-i.l-i.r,h:n-i.t-i.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,o.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(i.b,i.r))}}}}function fo(e,t,s,n){const i=t===null,o=s===null,r=e&&!(i&&o)&&Cu(e,n);return r&&(i||Fe(t,r.left,r.right))&&(o||Fe(s,r.top,r.bottom))}function gm(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function _m(e,t){e.rect(t.x,t.y,t.w,t.h)}function po(e,t,s={}){const n=e.x!==s.x?-t:0,i=e.y!==s.y?-t:0,o=(e.x+e.w!==s.x+s.w?t:0)-n,a=(e.y+e.h!==s.y+s.h?t:0)-i;return{x:e.x+n,y:e.y+i,w:e.w+o,h:e.h+a,radius:e.radius}}class ma extends es{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:s,options:{borderColor:n,backgroundColor:i}}=this,{inner:o,outer:a}=pm(this),r=gm(a.radius)?bi:_m;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),r(t,po(a,s,o)),t.clip(),r(t,po(o,-s,a)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),r(t,po(o,s)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,s,n){return fo(this,t,s,n)}inXRange(t,s){return fo(this,t,null,s)}inYRange(t,s){return fo(this,null,t,s)}getCenterPoint(t){const{x:s,y:n,base:i,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(s+i)/2:s,y:o?n:(n+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}function mm(e,t,s){const n=e.segments,i=e.points,o=t.points,a=[];for(const r of n){let{start:l,end:c}=r;c=Vi(l,c,i);const u=Io(s,i[l],i[c],r.loop);if(!t.segments){a.push({source:r,target:u,start:i[l],end:i[c]});continue}const h=ru(t,u);for(const d of h){const f=Io(s,o[d.start],o[d.end],d.loop),g=au(r,i,f);for(const p of g)a.push({source:p,target:d,start:{[s]:Qr(u,f,"start",Math.max)},end:{[s]:Qr(u,f,"end",Math.min)}})}}return a}function Io(e,t,s,n){if(n)return;let i=t[e],o=s[e];return e==="angle"&&(i=ne(i),o=ne(o)),{property:e,start:i,end:o}}function bm(e,t){const{x:s=null,y:n=null}=e||{},i=t.points,o=[];return t.segments.forEach(({start:a,end:r})=>{r=Vi(a,r,i);const l=i[a],c=i[r];n!==null?(o.push({x:l.x,y:n}),o.push({x:c.x,y:n})):s!==null&&(o.push({x:s,y:l.y}),o.push({x:s,y:c.y}))}),o}function Vi(e,t,s){for(;t>e;t--){const n=s[t];if(!isNaN(n.x)&&!isNaN(n.y))break}return t}function Qr(e,t,s,n){return e&&t?n(e[s],t[s]):e?e[s]:t?t[s]:0}function Tu(e,t){let s=[],n=!1;return Ot(e)?(n=!0,s=e):s=bm(e,t),s.length?new Ln({points:s,options:{tension:0},_loop:n,_fullLoop:n}):null}function tl(e){return e&&e.fill!==!1}function vm(e,t,s){let i=e[t].fill;const o=[t];let a;if(!s)return i;for(;i!==!1&&o.indexOf(i)===-1;){if(!Pt(i))return i;if(a=e[i],!a)return!1;if(a.visible)return i;o.push(i),i=a.fill}return!1}function ym(e,t,s){const n=Sm(e);if(at(n))return isNaN(n.value)?!1:n;let i=parseFloat(n);return Pt(i)&&Math.floor(i)===i?xm(n[0],t,i,s):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function xm(e,t,s,n){return(e==="-"||e==="+")&&(s=t+s),s===t||s<0||s>=n?!1:s}function km(e,t){let s=null;return e==="start"?s=t.bottom:e==="end"?s=t.top:at(e)?s=t.getPixelForValue(e.value):t.getBasePixel&&(s=t.getBasePixel()),s}function wm(e,t,s){let n;return e==="start"?n=s:e==="end"?n=t.options.reverse?t.min:t.max:at(e)?n=e.value:n=t.getBaseValue(),n}function Sm(e){const t=e.options,s=t.fill;let n=ot(s&&s.target,s);return n===void 0&&(n=!!t.backgroundColor),n===!1||n===null?!1:n===!0?"origin":n}function Mm(e){const{scale:t,index:s,line:n}=e,i=[],o=n.segments,a=n.points,r=Cm(t,s);r.push(Tu({x:null,y:t.bottom},n));for(let l=0;l<o.length;l++){const c=o[l];for(let u=c.start;u<=c.end;u++)Tm(i,a[u],r)}return new Ln({points:i,options:{}})}function Cm(e,t){const s=[],n=e.getMatchingVisibleMetas("line");for(let i=0;i<n.length;i++){const o=n[i];if(o.index===t)break;o.hidden||s.unshift(o.dataset)}return s}function Tm(e,t,s){const n=[];for(let i=0;i<s.length;i++){const o=s[i],{first:a,last:r,point:l}=Dm(o,t,"x");if(!(!l||a&&r)){if(a)n.unshift(l);else if(e.push(l),!r)break}}e.push(...n)}function Dm(e,t,s){const n=e.interpolate(t,s);if(!n)return{};const i=n[s],o=e.segments,a=e.points;let r=!1,l=!1;for(let c=0;c<o.length;c++){const u=o[c],h=a[u.start][s],d=a[u.end][s];if(Fe(i,h,d)){r=i===h,l=i===d;break}}return{first:r,last:l,point:n}}class Du{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,s,n){const{x:i,y:o,radius:a}=this;return s=s||{start:0,end:wt},t.arc(i,o,a,s.end,s.start,!0),!n.bounds}interpolate(t){const{x:s,y:n,radius:i}=this,o=t.angle;return{x:s+Math.cos(o)*i,y:n+Math.sin(o)*i,angle:o}}}function Pm(e){const{chart:t,fill:s,line:n}=e;if(Pt(s))return Am(t,s);if(s==="stack")return Mm(e);if(s==="shape")return!0;const i=Om(e);return i instanceof Du?i:Tu(i,n)}function Am(e,t){const s=e.getDatasetMeta(t);return s&&e.isDatasetVisible(t)?s.dataset:null}function Om(e){return(e.scale||{}).getPointPositionForValue?Lm(e):zm(e)}function zm(e){const{scale:t={},fill:s}=e,n=km(s,t);if(Pt(n)){const i=t.isHorizontal();return{x:i?n:null,y:i?null:n}}return null}function Lm(e){const{scale:t,fill:s}=e,n=t.options,i=t.getLabels().length,o=n.reverse?t.max:t.min,a=wm(s,t,o),r=[];if(n.grid.circular){const l=t.getPointPositionForValue(0,o);return new Du({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(a)})}for(let l=0;l<i;++l)r.push(t.getPointPositionForValue(l,a));return r}function go(e,t,s){const n=Pm(t),{chart:i,index:o,line:a,scale:r,axis:l}=t,c=a.options,u=c.fill,h=c.backgroundColor,{above:d=h,below:f=h}=u||{},g=i.getDatasetMeta(o),p=lu(i,g);n&&a.points.length&&(Ei(e,s),Rm(e,{line:a,target:n,above:d,below:f,area:s,scale:r,axis:l,clip:p}),Fi(e))}function Rm(e,t){const{line:s,target:n,above:i,below:o,area:a,scale:r,clip:l}=t,c=s._loop?"angle":t.axis;e.save();let u=o;o!==i&&(c==="x"?(el(e,n,a.top),_o(e,{line:s,target:n,color:i,scale:r,property:c,clip:l}),e.restore(),e.save(),el(e,n,a.bottom)):c==="y"&&(sl(e,n,a.left),_o(e,{line:s,target:n,color:o,scale:r,property:c,clip:l}),e.restore(),e.save(),sl(e,n,a.right),u=i)),_o(e,{line:s,target:n,color:u,scale:r,property:c,clip:l}),e.restore()}function el(e,t,s){const{segments:n,points:i}=t;let o=!0,a=!1;e.beginPath();for(const r of n){const{start:l,end:c}=r,u=i[l],h=i[Vi(l,c,i)];o?(e.moveTo(u.x,u.y),o=!1):(e.lineTo(u.x,s),e.lineTo(u.x,u.y)),a=!!t.pathSegment(e,r,{move:a}),a?e.closePath():e.lineTo(h.x,s)}e.lineTo(t.first().x,s),e.closePath(),e.clip()}function sl(e,t,s){const{segments:n,points:i}=t;let o=!0,a=!1;e.beginPath();for(const r of n){const{start:l,end:c}=r,u=i[l],h=i[Vi(l,c,i)];o?(e.moveTo(u.x,u.y),o=!1):(e.lineTo(s,u.y),e.lineTo(u.x,u.y)),a=!!t.pathSegment(e,r,{move:a}),a?e.closePath():e.lineTo(s,h.y)}e.lineTo(s,t.first().y),e.closePath(),e.clip()}function _o(e,t){const{line:s,target:n,property:i,color:o,scale:a,clip:r}=t,l=mm(s,n,i);for(const{source:c,target:u,start:h,end:d}of l){const{style:{backgroundColor:f=o}={}}=c,g=n!==!0;e.save(),e.fillStyle=f,$m(e,a,r,g&&Io(i,h,d)),e.beginPath();const p=!!s.pathSegment(e,c);let _;if(g){p?e.closePath():nl(e,n,d,i);const v=!!n.pathSegment(e,u,{move:p,reverse:!0});_=p&&v,_||nl(e,n,h,i)}e.closePath(),e.fill(_?"evenodd":"nonzero"),e.restore()}}function $m(e,t,s,n){const i=t.chart.chartArea,{property:o,start:a,end:r}=n||{};if(o==="x"||o==="y"){let l,c,u,h;o==="x"?(l=a,c=i.top,u=r,h=i.bottom):(l=i.left,c=a,u=i.right,h=r),e.beginPath(),s&&(l=Math.max(l,s.left),u=Math.min(u,s.right),c=Math.max(c,s.top),h=Math.min(h,s.bottom)),e.rect(l,c,u-l,h-c),e.clip()}}function nl(e,t,s,n){const i=t.interpolate(s,n);i&&e.lineTo(i.x,i.y)}var Em={id:"filler",afterDatasetsUpdate(e,t,s){const n=(e.data.datasets||[]).length,i=[];let o,a,r,l;for(a=0;a<n;++a)o=e.getDatasetMeta(a),r=o.dataset,l=null,r&&r.options&&r instanceof Ln&&(l={visible:e.isDatasetVisible(a),index:a,fill:ym(r,a,n),chart:e,axis:o.controller.options.indexAxis,scale:o.vScale,line:r}),o.$filler=l,i.push(l);for(a=0;a<n;++a)l=i[a],!(!l||l.fill===!1)&&(l.fill=vm(i,a,s.propagate))},beforeDraw(e,t,s){const n=s.drawTime==="beforeDraw",i=e.getSortedVisibleDatasetMetas(),o=e.chartArea;for(let a=i.length-1;a>=0;--a){const r=i[a].$filler;r&&(r.line.updateControlPoints(o,r.axis),n&&r.fill&&go(e.ctx,r,o))}},beforeDatasetsDraw(e,t,s){if(s.drawTime!=="beforeDatasetsDraw")return;const n=e.getSortedVisibleDatasetMetas();for(let i=n.length-1;i>=0;--i){const o=n[i].$filler;tl(o)&&go(e.ctx,o,e.chartArea)}},beforeDatasetDraw(e,t,s){const n=t.meta.$filler;!tl(n)||s.drawTime!=="beforeDatasetDraw"||go(e.ctx,n,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const il=(e,t)=>{let{boxHeight:s=t,boxWidth:n=t}=e;return e.usePointStyle&&(s=Math.min(s,t),n=e.pointStyleWidth||Math.min(n,t)),{boxWidth:n,boxHeight:s,itemHeight:Math.max(t,s)}},Fm=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class ol extends es{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,s,n){this.maxWidth=t,this.maxHeight=s,this._margins=n,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 s=xt(t.generateLabels,[this.chart],this)||[];t.filter&&(s=s.filter(n=>t.filter(n,this.chart.data))),t.sort&&(s=s.sort((n,i)=>t.sort(n,i,this.chart.data))),this.options.reverse&&s.reverse(),this.legendItems=s}fit(){const{options:t,ctx:s}=this;if(!t.display){this.width=this.height=0;return}const n=t.labels,i=Jt(n.font),o=i.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=il(n,o);let c,u;s.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(a,o,r,l)+10):(u=this.maxHeight,c=this._fitCols(a,i,r,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,s,n,i){const{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+r;let h=t;o.textAlign="left",o.textBaseline="middle";let d=-1,f=-u;return this.legendItems.forEach((g,p)=>{const _=n+s/2+o.measureText(g.text).width;(p===0||c[c.length-1]+_+2*r>a)&&(h+=u,c[c.length-(p>0?0:1)]=0,f+=u,d++),l[p]={left:0,top:f,row:d,width:_,height:i},c[c.length-1]+=_+r}),h}_fitCols(t,s,n,i){const{ctx:o,maxHeight:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=a-t;let h=r,d=0,f=0,g=0,p=0;return this.legendItems.forEach((_,v)=>{const{itemWidth:w,itemHeight:T}=Im(n,s,o,_,i);v>0&&f+T+2*r>u&&(h+=d+r,c.push({width:d,height:f}),g+=d+r,p++,d=f=0),l[v]={left:g,top:f,col:p,width:w,height:T},d=Math.max(d,w),f+=T+r}),h+=d,c.push({width:d,height:f}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:s,options:{align:n,labels:{padding:i},rtl:o}}=this,a=Es(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=ee(n,this.left+i,this.right-this.lineWidths[r]);for(const c of s)r!==c.row&&(r=c.row,l=ee(n,this.left+i,this.right-this.lineWidths[r])),c.top+=this.top+t+i,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+i}else{let r=0,l=ee(n,this.top+t+i,this.bottom-this.columnSizes[r].height);for(const c of s)c.col!==r&&(r=c.col,l=ee(n,this.top+t+i,this.bottom-this.columnSizes[r].height)),c.top=l,c.left+=this.left+i,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Ei(t,this),this._draw(),Fi(t)}}_draw(){const{options:t,columnSizes:s,lineWidths:n,ctx:i}=this,{align:o,labels:a}=t,r=Ct.color,l=Es(t.rtl,this.left,this.width),c=Jt(a.font),{padding:u}=a,h=c.size,d=h/2;let f;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:g,boxHeight:p,itemHeight:_}=il(a,h),v=function(z,D,P){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;i.save();const R=ot(P.lineWidth,1);if(i.fillStyle=ot(P.fillStyle,r),i.lineCap=ot(P.lineCap,"butt"),i.lineDashOffset=ot(P.lineDashOffset,0),i.lineJoin=ot(P.lineJoin,"miter"),i.lineWidth=R,i.strokeStyle=ot(P.strokeStyle,r),i.setLineDash(ot(P.lineDash,[])),a.usePointStyle){const U={radius:p*Math.SQRT2/2,pointStyle:P.pointStyle,rotation:P.rotation,borderWidth:R},$=l.xPlus(z,g/2),X=D+d;Gc(i,U,$,X,a.pointStyleWidth&&g)}else{const U=D+Math.max((h-p)/2,0),$=l.leftForLtr(z,g),X=$s(P.borderRadius);i.beginPath(),Object.values(X).some(nt=>nt!==0)?bi(i,{x:$,y:U,w:g,h:p,radius:X}):i.rect($,U,g,p),i.fill(),R!==0&&i.stroke()}i.restore()},w=function(z,D,P){mi(i,P.text,z,D+_/2,c,{strikethrough:P.hidden,textAlign:l.textAlign(P.textAlign)})},T=this.isHorizontal(),C=this._computeTitleHeight();T?f={x:ee(o,this.left+u,this.right-n[0]),y:this.top+u+C,line:0}:f={x:this.left+u,y:ee(o,this.top+C+u,this.bottom-s[0].height),line:0},nu(this.ctx,t.textDirection);const A=_+u;this.legendItems.forEach((z,D)=>{i.strokeStyle=z.fontColor,i.fillStyle=z.fontColor;const P=i.measureText(z.text).width,R=l.textAlign(z.textAlign||(z.textAlign=a.textAlign)),U=g+d+P;let $=f.x,X=f.y;l.setWidth(this.width),T?D>0&&$+U+u>this.right&&(X=f.y+=A,f.line++,$=f.x=ee(o,this.left+u,this.right-n[f.line])):D>0&&X+A>this.bottom&&($=f.x=$+s[f.line].width+u,f.line++,X=f.y=ee(o,this.top+C+u,this.bottom-s[f.line].height));const nt=l.x($);if(v(nt,X,z),$=fp(R,$+g+d,T?$+U:this.right,t.rtl),w(l.x($),X,z),T)f.x+=U+u;else if(typeof z.text!="string"){const ut=c.lineHeight;f.y+=Pu(z,ut)+u}else f.y+=A}),iu(this.ctx,t.textDirection)}drawTitle(){const t=this.options,s=t.title,n=Jt(s.font),i=de(s.padding);if(!s.display)return;const o=Es(t.rtl,this.left,this.width),a=this.ctx,r=s.position,l=n.size/2,c=i.top+l;let u,h=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),u=this.top+c,h=ee(t.align,h,this.right-d);else{const g=this.columnSizes.reduce((p,_)=>Math.max(p,_.height),0);u=c+ee(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const f=ee(r,h,h+d);a.textAlign=o.textAlign(Xc(r)),a.textBaseline="middle",a.strokeStyle=s.color,a.fillStyle=s.color,a.font=n.string,mi(a,s.text,f,u,n)}_computeTitleHeight(){const t=this.options.title,s=Jt(t.font),n=de(t.padding);return t.display?s.lineHeight+n.height:0}_getLegendItemAt(t,s){let n,i,o;if(Fe(t,this.left,this.right)&&Fe(s,this.top,this.bottom)){for(o=this.legendHitBoxes,n=0;n<o.length;++n)if(i=o[n],Fe(t,i.left,i.left+i.width)&&Fe(s,i.top,i.top+i.height))return this.legendItems[n]}return null}handleEvent(t){const s=this.options;if(!Vm(t.type,s))return;const n=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,o=Fm(i,n);i&&!o&&xt(s.onLeave,[t,i,this],this),this._hoveredItem=n,n&&!o&&xt(s.onHover,[t,n,this],this)}else n&&xt(s.onClick,[t,n,this],this)}}function Im(e,t,s,n,i){const o=jm(n,e,t,s),a=Bm(i,n,t.lineHeight);return{itemWidth:o,itemHeight:a}}function jm(e,t,s,n){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((o,a)=>o.length>a.length?o:a)),t+s.size/2+n.measureText(i).width}function Bm(e,t,s){let n=e;return typeof t.text!="string"&&(n=Pu(t,s)),n}function Pu(e,t){const s=e.text?e.text.length:0;return t*s}function Vm(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Rn={id:"legend",_element:ol,start(e,t,s){const n=e.legend=new ol({ctx:e.ctx,options:s,chart:e});Ge.configure(e,n,s),Ge.addBox(e,n)},stop(e){Ge.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,s){const n=e.legend;Ge.configure(e,n,s),n.options=s},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,s){const n=t.datasetIndex,i=s.chart;i.isDatasetVisible(n)?(i.hide(n),t.hidden=!0):(i.show(n),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:s,pointStyle:n,textAlign:i,color:o,useBorderRadius:a,borderRadius:r}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(s?0:void 0),u=de(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:n||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:a&&(r||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)}}};const en={average(e){if(!e.length)return!1;let t,s,n=new Set,i=0,o=0;for(t=0,s=e.length;t<s;++t){const r=e[t].element;if(r&&r.hasValue()){const l=r.tooltipPosition();n.add(l.x),i+=l.y,++o}}return o===0||n.size===0?!1:{x:[...n].reduce((r,l)=>r+l)/n.size,y:i/o}},nearest(e,t){if(!e.length)return!1;let s=t.x,n=t.y,i=Number.POSITIVE_INFINITY,o,a,r;for(o=0,a=e.length;o<a;++o){const l=e[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=zo(t,c);u<i&&(i=u,r=l)}}if(r){const l=r.tooltipPosition();s=l.x,n=l.y}return{x:s,y:n}}};function me(e,t){return t&&(Ot(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Ae(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
`)>-1?e.split(`
`):e}function Hm(e,t){const{element:s,datasetIndex:n,index:i}=t,o=e.getDatasetMeta(n).controller,{label:a,value:r}=o.getLabelAndValue(i);return{chart:e,label:a,parsed:o.getParsed(i),raw:e.data.datasets[n].data[i],formattedValue:r,dataset:o.getDataset(),dataIndex:i,datasetIndex:n,element:s}}function al(e,t){const s=e.chart.ctx,{body:n,footer:i,title:o}=e,{boxWidth:a,boxHeight:r}=t,l=Jt(t.bodyFont),c=Jt(t.titleFont),u=Jt(t.footerFont),h=o.length,d=i.length,f=n.length,g=de(t.padding);let p=g.height,_=0,v=n.reduce((C,A)=>C+A.before.length+A.lines.length+A.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,h&&(p+=h*c.lineHeight+(h-1)*t.titleSpacing+t.titleMarginBottom),v){const C=t.displayColors?Math.max(r,l.lineHeight):l.lineHeight;p+=f*C+(v-f)*l.lineHeight+(v-1)*t.bodySpacing}d&&(p+=t.footerMarginTop+d*u.lineHeight+(d-1)*t.footerSpacing);let w=0;const T=function(C){_=Math.max(_,s.measureText(C).width+w)};return s.save(),s.font=c.string,ft(e.title,T),s.font=l.string,ft(e.beforeBody.concat(e.afterBody),T),w=t.displayColors?a+2+t.boxPadding:0,ft(n,C=>{ft(C.before,T),ft(C.lines,T),ft(C.after,T)}),w=0,s.font=u.string,ft(e.footer,T),s.restore(),_+=g.width,{width:_,height:p}}function Wm(e,t){const{y:s,height:n}=t;return s<n/2?"top":s>e.height-n/2?"bottom":"center"}function Nm(e,t,s,n){const{x:i,width:o}=n,a=s.caretSize+s.caretPadding;if(e==="left"&&i+o+a>t.width||e==="right"&&i-o-a<0)return!0}function Km(e,t,s,n){const{x:i,width:o}=s,{width:a,chartArea:{left:r,right:l}}=e;let c="center";return n==="center"?c=i<=(r+l)/2?"left":"right":i<=o/2?c="left":i>=a-o/2&&(c="right"),Nm(c,e,t,s)&&(c="center"),c}function rl(e,t,s){const n=s.yAlign||t.yAlign||Wm(e,s);return{xAlign:s.xAlign||t.xAlign||Km(e,t,s,n),yAlign:n}}function Um(e,t){let{x:s,width:n}=e;return t==="right"?s-=n:t==="center"&&(s-=n/2),s}function Ym(e,t,s){let{y:n,height:i}=e;return t==="top"?n+=s:t==="bottom"?n-=i+s:n-=i/2,n}function ll(e,t,s,n){const{caretSize:i,caretPadding:o,cornerRadius:a}=e,{xAlign:r,yAlign:l}=s,c=i+o,{topLeft:u,topRight:h,bottomLeft:d,bottomRight:f}=$s(a);let g=Um(t,r);const p=Ym(t,l,c);return l==="center"?r==="left"?g+=c:r==="right"&&(g-=c):r==="left"?g-=Math.max(u,d)+i:r==="right"&&(g+=Math.max(h,f)+i),{x:Bt(g,0,n.width-t.width),y:Bt(p,0,n.height-t.height)}}function Zn(e,t,s){const n=de(s.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-n.right:e.x+n.left}function cl(e){return me([],Ae(e))}function Xm(e,t,s){return vs(e,{tooltip:t,tooltipItems:s,type:"tooltip"})}function ul(e,t){const s=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return s?e.override(s):e}const Au={beforeTitle:De,title(e){if(e.length>0){const t=e[0],s=t.chart.data.labels,n=s?s.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex<n)return s[t.dataIndex]}return""},afterTitle:De,beforeBody:De,beforeLabel:De,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 s=e.formattedValue;return dt(s)||(t+=s),t},labelColor(e){const s=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:s.borderColor,backgroundColor:s.backgroundColor,borderWidth:s.borderWidth,borderDash:s.borderDash,borderDashOffset:s.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const s=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:s.pointStyle,rotation:s.rotation}},afterLabel:De,afterBody:De,beforeFooter:De,footer:De,afterFooter:De};function Ut(e,t,s,n){const i=e[t].call(s,n);return typeof i>"u"?Au[t].call(s,n):i}class hl extends es{static positioners=en;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 s=this.chart,n=this.options.setContext(this.getContext()),i=n.enabled&&s.options.animation&&n.animations,o=new cu(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=Xm(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,s){const{callbacks:n}=s,i=Ut(n,"beforeTitle",this,t),o=Ut(n,"title",this,t),a=Ut(n,"afterTitle",this,t);let r=[];return r=me(r,Ae(i)),r=me(r,Ae(o)),r=me(r,Ae(a)),r}getBeforeBody(t,s){return cl(Ut(s.callbacks,"beforeBody",this,t))}getBody(t,s){const{callbacks:n}=s,i=[];return ft(t,o=>{const a={before:[],lines:[],after:[]},r=ul(n,o);me(a.before,Ae(Ut(r,"beforeLabel",this,o))),me(a.lines,Ut(r,"label",this,o)),me(a.after,Ae(Ut(r,"afterLabel",this,o))),i.push(a)}),i}getAfterBody(t,s){return cl(Ut(s.callbacks,"afterBody",this,t))}getFooter(t,s){const{callbacks:n}=s,i=Ut(n,"beforeFooter",this,t),o=Ut(n,"footer",this,t),a=Ut(n,"afterFooter",this,t);let r=[];return r=me(r,Ae(i)),r=me(r,Ae(o)),r=me(r,Ae(a)),r}_createItems(t){const s=this._active,n=this.chart.data,i=[],o=[],a=[];let r=[],l,c;for(l=0,c=s.length;l<c;++l)r.push(Hm(this.chart,s[l]));return t.filter&&(r=r.filter((u,h,d)=>t.filter(u,h,d,n))),t.itemSort&&(r=r.sort((u,h)=>t.itemSort(u,h,n))),ft(r,u=>{const h=ul(t.callbacks,u);i.push(Ut(h,"labelColor",this,u)),o.push(Ut(h,"labelPointStyle",this,u)),a.push(Ut(h,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=r,r}update(t,s){const n=this.options.setContext(this.getContext()),i=this._active;let o,a=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const r=en[n.position].call(this,i,this._eventPosition);a=this._createItems(n),this.title=this.getTitle(a,n),this.beforeBody=this.getBeforeBody(a,n),this.body=this.getBody(a,n),this.afterBody=this.getAfterBody(a,n),this.footer=this.getFooter(a,n);const l=this._size=al(this,n),c=Object.assign({},r,l),u=rl(this.chart,n,c),h=ll(n,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:r.x,caretY:r.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:s})}drawCaret(t,s,n,i){const o=this.getCaretPosition(t,n,i);s.lineTo(o.x1,o.y1),s.lineTo(o.x2,o.y2),s.lineTo(o.x3,o.y3)}getCaretPosition(t,s,n){const{xAlign:i,yAlign:o}=this,{caretSize:a,cornerRadius:r}=n,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:h}=$s(r),{x:d,y:f}=t,{width:g,height:p}=s;let _,v,w,T,C,A;return o==="center"?(C=f+p/2,i==="left"?(_=d,v=_-a,T=C+a,A=C-a):(_=d+g,v=_+a,T=C-a,A=C+a),w=_):(i==="left"?v=d+Math.max(l,u)+a:i==="right"?v=d+g-Math.max(c,h)-a:v=this.caretX,o==="top"?(T=f,C=T-a,_=v-a,w=v+a):(T=f+p,C=T+a,_=v+a,w=v-a),A=T),{x1:_,x2:v,x3:w,y1:T,y2:C,y3:A}}drawTitle(t,s,n){const i=this.title,o=i.length;let a,r,l;if(o){const c=Es(n.rtl,this.x,this.width);for(t.x=Zn(this,n.titleAlign,n),s.textAlign=c.textAlign(n.titleAlign),s.textBaseline="middle",a=Jt(n.titleFont),r=n.titleSpacing,s.fillStyle=n.titleColor,s.font=a.string,l=0;l<o;++l)s.fillText(i[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r,l+1===o&&(t.y+=n.titleMarginBottom-r)}}_drawColorBox(t,s,n,i,o){const a=this.labelColors[n],r=this.labelPointStyles[n],{boxHeight:l,boxWidth:c}=o,u=Jt(o.bodyFont),h=Zn(this,"left",o),d=i.x(h),f=l<u.lineHeight?(u.lineHeight-l)/2:0,g=s.y+f;if(o.usePointStyle){const p={radius:Math.min(c,l)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},_=i.leftForLtr(d,c)+c/2,v=g+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Ro(t,p,_,v),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Ro(t,p,_,v)}else{t.lineWidth=at(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const p=i.leftForLtr(d,c),_=i.leftForLtr(i.xPlus(d,1),c-2),v=$s(a.borderRadius);Object.values(v).some(w=>w!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,bi(t,{x:p,y:g,w:c,h:l,radius:v}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),bi(t,{x:_,y:g+1,w:c-2,h:l-2,radius:v}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(p,g,c,l),t.strokeRect(p,g,c,l),t.fillStyle=a.backgroundColor,t.fillRect(_,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,s,n){const{body:i}=this,{bodySpacing:o,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:c,boxPadding:u}=n,h=Jt(n.bodyFont);let d=h.lineHeight,f=0;const g=Es(n.rtl,this.x,this.width),p=function(P){s.fillText(P,g.x(t.x+f),t.y+d/2),t.y+=d+o},_=g.textAlign(a);let v,w,T,C,A,z,D;for(s.textAlign=a,s.textBaseline="middle",s.font=h.string,t.x=Zn(this,_,n),s.fillStyle=n.bodyColor,ft(this.beforeBody,p),f=r&&_!=="right"?a==="center"?c/2+u:c+2+u:0,C=0,z=i.length;C<z;++C){for(v=i[C],w=this.labelTextColors[C],s.fillStyle=w,ft(v.before,p),T=v.lines,r&&T.length&&(this._drawColorBox(s,t,C,g,n),d=Math.max(h.lineHeight,l)),A=0,D=T.length;A<D;++A)p(T[A]),d=h.lineHeight;ft(v.after,p)}f=0,d=h.lineHeight,ft(this.afterBody,p),t.y-=o}drawFooter(t,s,n){const i=this.footer,o=i.length;let a,r;if(o){const l=Es(n.rtl,this.x,this.width);for(t.x=Zn(this,n.footerAlign,n),t.y+=n.footerMarginTop,s.textAlign=l.textAlign(n.footerAlign),s.textBaseline="middle",a=Jt(n.footerFont),s.fillStyle=n.footerColor,s.font=a.string,r=0;r<o;++r)s.fillText(i[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+n.footerSpacing}}drawBackground(t,s,n,i){const{xAlign:o,yAlign:a}=this,{x:r,y:l}=t,{width:c,height:u}=n,{topLeft:h,topRight:d,bottomLeft:f,bottomRight:g}=$s(i.cornerRadius);s.fillStyle=i.backgroundColor,s.strokeStyle=i.borderColor,s.lineWidth=i.borderWidth,s.beginPath(),s.moveTo(r+h,l),a==="top"&&this.drawCaret(t,s,n,i),s.lineTo(r+c-d,l),s.quadraticCurveTo(r+c,l,r+c,l+d),a==="center"&&o==="right"&&this.drawCaret(t,s,n,i),s.lineTo(r+c,l+u-g),s.quadraticCurveTo(r+c,l+u,r+c-g,l+u),a==="bottom"&&this.drawCaret(t,s,n,i),s.lineTo(r+f,l+u),s.quadraticCurveTo(r,l+u,r,l+u-f),a==="center"&&o==="left"&&this.drawCaret(t,s,n,i),s.lineTo(r,l+h),s.quadraticCurveTo(r,l,r+h,l),s.closePath(),s.fill(),i.borderWidth>0&&s.stroke()}_updateAnimationTarget(t){const s=this.chart,n=this.$animations,i=n&&n.x,o=n&&n.y;if(i||o){const a=en[t.position].call(this,this._active,this._eventPosition);if(!a)return;const r=this._size=al(this,t),l=Object.assign({},a,this._size),c=rl(s,t,l),u=ll(t,l,c,s);(i._to!==u.x||o._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=r.width,this.height=r.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const s=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(s);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const a=de(s.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;s.enabled&&r&&(t.save(),t.globalAlpha=n,this.drawBackground(o,t,i,s),nu(t,s.textDirection),o.y+=a.top,this.drawTitle(o,t,s),this.drawBody(o,t,s),this.drawFooter(o,t,s),iu(t,s.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,s){const n=this._active,i=t.map(({datasetIndex:r,index:l})=>{const c=this.chart.getDatasetMeta(r);if(!c)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:c.data[l],index:l}}),o=!pi(n,i),a=this._positionChanged(i,s);(o||a)&&(this._active=i,this._eventPosition=s,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,s,n=!0){if(s&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],a=this._getActiveElements(t,o,s,n),r=this._positionChanged(a,t),l=s||!pi(a,o)||r;return l&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,s))),l}_getActiveElements(t,s,n,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return s.filter(r=>this.chart.data.datasets[r.datasetIndex]&&this.chart.getDatasetMeta(r.datasetIndex).controller.getParsed(r.index)!==void 0);const a=this.chart.getElementsAtEventForMode(t,o.mode,o,n);return o.reverse&&a.reverse(),a}_positionChanged(t,s){const{caretX:n,caretY:i,options:o}=this,a=en[o.position].call(this,t,s);return a!==!1&&(n!==a.x||i!==a.y)}}var $n={id:"tooltip",_element:hl,positioners:en,afterInit(e,t,s){s&&(e.tooltip=new hl({chart:e,options:s}))},beforeUpdate(e,t,s){e.tooltip&&e.tooltip.initialize(s)},reset(e,t,s){e.tooltip&&e.tooltip.initialize(s)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const s={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...s,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",s)}},afterEvent(e,t){if(e.tooltip){const s=t.replay;e.tooltip.handleEvent(t.event,s,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:Au},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 qm=(e,t,s,n)=>(typeof t=="string"?(s=e.push(t)-1,n.unshift({index:s,label:t})):isNaN(t)&&(s=null),s);function Gm(e,t,s,n){const i=e.indexOf(t);if(i===-1)return qm(e,t,s,n);const o=e.lastIndexOf(t);return i!==o?s:i}const Zm=(e,t)=>e===null?null:Bt(Math.round(e),0,t);function dl(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Hi extends ys{static id="category";static defaults={ticks:{callback:dl}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const s=this._addedLabels;if(s.length){const n=this.getLabels();for(const{index:i,label:o}of s)n[i]===o&&n.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,s){if(dt(t))return null;const n=this.getLabels();return s=isFinite(s)&&n[s]===t?s:Gm(n,t,ot(s,t),this._addedLabels),Zm(s,n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:s}=this.getUserBounds();let{min:n,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(n=0),s||(i=this.getLabels().length-1)),this.min=n,this.max=i}buildTicks(){const t=this.min,s=this.max,n=this.options.offset,i=[];let o=this.getLabels();o=t===0&&s===o.length-1?o:o.slice(t,s+1),this._valueRange=Math.max(o.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let a=t;a<=s;a++)i.push({value:a});return i}getLabelForValue(t){return dl.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 s=this.ticks;return t<0||t>s.length-1?null:this.getPixelForValue(s[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Jm(e,t){const s=[],{bounds:i,step:o,min:a,max:r,precision:l,count:c,maxTicks:u,maxDigits:h,includeBounds:d}=e,f=o||1,g=u-1,{min:p,max:_}=t,v=!dt(a),w=!dt(r),T=!dt(c),C=(_-p)/(h+1);let A=lr((_-p)/g/f)*f,z,D,P,R;if(A<1e-14&&!v&&!w)return[{value:p},{value:_}];R=Math.ceil(_/A)-Math.floor(p/A),R>g&&(A=lr(R*A/g/f)*f),dt(l)||(z=Math.pow(10,l),A=Math.ceil(A*z)/z),i==="ticks"?(D=Math.floor(p/A)*A,P=Math.ceil(_/A)*A):(D=p,P=_),v&&w&&o&&op((r-a)/o,A/1e3)?(R=Math.round(Math.min((r-a)/A,u)),A=(r-a)/R,D=a,P=r):T?(D=v?a:D,P=w?r:P,R=c-1,A=(P-D)/R):(R=(P-D)/A,hn(R,Math.round(R),A/1e3)?R=Math.round(R):R=Math.ceil(R));const U=Math.max(cr(A),cr(D));z=Math.pow(10,dt(l)?U:l),D=Math.round(D*z)/z,P=Math.round(P*z)/z;let $=0;for(v&&(d&&D!==a?(s.push({value:a}),D<a&&$++,hn(Math.round((D+$*A)*z)/z,a,fl(a,C,e))&&$++):D<a&&$++);$<R;++$){const X=Math.round((D+$*A)*z)/z;if(w&&X>r)break;s.push({value:X})}return w&&d&&P!==r?s.length&&hn(s[s.length-1].value,r,fl(r,C,e))?s[s.length-1].value=r:s.push({value:r}):(!w||P===r)&&s.push({value:P}),s}function fl(e,t,{horizontal:s,minRotation:n}){const i=Ee(n),o=(s?Math.sin(i):Math.cos(i))||.001,a=.75*t*(""+e).length;return Math.min(t/o,a)}class Ou extends ys{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,s){return dt(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:s,maxDefined:n}=this.getUserBounds();let{min:i,max:o}=this;const a=l=>i=s?i:l,r=l=>o=n?o:l;if(t){const l=Se(i),c=Se(o);l<0&&c<0?r(0):l>0&&c>0&&a(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);r(o+l),t||a(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:s,stepSize:n}=t,i;return n?(i=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),s=s||11),s&&(i=Math.min(s,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,s=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const i={maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:s.precision,step:s.stepSize,count:s.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:s.minRotation||0,includeBounds:s.includeBounds!==!1},o=this._range||this,a=Jm(i,o);return t.bounds==="ticks"&&Hc(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let s=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const i=(n-s)/Math.max(t.length-1,1)/2;s-=i,n+=i}this._startValue=s,this._endValue=n,this._valueRange=n-s}getLabelForValue(t){return $i(t,this.chart.options.locale,this.options.ticks.format)}}class Wi extends Ou{static id="linear";static defaults={ticks:{callback:ca.formatters.numeric}};determineDataLimits(){const{min:t,max:s}=this.getMinMax(!0);this.min=Pt(t)?t:0,this.max=Pt(s)?s:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),s=t?this.width:this.height,n=Ee(this.options.ticks.minRotation),i=(t?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(s/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const Tn=e=>Math.floor(Xe(e)),ls=(e,t)=>Math.pow(10,Tn(e)+t);function pl(e){return e/Math.pow(10,Tn(e))===1}function gl(e,t,s){const n=Math.pow(10,s),i=Math.floor(e/n);return Math.ceil(t/n)-i}function Qm(e,t){const s=t-e;let n=Tn(s);for(;gl(e,t,n)>10;)n++;for(;gl(e,t,n)<10;)n--;return Math.min(n,Tn(e))}function tb(e,{min:t,max:s}){t=se(e.min,t);const n=[],i=Tn(t);let o=Qm(t,s),a=o<0?Math.pow(10,Math.abs(o)):1;const r=Math.pow(10,o),l=i>o?Math.pow(10,i):0,c=Math.round((t-l)*a)/a,u=Math.floor((t-l)/r/10)*r*10;let h=Math.floor((c-u)/Math.pow(10,o)),d=se(e.min,Math.round((l+u+h*Math.pow(10,o))*a)/a);for(;d<s;)n.push({value:d,major:pl(d),significand:h}),h>=10?h=h<15?15:20:h++,h>=20&&(o++,h=2,a=o>=0?1:a),d=Math.round((l+u+h*Math.pow(10,o))*a)/a;const f=se(e.max,d);return n.push({value:f,major:pl(f),significand:h}),n}class zu extends ys{static id="logarithmic";static defaults={ticks:{callback:ca.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,s){const n=Ou.prototype.parse.apply(this,[t,s]);if(n===0){this._zero=!0;return}return Pt(n)&&n>0?n:null}determineDataLimits(){const{min:t,max:s}=this.getMinMax(!0);this.min=Pt(t)?Math.max(0,t):null,this.max=Pt(s)?Math.max(0,s):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Pt(this._userMin)&&(this.min=t===ls(this.min,0)?ls(this.min,-1):ls(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:s}=this.getUserBounds();let n=this.min,i=this.max;const o=r=>n=t?n:r,a=r=>i=s?i:r;n===i&&(n<=0?(o(1),a(10)):(o(ls(n,-1)),a(ls(i,1)))),n<=0&&o(ls(i,-1)),i<=0&&a(ls(n,1)),this.min=n,this.max=i}buildTicks(){const t=this.options,s={min:this._userMin,max:this._userMax},n=tb(s,this);return t.bounds==="ticks"&&Hc(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(t){return t===void 0?"0":$i(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Xe(t),this._valueRange=Xe(this.max)-Xe(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Xe(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const s=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+s*this._valueRange)}}const Ni={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(Ni);function _l(e,t){return e-t}function ml(e,t){if(dt(t))return null;const s=e._adapter,{parser:n,round:i,isoWeekday:o}=e._parseOpts;let a=t;return typeof n=="function"&&(a=n(a)),Pt(a)||(a=typeof n=="string"?s.parse(a,n):s.parse(a)),a===null?null:(i&&(a=i==="week"&&(wn(o)||o===!0)?s.startOf(a,"isoWeek",o):s.startOf(a,i)),+a)}function bl(e,t,s,n){const i=Zt.length;for(let o=Zt.indexOf(e);o<i-1;++o){const a=Ni[Zt[o]],r=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((s-t)/(r*a.size))<=n)return Zt[o]}return Zt[i-1]}function eb(e,t,s,n,i){for(let o=Zt.length-1;o>=Zt.indexOf(s);o--){const a=Zt[o];if(Ni[a].common&&e._adapter.diff(i,n,a)>=t-1)return a}return Zt[s?Zt.indexOf(s):0]}function sb(e){for(let t=Zt.indexOf(e)+1,s=Zt.length;t<s;++t)if(Ni[Zt[t]].common)return Zt[t]}function vl(e,t,s){if(!s)e[t]=!0;else if(s.length){const{lo:n,hi:i}=ra(s,t),o=s[n]>=t?s[n]:s[i];e[o]=!0}}function nb(e,t,s,n){const i=e._adapter,o=+i.startOf(t[0].value,n),a=t[t.length-1].value;let r,l;for(r=o;r<=a;r=+i.add(r,1,n))l=s[r],l>=0&&(t[l].major=!0);return t}function yl(e,t,s){const n=[],i={},o=t.length;let a,r;for(a=0;a<o;++a)r=t[a],i[r]=a,n.push({value:r,major:!1});return o===0||!s?n:nb(e,n,i,s)}class xl extends ys{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};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,s={}){const n=t.time||(t.time={}),i=this._adapter=new Vg._date(t.adapters.date);i.init(s),un(n.displayFormats,i.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=s.normalized}parse(t,s){return t===void 0?null:ml(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,s=this._adapter,n=t.time.unit||"day";let{min:i,max:o,minDefined:a,maxDefined:r}=this.getUserBounds();function l(c){!a&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!r&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!a||!r)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=Pt(i)&&!isNaN(i)?i:+s.startOf(Date.now(),n),o=Pt(o)&&!isNaN(o)?o:+s.endOf(Date.now(),n)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let s=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(s=t[0],n=t[t.length-1]),{min:s,max:n}}buildTicks(){const t=this.options,s=t.time,n=t.ticks,i=n.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const o=this.min,a=this.max,r=up(i,o,a);return this._unit=s.unit||(n.autoSkip?bl(s.minUnit,this.min,this.max,this._getLabelCapacity(o)):eb(this,r.length,s.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:sb(this._unit),this.initOffsets(i),t.reverse&&r.reverse(),yl(this,r,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let s=0,n=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?s=1-i:s=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?n=o:n=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;s=Bt(s,0,a),n=Bt(n,0,a),this._offsets={start:s,end:n,factor:1/(s+1+n)}}_generate(){const t=this._adapter,s=this.min,n=this.max,i=this.options,o=i.time,a=o.unit||bl(o.minUnit,s,n,this._getLabelCapacity(s)),r=ot(i.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=wn(l)||l===!0,u={};let h=s,d,f;if(c&&(h=+t.startOf(h,"isoWeek",l)),h=+t.startOf(h,c?"day":a),t.diff(n,s,a)>1e5*r)throw new Error(s+" and "+n+" are too far apart with stepSize of "+r+" "+a);const g=i.ticks.source==="data"&&this.getDataTimestamps();for(d=h,f=0;d<n;d=+t.add(d,r,a),f++)vl(u,d,g);return(d===n||i.bounds==="ticks"||f===1)&&vl(u,d,g),Object.keys(u).sort(_l).map(p=>+p)}getLabelForValue(t){const s=this._adapter,n=this.options.time;return n.tooltipFormat?s.format(t,n.tooltipFormat):s.format(t,n.displayFormats.datetime)}format(t,s){const i=this.options.time.displayFormats,o=this._unit,a=s||i[o];return this._adapter.format(t,a)}_tickFormatFunction(t,s,n,i){const o=this.options,a=o.ticks.callback;if(a)return xt(a,[t,s,n],this);const r=o.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&r[l],h=c&&r[c],d=n[s],f=c&&h&&d&&d.major;return this._adapter.format(t,i||(f?h:u))}generateTickLabels(t){let s,n,i;for(s=0,n=t.length;s<n;++s)i=t[s],i.label=this._tickFormatFunction(i.value,s,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const s=this._offsets,n=this.getDecimalForValue(t);return this.getPixelForDecimal((s.start+n)*s.factor)}getValueForPixel(t){const s=this._offsets,n=this.getDecimalForPixel(t)/s.factor-s.end;return this.min+n*(this.max-this.min)}_getLabelSize(t){const s=this.options.ticks,n=this.ctx.measureText(t).width,i=Ee(this.isHorizontal()?s.maxRotation:s.minRotation),o=Math.cos(i),a=Math.sin(i),r=this._resolveTickFontOptions(0).size;return{w:n*o+r*a,h:n*a+r*o}}_getLabelCapacity(t){const s=this.options.time,n=s.displayFormats,i=n[s.unit]||n.millisecond,o=this._tickFormatFunction(t,0,yl(this,[t],this._majorUnit),i),a=this._getLabelSize(o),r=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return r>0?r:1}getDataTimestamps(){let t=this._cache.data||[],s,n;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(s=0,n=i.length;s<n;++s)t=t.concat(i[s].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let s,n;if(t.length)return t;const i=this.getLabels();for(s=0,n=i.length;s<n;++s)t.push(ml(this,i[s]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Kc(t.sort(_l))}}function Jn(e,t,s){let n=0,i=e.length-1,o,a,r,l;s?(t>=e[n].pos&&t<=e[i].pos&&({lo:n,hi:i}=ds(e,"pos",t)),{pos:o,time:r}=e[n],{pos:a,time:l}=e[i]):(t>=e[n].time&&t<=e[i].time&&({lo:n,hi:i}=ds(e,"time",t)),{time:o,pos:r}=e[n],{time:a,pos:l}=e[i]);const c=a-o;return c?r+(l-r)*(t-o)/c:r}class q1 extends xl{static id="timeseries";static defaults=xl.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),s=this._table=this.buildLookupTable(t);this._minPos=Jn(s,this.min),this._tableRange=Jn(s,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:s,max:n}=this,i=[],o=[];let a,r,l,c,u;for(a=0,r=t.length;a<r;++a)c=t[a],c>=s&&c<=n&&i.push(c);if(i.length<2)return[{time:s,pos:0},{time:n,pos:1}];for(a=0,r=i.length;a<r;++a)u=i[a+1],l=i[a-1],c=i[a],Math.round((u+l)/2)!==c&&o.push({time:c,pos:a/(r-1)});return o}_generate(){const t=this.min,s=this.max;let n=super.getDataTimestamps();return(!n.includes(t)||!n.length)&&n.splice(0,0,t),(!n.includes(s)||n.length===1)&&n.push(s),n.sort((i,o)=>i-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const s=this.getDataTimestamps(),n=this.getLabelTimestamps();return s.length&&n.length?t=this.normalize(s.concat(n)):t=s.length?s:n,t=this._cache.all=t,t}getDecimalForValue(t){return(Jn(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const s=this._offsets,n=this.getDecimalForPixel(t)/s.factor-s.end;return Jn(this._table,n*this._tableRange+this._minPos,!0)}}const Lu={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},ib={ariaLabel:{type:String},ariaDescribedby:{type:String}},ob={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...Lu,...ib},ab=zc[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function Ts(e){return Pn(e)?lt(e):e}function rb(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return Pn(t)?new Proxy(e,{}):e}function lb(e,t){const s=e.options;s&&t&&Object.assign(s,t)}function Ru(e,t){e.labels=t}function $u(e,t,s){const n=[];e.datasets=t.map(i=>{const o=e.datasets.find(a=>a[s]===i[s]);return!o||!i.data||n.includes(o)?{...i}:(n.push(o),Object.assign(o,i),o)})}function cb(e,t){const s={labels:[],datasets:[]};return Ru(s,e.labels),$u(s,e.datasets,t),s}const ub=Lt({props:ob,setup(e,t){let{expose:s,slots:n}=t;const i=kt(null),o=Gl(null);s({chart:o});const a=()=>{if(!i.value)return;const{type:c,data:u,options:h,plugins:d,datasetIdKey:f}=e,g=cb(u,f),p=rb(g,u);o.value=new We(i.value,{type:c,data:p,options:{...h},plugins:d})},r=()=>{const c=lt(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 Kt(a),Oi(r),an([()=>e.options,()=>e.data],(c,u)=>{let[h,d]=c,[f,g]=u;const p=lt(o.value);if(!p)return;let _=!1;if(h){const v=Ts(h),w=Ts(f);v&&v!==w&&(lb(p,v),_=!0)}if(d){const v=Ts(d.labels),w=Ts(g.labels),T=Ts(d.datasets),C=Ts(g.datasets);v!==w&&(Ru(p.config.data,v),_=!0),T&&T!==C&&($u(p.config.data,T,e.datasetIdKey),_=!0)}_&&tc(()=>{l(p)})},{deep:!0}),()=>Po("canvas",{role:"img","aria-label":e.ariaLabel,"aria-describedby":e.ariaDescribedby,ref:i},[Po("p",{},[n.default?n.default():""])])}});function ba(e,t){return We.register(t),Lt({props:Lu,setup(s,n){let{expose:i}=n;const o=Gl(null),a=r=>{o.value=r?.chart};return i({chart:o}),()=>Po(ub,ab({ref:a},{type:e,...s}))}})}const Eu=ba("bar",du),hb=ba("doughnut",Bg),db=ba("line",fu),fb={class:"hbar-chart-wrapper"},pb=Lt({__name:"HBarChart",props:{labels:{},values:{},colors:{default:()=>["#3b82f6","#8b5cf6","#06b6d4","#f59e0b","#ef4444","#10b981","#ec4899","#f97316","#14b8a6","#6366f1"]},showValues:{type:Boolean,default:!0},formatValue:{type:Function,default:e=>e.toLocaleString()},enableLogToggle:{type:Boolean,default:!1},scaleMode:{default:"linear"},tooltipExtra:{}},setup(e){We.register(Hi,Wi,zu,ma,$n,Rn);const t=e,s=kt(t.scaleMode);function n(){s.value=s.value==="linear"?"logarithmic":"linear"}function i(c){return getComputedStyle(document.documentElement).getPropertyValue(c).trim()}const o=kt({text:"#a1a1aa",grid:"#27272a"});function a(){o.value={text:i("--text-secondary")||"#a1a1aa",grid:i("--border-color")||"#27272a"}}Kt(a),Kt(()=>{new MutationObserver(a).observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})});const r=E(()=>({labels:t.labels,datasets:[{data:t.values,backgroundColor:t.labels.map((c,u)=>t.colors[u%t.colors.length]),borderRadius:4,barThickness:22,maxBarThickness:28}]})),l=E(()=>({indexAxis:"y",responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"rgba(0,0,0,0.85)",titleFont:{size:13},bodyFont:{size:12},padding:10,cornerRadius:8,callbacks:{label:c=>{const h=[t.formatValue(c.raw)];return t.tooltipExtra&&t.tooltipExtra[c.dataIndex]&&h.push(...t.tooltipExtra[c.dataIndex]),h}}}},scales:{x:{type:s.value,grid:{color:o.value.grid,lineWidth:.5},ticks:{color:o.value.text,font:{size:11},callback:c=>typeof c=="number"&&c>=1e3?(c/1e3).toFixed(0)+"K":c},border:{display:!1}},y:{grid:{display:!1},ticks:{color:o.value.text,font:{size:12,weight:"bold"}},border:{display:!1}}}}));return(c,u)=>(V(),W("div",fb,[e.enableLogToggle?(V(),W("button",{key:0,class:"scale-toggle",onClick:n},k(s.value==="linear"?"Log":"Linear"),1)):rt("",!0),m("div",{class:"hbar-chart-container",style:qt({height:Math.max(e.labels.length*36,120)+"px"})},[Z(S(Eu),{data:r.value,options:l.value},null,8,["data","options"])],4)]))}}),Fs=Ft(pb,[["__scopeId","data-v-d08428d6"]]),gb={class:"doughnut-chart-container"},_b=Lt({__name:"DoughnutChart",props:{labels:{},values:{},colors:{default:()=>["#3b82f6","#8b5cf6","#06b6d4","#f59e0b","#ef4444","#10b981"]},centerText:{default:""},centerSubText:{default:""},formatValue:{type:Function,default:e=>"$"+e.toFixed(2)}},setup(e){We.register(sm,$n,Rn);const t=e;function s(c){return getComputedStyle(document.documentElement).getPropertyValue(c).trim()}const n=kt({text:"#fafafa",textSec:"#a1a1aa"});function i(){n.value={text:s("--text-primary")||"#fafafa",textSec:s("--text-secondary")||"#a1a1aa"}}Kt(i),Kt(()=>{new MutationObserver(i).observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})});const o=E(()=>t.values.reduce((c,u)=>c+u,0)),a=E(()=>({labels:t.labels,datasets:[{data:t.values,backgroundColor:t.colors.slice(0,t.labels.length),borderWidth:0,hoverOffset:6}]})),r=E(()=>({responsive:!0,maintainAspectRatio:!1,cutout:"65%",plugins:{legend:{position:"bottom",labels:{color:n.value.textSec,font:{size:12},padding:16,usePointStyle:!0,pointStyleWidth:10}},tooltip:{backgroundColor:"rgba(0,0,0,0.85)",titleFont:{size:13},bodyFont:{size:12},padding:10,cornerRadius:8,callbacks:{label:c=>{const u=t.formatValue(c.raw),h=(c.raw/o.value*100).toFixed(1);return`${c.label}: ${u} (${h}%)`}}}}})),l={id:"centerText",afterDraw(c){if(!t.centerText)return;const{ctx:u,chartArea:h}=c,d=(h.left+h.right)/2,f=(h.top+h.bottom)/2;u.save(),u.textAlign="center",u.textBaseline="middle",u.font="bold 1.3rem Inter, sans-serif",u.fillStyle=n.value.text;const g=t.centerSubText?-10:0;u.fillText(t.centerText,d,f+g),t.centerSubText&&(u.font="0.7rem Inter, sans-serif",u.fillStyle=n.value.textSec,u.fillText(t.centerSubText,d,f+12)),u.restore()}};return(c,u)=>(V(),W("div",gb,[Z(S(hb),{data:a.value,options:r.value,plugins:[l]},null,8,["data","options","plugins"])]))}}),mb=Ft(_b,[["__scopeId","data-v-a0f56f1f"]]);function bb(){const e=[],t=new Date("2026-04-02"),s=new Date("2026-01-01");let i=42;function o(){return i=i*1103515245+12345&2147483647,i/2147483647}for(let a=new Date(s);a<=t;a.setDate(a.getDate()+1)){const r=a.toISOString().slice(0,10),l=a.getDay();if(o()<.25){e.push({date:r,turns:0,cost:0,sessions:0});continue}const u=l===0||l===6?1.5:1,h=Math.floor(o()*120*u)+5,d=o()>.9?3:1,f=Math.floor(h*d),g=.08+o()*.25,p=Math.round(f*g*100)/100,_=Math.max(1,Math.floor(f/(15+o()*30)));e.push({date:r,turns:f,cost:p,sessions:_})}return e}function vb(){return{overview:{total_sessions:142,total_turns:8547,total_agent_turns:4359,total_output_tokens:2134567,total_context_tokens:891234567,total_cost:1595.42,avg_cache_hit_rate:87.3,output_ratio:.24,cost_per_turn:.187,tokens_per_output_turn:1245,cache_savings:{total_saved:8503.1,savings_pct:84.2},subscription_value:{monthly_price:200,api_equivalent:1595.42,value_multiplier:7.98},cost_by_category:{input_cost:6.06,output_cost:207.34,cache_write_cost:441.23,cache_read_cost:940.79},models:[{name:"claude-opus-4-6",output_tokens:18e5,turns:6200,cost:1459.12},{name:"claude-sonnet-4",output_tokens:2e5,turns:1800,cost:98.45},{name:"claude-haiku-3.5",output_tokens:134567,turns:547,cost:18.32}],top_tools:[{name:"Bash",count:6274},{name:"Read",count:3891},{name:"Edit",count:2456},{name:"Write",count:1823},{name:"Grep",count:1567},{name:"Glob",count:987},{name:"ToolSearch",count:238}],sessions:[{session_id:"abc123",project:"cc-token-analyzer",first_timestamp:"2025-12-01T10:30:00Z",duration_minutes:45.2,model:"claude-opus-4-6",turn_count:87,agentTurnCount:42,output_tokens:45e3,context_tokens:12345678,max_context:89e4,cache_hit_rate:91.2,cost:62.39,output_ratio:.36,cost_per_turn:.717},{session_id:"def456",project:"my-web-app",first_timestamp:"2025-12-02T14:15:00Z",duration_minutes:22.8,model:"claude-sonnet-4",turn_count:34,agentTurnCount:12,output_tokens:18e3,context_tokens:4567890,max_context:45e4,cache_hit_rate:85.4,cost:12.87,output_ratio:.39,cost_per_turn:.378},{session_id:"ghi789",project:"cc-token-analyzer",first_timestamp:"2025-12-03T09:00:00Z",duration_minutes:120.5,model:"claude-opus-4-6",turn_count:210,agentTurnCount:130,output_tokens:98e3,context_tokens:45e6,max_context:395e3,cache_hit_rate:93.5,cost:178.42,output_ratio:.22,cost_per_turn:.849},{session_id:"jkl012",project:"rust-lib",first_timestamp:"2025-12-04T16:20:00Z",duration_minutes:38,model:"claude-opus-4-6",turn_count:55,agentTurnCount:28,output_tokens:22e3,context_tokens:89e5,max_context:32e4,cache_hit_rate:88.1,cost:35.2,output_ratio:.25,cost_per_turn:.64},{session_id:"mno345",project:"my-web-app",first_timestamp:"2025-12-05T11:45:00Z",duration_minutes:15.3,model:"claude-haiku-3.5",turn_count:18,agentTurnCount:5,output_tokens:8500,context_tokens:21e5,max_context:18e4,cache_hit_rate:82,cost:3.15,output_ratio:.4,cost_per_turn:.175},{session_id:"pqr678",project:"api-gateway",first_timestamp:"2025-12-06T08:00:00Z",duration_minutes:52.1,model:"claude-sonnet-4",turn_count:65,agentTurnCount:22,output_tokens:28e3,context_tokens:98e5,max_context:38e4,cache_hit_rate:89.3,cost:42.1,output_ratio:.29,cost_per_turn:.648},{session_id:"stu901",project:"api-gateway",first_timestamp:"2025-12-07T13:30:00Z",duration_minutes:28.6,model:"claude-sonnet-4",turn_count:38,agentTurnCount:10,output_tokens:14200,context_tokens:52e5,max_context:29e4,cache_hit_rate:86.7,cost:18.5,output_ratio:.27,cost_per_turn:.487},{session_id:"vwx234",project:"mobile-app",first_timestamp:"2025-12-08T10:15:00Z",duration_minutes:65,model:"claude-opus-4-6",turn_count:72,agentTurnCount:35,output_tokens:32e3,context_tokens:145e5,max_context:41e4,cache_hit_rate:90.1,cost:52.4,output_ratio:.22,cost_per_turn:.728},{session_id:"yza567",project:"rust-lib",first_timestamp:"2025-12-09T15:40:00Z",duration_minutes:18.5,model:"claude-opus-4-6",turn_count:24,agentTurnCount:14,output_tokens:11e3,context_tokens:36e5,max_context:25e4,cache_hit_rate:87.5,cost:15.8,output_ratio:.31,cost_per_turn:.658},{session_id:"bcd890",project:"cc-token-analyzer",first_timestamp:"2025-12-10T20:00:00Z",duration_minutes:95.3,model:"claude-opus-4-6",turn_count:156,agentTurnCount:88,output_tokens:72e3,context_tokens:34e6,max_context:385e3,cache_hit_rate:94,cost:142.18,output_ratio:.21,cost_per_turn:.911}]},trends:{group_label:"Daily",entries:[{label:"2026-03-03",session_count:1,turn_count:8,output_tokens:850,context_tokens:190660,cost:.21,cost_per_turn:.026},{label:"2026-03-04",session_count:1,turn_count:77,output_tokens:30168,context_tokens:3973107,cost:3.43,cost_per_turn:.045},{label:"2026-03-05",session_count:2,turn_count:9,output_tokens:3968,context_tokens:244684,cost:.61,cost_per_turn:.068},{label:"2026-03-06",session_count:1,turn_count:3,output_tokens:420,context_tokens:32e3,cost:.13,cost_per_turn:.043},{label:"2026-03-07",session_count:1,turn_count:1,output_tokens:600,context_tokens:11569,cost:.13,cost_per_turn:.131},{label:"2026-03-08",session_count:22,turn_count:799,output_tokens:341774,context_tokens:55037543,cost:58.08,cost_per_turn:.073},{label:"2026-03-09",session_count:5,turn_count:272,output_tokens:354888,context_tokens:19576161,cost:32.06,cost_per_turn:.118},{label:"2026-03-10",session_count:3,turn_count:42,output_tokens:18500,context_tokens:21e5,cost:4.2,cost_per_turn:.1},{label:"2026-03-11",session_count:2,turn_count:216,output_tokens:125256,context_tokens:16584214,cost:12.59,cost_per_turn:.058},{label:"2026-03-12",session_count:20,turn_count:132,output_tokens:37928,context_tokens:7768397,cost:6.53,cost_per_turn:.049},{label:"2026-03-13",session_count:4,turn_count:88,output_tokens:42e3,context_tokens:56e5,cost:7.9,cost_per_turn:.09},{label:"2026-03-14",session_count:58,turn_count:1024,output_tokens:315643,context_tokens:45837582,cost:36.45,cost_per_turn:.036},{label:"2026-03-15",session_count:15,turn_count:813,output_tokens:530675,context_tokens:73438539,cost:72.66,cost_per_turn:.089},{label:"2026-03-16",session_count:11,turn_count:490,output_tokens:247127,context_tokens:48862846,cost:41.97,cost_per_turn:.086},{label:"2026-03-17",session_count:17,turn_count:597,output_tokens:197090,context_tokens:115842388,cost:66.92,cost_per_turn:.112},{label:"2026-03-18",session_count:4,turn_count:422,output_tokens:158619,context_tokens:125837872,cost:73.93,cost_per_turn:.175},{label:"2026-03-19",session_count:3,turn_count:142,output_tokens:110468,context_tokens:5563938,cost:8.93,cost_per_turn:.063},{label:"2026-03-20",session_count:4,turn_count:72,output_tokens:110308,context_tokens:5829892,cost:6.28,cost_per_turn:.087},{label:"2026-03-21",session_count:24,turn_count:3019,output_tokens:1306004,context_tokens:472548611,cost:328.85,cost_per_turn:.109},{label:"2026-03-22",session_count:16,turn_count:2319,output_tokens:798898,context_tokens:163612093,cost:109.33,cost_per_turn:.047},{label:"2026-03-23",session_count:12,turn_count:479,output_tokens:164534,context_tokens:50885920,cost:42.27,cost_per_turn:.088},{label:"2026-03-24",session_count:10,turn_count:643,output_tokens:196579,context_tokens:58403121,cost:43.59,cost_per_turn:.068},{label:"2026-03-25",session_count:4,turn_count:378,output_tokens:201710,context_tokens:38497291,cost:33.09,cost_per_turn:.088},{label:"2026-03-26",session_count:2,turn_count:398,output_tokens:413411,context_tokens:25234044,cost:33.41,cost_per_turn:.084},{label:"2026-03-27",session_count:6,turn_count:316,output_tokens:200363,context_tokens:19990343,cost:25.73,cost_per_turn:.081},{label:"2026-03-28",session_count:11,turn_count:1306,output_tokens:514264,context_tokens:178886792,cost:119.99,cost_per_turn:.092},{label:"2026-03-29",session_count:7,turn_count:987,output_tokens:364276,context_tokens:140283543,cost:110.62,cost_per_turn:.112},{label:"2026-03-30",session_count:2,turn_count:300,output_tokens:143470,context_tokens:27097923,cost:24.21,cost_per_turn:.081},{label:"2026-03-31",session_count:4,turn_count:788,output_tokens:581306,context_tokens:58911990,cost:62.88,cost_per_turn:.08},{label:"2026-04-01",session_count:14,turn_count:2704,output_tokens:1157526,context_tokens:244162190,cost:189.95,cost_per_turn:.07}]},projects:{projects:[{name:"cc-token-analyzer",display_name:"cc-token-analyzer",session_count:45,total_turns:3200,agent_turns:1800,output_tokens:89e4,context_tokens:345e6,cost:812.5,primary_model:"claude-opus-4-6"},{name:"my-web-app",display_name:"my-web-app",session_count:28,total_turns:1800,agent_turns:600,output_tokens:42e4,context_tokens:18e7,cost:298.3,primary_model:"claude-sonnet-4"},{name:"rust-lib",display_name:"rust-lib",session_count:12,total_turns:800,agent_turns:400,output_tokens:21e4,context_tokens:95e6,cost:164.2,primary_model:"claude-opus-4-6"},{name:"api-gateway",display_name:"api-gateway",session_count:8,total_turns:520,agent_turns:180,output_tokens:145e3,context_tokens:62e6,cost:98.7,primary_model:"claude-sonnet-4"},{name:"mobile-app",display_name:"mobile-app",session_count:5,total_turns:310,agent_turns:90,output_tokens:85e3,context_tokens:38e6,cost:52.4,primary_model:"claude-opus-4-6"}]},wrapped:{year:2025,active_days:189,total_days:365,longest_streak:23,ghost_days:176,total_sessions:142,total_turns:8547,total_agent_turns:4359,total_output_tokens:2134567,total_input_tokens:891234567,total_cost:1595.42,autonomy_ratio:3.2,avg_session_duration_min:38.5,avg_cost_per_session:11.24,output_ratio:.24,peak_hour:22,peak_weekday:"Wednesday",hourly_distribution:[5,3,2,1,0,0,1,3,8,12,15,18,20,22,19,16,14,11,9,13,17,21,19,8],weekday_distribution:[18,32,28,35,31,24,12],top_projects:[["cc-token-analyzer",812.5],["my-web-app",298.3],["rust-lib",164.2]],top_tools:[["Bash",6274],["Read",3891],["Edit",2456]],most_expensive_session:["abc123",62.39,"cc-token-analyzer"],longest_session:["xyz789",180.5,"my-web-app"],model_distribution:[["claude-opus-4-6",6200],["claude-sonnet-4",1800],["claude-haiku-3.5",547]],archetype:"Architect",total_pr_count:34,total_speculation_time_saved_ms:45e3,total_collapse_count:132},sessions:[{session_id:"abc12345-6789-0abc-def0-123456789abc",project:"cc-token-analyzer",model:"claude-opus-4-6",duration_minutes:45.2,total_cost:62.39,max_context:89e4,compaction_count:12,output_tokens:45e3,context_tokens:12345678,cache_hit_rate:91.2,agentTurnCount:42,agent_output_tokens:28e3,agent_cost:24.88,title:"Implement premium UI overhaul",tags:["feature","ui"],mode:"agent",branch:"feat/premium-ui",autonomy_ratio:2.8,api_errors:1,service_tier:"standard",agents:[{agent_type:"Subagent",description:"Code search and file reading",turns:22,output_tokens:14e3,cost:12.5},{agent_type:"Subagent",description:"Code editing and refactoring",turns:15,output_tokens:1e4,cost:9.2},{agent_type:"Subagent",description:"Test execution",turns:5,output_tokens:4e3,cost:3.18}],turns:[{turn_number:1,timestamp:"2025-12-01T10:30:00Z",model:"claude-opus-4-6",input_tokens:500,output_tokens:300,cache_read_tokens:0,context_size:3e4,cache_hit_rate:0,cost:.32,is_agent:!1,is_compaction:!1,tool_names:["Read"]},{turn_number:2,timestamp:"2025-12-01T10:31:00Z",model:"claude-opus-4-6",input_tokens:100,output_tokens:280,cache_read_tokens:3e4,context_size:35e3,cache_hit_rate:85.7,cost:.07,is_agent:!1,is_compaction:!1,tool_names:["Read"]},{turn_number:3,timestamp:"2025-12-01T10:32:00Z",model:"claude-opus-4-6",input_tokens:50,output_tokens:450,cache_read_tokens:35e3,context_size:42e3,cache_hit_rate:83.3,cost:.12,is_agent:!0,is_compaction:!1,tool_names:["Edit","Write"]}]},{session_id:"def45678-9012-3def-4567-890123456def",project:"my-web-app",model:"claude-sonnet-4",duration_minutes:22.8,total_cost:12.87,max_context:45e4,compaction_count:3,output_tokens:18e3,context_tokens:4567890,cache_hit_rate:85.4,agentTurnCount:12,agent_output_tokens:7200,agent_cost:4.1,title:"Fix authentication flow bug",tags:["bugfix"],mode:"normal",branch:"fix/auth",autonomy_ratio:1.5,api_errors:0,service_tier:"standard",turns:[{turn_number:1,timestamp:"2025-12-02T14:15:00Z",model:"claude-sonnet-4",input_tokens:400,output_tokens:250,cache_read_tokens:0,context_size:25e3,cache_hit_rate:0,cost:.08,is_agent:!1,is_compaction:!1,tool_names:["Grep"]}]},{session_id:"ghi78901-2345-6ghi-7890-123456789ghi",project:"cc-token-analyzer",model:"claude-opus-4-6",duration_minutes:120.5,total_cost:178.42,max_context:395e3,compaction_count:45,output_tokens:98e3,context_tokens:45e6,cache_hit_rate:93.5,agentTurnCount:130,agent_output_tokens:62e3,agent_cost:68.2,title:"Full HTML dashboard redesign",tags:["feature","refactor"],mode:"agent",branch:"feat/dashboard-v2",autonomy_ratio:3.2,api_errors:2,service_tier:"standard",agents:[{agent_type:"Subagent",description:"Vue component scaffolding",turns:55,output_tokens:28e3,cost:30.1},{agent_type:"Subagent",description:"CSS styling and theming",turns:40,output_tokens:18e3,cost:20.5},{agent_type:"Subagent",description:"Chart.js integration",turns:35,output_tokens:16e3,cost:17.6}],turns:[{turn_number:1,timestamp:"2025-12-03T09:00:00Z",model:"claude-opus-4-6",input_tokens:600,output_tokens:500,cache_read_tokens:0,context_size:4e4,cache_hit_rate:0,cost:.45,is_agent:!1,is_compaction:!1,tool_names:["Read","Glob"]}]},{session_id:"jkl01234-5678-9jkl-0123-456789012jkl",project:"rust-lib",model:"claude-opus-4-6",duration_minutes:38,total_cost:35.2,max_context:32e4,compaction_count:8,output_tokens:22e3,context_tokens:89e5,cache_hit_rate:88.1,agentTurnCount:28,agent_output_tokens:15e3,agent_cost:14.8,tags:[],mode:"normal",autonomy_ratio:2.1,api_errors:0,service_tier:"standard",turns:[{turn_number:1,timestamp:"2025-12-04T16:20:00Z",model:"claude-opus-4-6",input_tokens:300,output_tokens:200,cache_read_tokens:0,context_size:2e4,cache_hit_rate:0,cost:.22,is_agent:!1,is_compaction:!1,tool_names:["Bash"]}]},{session_id:"mno34567-8901-2mno-3456-789012345mno",project:"my-web-app",model:"claude-haiku-3.5",duration_minutes:15.3,total_cost:3.15,max_context:18e4,compaction_count:0,output_tokens:8500,context_tokens:21e5,cache_hit_rate:82,agentTurnCount:5,agent_output_tokens:2500,agent_cost:.85,title:"Quick CSS fix for mobile nav",tags:["bugfix","mobile"],mode:"normal",autonomy_ratio:1.2,api_errors:0,service_tier:"standard",turns:[{turn_number:1,timestamp:"2025-12-05T11:45:00Z",model:"claude-haiku-3.5",input_tokens:200,output_tokens:150,cache_read_tokens:0,context_size:15e3,cache_hit_rate:0,cost:.01,is_agent:!1,is_compaction:!1,tool_names:["Edit"]}]},{session_id:"pqr67890-1234-5pqr-6789-012345678pqr",project:"api-gateway",model:"claude-sonnet-4",duration_minutes:52.1,total_cost:42.1,max_context:38e4,compaction_count:10,output_tokens:28e3,context_tokens:98e5,cache_hit_rate:89.3,agentTurnCount:22,agent_output_tokens:12e3,agent_cost:15.4,title:"Add rate limiting middleware",tags:["feature"],mode:"agent",branch:"feat/rate-limit",autonomy_ratio:2.4,api_errors:0,service_tier:"standard",agents:[{agent_type:"Subagent",description:"Middleware implementation",turns:14,output_tokens:8e3,cost:10.2},{agent_type:"Subagent",description:"Test writing",turns:8,output_tokens:4e3,cost:5.2}],turns:[{turn_number:1,timestamp:"2025-12-06T08:00:00Z",model:"claude-sonnet-4",input_tokens:350,output_tokens:280,cache_read_tokens:0,context_size:28e3,cache_hit_rate:0,cost:.09,is_agent:!1,is_compaction:!1,tool_names:["Read"]}]},{session_id:"stu90123-4567-8stu-9012-345678901stu",project:"api-gateway",model:"claude-sonnet-4",duration_minutes:28.6,total_cost:18.5,max_context:29e4,compaction_count:4,output_tokens:14200,context_tokens:52e5,cache_hit_rate:86.7,agentTurnCount:10,agent_output_tokens:5500,agent_cost:6.2,title:"Refactor error handling",tags:["refactor"],mode:"normal",autonomy_ratio:1.8,api_errors:1,service_tier:"standard",turns:[{turn_number:1,timestamp:"2025-12-07T13:30:00Z",model:"claude-sonnet-4",input_tokens:280,output_tokens:220,cache_read_tokens:0,context_size:22e3,cache_hit_rate:0,cost:.07,is_agent:!1,is_compaction:!1,tool_names:["Grep"]}]},{session_id:"vwx23456-7890-1vwx-2345-678901234vwx",project:"mobile-app",model:"claude-opus-4-6",duration_minutes:65,total_cost:52.4,max_context:41e4,compaction_count:15,output_tokens:32e3,context_tokens:145e5,cache_hit_rate:90.1,agentTurnCount:35,agent_output_tokens:18e3,agent_cost:22.3,title:"Implement push notification system",tags:["feature","mobile"],mode:"agent",branch:"feat/push-notifications",autonomy_ratio:2.6,api_errors:0,service_tier:"standard",agents:[{agent_type:"Subagent",description:"Backend integration",turns:20,output_tokens:1e4,cost:13.5},{agent_type:"Subagent",description:"UI components",turns:15,output_tokens:8e3,cost:8.8}],turns:[{turn_number:1,timestamp:"2025-12-08T10:15:00Z",model:"claude-opus-4-6",input_tokens:450,output_tokens:380,cache_read_tokens:0,context_size:35e3,cache_hit_rate:0,cost:.38,is_agent:!1,is_compaction:!1,tool_names:["Read","Bash"]}]},{session_id:"yza56789-0123-4yza-5678-901234567yza",project:"rust-lib",model:"claude-opus-4-6",duration_minutes:18.5,total_cost:15.8,max_context:25e4,compaction_count:2,output_tokens:11e3,context_tokens:36e5,cache_hit_rate:87.5,agentTurnCount:14,agent_output_tokens:7e3,agent_cost:6.9,title:"Add serde derives for all types",tags:["enhancement"],mode:"normal",autonomy_ratio:1.9,api_errors:0,service_tier:"standard",turns:[{turn_number:1,timestamp:"2025-12-09T15:40:00Z",model:"claude-opus-4-6",input_tokens:250,output_tokens:180,cache_read_tokens:0,context_size:18e3,cache_hit_rate:0,cost:.2,is_agent:!1,is_compaction:!1,tool_names:["Edit"]}]},{session_id:"bcd89012-3456-7bcd-8901-234567890bcd",project:"cc-token-analyzer",model:"claude-opus-4-6",duration_minutes:95.3,total_cost:142.18,max_context:385e3,compaction_count:38,output_tokens:72e3,context_tokens:34e6,cache_hit_rate:94,agentTurnCount:88,agent_output_tokens:45e3,agent_cost:56.8,title:"Per-agent cost breakdown implementation",tags:["feature","analytics"],mode:"agent",branch:"feat/agent-cost",autonomy_ratio:3,api_errors:3,service_tier:"standard",agents:[{agent_type:"Subagent",description:"Data pipeline changes",turns:38,output_tokens:2e4,cost:25.4},{agent_type:"Subagent",description:"Pricing model updates",turns:28,output_tokens:14e3,cost:18.2},{agent_type:"Subagent",description:"HTML output generation",turns:22,output_tokens:11e3,cost:13.2}],turns:[{turn_number:1,timestamp:"2025-12-10T20:00:00Z",model:"claude-opus-4-6",input_tokens:550,output_tokens:420,cache_read_tokens:0,context_size:38e3,cache_hit_rate:0,cost:.42,is_agent:!1,is_compaction:!1,tool_names:["Glob","Read"]}]}],heatmap:{days:bb()}}}function xs(){const e=window.__CC_DATA__,t=typeof e=="string"?vb():e;return Di({data:t})}const yb={class:"overview-page"},xb={class:"page-title"},kb={class:"kpi-grid-6"},wb={key:0,class:"cache-banner"},Sb={class:"cache-banner-text"},Mb={key:0,class:"cache-banner-sub"},Cb={class:"panels-grid"},Tb={class:"card"},Db={class:"card-title"},Pb={class:"card"},Ab={class:"card-title"},Ob={class:"panels-grid"},zb={class:"card"},Lb={class:"card-title"},Rb={key:0,class:"card"},$b={class:"card-title"},Eb={class:"card"},Fb={class:"card-title"},Ib={class:"efficiency-grid"},jb={class:"efficiency-item"},Bb={class:"efficiency-value"},Vb={class:"efficiency-label"},Hb={class:"efficiency-desc"},Wb={class:"efficiency-item"},Nb={class:"efficiency-value"},Kb={class:"efficiency-label"},Ub={class:"efficiency-desc"},Yb={class:"efficiency-item"},Xb={class:"efficiency-value"},qb={class:"efficiency-label"},Gb={class:"efficiency-desc"},Zb={class:"card"},Jb={class:"card-title"},Qb={class:"summary-grid"},t0={class:"summary-item"},e0={class:"summary-label"},s0={class:"summary-value"},n0={class:"summary-item"},i0={class:"summary-label"},o0={class:"summary-value"},a0={class:"summary-item"},r0={class:"summary-label"},l0={class:"summary-value"},c0={class:"summary-item"},u0={class:"summary-label"},h0={class:"summary-value"},d0={key:0,class:"summary-item summary-item-wide"},f0={class:"summary-label"},p0={class:"summary-value"},g0=Lt({__name:"Overview",setup(e){const{data:t}=xs(),{t:s}=ts();function n(y){return y>=1e9?(y/1e9).toFixed(2)+"B":y>=1e6?(y/1e6).toFixed(2)+"M":y>=1e3?(y/1e3).toFixed(1)+"K":y.toLocaleString()}function i(y){return y>=1e3?"$"+y.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"$"+y.toFixed(2)}function o(y){return y.toFixed(1)+"%"}const a=E(()=>t.overview),r=E(()=>Math.round(a.value.total_agent_turns/a.value.total_turns*100)),l=E(()=>{const y=a.value.sessions.map(q=>q.first_timestamp).filter(Boolean);if(y.length===0)return"";y.sort();const L=y[0].slice(0,10),M=y[y.length-1].slice(0,10);return L===M?L:`${L} - ${M}`}),c=E(()=>[...a.value.models].sort((y,L)=>L.turns-y.turns).map(y=>y.name)),u=E(()=>[...a.value.models].sort((y,L)=>L.turns-y.turns).map(y=>y.turns)),h=E(()=>{const y=[...a.value.models].sort((M,q)=>q.turns-M.turns),L={};return y.forEach((M,q)=>{L[q]=[`${i(M.cost)}`,`${n(M.output_tokens)} ${s("wrapped.output_tokens")}`]}),L}),d=E(()=>[s("cost.cache_read"),s("cost.cache_write"),s("cost.output"),s("cost.input")]),f=E(()=>[a.value.cost_by_category.cache_read_cost,a.value.cost_by_category.cache_write_cost,a.value.cost_by_category.output_cost,a.value.cost_by_category.input_cost]),g=E(()=>["#10b981","#8b5cf6","#3b82f6","#f59e0b"]),p=E(()=>i(a.value.total_cost)),_=E(()=>s("overview.total_cost_center")),v=E(()=>[...a.value.top_tools].sort((y,L)=>L.count-y.count).slice(0,10)),w=E(()=>v.value.map(y=>y.name)),T=E(()=>v.value.map(y=>y.count)),C=E(()=>t.projects?[...t.projects.projects].sort((y,L)=>L.cost-y.cost).slice(0,5):[]),A=E(()=>C.value.map(y=>y.display_name)),z=E(()=>C.value.map(y=>y.cost)),D=E(()=>{const y={};return C.value.forEach((L,M)=>{y[M]=[`${L.session_count} ${s("common.sessions")}`,`${L.total_turns.toLocaleString()} ${s("common.turns")}`]}),y}),P=E(()=>o(a.value.output_ratio)),R=E(()=>i(a.value.cost_per_turn)),U=E(()=>n(a.value.tokens_per_output_turn)),$=E(()=>a.value.sessions),X=E(()=>{const y=$.value.map(q=>q.first_timestamp).filter(Boolean);if(y.length===0)return i(0);const L=new Set(y.map(q=>q.slice(0,10))),M=Math.max(L.size,1);return i(a.value.total_cost/M)}),nt=E(()=>$.value.length),ut=E(()=>$.value.length===0?"0":n(Math.max(...$.value.map(y=>y.max_context)))),st=E(()=>{if($.value.length===0)return"0m";const L=$.value.reduce((M,q)=>M+q.duration_minutes,0)/$.value.length;if(L>=60){const M=Math.floor(L/60),q=Math.round(L%60);return`${M}h ${q}m`}return`${Math.round(L)}m`}),G=E(()=>$.value.length===0?null:[...$.value].sort((L,M)=>M.cost-L.cost)[0]);return(y,L)=>(V(),W("div",yb,[m("h1",xb,k(S(s)("nav.overview")),1),m("div",kb,[Z(Mt,{value:a.value.total_sessions,label:S(s)("kpi.sessions"),subtitle:l.value},null,8,["value","label","subtitle"]),Z(Mt,{value:a.value.total_turns.toLocaleString(),label:S(s)("kpi.turns"),subtitle:`${r.value}% ${S(s)("overview.agent_driven")}`},null,8,["value","label","subtitle"]),Z(Mt,{value:n(a.value.total_context_tokens),label:S(s)("kpi.claude_read"),subtitle:S(s)("kpi.input_tokens")},null,8,["value","label","subtitle"]),Z(Mt,{value:n(a.value.total_output_tokens),label:S(s)("kpi.output_tokens")},null,8,["value","label"]),Z(Mt,{value:i(a.value.total_cost),label:S(s)("kpi.total_cost")},null,8,["value","label"]),Z(Mt,{value:i(a.value.cache_savings.total_saved),label:S(s)("kpi.cache_savings"),subtitle:o(a.value.cache_savings.savings_pct)},null,8,["value","label","subtitle"])]),a.value.cache_savings?(V(),W("div",wb,[m("span",Sb,[He(k(S(s)("overview.cache_saved"))+" ",1),m("strong",null,k(i(a.value.cache_savings.total_saved)),1),He(" ("+k(o(a.value.cache_savings.savings_pct))+" "+k(S(s)("overview.reads_free"))+") ",1)]),a.value.subscription_value?(V(),W("span",Mb,k(S(s)("overview.subscription"))+": $"+k(a.value.subscription_value.monthly_price)+"/mo → "+k(a.value.subscription_value.value_multiplier.toFixed(1))+"x "+k(S(s)("overview.value_multiplier")),1)):rt("",!0)])):rt("",!0),m("div",Cb,[m("div",Tb,[m("h2",Db,k(S(s)("overview.model_distribution")),1),Z(Fs,{labels:c.value,values:u.value,"format-value":M=>M.toLocaleString()+` ${S(s)("common.turns")}`,"tooltip-extra":h.value,"enable-log-toggle":!0,"scale-mode":"linear"},null,8,["labels","values","format-value","tooltip-extra"])]),m("div",Pb,[m("h2",Ab,k(S(s)("overview.cost_composition")),1),Z(mb,{labels:d.value,values:f.value,colors:g.value,"center-text":p.value,"center-sub-text":_.value,"format-value":M=>i(M)},null,8,["labels","values","colors","center-text","center-sub-text","format-value"])])]),m("div",Ob,[m("div",zb,[m("h2",Lb,k(S(s)("overview.top_tools")),1),Z(Fs,{labels:w.value,values:T.value,"format-value":M=>M.toLocaleString(),"enable-log-toggle":!0,"scale-mode":"linear"},null,8,["labels","values","format-value"])]),C.value.length>0?(V(),W("div",Rb,[m("h2",$b,k(S(s)("overview.top_projects")),1),Z(Fs,{labels:A.value,values:z.value,"format-value":M=>i(M),"tooltip-extra":D.value,colors:["#8b5cf6","#3b82f6","#06b6d4","#f59e0b","#10b981"]},null,8,["labels","values","format-value","tooltip-extra"])])):rt("",!0)]),m("div",Eb,[m("h2",Fb,k(S(s)("overview.efficiency_metrics")),1),m("div",Ib,[m("div",jb,[m("div",Bb,k(P.value),1),m("div",Vb,k(S(s)("kpi.output_ratio")),1),m("div",Hb,k(S(s)("overview.output_input_ratio")),1)]),m("div",Wb,[m("div",Nb,k(R.value),1),m("div",Kb,k(S(s)("kpi.cost_per_turn")),1),m("div",Ub,k(S(s)("overview.dollar_per_turn")),1)]),m("div",Yb,[m("div",Xb,k(U.value),1),m("div",qb,k(S(s)("kpi.avg_output_turn")),1),m("div",Gb,k(S(s)("kpi.tokens")),1)])])]),m("div",Zb,[m("h2",Jb,k(S(s)("overview.summary_stats")),1),m("div",Qb,[m("div",t0,[m("span",e0,k(S(s)("summary.daily_avg_cost")),1),m("span",s0,k(X.value),1)]),m("div",n0,[m("span",i0,k(S(s)("summary.compactions")),1),m("span",o0,k(nt.value),1)]),m("div",a0,[m("span",r0,k(S(s)("summary.peak_context")),1),m("span",l0,k(ut.value),1)]),m("div",c0,[m("span",u0,k(S(s)("summary.avg_duration")),1),m("span",h0,k(st.value),1)]),G.value?(V(),W("div",d0,[m("span",f0,k(S(s)("summary.most_expensive")),1),m("span",p0,k(G.value.session_id.slice(0,8))+"... — "+k(i(G.value.cost)),1)])):rt("",!0)])])]))}}),_0=Ft(g0,[["__scopeId","data-v-bbd444ab"]]),m0={class:"combo-chart-container"},b0=Lt({__name:"ComboChart",props:{labels:{},barValues:{},lineValues:{},barLabel:{},lineLabel:{},barColor:{default:"#3b82f6"},lineColor:{default:"#f59e0b"},formatBar:{type:Function,default:e=>e.toLocaleString()},formatLine:{type:Function,default:e=>e.toLocaleString()},barYLabel:{default:""},lineYLabel:{default:""},extremeIndices:{default:()=>[]},logScale:{type:Boolean,default:!1}},setup(e){We.register(Hi,Wi,zu,ma,Ln,Mu,fu,du,$n,Rn);const t=e;function s(u){return getComputedStyle(document.documentElement).getPropertyValue(u).trim()}const n=kt({text:"#a1a1aa",textSec:"#71717a",grid:"#27272a"});function i(){n.value={text:s("--text-secondary")||"#a1a1aa",textSec:s("--text-tertiary")||"#71717a",grid:s("--border-color")||"#27272a"}}const o=kt(null);let a=null;function r(){const u=t.labels.map((h,d)=>t.extremeIndices.includes(d)?"#ef4444":t.barColor);return{type:"bar",data:{labels:t.labels,datasets:[{type:"bar",label:t.barLabel,data:t.barValues,backgroundColor:u,borderRadius:4,order:2,yAxisID:"yBar"},{type:"line",label:t.lineLabel,data:t.lineValues,borderColor:t.lineColor,backgroundColor:t.lineColor+"20",borderWidth:2,pointRadius:3,pointHoverRadius:5,tension:.3,fill:!1,order:1,yAxisID:"yLine"}]},options:{responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!0,position:"top",align:"end",labels:{color:n.value.text,font:{size:11},usePointStyle:!0,pointStyleWidth:10,padding:16}},tooltip:{backgroundColor:"rgba(0,0,0,0.85)",titleFont:{size:13},bodyFont:{size:12},padding:10,cornerRadius:8,callbacks:{label:h=>h.datasetIndex===0?`${h.dataset.label}: ${t.formatBar(h.raw)}`:`${h.dataset.label}: ${t.formatLine(h.raw)}`}}},scales:{x:{grid:{color:n.value.grid,lineWidth:.5},ticks:{color:n.value.text,font:{size:10},maxRotation:45,autoSkip:!0,maxTicksLimit:15},border:{display:!1}},yBar:{type:t.logScale?"logarithmic":"linear",position:"left",grid:{color:n.value.grid,lineWidth:.5},ticks:{color:n.value.text,font:{size:11},callback:h=>{if(typeof h!="number")return h;if(t.logScale){if(h===0)return"0";const d=Math.log10(h);if(Math.abs(d-Math.round(d))>.01)return""}return h>=1e3?"$"+(h/1e3).toFixed(0)+"K":h>=1?"$"+h.toFixed(0):"$"+h.toFixed(2)}},border:{display:!1},title:{display:!!t.barYLabel,text:t.barYLabel,color:n.value.textSec,font:{size:11}}},yLine:{type:"linear",position:"right",grid:{drawOnChartArea:!1},ticks:{color:t.lineColor,font:{size:11}},border:{display:!1},title:{display:!!t.lineYLabel,text:t.lineYLabel,color:t.lineColor,font:{size:11}}}}}}}function l(){o.value&&(a&&(a.destroy(),a=null),a=new We(o.value,r()))}function c(){if(!a){l();return}const u=r();a.data=u.data,a.options=u.options,a.update()}return Kt(()=>{i(),l(),new MutationObserver(()=>{i(),c()}).observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}),an(()=>[t.labels,t.barValues,t.lineValues,t.logScale,t.extremeIndices,n.value],()=>c(),{deep:!0}),cc(()=>{a&&(a.destroy(),a=null)}),(u,h)=>(V(),W("div",m0,[m("canvas",{ref_key:"canvasRef",ref:o},null,512)]))}}),v0=Ft(b0,[["__scopeId","data-v-e7d8bd53"]]),y0={class:"bar-chart-container"},x0=Lt({__name:"BarChart",props:{labels:{},values:{},label:{},color:{default:"#06b6d4"},formatValue:{type:Function,default:e=>e.toLocaleString()},yLabel:{default:""}},setup(e){We.register(Hi,Wi,ma,$n,Rn);const t=e;function s(r){return getComputedStyle(document.documentElement).getPropertyValue(r).trim()}const n=kt({text:"#a1a1aa",textSec:"#71717a",grid:"#27272a"});function i(){n.value={text:s("--text-secondary")||"#a1a1aa",textSec:s("--text-tertiary")||"#71717a",grid:s("--border-color")||"#27272a"}}Kt(i),Kt(()=>{new MutationObserver(i).observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})});const o=E(()=>({labels:t.labels,datasets:[{label:t.label,data:t.values,backgroundColor:t.color,borderRadius:4}]})),a=E(()=>({responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"rgba(0,0,0,0.85)",titleFont:{size:13},bodyFont:{size:12},padding:10,cornerRadius:8,callbacks:{label:r=>`${r.dataset.label}: ${t.formatValue(r.raw)}`}}},scales:{x:{grid:{color:n.value.grid,lineWidth:.5},ticks:{color:n.value.text,font:{size:10},maxRotation:45,autoSkip:!0,maxTicksLimit:15},border:{display:!1}},y:{grid:{color:n.value.grid,lineWidth:.5},ticks:{color:n.value.text,font:{size:11}},border:{display:!1},title:{display:!!t.yLabel,text:t.yLabel,color:n.value.textSec,font:{size:11}}}}}));return(r,l)=>(V(),W("div",y0,[Z(S(Eu),{data:o.value,options:a.value},null,8,["data","options"])]))}}),k0=Ft(x0,[["__scopeId","data-v-06ba726e"]]),w0={class:"line-chart-container"},S0=Lt({__name:"LineChart",props:{labels:{},values:{},label:{},color:{default:"#8b5cf6"},fill:{type:Boolean,default:!0},formatValue:{type:Function,default:e=>e.toLocaleString()},yLabel:{default:""}},setup(e){We.register(Hi,Wi,Ln,Mu,Em,$n,Rn);const t=e;function s(r){return getComputedStyle(document.documentElement).getPropertyValue(r).trim()}const n=kt({text:"#a1a1aa",textSec:"#71717a",grid:"#27272a"});function i(){n.value={text:s("--text-secondary")||"#a1a1aa",textSec:s("--text-tertiary")||"#71717a",grid:s("--border-color")||"#27272a"}}Kt(i),Kt(()=>{new MutationObserver(i).observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})});const o=E(()=>({labels:t.labels,datasets:[{label:t.label,data:t.values,borderColor:t.color,backgroundColor:t.fill?t.color+"18":"transparent",borderWidth:2,pointRadius:3,pointHoverRadius:5,pointBackgroundColor:t.color,tension:.3,fill:t.fill}]})),a=E(()=>({responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"rgba(0,0,0,0.85)",titleFont:{size:13},bodyFont:{size:12},padding:10,cornerRadius:8,callbacks:{label:r=>`${r.dataset.label}: ${t.formatValue(r.raw)}`}}},scales:{x:{grid:{color:n.value.grid,lineWidth:.5},ticks:{color:n.value.text,font:{size:10},maxRotation:45,autoSkip:!0,maxTicksLimit:15},border:{display:!1}},y:{grid:{color:n.value.grid,lineWidth:.5},ticks:{color:n.value.text,font:{size:11}},border:{display:!1},title:{display:!!t.yLabel,text:t.yLabel,color:n.value.textSec,font:{size:11}}}}}));return(r,l)=>(V(),W("div",w0,[Z(S(db),{data:o.value,options:a.value},null,8,["data","options"])]))}}),M0=Ft(S0,[["__scopeId","data-v-08fb8642"]]),C0={class:"trends-page"},T0={class:"page-title"},D0={class:"control-bar"},P0={class:"toggle-group"},A0={class:"toggle-group"},O0={class:"card"},z0={class:"card-title"},L0={class:"panels-grid"},R0={class:"card"},$0={class:"card-title"},E0={class:"card"},F0={class:"card-title"},I0={class:"card"},j0={class:"card-title"},B0={class:"kpi-grid-4"},V0=Lt({__name:"Trends",setup(e){const{data:t}=xs(),{t:s}=ts(),n=kt("daily"),i=kt(!1),o=E(()=>t.trends?.entries??[]),a=E(()=>{const z=new Map;for(const D of o.value){const P=D.label.slice(0,7),R=z.get(P)??{session_count:0,turn_count:0,output_tokens:0,context_tokens:0,cost:0};R.session_count+=D.session_count,R.turn_count+=D.turn_count,R.output_tokens+=D.output_tokens,R.context_tokens+=D.context_tokens,R.cost+=D.cost,z.set(P,R)}return Array.from(z.entries()).map(([D,P])=>({label:D,session_count:P.session_count,turn_count:P.turn_count,output_tokens:P.output_tokens,context_tokens:P.context_tokens,cost:C(P.cost),cost_per_turn:P.turn_count>0?A(P.cost/P.turn_count):0}))}),r=E(()=>n.value==="daily"?o.value:a.value),l=E(()=>r.value.map(z=>T(z.label))),c=E(()=>r.value.map(z=>z.cost)),u=E(()=>r.value.map(z=>z.turn_count)),h=E(()=>r.value.map(z=>z.session_count)),d=E(()=>r.value.map(z=>z.cost_per_turn)),f=E(()=>{const z=[...c.value].sort((R,U)=>R-U);if(z.length<3)return[];const D=Math.floor(z.length*.9),P=z[D];return c.value.map((R,U)=>R>=P&&R>0?U:-1).filter(R=>R>=0)}),g=E(()=>r.value.reduce((z,D)=>z+D.cost,0)),p=E(()=>r.value.reduce((z,D)=>z+D.turn_count,0)),_=E(()=>{const z=r.value.length;return z>0?g.value/z:0}),v=E(()=>p.value>0?g.value/p.value:0);function w(z){return z>=1e3?"$"+z.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"$"+z.toFixed(2)}function T(z){return z.length===10?z.slice(5):z}function C(z){return Math.round(z*100)/100}function A(z){return Math.round(z*1e4)/1e4}return(z,D)=>(V(),W("div",C0,[m("h1",T0,k(S(s)("trends.title")),1),m("div",D0,[m("div",P0,[m("button",{class:Rt(["toggle-btn",{active:n.value==="daily"}]),onClick:D[0]||(D[0]=P=>n.value="daily")},k(S(s)("trends.daily")),3),m("button",{class:Rt(["toggle-btn",{active:n.value==="monthly"}]),onClick:D[1]||(D[1]=P=>n.value="monthly")},k(S(s)("trends.monthly")),3)]),m("div",A0,[m("button",{class:Rt(["toggle-btn",{active:!i.value}]),onClick:D[2]||(D[2]=P=>i.value=!1)},k(S(s)("trends.linear_scale")),3),m("button",{class:Rt(["toggle-btn",{active:i.value}]),onClick:D[3]||(D[3]=P=>i.value=!0)},k(S(s)("trends.log_scale")),3)])]),m("div",O0,[m("h2",z0,k(S(s)("trends.usage_trend")),1),Z(v0,{labels:l.value,"bar-values":c.value,"line-values":u.value,"bar-label":S(s)("trends.cost"),"line-label":S(s)("trends.turns"),"bar-color":"#3b82f6","line-color":"#f59e0b","format-bar":P=>w(P),"format-line":P=>P.toLocaleString()+" "+S(s)("common.turns"),"bar-y-label":S(s)("trends.cost"),"line-y-label":S(s)("trends.turns"),"extreme-indices":f.value,"log-scale":i.value},null,8,["labels","bar-values","line-values","bar-label","line-label","format-bar","format-line","bar-y-label","line-y-label","extreme-indices","log-scale"])]),m("div",L0,[m("div",R0,[m("h2",$0,k(n.value==="daily"?S(s)("trends.sessions_per_day"):S(s)("trends.sessions_per_month")),1),Z(k0,{labels:l.value,values:h.value,label:S(s)("trends.sessions"),color:"#06b6d4","format-value":P=>P.toLocaleString(),"y-label":S(s)("trends.sessions")},null,8,["labels","values","label","format-value","y-label"])]),m("div",E0,[m("h2",F0,k(S(s)("trends.cost_per_turn_trend")),1),Z(M0,{labels:l.value,values:d.value,label:S(s)("trends.cost_per_turn"),color:"#8b5cf6","format-value":P=>"$"+P.toFixed(3),"y-label":S(s)("trends.cost_per_turn")},null,8,["labels","values","label","format-value","y-label"])])]),m("div",I0,[m("h2",j0,k(S(s)("trends.summary")),1),m("div",B0,[Z(Mt,{value:w(g.value),label:S(s)("trends.total_cost")},null,8,["value","label"]),Z(Mt,{value:w(_.value),label:n.value==="daily"?S(s)("trends.avg_daily_cost"):S(s)("trends.avg_monthly_cost")},null,8,["value","label"]),Z(Mt,{value:p.value.toLocaleString(),label:S(s)("trends.total_turns")},null,8,["value","label"]),Z(Mt,{value:w(v.value),label:S(s)("trends.avg_cost_per_turn")},null,8,["value","label"])])])]))}}),H0=Ft(V0,[["__scopeId","data-v-c6028849"]]),W0={class:"data-table-wrapper"},N0={class:"data-table"},K0={key:0,class:"col-rank"},U0={key:1,class:"col-expand"},Y0=["onClick"],X0={class:"header-text"},q0={key:0,class:"sort-indicator"},G0=["onClick"],Z0={key:0,class:"col-rank cell-rank"},J0={key:1,class:"col-expand cell-chevron"},Q0={key:0,class:"expand-row"},tv=["colspan"],ev={class:"expand-content"},sv=Lt({__name:"DataTable",props:{columns:{},rows:{},rowKey:{},expandable:{type:Boolean,default:!1},defaultSortKey:{},defaultSortDir:{default:"desc"},showRank:{type:Boolean,default:!1},initialExpandedKeys:{}},setup(e){const t=e,s=kt(t.defaultSortKey??null),n=kt(t.defaultSortDir);function i(d){return typeof t.rowKey=="function"?t.rowKey(d):String(d[t.rowKey])}function o(d){d.sortable&&(s.value===d.key?n.value==="desc"?n.value="asc":n.value==="asc"&&(s.value=null,n.value=null):(s.value=d.key,n.value="desc"))}function a(d){return d.sortable?s.value!==d.key?"↕":n.value==="asc"?"↑":"↓":""}const r=E(()=>{if(!s.value||!n.value)return[...t.rows];const d=s.value,f=n.value==="asc"?1:-1;return[...t.rows].sort((g,p)=>{const _=g[d],v=p[d];return typeof _=="number"&&typeof v=="number"?(_-v)*f:String(_).localeCompare(String(v))*f})}),l=kt(new Set(t.initialExpandedKeys??[]));function c(d){if(!t.expandable)return;const f=i(d);l.value.has(f)?l.value.delete(f):l.value.add(f),l.value=new Set(l.value)}function u(d){return l.value.has(i(d))}function h(d,f){return f.format?f.format(d):d[f.key]??""}return(d,f)=>(V(),W("div",W0,[m("table",N0,[m("thead",null,[m("tr",null,[e.showRank?(V(),W("th",K0,"#")):rt("",!0),e.expandable?(V(),W("th",U0)):rt("",!0),(V(!0),W(mt,null,Gt(e.columns,g=>(V(),W("th",{key:g.key,class:Rt(["col-header",g.align?`align-${g.align}`:"align-left",{sortable:g.sortable,"hide-narrow":g.hideOnNarrow}]),onClick:p=>o(g)},[m("span",X0,k(g.label),1),g.sortable?(V(),W("span",q0,k(a(g)),1)):rt("",!0)],10,Y0))),128))])]),m("tbody",null,[(V(!0),W(mt,null,Gt(r.value,(g,p)=>(V(),W(mt,{key:i(g)},[m("tr",{class:Rt(["data-row",{expandable:e.expandable,expanded:u(g)}]),onClick:_=>c(g)},[e.showRank?(V(),W("td",Z0,k(p+1),1)):rt("",!0),e.expandable?(V(),W("td",J0,[m("span",{class:Rt(["chevron",{open:u(g)}])},"▸",2)])):rt("",!0),(V(!0),W(mt,null,Gt(e.columns,_=>(V(),W("td",{key:_.key,class:Rt([_.align?`align-${_.align}`:"align-left",{"hide-narrow":_.hideOnNarrow}])},k(h(g,_)),3))),128))],10,G0),e.expandable&&u(g)?(V(),W("tr",Q0,[m("td",{colspan:e.columns.length+(e.showRank?1:0)+1,class:"expand-cell"},[m("div",ev,[Kh(d.$slots,"expand",{row:g,index:p},void 0)])],8,tv)])):rt("",!0)],64))),128))])])]))}}),ki=Ft(sv,[["__scopeId","data-v-85d7e111"]]),nv={class:"projects-page"},iv={class:"page-title"},ov={class:"kpi-grid-3"},av={class:"card"},rv={class:"card-title"},lv={class:"sub-table-section"},cv={class:"sub-table-title"},uv={key:1,class:"no-sessions"},hv=Lt({__name:"Projects",setup(e){const{data:t}=xs(),{t:s}=ts();function n(p){return p>=1e3?"$"+p.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"$"+p.toFixed(2)}function i(p){return p.toFixed(1)+"%"}function o(p){if(p>=60){const _=Math.floor(p/60),v=Math.round(p%60);return`${_}h ${v}m`}return`${Math.round(p)}m`}function a(p){return p.replace("claude-","").replace("-20250514","")}const r=E(()=>t.projects?.projects??[]),l=E(()=>r.value.length),c=E(()=>r.value.reduce((p,_)=>p+_.cost,0)),u=E(()=>l.value>0?c.value/l.value:0),h=E(()=>[{key:"display_name",label:s("projects.col_name"),sortable:!0,align:"left",format:p=>p.display_name},{key:"session_count",label:s("projects.col_sessions"),sortable:!0,align:"right"},{key:"total_turns",label:s("projects.col_turns"),sortable:!0,align:"right",format:p=>p.total_turns.toLocaleString()},{key:"agent_turns",label:s("projects.col_agent_turns"),sortable:!0,align:"right",hideOnNarrow:!0,format:p=>p.agent_turns.toLocaleString()},{key:"cost_per_session",label:s("projects.col_cost_per_session"),sortable:!1,align:"right",hideOnNarrow:!0,format:p=>p.session_count>0?n(p.cost/p.session_count):"$0.00"},{key:"primary_model",label:s("projects.col_model"),sortable:!0,align:"left",format:p=>a(p.primary_model)},{key:"cost",label:s("projects.col_total_cost"),sortable:!0,align:"right",format:p=>n(p.cost)}]),d=E(()=>t.overview?.sessions??[]);function f(p){return[...d.value].filter(_=>_.project===p).sort((_,v)=>v.cost-_.cost)}const g=E(()=>[{key:"session_id",label:s("projects.col_session_id"),sortable:!1,align:"left",format:p=>p.session_id.slice(0,8)},{key:"turn_count",label:s("projects.col_turns"),sortable:!1,align:"right"},{key:"duration_minutes",label:s("projects.col_duration"),sortable:!1,align:"right",format:p=>o(p.duration_minutes)},{key:"cost",label:s("projects.col_cost"),sortable:!1,align:"right",format:p=>n(p.cost)},{key:"model",label:s("projects.col_model"),sortable:!1,align:"left",format:p=>a(p.model)},{key:"cache_hit_rate",label:s("projects.col_cache_hit"),sortable:!1,align:"right",format:p=>i(p.cache_hit_rate)}]);return(p,_)=>(V(),W("div",nv,[m("h1",iv,k(S(s)("nav.projects")),1),m("div",ov,[Z(Mt,{value:l.value,label:S(s)("projects.kpi_total_projects")},null,8,["value","label"]),Z(Mt,{value:n(c.value),label:S(s)("projects.kpi_total_cost")},null,8,["value","label"]),Z(Mt,{value:n(u.value),label:S(s)("projects.kpi_avg_cost")},null,8,["value","label"])]),m("div",av,[m("h2",rv,k(S(s)("projects.ranking_title")),1),Z(ki,{columns:h.value,rows:r.value,"row-key":"name",expandable:!0,"show-rank":!0,"default-sort-key":"cost","default-sort-dir":"desc"},{expand:Zo(({row:v})=>[m("div",lv,[m("h3",cv,k(S(s)("projects.sessions_for"))+" "+k(v.display_name),1),f(v.name).length>0?(V(),ae(ki,{key:0,columns:g.value,rows:f(v.name),"row-key":"session_id",expandable:!1,"show-rank":!1},null,8,["columns","rows"])):(V(),W("p",uv,k(S(s)("projects.no_sessions")),1))])]),_:1},8,["columns","rows"])])]))}}),dv=Ft(hv,[["__scopeId","data-v-4807abfe"]]),fv={class:"filter-pills"},pv=["onClick"],gv=Lt({__name:"FilterPills",props:{options:{},modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const s=t;return(n,i)=>(V(),W("div",fv,[(V(!0),W(mt,null,Gt(e.options,o=>(V(),W("button",{key:o.value,class:Rt(["pill",{active:e.modelValue===o.value}]),onClick:a=>s("update:modelValue",o.value)},k(o.label),11,pv))),128))]))}}),kl=Ft(gv,[["__scopeId","data-v-235ce6f8"]]);function Zs(e){return"session_id"in e?e.session_id:e.id}function mo(e){return Array.isArray(e.turns)?e.turns.length:e.turns}function Qn(e){return"total_cost"in e?e.total_cost:e.cost}function _v(e){return"first_timestamp"in e&&e.first_timestamp?e.first_timestamp:Array.isArray(e.turns)&&e.turns.length>0?e.turns[0].timestamp:""}function wl(e){return e.project??""}function bo(e){return("model"in e?e.model:"")??""}function Sl(e){return e.cache_hit_rate??0}function Ml(e){return e.duration_minutes??0}const mv={class:"sessions-page"},bv={class:"page-title"},vv={class:"kpi-grid-4"},yv={class:"card"},xv={class:"filter-bar"},kv=["placeholder"],wv={class:"filter-group"},Sv={class:"filter-group"},Mv={class:"card"},Cv={class:"card-title"},Tv={class:"count-badge"},Dv={class:"session-detail"},Pv={key:0,class:"orphan-banner"},Av={class:"detail-section info-row"},Ov={key:0,class:"info-item"},zv={class:"info-label"},Lv={class:"info-value"},Rv={key:1,class:"info-item"},$v={class:"info-label"},Ev={class:"info-value"},Fv={key:2,class:"info-item"},Iv={class:"info-label"},jv={key:3,class:"info-item"},Bv={class:"info-label"},Vv={class:"info-value branch-name"},Hv={key:1,class:"detail-section"},Wv={class:"detail-section-title"},Nv={class:"detail-section"},Kv={class:"detail-section-title"},Uv={class:"metadata-grid"},Yv={key:0,class:"meta-item"},Xv={class:"meta-label"},qv={class:"meta-value"},Gv={key:1,class:"meta-item"},Zv={class:"meta-label"},Jv={key:2,class:"meta-item"},Qv={class:"meta-label"},ty={class:"meta-value"},ey={key:3,class:"meta-item"},sy={class:"meta-label"},ny={class:"meta-value"},iy={key:4,class:"meta-item"},oy={class:"meta-label"},ay={class:"meta-value"},ry={key:5,class:"meta-item"},ly={class:"meta-label"},cy={class:"meta-value"},uy={class:"meta-item"},hy={class:"meta-label"},dy={class:"meta-value"},fy={key:6,class:"meta-item"},py={class:"meta-label"},gy={class:"meta-value"},_y={key:2,class:"chip-row"},my={class:"chip-row-label"},by={class:"chip-row-list"},vy=["title"],yy={key:3,class:"chip-row"},xy={class:"chip-row-label"},ky={class:"chip-row-list"},wy=["title"],Sy={key:4,class:"chip-row"},My={class:"chip-row-label"},Cy={class:"chip-row-list"},Ty=["title"],Dy={key:5,class:"chip-row"},Py={class:"chip-row-label"},Ay={class:"chip-row-list"},Oy=["title"],zy={key:1,class:"no-sessions"},Ly=Lt({__name:"Sessions",setup(e){const{data:t}=xs(),{t:s,locale:n}=ts();function i(y){return y>=1e3?"$"+y.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"$"+y.toFixed(2)}function o(y){return y.toFixed(1)+"%"}function a(y){if(y>=60){const L=Math.floor(y/60),M=Math.round(y%60);return`${L}h ${M}m`}return`${Math.round(y)}m`}function r(y){return y.replace("claude-","").replace("-20250514","")}function l(y){return y>=1e6?(y/1e6).toFixed(1)+"M":y>=1e3?(y/1e3).toFixed(1)+"K":y.toString()}function c(y){return new Date(y).toLocaleDateString(n.value==="zh"?"zh-CN":"en-US",{month:"short",day:"numeric"})}function u(y){return _v(y)}function h(y,L=40){return y.length<=L?y:y.slice(0,L-1)+"…"}function d(y){return y>=1e3?(y/1e3).toFixed(1)+"s":y+"ms"}function f(y){return h(`${y.agentType} ${s("sessions.chip_times")} ${y.count}`)}function g(y){const M=[[`${y.count} ${s("sessions.chip_calls")}`,`${y.totalTurns} ${s("common.turns")}`,i(y.totalCost)].join(" · ")],q=y.descriptions.slice(0,3);for(const St of q)M.push("• "+h(St,80));if(y.descriptions.length>3){const St=y.descriptions.length-3;M.push(s("sessions.chip_and_more").replace("{n}",String(St)))}return M.join(`
`)}function p(y){return[`${y.turns} ${s("common.turns")}`,i(y.cost),`${l(y.inputTokens)} in / ${l(y.outputTokens)} out`].join(" · ")}function _(y){return[`${y.turns} ${s("common.turns")}`,i(y.cost),`${l(y.inputTokens)} in / ${l(y.outputTokens)} out`].join(" · ")}function v(y){const L=[`${y.invocations} ${s("sessions.hook_invocations_unit")}`,`${d(y.totalDurationMs)} total`];return y.errorCount>0&&L.push(`${y.errorCount} ${s("sessions.hook_errors_unit")}`),y.preventedContinuationCount>0&&L.push(`${y.preventedContinuationCount} ${s("sessions.hook_prevented_unit")}`),L.join(" · ")}const w=E(()=>t.sessions??[]),T=t.active_session_id??"",C=kt(""),A=kt("all"),z=kt("cost"),D=E(()=>{if(!T)return[];const y=w.value.find(L=>{const M=Zs(L);return M===T||M.startsWith(T)});return y?[Zs(y)]:[]});Kt(()=>{T&&(C.value=T.slice(0,8),z.value="date")});const P=E(()=>{const y=new Set(w.value.map(M=>{const q=r(bo(M));return q.split("-")[0]??q})),L=[{value:"all",label:s("sessions.filter_all")}];for(const M of y)M&&L.push({value:M.toLowerCase(),label:M});return L}),R=E(()=>[{value:"cost",label:s("sessions.sort_by_cost")},{value:"date",label:s("sessions.sort_by_date")},{value:"turns",label:s("sessions.sort_by_turns")}]),U=E(()=>{let y=[...w.value];const L=C.value.toLowerCase().trim();switch(L&&(y=y.filter(M=>Zs(M).toLowerCase().includes(L)||wl(M).toLowerCase().includes(L)||(M.title?.toLowerCase().includes(L)??!1))),A.value!=="all"&&(y=y.filter(M=>(r(bo(M)).split("-")[0]?.toLowerCase()??"")===A.value)),z.value){case"cost":y.sort((M,q)=>Qn(q)-Qn(M));break;case"date":{y.sort((M,q)=>{const St=u(M);return u(q).localeCompare(St)});break}case"turns":{y.sort((M,q)=>mo(q)+q.agentTurnCount-(mo(M)+M.agentTurnCount));break}}return y}),$=E(()=>w.value.length),X=E(()=>w.value.reduce((y,L)=>y+Qn(L),0)),nt=E(()=>$.value>0?X.value/$.value:0),ut=E(()=>$.value===0?0:w.value.reduce((L,M)=>L+Ml(M),0)/$.value),st=E(()=>[{key:"session_id",label:s("sessions.col_session_id"),sortable:!0,align:"left",format:y=>Zs(y).slice(0,8)},{key:"project",label:s("sessions.col_project"),sortable:!0,align:"left",format:y=>{const L=wl(y).replace(/^-Users-[^-]+-/,"~/").replace(/-/g,"/"),M=L.length>20?"..."+L.slice(-17):L;return"isOrphan"in y&&y.isOrphan?`${M} ${s("sessions.orphan_tag")}`:M}},{key:"turns_display",label:s("sessions.col_turns"),sortable:!0,align:"right",format:y=>{const L=mo(y);return y.agentTurnCount>0?`${L+y.agentTurnCount} (+${y.agentTurnCount})`:String(L)}},{key:"duration_minutes",label:s("sessions.col_duration"),sortable:!0,align:"right",format:y=>a(Ml(y))},{key:"total_cost",label:s("sessions.col_cost"),sortable:!0,align:"right",format:y=>i(Qn(y))},{key:"model",label:s("sessions.col_model"),sortable:!0,align:"left",format:y=>r(bo(y))},{key:"cache_hit_rate",label:s("sessions.col_cache_hit"),sortable:!0,align:"right",hideOnNarrow:!0,format:y=>o(Sl(y))},{key:"date_display",label:s("sessions.col_date"),sortable:!0,align:"right",hideOnNarrow:!0,format:y=>{const L=u(y);return L?c(L):"-"}}]),G=E(()=>[{key:"agent_type",label:s("sessions.detail_agent_type"),sortable:!1,align:"left"},{key:"description",label:s("sessions.detail_agent_desc"),sortable:!1,align:"left"},{key:"turns",label:s("sessions.detail_agent_turns"),sortable:!1,align:"right"},{key:"output_tokens",label:s("sessions.detail_agent_output"),sortable:!1,align:"right",format:y=>l(y.output_tokens)},{key:"cost",label:s("sessions.detail_agent_cost"),sortable:!1,align:"right",format:y=>i(y.cost)}]);return(y,L)=>(V(),W("div",mv,[m("h1",bv,k(S(s)("nav.sessions")),1),m("div",vv,[Z(Mt,{value:$.value,label:S(s)("sessions.kpi_total_sessions")},null,8,["value","label"]),Z(Mt,{value:i(X.value),label:S(s)("sessions.kpi_total_cost")},null,8,["value","label"]),Z(Mt,{value:i(nt.value),label:S(s)("sessions.kpi_avg_cost")},null,8,["value","label"]),Z(Mt,{value:a(ut.value),label:S(s)("sessions.kpi_avg_duration")},null,8,["value","label"])]),m("div",yv,[m("div",xv,[Mh(m("input",{"onUpdate:modelValue":L[0]||(L[0]=M=>C.value=M),type:"text",class:"search-input",placeholder:S(s)("sessions.search_placeholder")},null,8,kv),[[Qd,C.value]]),m("div",wv,[Z(kl,{modelValue:A.value,"onUpdate:modelValue":L[1]||(L[1]=M=>A.value=M),options:P.value},null,8,["modelValue","options"])]),m("div",Sv,[Z(kl,{modelValue:z.value,"onUpdate:modelValue":L[2]||(L[2]=M=>z.value=M),options:R.value},null,8,["modelValue","options"])])])]),m("div",Mv,[m("h2",Cv,[He(k(S(s)("sessions.table_title"))+" ",1),m("span",Tv,k(U.value.length),1)]),U.value.length>0?(V(),ae(ki,{key:0,columns:st.value,rows:U.value,"row-key":M=>S(Zs)(M),expandable:!0,"show-rank":!1,"default-sort-key":"total_cost","default-sort-dir":"desc","initial-expanded-keys":D.value},{expand:Zo(({row:M})=>[m("div",Dv,["isOrphan"in M&&M.isOrphan?(V(),W("div",Pv,k(S(s)("sessions.orphan_banner")),1)):rt("",!0),m("div",Av,[M.title?(V(),W("div",Ov,[m("span",zv,k(S(s)("sessions.detail_title")),1),m("span",Lv,k(M.title),1)])):rt("",!0),M.tags&&M.tags.length>0?(V(),W("div",Rv,[m("span",$v,k(S(s)("sessions.detail_tags")),1),m("span",Ev,[(V(!0),W(mt,null,Gt(M.tags,q=>(V(),W("span",{key:q,class:"tag-chip"},k(q),1))),128))])])):rt("",!0),M.mode?(V(),W("div",Fv,[m("span",Iv,k(S(s)("sessions.detail_mode")),1),m("span",{class:Rt(["info-value mode-badge","mode-"+M.mode])},k(M.mode),3)])):rt("",!0),"branch"in M&&M.branch?(V(),W("div",jv,[m("span",Bv,k(S(s)("sessions.detail_branch")),1),m("span",Vv,k(M.branch),1)])):rt("",!0)]),"agents"in M&&M.agents&&M.agents.length>0?(V(),W("div",Hv,[m("h3",Wv,k(S(s)("sessions.detail_agent_breakdown")),1),Z(ki,{columns:G.value,rows:M.agents,"row-key":"description",expandable:!1,"show-rank":!1},null,8,["columns","rows"])])):rt("",!0),m("div",Nv,[m("h3",Kv,k(S(s)("sessions.detail_metadata")),1),m("div",Uv,["autonomy_ratio"in M&&M.autonomy_ratio!=null?(V(),W("div",Yv,[m("span",Xv,k(S(s)("sessions.detail_autonomy")),1),m("span",qv,"1:"+k(M.autonomy_ratio.toFixed(1)),1)])):rt("",!0),"api_errors"in M?(V(),W("div",Gv,[m("span",Zv,k(S(s)("sessions.detail_api_errors")),1),m("span",{class:Rt(["meta-value",{"error-highlight":(M.api_errors??0)>0}])},k(M.api_errors??0),3)])):rt("",!0),"max_context"in M?(V(),W("div",Jv,[m("span",Qv,k(S(s)("sessions.detail_max_context")),1),m("span",ty,k(l(M.max_context)),1)])):rt("",!0),"compaction_count"in M?(V(),W("div",ey,[m("span",sy,k(S(s)("sessions.detail_compactions")),1),m("span",ny,k(M.compaction_count),1)])):rt("",!0),"output_tokens"in M?(V(),W("div",iy,[m("span",oy,k(S(s)("sessions.detail_output_tokens")),1),m("span",ay,k(l(M.output_tokens)),1)])):rt("",!0),"agent_cost"in M?(V(),W("div",ry,[m("span",ly,k(S(s)("sessions.detail_agent_cost_label")),1),m("span",cy,k(i(M.agent_cost)),1)])):rt("",!0),m("div",uy,[m("span",hy,k(S(s)("sessions.detail_cache_hit")),1),m("span",dy,k(o(S(Sl)(M))),1)]),"service_tier"in M&&M.service_tier?(V(),W("div",fy,[m("span",py,k(S(s)("sessions.detail_service_tier")),1),m("span",gy,k(M.service_tier),1)])):rt("",!0)])]),M.subagentTypes&&M.subagentTypes.length>0?(V(),W("div",_y,[m("span",my,k(S(s)("session.subagents")),1),m("span",by,[(V(!0),W(mt,null,Gt(M.subagentTypes,q=>(V(),W("span",{key:q.agentType,class:"capability-chip subagent-chip",title:g(q)},k(f(q)),9,vy))),128))])])):rt("",!0),M.plugins&&M.plugins.length>0?(V(),W("div",yy,[m("span",xy,k(S(s)("session.plugins")),1),m("span",ky,[(V(!0),W(mt,null,Gt(M.plugins,q=>(V(),W("span",{key:q.plugin,class:"capability-chip plugin-chip",title:p(q)},k(h(q.plugin)),9,wy))),128))])])):rt("",!0),M.skills&&M.skills.length>0?(V(),W("div",Sy,[m("span",My,k(S(s)("session.skills")),1),m("span",Cy,[(V(!0),W(mt,null,Gt(M.skills,q=>(V(),W("span",{key:q.skill,class:"capability-chip skill-chip",title:_(q)},k(h(q.skill)),9,Ty))),128))])])):rt("",!0),M.hooks&&M.hooks.length>0?(V(),W("div",Dy,[m("span",Py,k(S(s)("session.hooks")),1),m("span",Ay,[(V(!0),W(mt,null,Gt(M.hooks,q=>(V(),W("span",{key:q.command,class:"capability-chip hook-chip",title:v(q)},k(h(q.command)),9,Oy))),128))])])):rt("",!0)])]),_:1},8,["columns","rows","row-key","initial-expanded-keys"])):(V(),W("p",zy,k(S(s)("sessions.no_sessions")),1))])]))}}),Ry=Ft(Ly,[["__scopeId","data-v-c8fae991"]]),$y={class:"month-labels",style:{paddingLeft:"36px"}},Ey={class:"heatmap-body"},Fy=["onMouseenter","onMousemove"],Iy={class:"tooltip-date"},jy={class:"tooltip-row"},By={class:"tooltip-label"},Vy={class:"tooltip-value"},Hy={class:"tooltip-row"},Wy={class:"tooltip-label"},Ny={class:"tooltip-value"},Ky={class:"tooltip-row"},Uy={class:"tooltip-label"},Yy={class:"tooltip-value"},Xy={class:"tooltip-date"},qy={class:"heatmap-legend"},Gy={class:"legend-text"},Zy={class:"legend-text"},Jy=Lt({__name:"CalendarHeatmap",props:{days:{},metric:{}},setup(e){const t=e,{t:s,locale:n}=ts(),i=kt({visible:!1,x:0,y:0,data:null});function o(D,P){if(!P){i.value.visible=!1;return}const R=D.currentTarget?.closest(".heatmap-scroll-container")?.getBoundingClientRect();R&&(i.value={visible:!0,x:D.clientX-R.left,y:D.clientY-R.top,data:P})}function a(){i.value.visible=!1}const r=E(()=>{const D=new Map;for(const P of t.days)D.set(P.date,P);return D}),l=E(()=>{const D=new Date("2026-04-02"),P=new Date(D),R=new Date(P);R.setDate(R.getDate()-364);const U=R.getDay(),$=U===0?6:U-1;R.setDate(R.getDate()-$);const X=[],nt=[];for(let G=new Date(R);G<=P;G.setDate(G.getDate()+1)){const y=G.toISOString().slice(0,10),L=r.value.get(y)??null,M=L?c(L):0;M>0&&X.push(M),nt.push({date:y,dayData:L,value:M})}const ut=u(X),st=[];for(let G=0;G<nt.length;G++){const y=nt[G],M=new Date(y.date+"T00:00:00").getDay(),q=M===0?6:M-1,St=Math.floor(G/7),Tt=y.value===0?0:h(y.value,ut);st.push({...y,level:Tt,row:q,col:St})}return{cells:st,totalCols:Math.ceil(nt.length/7),thresholds:ut,startDate:new Date(R),endDate:new Date(P)}});function c(D){switch(t.metric){case"turns":return D.turns;case"cost":return D.cost;case"sessions":return D.sessions}}function u(D){if(D.length===0)return[1,2,3,4];const P=[...D].sort((ut,st)=>ut-st),R=ut=>{const st=Math.floor(ut*(P.length-1));return P[st]},U=R(.25),$=R(.5),X=R(.75),nt=R(.95);return[Math.max(U,1),Math.max($,U+1),Math.max(X,$+1),Math.max(nt,X+1)]}function h(D,P){return D<=0?0:D<=P[0]?1:D<=P[1]?2:D<=P[2]?3:4}const d=E(()=>{const D=[],P=l.value;if(P.cells.length===0)return D;let R=-1;for(const U of P.cells){if(U.row!==0)continue;const $=new Date(U.date+"T00:00:00"),X=$.getMonth();if(X!==R){if($.getDate()<=7){const ut=n.value==="zh"?"zh-CN":"en-US",st=$.toLocaleString(ut,{month:"short"});D.push({text:st,col:U.col})}R=X}}return D}),f=E(()=>[{text:s("heatmap.weekday_mon"),row:0,show:!0},{text:"",row:1,show:!1},{text:s("heatmap.weekday_wed"),row:2,show:!0},{text:"",row:3,show:!1},{text:s("heatmap.weekday_fri"),row:4,show:!0},{text:"",row:5,show:!1},{text:s("heatmap.weekday_sun"),row:6,show:!0}]),g=E(()=>t.metric==="cost"?"scheme-cost":"scheme-turns");function p(D){const P=new Date(D+"T00:00:00"),R=n.value==="zh"?"zh-CN":"en-US";return P.toLocaleDateString(R,{weekday:"short",year:"numeric",month:"short",day:"numeric"})}function _(D){return"$"+D.toFixed(2)}const v=kt(null);Kt(()=>{v.value&&(v.value.scrollLeft=v.value.scrollWidth)});const w=kt(13),T=kt(3);function C(){typeof window>"u"||(window.innerWidth<600?(w.value=10,T.value=2):(w.value=13,T.value=3))}Kt(()=>{C(),window.addEventListener("resize",C)}),Oi(()=>{window.removeEventListener("resize",C)});const A=E(()=>l.value.totalCols*(w.value+T.value)-T.value),z=E(()=>7*(w.value+T.value)-T.value);return(D,P)=>(V(),W("div",{class:Rt(["calendar-heatmap",g.value])},[m("div",$y,[m("div",{class:"month-labels-inner",style:qt({width:A.value+"px",position:"relative",height:"18px"})},[(V(!0),W(mt,null,Gt(d.value,R=>(V(),W("span",{key:R.col,class:"month-label",style:qt({left:R.col*(w.value+T.value)+"px"})},k(R.text),5))),128))],4)]),m("div",Ey,[m("div",{class:"weekday-labels",style:qt({height:z.value+"px"})},[(V(!0),W(mt,null,Gt(f.value,R=>(V(),W("span",{key:R.row,class:"weekday-label",style:qt({top:R.row*(w.value+T.value)+"px",height:w.value+"px",lineHeight:w.value+"px",visibility:R.show?"visible":"hidden"})},k(R.text),5))),128))],4),m("div",{class:"heatmap-scroll-container",ref_key:"scrollContainer",ref:v},[m("div",{class:"heatmap-grid",style:qt({width:A.value+"px",height:z.value+"px",position:"relative"})},[(V(!0),W(mt,null,Gt(l.value.cells,R=>(V(),W("div",{key:R.date,class:Rt(["heatmap-cell",`level-${R.level}`]),style:qt({left:R.col*(w.value+T.value)+"px",top:R.row*(w.value+T.value)+"px",width:w.value+"px",height:w.value+"px"}),onMouseenter:U=>o(U,R.dayData),onMousemove:U=>o(U,R.dayData),onMouseleave:a},null,46,Fy))),128))],4),i.value.visible&&i.value.data?(V(),W("div",{key:0,class:"heatmap-tooltip",style:qt({left:i.value.x+"px",top:i.value.y-70+"px"})},[m("div",Iy,k(p(i.value.data.date)),1),m("div",jy,[m("span",By,k(S(s)("heatmap.tooltip_turns"))+":",1),m("span",Vy,k(i.value.data.turns.toLocaleString()),1)]),m("div",Hy,[m("span",Wy,k(S(s)("heatmap.tooltip_cost"))+":",1),m("span",Ny,k(_(i.value.data.cost)),1)]),m("div",Ky,[m("span",Uy,k(S(s)("heatmap.tooltip_sessions"))+":",1),m("span",Yy,k(i.value.data.sessions),1)])],4)):rt("",!0),i.value.visible&&!i.value.data?(V(),W("div",{key:1,class:"heatmap-tooltip",style:qt({left:i.value.x+"px",top:i.value.y-40+"px"})},[m("div",Xy,k(S(s)("heatmap.no_activity")),1)],4)):rt("",!0)],512)]),m("div",qy,[m("span",Gy,k(S(s)("heatmap.legend_less")),1),P[0]||(P[0]=xd('<div class="legend-cell level-0" data-v-d20bbacd></div><div class="legend-cell level-1" data-v-d20bbacd></div><div class="legend-cell level-2" data-v-d20bbacd></div><div class="legend-cell level-3" data-v-d20bbacd></div><div class="legend-cell level-4" data-v-d20bbacd></div>',5)),m("span",Zy,k(S(s)("heatmap.legend_more")),1)])],2))}}),Qy=Ft(Jy,[["__scopeId","data-v-d20bbacd"]]),tx={class:"heatmap-page"},ex={class:"page-title"},sx={class:"contribution-summary"},nx={class:"contribution-count"},ix={class:"metric-switcher"},ox=["onClick"],ax={class:"card heatmap-card"},rx={class:"card"},lx={class:"card-title"},cx={class:"stats-grid"},ux=Lt({__name:"Heatmap",setup(e){const{data:t}=xs(),{t:s,locale:n}=ts(),i=kt("turns"),o=[{key:"turns",labelKey:"heatmap.metric_turns"},{key:"cost",labelKey:"heatmap.metric_cost"},{key:"sessions",labelKey:"heatmap.metric_sessions"}],a=E(()=>t.heatmap?.days?t.heatmap.days:[]),r=E(()=>a.value.filter(g=>g.turns>0).length),l=E(()=>a.value.reduce((g,p)=>g+p.turns,0)),c=E(()=>{const g=[...a.value].filter(_=>_.date<="2026-04-02").sort((_,v)=>v.date.localeCompare(_.date));let p=0;for(const _ of g)if(_.turns>0)p++;else break;return p}),u=E(()=>{const g=[...a.value].sort((v,w)=>v.date.localeCompare(w.date));let p=0,_=0;for(const v of g)v.turns>0?(_++,p=Math.max(p,_)):_=0;return p}),h=E(()=>a.value.length===0?null:[...a.value].sort((p,_)=>_.turns-p.turns)[0]);function d(g){const p=new Date(g+"T00:00:00"),_=n.value==="zh"?"zh-CN":"en-US";return p.toLocaleDateString(_,{month:"short",day:"numeric"})}function f(g){return"$"+g.toFixed(2)}return(g,p)=>(V(),W("div",tx,[m("h1",ex,k(S(s)("nav.heatmap")),1),m("div",sx,[m("span",nx,k(l.value.toLocaleString()),1),He(" "+k(S(s)("heatmap.contributions_in_range")),1)]),m("div",ix,[(V(),W(mt,null,Gt(o,_=>m("button",{key:_.key,class:Rt(["metric-pill",{active:i.value===_.key}]),onClick:v=>i.value=_.key},k(S(s)(_.labelKey)),11,ox)),64))]),m("div",ax,[Z(Qy,{days:a.value,metric:i.value},null,8,["days","metric"])]),m("div",rx,[m("h2",lx,k(S(s)("heatmap.stats")),1),m("div",cx,[Z(Mt,{value:r.value,label:S(s)("heatmap.active_days"),subtitle:`/ ${a.value.length} ${S(s)("heatmap.days")}`},null,8,["value","label","subtitle"]),Z(Mt,{value:`${c.value} ${S(s)("heatmap.days")}`,label:S(s)("heatmap.current_streak")},null,8,["value","label"]),Z(Mt,{value:`${u.value} ${S(s)("heatmap.days")}`,label:S(s)("heatmap.longest_streak")},null,8,["value","label"]),h.value?(V(),ae(Mt,{key:0,value:`${h.value.turns} ${S(s)("heatmap.metric_turns").toLowerCase()}`,label:S(s)("heatmap.busiest_day"),subtitle:`${d(h.value.date)} - ${f(h.value.cost)}`},null,8,["value","label","subtitle"])):rt("",!0)])])]))}}),hx=Ft(ux,[["__scopeId","data-v-c259be42"]]),dx={key:0,class:"wrapped-page"},fx={class:"hero-year"},px={class:"hero-archetype"},gx={class:"hero-desc"},_x={class:"hero-date-range"},mx={class:"section-title"},bx={class:"stats-grid"},vx={class:"stat-card"},yx={class:"stat-label"},xx={class:"stat-big"},kx={class:"stat-dim"},wx={class:"progress-bar"},Sx={class:"stat-sub"},Mx={class:"stat-card"},Cx={class:"stat-label"},Tx={class:"stat-big"},Dx={class:"stat-sub"},Px={class:"stat-card"},Ax={class:"stat-label"},Ox={class:"stat-big"},zx={class:"stat-sub"},Lx={class:"stat-card"},Rx={class:"stat-label"},$x={class:"stat-big"},Ex={class:"stat-sub"},Fx={class:"stat-card"},Ix={class:"stat-label"},jx={class:"stat-big"},Bx={class:"stat-sub"},Vx={class:"stat-card"},Hx={class:"stat-label"},Wx={class:"stat-big stat-cost"},Nx={class:"stat-sub"},Kx={class:"section-title"},Ux={class:"peak-grid"},Yx={class:"peak-card"},Xx={class:"peak-label"},qx={class:"peak-big"},Gx={class:"peak-card"},Zx={class:"peak-label"},Jx={class:"peak-big"},Qx={class:"peak-card"},t1={class:"peak-label"},e1={class:"peak-big"},s1={class:"peak-sub"},n1={class:"peak-card"},i1={class:"peak-label"},o1={class:"peak-big"},a1={class:"peak-sub"},r1={class:"peak-card"},l1={class:"peak-label"},c1={class:"peak-big"},u1={class:"peak-sub"},h1={class:"section-title"},d1={class:"panels-grid"},f1={class:"card"},p1={class:"card-title"},g1={class:"card"},_1={class:"card-title"},m1={class:"card",style:{"margin-top":"16px"}},b1={class:"card-title"},v1={class:"section-title"},y1={class:"panels-grid"},x1={key:0,class:"record-card"},k1={class:"record-label"},w1={class:"record-big"},S1={class:"record-meta"},M1={class:"record-id"},C1={class:"record-project"},T1={class:"record-sub"},D1={key:1,class:"record-card"},P1={class:"record-label"},A1={class:"record-big"},O1={class:"record-meta"},z1={class:"record-id"},L1={class:"record-project"},R1={class:"record-sub"},$1={key:1,class:"wrapped-page"},E1={class:"page-title"},F1={class:"card",style:{"text-align":"center",padding:"40px 24px"}},I1={style:{color:"var(--text-tertiary)","font-style":"italic"}},j1=Lt({__name:"Wrapped",setup(e){const{data:t}=xs(),{t:s}=ts(),n={Architect:{color:"#3b82f6",gradientFrom:"#1e3a8a",gradientTo:"#3b82f6",descKey:"wrapped.archetype_desc.Architect"},Sprinter:{color:"#f59e0b",gradientFrom:"#b45309",gradientTo:"#f59e0b",descKey:"wrapped.archetype_desc.Sprinter"},NightOwl:{color:"#8b5cf6",gradientFrom:"#2e1065",gradientTo:"#8b5cf6",descKey:"wrapped.archetype_desc.NightOwl"},Delegator:{color:"#22c55e",gradientFrom:"#14532d",gradientTo:"#22c55e",descKey:"wrapped.archetype_desc.Delegator"},Explorer:{color:"#06b6d4",gradientFrom:"#0e7490",gradientTo:"#06b6d4",descKey:"wrapped.archetype_desc.Explorer"},Marathoner:{color:"#ef4444",gradientFrom:"#7f1d1d",gradientTo:"#ef4444",descKey:"wrapped.archetype_desc.Marathoner"}};function i($){return $>=1e3?"$"+$.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"$"+$.toFixed(2)}function o($){return $>=1e9?($/1e9).toFixed(2)+"B":$>=1e6?($/1e6).toFixed(2)+"M":$>=1e3?($/1e3).toFixed(1)+"K":$.toLocaleString()}function a($){if($>=60){const X=Math.floor($/60),nt=Math.round($%60);return nt>0?`${X}h ${nt}m`:`${X}h`}return`${Math.round($)}m`}function r($){return $.toString().padStart(2,"0")+":00"}const l=E(()=>t.wrapped),c=E(()=>!!t.wrapped),u=E(()=>l.value.archetype),h=E(()=>n[u.value]||n.Architect),d=E(()=>Math.round(l.value.active_days/Math.max(l.value.total_days,1)*100)),f=E(()=>Math.round(l.value.total_agent_turns/Math.max(l.value.total_turns,1)*100)),g=E(()=>l.value.autonomy_ratio.toFixed(1)+"x"),p=E(()=>a(l.value.avg_session_duration_min)),_=E(()=>i(l.value.avg_cost_per_session)),v=E(()=>l.value.top_tools.map(([$])=>$)),w=E(()=>l.value.top_tools.map(([,$])=>$)),T=E(()=>l.value.top_projects.map(([$])=>$)),C=E(()=>l.value.top_projects.map(([,$])=>$)),A=E(()=>l.value.model_distribution.map(([$])=>$)),z=E(()=>l.value.model_distribution.map(([,$])=>$)),D=E(()=>l.value.most_expensive_session),P=E(()=>l.value.longest_session),R=E(()=>D.value?(D.value[1]/Math.max(l.value.total_cost,.01)*100).toFixed(1):""),U=E(()=>P.value?(P.value[1]/60).toFixed(1):"");return($,X)=>c.value?(V(),W("div",dx,[m("div",{class:"hero-card",style:qt({"--archetype-color":h.value.color,"--gradient-from":h.value.gradientFrom,"--gradient-to":h.value.gradientTo})},[m("div",fx,k(S(s)("wrapped.hero_title_pre"))+" "+k(l.value.year)+" "+k(S(s)("wrapped.hero_title_suf")),1),m("div",px,k(S(s)("wrapped.the_archetype."+u.value)),1),m("div",gx,k(S(s)(h.value.descKey)),1),m("div",_x,k(l.value.active_days)+" "+k(S(s)("wrapped.active_of"))+" "+k(l.value.total_days)+" "+k(S(s)("wrapped.days_in"))+" "+k(l.value.year),1)],4),m("div",mx,k(S(s)("wrapped.activity_stats")),1),m("div",bx,[m("div",vx,[m("div",yx,k(S(s)("wrapped.active_days")),1),m("div",xx,[He(k(l.value.active_days),1),m("span",kx," / "+k(l.value.total_days),1)]),m("div",wx,[m("div",{class:"progress-fill",style:qt({width:d.value+"%",background:h.value.color})},null,4)]),m("div",Sx,k(d.value)+"%",1)]),m("div",Mx,[m("div",Cx,k(S(s)("wrapped.longest_streak")),1),m("div",Tx,[He(k(l.value.longest_streak)+" ",1),X[0]||(X[0]=m("span",{class:"streak-flame"},null,-1))]),m("div",Dx,k(S(s)("wrapped.consecutive_days")),1)]),m("div",Px,[m("div",Ax,k(S(s)("wrapped.ghost_days")),1),m("div",Ox,k(l.value.ghost_days),1),m("div",zx,k(S(s)("wrapped.days_offline")),1)]),m("div",Lx,[m("div",Rx,k(S(s)("wrapped.total_sessions")),1),m("div",$x,k(l.value.total_sessions.toLocaleString()),1),m("div",Ex,k(S(s)("wrapped.sessions")),1)]),m("div",Fx,[m("div",Ix,k(S(s)("wrapped.total_turns")),1),m("div",jx,k(l.value.total_turns.toLocaleString()),1),m("div",Bx,k(f.value)+"% "+k(S(s)("wrapped.agent_driven")),1)]),m("div",Vx,[m("div",Hx,k(S(s)("wrapped.total_cost")),1),m("div",Wx,k(i(l.value.total_cost)),1),m("div",Nx,k(o(l.value.total_output_tokens))+" "+k(S(s)("wrapped.output_tokens")),1)])]),m("div",Kx,k(S(s)("wrapped.peak_patterns")),1),m("div",Ux,[m("div",Yx,[m("div",Xx,k(S(s)("wrapped.peak_hour")),1),m("div",qx,k(r(l.value.peak_hour)),1)]),m("div",Gx,[m("div",Zx,k(S(s)("wrapped.peak_day")),1),m("div",Jx,k(S(s)("wrapped.weekday."+l.value.peak_weekday)),1)]),m("div",Qx,[m("div",t1,k(S(s)("wrapped.autonomy_ratio")),1),m("div",e1,k(g.value),1),m("div",s1,k(S(s)("wrapped.turns_per_prompt")),1)]),m("div",n1,[m("div",i1,k(S(s)("wrapped.avg_duration")),1),m("div",o1,k(p.value),1),m("div",a1,k(S(s)("wrapped.per_session")),1)]),m("div",r1,[m("div",l1,k(S(s)("wrapped.avg_cost")),1),m("div",c1,k(_.value),1),m("div",u1,k(S(s)("wrapped.per_session")),1)])]),m("div",h1,k(S(s)("wrapped.rankings")),1),m("div",d1,[m("div",f1,[m("h2",p1,k(S(s)("wrapped.top_tools")),1),Z(Fs,{labels:v.value,values:w.value,"format-value":nt=>nt.toLocaleString(),"enable-log-toggle":!0,"scale-mode":"linear"},null,8,["labels","values","format-value"])]),m("div",g1,[m("h2",_1,k(S(s)("wrapped.top_projects")),1),Z(Fs,{labels:T.value,values:C.value,"format-value":nt=>i(nt),colors:["#8b5cf6","#3b82f6","#06b6d4","#f59e0b","#10b981"]},null,8,["labels","values","format-value"])])]),m("div",m1,[m("h2",b1,k(S(s)("wrapped.models")),1),Z(Fs,{labels:A.value,values:z.value,"format-value":nt=>nt.toLocaleString()+` ${S(s)("common.turns")}`,"enable-log-toggle":!0,"scale-mode":"linear"},null,8,["labels","values","format-value"])]),m("div",v1,k(S(s)("wrapped.records")),1),m("div",y1,[D.value?(V(),W("div",x1,[X[1]||(X[1]=m("div",{class:"record-icon record-icon-cost"},null,-1)),m("div",k1,k(S(s)("wrapped.most_expensive_session")),1),m("div",w1,k(i(D.value[1])),1),m("div",S1,[m("span",M1,k(D.value[0].slice(0,8))+"...",1),m("span",C1,k(D.value[2]),1)]),m("div",T1,k(R.value)+"% "+k(S(s)("wrapped.of_total_spend")),1)])):rt("",!0),P.value?(V(),W("div",D1,[X[2]||(X[2]=m("div",{class:"record-icon record-icon-time"},null,-1)),m("div",P1,k(S(s)("wrapped.longest_session")),1),m("div",A1,k(a(P.value[1])),1),m("div",O1,[m("span",z1,k(P.value[0].slice(0,8))+"...",1),m("span",L1,k(P.value[2]),1)]),m("div",R1,k(U.value)+" "+k(S(s)("wrapped.hours_total")),1)])):rt("",!0)])])):(V(),W("div",$1,[m("h1",E1,k(S(s)("nav.wrapped")),1),m("div",F1,[m("p",I1,k(S(s)("wrapped.no_data")),1)])]))}}),B1=Ft(j1,[["__scopeId","data-v-c1847141"]]),V1={class:"app-layout"},H1={class:"main-content"},W1=Lt({__name:"App",setup(e){$c();const{data:t}=xs(),s=kt("overview");function n(i){s.value=i}return Kt(()=>{t.active_session_id&&(s.value="sessions")}),(i,o)=>(V(),W("div",V1,[Z(yf,{"active-page":s.value,onNavigate:n},null,8,["active-page"]),m("main",H1,[s.value==="overview"?(V(),ae(_0,{key:0})):s.value==="trends"?(V(),ae(H0,{key:1})):s.value==="projects"?(V(),ae(dv,{key:2})):s.value==="sessions"?(V(),ae(Ry,{key:3})):s.value==="heatmap"?(V(),ae(hx,{key:4})):s.value==="wrapped"?(V(),ae(B1,{key:5})):rt("",!0)])]))}}),N1=Ft(W1,[["__scopeId","data-v-62389286"]]),K1=sf(N1);K1.mount("#app");</script>
  <style rel="stylesheet" crossorigin>.sidebar[data-v-1b1bb978]{width:var(--sidebar-width);height:100vh;position:fixed;top:0;left:0;background:var(--bg-secondary);border-right:1px solid var(--border-color);display:flex;flex-direction:column;padding:20px 12px;z-index:100}.sidebar-header[data-v-1b1bb978]{padding:0 8px 20px;border-bottom:1px solid var(--border-color);margin-bottom:16px}.sidebar-title[data-v-1b1bb978]{font-size:1.1rem;font-weight:700;color:var(--text-primary);line-height:1.3}.sidebar-nav[data-v-1b1bb978]{flex:1;display:flex;flex-direction:column;gap:4px}.nav-item[data-v-1b1bb978]{display:flex;align-items:center;gap:10px;padding:10px 12px;border:none;border-radius:8px;background:transparent;color:var(--text-tertiary);cursor:pointer;font-size:14px;font-family:inherit;text-align:left;transition:all .15s ease;width:100%}.nav-item[data-v-1b1bb978]:hover{color:var(--text-primary);background:var(--bg-tertiary)}.nav-item.active[data-v-1b1bb978]{color:var(--text-primary);background:var(--bg-tertiary);font-weight:600}.nav-icon[data-v-1b1bb978]{font-size:16px;width:20px;text-align:center;flex-shrink:0}.nav-label[data-v-1b1bb978]{white-space:nowrap}.sidebar-footer[data-v-1b1bb978]{display:flex;gap:8px;padding-top:16px;border-top:1px solid var(--border-color)}.footer-btn[data-v-1b1bb978]{flex:1;padding:8px;border:1px solid var(--border-color);border-radius:8px;background:transparent;color:var(--text-secondary);cursor:pointer;font-size:14px;font-family:inherit;transition:all .15s ease}.footer-btn[data-v-1b1bb978]:hover{color:var(--text-primary);border-color:var(--text-secondary)}.kpi-card[data-v-6c3b803c]{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:12px;padding:14px 16px;transition:border-color .15s ease}.kpi-card[data-v-6c3b803c]:hover{border-color:var(--text-tertiary)}.kpi-value[data-v-6c3b803c]{font-size:1.35rem;font-weight:600;color:var(--text-primary);line-height:1.1}.kpi-label[data-v-6c3b803c]{font-size:.75rem;font-weight:500;color:var(--text-tertiary);margin-top:4px;text-transform:uppercase;letter-spacing:.05em}.kpi-subtitle[data-v-6c3b803c]{font-size:.7rem;color:var(--text-secondary);margin-top:2px}.hbar-chart-wrapper[data-v-d08428d6]{position:relative}.scale-toggle[data-v-d08428d6]{position:absolute;top:-4px;right:0;padding:3px 10px;border:1px solid var(--border-color);border-radius:6px;background:var(--bg-tertiary);color:var(--text-secondary);font-size:.7rem;cursor:pointer;z-index:2;transition:all .15s ease}.scale-toggle[data-v-d08428d6]:hover{color:var(--text-primary);border-color:var(--text-tertiary)}.hbar-chart-container[data-v-d08428d6]{width:100%}.doughnut-chart-container[data-v-a0f56f1f]{width:100%;height:280px;display:flex;align-items:center;justify-content:center}.overview-page[data-v-bbd444ab]{display:flex;flex-direction:column;gap:16px}.page-title[data-v-bbd444ab]{font-size:1.5rem;font-weight:600;color:var(--text-primary);margin:0}.kpi-grid-6[data-v-bbd444ab]{display:grid;grid-template-columns:repeat(6,1fr);gap:10px}@media(max-width:1000px){.kpi-grid-6[data-v-bbd444ab]{grid-template-columns:repeat(3,1fr)}}@media(max-width:600px){.kpi-grid-6[data-v-bbd444ab]{grid-template-columns:repeat(2,1fr)}}.cache-banner[data-v-bbd444ab]{background:var(--bg-secondary);border:1px solid var(--text-accent);border-radius:12px;padding:14px 20px;display:flex;flex-direction:column;gap:4px}.cache-banner-text[data-v-bbd444ab]{color:var(--text-primary);font-size:.9rem}.cache-banner-sub[data-v-bbd444ab]{color:var(--text-secondary);font-size:.8rem}.card[data-v-bbd444ab]{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:12px;padding:20px 24px}.card-title[data-v-bbd444ab]{font-size:1rem;font-weight:600;color:var(--text-primary);margin:0 0 16px}.panels-grid[data-v-bbd444ab]{display:grid;grid-template-columns:1fr 1fr;gap:16px}@media(max-width:800px){.panels-grid[data-v-bbd444ab]{grid-template-columns:1fr}}.efficiency-grid[data-v-bbd444ab]{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}@media(max-width:600px){.efficiency-grid[data-v-bbd444ab]{grid-template-columns:1fr}}.efficiency-item[data-v-bbd444ab]{text-align:center;padding:16px 12px;background:var(--bg-tertiary);border-radius:10px;border:1px solid var(--border-color);transition:border-color .15s ease}.efficiency-item[data-v-bbd444ab]:hover{border-color:var(--text-tertiary)}.efficiency-value[data-v-bbd444ab]{font-size:1.6rem;font-weight:700;color:var(--text-primary);line-height:1.2}.efficiency-label[data-v-bbd444ab]{font-size:.8rem;font-weight:600;color:var(--text-secondary);margin-top:6px;text-transform:uppercase;letter-spacing:.04em}.efficiency-desc[data-v-bbd444ab]{font-size:.7rem;color:var(--text-tertiary);margin-top:2px}.summary-grid[data-v-bbd444ab]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}@media(max-width:800px){.summary-grid[data-v-bbd444ab]{grid-template-columns:repeat(2,1fr)}}@media(max-width:500px){.summary-grid[data-v-bbd444ab]{grid-template-columns:1fr}}.summary-item[data-v-bbd444ab]{display:flex;flex-direction:column;gap:4px;padding:12px 14px;background:var(--bg-tertiary);border-radius:8px}.summary-item-wide[data-v-bbd444ab]{grid-column:span 2}@media(max-width:500px){.summary-item-wide[data-v-bbd444ab]{grid-column:span 1}}.summary-label[data-v-bbd444ab]{font-size:.7rem;font-weight:500;color:var(--text-tertiary);text-transform:uppercase;letter-spacing:.04em}.summary-value[data-v-bbd444ab]{font-size:.95rem;font-weight:600;color:var(--text-primary)}.combo-chart-container[data-v-e7d8bd53]{width:100%;height:320px;position:relative}.bar-chart-container[data-v-06ba726e],.line-chart-container[data-v-08fb8642]{width:100%;height:240px}.trends-page[data-v-c6028849]{display:flex;flex-direction:column;gap:16px}.page-title[data-v-c6028849]{font-size:1.5rem;font-weight:600;color:var(--text-primary);margin:0}.control-bar[data-v-c6028849]{display:flex;gap:12px;flex-wrap:wrap}.toggle-group[data-v-c6028849]{display:flex;border:1px solid var(--border-color);border-radius:8px;overflow:hidden}.toggle-btn[data-v-c6028849]{padding:6px 14px;border:none;background:var(--bg-secondary);color:var(--text-secondary);font-size:.8rem;font-weight:500;cursor:pointer;transition:all .15s ease}.toggle-btn[data-v-c6028849]:not(:last-child){border-right:1px solid var(--border-color)}.toggle-btn.active[data-v-c6028849]{background:var(--text-accent);color:#fff}.toggle-btn[data-v-c6028849]:hover:not(.active){background:var(--bg-tertiary);color:var(--text-primary)}.card[data-v-c6028849]{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:12px;padding:20px 24px}.card-title[data-v-c6028849]{font-size:1rem;font-weight:600;color:var(--text-primary);margin:0 0 16px}.panels-grid[data-v-c6028849]{display:grid;grid-template-columns:1fr 1fr;gap:16px}@media(max-width:800px){.panels-grid[data-v-c6028849]{grid-template-columns:1fr}}.kpi-grid-4[data-v-c6028849]{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}@media(max-width:800px){.kpi-grid-4[data-v-c6028849]{grid-template-columns:repeat(2,1fr)}}@media(max-width:500px){.kpi-grid-4[data-v-c6028849]{grid-template-columns:1fr}}.data-table-wrapper[data-v-85d7e111]{overflow-x:auto;-webkit-overflow-scrolling:touch}.data-table[data-v-85d7e111]{width:100%;border-collapse:collapse;font-size:.85rem}.data-table thead th[data-v-85d7e111]{padding:10px 12px;font-weight:600;font-size:.75rem;color:var(--text-tertiary);text-transform:uppercase;letter-spacing:.04em;border-bottom:1px solid var(--border-color);white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none}.col-header.sortable[data-v-85d7e111]{cursor:pointer;transition:color .15s ease}.col-header.sortable[data-v-85d7e111]:hover{color:var(--text-primary)}.sort-indicator[data-v-85d7e111]{margin-left:4px;font-size:.7rem;opacity:.6}.col-rank[data-v-85d7e111]{width:40px;text-align:center}.col-expand[data-v-85d7e111]{width:28px;text-align:center}.data-table tbody td[data-v-85d7e111]{padding:10px 12px;color:var(--text-primary);border-bottom:1px solid var(--border-color);white-space:nowrap}.data-row.expandable[data-v-85d7e111]{cursor:pointer;transition:background .12s ease}.data-row.expandable[data-v-85d7e111]:hover,.data-row.expanded[data-v-85d7e111]{background:var(--bg-tertiary)}.cell-rank[data-v-85d7e111]{color:var(--text-tertiary);font-weight:600;text-align:center;font-size:.8rem}.cell-chevron[data-v-85d7e111]{text-align:center}.chevron[data-v-85d7e111]{display:inline-block;font-size:.7rem;color:var(--text-tertiary);transition:transform .2s ease}.chevron.open[data-v-85d7e111]{transform:rotate(90deg)}.expand-row td[data-v-85d7e111]{padding:0;border-bottom:1px solid var(--border-color)}.expand-cell[data-v-85d7e111]{padding:0!important}.expand-content[data-v-85d7e111]{overflow:hidden;animation:slideDown-85d7e111 .2s ease;padding:12px 16px 16px;background:var(--bg-primary);border-top:1px solid var(--border-color)}@keyframes slideDown-85d7e111{0%{max-height:0;opacity:0}to{max-height:600px;opacity:1}}.align-left[data-v-85d7e111]{text-align:left}.align-right[data-v-85d7e111]{text-align:right}.align-center[data-v-85d7e111]{text-align:center}@media(max-width:768px){.hide-narrow[data-v-85d7e111]{display:none}}.projects-page[data-v-4807abfe]{display:flex;flex-direction:column;gap:16px}.page-title[data-v-4807abfe]{font-size:1.5rem;font-weight:600;color:var(--text-primary);margin:0}.kpi-grid-3[data-v-4807abfe]{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}@media(max-width:600px){.kpi-grid-3[data-v-4807abfe]{grid-template-columns:1fr}}.card[data-v-4807abfe]{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:12px;padding:20px 24px}.card-title[data-v-4807abfe]{font-size:1rem;font-weight:600;color:var(--text-primary);margin:0 0 16px}.sub-table-section[data-v-4807abfe]{padding:4px 0}.sub-table-title[data-v-4807abfe]{font-size:.8rem;font-weight:600;color:var(--text-secondary);margin:0 0 10px;text-transform:uppercase;letter-spacing:.04em}.no-sessions[data-v-4807abfe]{color:var(--text-tertiary);font-size:.85rem;font-style:italic;margin:0;padding:8px 0}.filter-pills[data-v-235ce6f8]{display:flex;gap:6px;flex-wrap:wrap}.pill[data-v-235ce6f8]{padding:5px 14px;border:1px solid var(--border-color);border-radius:20px;background:transparent;color:var(--text-tertiary);font-size:.8rem;font-family:inherit;cursor:pointer;transition:all .15s ease;white-space:nowrap}.pill[data-v-235ce6f8]:hover{color:var(--text-primary);border-color:var(--text-secondary)}.pill.active[data-v-235ce6f8]{color:var(--text-primary);background:var(--bg-tertiary);border-color:var(--text-secondary);font-weight:600}.sessions-page[data-v-c8fae991]{display:flex;flex-direction:column;gap:16px}.page-title[data-v-c8fae991]{font-size:1.5rem;font-weight:600;color:var(--text-primary);margin:0}.kpi-grid-4[data-v-c8fae991]{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}@media(max-width:768px){.kpi-grid-4[data-v-c8fae991]{grid-template-columns:repeat(2,1fr)}}@media(max-width:480px){.kpi-grid-4[data-v-c8fae991]{grid-template-columns:1fr}}.card[data-v-c8fae991]{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:12px;padding:20px 24px}.card-title[data-v-c8fae991]{font-size:1rem;font-weight:600;color:var(--text-primary);margin:0 0 16px;display:flex;align-items:center;gap:8px}.count-badge[data-v-c8fae991]{font-size:.75rem;font-weight:500;color:var(--text-tertiary);background:var(--bg-tertiary);border-radius:10px;padding:2px 8px}.filter-bar[data-v-c8fae991]{display:flex;flex-wrap:wrap;gap:12px;align-items:center}.search-input[data-v-c8fae991]{flex:1 1 200px;min-width:180px;padding:8px 14px;border:1px solid var(--border-color);border-radius:8px;background:var(--bg-primary);color:var(--text-primary);font-size:.85rem;font-family:inherit;outline:none;transition:border-color .15s ease}.search-input[data-v-c8fae991]::-moz-placeholder{color:var(--text-tertiary)}.search-input[data-v-c8fae991]::placeholder{color:var(--text-tertiary)}.search-input[data-v-c8fae991]:focus{border-color:var(--text-secondary)}.filter-group[data-v-c8fae991]{flex-shrink:0}.session-detail[data-v-c8fae991]{display:flex;flex-direction:column;gap:16px}.detail-section[data-v-c8fae991]{padding:0}.detail-section-title[data-v-c8fae991]{font-size:.8rem;font-weight:600;color:var(--text-secondary);margin:0 0 10px;text-transform:uppercase;letter-spacing:.04em}.info-row[data-v-c8fae991]{display:flex;flex-wrap:wrap;gap:16px;padding:12px 16px;background:var(--bg-tertiary);border-radius:8px}.info-item[data-v-c8fae991]{display:flex;align-items:center;gap:6px}.info-label[data-v-c8fae991]{font-size:.75rem;font-weight:600;color:var(--text-tertiary);text-transform:uppercase;letter-spacing:.03em}.info-value[data-v-c8fae991]{font-size:.85rem;color:var(--text-primary)}.tag-chip[data-v-c8fae991]{display:inline-block;padding:2px 8px;background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:12px;font-size:.75rem;color:var(--text-secondary);margin-right:4px}.mode-badge[data-v-c8fae991]{display:inline-block;padding:2px 8px;border-radius:12px;font-size:.75rem;font-weight:600}.mode-agent[data-v-c8fae991]{background:#8b5cf626;color:#a78bfa}.mode-normal[data-v-c8fae991]{background:#3b82f626;color:#60a5fa}.branch-name[data-v-c8fae991]{font-family:SF Mono,Monaco,Menlo,monospace;font-size:.8rem;padding:2px 6px;background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:4px}.metadata-grid[data-v-c8fae991]{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px}.meta-item[data-v-c8fae991]{display:flex;flex-direction:column;gap:2px;padding:10px 12px;background:var(--bg-tertiary);border-radius:8px}.meta-label[data-v-c8fae991]{font-size:.7rem;font-weight:600;color:var(--text-tertiary);text-transform:uppercase;letter-spacing:.04em}.meta-value[data-v-c8fae991]{font-size:.95rem;font-weight:600;color:var(--text-primary)}.error-highlight[data-v-c8fae991]{color:#ef4444}.chip-row[data-v-c8fae991]{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px;padding:8px 12px;background:var(--bg-tertiary);border-radius:8px}.chip-row-label[data-v-c8fae991]{font-size:.7rem;font-weight:600;color:var(--text-tertiary);text-transform:uppercase;letter-spacing:.04em;flex-shrink:0}.chip-row-list[data-v-c8fae991]{display:inline-flex;flex-wrap:wrap;gap:6px}.capability-chip[data-v-c8fae991]{display:inline-block;padding:2px 8px;background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:12px;font-size:.75rem;color:var(--text-secondary);font-family:SF Mono,Monaco,Menlo,monospace;white-space:nowrap;cursor:default}.subagent-chip[data-v-c8fae991]{border-color:#8b5cf666;color:#a78bfa}.plugin-chip[data-v-c8fae991]{border-color:#3b82f666;color:#60a5fa}.skill-chip[data-v-c8fae991]{border-color:#10b98166;color:#34d399}.hook-chip[data-v-c8fae991]{border-color:#f59e0b66;color:#fbbf24}.orphan-banner[data-v-c8fae991]{padding:8px 12px;background:#f59e0b1a;border:1px solid rgba(245,158,11,.4);border-radius:8px;color:#fbbf24;font-size:.75rem;font-weight:500}.no-sessions[data-v-c8fae991]{color:var(--text-tertiary);font-size:.85rem;font-style:italic;margin:0;padding:8px 0;text-align:center}.calendar-heatmap[data-v-d20bbacd]{width:100%}.month-labels[data-v-d20bbacd]{overflow:hidden;margin-bottom:4px}.month-label[data-v-d20bbacd]{position:absolute;font-size:.7rem;color:var(--text-tertiary);white-space:nowrap}.heatmap-body[data-v-d20bbacd]{display:flex;gap:4px}.weekday-labels[data-v-d20bbacd]{position:relative;width:32px;flex-shrink:0}.weekday-label[data-v-d20bbacd]{position:absolute;font-size:.65rem;color:var(--text-tertiary);text-align:right;width:100%;padding-right:4px}.heatmap-scroll-container[data-v-d20bbacd]{overflow-x:auto;position:relative;flex:1;min-width:0}.heatmap-scroll-container[data-v-d20bbacd]::-webkit-scrollbar{height:4px}.heatmap-scroll-container[data-v-d20bbacd]::-webkit-scrollbar-thumb{background:var(--bg-deep);border-radius:2px}.heatmap-grid[data-v-d20bbacd]{min-width:-moz-fit-content;min-width:fit-content}.heatmap-cell[data-v-d20bbacd]{position:absolute;border-radius:2px;cursor:pointer;transition:outline-color .1s ease;outline:1px solid transparent}.heatmap-cell[data-v-d20bbacd]:hover{outline-color:var(--text-secondary)}.scheme-turns .level-0[data-v-d20bbacd]{background-color:#161b22}.scheme-turns .level-1[data-v-d20bbacd]{background-color:#0e4429}.scheme-turns .level-2[data-v-d20bbacd]{background-color:#006d32}.scheme-turns .level-3[data-v-d20bbacd]{background-color:#26a641}.scheme-turns .level-4[data-v-d20bbacd]{background-color:#39d353}[data-theme=light] .scheme-turns .level-0[data-v-d20bbacd]{background-color:#ebedf0}[data-theme=light] .scheme-turns .level-1[data-v-d20bbacd]{background-color:#9be9a8}[data-theme=light] .scheme-turns .level-2[data-v-d20bbacd]{background-color:#40c463}[data-theme=light] .scheme-turns .level-3[data-v-d20bbacd]{background-color:#30a14e}[data-theme=light] .scheme-turns .level-4[data-v-d20bbacd]{background-color:#216e39}.scheme-cost .level-0[data-v-d20bbacd]{background-color:#161b22}.scheme-cost .level-1[data-v-d20bbacd]{background-color:#5f1e1e}.scheme-cost .level-2[data-v-d20bbacd]{background-color:#a63226}.scheme-cost .level-3[data-v-d20bbacd]{background-color:#e64141}.scheme-cost .level-4[data-v-d20bbacd]{background-color:#ff6b6b}[data-theme=light] .scheme-cost .level-0[data-v-d20bbacd]{background-color:#ebedf0}[data-theme=light] .scheme-cost .level-1[data-v-d20bbacd]{background-color:#fde68a}[data-theme=light] .scheme-cost .level-2[data-v-d20bbacd]{background-color:#f59e0b}[data-theme=light] .scheme-cost .level-3[data-v-d20bbacd]{background-color:#ea580c}[data-theme=light] .scheme-cost .level-4[data-v-d20bbacd]{background-color:#dc2626}.heatmap-tooltip[data-v-d20bbacd]{position:absolute;z-index:100;background:var(--bg-tertiary);border:1px solid var(--border-color);border-radius:6px;padding:8px 10px;pointer-events:none;white-space:nowrap;box-shadow:0 4px 12px #0000004d;transform:translate(-50%)}.tooltip-date[data-v-d20bbacd]{font-size:.75rem;font-weight:600;color:var(--text-primary);margin-bottom:4px}.tooltip-row[data-v-d20bbacd]{display:flex;justify-content:space-between;gap:12px;font-size:.7rem;line-height:1.5}.tooltip-label[data-v-d20bbacd]{color:var(--text-tertiary)}.tooltip-value[data-v-d20bbacd]{color:var(--text-primary);font-weight:500}.heatmap-legend[data-v-d20bbacd]{display:flex;align-items:center;gap:4px;justify-content:flex-end;margin-top:10px;padding-right:4px}.legend-text[data-v-d20bbacd]{font-size:.65rem;color:var(--text-tertiary);margin:0 2px}.legend-cell[data-v-d20bbacd]{width:12px;height:12px;border-radius:2px}@media(max-width:600px){.legend-cell[data-v-d20bbacd]{width:10px;height:10px}.weekday-labels[data-v-d20bbacd]{width:24px}.weekday-label[data-v-d20bbacd]{font-size:.55rem}.month-label[data-v-d20bbacd]{font-size:.6rem}}.heatmap-page[data-v-c259be42]{display:flex;flex-direction:column;gap:16px}.page-title[data-v-c259be42]{font-size:1.5rem;font-weight:600;color:var(--text-primary);margin:0}.contribution-summary[data-v-c259be42]{font-size:.85rem;color:var(--text-secondary)}.contribution-count[data-v-c259be42]{font-weight:600;color:var(--text-primary)}.metric-switcher[data-v-c259be42]{display:flex;gap:4px;background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:8px;padding:3px;width:-moz-fit-content;width:fit-content}.metric-pill[data-v-c259be42]{padding:6px 16px;border:none;border-radius:6px;font-size:.8rem;font-weight:500;cursor:pointer;background:transparent;color:var(--text-tertiary);transition:all .15s ease;font-family:inherit}.metric-pill[data-v-c259be42]:hover{color:var(--text-secondary)}.metric-pill.active[data-v-c259be42]{background:var(--bg-tertiary);color:var(--text-primary);box-shadow:0 1px 3px #00000026}[data-theme=light] .metric-pill.active[data-v-c259be42]{background:#fff;box-shadow:0 1px 3px #0000001a}.card[data-v-c259be42]{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:12px;padding:20px 24px}.heatmap-card[data-v-c259be42]{overflow:hidden}.card-title[data-v-c259be42]{font-size:1rem;font-weight:600;color:var(--text-primary);margin:0 0 16px}.stats-grid[data-v-c259be42]{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}@media(max-width:800px){.stats-grid[data-v-c259be42]{grid-template-columns:repeat(2,1fr)}}@media(max-width:500px){.stats-grid[data-v-c259be42]{grid-template-columns:1fr}}.wrapped-page[data-v-c1847141]{display:flex;flex-direction:column;gap:16px}.page-title[data-v-c1847141]{font-size:1.5rem;font-weight:600;color:var(--text-primary);margin:0}.hero-card[data-v-c1847141]{background:linear-gradient(135deg,var(--gradient-from),var(--gradient-to));border-radius:16px;padding:48px 32px;text-align:center;position:relative;overflow:hidden}.hero-card[data-v-c1847141]:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 30% 20%,rgba(255,255,255,.08) 0%,transparent 60%);pointer-events:none}.hero-year[data-v-c1847141]{font-size:1rem;font-weight:500;color:#ffffffb3;letter-spacing:.1em;text-transform:uppercase;margin-bottom:16px}.hero-archetype[data-v-c1847141]{font-size:3rem;font-weight:800;color:#fff;line-height:1.1;margin-bottom:12px;letter-spacing:-.02em}.hero-desc[data-v-c1847141]{font-size:1.1rem;color:#fffc;font-style:italic;max-width:500px;margin:0 auto 20px;line-height:1.5}.hero-date-range[data-v-c1847141]{font-size:.85rem;color:#ffffff80}.section-title[data-v-c1847141]{font-size:1.15rem;font-weight:600;color:var(--text-primary);margin:8px 0 0}.stats-grid[data-v-c1847141]{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}@media(max-width:800px){.stats-grid[data-v-c1847141]{grid-template-columns:repeat(2,1fr)}}@media(max-width:500px){.stats-grid[data-v-c1847141]{grid-template-columns:1fr}}.stat-card[data-v-c1847141]{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:12px;padding:20px;transition:border-color .15s ease}.stat-card[data-v-c1847141]:hover{border-color:var(--text-tertiary)}.stat-label[data-v-c1847141]{font-size:.72rem;font-weight:500;color:var(--text-tertiary);text-transform:uppercase;letter-spacing:.05em;margin-bottom:8px}.stat-big[data-v-c1847141]{font-size:2.5rem;font-weight:700;color:var(--text-primary);line-height:1.1}.stat-dim[data-v-c1847141]{font-size:1.5rem;font-weight:400;color:var(--text-tertiary)}.stat-cost[data-v-c1847141]{color:var(--archetype-color, var(--text-primary))}.stat-sub[data-v-c1847141]{font-size:.75rem;color:var(--text-secondary);margin-top:6px}.streak-flame[data-v-c1847141]{display:inline-block;width:24px;height:28px;margin-left:6px;vertical-align:middle;position:relative}.streak-flame[data-v-c1847141]:before{content:"";position:absolute;bottom:2px;left:50%;transform:translate(-50%);width:16px;height:22px;background:linear-gradient(to top,#ef4444,#f59e0b,#fbbf24);border-radius:50%/60% 60% 40% 40%;clip-path:polygon(50% 0%,85% 35%,75% 100%,50% 80%,25% 100%,15% 35%)}.progress-bar[data-v-c1847141]{width:100%;height:6px;background:var(--bg-deep);border-radius:3px;margin-top:10px;overflow:hidden}.progress-fill[data-v-c1847141]{height:100%;border-radius:3px;transition:width .6s ease}.peak-grid[data-v-c1847141]{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}@media(max-width:900px){.peak-grid[data-v-c1847141]{grid-template-columns:repeat(3,1fr)}}@media(max-width:500px){.peak-grid[data-v-c1847141]{grid-template-columns:repeat(2,1fr)}}.peak-card[data-v-c1847141]{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:12px;padding:20px;text-align:center;transition:border-color .15s ease}.peak-card[data-v-c1847141]:hover{border-color:var(--text-tertiary)}.peak-label[data-v-c1847141]{font-size:.72rem;font-weight:500;color:var(--text-tertiary);text-transform:uppercase;letter-spacing:.05em;margin-bottom:8px}.peak-big[data-v-c1847141]{font-size:2rem;font-weight:700;color:var(--text-primary);line-height:1.1}.peak-sub[data-v-c1847141]{font-size:.7rem;color:var(--text-secondary);margin-top:4px}.panels-grid[data-v-c1847141]{display:grid;grid-template-columns:1fr 1fr;gap:16px}@media(max-width:800px){.panels-grid[data-v-c1847141]{grid-template-columns:1fr}}.card[data-v-c1847141]{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:12px;padding:20px 24px}.card-title[data-v-c1847141]{font-size:1rem;font-weight:600;color:var(--text-primary);margin:0 0 16px}.record-card[data-v-c1847141]{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:12px;padding:24px;text-align:center;transition:border-color .15s ease}.record-card[data-v-c1847141]:hover{border-color:var(--text-tertiary)}.record-icon[data-v-c1847141]{width:40px;height:40px;border-radius:10px;margin:0 auto 12px;position:relative}.record-icon[data-v-c1847141]:after{content:"";position:absolute;inset:0;border-radius:10px}.record-icon-cost[data-v-c1847141]{background:linear-gradient(135deg,#fbbf24,#ef4444)}.record-icon-cost[data-v-c1847141]:after{content:"$";display:flex;align-items:center;justify-content:center;font-size:1.1rem;font-weight:700;color:#fff}.record-icon-time[data-v-c1847141]{background:linear-gradient(135deg,#3b82f6,#8b5cf6)}.record-icon-time[data-v-c1847141]:after{content:"";display:block;width:18px;height:18px;border:2px solid #fff;border-radius:50%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.record-label[data-v-c1847141]{font-size:.72rem;font-weight:500;color:var(--text-tertiary);text-transform:uppercase;letter-spacing:.05em;margin-bottom:8px}.record-big[data-v-c1847141]{font-size:2.5rem;font-weight:700;color:var(--text-primary);line-height:1.1;margin-bottom:8px}.record-meta[data-v-c1847141]{display:flex;justify-content:center;gap:12px;font-size:.8rem;color:var(--text-secondary);margin-bottom:4px}.record-id[data-v-c1847141]{font-family:SF Mono,Fira Code,monospace;color:var(--text-tertiary)}.record-project[data-v-c1847141]{color:var(--text-accent)}.record-sub[data-v-c1847141]{font-size:.75rem;color:var(--text-tertiary);font-style:italic}@media(max-width:600px){.hero-card[data-v-c1847141]{padding:32px 20px}.hero-archetype[data-v-c1847141]{font-size:2.2rem}.hero-desc[data-v-c1847141]{font-size:.95rem}.stat-big[data-v-c1847141]{font-size:2rem}.peak-big[data-v-c1847141]{font-size:1.6rem}.record-big[data-v-c1847141]{font-size:2rem}}.app-layout[data-v-62389286]{display:flex;min-height:100vh}.main-content[data-v-62389286]{margin-left:var(--sidebar-width);flex:1;padding:24px 32px;max-width:1200px}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.visible{visibility:visible}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.block{display:block}.inline{display:inline}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.flex-shrink{flex-shrink:1}.border-collapse{border-collapse:collapse}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize{resize:both}.flex-wrap{flex-wrap:wrap}.border{border-width:1px}.uppercase{text-transform:uppercase}.italic{font-style:italic}.outline{outline-style:solid}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:root{--bg-primary: #0a0a0b;--bg-secondary: #111113;--bg-tertiary: #18181b;--bg-deep: #27272a;--border-color: #27272a;--text-primary: #fafafa;--text-secondary: #a1a1aa;--text-tertiary: #71717a;--text-accent: #3b82f6;--footer-color: #71717a;--sidebar-width: 220px}[data-theme=light]{--bg-primary: #ffffff;--bg-secondary: #fafafa;--bg-tertiary: #f4f4f5;--bg-deep: #e4e4e7;--border-color: #e4e4e7;--text-primary: #09090b;--text-secondary: #52525b;--text-tertiary: #a1a1aa;--text-accent: #2563eb;--footer-color: #a1a1aa}*{box-sizing:border-box;font-variant-numeric:tabular-nums}body{margin:0;padding:0;background:var(--bg-primary);color:var(--text-primary);font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:var(--bg-primary)}::-webkit-scrollbar-thumb{background:var(--bg-deep);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--text-tertiary)}</style>
</head>
<body>
  <script>
    // Rust will replace this line with real data at build time
    window.__CC_DATA__ = "__DATA_PLACEHOLDER__";
  </script>
  <div id="app"></div>
</body>
</html>