/*! For license information please see 20.bundle.js.LICENSE.txt */ (self.webpackChunk=self.webpackChunk||[]).push([[20],{1984:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>jl});const n="undefined"==typeof window?function(e){return e()}:window.requestAnimationFrame;function i(e,t,a){const i=a||(e=>Array.prototype.slice.call(e));let l=!1,s=[];return function(...a){s=i(a),l||(l=!0,n.call(window,(()=>{l=!1,e.apply(t,s)})))}}const l=e=>"start"===e?"left":"end"===e?"right":"center",s=(e,t,a)=>"start"===e?t:"end"===e?a:(t+a)/2;function r(){}const o=function(){let e=0;return function(){return e++}}();function c(e){return null==e}function h(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return"[object"===t.substr(0,7)&&"Array]"===t.substr(-6)}function u(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}const p=e=>("number"==typeof e||e instanceof Number)&&isFinite(+e);function m(e,t){return p(e)?e:t}function d(e,t){return void 0===e?t:e}const A=(e,t)=>"string"==typeof e&&e.endsWith("%")?parseFloat(e)/100*t:+e;function f(e,t,a){if(e&&"function"==typeof e.call)return e.apply(a,t)}function M(e,t,a,n){let i,l,s;if(h(e))if(l=e.length,n)for(i=l-1;i>=0;i--)t.call(a,e[i],i);else for(i=0;ia;)e=e[t.substr(a,n-a)],a=n+1,n=L(t,a);return e}function S(e){return e.charAt(0).toUpperCase()+e.slice(1)}const _=e=>void 0!==e,z=e=>"function"==typeof e,x=(e,t)=>{if(e.size!==t.size)return!1;for(const a of e)if(!t.has(a))return!1;return!0},k=Math.PI,w=2*k,E=w+k,T=Number.POSITIVE_INFINITY,O=k/180,P=k/2,R=k/4,D=2*k/3,N=Math.log10,I=Math.sign;function F(e){const t=Math.round(e);e=j(e,t,e/1e3)?t:e;const a=Math.pow(10,Math.floor(N(e))),n=e/a;return(n<=1?1:n<=2?2:n<=5?5:10)*a}function B(e){return!isNaN(parseFloat(e))&&isFinite(e)}function j(e,t,a){return Math.abs(e-t)o&&c=Math.min(t,a)-n&&e<=Math.max(t,a)+n}const te=e=>0===e||1===e,ae=(e,t,a)=>-Math.pow(2,10*(e-=1))*Math.sin((e-t)*w/a),ne=(e,t,a)=>Math.pow(2,-10*e)*Math.sin((e-t)*w/a)+1,ie={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=>1-Math.cos(e*P),easeOutSine:e=>Math.sin(e*P),easeInOutSine:e=>-.5*(Math.cos(k*e)-1),easeInExpo:e=>0===e?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>te(e)?e:e<.5?.5*Math.pow(2,10*(2*e-1)):.5*(2-Math.pow(2,-10*(2*e-1))),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=>te(e)?e:ae(e,.075,.3),easeOutElastic:e=>te(e)?e:ne(e,.075,.3),easeInOutElastic(e){const t=.1125;return te(e)?e:e<.5?.5*ae(2*e,t,.45):.5+.5*ne(2*e-1,t,.45)},easeInBack(e){const t=1.70158;return e*e*((t+1)*e-t)},easeOutBack(e){const t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:e=>1-ie.easeOutBounce(1-e),easeOutBounce(e){const t=7.5625,a=2.75;return e<1/a?t*e*e:e<2/a?t*(e-=1.5/a)*e+.75:e<2.5/a?t*(e-=2.25/a)*e+.9375:t*(e-=2.625/a)*e+.984375},easeInOutBounce:e=>e<.5?.5*ie.easeInBounce(2*e):.5*ie.easeOutBounce(2*e-1)+.5},le={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},se="0123456789ABCDEF",re=e=>se[15&e],oe=e=>se[(240&e)>>4]+se[15&e],ce=e=>(240&e)>>4==(15&e);function he(e){return e+.5|0}const ue=(e,t,a)=>Math.max(Math.min(e,a),t);function pe(e){return ue(he(2.55*e),0,255)}function me(e){return ue(he(255*e),0,255)}function de(e){return ue(he(e/2.55)/100,0,1)}function Ae(e){return ue(he(100*e),0,100)}const fe=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,Me=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function ye(e,t,a){const n=t*Math.min(a,1-a),i=(t,i=(t+e/30)%12)=>a-n*Math.max(Math.min(i-3,9-i,1),-1);return[i(0),i(8),i(4)]}function ge(e,t,a){const n=(n,i=(n+e/60)%6)=>a-a*t*Math.max(Math.min(i,4-i,1),0);return[n(5),n(3),n(1)]}function ve(e,t,a){const n=ye(e,1,.5);let i;for(t+a>1&&(i=1/(t+a),t*=i,a*=i),i=0;i<3;i++)n[i]*=1-t-a,n[i]+=t;return n}function He(e){const t=e.r/255,a=e.g/255,n=e.b/255,i=Math.max(t,a,n),l=Math.min(t,a,n),s=(i+l)/2;let r,o,c;return i!==l&&(c=i-l,o=s>.5?c/(2-i-l):c/(i+l),r=i===t?(a-n)/c+(a=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=me(e[3]))):(t=ze(e,{r:0,g:0,b:0,a:1})).a=me(t.a),t}function ke(e){return"r"===e.charAt(0)?function(e){const t=fe.exec(e);let a,n,i,l=255;if(t){if(t[7]!==a){const e=+t[7];l=255&(t[8]?pe(e):255*e)}return a=+t[1],n=+t[3],i=+t[5],a=255&(t[2]?pe(a):a),n=255&(t[4]?pe(n):n),i=255&(t[6]?pe(i):i),{r:a,g:n,b:i,a:l}}}(e):function(e){const t=Me.exec(e);let a,n=255;if(!t)return;t[5]!==a&&(n=t[6]?pe(+t[5]):me(+t[5]));const i=Ce(+t[2]),l=+t[3]/100,s=+t[4]/100;return a="hwb"===t[1]?function(e,t,a){return Ve(ve,e,t,a)}(i,l,s):"hsv"===t[1]?function(e,t,a){return Ve(ge,e,t,a)}(i,l,s):Ze(i,l,s),{r:a[0],g:a[1],b:a[2],a:n}}(e)}class we{constructor(e){if(e instanceof we)return e;const t=typeof e;let a;var n,i,l;"object"===t?a=xe(e):"string"===t&&(l=(n=e).length,"#"===n[0]&&(4===l||5===l?i={r:255&17*le[n[1]],g:255&17*le[n[2]],b:255&17*le[n[3]],a:5===l?17*le[n[4]]:255}:7!==l&&9!==l||(i={r:le[n[1]]<<4|le[n[2]],g:le[n[3]]<<4|le[n[4]],b:le[n[5]]<<4|le[n[6]],a:9===l?le[n[7]]<<4|le[n[8]]:255})),a=i||function(e){Se||(Se=function(){const e={},t=Object.keys(be),a=Object.keys(Le);let n,i,l,s,r;for(n=0;n>16&255,l>>8&255,255&l]}return e}(),Se.transparent=[0,0,0,0]);const t=Se[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:4===t.length?t[3]:255}}(e)||ke(e)),this._rgb=a,this._valid=!!a}get valid(){return this._valid}get rgb(){var e=ze(this._rgb);return e&&(e.a=de(e.a)),e}set rgb(e){this._rgb=xe(e)}rgbString(){return this._valid?(e=this._rgb)&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${de(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`):this._rgb;var e}hexString(){return this._valid?(e=this._rgb,t=function(e){return ce(e.r)&&ce(e.g)&&ce(e.b)&&ce(e.a)}(e)?re:oe,e?"#"+t(e.r)+t(e.g)+t(e.b)+(e.a<255?t(e.a):""):e):this._rgb;var e,t}hslString(){return this._valid?function(e){if(!e)return;const t=He(e),a=t[0],n=Ae(t[1]),i=Ae(t[2]);return e.a<255?`hsla(${a}, ${n}%, ${i}%, ${de(e.a)})`:`hsl(${a}, ${n}%, ${i}%)`}(this._rgb):this._rgb}mix(e,t){const a=this;if(e){const n=a.rgb,i=e.rgb;let l;const s=t===l?.5:t,r=2*s-1,o=n.a-i.a,c=((r*o==-1?r:(r+o)/(1+r*o))+1)/2;l=1-c,n.r=255&c*n.r+l*i.r+.5,n.g=255&c*n.g+l*i.g+.5,n.b=255&c*n.b+l*i.b+.5,n.a=s*n.a+(1-s)*i.a,a.rgb=n}return a}clone(){return new we(this.rgb)}alpha(e){return this._rgb.a=me(e),this}clearer(e){return this._rgb.a*=1-e,this}greyscale(){const e=this._rgb,t=he(.3*e.r+.59*e.g+.11*e.b);return e.r=e.g=e.b=t,this}opaquer(e){return this._rgb.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return _e(this._rgb,2,e),this}darken(e){return _e(this._rgb,2,-e),this}saturate(e){return _e(this._rgb,1,e),this}desaturate(e){return _e(this._rgb,1,-e),this}rotate(e){return function(e,t){var a=He(e);a[0]=Ce(a[0]+t),a=Ze(a),e.r=a[0],e.g=a[1],e.b=a[2]}(this._rgb,e),this}}function Ee(e){return new we(e)}const Te=e=>e instanceof CanvasGradient||e instanceof CanvasPattern;function Oe(e){return Te(e)?e:Ee(e)}function Pe(e){return Te(e)?e:Ee(e).saturate(.5).darken(.1).hexString()}const Re=Object.create(null),De=Object.create(null);function Ne(e,t){if(!t)return e;const a=t.split(".");for(let t=0,n=a.length;te.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=(e,t)=>Pe(t.backgroundColor),this.hoverBorderColor=(e,t)=>Pe(t.borderColor),this.hoverColor=(e,t)=>Pe(t.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e)}set(e,t){return Ie(this,e,t)}get(e){return Ne(this,e)}describe(e,t){return Ie(De,e,t)}override(e,t){return Ie(Re,e,t)}route(e,t,a,n){const i=Ne(this,e),l=Ne(this,a),s="_"+t;Object.defineProperties(i,{[s]:{value:i[t],writable:!0},[t]:{enumerable:!0,get(){const e=this[s],t=l[n];return u(e)?Object.assign({},t,e):d(e,t)},set(e){this[s]=e}}})}}({_scriptable:e=>!e.startsWith("on"),_indexable:e=>"events"!==e,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function Be(e,t,a,n,i){let l=t[i];return l||(l=t[i]=e.measureText(i).width,a.push(i)),l>n&&(n=l),n}function je(e,t,a,n){let i=(n=n||{}).data=n.data||{},l=n.garbageCollect=n.garbageCollect||[];n.font!==t&&(i=n.data={},l=n.garbageCollect=[],n.font=t),e.save(),e.font=t;let s=0;const r=a.length;let o,c,u,p,m;for(o=0;oa.length){for(o=0;o0&&e.stroke()}}function $e(e,t,a){return a=a||.5,!t||e&&e.x>t.left-a&&e.xt.top-a&&e.y0&&""!==l.strokeColor;let o,u;for(e.save(),e.font=i.string,function(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),c(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}(e,l),o=0;od(e[a],e[t[a]]):t=>e[t]:()=>e;for(const e of i)a[e]=+l(e)||0;return a}function lt(e){return it(e,{top:"y",right:"x",bottom:"y",left:"x"})}function st(e){return it(e,["topLeft","topRight","bottomLeft","bottomRight"])}function rt(e){const t=lt(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function ot(e,t){e=e||{},t=t||Fe.font;let a=d(e.size,t.size);"string"==typeof a&&(a=parseInt(a,10));let n=d(e.style,t.style);n&&!(""+n).match(at)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const i={family:d(e.family,t.family),lineHeight:nt(d(e.lineHeight,t.lineHeight),a),size:a,style:n,weight:d(e.weight,t.weight),string:""};return i.string=function(e){return!e||c(e.size)||c(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}(i),i}function ct(e,t,a,n){let i,l,s,r=!0;for(i=0,l=e.length;ie[a]1;)n=l+i>>1,a(n)?l=n:i=n;return{lo:l,hi:i}}const pt=(e,t,a)=>ut(e,a,(n=>e[n][t]ut(e,a,(n=>e[n][t]>=a)),dt=["push","pop","shift","splice","unshift"];function At(e,t){const a=e._chartjs;if(!a)return;const n=a.listeners,i=n.indexOf(t);-1!==i&&n.splice(i,1),n.length>0||(dt.forEach((t=>{delete e[t]})),delete e._chartjs)}function ft(e){const t=new Set;let a,n;for(a=0,n=e.length;ae[0])){_(n)||(n=_t("_fallback",e));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:n,_getTarget:i,override:i=>Mt([i,...e],t,a,n)};return new Proxy(l,{deleteProperty:(t,a)=>(delete t[a],delete t._keys,delete e[0][a],!0),get:(a,n)=>Vt(a,n,(()=>function(e,t,a,n){let i;for(const l of t)if(i=_t(vt(l,e),a),_(i))return Ht(e,i)?bt(a,n,e,i):i}(n,t,e,a))),getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e._scopes[0],t),getPrototypeOf:()=>Reflect.getPrototypeOf(e[0]),has:(e,t)=>zt(e).includes(t),ownKeys:e=>zt(e),set(e,t,a){const n=e._storage||(e._storage=i());return e[t]=n[t]=a,delete e._keys,!0}})}function yt(e,t,a,n){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:a,_stack:new Set,_descriptors:gt(e,n),setContext:t=>yt(e,t,a,n),override:i=>yt(e.override(i),t,a,n)};return new Proxy(i,{deleteProperty:(t,a)=>(delete t[a],delete e[a],!0),get:(e,t,a)=>Vt(e,t,(()=>function(e,t,a){const{_proxy:n,_context:i,_subProxy:l,_descriptors:s}=e;let r=n[t];return z(r)&&s.isScriptable(t)&&(r=function(e,t,a,n){const{_proxy:i,_context:l,_subProxy:s,_stack:r}=a;if(r.has(e))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+e);return r.add(e),t=t(l,s||n),r.delete(e),Ht(e,t)&&(t=bt(i._scopes,i,e,t)),t}(t,r,e,a)),h(r)&&r.length&&(r=function(e,t,a,n){const{_proxy:i,_context:l,_subProxy:s,_descriptors:r}=a;if(_(l.index)&&n(e))t=t[l.index%t.length];else if(u(t[0])){const a=t,n=i._scopes.filter((e=>e!==a));t=[];for(const o of a){const a=bt(n,i,e,o);t.push(yt(a,l,s&&s[e],r))}}return t}(t,r,e,s.isIndexable)),Ht(t,r)&&(r=yt(r,i,l&&l[t],s)),r}(e,t,a))),getOwnPropertyDescriptor:(t,a)=>t._descriptors.allKeys?Reflect.has(e,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,a),getPrototypeOf:()=>Reflect.getPrototypeOf(e),has:(t,a)=>Reflect.has(e,a),ownKeys:()=>Reflect.ownKeys(e),set:(t,a,n)=>(e[a]=n,delete t[a],!0)})}function gt(e,t={scriptable:!0,indexable:!0}){const{_scriptable:a=t.scriptable,_indexable:n=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:a,indexable:n,isScriptable:z(a)?a:()=>a,isIndexable:z(n)?n:()=>n}}const vt=(e,t)=>e?e+S(t):t,Ht=(e,t)=>u(t)&&"adapters"!==e&&(null===Object.getPrototypeOf(t)||t.constructor===Object);function Vt(e,t,a){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const n=a();return e[t]=n,n}function Zt(e,t,a){return z(e)?e(t,a):e}const Ct=(e,t)=>!0===e?t:"string"==typeof e?b(t,e):void 0;function Lt(e,t,a,n,i){for(const l of t){const t=Ct(a,l);if(t){e.add(t);const l=Zt(t._fallback,a,i);if(_(l)&&l!==a&&l!==n)return l}else if(!1===t&&_(n)&&a!==n)return null}return!1}function bt(e,t,a,n){const i=t._rootScopes,l=Zt(t._fallback,a,n),s=[...e,...i],r=new Set;r.add(n);let o=St(r,s,a,l||a,n);return null!==o&&(!_(l)||l===a||(o=St(r,s,l,o,n),null!==o))&&Mt(Array.from(r),[""],i,l,(()=>function(e,t,a){const n=e._getTarget();t in n||(n[t]={});const i=n[t];return h(i)&&u(a)?a:i}(t,a,n)))}function St(e,t,a,n,i){for(;a;)a=Lt(e,t,a,n,i);return a}function _t(e,t){for(const a of t){if(!a)continue;const t=a[e];if(_(t))return t}}function zt(e){let t=e._keys;return t||(t=e._keys=function(e){const t=new Set;for(const a of e)for(const e of Object.keys(a).filter((e=>!e.startsWith("_"))))t.add(e);return Array.from(t)}(e._scopes)),t}const xt=Number.EPSILON||1e-14,kt=(e,t)=>t"x"===e?"y":"x";function Et(e,t,a,n){const i=e.skip?t:e,l=t,s=a.skip?t:a,r=Y(l,i),o=Y(s,l);let c=r/(r+o),h=o/(r+o);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=n*c,p=n*h;return{previous:{x:l.x-u*(s.x-i.x),y:l.y-u*(s.y-i.y)},next:{x:l.x+p*(s.x-i.x),y:l.y+p*(s.y-i.y)}}}function Tt(e,t,a){return Math.max(Math.min(e,a),t)}function Ot(e,t,a,n,i){let l,s,r,o;if(t.spanGaps&&(e=e.filter((e=>!e.skip))),"monotone"===t.cubicInterpolationMode)!function(e,t="x"){const a=wt(t),n=e.length,i=Array(n).fill(0),l=Array(n);let s,r,o,c=kt(e,0);for(s=0;swindow.getComputedStyle(e,null),It=["top","right","bottom","left"];function Ft(e,t,a){const n={};a=a?"-"+a:"";for(let i=0;i<4;i++){const l=It[i];n[l]=parseFloat(e[t+"-"+l+a])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function Bt(e,t){const{canvas:a,currentDevicePixelRatio:n}=t,i=Nt(a),l="border-box"===i.boxSizing,s=Ft(i,"padding"),r=Ft(i,"border","width"),{x:o,y:c,box:h}=function(e,t){const a=e.native||e,n=a.touches,i=n&&n.length?n[0]:a,{offsetX:l,offsetY:s}=i;let r,o,c=!1;if(((e,t,a)=>(e>0||t>0)&&(!a||!a.shadowRoot))(l,s,a.target))r=l,o=s;else{const e=t.getBoundingClientRect();r=i.clientX-e.left,o=i.clientY-e.top,c=!0}return{x:r,y:o,box:c}}(e,a),u=s.left+(h&&r.left),p=s.top+(h&&r.top);let{width:m,height:d}=t;return l&&(m-=s.width+r.width,d-=s.height+r.height),{x:Math.round((o-u)/m*a.width/n),y:Math.round((c-p)/d*a.height/n)}}const jt=e=>Math.round(10*e)/10;function Ut(e,t,a){const n=t||1,i=Math.floor(e.height*n),l=Math.floor(e.width*n);e.height=i/n,e.width=l/n;const s=e.canvas;return s.style&&(a||!s.style.height&&!s.style.width)&&(s.style.height=`${e.height}px`,s.style.width=`${e.width}px`),(e.currentDevicePixelRatio!==n||s.height!==i||s.width!==l)&&(e.currentDevicePixelRatio=n,s.height=i,s.width=l,e.ctx.setTransform(n,0,0,n,0,0),!0)}const qt=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}return e}();function Wt(e,t){const a=function(e,t){return Nt(e).getPropertyValue(t)}(e,t),n=a&&a.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function $t(e,t,a,n){return{x:e.x+a*(t.x-e.x),y:e.y+a*(t.y-e.y)}}function Gt(e,t,a,n){return{x:e.x+a*(t.x-e.x),y:"middle"===n?a<.5?e.y:t.y:"after"===n?a<1?e.y:t.y:a>0?t.y:e.y}}function Yt(e,t,a,n){const i={x:e.cp2x,y:e.cp2y},l={x:t.cp1x,y:t.cp1y},s=$t(e,i,a),r=$t(i,l,a),o=$t(l,t,a),c=$t(s,r,a),h=$t(r,o,a);return $t(c,h,a)}const Kt=new Map;function Xt(e,t,a){return function(e,t){t=t||{};const a=e+JSON.stringify(t);let n=Kt.get(a);return n||(n=new Intl.NumberFormat(e,t),Kt.set(a,n)),n}(t,a).format(e)}function Jt(e,t,a){return e?function(e,t){return{x:a=>e+e+t-a,setWidth(e){t=e},textAlign:e=>"center"===e?e:"right"===e?"left":"right",xPlus:(e,t)=>e-t,leftForLtr:(e,t)=>e-t}}(t,a):{x:e=>e,setWidth(e){},textAlign:e=>e,xPlus:(e,t)=>e+t,leftForLtr:(e,t)=>e}}function Qt(e,t){let a,n;"ltr"!==t&&"rtl"!==t||(a=e.canvas.style,n=[a.getPropertyValue("direction"),a.getPropertyPriority("direction")],a.setProperty("direction",t,"important"),e.prevTextDirection=n)}function ea(e,t){void 0!==t&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function ta(e){return"angle"===e?{between:J,compare:K,normalize:X}:{between:ee,compare:(e,t)=>e-t,normalize:e=>e}}function aa({start:e,end:t,count:a,loop:n,style:i}){return{start:e%a,end:t%a,loop:n&&(t-e+1)%a==0,style:i}}function na(e,t,a){if(!a)return[e];const{property:n,start:i,end:l}=a,s=t.length,{compare:r,between:o,normalize:c}=ta(n),{start:h,end:u,loop:p,style:m}=function(e,t,a){const{property:n,start:i,end:l}=a,{between:s,normalize:r}=ta(n),o=t.length;let c,h,{start:u,end:p,loop:m}=e;if(m){for(u+=o,p+=o,c=0,h=o;cn({chart:e,initial:t.initial,numSteps:l,currentStep:Math.min(a-t.start,l)})))}_refresh(){this._request||(this._running=!0,this._request=n.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(e=Date.now()){let t=0;this._charts.forEach(((a,n)=>{if(!a.running||!a.items.length)return;const i=a.items;let l,s=i.length-1,r=!1;for(;s>=0;--s)l=i[s],l._active?(l._total>a.duration&&(a.duration=l._total),l.tick(e),r=!0):(i[s]=i[i.length-1],i.pop());r&&(n.draw(),this._notify(n,a,e,"progress")),i.length||(a.running=!1,this._notify(n,a,e,"complete"),a.initial=!1),t+=i.length})),this._lastDate=e,0===t&&(this._running=!1)}_getAnims(e){const t=this._charts;let a=t.get(e);return a||(a={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,a)),a}listen(e,t,a){this._getAnims(e).listeners[t].push(a)}add(e,t){t&&t.length&&this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce(((e,t)=>Math.max(e,t._duration)),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!!(t&&t.running&&t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const a=t.items;let n=a.length-1;for(;n>=0;--n)a[n].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}};const oa="transparent",ca={boolean:(e,t,a)=>a>.5?t:e,color(e,t,a){const n=Oe(e||oa),i=n.valid&&Oe(t||oa);return i&&i.valid?i.mix(n,a).hexString():t},number:(e,t,a)=>e+(t-e)*a};class ha{constructor(e,t,a,n){const i=t[a];n=ct([e.to,n,i,e.from]);const l=ct([e.from,i,n]);this._active=!0,this._fn=e.fn||ca[e.type||typeof l],this._easing=ie[e.easing]||ie.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=a,this._from=l,this._to=n,this._promises=void 0}active(){return this._active}update(e,t,a){if(this._active){this._notify(!1);const n=this._target[this._prop],i=a-this._start,l=this._duration-i;this._start=a,this._duration=Math.floor(Math.max(l,e.duration)),this._total+=i,this._loop=!!e.loop,this._to=ct([e.to,t,n,e.from]),this._from=ct([e.from,n,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,a=this._duration,n=this._prop,i=this._from,l=this._loop,s=this._to;let r;if(this._active=i!==s&&(l||t1?2-r:r,r=this._easing(Math.min(1,Math.max(0,r))),this._target[n]=this._fn(i,s,r))}wait(){const e=this._promises||(this._promises=[]);return new Promise(((t,a)=>{e.push({res:t,rej:a})}))}_notify(e){const t=e?"res":"rej",a=this._promises||[];for(let e=0;e"onProgress"!==e&&"onComplete"!==e&&"fn"!==e}),Fe.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),Fe.describe("animations",{_fallback:"animation"}),Fe.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>0|e}}}});class pa{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!u(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach((a=>{const n=e[a];if(!u(n))return;const i={};for(const e of ua)i[e]=n[e];(h(n.properties)&&n.properties||[a]).forEach((e=>{e!==a&&t.has(e)||t.set(e,i)}))}))}_animateOptions(e,t){const a=t.options,n=function(e,t){if(!t)return;let a=e.options;if(a)return a.$shared&&(e.options=a=Object.assign({},a,{$shared:!1,$animations:{}})),a;e.options=t}(e,a);if(!n)return[];const i=this._createAnimations(n,a);return a.$shared&&function(e,t){const a=[],n=Object.keys(t);for(let t=0;t{e.options=a}),(()=>{})),i}_createAnimations(e,t){const a=this._properties,n=[],i=e.$animations||(e.$animations={}),l=Object.keys(t),s=Date.now();let r;for(r=l.length-1;r>=0;--r){const o=l[r];if("$"===o.charAt(0))continue;if("options"===o){n.push(...this._animateOptions(e,t));continue}const c=t[o];let h=i[o];const u=a.get(o);if(h){if(u&&h.active()){h.update(u,c,s);continue}h.cancel()}u&&u.duration?(i[o]=h=new ha(u,e,o,c),n.push(h)):e[o]=c}return n}update(e,t){if(0===this._properties.size)return void Object.assign(e,t);const a=this._createAnimations(e,t);return a.length?(ra.add(this._chart,a),!0):void 0}}function ma(e,t){const a=e&&e.options||{},n=a.reverse,i=void 0===a.min?t:0,l=void 0===a.max?t:0;return{start:n?l:i,end:n?i:l}}function da(e,t){const a=[],n=e._getSortedDatasetMetas(t);let i,l;for(i=0,l=n.length;i0||!a&&t<0)return i.index}return null}function ga(e,t){const{chart:a,_cachedMeta:n}=e,i=a._stacks||(a._stacks={}),{iScale:l,vScale:s,index:r}=n,o=l.axis,c=s.axis,h=function(e,t,a){return`${e.id}.${t.id}.${a.stack||a.type}`}(l,s,n),u=t.length;let p;for(let e=0;ea[e].axis===t)).shift()}function Ha(e,t){const a=e.controller.index,n=e.vScale&&e.vScale.axis;if(n){t=t||e._parsed;for(const e of t){const t=e._stacks;if(!t||void 0===t[n]||void 0===t[n][a])return;delete t[n][a]}}}const Va=e=>"reset"===e||"none"===e,Za=(e,t)=>t?e:Object.assign({},e);class Ca{constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,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.$context=void 0,this._syncList=[],this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=fa(e.vScale,e),this.addElements()}updateIndex(e){this.index!==e&&Ha(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,a=this.getDataset(),n=(e,t,a,n)=>"x"===e?t:"r"===e?n:a,i=t.xAxisID=d(a.xAxisID,va(e,"x")),l=t.yAxisID=d(a.yAxisID,va(e,"y")),s=t.rAxisID=d(a.rAxisID,va(e,"r")),r=t.indexAxis,o=t.iAxisID=n(r,i,l,s),c=t.vAxisID=n(r,l,i,s);t.xScale=this.getScaleForId(i),t.yScale=this.getScaleForId(l),t.rScale=this.getScaleForId(s),t.iScale=this.getScaleForId(o),t.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&At(this._data,this),e._stacked&&Ha(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),a=this._data;if(u(t))this._data=function(e){const t=Object.keys(e),a=new Array(t.length);let n,i,l;for(n=0,i=t.length;n{const t="_onData"+S(e),a=n[e];Object.defineProperty(n,e,{configurable:!0,enumerable:!1,value(...e){const i=a.apply(this,e);return n._chartjs.listeners.forEach((a=>{"function"==typeof a[t]&&a[t](...e)})),i}})})))),this._syncList=[],this._data=t}var n}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,a=this.getDataset();let n=!1;this._dataCheck();const i=t._stacked;t._stacked=fa(t.vScale,t),t.stack!==a.stack&&(n=!0,Ha(t),t.stack=a.stack),this._resyncElements(e),(n||i!==t._stacked)&&ga(this,t._parsed)}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),a=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(a,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:a,_data:n}=this,{iScale:i,_stacked:l}=a,s=i.axis;let r,o,c,p=0===e&&t===n.length||a._sorted,m=e>0&&a._parsed[e-1];if(!1===this._parsing)a._parsed=n,a._sorted=!0,c=n;else{c=h(n[e])?this.parseArrayData(a,n,e,t):u(n[e])?this.parseObjectData(a,n,e,t):this.parsePrimitiveData(a,n,e,t);const i=()=>null===o[s]||m&&o[s]e&&!t.hidden&&t._stacked&&{keys:da(a,!0),values:null})(t,a,this.chart),o={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(e){const{min:t,max:a,minDefined:n,maxDefined:i}=e.getUserBounds();return{min:n?t:Number.NEGATIVE_INFINITY,max:i?a:Number.POSITIVE_INFINITY}}(s);let u,m;function d(){m=n[u];const t=m[s.axis];return!p(m[e.axis])||c>t||h=0;--u)if(!d()){this.updateRangeFromParsed(o,e,m,r);break}return o}getAllParsedValues(e){const t=this._cachedMeta._parsed,a=[];let n,i,l;for(n=0,i=t.length;n=0&&ethis.getContext(a,n)),h);return m.$shared&&(m.$shared=r,i[l]=Object.freeze(Za(m,r))),m}_resolveAnimations(e,t,a){const n=this.chart,i=this._cachedDataOpts,l=`animation-${t}`,s=i[l];if(s)return s;let r;if(!1!==n.options.animation){const n=this.chart.config,i=n.datasetAnimationScopeKeys(this._type,t),l=n.getOptionScopes(this.getDataset(),i);r=n.createResolver(l,this.getContext(e,a,t))}const o=new pa(n,r&&r.animations);return r&&r._cacheable&&(i[l]=Object.freeze(o)),o}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||Va(e)||this.chart._animationsDisabled}updateElement(e,t,a,n){Va(n)?Object.assign(e,a):this._resolveAnimations(t,n).update(e,a)}updateSharedOptions(e,t,a){e&&!Va(t)&&this._resolveAnimations(void 0,t).update(e,a)}_setStyle(e,t,a,n){e.active=n;const i=this.getStyle(t,n);this._resolveAnimations(t,a,n).update(e,{options:!n&&this.getSharedOptions(i)||i})}removeHoverStyle(e,t,a){this._setStyle(e,a,"active",!1)}setHoverStyle(e,t,a){this._setStyle(e,a,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,a=this._cachedMeta.data;for(const[e,t,a]of this._syncList)this[e](t,a);this._syncList=[];const n=a.length,i=t.length,l=Math.min(i,n);l&&this.parse(0,l),i>n?this._insertElements(n,i-n,e):i{for(e.length+=t,s=e.length-1;s>=l;s--)e[s]=e[s-t]};for(r(i),s=e;se-t)))}return e._cache.$bar}(t,e.type);let n,i,l,s,r=t._length;const o=()=>{32767!==l&&-32768!==l&&(_(s)&&(r=Math.min(r,Math.abs(l-s)||r)),s=l)};for(n=0,i=a.length;nMath.abs(r)&&(o=r,c=s),t[a.axis]=c,t._custom={barStart:o,barEnd:c,start:i,end:l,min:s,max:r}}(e,t,a,n):t[a.axis]=a.parse(e,n),t}function Sa(e,t,a,n){const i=e.iScale,l=e.vScale,s=i.getLabels(),r=i===l,o=[];let c,h,u,p;for(c=a,h=a+n;ce.x,a="left",n="right"):(t=e.base=a?1:-1)}(u,t,l)*i,p===l&&(f-=u/2),h=f+u),f===t.getPixelForValue(l)){const e=I(u)*t.getLineWidthForValue(l)/2;f+=e,u-=e}return{size:u,base:f,head:h,center:h+u/2}}_calculateBarIndexPixels(e,t){const a=t.scale,n=this.options,i=n.skipNull,l=d(n.maxBarThickness,1/0);let s,r;if(t.grouped){const a=i?this._getStackCount(e):t.stackCount,o="flex"===n.barThickness?function(e,t,a,n){const i=t.pixels,l=i[e];let s=e>0?i[e-1]:null,r=e=0;--a)t=Math.max(t,e[a].size(this.resolveDataElementOptions(a))/2);return t>0&&t}getLabelAndValue(e){const t=this._cachedMeta,{xScale:a,yScale:n}=t,i=this.getParsed(e),l=a.getLabelForValue(i.x),s=n.getLabelForValue(i.y),r=i._custom;return{label:t.label,value:"("+l+", "+s+(r?", "+r:"")+")"}}update(e){const t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,a,n){const i="reset"===n,{iScale:l,vScale:s}=this._cachedMeta,r=this.resolveDataElementOptions(t,n),o=this.getSharedOptions(r),c=this.includeOptions(n,o),h=l.axis,u=s.axis;for(let r=t;r""}}}};class Oa extends Ca{constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const a=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=a;else{let i,l,s=e=>+a[e];if(u(a[e])){const{key:e="value"}=this._parsing;s=t=>+b(a[t],e)}for(i=e,l=e+t;iJ(e,r,o,!0)?1:Math.max(t,t*a,n,n*a),d=(e,t,n)=>J(e,r,o,!0)?-1:Math.min(t,t*a,n,n*a),A=m(0,c,u),f=m(P,h,p),M=d(k,c,u),y=d(k+P,h,p);n=(A-M)/2,i=(f-y)/2,l=-(A+M)/2,s=-(f+y)/2}return{ratioX:n,ratioY:i,offsetX:l,offsetY:s}}(p,u,r),y=(a.width-l)/m,g=(a.height-l)/d,v=Math.max(Math.min(y,g)/2,0),H=A(this.options.radius,v),V=(H-Math.max(H*r,0))/this._getVisibleDatasetWeightTotal();this.offsetX=f*H,this.offsetY=M*H,n.total=this.calculateTotal(),this.outerRadius=H-V*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-V*h,0),this.updateElements(i,0,i.length,e)}_circumference(e,t){const a=this.options,n=this._cachedMeta,i=this._getCircumference();return t&&a.animation.animateRotate||!this.chart.getDataVisibility(e)||null===n._parsed[e]||n.data[e].hidden?0:this.calculateCircumference(n._parsed[e]*i/w)}updateElements(e,t,a,n){const i="reset"===n,l=this.chart,s=l.chartArea,r=l.options.animation,o=(s.left+s.right)/2,c=(s.top+s.bottom)/2,h=i&&r.animateScale,u=h?0:this.innerRadius,p=h?0:this.outerRadius,m=this.resolveDataElementOptions(t,n),d=this.getSharedOptions(m),A=this.includeOptions(n,d);let f,M=this._getRotation();for(f=0;f0&&!isNaN(e)?w*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,a=this.chart,n=a.data.labels||[],i=Xt(t._parsed[e],a.options.locale);return{label:n[e]||"",value:i}}getMaxBorderWidth(e){let t=0;const a=this.chart;let n,i,l,s,r;if(!e)for(n=0,i=a.data.datasets.length;n"spacing"!==e,_indexable:e=>"spacing"!==e},Oa.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:a}}=e.legend.options;return t.labels.map(((t,n)=>{const i=e.getDatasetMeta(0).controller.getStyle(n);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,pointStyle:a,hidden:!e.getDataVisibility(n),index:n}}))}return[]}},onClick(e,t,a){a.chart.toggleDataVisibility(t.index),a.chart.update()}},tooltip:{callbacks:{title:()=>"",label(e){let t=e.label;const a=": "+e.formattedValue;return h(t)?(t=t.slice(),t[0]+=a):t+=a,t}}}}};class Pa extends Ca{initialize(){this.enableOptionSharing=!0,super.initialize()}update(e){const t=this._cachedMeta,{dataset:a,data:n=[],_dataset:i}=t,l=this.chart._animationsDisabled;let{start:s,count:r}=function(e,t,a){const n=t.length;let i=0,l=n;if(e._sorted){const{iScale:s,_parsed:r}=e,o=s.axis,{min:c,max:h,minDefined:u,maxDefined:p}=s.getUserBounds();u&&(i=Q(Math.min(pt(r,s.axis,c).lo,a?n:pt(t,o,s.getPixelForValue(c)).lo),0,n-1)),l=p?Q(Math.max(pt(r,s.axis,h).hi+1,a?0:pt(t,o,s.getPixelForValue(h)).hi+1),i,n)-i:n-i}return{start:i,count:l}}(t,n,l);this._drawStart=s,this._drawCount=r,function(e){const{xScale:t,yScale:a,_scaleRanges:n}=e,i={xmin:t.min,xmax:t.max,ymin:a.min,ymax:a.max};if(!n)return e._scaleRanges=i,!0;const l=n.xmin!==t.min||n.xmax!==t.max||n.ymin!==a.min||n.ymax!==a.max;return Object.assign(n,i),l}(t)&&(s=0,r=n.length),a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!i._decimated,a.points=n;const o=this.resolveDatasetElementOptions(e);this.options.showLine||(o.borderWidth=0),o.segment=this.options.segment,this.updateElement(a,void 0,{animated:!l,options:o},e),this.updateElements(n,s,r,e)}updateElements(e,t,a,n){const i="reset"===n,{iScale:l,vScale:s,_stacked:r,_dataset:o}=this._cachedMeta,h=this.resolveDataElementOptions(t,n),u=this.getSharedOptions(h),p=this.includeOptions(n,u),m=l.axis,d=s.axis,{spanGaps:A,segment:f}=this.options,M=B(A)?A:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||i||"none"===n;let g=t>0&&this.getParsed(t-1);for(let h=t;h0&&a[m]-g[m]>M,f&&(A.parsed=a,A.raw=o.data[h]),p&&(A.options=u||this.resolveDataElementOptions(h,t.active?"active":n)),y||this.updateElement(t,h,A,n),g=a}this.updateSharedOptions(u,n,h)}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,a=t.options&&t.options.borderWidth||0,n=e.data||[];if(!n.length)return a;const i=n[0].size(this.resolveDataElementOptions(0)),l=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(a,i,l)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}Pa.id="line",Pa.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Pa.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Ra extends Ca{constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const t=this._cachedMeta,a=this.chart,n=a.data.labels||[],i=Xt(t._parsed[e].r,a.options.locale);return{label:n[e]||"",value:i}}update(e){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}_updateRadius(){const e=this.chart,t=e.chartArea,a=e.options,n=Math.min(t.right-t.left,t.bottom-t.top),i=Math.max(n/2,0),l=(i-Math.max(a.cutoutPercentage?i/100*a.cutoutPercentage:1,0))/e.getVisibleDatasetCount();this.outerRadius=i-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(e,t,a,n){const i="reset"===n,l=this.chart,s=this.getDataset(),r=l.options.animation,o=this._cachedMeta.rScale,c=o.xCenter,h=o.yCenter,u=o.getIndexAngle(0)-.5*k;let p,m=u;const d=360/this.countVisibleElements();for(p=0;p{!isNaN(e.data[n])&&this.chart.getDataVisibility(n)&&a++})),a}_computeAngle(e,t,a){return this.chart.getDataVisibility(e)?q(this.resolveDataElementOptions(e,t).angle||a):0}}Ra.id="polarArea",Ra.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Ra.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:a}}=e.legend.options;return t.labels.map(((t,n)=>{const i=e.getDatasetMeta(0).controller.getStyle(n);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,pointStyle:a,hidden:!e.getDataVisibility(n),index:n}}))}return[]}},onClick(e,t,a){a.chart.toggleDataVisibility(t.index),a.chart.update()}},tooltip:{callbacks:{title:()=>"",label:e=>e.chart.data.labels[e.dataIndex]+": "+e.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Da extends Oa{}Da.id="pie",Da.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Na extends Ca{getLabelAndValue(e){const t=this._cachedMeta.vScale,a=this.getParsed(e);return{label:t.getLabels()[e],value:""+t.getLabelForValue(a[t.axis])}}update(e){const t=this._cachedMeta,a=t.dataset,n=t.data||[],i=t.iScale.getLabels();if(a.points=n,"resize"!==e){const t=this.resolveDatasetElementOptions(e);this.options.showLine||(t.borderWidth=0);const l={_loop:!0,_fullLoop:i.length===n.length,options:t};this.updateElement(a,void 0,l,e)}this.updateElements(n,0,n.length,e)}updateElements(e,t,a,n){const i=this.getDataset(),l=this._cachedMeta.rScale,s="reset"===n;for(let r=t;r"",label:e=>"("+e.label+", "+e.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var Fa=Object.freeze({__proto__:null,BarController:Ea,BubbleController:Ta,DoughnutController:Oa,LineController:Pa,PolarAreaController:Ra,PieController:Da,RadarController:Na,ScatterController:Ia});function Ba(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ja{constructor(e){this.options=e||{}}formats(){return Ba()}parse(e,t){return Ba()}format(e,t){return Ba()}add(e,t,a){return Ba()}diff(e,t,a){return Ba()}startOf(e,t,a){return Ba()}endOf(e,t){return Ba()}}ja.override=function(e){Object.assign(ja.prototype,e)};var Ua={_date:ja};function qa(e,t){return"native"in e?{x:e.x,y:e.y}:Bt(e,t)}function Wa(e,t,a,n){const{controller:i,data:l,_sorted:s}=e,r=i._cachedMeta.iScale;if(r&&t===r.axis&&"r"!==t&&s&&l.length){const e=r._reversePixels?mt:pt;if(!n)return e(l,t,a);if(i._sharedOptions){const n=l[0],i="function"==typeof n.getRange&&n.getRange(t);if(i){const n=e(l,t,a-i),s=e(l,t,a+i);return{lo:n.lo,hi:s.hi}}}}return{lo:0,hi:l.length-1}}function $a(e,t,a,n,i){const l=e.getSortedVisibleDatasetMetas(),s=a[t];for(let e=0,a=l.length;e{e[r](i[s],n)&&l.push({element:e,datasetIndex:t,index:a}),e.inRange(i.x,i.y,n)&&(o=!0)})),a.intersect&&!o?[]:l}var Xa={modes:{index(e,t,a,n){const i=qa(t,e),l=a.axis||"x",s=a.intersect?Ga(e,i,l,n):Ya(e,i,l,!1,n),r=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach((e=>{const t=s[0].index,a=e.data[t];a&&!a.skip&&r.push({element:a,datasetIndex:e.index,index:t})})),r):[]},dataset(e,t,a,n){const i=qa(t,e),l=a.axis||"xy";let s=a.intersect?Ga(e,i,l,n):Ya(e,i,l,!1,n);if(s.length>0){const t=s[0].datasetIndex,a=e.getDatasetMeta(t).data;s=[];for(let e=0;eGa(e,qa(t,e),a.axis||"xy",n),nearest:(e,t,a,n)=>Ya(e,qa(t,e),a.axis||"xy",a.intersect,n),x:(e,t,a,n)=>Ka(e,t,{axis:"x",intersect:a.intersect},n),y:(e,t,a,n)=>Ka(e,t,{axis:"y",intersect:a.intersect},n)}};const Ja=["left","top","right","bottom"];function Qa(e,t){return e.filter((e=>e.pos===t))}function en(e,t){return e.filter((e=>-1===Ja.indexOf(e.pos)&&e.box.axis===t))}function tn(e,t){return e.sort(((e,a)=>{const n=t?a:e,i=t?e:a;return n.weight===i.weight?n.index-i.index:n.weight-i.weight}))}function an(e,t,a,n){return Math.max(e[a],t[a])+Math.max(e[n],t[n])}function nn(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 ln(e,t,a,n){const{pos:i,box:l}=a,s=e.maxPadding;if(!u(i)){a.size&&(e[i]-=a.size);const t=n[a.stack]||{size:0,count:1};t.size=Math.max(t.size,a.horizontal?l.height:l.width),a.size=t.size/t.count,e[i]+=a.size}l.getPadding&&nn(s,l.getPadding());const r=Math.max(0,t.outerWidth-an(s,e,"left","right")),o=Math.max(0,t.outerHeight-an(s,e,"top","bottom")),c=r!==e.w,h=o!==e.h;return e.w=r,e.h=o,a.horizontal?{same:c,other:h}:{same:h,other:c}}function sn(e,t){const a=t.maxPadding;return function(e){const n={left:0,top:0,right:0,bottom:0};return e.forEach((e=>{n[e]=Math.max(t[e],a[e])})),n}(e?["left","right"]:["top","bottom"])}function rn(e,t,a,n){const i=[];let l,s,r,o,c,h;for(l=0,s=e.length,c=0;le.box.fullSize)),!0),n=tn(Qa(t,"left"),!0),i=tn(Qa(t,"right")),l=tn(Qa(t,"top"),!0),s=tn(Qa(t,"bottom")),r=en(t,"x"),o=en(t,"y");return{fullSize:a,leftAndTop:n.concat(l),rightAndBottom:i.concat(o).concat(s).concat(r),chartArea:Qa(t,"chartArea"),vertical:n.concat(i).concat(o),horizontal:l.concat(s).concat(r)}}(e.boxes),o=r.vertical,c=r.horizontal;M(e.boxes,(e=>{"function"==typeof e.beforeLayout&&e.beforeLayout()}));const h=o.reduce(((e,t)=>t.box.options&&!1===t.box.options.display?e:e+1),0)||1,u=Object.freeze({outerWidth:t,outerHeight:a,padding:i,availableWidth:l,availableHeight:s,vBoxMaxWidth:l/2/h,hBoxMaxHeight:s/2}),p=Object.assign({},i);nn(p,rt(n));const m=Object.assign({maxPadding:p,w:l,h:s,x:i.left,y:i.top},i),d=function(e,t){const a=function(e){const t={};for(const a of e){const{stack:e,pos:n,stackWeight:i}=a;if(!e||!Ja.includes(n))continue;const l=t[e]||(t[e]={count:0,placed:0,weight:0,size:0});l.count++,l.weight+=i}return t}(e),{vBoxMaxWidth:n,hBoxMaxHeight:i}=t;let l,s,r;for(l=0,s=e.length;l{const a=t.box;Object.assign(a,e.chartArea),a.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})}))}};class un{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,a){}removeEventListener(e,t,a){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,a,n){return t=Math.max(0,t||e.width),a=a||e.height,{width:t,height:Math.max(0,n?Math.floor(t/n):a)}}isAttached(e){return!0}updateConfig(e){}}class pn extends un{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const mn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},dn=e=>null===e||""===e,An=!!qt&&{passive:!0};function fn(e,t,a){e.canvas.removeEventListener(t,a,An)}function Mn(e,t){for(const a of e)if(a===t||a.contains(t))return!0}function yn(e,t,a){const n=e.canvas,i=new MutationObserver((e=>{let t=!1;for(const a of e)t=t||Mn(a.addedNodes,n),t=t&&!Mn(a.removedNodes,n);t&&a()}));return i.observe(document,{childList:!0,subtree:!0}),i}function gn(e,t,a){const n=e.canvas,i=new MutationObserver((e=>{let t=!1;for(const a of e)t=t||Mn(a.removedNodes,n),t=t&&!Mn(a.addedNodes,n);t&&a()}));return i.observe(document,{childList:!0,subtree:!0}),i}const vn=new Map;let Hn=0;function Vn(){const e=window.devicePixelRatio;e!==Hn&&(Hn=e,vn.forEach(((t,a)=>{a.currentDevicePixelRatio!==e&&t()})))}function Zn(e,t,a){const n=e.canvas,l=n&&Rt(n);if(!l)return;const s=i(((e,t)=>{const n=l.clientWidth;a(e,t),n{const t=e[0],a=t.contentRect.width,n=t.contentRect.height;0===a&&0===n||s(a,n)}));return r.observe(l),function(e,t){vn.size||window.addEventListener("resize",Vn),vn.set(e,t)}(e,s),r}function Cn(e,t,a){a&&a.disconnect(),"resize"===t&&function(e){vn.delete(e),vn.size||window.removeEventListener("resize",Vn)}(e)}function Ln(e,t,a){const n=e.canvas,l=i((t=>{null!==e.ctx&&a(function(e,t){const a=mn[e.type]||e.type,{x:n,y:i}=Bt(e,t);return{type:a,chart:t,native:e,x:void 0!==n?n:null,y:void 0!==i?i:null}}(t,e))}),e,(e=>{const t=e[0];return[t,t.offsetX,t.offsetY]}));return function(e,t,a){e.addEventListener(t,a,An)}(n,t,l),l}class bn extends un{acquireContext(e,t){const a=e&&e.getContext&&e.getContext("2d");return a&&a.canvas===e?(function(e,t){const a=e.style,n=e.getAttribute("height"),i=e.getAttribute("width");if(e.$chartjs={initial:{height:n,width:i,style:{display:a.display,height:a.height,width:a.width}}},a.display=a.display||"block",a.boxSizing=a.boxSizing||"border-box",dn(i)){const t=Wt(e,"width");void 0!==t&&(e.width=t)}if(dn(n))if(""===e.style.height)e.height=e.width/(t||2);else{const t=Wt(e,"height");void 0!==t&&(e.height=t)}}(e,t),a):null}releaseContext(e){const t=e.canvas;if(!t.$chartjs)return!1;const a=t.$chartjs.initial;["height","width"].forEach((e=>{const n=a[e];c(n)?t.removeAttribute(e):t.setAttribute(e,n)}));const n=a.style||{};return Object.keys(n).forEach((e=>{t.style[e]=n[e]})),t.width=t.width,delete t.$chartjs,!0}addEventListener(e,t,a){this.removeEventListener(e,t);const n=e.$proxies||(e.$proxies={}),i={attach:yn,detach:gn,resize:Zn}[t]||Ln;n[t]=i(e,t,a)}removeEventListener(e,t){const a=e.$proxies||(e.$proxies={}),n=a[t];n&&(({attach:Cn,detach:Cn,resize:Cn}[t]||fn)(e,t,n),a[t]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,a,n){return function(e,t,a,n){const i=Nt(e),l=Ft(i,"margin"),s=Dt(i.maxWidth,e,"clientWidth")||T,r=Dt(i.maxHeight,e,"clientHeight")||T,o=function(e,t,a){let n,i;if(void 0===t||void 0===a){const l=Rt(e);if(l){const e=l.getBoundingClientRect(),s=Nt(l),r=Ft(s,"border","width"),o=Ft(s,"padding");t=e.width-o.width-r.width,a=e.height-o.height-r.height,n=Dt(s.maxWidth,l,"clientWidth"),i=Dt(s.maxHeight,l,"clientHeight")}else t=e.clientWidth,a=e.clientHeight}return{width:t,height:a,maxWidth:n||T,maxHeight:i||T}}(e,t,a);let{width:c,height:h}=o;if("content-box"===i.boxSizing){const e=Ft(i,"border","width"),t=Ft(i,"padding");c-=t.width+e.width,h-=t.height+e.height}return c=Math.max(0,c-l.width),h=Math.max(0,n?Math.floor(c/n):h-l.height),c=jt(Math.min(c,s,o.maxWidth)),h=jt(Math.min(h,r,o.maxHeight)),c&&!h&&(h=jt(c/2)),{width:c,height:h}}(e,t,a,n)}isAttached(e){const t=Rt(e);return!(!t||!t.isConnected)}}class Sn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(e){const{x:t,y:a}=this.getProps(["x","y"],e);return{x:t,y:a}}hasValue(){return B(this.x)&&B(this.y)}getProps(e,t){const a=this.$animations;if(!t||!a)return this;const n={};return e.forEach((e=>{n[e]=a[e]&&a[e].active()?a[e]._to:this[e]})),n}}Sn.defaults={},Sn.defaultRoutes=void 0;const _n={values:e=>h(e)?e:""+e,numeric(e,t,a){if(0===e)return"0";const n=this.chart.options.locale;let i,l=e;if(a.length>1){const t=Math.max(Math.abs(a[0].value),Math.abs(a[a.length-1].value));(t<1e-4||t>1e15)&&(i="scientific"),l=function(e,t){let a=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(a)>=1&&e!==Math.floor(e)&&(a=e-Math.floor(e)),a}(e,a)}const s=N(Math.abs(l)),r=Math.max(Math.min(-1*Math.floor(s),20),0),o={notation:i,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(o,this.options.ticks.format),Xt(e,n,o)},logarithmic(e,t,a){if(0===e)return"0";const n=e/Math.pow(10,Math.floor(N(e)));return 1===n||2===n||5===n?_n.numeric.call(this,e,t,a):""}};var zn={formatters:_n};function xn(e,t,a,n,i){const l=d(n,0),s=Math.min(d(i,e.length),e.length);let r,o,c,h=0;for(a=Math.ceil(a),i&&(r=i-n,a=r/Math.floor(r/a)),c=l;c<0;)h++,c=Math.round(l+h*a);for(o=Math.max(l,0);ot.lineWidth,tickColor:(e,t)=>t.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth: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:zn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),Fe.route("scale.ticks","color","","color"),Fe.route("scale.grid","color","","borderColor"),Fe.route("scale.grid","borderColor","","borderColor"),Fe.route("scale.title","color","","color"),Fe.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&"callback"!==e&&"parser"!==e,_indexable:e=>"borderDash"!==e&&"tickBorderDash"!==e}),Fe.describe("scales",{_fallback:"scale"}),Fe.describe("scale.ticks",{_scriptable:e=>"backdropPadding"!==e&&"callback"!==e,_indexable:e=>"backdropPadding"!==e});const kn=(e,t,a)=>"top"===t||"left"===t?e[t]+a:e[t]-a;function wn(e,t){const a=[],n=e.length/t,i=e.length;let l=0;for(;ls+r)))return c}function Tn(e){return e.drawTicks?e.tickLength:0}function On(e,t){if(!e.display)return 0;const a=ot(e.font,t),n=rt(e.padding);return(h(e.text)?e.text.length:1)*a.lineHeight+n.height}function Pn(e,t,a){let n=l(e);return(a&&"right"!==t||!a&&"right"===t)&&(n=(e=>"left"===e?"right":"right"===e?"left":e)(n)),n}class Rn extends Sn{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.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(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:a,_suggestedMax:n}=this;return e=m(e,Number.POSITIVE_INFINITY),t=m(t,Number.NEGATIVE_INFINITY),a=m(a,Number.POSITIVE_INFINITY),n=m(n,Number.NEGATIVE_INFINITY),{min:m(e,a),max:m(t,n),minDefined:p(e),maxDefined:p(t)}}getMinMax(e){let t,{min:a,max:n,minDefined:i,maxDefined:l}=this.getUserBounds();if(i&&l)return{min:a,max:n};const s=this.getMatchingVisibleMetas();for(let r=0,o=s.length;rn?n:a,n=i&&a>n?a:n,{min:m(a,m(n,a)),max:m(n,m(a,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 e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){f(this.options.beforeUpdate,[this])}update(e,t,a){const{beginAtZero:n,grace:i,ticks:l}=this.options,s=l.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=a=Object.assign({left:0,right:0,top:0,bottom:0},a),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+a.left+a.right:this.height+a.top+a.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(e,t,a){const{min:n,max:i}=e,l=A(t,(i-n)/2),s=(e,t)=>a&&0===e?0:e+t;return{min:s(n,-Math.abs(l)),max:s(i,l)}}(this,i,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const r=sn)return function(e,t,a,n){let i,l=0,s=a[0];for(n=Math.ceil(n),i=0;ie-t)).pop(),t}(n);for(let e=0,t=l.length-1;ei)return t}return Math.max(i,1)}(i,t,n);if(l>0){let e,a;const n=l>1?Math.round((r-s)/(l-1)):null;for(xn(t,o,h,c(n)?0:s-n,s),e=0,a=l-1;e=i||a<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),h=c.widest.width,u=c.highest.height,p=Q(this.chart.width-h,0,this.maxWidth);l=e.offset?this.maxWidth/a:p/(a-1),h+6>l&&(l=p/(a-(e.offset?.5:1)),s=this.maxHeight-Tn(e.grid)-t.padding-On(e.title,this.chart.options.font),r=Math.sqrt(h*h+u*u),o=W(Math.min(Math.asin(Q((c.highest.height+6)/l,-1,1)),Math.asin(Q(s/r,-1,1))-Math.asin(Q(u/r,-1,1)))),o=Math.max(n,Math.min(i,o))),this.labelRotation=o}afterCalculateLabelRotation(){f(this.options.afterCalculateLabelRotation,[this])}beforeFit(){f(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:a,title:n,grid:i}}=this,l=this._isVisible(),s=this.isHorizontal();if(l){const l=On(n,t.options.font);if(s?(e.width=this.maxWidth,e.height=Tn(i)+l):(e.height=this.maxHeight,e.width=Tn(i)+l),a.display&&this.ticks.length){const{first:t,last:n,widest:i,highest:l}=this._getLabelSizes(),r=2*a.padding,o=q(this.labelRotation),c=Math.cos(o),h=Math.sin(o);if(s){const t=a.mirror?0:h*i.width+c*l.height;e.height=Math.min(this.maxHeight,e.height+t+r)}else{const t=a.mirror?0:c*i.width+h*l.height;e.width=Math.min(this.maxWidth,e.width+t+r)}this._calculatePadding(t,n,h,c)}}this._handleMargins(),s?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,a,n){const{ticks:{align:i,padding:l},position:s}=this.options,r=0!==this.labelRotation,o="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,u=0;r?o?(h=n*e.width,u=a*t.height):(h=a*e.height,u=n*t.width):"start"===i?u=t.width:"end"===i?h=e.width:(h=e.width/2,u=t.width/2),this.paddingLeft=Math.max((h-s+l)*this.width/(this.width-s),0),this.paddingRight=Math.max((u-c+l)*this.width/(this.width-c),0)}else{let a=t.height/2,n=e.height/2;"start"===i?(a=0,n=e.height):"end"===i&&(a=t.height,n=0),this.paddingTop=a+l,this.paddingBottom=n+l}}_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(){f(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return"top"===t||"bottom"===t||"x"===e}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){let t,a;for(this.beforeTickToLabelConversion(),this.generateTickLabels(e),t=0,a=e.length;t{const a=e.gc,n=a.length/2;let i;if(n>t){for(i=0;i({width:i[e]||0,height:l[e]||0});return{first:C(0),last:C(t-1),widest:C(V),highest:C(Z),widths:i,heights:l}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return Q(this._alignToPixels?Ue(this.chart,t,0):t,-32768,32767)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&es*n?s/a:r/n:r*n0}_computeGridLineItems(e){const t=this.axis,a=this.chart,n=this.options,{grid:i,position:l}=n,s=i.offset,r=this.isHorizontal(),o=this.ticks.length+(s?1:0),c=Tn(i),h=[],p=i.setContext(this.getContext()),m=p.drawBorder?p.borderWidth:0,A=m/2,f=function(e){return Ue(a,e,m)};let M,y,g,v,H,V,Z,C,L,b,S,_;if("top"===l)M=f(this.bottom),V=this.bottom-c,C=M-A,b=f(e.top)+A,_=e.bottom;else if("bottom"===l)M=f(this.top),b=e.top,_=f(e.bottom)-A,V=M+A,C=this.top+c;else if("left"===l)M=f(this.right),H=this.right-c,Z=M-A,L=f(e.left)+A,S=e.right;else if("right"===l)M=f(this.left),L=e.left,S=f(e.right)-A,H=M+A,Z=this.left+c;else if("x"===t){if("center"===l)M=f((e.top+e.bottom)/2+.5);else if(u(l)){const e=Object.keys(l)[0],t=l[e];M=f(this.chart.scales[e].getPixelForValue(t))}b=e.top,_=e.bottom,V=M+A,C=V+c}else if("y"===t){if("center"===l)M=f((e.left+e.right)/2);else if(u(l)){const e=Object.keys(l)[0],t=l[e];M=f(this.chart.scales[e].getPixelForValue(t))}H=M-A,Z=H-c,L=e.left,S=e.right}const z=d(n.ticks.maxTicksLimit,o),x=Math.max(1,Math.ceil(o/z));for(y=0;yt.value===e));return a>=0?t.setContext(this.getContext(a)).lineWidth:0}drawGrid(e){const t=this.options.grid,a=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let i,l;const s=(e,t,n)=>{n.width&&n.color&&(a.save(),a.lineWidth=n.width,a.strokeStyle=n.color,a.setLineDash(n.borderDash||[]),a.lineDashOffset=n.borderDashOffset,a.beginPath(),a.moveTo(e.x,e.y),a.lineTo(t.x,t.y),a.stroke(),a.restore())};if(t.display)for(i=0,l=n.length;i{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:a+1,draw:()=>{this.drawBorder()}},{z:t,draw:e=>{this.drawLabels(e)}}]:[{z:t,draw:e=>{this.draw(e)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),a=this.axis+"AxisID",n=[];let i,l;for(i=0,l=t.length;i{const n=a.split("."),i=n.pop(),l=[e].concat(n).join("."),s=t[a].split("."),r=s.pop(),o=s.join(".");Fe.route(l,i,o,r)}))}(t,e.defaultRoutes),e.descriptors&&Fe.describe(t,e.descriptors)}(e,l,a),this.override&&Fe.override(e.id,e.overrides)),l}get(e){return this.items[e]}unregister(e){const t=this.items,a=e.id,n=this.scope;a in t&&delete t[a],n&&a in Fe[n]&&(delete Fe[n][a],this.override&&delete Re[a])}}var Nn=new class{constructor(){this.controllers=new Dn(Ca,"datasets",!0),this.elements=new Dn(Sn,"elements"),this.plugins=new Dn(Object,"plugins"),this.scales=new Dn(Rn,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,a){[...t].forEach((t=>{const n=a||this._getRegistryForType(t);a||n.isForType(t)||n===this.plugins&&t.id?this._exec(e,n,t):M(t,(t=>{const n=a||this._getRegistryForType(t);this._exec(e,n,t)}))}))}_exec(e,t,a){const n=S(e);f(a["before"+n],[],a),t[e](a),f(a["after"+n],[],a)}_getRegistryForType(e){for(let t=0;te.filter((e=>!t.some((t=>e.plugin.id===t.plugin.id))));this._notify(n(t,a),e,"stop"),this._notify(n(a,t),e,"start")}}function Fn(e,t){return t||!1!==e?!0===e?{}:e:null}function Bn(e,t,a,n){const i=e.pluginScopeKeys(t),l=e.getOptionScopes(a,i);return e.createResolver(l,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function jn(e,t){const a=Fe.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||a.indexAxis||"x"}function Un(e,t){return"x"===e||"y"===e?e:t.axis||("top"===(a=t.position)||"bottom"===a?"x":"left"===a||"right"===a?"y":void 0)||e.charAt(0).toLowerCase();var a}function qn(e){const t=e.options||(e.options={});t.plugins=d(t.plugins,{}),t.scales=function(e,t){const a=Re[e.type]||{scales:{}},n=t.scales||{},i=jn(e.type,t),l=Object.create(null),s=Object.create(null);return Object.keys(n).forEach((e=>{const t=n[e];if(!u(t))return console.error(`Invalid scale configuration for scale: ${e}`);if(t._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const r=Un(e,t),o=function(e,t){return e===t?"_index_":"_value_"}(r,i),c=a.scales||{};l[r]=l[r]||e,s[e]=Z(Object.create(null),[{axis:r},t,c[r],c[o]])})),e.data.datasets.forEach((a=>{const i=a.type||e.type,r=a.indexAxis||jn(i,t),o=(Re[i]||{}).scales||{};Object.keys(o).forEach((e=>{const t=function(e,t){let a=e;return"_index_"===e?a=t:"_value_"===e&&(a="x"===t?"y":"x"),a}(e,r),i=a[t+"AxisID"]||l[t]||t;s[i]=s[i]||Object.create(null),Z(s[i],[{axis:t},n[i],o[e]])}))})),Object.keys(s).forEach((e=>{const t=s[e];Z(t,[Fe.scales[t.type],Fe.scale])})),s}(e,t)}function Wn(e){return(e=e||{}).datasets=e.datasets||[],e.labels=e.labels||[],e}const $n=new Map,Gn=new Set;function Yn(e,t){let a=$n.get(e);return a||(a=t(),$n.set(e,a),Gn.add(a)),a}const Kn=(e,t,a)=>{const n=b(t,a);void 0!==n&&e.add(n)};class Xn{constructor(e){this._config=function(e){return(e=e||{}).data=Wn(e.data),qn(e),e}(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Wn(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),qn(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Yn(e,(()=>[[`datasets.${e}`,""]]))}datasetAnimationScopeKeys(e,t){return Yn(`${e}.transition.${t}`,(()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]]))}datasetElementScopeKeys(e,t){return Yn(`${e}-${t}`,(()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]]))}pluginScopeKeys(e){const t=e.id;return Yn(`${this.type}-plugin-${t}`,(()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]]))}_cachedScopes(e,t){const a=this._scopeCache;let n=a.get(e);return n&&!t||(n=new Map,a.set(e,n)),n}getOptionScopes(e,t,a){const{options:n,type:i}=this,l=this._cachedScopes(e,a),s=l.get(t);if(s)return s;const r=new Set;t.forEach((t=>{e&&(r.add(e),t.forEach((t=>Kn(r,e,t)))),t.forEach((e=>Kn(r,n,e))),t.forEach((e=>Kn(r,Re[i]||{},e))),t.forEach((e=>Kn(r,Fe,e))),t.forEach((e=>Kn(r,De,e)))}));const o=Array.from(r);return 0===o.length&&o.push(Object.create(null)),Gn.has(t)&&l.set(t,o),o}chartOptionScopes(){const{options:e,type:t}=this;return[e,Re[t]||{},Fe.datasets[t]||{},{type:t},Fe,De]}resolveNamedOptions(e,t,a,n=[""]){const i={$shared:!0},{resolver:l,subPrefixes:s}=Jn(this._resolverCache,e,n);let r=l;(function(e,t){const{isScriptable:a,isIndexable:n}=gt(e);for(const i of t){const t=a(i),l=n(i),s=(l||t)&&e[i];if(t&&(z(s)||Qn(s))||l&&h(s))return!0}return!1})(l,t)&&(i.$shared=!1,r=yt(l,a=z(a)?a():a,this.createResolver(e,a,s)));for(const e of t)i[e]=r[e];return i}createResolver(e,t,a=[""],n){const{resolver:i}=Jn(this._resolverCache,e,a);return u(t)?yt(i,t,void 0,n):i}}function Jn(e,t,a){let n=e.get(t);n||(n=new Map,e.set(t,n));const i=a.join();let l=n.get(i);return l||(l={resolver:Mt(t,a),subPrefixes:a.filter((e=>!e.toLowerCase().includes("hover")))},n.set(i,l)),l}const Qn=e=>u(e)&&Object.getOwnPropertyNames(e).reduce(((t,a)=>t||z(e[a])),!1),ei=["top","bottom","left","right","chartArea"];function ti(e,t){return"top"===e||"bottom"===e||-1===ei.indexOf(e)&&"x"===t}function ai(e,t){return function(a,n){return a[e]===n[e]?a[t]-n[t]:a[e]-n[e]}}function ni(e){const t=e.chart,a=t.options.animation;t.notifyPlugins("afterRender"),f(a&&a.onComplete,[e],t)}function ii(e){const t=e.chart,a=t.options.animation;f(a&&a.onProgress,[e],t)}function li(e){return Pt()&&"string"==typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const si={},ri=e=>{const t=li(e);return Object.values(si).filter((e=>e.canvas===t)).pop()};function oi(e,t,a){const n=Object.keys(e);for(const i of n){const n=+i;if(n>=t){const l=e[i];delete e[i],(a>0||n>t)&&(e[n+a]=l)}}}class ci{constructor(e,t){const a=this.config=new Xn(t),n=li(e),i=ri(n);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas can be reused.");const l=a.createResolver(a.chartOptionScopes(),this.getContext());this.platform=new(a.platform||function(e){return!Pt()||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas?pn:bn}(n)),this.platform.updateConfig(a);const s=this.platform.acquireContext(n,l.aspectRatio),r=s&&s.canvas,c=r&&r.height,h=r&&r.width;this.id=o(),this.ctx=s,this.canvas=r,this.width=h,this.height=c,this._options=l,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 In,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(e,t){let a;return function(...n){return t?(clearTimeout(a),a=setTimeout(e,t,n)):e.apply(this,n),t}}((e=>this.update(e)),l.resizeDelay||0),this._dataChanges=[],si[this.id]=this,s&&r?(ra.listen(this,"complete",ni),ra.listen(this,"progress",ii),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:a,height:n,_aspectRatio:i}=this;return c(e)?t&&i?i:n?a/n:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ut(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return qe(this.canvas,this.ctx),this}stop(){return ra.stop(this),this}resize(e,t){ra.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const a=this.options,n=this.canvas,i=a.maintainAspectRatio&&this.aspectRatio,l=this.platform.getMaximumSize(n,e,t,i),s=a.devicePixelRatio||this.platform.getDevicePixelRatio(),r=this.width?"resize":"attach";this.width=l.width,this.height=l.height,this._aspectRatio=this.aspectRatio,Ut(this,s,!0)&&(this.notifyPlugins("resize",{size:l}),f(a.onResize,[this,l],this),this.attached&&this._doResize(r)&&this.render())}ensureScalesHaveIDs(){M(this.options.scales||{},((e,t)=>{e.id=t}))}buildOrUpdateScales(){const e=this.options,t=e.scales,a=this.scales,n=Object.keys(a).reduce(((e,t)=>(e[t]=!1,e)),{});let i=[];t&&(i=i.concat(Object.keys(t).map((e=>{const a=t[e],n=Un(e,a),i="r"===n,l="x"===n;return{options:a,dposition:i?"chartArea":l?"bottom":"left",dtype:i?"radialLinear":l?"category":"linear"}})))),M(i,(t=>{const i=t.options,l=i.id,s=Un(l,i),r=d(i.type,t.dtype);void 0!==i.position&&ti(i.position,s)===ti(t.dposition)||(i.position=t.dposition),n[l]=!0;let o=null;l in a&&a[l].type===r?o=a[l]:(o=new(Nn.getScale(r))({id:l,type:r,ctx:this.ctx,chart:this}),a[o.id]=o),o.init(i,e)})),M(n,((e,t)=>{e||delete a[t]})),M(a,(e=>{hn.configure(this,e,e.options),hn.addBox(this,e)}))}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,a=e.length;if(e.sort(((e,t)=>e.index-t.index)),a>t){for(let e=t;et.length&&delete this._stacks,e.forEach(((e,a)=>{0===t.filter((t=>t===e._dataset)).length&&this._destroyDatasetMeta(a)}))}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let a,n;for(this._removeUnreferencedMetasets(),a=0,n=t.length;a{this.getDatasetMeta(t).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const a=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!a.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0}))return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let l=0;for(let e=0,t=this.data.datasets.length;e{e.reset()})),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(ai("z","_idx"));const{_active:s,_lastEvent:r}=this;r?this._eventHandler(r,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){M(this.scales,(e=>{hn.removeBox(this,e)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),a=new Set(e.events);x(t,a)&&!!this._responsiveListeners===e.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:a,start:n,count:i}of t)oi(e,n,"_removeElements"===a?-i:i)}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,a=t=>new Set(e.filter((e=>e[0]===t)).map(((e,t)=>t+","+e.splice(1).join(",")))),n=a(0);for(let e=1;ee.split(","))).map((e=>({method:e[1],start:+e[2],count:+e[3]})))}_updateLayout(e){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;hn.update(this,this.width,this.height,e);const t=this.chartArea,a=t.width<=0||t.height<=0;this._layers=[],M(this.boxes,(e=>{a&&"chartArea"===e.position||(e.configure&&e.configure(),this._layers.push(...e._layers()))}),this),this._layers.forEach(((e,t)=>{e._idx=t})),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})){for(let e=0,t=this.data.datasets.length;e=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,a=e._clip,n=!a.disabled,i=this.chartArea,l={meta:e,index:e.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",l)&&(n&&Ge(t,{left:!1===a.left?0:i.left-a.left,right:!1===a.right?this.width:i.right+a.right,top:!1===a.top?0:i.top-a.top,bottom:!1===a.bottom?this.height:i.bottom+a.bottom}),e.controller.draw(),n&&Ye(t),l.cancelable=!1,this.notifyPlugins("afterDatasetDraw",l))}getElementsAtEventForMode(e,t,a,n){const i=Xa.modes[t];return"function"==typeof i?i(this,e,a,n):[]}getDatasetMeta(e){const t=this.data.datasets[e],a=this._metasets;let n=a.filter((e=>e&&e._dataset===t)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},a.push(n)),n}getContext(){return this.$context||(this.$context=ht(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const a=this.getDatasetMeta(e);return"boolean"==typeof a.hidden?!a.hidden:!t.hidden}setDatasetVisibility(e,t){this.getDatasetMeta(e).hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,a){const n=a?"show":"hide",i=this.getDatasetMeta(e),l=i.controller._resolveAnimations(void 0,n);_(t)?(i.data[t].hidden=!a,this.update()):(this.setDatasetVisibility(e,a),l.update(i,{visible:a}),this.update((t=>t.datasetIndex===e?n:void 0)))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),ra.remove(this),e=0,t=this.data.datasets.length;e{t.addEventListener(this,a,n),e[a]=n},n=(e,t,a)=>{e.offsetX=t,e.offsetY=a,this._eventHandler(e)};M(this.options.events,(e=>a(e,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,a=(a,n)=>{t.addEventListener(this,a,n),e[a]=n},n=(a,n)=>{e[a]&&(t.removeEventListener(this,a,n),delete e[a])},i=(e,t)=>{this.canvas&&this.resize(e,t)};let l;const s=()=>{n("attach",s),this.attached=!0,this.resize(),a("resize",i),a("detach",l)};l=()=>{this.attached=!1,n("resize",i),this._stop(),this._resize(0,0),a("attach",s)},t.isAttached(this.canvas)?s():l()}unbindEvents(){M(this._listeners,((e,t)=>{this.platform.removeEventListener(this,t,e)})),this._listeners={},M(this._responsiveListeners,((e,t)=>{this.platform.removeEventListener(this,t,e)})),this._responsiveListeners=void 0}updateHoverStyle(e,t,a){const n=a?"set":"remove";let i,l,s,r;for("dataset"===t&&(i=this.getDatasetMeta(e[0].datasetIndex),i.controller["_"+n+"DatasetHoverStyle"]()),s=0,r=e.length;s{const a=this.getDatasetMeta(e);if(!a)throw new Error("No dataset found at index "+e);return{datasetIndex:e,element:a.data[t],index:t}}));!y(a,t)&&(this._active=a,this._lastEvent=null,this._updateHoverStyles(a,t))}notifyPlugins(e,t,a){return this._plugins.notify(this,e,t,a)}_updateHoverStyles(e,t,a){const n=this.options.hover,i=(e,t)=>e.filter((e=>!t.some((t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)))),l=i(t,e),s=a?e:i(e,t);l.length&&this.updateHoverStyle(l,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(e,t){const a={event:e,replay:t,cancelable:!0,inChartArea:$e(e,this.chartArea,this._minPadding)},n=t=>(t.options.events||this.options.events).includes(e.native.type);if(!1===this.notifyPlugins("beforeEvent",a,n))return;const i=this._handleEvent(e,t,a.inChartArea);return a.cancelable=!1,this.notifyPlugins("afterEvent",a,n),(i||a.changed)&&this.render(),this}_handleEvent(e,t,a){const{_active:n=[],options:i}=this,l=t,s=this._getActiveElements(e,n,a,l),r=function(e){return"mouseup"===e.type||"click"===e.type||"contextmenu"===e.type}(e),o=function(e,t,a,n){return a&&"mouseout"!==e.type?n?t:e:null}(e,this._lastEvent,a,r);a&&(this._lastEvent=null,f(i.onHover,[e,s,this],this),r&&f(i.onClick,[e,s,this],this));const c=!y(s,n);return(c||t)&&(this._active=s,this._updateHoverStyles(s,n,t)),this._lastEvent=o,c}_getActiveElements(e,t,a,n){if("mouseout"===e.type)return[];if(!a)return t;const i=this.options.hover;return this.getElementsAtEventForMode(e,i.mode,i,n)}}const hi=()=>M(ci.instances,(e=>e._plugins.invalidate())),ui=!0;function pi(e,t,a){const{startAngle:n,pixelMargin:i,x:l,y:s,outerRadius:r,innerRadius:o}=t;let c=i/r;e.beginPath(),e.arc(l,s,r,n-c,a+c),o>i?(c=i/o,e.arc(l,s,o,a+c,n-c,!0)):e.arc(l,s,i,a+P,n-P),e.closePath(),e.clip()}function mi(e,t,a,n){return{x:a+e*Math.cos(t),y:n+e*Math.sin(t)}}function di(e,t,a,n,i){const{x:l,y:s,startAngle:r,pixelMargin:o,innerRadius:c}=t,h=Math.max(t.outerRadius+n+a-o,0),u=c>0?c+n+a+o:0;let p=0;const m=i-r;if(n){const e=((c>0?c-n:0)+(h>0?h-n:0))/2;p=(m-(0!==e?m*e/(e+n):m))/2}const d=(m-Math.max(.001,m*h-a/k)/h)/2,A=r+d+p,f=i-d-p,{outerStart:M,outerEnd:y,innerStart:g,innerEnd:v}=function(e,t,a,n){const i=it(e.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),l=(a-t)/2,s=Math.min(l,n*t/2),r=e=>{const t=(a-Math.min(l,e))*n/2;return Q(e,0,Math.min(l,t))};return{outerStart:r(i.outerStart),outerEnd:r(i.outerEnd),innerStart:Q(i.innerStart,0,s),innerEnd:Q(i.innerEnd,0,s)}}(t,u,h,f-A),H=h-M,V=h-y,Z=A+M/H,C=f-y/V,L=u+g,b=u+v,S=A+g/L,_=f-v/b;if(e.beginPath(),e.arc(l,s,h,Z,C),y>0){const t=mi(V,C,l,s);e.arc(t.x,t.y,y,C,f+P)}const z=mi(b,f,l,s);if(e.lineTo(z.x,z.y),v>0){const t=mi(b,_,l,s);e.arc(t.x,t.y,v,f+P,_+Math.PI)}if(e.arc(l,s,u,f-v/u,A+g/u,!0),g>0){const t=mi(L,S,l,s);e.arc(t.x,t.y,g,S+Math.PI,A-P)}const x=mi(H,A,l,s);if(e.lineTo(x.x,x.y),M>0){const t=mi(H,Z,l,s);e.arc(t.x,t.y,M,A-P,Z)}e.closePath()}Object.defineProperties(ci,{defaults:{enumerable:ui,value:Fe},instances:{enumerable:ui,value:si},overrides:{enumerable:ui,value:Re},registry:{enumerable:ui,value:Nn},version:{enumerable:ui,value:"3.7.1"},getChart:{enumerable:ui,value:ri},register:{enumerable:ui,value:(...e)=>{Nn.add(...e),hi()}},unregister:{enumerable:ui,value:(...e)=>{Nn.remove(...e),hi()}}});class Ai extends Sn{constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,a){const n=this.getProps(["x","y"],a),{angle:i,distance:l}=G(n,{x:e,y:t}),{startAngle:s,endAngle:r,innerRadius:o,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],a),u=this.options.spacing/2,p=d(h,r-s)>=w||J(i,s,r),m=ee(l,o+u,c+u);return p&&m}getCenterPoint(e){const{x:t,y:a,startAngle:n,endAngle:i,innerRadius:l,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),{offset:r,spacing:o}=this.options,c=(n+i)/2,h=(l+s+o+r)/2;return{x:t+Math.cos(c)*h,y:a+Math.sin(c)*h}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:a}=this,n=(t.offset||0)/2,i=(t.spacing||0)/2;if(this.pixelMargin="inner"===t.borderAlign?.33:0,this.fullCircles=a>w?Math.floor(a/w):0,0===a||this.innerRadius<0||this.outerRadius<0)return;e.save();let l=0;if(n){l=n/2;const t=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(t)*l,Math.sin(t)*l),this.circumference>=k&&(l=n)}e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor;const s=function(e,t,a,n){const{fullCircles:i,startAngle:l,circumference:s}=t;let r=t.endAngle;if(i){di(e,t,a,n,l+w);for(let t=0;tr&&l>r;return{count:n,start:o,loop:t.loop,ilen:c(s+(c?r-e:e))%l,g=()=>{m!==d&&(e.lineTo(f,d),e.lineTo(f,m),e.lineTo(f,A))};for(o&&(u=i[y(0)],e.moveTo(u.x,u.y)),h=0;h<=r;++h){if(u=i[y(h)],u.skip)continue;const t=u.x,a=u.y,n=0|t;n===p?(ad&&(d=a),f=(M*f+t)/++M):(g(),e.lineTo(t,a),p=n,M=0,m=d=a),A=a}g()}function Hi(e){const t=e.options,a=t.borderDash&&t.borderDash.length;return e._decimated||e._loop||t.tension||"monotone"===t.cubicInterpolationMode||t.stepped||a?gi:vi}Ai.id="arc",Ai.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},Ai.defaultRoutes={backgroundColor:"backgroundColor"};const Vi="function"==typeof Path2D;class Zi extends Sn{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){const a=this.options;if((a.tension||"monotone"===a.cubicInterpolationMode)&&!a.stepped&&!this._pointsUpdated){const n=a.spanGaps?this._loop:this._fullLoop;Ot(this._points,a,e,n,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(e,t){const a=e.points,n=e.options.spanGaps,i=a.length;if(!i)return[];const l=!!e._loop,{start:s,end:r}=function(e,t,a,n){let i=0,l=t-1;if(a&&!n)for(;ii&&e[l%t].skip;)l--;return l%=t,{start:i,end:l}}(a,i,l,n);return function(e,t,a,n){return n&&n.setContext&&a?function(e,t,a,n){const i=e._chart.getContext(),l=la(e.options),{_datasetIndex:s,options:{spanGaps:r}}=e,o=a.length,c=[];let h=l,u=t[0].start,p=u;function m(e,t,n,i){const l=r?-1:1;if(e!==t){for(e+=o;a[e%o].skip;)e-=l;for(;a[t%o].skip;)t+=l;e%o!=t%o&&(c.push({start:e%o,end:t%o,loop:n,style:i}),h=i,u=t%o)}}for(const e of t){u=r?u:e.start;let t,l=a[u%o];for(p=u+1;p<=e.end;p++){const r=a[p%o];t=la(n.setContext(ht(i,{type:"segment",p0:l,p1:r,p0DataIndex:(p-1)%o,p1DataIndex:p%o,datasetIndex:s}))),sa(t,h)&&m(u,p-1,e.loop,h),l=r,h=t}u"borderDash"!==e&&"fill"!==e};class Li extends Sn{constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,t,a){const n=this.options,{x:i,y:l}=this.getProps(["x","y"],a);return Math.pow(e-i,2)+Math.pow(t-l,2){Ei(e)}))}var Oi={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,a)=>{if(!a.enabled)return void Ti(e);const n=e.width;e.data.datasets.forEach(((t,i)=>{const{_data:l,indexAxis:s}=t,r=e.getDatasetMeta(i),o=l||t.data;if("y"===ct([s,e.options.indexAxis]))return;if("line"!==r.type)return;const h=e.scales[r.xAxisID];if("linear"!==h.type&&"time"!==h.type)return;if(e.options.parsing)return;let u,{start:p,count:m}=function(e,t){const a=t.length;let n,i=0;const{iScale:l}=e,{min:s,max:r,minDefined:o,maxDefined:c}=l.getUserBounds();return o&&(i=Q(pt(t,l.axis,s).lo,0,a-1)),n=c?Q(pt(t,l.axis,r).hi+1,i,a)-i:a-i,{start:i,count:n}}(r,o);if(m<=(a.threshold||4*n))Ei(t);else{switch(c(l)&&(t._data=o,delete t.data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(e){this._data=e}})),a.algorithm){case"lttb":u=function(e,t,a,n,i){const l=i.samples||n;if(l>=a)return e.slice(t,t+a);const s=[],r=(a-2)/(l-2);let o=0;const c=t+a-1;let h,u,p,m,d,A=t;for(s[o++]=e[A],h=0;hp&&(p=m,u=e[n],d=n);s[o++]=u,A=d}return s[o++]=e[c],s}(o,p,m,n,a);break;case"min-max":u=function(e,t,a,n){let i,l,s,r,o,h,u,p,m,d,A=0,f=0;const M=[],y=t+a-1,g=e[t].x,v=e[y].x-g;for(i=t;id&&(d=r,u=i),A=(f*A+l.x)/++f;else{const a=i-1;if(!c(h)&&!c(u)){const t=Math.min(h,u),n=Math.max(h,u);t!==p&&t!==a&&M.push({...e[t],x:A}),n!==p&&n!==a&&M.push({...e[n],x:A})}i>0&&a!==p&&M.push(e[a]),M.push(l),o=t,f=0,m=d=r,h=u=p=i}}return M}(o,p,m,n);break;default:throw new Error(`Unsupported decimation algorithm '${a.algorithm}'`)}t._decimated=u}}))},destroy(e){Ti(e)}};function Pi(e,t,a){const n=function(e){const t=e.options,a=t.fill;let n=d(a&&a.target,a);return void 0===n&&(n=!!t.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(e);if(u(n))return!isNaN(n.value)&&n;let i=parseFloat(n);return p(i)&&Math.floor(i)===i?("-"!==n[0]&&"+"!==n[0]||(i=t+i),!(i===t||i<0||i>=a)&&i):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}class Ri{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,t,a){const{x:n,y:i,radius:l}=this;return t=t||{start:0,end:w},e.arc(n,i,l,t.end,t.start,!0),!a.bounds}interpolate(e){const{x:t,y:a,radius:n}=this,i=e.angle;return{x:t+Math.cos(i)*n,y:a+Math.sin(i)*n,angle:i}}}function Di(e,t,a){for(;t>e;t--){const e=a[t];if(!isNaN(e.x)&&!isNaN(e.y))break}return t}function Ni(e,t,a){const n=[];for(let i=0;i{t=Di(e,t,i);const s=i[e],r=i[t];null!==n?(l.push({x:s.x,y:n}),l.push({x:r.x,y:n})):null!==a&&(l.push({x:a,y:s.y}),l.push({x:a,y:r.y}))})),l}(e,t),a.length?new Zi({points:a,options:{tension:0},_loop:n,_fullLoop:n}):null}function ji(e,t,a){let n=e[t].fill;const i=[t];let l;if(!a)return n;for(;!1!==n&&-1===i.indexOf(n);){if(!p(n))return n;if(l=e[n],!l)return!1;if(l.visible)return n;i.push(n),n=l.fill}return!1}function Ui(e,t,a){const{segments:n,points:i}=t;let l=!0,s=!1;e.beginPath();for(const r of n){const{start:n,end:o}=r,c=i[n],h=i[Di(n,o,i)];l?(e.moveTo(c.x,c.y),l=!1):(e.lineTo(c.x,a),e.lineTo(c.x,c.y)),s=!!t.pathSegment(e,r,{move:s}),s?e.closePath():e.lineTo(h.x,a)}e.lineTo(t.first().x,a),e.closePath(),e.clip()}function qi(e,t,a,n){if(n)return;let i=t[e],l=a[e];return"angle"===e&&(i=X(i),l=X(l)),{property:e,start:i,end:l}}function Wi(e,t,a,n){return e&&t?n(e[a],t[a]):e?e[a]:t?t[a]:0}function $i(e,t,a){const{top:n,bottom:i}=t.chart.chartArea,{property:l,start:s,end:r}=a||{};"x"===l&&(e.beginPath(),e.rect(s,n,r-s,i-n),e.clip())}function Gi(e,t,a,n){const i=t.interpolate(a,n);i&&e.lineTo(i.x,i.y)}function Yi(e,t){const{line:a,target:n,property:i,color:l,scale:s}=t,r=function(e,t,a){const n=e.segments,i=e.points,l=t.points,s=[];for(const e of n){let{start:n,end:r}=e;r=Di(n,r,i);const o=qi(a,i[n],i[r],e.loop);if(!t.segments){s.push({source:e,target:o,start:i[n],end:i[r]});continue}const c=ia(t,o);for(const t of c){const n=qi(a,l[t.start],l[t.end],t.loop),r=na(e,i,n);for(const e of r)s.push({source:e,target:t,start:{[a]:Wi(o,n,"start",Math.max)},end:{[a]:Wi(o,n,"end",Math.min)}})}}return s}(a,n,i);for(const{source:t,target:o,start:c,end:h}of r){const{style:{backgroundColor:r=l}={}}=t,u=!0!==n;e.save(),e.fillStyle=r,$i(e,s,u&&qi(i,c,h)),e.beginPath();const p=!!a.pathSegment(e,t);let m;if(u){p?e.closePath():Gi(e,n,h,i);const t=!!n.pathSegment(e,o,{move:p,reverse:!0});m=p&&t,m||Gi(e,n,c,i)}e.closePath(),e.fill(m?"evenodd":"nonzero"),e.restore()}}function Ki(e,t,a){const n=Fi(t),{line:i,scale:l,axis:s}=t,r=i.options,o=r.fill,c=r.backgroundColor,{above:h=c,below:u=c}=o||{};n&&i.points.length&&(Ge(e,a),function(e,t){const{line:a,target:n,above:i,below:l,area:s,scale:r}=t,o=a._loop?"angle":t.axis;e.save(),"x"===o&&l!==i&&(Ui(e,n,s.top),Yi(e,{line:a,target:n,color:i,scale:r,property:o}),e.restore(),e.save(),Ui(e,n,s.bottom)),Yi(e,{line:a,target:n,color:l,scale:r,property:o}),e.restore()}(e,{line:i,target:n,above:h,below:u,area:a,scale:l,axis:s}),Ye(e))}var Xi={id:"filler",afterDatasetsUpdate(e,t,a){const n=(e.data.datasets||[]).length,i=[];let l,s,r,o;for(s=0;s=0;--t){const a=i[t].$filler;a&&(a.line.updateControlPoints(l,a.axis),n&&Ki(e.ctx,a,l))}},beforeDatasetsDraw(e,t,a){if("beforeDatasetsDraw"!==a.drawTime)return;const n=e.getSortedVisibleDatasetMetas();for(let t=n.length-1;t>=0;--t){const a=n[t].$filler;a&&Ki(e.ctx,a,e.chartArea)}},beforeDatasetDraw(e,t,a){const n=t.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===a.drawTime&&Ki(e.ctx,n,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Ji=(e,t)=>{let{boxHeight:a=t,boxWidth:n=t}=e;return e.usePointStyle&&(a=Math.min(a,t),n=Math.min(n,t)),{boxWidth:n,boxHeight:a,itemHeight:Math.max(t,a)}};class Qi extends Sn{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,a){this.maxWidth=e,this.maxHeight=t,this._margins=a,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let t=f(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter((t=>e.filter(t,this.chart.data)))),e.sort&&(t=t.sort(((t,a)=>e.sort(t,a,this.chart.data)))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:e,ctx:t}=this;if(!e.display)return void(this.width=this.height=0);const a=e.labels,n=ot(a.font),i=n.size,l=this._computeTitleHeight(),{boxWidth:s,itemHeight:r}=Ji(a,i);let o,c;t.font=n.string,this.isHorizontal()?(o=this.maxWidth,c=this._fitRows(l,i,s,r)+10):(c=this.maxHeight,o=this._fitCols(l,i,s,r)+10),this.width=Math.min(o,e.maxWidth||this.maxWidth),this.height=Math.min(c,e.maxHeight||this.maxHeight)}_fitRows(e,t,a,n){const{ctx:i,maxWidth:l,options:{labels:{padding:s}}}=this,r=this.legendHitBoxes=[],o=this.lineWidths=[0],c=n+s;let h=e;i.textAlign="left",i.textBaseline="middle";let u=-1,p=-c;return this.legendItems.forEach(((e,m)=>{const d=a+t/2+i.measureText(e.text).width;(0===m||o[o.length-1]+d+2*s>l)&&(h+=c,o[o.length-(m>0?0:1)]=0,p+=c,u++),r[m]={left:0,top:p,row:u,width:d,height:n},o[o.length-1]+=d+s})),h}_fitCols(e,t,a,n){const{ctx:i,maxHeight:l,options:{labels:{padding:s}}}=this,r=this.legendHitBoxes=[],o=this.columnSizes=[],c=l-e;let h=s,u=0,p=0,m=0,d=0;return this.legendItems.forEach(((e,l)=>{const A=a+t/2+i.measureText(e.text).width;l>0&&p+n+2*s>c&&(h+=u+s,o.push({width:u,height:p}),m+=u+s,d++,u=p=0),r[l]={left:m,top:p,col:d,width:A,height:n},u=Math.max(u,A),p+=n+s})),h+=u,o.push({width:u,height:p}),h}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:a,labels:{padding:n},rtl:i}}=this,l=Jt(i,this.left,this.width);if(this.isHorizontal()){let i=0,r=s(a,this.left+n,this.right-this.lineWidths[i]);for(const o of t)i!==o.row&&(i=o.row,r=s(a,this.left+n,this.right-this.lineWidths[i])),o.top+=this.top+e+n,o.left=l.leftForLtr(l.x(r),o.width),r+=o.width+n}else{let i=0,r=s(a,this.top+e+n,this.bottom-this.columnSizes[i].height);for(const o of t)o.col!==i&&(i=o.col,r=s(a,this.top+e+n,this.bottom-this.columnSizes[i].height)),o.top=r,o.left+=this.left+n,o.left=l.leftForLtr(l.x(o.left),o.width),r+=o.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const e=this.ctx;Ge(e,this),this._draw(),Ye(e)}}_draw(){const{options:e,columnSizes:t,lineWidths:a,ctx:n}=this,{align:i,labels:l}=e,r=Fe.color,o=Jt(e.rtl,this.left,this.width),c=ot(l.font),{color:h,padding:u}=l,p=c.size,m=p/2;let A;this.drawTitle(),n.textAlign=o.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;const{boxWidth:f,boxHeight:M,itemHeight:y}=Ji(l,p),g=this.isHorizontal(),v=this._computeTitleHeight();A=g?{x:s(i,this.left+u,this.right-a[0]),y:this.top+u+v,line:0}:{x:this.left+u,y:s(i,this.top+v+u,this.bottom-t[0].height),line:0},Qt(this.ctx,e.textDirection);const H=y+u;this.legendItems.forEach(((V,Z)=>{n.strokeStyle=V.fontColor||h,n.fillStyle=V.fontColor||h;const C=n.measureText(V.text).width,L=o.textAlign(V.textAlign||(V.textAlign=l.textAlign)),b=f+m+C;let S=A.x,_=A.y;o.setWidth(this.width),g?Z>0&&S+b+u>this.right&&(_=A.y+=H,A.line++,S=A.x=s(i,this.left+u,this.right-a[A.line])):Z>0&&_+H>this.bottom&&(S=A.x=S+t[A.line].width+u,A.line++,_=A.y=s(i,this.top+v+u,this.bottom-t[A.line].height)),function(e,t,a){if(isNaN(f)||f<=0||isNaN(M)||M<0)return;n.save();const i=d(a.lineWidth,1);if(n.fillStyle=d(a.fillStyle,r),n.lineCap=d(a.lineCap,"butt"),n.lineDashOffset=d(a.lineDashOffset,0),n.lineJoin=d(a.lineJoin,"miter"),n.lineWidth=i,n.strokeStyle=d(a.strokeStyle,r),n.setLineDash(d(a.lineDash,[])),l.usePointStyle){const l={radius:f*Math.SQRT2/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:i},s=o.xPlus(e,f/2);We(n,l,s,t+m)}else{const l=t+Math.max((p-M)/2,0),s=o.leftForLtr(e,f),r=st(a.borderRadius);n.beginPath(),Object.values(r).some((e=>0!==e))?et(n,{x:s,y:l,w:f,h:M,radius:r}):n.rect(s,l,f,M),n.fill(),0!==i&&n.stroke()}n.restore()}(o.x(S),_,V),S=((e,t,a,n)=>e===(n?"left":"right")?a:"center"===e?(t+a)/2:t)(L,S+f+m,g?S+b:this.right,e.rtl),function(e,t,a){Je(n,a.text,e,t+y/2,c,{strikethrough:a.hidden,textAlign:o.textAlign(a.textAlign)})}(o.x(S),_,V),g?A.x+=b+u:A.y+=H})),ea(this.ctx,e.textDirection)}drawTitle(){const e=this.options,t=e.title,a=ot(t.font),n=rt(t.padding);if(!t.display)return;const i=Jt(e.rtl,this.left,this.width),r=this.ctx,o=t.position,c=a.size/2,h=n.top+c;let u,p=this.left,m=this.width;if(this.isHorizontal())m=Math.max(...this.lineWidths),u=this.top+h,p=s(e.align,p,this.right-m);else{const t=this.columnSizes.reduce(((e,t)=>Math.max(e,t.height)),0);u=h+s(e.align,this.top,this.bottom-t-e.labels.padding-this._computeTitleHeight())}const d=s(o,p,p+m);r.textAlign=i.textAlign(l(o)),r.textBaseline="middle",r.strokeStyle=t.color,r.fillStyle=t.color,r.font=a.string,Je(r,t.text,d,u,a)}_computeTitleHeight(){const e=this.options.title,t=ot(e.font),a=rt(e.padding);return e.display?t.lineHeight+a.height:0}_getLegendItemAt(e,t){let a,n,i;if(ee(e,this.left,this.right)&&ee(t,this.top,this.bottom))for(i=this.legendHitBoxes,a=0;ae.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:a,pointStyle:n,textAlign:i,color:l}}=e.legend.options;return e._getSortedDatasetMetas().map((e=>{const s=e.controller.getStyle(a?0:void 0),r=rt(s.borderWidth);return{text:t[e.index].label,fillStyle:s.backgroundColor,fontColor:l,hidden:!e.visible,lineCap:s.borderCapStyle,lineDash:s.borderDash,lineDashOffset:s.borderDashOffset,lineJoin:s.borderJoinStyle,lineWidth:(r.width+r.height)/4,strokeStyle:s.borderColor,pointStyle:n||s.pointStyle,rotation:s.rotation,textAlign:i||s.textAlign,borderRadius:0,datasetIndex:e.index}}),this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class tl extends Sn{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t){const a=this.options;if(this.left=0,this.top=0,!a.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=e,this.height=this.bottom=t;const n=h(a.text)?a.text.length:1;this._padding=rt(a.padding);const i=n*ot(a.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=i:this.width=i}isHorizontal(){const e=this.options.position;return"top"===e||"bottom"===e}_drawArgs(e){const{top:t,left:a,bottom:n,right:i,options:l}=this,r=l.align;let o,c,h,u=0;return this.isHorizontal()?(c=s(r,a,i),h=t+e,o=i-a):("left"===l.position?(c=a+e,h=s(r,n,t),u=-.5*k):(c=i-e,h=s(r,t,n),u=.5*k),o=n-t),{titleX:c,titleY:h,maxWidth:o,rotation:u}}draw(){const e=this.ctx,t=this.options;if(!t.display)return;const a=ot(t.font),n=a.lineHeight/2+this._padding.top,{titleX:i,titleY:s,maxWidth:r,rotation:o}=this._drawArgs(n);Je(e,t.text,0,0,a,{color:t.color,maxWidth:r,rotation:o,textAlign:l(t.align),textBaseline:"middle",translation:[i,s]})}}var al={id:"title",_element:tl,start(e,t,a){!function(e,t){const a=new tl({ctx:e.ctx,options:t,chart:e});hn.configure(e,a,t),hn.addBox(e,a),e.titleBlock=a}(e,a)},stop(e){const t=e.titleBlock;hn.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,a){const n=e.titleBlock;hn.configure(e,n,a),n.options=a},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const nl=new WeakMap;var il={id:"subtitle",start(e,t,a){const n=new tl({ctx:e.ctx,options:a,chart:e});hn.configure(e,n,a),hn.addBox(e,n),nl.set(e,n)},stop(e){hn.removeBox(e,nl.get(e)),nl.delete(e)},beforeUpdate(e,t,a){const n=nl.get(e);hn.configure(e,n,a),n.options=a},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ll={average(e){if(!e.length)return!1;let t,a,n=0,i=0,l=0;for(t=0,a=e.length;t-1?e.split("\n"):e}function ol(e,t){const{element:a,datasetIndex:n,index:i}=t,l=e.getDatasetMeta(n).controller,{label:s,value:r}=l.getLabelAndValue(i);return{chart:e,label:s,parsed:l.getParsed(i),raw:e.data.datasets[n].data[i],formattedValue:r,dataset:l.getDataset(),dataIndex:i,datasetIndex:n,element:a}}function cl(e,t){const a=e.chart.ctx,{body:n,footer:i,title:l}=e,{boxWidth:s,boxHeight:r}=t,o=ot(t.bodyFont),c=ot(t.titleFont),h=ot(t.footerFont),u=l.length,p=i.length,m=n.length,d=rt(t.padding);let A=d.height,f=0,y=n.reduce(((e,t)=>e+t.before.length+t.lines.length+t.after.length),0);y+=e.beforeBody.length+e.afterBody.length,u&&(A+=u*c.lineHeight+(u-1)*t.titleSpacing+t.titleMarginBottom),y&&(A+=m*(t.displayColors?Math.max(r,o.lineHeight):o.lineHeight)+(y-m)*o.lineHeight+(y-1)*t.bodySpacing),p&&(A+=t.footerMarginTop+p*h.lineHeight+(p-1)*t.footerSpacing);let g=0;const v=function(e){f=Math.max(f,a.measureText(e).width+g)};return a.save(),a.font=c.string,M(e.title,v),a.font=o.string,M(e.beforeBody.concat(e.afterBody),v),g=t.displayColors?s+2+t.boxPadding:0,M(n,(e=>{M(e.before,v),M(e.lines,v),M(e.after,v)})),g=0,a.font=h.string,M(e.footer,v),a.restore(),f+=d.width,{width:f,height:A}}function hl(e,t,a,n){const{x:i,width:l}=a,{width:s,chartArea:{left:r,right:o}}=e;let c="center";return"center"===n?c=i<=(r+o)/2?"left":"right":i<=l/2?c="left":i>=s-l/2&&(c="right"),function(e,t,a,n){const{x:i,width:l}=n,s=a.caretSize+a.caretPadding;return"left"===e&&i+l+s>t.width||"right"===e&&i-l-s<0||void 0}(c,e,t,a)&&(c="center"),c}function ul(e,t,a){const n=a.yAlign||t.yAlign||function(e,t){const{y:a,height:n}=t;return ae.height-n/2?"bottom":"center"}(e,a);return{xAlign:a.xAlign||t.xAlign||hl(e,t,a,n),yAlign:n}}function pl(e,t,a,n){const{caretSize:i,caretPadding:l,cornerRadius:s}=e,{xAlign:r,yAlign:o}=a,c=i+l,{topLeft:h,topRight:u,bottomLeft:p,bottomRight:m}=st(s);let d=function(e,t){let{x:a,width:n}=e;return"right"===t?a-=n:"center"===t&&(a-=n/2),a}(t,r);const A=function(e,t,a){let{y:n,height:i}=e;return"top"===t?n+=a:n-="bottom"===t?i+a:i/2,n}(t,o,c);return"center"===o?"left"===r?d+=c:"right"===r&&(d-=c):"left"===r?d-=Math.max(h,p)+i:"right"===r&&(d+=Math.max(u,m)+i),{x:Q(d,0,n.width-t.width),y:Q(A,0,n.height-t.height)}}function ml(e,t,a){const n=rt(a.padding);return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-n.right:e.x+n.left}function dl(e){return sl([],rl(e))}function Al(e,t){const a=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return a?e.override(a):e}class fl extends Sn{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart||e._chart,this._chart=this.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,a=this.options.setContext(this.getContext()),n=a.enabled&&t.options.animation&&a.animations,i=new pa(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=(this,ht(this.chart.getContext(),{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"})))}getTitle(e,t){const{callbacks:a}=t,n=a.beforeTitle.apply(this,[e]),i=a.title.apply(this,[e]),l=a.afterTitle.apply(this,[e]);let s=[];return s=sl(s,rl(n)),s=sl(s,rl(i)),s=sl(s,rl(l)),s}getBeforeBody(e,t){return dl(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:a}=t,n=[];return M(e,(e=>{const t={before:[],lines:[],after:[]},i=Al(a,e);sl(t.before,rl(i.beforeLabel.call(this,e))),sl(t.lines,i.label.call(this,e)),sl(t.after,rl(i.afterLabel.call(this,e))),n.push(t)})),n}getAfterBody(e,t){return dl(t.callbacks.afterBody.apply(this,[e]))}getFooter(e,t){const{callbacks:a}=t,n=a.beforeFooter.apply(this,[e]),i=a.footer.apply(this,[e]),l=a.afterFooter.apply(this,[e]);let s=[];return s=sl(s,rl(n)),s=sl(s,rl(i)),s=sl(s,rl(l)),s}_createItems(e){const t=this._active,a=this.chart.data,n=[],i=[],l=[];let s,r,o=[];for(s=0,r=t.length;se.filter(t,n,i,a)))),e.itemSort&&(o=o.sort(((t,n)=>e.itemSort(t,n,a)))),M(o,(t=>{const a=Al(e.callbacks,t);n.push(a.labelColor.call(this,t)),i.push(a.labelPointStyle.call(this,t)),l.push(a.labelTextColor.call(this,t))})),this.labelColors=n,this.labelPointStyles=i,this.labelTextColors=l,this.dataPoints=o,o}update(e,t){const a=this.options.setContext(this.getContext()),n=this._active;let i,l=[];if(n.length){const e=ll[a.position].call(this,n,this._eventPosition);l=this._createItems(a),this.title=this.getTitle(l,a),this.beforeBody=this.getBeforeBody(l,a),this.body=this.getBody(l,a),this.afterBody=this.getAfterBody(l,a),this.footer=this.getFooter(l,a);const t=this._size=cl(this,a),s=Object.assign({},e,t),r=ul(this.chart,a,s),o=pl(a,s,r,this.chart);this.xAlign=r.xAlign,this.yAlign=r.yAlign,i={opacity:1,x:o.x,y:o.y,width:t.width,height:t.height,caretX:e.x,caretY:e.y}}else 0!==this.opacity&&(i={opacity:0});this._tooltipItems=l,this.$context=void 0,i&&this._resolveAnimations().update(this,i),e&&a.external&&a.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,a,n){const i=this.getCaretPosition(e,a,n);t.lineTo(i.x1,i.y1),t.lineTo(i.x2,i.y2),t.lineTo(i.x3,i.y3)}getCaretPosition(e,t,a){const{xAlign:n,yAlign:i}=this,{caretSize:l,cornerRadius:s}=a,{topLeft:r,topRight:o,bottomLeft:c,bottomRight:h}=st(s),{x:u,y:p}=e,{width:m,height:d}=t;let A,f,M,y,g,v;return"center"===i?(g=p+d/2,"left"===n?(A=u,f=A-l,y=g+l,v=g-l):(A=u+m,f=A+l,y=g-l,v=g+l),M=A):(f="left"===n?u+Math.max(r,c)+l:"right"===n?u+m-Math.max(o,h)-l:this.caretX,"top"===i?(y=p,g=y-l,A=f-l,M=f+l):(y=p+d,g=y+l,A=f+l,M=f-l),v=y),{x1:A,x2:f,x3:M,y1:y,y2:g,y3:v}}drawTitle(e,t,a){const n=this.title,i=n.length;let l,s,r;if(i){const o=Jt(a.rtl,this.x,this.width);for(e.x=ml(this,a.titleAlign,a),t.textAlign=o.textAlign(a.titleAlign),t.textBaseline="middle",l=ot(a.titleFont),s=a.titleSpacing,t.fillStyle=a.titleColor,t.font=l.string,r=0;r0!==e))?(e.beginPath(),e.fillStyle=i.multiKeyBackground,et(e,{x:t,y:d,w:o,h:r,radius:s}),e.fill(),e.stroke(),e.fillStyle=l.backgroundColor,e.beginPath(),et(e,{x:a,y:d+1,w:o-2,h:r-2,radius:s}),e.fill()):(e.fillStyle=i.multiKeyBackground,e.fillRect(t,d,o,r),e.strokeRect(t,d,o,r),e.fillStyle=l.backgroundColor,e.fillRect(a,d+1,o-2,r-2))}e.fillStyle=this.labelTextColors[a]}drawBody(e,t,a){const{body:n}=this,{bodySpacing:i,bodyAlign:l,displayColors:s,boxHeight:r,boxWidth:o,boxPadding:c}=a,h=ot(a.bodyFont);let u=h.lineHeight,p=0;const m=Jt(a.rtl,this.x,this.width),d=function(a){t.fillText(a,m.x(e.x+p),e.y+u/2),e.y+=u+i},A=m.textAlign(l);let f,y,g,v,H,V,Z;for(t.textAlign=l,t.textBaseline="middle",t.font=h.string,e.x=ml(this,A,a),t.fillStyle=a.bodyColor,M(this.beforeBody,d),p=s&&"right"!==A?"center"===l?o/2+c:o+2+c:0,v=0,V=n.length;v0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,a=this.$animations,n=a&&a.x,i=a&&a.y;if(n||i){const a=ll[e.position].call(this,this._active,this._eventPosition);if(!a)return;const l=this._size=cl(this,e),s=Object.assign({},a,this._size),r=ul(t,e,s),o=pl(e,s,r,t);n._to===o.x&&i._to===o.y||(this.xAlign=r.xAlign,this.yAlign=r.yAlign,this.width=l.width,this.height=l.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,o))}}draw(e){const t=this.options.setContext(this.getContext());let a=this.opacity;if(!a)return;this._updateAnimationTarget(t);const n={width:this.width,height:this.height},i={x:this.x,y:this.y};a=Math.abs(a)<.001?0:a;const l=rt(t.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&s&&(e.save(),e.globalAlpha=a,this.drawBackground(i,e,n,t),Qt(e,t.textDirection),i.y+=l.top,this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),ea(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const a=this._active,n=e.map((({datasetIndex:e,index:t})=>{const a=this.chart.getDatasetMeta(e);if(!a)throw new Error("Cannot find a dataset at index "+e);return{datasetIndex:e,element:a.data[t],index:t}})),i=!y(a,n),l=this._positionChanged(n,t);(i||l)&&(this._active=n,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,a=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,i=this._active||[],l=this._getActiveElements(e,i,t,a),s=this._positionChanged(l,e),r=t||!y(l,i)||s;return r&&(this._active=l,(n.enabled||n.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),r}_getActiveElements(e,t,a,n){const i=this.options;if("mouseout"===e.type)return[];if(!n)return t;const l=this.chart.getElementsAtEventForMode(e,i.mode,i,a);return i.reverse&&l.reverse(),l}_positionChanged(e,t){const{caretX:a,caretY:n,options:i}=this,l=ll[i.position].call(this,e,t);return!1!==l&&(a!==l.x||n!==l.y)}}fl.positioners=ll;var Ml={id:"tooltip",_element:fl,positioners:ll,afterInit(e,t,a){a&&(e.tooltip=new fl({chart:e,options:a}))},beforeUpdate(e,t,a){e.tooltip&&e.tooltip.initialize(a)},reset(e,t,a){e.tooltip&&e.tooltip.initialize(a)},afterDraw(e){const t=e.tooltip,a={tooltip:t};!1!==e.notifyPlugins("beforeTooltipDraw",a)&&(t&&t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",a))},afterEvent(e,t){if(e.tooltip){const a=t.replay;e.tooltip.handleEvent(t.event,a,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:{beforeTitle:r,title(e){if(e.length>0){const t=e[0],a=t.chart.data.labels,n=a?a.length:0;if(this&&this.options&&"dataset"===this.options.mode)return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex"filter"!==e&&"itemSort"!==e&&"external"!==e,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},yl=Object.freeze({__proto__:null,Decimation:Oi,Filler:Xi,Legend:el,SubTitle:il,Title:al,Tooltip:Ml});class gl extends Rn{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const e=this.getLabels();for(const{index:a,label:n}of t)e[a]===n&&e.splice(a,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(c(e))return null;const a=this.getLabels();return((e,t)=>null===e?null:Q(Math.round(e),0,t))(t=isFinite(t)&&a[t]===e?t:function(e,t,a,n){const i=e.indexOf(t);return-1===i?((e,t,a,n)=>("string"==typeof t?(a=e.push(t)-1,n.unshift({index:a,label:t})):isNaN(t)&&(a=null),a))(e,t,a,n):i!==e.lastIndexOf(t)?a:i}(a,e,d(t,e),this._addedLabels),a.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:a,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(e||(a=0),t||(n=this.getLabels().length-1)),this.min=a,this.max=n}buildTicks(){const e=this.min,t=this.max,a=this.options.offset,n=[];let i=this.getLabels();i=0===e&&t===i.length-1?i:i.slice(e,t+1),this._valueRange=Math.max(i.length-(a?0:1),1),this._startValue=this.min-(a?.5:0);for(let a=e;a<=t;a++)n.push({value:a});return n}getLabelForValue(e){const t=this.getLabels();return e>=0&&et.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function vl(e,t,{horizontal:a,minRotation:n}){const i=q(n),l=(a?Math.sin(i):Math.cos(i))||.001,s=.75*t*(""+e).length;return Math.min(t/l,s)}gl.id="category",gl.defaults={ticks:{callback:gl.prototype.getLabelForValue}};class Hl extends Rn{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return c(e)||("number"==typeof e||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:t,maxDefined:a}=this.getUserBounds();let{min:n,max:i}=this;const l=e=>n=t?n:e,s=e=>i=a?i:e;if(e){const e=I(n),t=I(i);e<0&&t<0?s(0):e>0&&t>0&&l(0)}if(n===i){let t=1;(i>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(t=Math.abs(.05*i)),s(i+t),e||l(n-t)}this.min=n,this.max=i}getTickLimit(){const e=this.options.ticks;let t,{maxTicksLimit:a,stepSize:n}=e;return n?(t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,t>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${t} ticks. Limiting to 1000.`),t=1e3)):(t=this.computeTickLimit(),a=a||11),a&&(t=Math.min(a,t)),t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let a=this.getTickLimit();a=Math.max(2,a);const n=function(e,t){const a=[],{bounds:n,step:i,min:l,max:s,precision:r,count:o,maxTicks:h,maxDigits:u,includeBounds:p}=e,m=i||1,d=h-1,{min:A,max:f}=t,M=!c(l),y=!c(s),g=!c(o),v=(f-A)/(u+1);let H,V,Z,C,L=F((f-A)/d/m)*m;if(L<1e-14&&!M&&!y)return[{value:A},{value:f}];C=Math.ceil(f/L)-Math.floor(A/L),C>d&&(L=F(C*L/d/m)*m),c(r)||(H=Math.pow(10,r),L=Math.ceil(L*H)/H),"ticks"===n?(V=Math.floor(A/L)*L,Z=Math.ceil(f/L)*L):(V=A,Z=f),M&&y&&i&&function(e,t){const a=Math.round(e);return a-t<=e&&a+t>=e}((s-l)/i,L/1e3)?(C=Math.round(Math.min((s-l)/L,h)),L=(s-l)/C,V=l,Z=s):g?(V=M?l:V,Z=y?s:Z,C=o-1,L=(Z-V)/C):(C=(Z-V)/L,C=j(C,Math.round(C),L/1e3)?Math.round(C):Math.ceil(C));const b=Math.max($(L),$(V));H=Math.pow(10,c(r)?b:r),V=Math.round(V*H)/H,Z=Math.round(Z*H)/H;let S=0;for(M&&(p&&V!==l?(a.push({value:l}),V0?a:null;this._zero=!0}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=p(e)?Math.max(0,e):null,this.max=p(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let a=this.min,n=this.max;const i=t=>a=e?a:t,l=e=>n=t?n:e,s=(e,t)=>Math.pow(10,Math.floor(N(e))+t);a===n&&(a<=0?(i(1),l(10)):(i(s(a,-1)),l(s(n,1)))),a<=0&&i(s(n,-1)),n<=0&&l(s(a,1)),this._zero&&this.min!==this._suggestedMin&&a===s(this.min,0)&&i(s(a,-1)),this.min=a,this.max=n}buildTicks(){const e=this.options,t=function(e,t){const a=Math.floor(N(t.max)),n=Math.ceil(t.max/Math.pow(10,a)),i=[];let l=m(e.min,Math.pow(10,Math.floor(N(t.min)))),s=Math.floor(N(l)),r=Math.floor(l/Math.pow(10,s)),o=s<0?Math.pow(10,Math.abs(s)):1;do{i.push({value:l,major:Zl(l)}),++r,10===r&&(r=1,++s,o=s>=0?1:o),l=Math.round(r*Math.pow(10,s)*o)/o}while(si?{start:t-a,end:t}:{start:t,end:t+a}}function Sl(e,t,a,n,i){const l=Math.abs(Math.sin(a)),s=Math.abs(Math.cos(a));let r=0,o=0;n.startt.r&&(r=(n.end-t.r)/l,e.r=Math.max(e.r,t.r+r)),i.startt.b&&(o=(i.end-t.b)/s,e.b=Math.max(e.b,t.b+o))}function _l(e){return 0===e||180===e?"center":e<180?"left":"right"}function zl(e,t,a){return 90===a||270===a?e-=t/2:(a>270||a<90)&&(e-=t),e}function xl(e,t,a,n){const{ctx:i}=e;if(a)i.arc(e.xCenter,e.yCenter,t,0,w);else{let a=e.getPointPosition(0,t);i.moveTo(a.x,a.y);for(let l=1;l{const a=f(this.options.pointLabels.callback,[e,t],this);return a||0===a?a:""})).filter(((e,t)=>this.chart.getDataVisibility(t)))}fit(){const e=this.options;e.display&&e.pointLabels.display?function(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},a=Object.assign({},t),n=[],i=[],l=e._pointLabels.length,s=e.options.pointLabels,r=s.centerPointLabels?k/l:0;for(let p=0;p=0&&e=0;i--){const t=n.setContext(e.getPointLabelContext(i)),l=ot(t.font),{x:s,y:r,textAlign:o,left:h,top:u,right:p,bottom:m}=e._pointLabelItems[i],{backdropColor:d}=t;if(!c(d)){const e=rt(t.backdropPadding);a.fillStyle=d,a.fillRect(h-e.left,u-e.top,p-h+e.width,m-u+e.height)}Je(a,e._pointLabels[i],s,r+l.lineHeight/2,l,{color:t.color,textAlign:o,textBaseline:"middle"})}}(this,i),n.display&&this.ticks.forEach(((e,t)=>{0!==t&&(s=this.getDistanceFromCenterForValue(e.value),function(e,t,a,n){const i=e.ctx,l=t.circular,{color:s,lineWidth:r}=t;!l&&!n||!s||!r||a<0||(i.save(),i.strokeStyle=s,i.lineWidth=r,i.setLineDash(t.borderDash),i.lineDashOffset=t.borderDashOffset,i.beginPath(),xl(e,a,l,n),i.closePath(),i.stroke(),i.restore())}(this,n.setContext(this.getContext(t-1)),s,i))})),a.display){for(e.save(),l=i-1;l>=0;l--){const n=a.setContext(this.getPointLabelContext(l)),{color:i,lineWidth:o}=n;o&&i&&(e.lineWidth=o,e.strokeStyle=i,e.setLineDash(n.borderDash),e.lineDashOffset=n.borderDashOffset,s=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),r=this.getPointPosition(l,s),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(r.x,r.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,t=this.options,a=t.ticks;if(!a.display)return;const n=this.getIndexAngle(0);let i,l;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(n),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach(((n,s)=>{if(0===s&&!t.reverse)return;const r=a.setContext(this.getContext(s)),o=ot(r.font);if(i=this.getDistanceFromCenterForValue(this.ticks[s].value),r.showLabelBackdrop){e.font=o.string,l=e.measureText(n.label).width,e.fillStyle=r.backdropColor;const t=rt(r.backdropPadding);e.fillRect(-l/2-t.left,-i-o.size/2-t.top,l+t.width,o.size+t.height)}Je(e,n.label,0,-i,o,{color:r.color})})),e.restore()}drawTitle(){}}kl.id="radialLinear",kl.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:zn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:e=>e,padding:5,centerPointLabels:!1}},kl.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},kl.descriptors={angleLines:{_fallback:"grid"}};const wl={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}},El=Object.keys(wl);function Tl(e,t){return e-t}function Ol(e,t){if(c(t))return null;const a=e._adapter,{parser:n,round:i,isoWeekday:l}=e._parseOpts;let s=t;return"function"==typeof n&&(s=n(s)),p(s)||(s="string"==typeof n?a.parse(s,n):a.parse(s)),null===s?null:(i&&(s="week"!==i||!B(l)&&!0!==l?a.startOf(s,i):a.startOf(s,"isoWeek",l)),+s)}function Pl(e,t,a,n){const i=El.length;for(let l=El.indexOf(e);l=t?a[n]:a[i]]=!0}}else e[t]=!0}function Dl(e,t,a){const n=[],i={},l=t.length;let s,r;for(s=0;s=0&&(t[o].major=!0);return t}(e,n,i,a):n}class Nl extends Rn{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,t){const a=e.time||(e.time={}),n=this._adapter=new Ua._date(e.adapters.date);Z(a.displayFormats,n.formats()),this._parseOpts={parser:a.parser,round:a.round,isoWeekday:a.isoWeekday},super.init(e),this._normalized=t.normalized}parse(e,t){return void 0===e?null:Ol(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,t=this._adapter,a=e.time.unit||"day";let{min:n,max:i,minDefined:l,maxDefined:s}=this.getUserBounds();function r(e){l||isNaN(e.min)||(n=Math.min(n,e.min)),s||isNaN(e.max)||(i=Math.max(i,e.max))}l&&s||(r(this._getLabelBounds()),"ticks"===e.bounds&&"labels"===e.ticks.source||r(this.getMinMax(!1))),n=p(n)&&!isNaN(n)?n:+t.startOf(Date.now(),a),i=p(i)&&!isNaN(i)?i:+t.endOf(Date.now(),a)+1,this.min=Math.min(n,i-1),this.max=Math.max(n+1,i)}_getLabelBounds(){const e=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;return e.length&&(t=e[0],a=e[e.length-1]),{min:t,max:a}}buildTicks(){const e=this.options,t=e.time,a=e.ticks,n="labels"===a.source?this.getLabelTimestamps():this._generate();"ticks"===e.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const i=this.min,l=function(e,t,a){let n=0,i=e.length;for(;nn&&e[i-1]>a;)i--;return n>0||i=El.indexOf(a);l--){const a=El[l];if(wl[a].common&&e._adapter.diff(i,n,a)>=t-1)return a}return El[a?El.indexOf(a):0]}(this,l.length,t.minUnit,this.min,this.max)),this._majorUnit=a.major.enabled&&"year"!==this._unit?function(e){for(let t=El.indexOf(e)+1,a=El.length;t1e5*s)throw new Error(t+" and "+a+" are too far apart with stepSize of "+s+" "+l);const m="data"===n.ticks.source&&this.getDataTimestamps();for(h=p,u=0;he-t)).map((e=>+e))}getLabelForValue(e){const t=this._adapter,a=this.options.time;return a.tooltipFormat?t.format(e,a.tooltipFormat):t.format(e,a.displayFormats.datetime)}_tickFormatFunction(e,t,a,n){const i=this.options,l=i.time.displayFormats,s=this._unit,r=this._majorUnit,o=s&&l[s],c=r&&l[r],h=a[t],u=r&&c&&h&&h.major,p=this._adapter.format(e,n||(u?c:o)),m=i.ticks.callback;return m?f(m,[p,t,a],this):p}generateTickLabels(e){let t,a,n;for(t=0,a=e.length;t0?s:1}getDataTimestamps(){let e,t,a=this._cache.data||[];if(a.length)return a;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,t=n.length;e=e[r].pos&&t<=e[o].pos&&({lo:r,hi:o}=pt(e,"pos",t)),({pos:n,time:l}=e[r]),({pos:i,time:s}=e[o])):(t>=e[r].time&&t<=e[o].time&&({lo:r,hi:o}=pt(e,"time",t)),({time:n,pos:l}=e[r]),({time:i,pos:s}=e[o]));const c=i-n;return c?l+(s-l)*(t-n)/c:l}Nl.id="time",Nl.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class Fl extends Nl{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=Il(t,this.min),this._tableRange=Il(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:a}=this,n=[],i=[];let l,s,r,o,c;for(l=0,s=e.length;l=t&&o<=a&&n.push(o);if(n.length<2)return[{time:t,pos:0},{time:a,pos:1}];for(l=0,s=n.length;l{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(7359),i=a(9568),l=a(2254);const s=[];s[0]={w:[0],i:[3,0],"[":[4],o:[7]},s[1]={w:[1],".":[2],"[":[4],o:[7]},s[2]={w:[2],i:[3,0],0:[3,0]},s[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},s[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},s[5]={"'":[4,0],o:8,l:[5,0]},s[6]={'"':[4,0],o:8,l:[6,0]};const r=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function o(e){if(null==e)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function c(e){const t=[];let a,n,i,l,c,h,u,p=-1,m=0,d=0;const A=[];function f(){const t=e[p+1];if(5===m&&"'"===t||6===m&&'"'===t)return p++,i="\\"+t,A[0](),!0}for(A[0]=()=>{void 0===n?n=i:n+=i},A[1]=()=>{void 0!==n&&(t.push(n),n=void 0)},A[2]=()=>{A[0](),d++},A[3]=()=>{if(d>0)d--,m=4,A[0]();else{if(d=0,void 0===n)return!1;if(n=function(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(a=t,r.test(a)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t);var a}(n),!1===n)return!1;A[1]()}};null!==m;)if(p++,a=e[p],"\\"!==a||!f()){if(l=o(a),u=s[m],c=u[l]||u.l||8,8===c)return;if(m=c[0],void 0!==c[1]&&(h=A[c[1]],h&&(i=a,!1===h())))return;if(7===m)return t}}const h=new Map;function u(e,t){return i.isObject(e)?e[t]:null}const p=e=>e,m=e=>"",d="text",A=e=>0===e.length?"":e.join(""),f=i.toDisplayString;function M(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function y(e={}){const t=e.locale,a=function(e){const t=i.isNumber(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(i.isNumber(e.named.count)||i.isNumber(e.named.n))?i.isNumber(e.named.count)?e.named.count:i.isNumber(e.named.n)?e.named.n:t:t}(e),n=i.isObject(e.pluralRules)&&i.isString(t)&&i.isFunction(e.pluralRules[t])?e.pluralRules[t]:M,l=i.isObject(e.pluralRules)&&i.isString(t)&&i.isFunction(e.pluralRules[t])?M:void 0,s=e.list||[],r=e.named||{};function o(t){return(i.isFunction(e.messages)?e.messages(t):!!i.isObject(e.messages)&&e.messages[t])||(e.parent?e.parent.message(t):m)}i.isNumber(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(a,r);const c=i.isPlainObject(e.processor)&&i.isFunction(e.processor.normalize)?e.processor.normalize:A,h=i.isPlainObject(e.processor)&&i.isFunction(e.processor.interpolate)?e.processor.interpolate:f,u={list:e=>s[e],named:e=>r[e],plural:e=>e[n(a,e.length,l)],linked:(t,a)=>{const n=o(t)(u);return i.isString(a)?(l=a,e.modifiers?e.modifiers[l]:p)(n):n;var l},message:o,type:i.isPlainObject(e.processor)&&i.isString(e.processor.type)?e.processor.type:d,interpolate:h,normalize:c};return u}let g=null;const v=H(l.IntlifyDevToolsHooks.FunctionTranslate);function H(e){return t=>g&&g.emit(e,t)}const V={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,__EXTEND_POINT__:7},Z={[V.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[V.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[V.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[V.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[V.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[V.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale."};function C(e,t,a){return[...new Set([a,...i.isArray(t)?t:i.isObject(t)?Object.keys(t):i.isString(t)?[t]:[a]])]}function L(e,t,a){let n=!0;for(let l=0;le;let D=Object.create(null),N=n.CompileErrorCodes.__EXTEND_POINT__;const I=()=>++N,F={INVALID_ARGUMENT:N,INVALID_DATE_ARGUMENT:I(),INVALID_ISO_DATE_ARGUMENT:I(),__EXTEND_POINT__:I()};function B(e){return n.createCompileError(e,null,void 0)}const j=()=>"",U=e=>i.isFunction(e);function q(e,t,a,n,l,s){const{messages:r,onWarn:o,messageResolver:c,localeFallbacker:h}=e,u=h(e,n,a);let p,m={},d=null;for(let a=0;an;return e.locale=a,e.key=t,e}const c=r(n,function(e,t,a,n,l,s){return{warnHtmlMessage:l,onError:e=>{throw s&&s(e),e},onCacheKey:e=>i.generateFormatCacheKey(t,a,e)}}(0,a,l,0,o,s));return c.locale=a,c.key=t,c.source=n,c}function $(...e){const[t,a,n]=e,l={};if(!i.isString(t)&&!i.isNumber(t)&&!U(t))throw B(F.INVALID_ARGUMENT);const s=i.isNumber(t)?String(t):(U(t),t);return i.isNumber(a)?l.plural=a:i.isString(a)?l.default=a:i.isPlainObject(a)&&!i.isEmptyObject(a)?l.named=a:i.isArray(a)&&(l.list=a),i.isNumber(n)?l.plural=n:i.isString(n)?l.default=n:i.isPlainObject(n)&&i.assign(l,n),[s,l]}function G(...e){const[t,a,n,l]=e;let s,r={},o={};if(i.isString(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw B(F.INVALID_ISO_DATE_ARGUMENT);const a=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();s=new Date(a);try{s.toISOString()}catch(e){throw B(F.INVALID_ISO_DATE_ARGUMENT)}}else if(i.isDate(t)){if(isNaN(t.getTime()))throw B(F.INVALID_DATE_ARGUMENT);s=t}else{if(!i.isNumber(t))throw B(F.INVALID_ARGUMENT);s=t}return i.isString(a)?r.key=a:i.isPlainObject(a)&&(r=a),i.isString(n)?r.locale=n:i.isPlainObject(n)&&(o=n),i.isPlainObject(l)&&(o=l),[r.key||"",s,r,o]}function Y(...e){const[t,a,n,l]=e;let s={},r={};if(!i.isNumber(t))throw B(F.INVALID_ARGUMENT);const o=t;return i.isString(a)?s.key=a:i.isPlainObject(a)&&(s=a),i.isString(n)?s.locale=n:i.isPlainObject(n)&&(r=n),i.isPlainObject(l)&&(r=l),[s.key||"",o,s,r]}t.CompileErrorCodes=n.CompileErrorCodes,t.createCompileError=n.createCompileError,t.CoreErrorCodes=F,t.CoreWarnCodes=V,t.DEFAULT_LOCALE=z,t.DEFAULT_MESSAGE_DATA_TYPE=d,t.MISSING_RESOLVE_VALUE="",t.NOT_REOSLVED=-1,t.VERSION=_,t.clearCompileCache=function(){D=Object.create(null)},t.clearDateTimeFormat=function(e,t,a){const n=e;for(const e in a){const a=`${t}__${e}`;n.__datetimeFormatters.has(a)&&n.__datetimeFormatters.delete(a)}},t.clearNumberFormat=function(e,t,a){const n=e;for(const e in a){const a=`${t}__${e}`;n.__numberFormatters.has(a)&&n.__numberFormatters.delete(a)}},t.compileToFunction=function(e,t={}){{const a=(t.onCacheKey||R)(e),i=D[a];if(i)return i;let l=!1;const s=t.onError||n.defaultOnError;t.onError=e=>{l=!0,s(e)};const{code:r}=n.baseCompile(e,t),o=new Function(`return ${r}`)();return l?o:D[a]=o}},t.createCoreContext=function(e={}){const t=i.isString(e.version)?e.version:_,a=i.isString(e.locale)?e.locale:z,n=i.isArray(e.fallbackLocale)||i.isPlainObject(e.fallbackLocale)||i.isString(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:a,l=i.isPlainObject(e.messages)?e.messages:{[a]:{}},s=i.isPlainObject(e.datetimeFormats)?e.datetimeFormats:{[a]:{}},r=i.isPlainObject(e.numberFormats)?e.numberFormats:{[a]:{}},o=i.assign({},e.modifiers||{},{upper:e=>i.isString(e)?e.toUpperCase():e,lower:e=>i.isString(e)?e.toLowerCase():e,capitalize:e=>i.isString(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}),c=e.pluralRules||{},h=i.isFunction(e.missing)?e.missing:null,p=!i.isBoolean(e.missingWarn)&&!i.isRegExp(e.missingWarn)||e.missingWarn,m=!i.isBoolean(e.fallbackWarn)&&!i.isRegExp(e.fallbackWarn)||e.fallbackWarn,d=!!e.fallbackFormat,A=!!e.unresolving,f=i.isFunction(e.postTranslation)?e.postTranslation:null,M=i.isPlainObject(e.processor)?e.processor:null,y=!i.isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,g=!!e.escapeParameter,v=i.isFunction(e.messageCompiler)?e.messageCompiler:x,H=i.isFunction(e.messageResolver)?e.messageResolver:k||u,V=i.isFunction(e.localeFallbacker)?e.localeFallbacker:w||C,Z=i.isObject(e.fallbackContext)?e.fallbackContext:void 0,L=i.isFunction(e.onWarn)?e.onWarn:i.warn,b=e,S=i.isObject(b.__datetimeFormatters)?b.__datetimeFormatters:new Map,E=i.isObject(b.__numberFormatters)?b.__numberFormatters:new Map,T=i.isObject(b.__meta)?b.__meta:{};O++;const P={version:t,cid:O,locale:a,fallbackLocale:n,messages:l,modifiers:o,pluralRules:c,missing:h,missingWarn:p,fallbackWarn:m,fallbackFormat:d,unresolving:A,postTranslation:f,processor:M,warnHtmlMessage:y,escapeParameter:g,messageCompiler:v,messageResolver:H,localeFallbacker:V,fallbackContext:Z,onWarn:L,__meta:T};return P.datetimeFormats=s,P.numberFormats=r,P.__datetimeFormatters=S,P.__numberFormatters=E,P},t.createCoreError=B,t.createMessageContext=y,t.datetime=function(e,...t){const{datetimeFormats:a,unresolving:n,fallbackLocale:l,onWarn:s,localeFallbacker:r}=e,{__datetimeFormatters:o}=e,[c,h,u,p]=G(...t);i.isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn,i.isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const m=!!u.part,d=i.isString(u.locale)?u.locale:e.locale,A=r(e,l,d);if(!i.isString(c)||""===c)return new Intl.DateTimeFormat(d).format(h);let f,M={},y=null;for(let t=0;tE,t.getDevToolsHook=function(){return g},t.getFallbackContext=()=>T,t.getWarnMessage=function(e,...t){return i.format(Z[e],...t)},t.handleMissing=P,t.initI18nDevTools=function(e,t,a){g&&g.emit(l.IntlifyDevToolsHooks.I18nInit,{timestamp:Date.now(),i18n:e,version:t,meta:a})},t.isMessageFunction=U,t.isTranslateFallbackWarn=function(e,t){return e instanceof RegExp?e.test(t):e},t.isTranslateMissingWarn=function(e,t){return e instanceof RegExp?e.test(t):e},t.number=function(e,...t){const{numberFormats:a,unresolving:n,fallbackLocale:l,onWarn:s,localeFallbacker:r}=e,{__numberFormatters:o}=e,[c,h,u,p]=Y(...t);i.isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn,i.isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const m=!!u.part,d=i.isString(u.locale)?u.locale:e.locale,A=r(e,l,d);if(!i.isString(c)||""===c)return new Intl.NumberFormat(d).format(h);let f,M={},y=null;for(let t=0;t{E=e},t.setDevToolsHook=function(e){g=e},t.setFallbackContext=e=>{T=e},t.translate=function(e,...t){const{fallbackFormat:a,postTranslation:n,unresolving:l,messageCompiler:s,fallbackLocale:r,messages:o}=e,[c,h]=$(...t),u=(i.isBoolean(h.missingWarn)?h.missingWarn:e.missingWarn,i.isBoolean(h.fallbackWarn)?h.fallbackWarn:e.fallbackWarn,i.isBoolean(h.escapeParameter)?h.escapeParameter:e.escapeParameter),p=!!h.resolvedMessage,m=i.isString(h.default)||i.isBoolean(h.default)?i.isBoolean(h.default)?s?c:()=>c:h.default:a?s?c:()=>c:"",d=a||""!==m,A=i.isString(h.locale)?h.locale:e.locale;u&&function(e){i.isArray(e.list)?e.list=e.list.map((e=>i.isString(e)?i.escapeHtml(e):e)):i.isObject(e.named)&&Object.keys(e.named).forEach((t=>{i.isString(e.named[t])&&(e.named[t]=i.escapeHtml(e.named[t]))}))}(h);let[f,M,g]=p?[c,A,o[A]||{}]:q(e,c,A,r),v=f,H=c;if(p||i.isString(v)||U(v)||d&&(v=m,H=v),!(p||(i.isString(v)||U(v))&&i.isString(M)))return l?-1:c;let V=!1;const Z=U(v)?v:W(e,c,M,v,H,(()=>{V=!0}));if(V)return v;const C=function(e,t,a,n){const{modifiers:l,pluralRules:s,messageResolver:r,fallbackLocale:o,fallbackWarn:c,missingWarn:h,fallbackContext:u}=e,p={locale:t,modifiers:l,pluralRules:s,messages:n=>{let l=r(a,n);if(null==l&&u){const[,,e]=q(u,n,t,o);l=r(e,n)}if(i.isString(l)){let a=!1;const i=W(e,n,t,l,n,(()=>{a=!0}));return a?j:i}return U(l)?l:j}};return e.processor&&(p.processor=e.processor),n.list&&(p.list=n.list),n.named&&(p.named=n.named),i.isNumber(n.plural)&&(p.pluralIndex=n.plural),p}(e,M,g,h),L=function(e,t,a){return t(a)}(0,Z,y(C));return n?n(L):L},t.translateDevTools=v,t.updateFallbackLocale=function(e,t,a){e.__localeChainCache=new Map,e.localeFallbacker(e,a,t)}},55:(e,t,a)=>{"use strict";e.exports=a(2952)},7043:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IntlifyDevToolsHooks={I18nInit:"i18n:init",FunctionTranslate:"function:translate"}},2254:(e,t,a)=>{"use strict";e.exports=a(7043)},5463:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(9568),i=a(5517);const l={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,__EXTEND_POINT__:15},s={[l.EXPECTED_TOKEN]:"Expected token: '{0}'",[l.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[l.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[l.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[l.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[l.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[l.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[l.EMPTY_PLACEHOLDER]:"Empty placeholder",[l.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[l.INVALID_LINKED_FORMAT]:"Invalid linked format",[l.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[l.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[l.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[l.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'"};function r(e,t,a={}){const{domain:n,messages:i,args:l}=a,s=new SyntaxError(String(e));return s.code=e,t&&(s.location=t),s.domain=n,s}const o={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}};function c(e,t,a){return{line:e,column:t,offset:a}}function h(e,t,a){const n={start:e,end:t};return null!=a&&(n.source=a),n}const u=" ",p="\n",m=String.fromCharCode(8232),d=String.fromCharCode(8233);function A(e){const t=e;let a=0,n=1,i=1,l=0;const s=e=>"\r"===t[e]&&t[e+1]===p,r=e=>t[e]===d,o=e=>t[e]===m,c=e=>s(e)||r(e)||o(e)?p:t[e];function h(){return l=0,(s(e=a)||(e=>t[e]===p)(e)||r(e)||o(e))&&(n++,i=0),s(a)&&a++,a++,i++,t[a];var e}return{index:()=>a,line:()=>n,column:()=>i,peekOffset:()=>l,charAt:c,currentChar:()=>c(a),currentPeek:()=>c(a+l),next:h,peek:function(){return s(a+l)&&l++,l++,t[a+l]},reset:function(){a=0,n=1,i=1,l=0},resetPeek:function(e=0){l=e},skipToPeek:function(){const e=a+l;for(;e!==a;)h();l=0}}}const f=void 0;function M(e,t={}){const a=!1!==t.location,n=A(e),i=()=>n.index(),s=()=>c(n.line(),n.column(),n.index()),o=s(),m=i(),d={currentType:14,offset:m,startLoc:o,endLoc:o,lastType:14,lastOffset:m,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:""},M=()=>d,{onError:y}=t;function g(e,t,a,...n){const i=M();if(t.column+=a,t.offset+=a,y){const a=r(e,h(i.startLoc,t),{domain:"tokenizer",args:n});y(a)}}function v(e,t,n){e.endLoc=s(),e.currentType=t;const i={type:t};return a&&(i.loc=h(e.startLoc,e.endLoc)),null!=n&&(i.value=n),i}const H=e=>v(e,14);function V(e,t){return e.currentChar()===t?(e.next(),t):(g(l.EXPECTED_TOKEN,s(),0,t),"")}function Z(e){let t="";for(;e.currentPeek()===u||e.currentPeek()===p;)t+=e.currentPeek(),e.peek();return t}function C(e){const t=Z(e);return e.skipToPeek(),t}function L(e){if(e===f)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function b(e){Z(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function S(e,t=!0){const a=(t=!1,n="",i=!1)=>{const l=e.currentPeek();return"{"===l?"%"!==n&&t:"@"!==l&&l?"%"===l?(e.peek(),a(t,"%",!0)):"|"===l?!("%"!==n&&!i&&(n===u||n===p)):l===u?(e.peek(),a(!0,u,i)):l!==p||(e.peek(),a(!0,p,i)):"%"===n||t},n=a();return t&&e.resetPeek(),n}function _(e,t){const a=e.currentChar();return a===f?f:t(a)?(e.next(),a):null}function z(e){return _(e,(e=>{const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||95===t||36===t}))}function x(e){return _(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function k(e){return _(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}))}function w(e){let t="",a="";for(;t=x(e);)a+=t;return a}function E(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return T(e,t,4);case"U":return T(e,t,6);default:return g(l.UNKNOWN_ESCAPE_SEQUENCE,s(),0,t),""}}function T(e,t,a){V(e,t);let n="";for(let i=0;i=1&&g(l.NOT_ALLOW_NEST_PLACEHOLDER,s(),0),e.next(),a=v(t,2,"{"),C(e),t.braceNest++,a;case"}":return t.braceNest>0&&2===t.currentType&&g(l.EMPTY_PLACEHOLDER,s(),0),e.next(),a=v(t,3,"}"),t.braceNest--,t.braceNest>0&&C(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),a;case"@":return t.braceNest>0&&g(l.UNTERMINATED_CLOSING_BRACE,s(),0),a=R(e,t)||H(t),t.braceNest=0,a;default:let n=!0,i=!0,r=!0;if(b(e))return t.braceNest>0&&g(l.UNTERMINATED_CLOSING_BRACE,s(),0),a=v(t,1,O(e)),t.braceNest=0,t.inLinked=!1,a;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return g(l.UNTERMINATED_CLOSING_BRACE,s(),0),t.braceNest=0,D(e,t);if(n=function(e,t){const{currentType:a}=t;if(2!==a)return!1;Z(e);const n=L(e.currentPeek());return e.resetPeek(),n}(e,t))return a=v(t,5,function(e){C(e);let t="",a="";for(;t=z(e);)a+=t;return e.currentChar()===f&&g(l.UNTERMINATED_CLOSING_BRACE,s(),0),a}(e)),C(e),a;if(i=function(e,t){const{currentType:a}=t;if(2!==a)return!1;Z(e);const n=function(e){if(e===f)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),n}(e,t))return a=v(t,6,function(e){C(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${w(e)}`):t+=w(e),e.currentChar()===f&&g(l.UNTERMINATED_CLOSING_BRACE,s(),0),t}(e)),C(e),a;if(r=function(e,t){const{currentType:a}=t;if(2!==a)return!1;Z(e);const n="'"===e.currentPeek();return e.resetPeek(),n}(e,t))return a=v(t,7,function(e){C(e),V(e,"'");let t="",a="";const n=e=>"'"!==e&&e!==p;for(;t=_(e,n);)a+="\\"===t?E(e):t;const i=e.currentChar();return i===p||i===f?(g(l.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),0),i===p&&(e.next(),V(e,"'")),a):(V(e,"'"),a)}(e)),C(e),a;if(!n&&!i&&!r)return a=v(t,13,function(e){C(e);let t="",a="";const n=e=>"{"!==e&&"}"!==e&&e!==u&&e!==p;for(;t=_(e,n);)a+=t;return a}(e)),g(l.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,a.value),C(e),a}return a}function R(e,t){const{currentType:a}=t;let n=null;const i=e.currentChar();switch(8!==a&&9!==a&&12!==a&&10!==a||i!==p&&i!==u||g(l.INVALID_LINKED_FORMAT,s(),0),i){case"@":return e.next(),n=v(t,8,"@"),t.inLinked=!0,n;case".":return C(e),e.next(),v(t,9,".");case":":return C(e),e.next(),v(t,10,":");default:return b(e)?(n=v(t,1,O(e)),t.braceNest=0,t.inLinked=!1,n):function(e,t){const{currentType:a}=t;if(8!==a)return!1;Z(e);const n="."===e.currentPeek();return e.resetPeek(),n}(e,t)||function(e,t){const{currentType:a}=t;if(8!==a&&12!==a)return!1;Z(e);const n=":"===e.currentPeek();return e.resetPeek(),n}(e,t)?(C(e),R(e,t)):function(e,t){const{currentType:a}=t;if(9!==a)return!1;Z(e);const n=L(e.currentPeek());return e.resetPeek(),n}(e,t)?(C(e),v(t,12,function(e){let t="",a="";for(;t=z(e);)a+=t;return a}(e))):function(e,t){const{currentType:a}=t;if(10!==a)return!1;const n=()=>{const t=e.currentPeek();return"{"===t?L(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===u||!t)&&(t===p?(e.peek(),n()):L(t))},i=n();return e.resetPeek(),i}(e,t)?(C(e),"{"===i?P(e,t)||n:v(t,11,function(e){const t=(a=!1,n)=>{const i=e.currentChar();return"{"!==i&&"%"!==i&&"@"!==i&&"|"!==i&&i?i===u?n:i===p?(n+=i,e.next(),t(a,n)):(n+=i,e.next(),t(!0,n)):n};return t(!1,"")}(e))):(8===a&&g(l.INVALID_LINKED_FORMAT,s(),0),t.braceNest=0,t.inLinked=!1,D(e,t))}}function D(e,t){let a={type:14};if(t.braceNest>0)return P(e,t)||H(t);if(t.inLinked)return R(e,t)||H(t);const n=e.currentChar();switch(n){case"{":return P(e,t)||H(t);case"}":return g(l.UNBALANCED_CLOSING_BRACE,s(),0),e.next(),v(t,3,"}");case"@":return R(e,t)||H(t);default:if(b(e))return a=v(t,1,O(e)),t.braceNest=0,t.inLinked=!1,a;if(S(e))return v(t,0,function(e){let t="";for(;;){const a=e.currentChar();if("{"===a||"}"===a||"@"===a||"|"===a||!a)break;if("%"===a){if(!S(e))break;t+=a,e.next()}else if(a===u||a===p)if(S(e))t+=a,e.next();else{if(b(e))break;t+=a,e.next()}else t+=a,e.next()}return t}(e));if("%"===n)return e.next(),v(t,4,"%")}return a}return{nextToken:function(){const{currentType:e,offset:t,startLoc:a,endLoc:l}=d;return d.lastType=e,d.lastOffset=t,d.lastStartLoc=a,d.lastEndLoc=l,d.offset=i(),d.startLoc=s(),n.currentChar()===f?v(d,14):D(n,d)},currentOffset:i,currentPosition:s,context:M}}const y="parser",g=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function v(e,t,a){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(t||a,16);return e<=55295||e>=57344?String.fromCodePoint(e):"�"}}}function H(e={}){const t=!1!==e.location,{onError:a}=e;function i(e,t,n,i,...l){const s=e.currentPosition();if(s.offset+=i,s.column+=i,a){const e=r(t,h(n,s),{domain:y,args:l});a(e)}}function s(e,a,n){const i={type:e,start:a,end:a};return t&&(i.loc={start:n,end:n}),i}function o(e,a,n,i){e.end=a,i&&(e.type=i),t&&e.loc&&(e.loc.end=n)}function c(e,t){const a=e.context(),n=s(3,a.offset,a.startLoc);return n.value=t,o(n,e.currentOffset(),e.currentPosition()),n}function u(e,t){const a=e.context(),{lastOffset:n,lastStartLoc:i}=a,l=s(5,n,i);return l.index=parseInt(t,10),e.nextToken(),o(l,e.currentOffset(),e.currentPosition()),l}function p(e,t){const a=e.context(),{lastOffset:n,lastStartLoc:i}=a,l=s(4,n,i);return l.key=t,e.nextToken(),o(l,e.currentOffset(),e.currentPosition()),l}function m(e,t){const a=e.context(),{lastOffset:n,lastStartLoc:i}=a,l=s(9,n,i);return l.value=t.replace(g,v),e.nextToken(),o(l,e.currentOffset(),e.currentPosition()),l}function d(e){const t=e.context(),a=s(6,t.offset,t.startLoc);let n=e.nextToken();if(9===n.type){const t=function(e){const t=e.nextToken(),a=e.context(),{lastOffset:n,lastStartLoc:r}=a,c=s(8,n,r);return 12!==t.type?(i(e,l.UNEXPECTED_EMPTY_LINKED_MODIFIER,a.lastStartLoc,0),c.value="",o(c,n,r),{nextConsumeToken:t,node:c}):(null==t.value&&i(e,l.UNEXPECTED_LEXICAL_ANALYSIS,a.lastStartLoc,0,V(t)),c.value=t.value||"",o(c,e.currentOffset(),e.currentPosition()),{node:c})}(e);a.modifier=t.node,n=t.nextConsumeToken||e.nextToken()}switch(10!==n.type&&i(e,l.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,V(n)),n=e.nextToken(),2===n.type&&(n=e.nextToken()),n.type){case 11:null==n.value&&i(e,l.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,V(n)),a.key=function(e,t){const a=e.context(),n=s(7,a.offset,a.startLoc);return n.value=t,o(n,e.currentOffset(),e.currentPosition()),n}(e,n.value||"");break;case 5:null==n.value&&i(e,l.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,V(n)),a.key=p(e,n.value||"");break;case 6:null==n.value&&i(e,l.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,V(n)),a.key=u(e,n.value||"");break;case 7:null==n.value&&i(e,l.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,V(n)),a.key=m(e,n.value||"");break;default:i(e,l.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc,0);const r=e.context(),c=s(7,r.offset,r.startLoc);return c.value="",o(c,r.offset,r.startLoc),a.key=c,o(a,r.offset,r.startLoc),{nextConsumeToken:n,node:a}}return o(a,e.currentOffset(),e.currentPosition()),{node:a}}function A(e){const t=e.context(),a=s(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);a.items=[];let n=null;do{const s=n||e.nextToken();switch(n=null,s.type){case 0:null==s.value&&i(e,l.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,V(s)),a.items.push(c(e,s.value||""));break;case 6:null==s.value&&i(e,l.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,V(s)),a.items.push(u(e,s.value||""));break;case 5:null==s.value&&i(e,l.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,V(s)),a.items.push(p(e,s.value||""));break;case 7:null==s.value&&i(e,l.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,V(s)),a.items.push(m(e,s.value||""));break;case 8:const r=d(e);a.items.push(r.node),n=r.nextConsumeToken||null}}while(14!==t.currentType&&1!==t.currentType);return o(a,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),a}return{parse:function(a){const r=M(a,n.assign({},e)),c=r.context(),h=s(0,c.offset,c.startLoc);return t&&h.loc&&(h.loc.source=a),h.body=function(e){const t=e.context(),{offset:a,startLoc:n}=t,r=A(e);return 14===t.currentType?r:function(e,t,a,n){const r=e.context();let c=0===n.items.length;const h=s(1,t,a);h.cases=[],h.cases.push(n);do{const t=A(e);c||(c=0===t.items.length),h.cases.push(t)}while(14!==r.currentType);return c&&i(e,l.MUST_HAVE_MESSAGES_IN_PLURAL,a,0),o(h,e.currentOffset(),e.currentPosition()),h}(e,a,n,r)}(r),14!==c.currentType&&i(r,l.UNEXPECTED_LEXICAL_ANALYSIS,c.lastStartLoc,0,a[c.offset]||""),o(h,r.currentOffset(),r.currentPosition()),h}}}function V(e){if(14===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function Z(e,t){for(let a=0;ar,push:c,indent:function(e=!0){const t=++r.indentLevel;e&&h(t)},deindent:function(e=!0){const t=--r.indentLevel;e&&h(t)},newline:function(){h(r.indentLevel)},helper:e=>`_${e}`,needIndent:()=>r.needIndent}}function b(e,t){const{helper:a}=e;switch(t.type){case 0:!function(e,t){t.body?b(e,t.body):e.push("null")}(e,t);break;case 1:!function(e,t){const{helper:a,needIndent:n}=e;if(t.cases.length>1){e.push(`${a("plural")}([`),e.indent(n());const i=t.cases.length;for(let a=0;aa,helper:e=>(a.helpers.add(e),e)}}(e);a.helper("normalize"),e.body&&C(e.body,a);const n=a.context();e.helpers=Array.from(n.helpers)}(i,a),((e,t={})=>{const a=n.isString(t.mode)?t.mode:"normal",i=n.isString(t.filename)?t.filename:"message.intl",l=!!t.sourceMap,s=null!=t.breakLineCode?t.breakLineCode:"arrow"===a?";":"\n",r=t.needIndent?t.needIndent:"arrow"!==a,o=e.helpers||[],c=L(e,{mode:a,filename:i,sourceMap:l,breakLineCode:s,needIndent:r});c.push("normal"===a?"function __msg__ (ctx) {":"(ctx) => {"),c.indent(r),o.length>0&&(c.push(`const { ${o.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),c.newline()),c.push("return "),b(c,e),c.deindent(r),c.push("}");const{code:h,map:u}=c.context();return{ast:e,code:h,map:u?u.toJSON():void 0}})(i,a)},t.createCompileError=r,t.createLocation=h,t.createParser=H,t.createPosition=c,t.defaultOnError=function(e){throw e},t.errorMessages=s},7359:(e,t,a)=>{"use strict";e.exports=a(5463)},328:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n="undefined"!=typeof window,i=/\{([0-9a-zA-Z]+)\}/g,l="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,s=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),r=Object.assign;let o;const c=Object.prototype.hasOwnProperty,h=Array.isArray,u=e=>"function"==typeof e,p=e=>null!==e&&"object"==typeof e,m=Object.prototype.toString,d=e=>m.call(e),A=e=>"[object Object]"===d(e);t.assign=r,t.createEmitter=function(){const e=new Map;return{events:e,on(t,a){const n=e.get(t);n&&n.push(a)||e.set(t,[a])},off(t,a){const n=e.get(t);n&&n.splice(n.indexOf(a)>>>0,1)},emit(t,a){(e.get(t)||[]).slice().map((e=>e(a))),(e.get("*")||[]).slice().map((e=>e(t,a)))}}},t.escapeHtml=function(e){return e.replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},t.format=function(e,...t){return 1===t.length&&p(t[0])&&(t=t[0]),t&&t.hasOwnProperty||(t={}),e.replace(i,((e,a)=>t.hasOwnProperty(a)?t[a]:""))},t.friendlyJSONstringify=s,t.generateCodeFrame=function(e,t=0,a=e.length){const n=e.split(/\r?\n/);let i=0;const l=[];for(let e=0;e=t){for(let s=e-2;s<=e+2||a>i;s++){if(s<0||s>=n.length)continue;const r=s+1;l.push(`${r}${" ".repeat(3-String(r).length)}| ${n[s]}`);const o=n[s].length;if(s===e){const e=t-(i-o)+1,n=Math.max(1,a>i?o-e:a-t);l.push(" | "+" ".repeat(e)+"^".repeat(n))}else if(s>e){if(a>i){const e=Math.max(Math.min(a-i,o),1);l.push(" | "+"^".repeat(e))}i+=o+1}}break}return l.join("\n")},t.generateFormatCacheKey=(e,t,a)=>s({l:e,k:t,s:a}),t.getGlobalThis=()=>o||(o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==a.g?a.g:{}),t.hasOwn=function(e,t){return c.call(e,t)},t.inBrowser=n,t.isArray=h,t.isBoolean=e=>"boolean"==typeof e,t.isDate=e=>"[object Date]"===d(e),t.isEmptyObject=e=>A(e)&&0===Object.keys(e).length,t.isFunction=u,t.isNumber=e=>"number"==typeof e&&isFinite(e),t.isObject=p,t.isPlainObject=A,t.isPromise=e=>p(e)&&u(e.then)&&u(e.catch),t.isRegExp=e=>"[object RegExp]"===d(e),t.isString=e=>"string"==typeof e,t.isSymbol=e=>"symbol"==typeof e,t.makeSymbol=e=>l?Symbol(e):e,t.mark=void 0,t.measure=void 0,t.objectToString=m,t.toDisplayString=e=>null==e?"":h(e)||A(e)&&e.toString===m?JSON.stringify(e,null,2):String(e),t.toTypeString=d,t.warn=function(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}},9568:(e,t,a)=>{"use strict";e.exports=a(328)},7470:(e,t,a)=>{"use strict";a.r(t),a.d(t,{BASE_TRANSITION:()=>u,CAMELIZE:()=>O,CAPITALIZE:()=>P,CREATE_BLOCK:()=>m,CREATE_COMMENT:()=>M,CREATE_ELEMENT_BLOCK:()=>d,CREATE_ELEMENT_VNODE:()=>f,CREATE_SLOTS:()=>S,CREATE_STATIC:()=>g,CREATE_TEXT:()=>y,CREATE_VNODE:()=>A,DOMDirectiveTransforms:()=>Cn,DOMNodeTransforms:()=>Zn,FRAGMENT:()=>r,GUARD_REACTIVE_PROPS:()=>E,IS_MEMO_SAME:()=>q,IS_REF:()=>j,KEEP_ALIVE:()=>h,MERGE_PROPS:()=>z,NORMALIZE_CLASS:()=>x,NORMALIZE_PROPS:()=>w,NORMALIZE_STYLE:()=>k,OPEN_BLOCK:()=>p,POP_SCOPE_ID:()=>I,PUSH_SCOPE_ID:()=>N,RENDER_LIST:()=>L,RENDER_SLOT:()=>b,RESOLVE_COMPONENT:()=>v,RESOLVE_DIRECTIVE:()=>V,RESOLVE_DYNAMIC_COMPONENT:()=>H,RESOLVE_FILTER:()=>Z,SET_BLOCK_TRACKING:()=>D,SUSPENSE:()=>c,TELEPORT:()=>o,TO_DISPLAY_STRING:()=>_,TO_HANDLERS:()=>T,TO_HANDLER_KEY:()=>R,TRANSITION:()=>cn,TRANSITION_GROUP:()=>hn,UNREF:()=>B,V_MODEL_CHECKBOX:()=>tn,V_MODEL_DYNAMIC:()=>ln,V_MODEL_RADIO:()=>en,V_MODEL_SELECT:()=>nn,V_MODEL_TEXT:()=>an,V_ON_WITH_KEYS:()=>rn,V_ON_WITH_MODIFIERS:()=>sn,V_SHOW:()=>on,WITH_CTX:()=>F,WITH_DIRECTIVES:()=>C,WITH_MEMO:()=>U,advancePositionWithClone:()=>Le,advancePositionWithMutation:()=>be,assert:()=>Se,baseCompile:()=>Ja,baseParse:()=>Qe,buildDirectiveArgs:()=>za,buildProps:()=>ba,buildSlots:()=>ga,checkCompatEnabled:()=>Ge,compile:()=>Ln,createArrayExpression:()=>X,createAssignmentExpression:()=>he,createBlockStatement:()=>re,createCacheExpression:()=>se,createCallExpression:()=>ne,createCompilerError:()=>s,createCompoundExpression:()=>ae,createConditionalExpression:()=>le,createDOMCompilerError:()=>fn,createForLoopParams:()=>da,createFunctionExpression:()=>ie,createIfStatement:()=>ce,createInterpolation:()=>te,createObjectExpression:()=>J,createObjectProperty:()=>Q,createReturnStatement:()=>pe,createRoot:()=>Y,createSequenceExpression:()=>ue,createSimpleExpression:()=>ee,createStructuralDirectiveTransform:()=>Ot,createTemplateLiteral:()=>oe,createTransformContext:()=>wt,createVNodeCall:()=>K,extractIdentifiers:()=>Kt,findDir:()=>_e,findProp:()=>ze,generate:()=>Rt,generateCodeFrame:()=>n.generateCodeFrame,getBaseTransformPreset:()=>Xa,getInnerRange:()=>Ce,getMemoedVNodeCall:()=>je,getVNodeBlockHelper:()=>Re,getVNodeHelper:()=>Pe,hasDynamicKeyVBind:()=>ke,hasScopeRef:()=>Be,helperNameMap:()=>W,injectProp:()=>Ie,isBuiltInType:()=>de,isCoreComponent:()=>Ae,isFunctionType:()=>Xt,isInDestructureAssignment:()=>$t,isMemberExpression:()=>Ze,isMemberExpressionBrowser:()=>He,isMemberExpressionNode:()=>Ve,isReferencedIdentifier:()=>Wt,isSimpleIdentifier:()=>Me,isSlotOutlet:()=>Oe,isStaticArgOf:()=>xe,isStaticExp:()=>me,isStaticProperty:()=>Jt,isStaticPropertyKey:()=>Qt,isTemplateNode:()=>Te,isText:()=>we,isVSlot:()=>Ee,locStub:()=>G,makeBlock:()=>Ue,noopDirectiveTransform:()=>Qa,parse:()=>bn,parserOptions:()=>mn,processExpression:()=>ta,processFor:()=>oa,processIf:()=>na,processSlotOutlet:()=>Ta,registerRuntimeHelpers:()=>$,resolveComponentType:()=>La,toValidAssetId:()=>Fe,trackSlotScopes:()=>fa,trackVForSlotScopes:()=>Ma,transform:()=>Et,transformBind:()=>Ra,transformElement:()=>Ca,transformExpression:()=>ea,transformModel:()=>Ba,transformOn:()=>Pa,transformStyle:()=>dn,traverseNode:()=>Tt,walkBlockDeclarations:()=>Yt,walkFunctionParams:()=>Gt,walkIdentifiers:()=>qt,warnDeprecation:()=>Ye});var n=a(8319);function i(e){throw e}function l(e){}function s(e,t,a,n){const i=new SyntaxError(String(e));return i.code=e,i.loc=t,i}const r=Symbol(""),o=Symbol(""),c=Symbol(""),h=Symbol(""),u=Symbol(""),p=Symbol(""),m=Symbol(""),d=Symbol(""),A=Symbol(""),f=Symbol(""),M=Symbol(""),y=Symbol(""),g=Symbol(""),v=Symbol(""),H=Symbol(""),V=Symbol(""),Z=Symbol(""),C=Symbol(""),L=Symbol(""),b=Symbol(""),S=Symbol(""),_=Symbol(""),z=Symbol(""),x=Symbol(""),k=Symbol(""),w=Symbol(""),E=Symbol(""),T=Symbol(""),O=Symbol(""),P=Symbol(""),R=Symbol(""),D=Symbol(""),N=Symbol(""),I=Symbol(""),F=Symbol(""),B=Symbol(""),j=Symbol(""),U=Symbol(""),q=Symbol(""),W={[r]:"Fragment",[o]:"Teleport",[c]:"Suspense",[h]:"KeepAlive",[u]:"BaseTransition",[p]:"openBlock",[m]:"createBlock",[d]:"createElementBlock",[A]:"createVNode",[f]:"createElementVNode",[M]:"createCommentVNode",[y]:"createTextVNode",[g]:"createStaticVNode",[v]:"resolveComponent",[H]:"resolveDynamicComponent",[V]:"resolveDirective",[Z]:"resolveFilter",[C]:"withDirectives",[L]:"renderList",[b]:"renderSlot",[S]:"createSlots",[_]:"toDisplayString",[z]:"mergeProps",[x]:"normalizeClass",[k]:"normalizeStyle",[w]:"normalizeProps",[E]:"guardReactiveProps",[T]:"toHandlers",[O]:"camelize",[P]:"capitalize",[R]:"toHandlerKey",[D]:"setBlockTracking",[N]:"pushScopeId",[I]:"popScopeId",[F]:"withCtx",[B]:"unref",[j]:"isRef",[U]:"withMemo",[q]:"isMemoSame"};function $(e){Object.getOwnPropertySymbols(e).forEach((t=>{W[t]=e[t]}))}const G={source:"",start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}};function Y(e,t=G){return{type:0,children:e,helpers:[],components:[],directives:[],hoists:[],imports:[],cached:0,temps:0,codegenNode:void 0,loc:t}}function K(e,t,a,n,i,l,s,r=!1,o=!1,c=!1,h=G){return e&&(r?(e.helper(p),e.helper(Re(e.inSSR,c))):e.helper(Pe(e.inSSR,c)),s&&e.helper(C)),{type:13,tag:t,props:a,children:n,patchFlag:i,dynamicProps:l,directives:s,isBlock:r,disableTracking:o,isComponent:c,loc:h}}function X(e,t=G){return{type:17,loc:t,elements:e}}function J(e,t=G){return{type:15,loc:t,properties:e}}function Q(e,t){return{type:16,loc:G,key:(0,n.isString)(e)?ee(e,!0):e,value:t}}function ee(e,t=!1,a=G,n=0){return{type:4,loc:a,content:e,isStatic:t,constType:t?3:n}}function te(e,t){return{type:5,loc:t,content:(0,n.isString)(e)?ee(e,!1,t):e}}function ae(e,t=G){return{type:8,loc:t,children:e}}function ne(e,t=[],a=G){return{type:14,loc:a,callee:e,arguments:t}}function ie(e,t,a=!1,n=!1,i=G){return{type:18,params:e,returns:t,newline:a,isSlot:n,loc:i}}function le(e,t,a,n=!0){return{type:19,test:e,consequent:t,alternate:a,newline:n,loc:G}}function se(e,t,a=!1){return{type:20,index:e,value:t,isVNode:a,loc:G}}function re(e){return{type:21,body:e,loc:G}}function oe(e){return{type:22,elements:e,loc:G}}function ce(e,t,a){return{type:23,test:e,consequent:t,alternate:a,loc:G}}function he(e,t){return{type:24,left:e,right:t,loc:G}}function ue(e){return{type:25,expressions:e,loc:G}}function pe(e){return{type:26,returns:e,loc:G}}const me=e=>4===e.type&&e.isStatic,de=(e,t)=>e===t||e===(0,n.hyphenate)(t);function Ae(e){return de(e,"Teleport")?o:de(e,"Suspense")?c:de(e,"KeepAlive")?h:de(e,"BaseTransition")?u:void 0}const fe=/^\d|[^\$\w]/,Me=e=>!fe.test(e),ye=/[A-Za-z_$\xA0-\uFFFF]/,ge=/[\.\?\w$\xA0-\uFFFF]/,ve=/\s+[.[]\s*|\s*[.[]\s+/g,He=e=>{e=e.trim().replace(ve,(e=>e.trim()));let t=0,a=[],n=0,i=0,l=null;for(let s=0;s!(7!==e.type||"bind"!==e.name||e.arg&&4===e.arg.type&&e.arg.isStatic)))}function we(e){return 5===e.type||2===e.type}function Ee(e){return 7===e.type&&"slot"===e.name}function Te(e){return 1===e.type&&3===e.tagType}function Oe(e){return 1===e.type&&2===e.tagType}function Pe(e,t){return e||t?A:f}function Re(e,t){return e||t?m:d}const De=new Set([w,E]);function Ne(e,t=[]){if(e&&!(0,n.isString)(e)&&14===e.type){const a=e.callee;if(!(0,n.isString)(a)&&De.has(a))return Ne(e.arguments[0],t.concat(e))}return[e,t]}function Ie(e,t,a){let i,l,s=13===e.type?e.props:e.arguments[2],r=[];if(s&&!(0,n.isString)(s)&&14===s.type){const e=Ne(s);s=e[0],r=e[1],l=r[r.length-1]}if(null==s||(0,n.isString)(s))i=J([t]);else if(14===s.type){const e=s.arguments[0];(0,n.isString)(e)||15!==e.type?s.callee===T?i=ne(a.helper(z),[J([t]),s]):s.arguments.unshift(J([t])):e.properties.unshift(t),!i&&(i=s)}else if(15===s.type){let e=!1;if(4===t.key.type){const a=t.key.content;e=s.properties.some((e=>4===e.key.type&&e.key.content===a))}e||s.properties.unshift(t),i=s}else i=ne(a.helper(z),[J([t]),s]),l&&l.callee===E&&(l=r[r.length-2]);13===e.type?l?l.arguments[0]=i:e.props=i:l?l.arguments[0]=i:e.arguments[2]=i}function Fe(e,t){return`_${t}_${e.replace(/[^\w]/g,((t,a)=>"-"===t?"_":e.charCodeAt(a).toString()))}`}function Be(e,t){if(!e||0===Object.keys(t).length)return!1;switch(e.type){case 1:for(let a=0;aBe(e,t)));case 11:return!!Be(e.source,t)||e.children.some((e=>Be(e,t)));case 9:return e.branches.some((e=>Be(e,t)));case 10:return!!Be(e.condition,t)||e.children.some((e=>Be(e,t)));case 4:return!e.isStatic&&Me(e.content)&&!!t[e.content];case 8:return e.children.some((e=>(0,n.isObject)(e)&&Be(e,t)));case 5:case 12:return Be(e.content,t);default:return!1}}function je(e){return 14===e.type&&e.callee===U?e.arguments[1].returns:e}function Ue(e,{helper:t,removeHelper:a,inSSR:n}){e.isBlock||(e.isBlock=!0,a(Pe(n,e.isComponent)),t(p),t(Re(n,e.isComponent)))}const qe={COMPILER_IS_ON_ELEMENT:{message:'Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".',link:"https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html"},COMPILER_V_BIND_SYNC:{message:e=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${e}.sync\` should be changed to \`v-model:${e}\`.`,link:"https://v3-migration.vuejs.org/breaking-changes/v-model.html"},COMPILER_V_BIND_PROP:{message:".prop modifier for v-bind has been removed and no longer necessary. Vue 3 will automatically set a binding as DOM property when appropriate."},COMPILER_V_BIND_OBJECT_ORDER:{message:'v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.',link:"https://v3-migration.vuejs.org/breaking-changes/v-bind.html"},COMPILER_V_ON_NATIVE:{message:".native modifier for v-on has been removed as is no longer necessary.",link:"https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html"},COMPILER_V_IF_V_FOR_PRECEDENCE:{message:"v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with