mirror of
https://github.com/MikroWizard/docker-compose-deployment.git
synced 2025-06-23 19:08:36 +02:00
1 line
No EOL
208 KiB
JavaScript
1 line
No EOL
208 KiB
JavaScript
"use strict";(self.webpackChunkmikrowizard=self.webpackChunkmikrowizard||[]).push([[858],{4858:(bp,ir,hn)=>{hn.d(ir,{j:()=>pp,u:()=>mp});var O=hn(4438);const we=function or(i,e){return i===e||i!=i&&e!=e},Me=function rr(i,e){for(var t=i.length;t--;)if(we(i[t][0],e))return t;return-1};var lr=Array.prototype.splice;function Rt(i){var e=-1,t=null==i?0:i.length;for(this.clear();++e<t;){var n=i[e];this.set(n[0],n[1])}}Rt.prototype.clear=function nr(){this.__data__=[],this.size=0},Rt.prototype.delete=function cr(i){var e=this.__data__,t=Me(e,i);return!(t<0||(t==e.length-1?e.pop():lr.call(e,t,1),--this.size,0))},Rt.prototype.get=function dr(i){var e=this.__data__,t=Me(e,i);return t<0?void 0:e[t][1]},Rt.prototype.has=function fr(i){return Me(this.__data__,i)>-1},Rt.prototype.set=function pr(i,e){var t=this.__data__,n=Me(t,i);return n<0?(++this.size,t.push([i,e])):t[n][1]=e,this};const Se=Rt,dn="object"==typeof global&&global&&global.Object===Object&&global;var Pr="object"==typeof self&&self&&self.Object===Object&&self;const It=dn||Pr||Function("return this")();var Or=It.Symbol,un=Object.prototype,Ar=un.hasOwnProperty,Tr=un.toString,Xt=Or?Or.toStringTag:void 0;var Rr=Object.prototype.toString;var fn=Or?Or.toStringTag:void 0;const Pe=function jr(i){return null==i?void 0===i?"[object Undefined]":"[object Null]":fn&&fn in Object(i)?function Dr(i){var e=Ar.call(i,Xt),t=i[Xt];try{i[Xt]=void 0;var n=!0}catch{}var s=Tr.call(i);return n&&(e?i[Xt]=t:delete i[Xt]),s}(i):function Ir(i){return Rr.call(i)}(i)},Mt=function Nr(i){var e=typeof i;return null!=i&&("object"==e||"function"==e)},li=function Yr(i){if(!Mt(i))return!1;var e=Pe(i);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e};var i,Ur=It["__core-js_shared__"],gn=(i=/[^.]+$/.exec(Ur&&Ur.keys&&Ur.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";var qr=Function.prototype.toString;var ta=/^\[object .+?Constructor\]$/,oa=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const aa=function ra(i){return!(!Mt(i)||function Xr(i){return!!gn&&gn in i}(i))&&(li(i)?oa:ta).test(function Zr(i){if(null!=i){try{return qr.call(i)}catch{}try{return i+""}catch{}}return""}(i))},hi=function ha(i,e){var t=function la(i,e){return i?.[e]}(i,e);return aa(t)?t:void 0},pn=hi(It,"Map"),Gt=hi(Object,"create");var xa=Object.prototype.hasOwnProperty;var Ma=Object.prototype.hasOwnProperty;function Ft(i){var e=-1,t=null==i?0:i.length;for(this.clear();++e<t;){var n=i[e];this.set(n[0],n[1])}}Ft.prototype.clear=function fa(){this.__data__=Gt?Gt(null):{},this.size=0},Ft.prototype.delete=function pa(i){var e=this.has(i)&&delete this.__data__[i];return this.size-=e?1:0,e},Ft.prototype.get=function ya(i){var e=this.__data__;if(Gt){var t=e[i];return"__lodash_hash_undefined__"===t?void 0:t}return xa.call(e,i)?e[i]:void 0},Ft.prototype.has=function Sa(i){var e=this.__data__;return Gt?void 0!==e[i]:Ma.call(e,i)},Ft.prototype.set=function Ca(i,e){var t=this.__data__;return this.size+=this.has(i)?0:1,t[i]=Gt&&void 0===e?"__lodash_hash_undefined__":e,this};const mn=Ft,Ce=function Ea(i,e){var t=i.__data__;return function Da(i){var e=typeof i;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==i:null===i}(e)?t["string"==typeof e?"string":"hash"]:t.map};function zt(i){var e=-1,t=null==i?0:i.length;for(this.clear();++e<t;){var n=i[e];this.set(n[0],n[1])}}zt.prototype.clear=function Aa(){this.size=0,this.__data__={hash:new mn,map:new(pn||Se),string:new mn}},zt.prototype.delete=function Ra(i){var e=Ce(this,i).delete(i);return this.size-=e?1:0,e},zt.prototype.get=function Fa(i){return Ce(this,i).get(i)},zt.prototype.has=function Ba(i){return Ce(this,i).has(i)},zt.prototype.set=function Na(i,e){var t=Ce(this,i),n=t.size;return t.set(i,e),this.size+=t.size==n?0:1,this};const Ha=zt;function Bt(i){var e=this.__data__=new Se(i);this.size=e.size}Bt.prototype.clear=function br(){this.__data__=new Se,this.size=0},Bt.prototype.delete=function xr(i){var e=this.__data__,t=e.delete(i);return this.size=e.size,t},Bt.prototype.get=function vr(i){return this.__data__.get(i)},Bt.prototype.has=function Mr(i){return this.__data__.has(i)},Bt.prototype.set=function $a(i,e){var t=this.__data__;if(t instanceof Se){var n=t.__data__;if(!pn||n.length<199)return n.push([i,e]),this.size=++t.size,this;t=this.__data__=new Ha(n)}return t.set(i,e),this.size=t.size,this};const Ua=Bt;var Xa=function(){try{var i=hi(Object,"defineProperty");return i({},"",{}),i}catch{}}();const Oe=Xa,di=function Ga(i,e,t){"__proto__"==e&&Oe?Oe(i,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):i[e]=t},ui=function Ka(i,e,t){(void 0!==t&&!we(i[e],t)||void 0===t&&!(e in i))&&di(i,e,t)};var Za=function qa(i){return function(e,t,n){for(var s=-1,o=Object(e),r=n(e),a=r.length;a--;){var l=r[i?a:++s];if(!1===t(o[l],l,o))break}return e}}();const Ja=Za;var bn="object"==typeof exports&&exports&&!exports.nodeType&&exports,_n=bn&&"object"==typeof module&&module&&!module.nodeType&&module,xn=_n&&_n.exports===bn?It.Buffer:void 0,yn=xn?xn.allocUnsafe:void 0;const vn=It.Uint8Array,rl=function ol(i,e){var t=e?function nl(i){var e=new i.constructor(i.byteLength);return new vn(e).set(new vn(i)),e}(i.buffer):i.buffer;return new i.constructor(t,i.byteOffset,i.length)};var wn=Object.create,cl=function(){function i(){}return function(e){if(!Mt(e))return{};if(wn)return wn(e);i.prototype=e;var t=new i;return i.prototype=void 0,t}}();const hl=cl;var ul=function dl(i,e){return function(t){return i(e(t))}}(Object.getPrototypeOf,Object);const Mn=ul;var fl=Object.prototype;const Sn=function gl(i){var e=i&&i.constructor;return i===("function"==typeof e&&e.prototype||fl)},Kt=function bl(i){return null!=i&&"object"==typeof i},kn=function xl(i){return Kt(i)&&"[object Arguments]"==Pe(i)};var Pn=Object.prototype,yl=Pn.hasOwnProperty,vl=Pn.propertyIsEnumerable,wl=kn(function(){return arguments}())?kn:function(i){return Kt(i)&&yl.call(i,"callee")&&!vl.call(i,"callee")};const fi=wl,gi=Array.isArray,Cn=function kl(i){return"number"==typeof i&&i>-1&&i%1==0&&i<=9007199254740991},pi=function Pl(i){return null!=i&&Cn(i.length)&&!li(i)};var On="object"==typeof exports&&exports&&!exports.nodeType&&exports,An=On&&"object"==typeof module&&module&&!module.nodeType&&module,Tn=An&&An.exports===On?It.Buffer:void 0;const Dn=(Tn?Tn.isBuffer:void 0)||function Al(){return!1};var Ln=Function.prototype.toString,zl=Object.prototype.hasOwnProperty,Bl=Ln.call(Object);var j={};j["[object Float32Array]"]=j["[object Float64Array]"]=j["[object Int8Array]"]=j["[object Int16Array]"]=j["[object Int32Array]"]=j["[object Uint8Array]"]=j["[object Uint8ClampedArray]"]=j["[object Uint16Array]"]=j["[object Uint32Array]"]=!0,j["[object Arguments]"]=j["[object Array]"]=j["[object ArrayBuffer]"]=j["[object Boolean]"]=j["[object DataView]"]=j["[object Date]"]=j["[object Error]"]=j["[object Function]"]=j["[object Map]"]=j["[object Number]"]=j["[object Object]"]=j["[object RegExp]"]=j["[object Set]"]=j["[object String]"]=j["[object WeakMap]"]=!1;var En="object"==typeof exports&&exports&&!exports.nodeType&&exports,qt=En&&"object"==typeof module&&module&&!module.nodeType&&module,mi=qt&&qt.exports===En&&dn.process,mc=function(){try{return qt&&qt.require&&qt.require("util").types||mi&&mi.binding&&mi.binding("util")}catch{}}(),In=mc&&mc.isTypedArray;const Fn=In?function fc(i){return function(e){return i(e)}}(In):function dc(i){return Kt(i)&&Cn(i.length)&&!!j[Pe(i)]},bi=function _c(i,e){if(("constructor"!==e||"function"!=typeof i[e])&&"__proto__"!=e)return i[e]};var yc=Object.prototype.hasOwnProperty;const wc=function vc(i,e,t){var n=i[e];(!yc.call(i,e)||!we(n,t)||void 0===t&&!(e in i))&&di(i,e,t)};var Oc=/^(?:0|[1-9]\d*)$/;const zn=function Ac(i,e){var t=typeof i;return!!(e=e??9007199254740991)&&("number"==t||"symbol"!=t&&Oc.test(i))&&i>-1&&i%1==0&&i<e};var Dc=Object.prototype.hasOwnProperty;const Ec=function Lc(i,e){var t=gi(i),n=!t&&fi(i),s=!t&&!n&&Dn(i),o=!t&&!n&&!s&&Fn(i),r=t||n||s||o,a=r?function kc(i,e){for(var t=-1,n=Array(i);++t<i;)n[t]=e(t);return n}(i.length,String):[],l=a.length;for(var c in i)(e||Dc.call(i,c))&&(!r||!("length"==c||s&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||zn(c,l)))&&a.push(c);return a};var zc=Object.prototype.hasOwnProperty;const jc=function Bc(i){if(!Mt(i))return function Rc(i){var e=[];if(null!=i)for(var t in Object(i))e.push(t);return e}(i);var e=Sn(i),t=[];for(var n in i)"constructor"==n&&(e||!zc.call(i,n))||t.push(n);return t},Bn=function Nc(i){return pi(i)?Ec(i,!0):jc(i)},Hc=function Vc(i){return function Mc(i,e,t,n){var s=!t;t||(t={});for(var o=-1,r=e.length;++o<r;){var a=e[o],l=n?n(t[a],i[a],a,t,i):void 0;void 0===l&&(l=i[a]),s?di(t,a,l):wc(t,a,l)}return t}(i,Bn(i))},$c=function Wc(i,e,t,n,s,o,r){var a=bi(i,t),l=bi(e,t),c=r.get(l);if(c)ui(i,t,c);else{var h=o?o(a,l,t+"",i,e,r):void 0,d=void 0===h;if(d){var u=gi(l),f=!u&&Dn(l),g=!u&&!f&&Fn(l);h=l,u||f||g?gi(a)?h=a:function Cl(i){return Kt(i)&&pi(i)}(a)?h=function al(i,e){var t=-1,n=i.length;for(e||(e=Array(n));++t<n;)e[t]=i[t];return e}(a):f?(d=!1,h=function tl(i,e){if(e)return i.slice();var t=i.length,n=yn?yn(t):new i.constructor(t);return i.copy(n),n}(l,!0)):g?(d=!1,h=rl(l,!0)):h=[]:function jl(i){if(!Kt(i)||"[object Object]"!=Pe(i))return!1;var e=Mn(i);if(null===e)return!0;var t=zl.call(e,"constructor")&&e.constructor;return"function"==typeof t&&t instanceof t&&Ln.call(t)==Bl}(l)||fi(l)?(h=a,fi(a)?h=Hc(a):(!Mt(a)||li(a))&&(h=function pl(i){return"function"!=typeof i.constructor||Sn(i)?{}:hl(Mn(i))}(l))):d=!1}d&&(r.set(l,h),s(h,l,n,o,r),r.delete(l)),ui(i,t,h)}},Yc=function jn(i,e,t,n,s){i!==e&&Ja(e,function(o,r){if(s||(s=new Ua),Mt(o))$c(i,e,r,t,jn,n,s);else{var a=n?n(bi(i,r),o,r+"",i,e,s):void 0;void 0===a&&(a=o),ui(i,r,a)}},Bn)},Nn=function Uc(i){return i};var Vn=Math.max;const Jc=function Zc(i){return function(){return i}};var Qc=Oe?function(i,e){return Oe(i,"toString",{configurable:!0,enumerable:!1,value:Jc(e),writable:!0})}:Nn,nh=Date.now,oh=function sh(i){var e=0,t=0;return function(){var n=nh(),s=16-(n-t);if(t=n,s>0){if(++e>=800)return arguments[0]}else e=0;return i.apply(void 0,arguments)}}(Qc);const rh=oh,lh=function ah(i,e){return rh(function Kc(i,e,t){return e=Vn(void 0===e?i.length-1:e,0),function(){for(var n=arguments,s=-1,o=Vn(n.length-e,0),r=Array(o);++s<o;)r[s]=n[e+s];s=-1;for(var a=Array(e+1);++s<e;)a[s]=n[s];return a[e]=t(r),function Xc(i,e,t){switch(t.length){case 0:return i.call(e);case 1:return i.call(e,t[0]);case 2:return i.call(e,t[0],t[1]);case 3:return i.call(e,t[0],t[1],t[2])}return i.apply(e,t)}(i,this,a)}}(i,e,Nn),i+"")};var uh=function dh(i){return lh(function(e,t){var n=-1,s=t.length,o=s>1?t[s-1]:void 0,r=s>2?t[2]:void 0;for(o=i.length>3&&"function"==typeof o?(s--,o):void 0,r&&function ch(i,e,t){if(!Mt(t))return!1;var n=typeof e;return!!("number"==n?pi(t)&&zn(e,t.length):"string"==n&&e in t)&&we(t[e],i)}(t[0],t[1],r)&&(o=s<3?void 0:o,s=1),e=Object(e);++n<s;){var a=t[n];a&&i(e,a,n,o)}return e})}(function(i,e,t){Yc(i,e,t)});const fh=uh;function ht(){}const gh=function(){let i=0;return function(){return i++}}();function E(i){return null===i||typeof i>"u"}function z(i){if(Array.isArray&&Array.isArray(i))return!0;const e=Object.prototype.toString.call(i);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function A(i){return null!==i&&"[object Object]"===Object.prototype.toString.call(i)}const H=i=>("number"==typeof i||i instanceof Number)&&isFinite(+i);function tt(i,e){return H(i)?i:e}function C(i,e){return typeof i>"u"?e:i}const Hn=(i,e)=>"string"==typeof i&&i.endsWith("%")?parseFloat(i)/100*e:+i;function B(i,e,t){if(i&&"function"==typeof i.call)return i.apply(t,e)}function I(i,e,t,n){let s,o,r;if(z(i))if(o=i.length,n)for(s=o-1;s>=0;s--)e.call(t,i[s],s);else for(s=0;s<o;s++)e.call(t,i[s],s);else if(A(i))for(r=Object.keys(i),o=r.length,s=0;s<o;s++)e.call(t,i[r[s]],r[s])}function Ae(i,e){let t,n,s,o;if(!i||!e||i.length!==e.length)return!1;for(t=0,n=i.length;t<n;++t)if(s=i[t],o=e[t],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function Te(i){if(z(i))return i.map(Te);if(A(i)){const e=Object.create(null),t=Object.keys(i),n=t.length;let s=0;for(;s<n;++s)e[t[s]]=Te(i[t[s]]);return e}return i}function Wn(i){return-1===["__proto__","prototype","constructor"].indexOf(i)}function mh(i,e,t,n){if(!Wn(i))return;const s=e[i],o=t[i];A(s)&&A(o)?Zt(s,o,n):e[i]=Te(o)}function Zt(i,e,t){const n=z(e)?e:[e],s=n.length;if(!A(i))return i;const o=(t=t||{}).merger||mh;for(let r=0;r<s;++r){if(!A(e=n[r]))continue;const a=Object.keys(e);for(let l=0,c=a.length;l<c;++l)o(a[l],i,e,t)}return i}function Jt(i,e){return Zt(i,e,{merger:bh})}function bh(i,e,t){if(!Wn(i))return;const n=e[i],s=t[i];A(n)&&A(s)?Jt(n,s):Object.prototype.hasOwnProperty.call(e,i)||(e[i]=Te(s))}const $n={"":i=>i,x:i=>i.x,y:i=>i.y};function mt(i,e){return($n[e]||($n[e]=function _h(i){const e=function xh(i){const e=i.split("."),t=[];let n="";for(const s of e)n+=s,n.endsWith("\\")?n=n.slice(0,-1)+".":(t.push(n),n="");return t}(i);return t=>{for(const n of e){if(""===n)break;t=t&&t[n]}return t}}(e)))(i)}function _i(i){return i.charAt(0).toUpperCase()+i.slice(1)}const et=i=>typeof i<"u",bt=i=>"function"==typeof i,Yn=(i,e)=>{if(i.size!==e.size)return!1;for(const t of i)if(!e.has(t))return!1;return!0},N=Math.PI,F=2*N,vh=F+N,De=Number.POSITIVE_INFINITY,wh=N/180,V=N/2,Qt=N/4,Un=2*N/3,it=Math.log10,rt=Math.sign;function Xn(i){const e=Math.round(i);i=te(i,e,i/1e3)?e:i;const t=Math.pow(10,Math.floor(it(i))),n=i/t;return(n<=1?1:n<=2?2:n<=5?5:10)*t}function jt(i){return!isNaN(parseFloat(i))&&isFinite(i)}function te(i,e,t){return Math.abs(i-e)<t}function Gn(i,e,t){let n,s,o;for(n=0,s=i.length;n<s;n++)o=i[n][t],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function st(i){return i*(N/180)}function xi(i){return i*(180/N)}function Kn(i){if(!H(i))return;let e=1,t=0;for(;Math.round(i*e)/e!==i;)e*=10,t++;return t}function qn(i,e){const t=e.x-i.x,n=e.y-i.y,s=Math.sqrt(t*t+n*n);let o=Math.atan2(n,t);return o<-.5*N&&(o+=F),{angle:o,distance:s}}function yi(i,e){return Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2))}function kh(i,e){return(i-e+vh)%F-N}function Q(i){return(i%F+F)%F}function ee(i,e,t,n){const s=Q(i),o=Q(e),r=Q(t),a=Q(o-s),l=Q(r-s),c=Q(s-o),h=Q(s-r);return s===o||s===r||n&&o===r||a>l&&c<h}function X(i,e,t){return Math.max(e,Math.min(t,i))}function dt(i,e,t,n=1e-6){return i>=Math.min(e,t)-n&&i<=Math.max(e,t)+n}function vi(i,e,t){t=t||(r=>i[r]<e);let o,n=i.length-1,s=0;for(;n-s>1;)o=s+n>>1,t(o)?s=o:n=o;return{lo:s,hi:n}}const ut=(i,e,t,n)=>vi(i,t,n?s=>i[s][e]<=t:s=>i[s][e]<t),Ch=(i,e,t)=>vi(i,t,n=>i[n][e]>=t),Zn=["push","pop","shift","splice","unshift"];function Jn(i,e){const t=i._chartjs;if(!t)return;const n=t.listeners,s=n.indexOf(e);-1!==s&&n.splice(s,1),!(n.length>0)&&(Zn.forEach(o=>{delete i[o]}),delete i._chartjs)}function Qn(i){const e=new Set;let t,n;for(t=0,n=i.length;t<n;++t)e.add(i[t]);return e.size===n?i:Array.from(e)}const ts=typeof window>"u"?function(i){return i()}:window.requestAnimationFrame;function es(i,e,t){const n=t||(r=>Array.prototype.slice.call(r));let s=!1,o=[];return function(...r){o=n(r),s||(s=!0,ts.call(window,()=>{s=!1,i.apply(e,o)}))}}const wi=i=>"start"===i?"left":"end"===i?"right":"center",G=(i,e,t)=>"start"===i?e:"end"===i?t:(e+t)/2;function is(i,e,t){const n=e.length;let s=0,o=n;if(i._sorted){const{iScale:r,_parsed:a}=i,l=r.axis,{min:c,max:h,minDefined:d,maxDefined:u}=r.getUserBounds();d&&(s=X(Math.min(ut(a,r.axis,c).lo,t?n:ut(e,l,r.getPixelForValue(c)).lo),0,n-1)),o=u?X(Math.max(ut(a,r.axis,h,!0).hi+1,t?0:ut(e,l,r.getPixelForValue(h),!0).hi+1),s,n)-s:n-s}return{start:s,count:o}}function ns(i){const{xScale:e,yScale:t,_scaleRanges:n}=i,s={xmin:e.min,xmax:e.max,ymin:t.min,ymax:t.max};if(!n)return i._scaleRanges=s,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==t.min||n.ymax!==t.max;return Object.assign(n,s),o}const Le=i=>0===i||1===i,ss=(i,e,t)=>-Math.pow(2,10*(i-=1))*Math.sin((i-e)*F/t),os=(i,e,t)=>Math.pow(2,-10*i)*Math.sin((i-e)*F/t)+1,ie={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>1-Math.cos(i*V),easeOutSine:i=>Math.sin(i*V),easeInOutSine:i=>-.5*(Math.cos(N*i)-1),easeInExpo:i=>0===i?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>1===i?1:1-Math.pow(2,-10*i),easeInOutExpo:i=>Le(i)?i:i<.5?.5*Math.pow(2,10*(2*i-1)):.5*(2-Math.pow(2,-10*(2*i-1))),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>Le(i)?i:ss(i,.075,.3),easeOutElastic:i=>Le(i)?i:os(i,.075,.3),easeInOutElastic:i=>Le(i)?i:i<.5?.5*ss(2*i,.1125,.45):.5+.5*os(2*i-1,.1125,.45),easeInBack:i=>i*i*(2.70158*i-1.70158),easeOutBack:i=>(i-=1)*i*(2.70158*i+1.70158)+1,easeInOutBack(i){let e=1.70158;return(i/=.5)<1?i*i*((1+(e*=1.525))*i-e)*.5:.5*((i-=2)*i*((1+(e*=1.525))*i+e)+2)},easeInBounce:i=>1-ie.easeOutBounce(1-i),easeOutBounce:i=>i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375,easeInOutBounce:i=>i<.5?.5*ie.easeInBounce(2*i):.5*ie.easeOutBounce(2*i-1)+.5};function ne(i){return i+.5|0}const _t=(i,e,t)=>Math.max(Math.min(i,t),e);function se(i){return _t(ne(2.55*i),0,255)}function xt(i){return _t(ne(255*i),0,255)}function ft(i){return _t(ne(i/2.55)/100,0,1)}function rs(i){return _t(ne(100*i),0,100)}const nt={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},Mi=[..."0123456789ABCDEF"],Lh=i=>Mi[15&i],Eh=i=>Mi[(240&i)>>4]+Mi[15&i],Ee=i=>(240&i)>>4==(15&i);const Bh=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function as(i,e,t){const n=e*Math.min(t,1-t),s=(o,r=(o+i/30)%12)=>t-n*Math.max(Math.min(r-3,9-r,1),-1);return[s(0),s(8),s(4)]}function jh(i,e,t){const n=(s,o=(s+i/60)%6)=>t-t*e*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function Nh(i,e,t){const n=as(i,1,.5);let s;for(e+t>1&&(s=1/(e+t),e*=s,t*=s),s=0;s<3;s++)n[s]*=1-e-t,n[s]+=e;return n}function Si(i){const t=i.r/255,n=i.g/255,s=i.b/255,o=Math.max(t,n,s),r=Math.min(t,n,s),a=(o+r)/2;let l,c,h;return o!==r&&(h=o-r,c=a>.5?h/(2-o-r):h/(o+r),l=function Vh(i,e,t,n,s){return i===s?(e-t)/n+(e<t?6:0):e===s?(t-i)/n+2:(i-e)/n+4}(t,n,s,h,o),l=60*l+.5),[0|l,c||0,a]}function ki(i,e,t,n){return(Array.isArray(e)?i(e[0],e[1],e[2]):i(e,t,n)).map(xt)}function Pi(i,e,t){return ki(as,i,e,t)}function ls(i){return(i%360+360)%360}const cs={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},hs={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let Re;const Kh=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,Ci=i=>i<=.0031308?12.92*i:1.055*Math.pow(i,1/2.4)-.055,Nt=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function Ie(i,e,t){if(i){let n=Si(i);n[e]=Math.max(0,Math.min(n[e]+n[e]*t,0===e?360:1)),n=Pi(n),i.r=n[0],i.g=n[1],i.b=n[2]}}function ds(i,e){return i&&Object.assign(e||{},i)}function us(i){var e={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(e={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(e.a=xt(i[3]))):(e=ds(i,{r:0,g:0,b:0,a:1})).a=xt(e.a),e}function Qh(i){return"r"===i.charAt(0)?function qh(i){const e=Kh.exec(i);let n,s,o,t=255;if(e){if(e[7]!==n){const r=+e[7];t=e[8]?se(r):_t(255*r,0,255)}return n=+e[1],s=+e[3],o=+e[5],n=255&(e[2]?se(n):_t(n,0,255)),s=255&(e[4]?se(s):_t(s,0,255)),o=255&(e[6]?se(o):_t(o,0,255)),{r:n,g:s,b:o,a:t}}}(i):function $h(i){const e=Bh.exec(i);let n,t=255;if(!e)return;e[5]!==n&&(t=e[6]?se(+e[5]):xt(+e[5]));const s=ls(+e[2]),o=+e[3]/100,r=+e[4]/100;return n="hwb"===e[1]?function Hh(i,e,t){return ki(Nh,i,e,t)}(s,o,r):"hsv"===e[1]?function Wh(i,e,t){return ki(jh,i,e,t)}(s,o,r):Pi(s,o,r),{r:n[0],g:n[1],b:n[2],a:t}}(i)}class Fe{constructor(e){if(e instanceof Fe)return e;const t=typeof e;let n;"object"===t?n=us(e):"string"===t&&(n=function Ih(i){var t,e=i.length;return"#"===i[0]&&(4===e||5===e?t={r:255&17*nt[i[1]],g:255&17*nt[i[2]],b:255&17*nt[i[3]],a:5===e?17*nt[i[4]]:255}:(7===e||9===e)&&(t={r:nt[i[1]]<<4|nt[i[2]],g:nt[i[3]]<<4|nt[i[4]],b:nt[i[5]]<<4|nt[i[6]],a:9===e?nt[i[7]]<<4|nt[i[8]]:255})),t}(e)||function Gh(i){Re||(Re=function Xh(){const i={},e=Object.keys(hs),t=Object.keys(cs);let n,s,o,r,a;for(n=0;n<e.length;n++){for(r=a=e[n],s=0;s<t.length;s++)o=t[s],a=a.replace(o,cs[o]);o=parseInt(hs[r],16),i[a]=[o>>16&255,o>>8&255,255&o]}return i}(),Re.transparent=[0,0,0,0]);const e=Re[i.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(e)||Qh(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=ds(this._rgb);return e&&(e.a=ft(e.a)),e}set rgb(e){this._rgb=us(e)}rgbString(){return this._valid?function Zh(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${ft(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}(this._rgb):void 0}hexString(){return this._valid?function zh(i){var e=(i=>Ee(i.r)&&Ee(i.g)&&Ee(i.b)&&Ee(i.a))(i)?Lh:Eh;return i?"#"+e(i.r)+e(i.g)+e(i.b)+((i,e)=>i<255?e(i):"")(i.a,e):void 0}(this._rgb):void 0}hslString(){return this._valid?function Uh(i){if(!i)return;const e=Si(i),t=e[0],n=rs(e[1]),s=rs(e[2]);return i.a<255?`hsla(${t}, ${n}%, ${s}%, ${ft(i.a)})`:`hsl(${t}, ${n}%, ${s}%)`}(this._rgb):void 0}mix(e,t){if(e){const n=this.rgb,s=e.rgb;let o;const r=t===o?.5:t,a=2*r-1,l=n.a-s.a,c=((a*l==-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,n.r=255&c*n.r+o*s.r+.5,n.g=255&c*n.g+o*s.g+.5,n.b=255&c*n.b+o*s.b+.5,n.a=r*n.a+(1-r)*s.a,this.rgb=n}return this}interpolate(e,t){return e&&(this._rgb=function Jh(i,e,t){const n=Nt(ft(i.r)),s=Nt(ft(i.g)),o=Nt(ft(i.b));return{r:xt(Ci(n+t*(Nt(ft(e.r))-n))),g:xt(Ci(s+t*(Nt(ft(e.g))-s))),b:xt(Ci(o+t*(Nt(ft(e.b))-o))),a:i.a+t*(e.a-i.a)}}(this._rgb,e._rgb,t)),this}clone(){return new Fe(this.rgb)}alpha(e){return this._rgb.a=xt(e),this}clearer(e){return this._rgb.a*=1-e,this}greyscale(){const e=this._rgb,t=ne(.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 Ie(this._rgb,2,e),this}darken(e){return Ie(this._rgb,2,-e),this}saturate(e){return Ie(this._rgb,1,e),this}desaturate(e){return Ie(this._rgb,1,-e),this}rotate(e){return function Yh(i,e){var t=Si(i);t[0]=ls(t[0]+e),t=Pi(t),i.r=t[0],i.g=t[1],i.b=t[2]}(this._rgb,e),this}}function fs(i){return new Fe(i)}function gs(i){if(i&&"object"==typeof i){const e=i.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function ps(i){return gs(i)?i:fs(i)}function Oi(i){return gs(i)?i:fs(i).saturate(.5).darken(.1).hexString()}const St=Object.create(null),Ai=Object.create(null);function oe(i,e){if(!e)return i;const t=e.split(".");for(let n=0,s=t.length;n<s;++n){const o=t[n];i=i[o]||(i[o]=Object.create(null))}return i}function Ti(i,e,t){return"string"==typeof e?Zt(oe(i,e),t):Zt(oe(i,""),e)}var T=new class td{constructor(e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.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=(t,n)=>Oi(n.backgroundColor),this.hoverBorderColor=(t,n)=>Oi(n.borderColor),this.hoverColor=(t,n)=>Oi(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e)}set(e,t){return Ti(this,e,t)}get(e){return oe(this,e)}describe(e,t){return Ti(Ai,e,t)}override(e,t){return Ti(St,e,t)}route(e,t,n,s){const o=oe(this,e),r=oe(this,n),a="_"+t;Object.defineProperties(o,{[a]:{value:o[t],writable:!0},[t]:{enumerable:!0,get(){const l=this[a],c=r[s];return A(l)?Object.assign({},c,l):C(l,c)},set(l){this[a]=l}}})}}({_scriptable:i=>!i.startsWith("on"),_indexable:i=>"events"!==i,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ze(i,e,t,n,s){let o=e[s];return o||(o=e[s]=i.measureText(s).width,t.push(s)),o>n&&(n=o),n}function id(i,e,t,n){let s=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(s=n.data={},o=n.garbageCollect=[],n.font=e),i.save(),i.font=e;let r=0;const a=t.length;let l,c,h,d,u;for(l=0;l<a;l++)if(d=t[l],null!=d&&!0!==z(d))r=ze(i,s,o,r,d);else if(z(d))for(c=0,h=d.length;c<h;c++)u=d[c],null!=u&&!z(u)&&(r=ze(i,s,o,r,u));i.restore();const f=o.length/2;if(f>t.length){for(l=0;l<f;l++)delete s[o[l]];o.splice(0,f)}return r}function kt(i,e,t){const n=i.currentDevicePixelRatio,s=0!==t?Math.max(t/2,.5):0;return Math.round((e-s)*n)/n+s}function ms(i,e){(e=e||i.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,i.width,i.height),e.restore()}function Di(i,e,t,n){bs(i,e,t,n,null)}function bs(i,e,t,n,s){let o,r,a,l,c,h;const d=e.pointStyle,u=e.rotation,f=e.radius;let g=(u||0)*wh;if(d&&"object"==typeof d&&(o=d.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return i.save(),i.translate(t,n),i.rotate(g),i.drawImage(d,-d.width/2,-d.height/2,d.width,d.height),void i.restore();if(!(isNaN(f)||f<=0)){switch(i.beginPath(),d){default:s?i.ellipse(t,n,s/2,f,0,0,F):i.arc(t,n,f,0,F),i.closePath();break;case"triangle":i.moveTo(t+Math.sin(g)*f,n-Math.cos(g)*f),g+=Un,i.lineTo(t+Math.sin(g)*f,n-Math.cos(g)*f),g+=Un,i.lineTo(t+Math.sin(g)*f,n-Math.cos(g)*f),i.closePath();break;case"rectRounded":c=.516*f,l=f-c,r=Math.cos(g+Qt)*l,a=Math.sin(g+Qt)*l,i.arc(t-r,n-a,c,g-N,g-V),i.arc(t+a,n-r,c,g-V,g),i.arc(t+r,n+a,c,g,g+V),i.arc(t-a,n+r,c,g+V,g+N),i.closePath();break;case"rect":if(!u){l=Math.SQRT1_2*f,h=s?s/2:l,i.rect(t-h,n-l,2*h,2*l);break}g+=Qt;case"rectRot":r=Math.cos(g)*f,a=Math.sin(g)*f,i.moveTo(t-r,n-a),i.lineTo(t+a,n-r),i.lineTo(t+r,n+a),i.lineTo(t-a,n+r),i.closePath();break;case"crossRot":g+=Qt;case"cross":r=Math.cos(g)*f,a=Math.sin(g)*f,i.moveTo(t-r,n-a),i.lineTo(t+r,n+a),i.moveTo(t+a,n-r),i.lineTo(t-a,n+r);break;case"star":r=Math.cos(g)*f,a=Math.sin(g)*f,i.moveTo(t-r,n-a),i.lineTo(t+r,n+a),i.moveTo(t+a,n-r),i.lineTo(t-a,n+r),g+=Qt,r=Math.cos(g)*f,a=Math.sin(g)*f,i.moveTo(t-r,n-a),i.lineTo(t+r,n+a),i.moveTo(t+a,n-r),i.lineTo(t-a,n+r);break;case"line":r=s?s/2:Math.cos(g)*f,a=Math.sin(g)*f,i.moveTo(t-r,n-a),i.lineTo(t+r,n+a);break;case"dash":i.moveTo(t,n),i.lineTo(t+Math.cos(g)*f,n+Math.sin(g)*f)}i.fill(),e.borderWidth>0&&i.stroke()}}function re(i,e,t){return t=t||.5,!e||i&&i.x>e.left-t&&i.x<e.right+t&&i.y>e.top-t&&i.y<e.bottom+t}function Be(i,e){i.save(),i.beginPath(),i.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),i.clip()}function je(i){i.restore()}function nd(i,e,t,n,s){if(!e)return i.lineTo(t.x,t.y);if("middle"===s){const o=(e.x+t.x)/2;i.lineTo(o,e.y),i.lineTo(o,t.y)}else"after"===s!=!!n?i.lineTo(e.x,t.y):i.lineTo(t.x,e.y);i.lineTo(t.x,t.y)}function sd(i,e,t,n){if(!e)return i.lineTo(t.x,t.y);i.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?t.cp2x:t.cp1x,n?t.cp2y:t.cp1y,t.x,t.y)}function Pt(i,e,t,n,s,o={}){const r=z(e)?e:[e],a=o.strokeWidth>0&&""!==o.strokeColor;let l,c;for(i.save(),i.font=s.string,function od(i,e){e.translation&&i.translate(e.translation[0],e.translation[1]),E(e.rotation)||i.rotate(e.rotation),e.color&&(i.fillStyle=e.color),e.textAlign&&(i.textAlign=e.textAlign),e.textBaseline&&(i.textBaseline=e.textBaseline)}(i,o),l=0;l<r.length;++l)c=r[l],a&&(o.strokeColor&&(i.strokeStyle=o.strokeColor),E(o.strokeWidth)||(i.lineWidth=o.strokeWidth),i.strokeText(c,t,n,o.maxWidth)),i.fillText(c,t,n,o.maxWidth),rd(i,t,n,c,o),n+=s.lineHeight;i.restore()}function rd(i,e,t,n,s){if(s.strikethrough||s.underline){const o=i.measureText(n),r=e-o.actualBoundingBoxLeft,a=e+o.actualBoundingBoxRight,c=t+o.actualBoundingBoxDescent,h=s.strikethrough?(t-o.actualBoundingBoxAscent+c)/2:c;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=s.decorationWidth||2,i.moveTo(r,h),i.lineTo(a,h),i.stroke()}}function ae(i,e){const{x:t,y:n,w:s,h:o,radius:r}=e;i.arc(t+r.topLeft,n+r.topLeft,r.topLeft,-V,N,!0),i.lineTo(t,n+o-r.bottomLeft),i.arc(t+r.bottomLeft,n+o-r.bottomLeft,r.bottomLeft,N,V,!0),i.lineTo(t+s-r.bottomRight,n+o),i.arc(t+s-r.bottomRight,n+o-r.bottomRight,r.bottomRight,V,0,!0),i.lineTo(t+s,n+r.topRight),i.arc(t+s-r.topRight,n+r.topRight,r.topRight,0,-V,!0),i.lineTo(t+r.topLeft,n)}const ad=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),ld=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function cd(i,e){const t=(""+i).match(ad);if(!t||"normal"===t[1])return 1.2*e;switch(i=+t[2],t[3]){case"px":return i;case"%":i/=100}return e*i}const hd=i=>+i||0;function Li(i,e){const t={},n=A(e),s=n?Object.keys(e):e,o=A(i)?n?r=>C(i[r],i[e[r]]):r=>i[r]:()=>i;for(const r of s)t[r]=hd(o(r));return t}function _s(i){return Li(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Ct(i){return Li(i,["topLeft","topRight","bottomLeft","bottomRight"])}function K(i){const e=_s(i);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function U(i,e){let t=C((i=i||{}).size,(e=e||T.font).size);"string"==typeof t&&(t=parseInt(t,10));let n=C(i.style,e.style);n&&!(""+n).match(ld)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const s={family:C(i.family,e.family),lineHeight:cd(C(i.lineHeight,e.lineHeight),t),size:t,style:n,weight:C(i.weight,e.weight),string:""};return s.string=function ed(i){return!i||E(i.size)||E(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}(s),s}function le(i,e,t,n){let o,r,a,s=!0;for(o=0,r=i.length;o<r;++o)if(a=i[o],void 0!==a&&(void 0!==e&&"function"==typeof a&&(a=a(e),s=!1),void 0!==t&&z(a)&&(a=a[t%a.length],s=!1),void 0!==a))return n&&!s&&(n.cacheable=!1),a}function yt(i,e){return Object.assign(Object.create(i),e)}function Ei(i,e=[""],t=i,n,s=(()=>i[0])){et(n)||(n=Ms("_fallback",i));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:t,_fallback:n,_getTarget:s,override:r=>Ei([r,...i],e,t,n)};return new Proxy(o,{deleteProperty:(r,a)=>(delete r[a],delete r._keys,delete i[0][a],!0),get:(r,a)=>ys(r,a,()=>function xd(i,e,t,n){let s;for(const o of e)if(s=Ms(ud(o,i),t),et(s))return Ri(i,s)?Ii(t,n,i,s):s}(a,e,i,r)),getOwnPropertyDescriptor:(r,a)=>Reflect.getOwnPropertyDescriptor(r._scopes[0],a),getPrototypeOf:()=>Reflect.getPrototypeOf(i[0]),has:(r,a)=>Ss(r).includes(a),ownKeys:r=>Ss(r),set(r,a,l){const c=r._storage||(r._storage=s());return r[a]=c[a]=l,delete r._keys,!0}})}function Vt(i,e,t,n){const s={_cacheable:!1,_proxy:i,_context:e,_subProxy:t,_stack:new Set,_descriptors:xs(i,n),setContext:o=>Vt(i,o,t,n),override:o=>Vt(i.override(o),e,t,n)};return new Proxy(s,{deleteProperty:(o,r)=>(delete o[r],delete i[r],!0),get:(o,r,a)=>ys(o,r,()=>function fd(i,e,t){const{_proxy:n,_context:s,_subProxy:o,_descriptors:r}=i;let a=n[e];return bt(a)&&r.isScriptable(e)&&(a=function gd(i,e,t,n){const{_proxy:s,_context:o,_subProxy:r,_stack:a}=t;if(a.has(i))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+i);return a.add(i),e=e(o,r||n),a.delete(i),Ri(i,e)&&(e=Ii(s._scopes,s,i,e)),e}(e,a,i,t)),z(a)&&a.length&&(a=function pd(i,e,t,n){const{_proxy:s,_context:o,_subProxy:r,_descriptors:a}=t;if(et(o.index)&&n(i))e=e[o.index%e.length];else if(A(e[0])){const l=e,c=s._scopes.filter(h=>h!==l);e=[];for(const h of l){const d=Ii(c,s,i,h);e.push(Vt(d,o,r&&r[i],a))}}return e}(e,a,i,r.isIndexable)),Ri(e,a)&&(a=Vt(a,s,o&&o[e],r)),a}(o,r,a)),getOwnPropertyDescriptor:(o,r)=>o._descriptors.allKeys?Reflect.has(i,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,r),getPrototypeOf:()=>Reflect.getPrototypeOf(i),has:(o,r)=>Reflect.has(i,r),ownKeys:()=>Reflect.ownKeys(i),set:(o,r,a)=>(i[r]=a,delete o[r],!0)})}function xs(i,e={scriptable:!0,indexable:!0}){const{_scriptable:t=e.scriptable,_indexable:n=e.indexable,_allKeys:s=e.allKeys}=i;return{allKeys:s,scriptable:t,indexable:n,isScriptable:bt(t)?t:()=>t,isIndexable:bt(n)?n:()=>n}}const ud=(i,e)=>i?i+_i(e):e,Ri=(i,e)=>A(e)&&"adapters"!==i&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function ys(i,e,t){if(Object.prototype.hasOwnProperty.call(i,e))return i[e];const n=t();return i[e]=n,n}function vs(i,e,t){return bt(i)?i(e,t):i}const md=(i,e)=>!0===i?e:"string"==typeof i?mt(e,i):void 0;function bd(i,e,t,n,s){for(const o of e){const r=md(t,o);if(r){i.add(r);const a=vs(r._fallback,t,s);if(et(a)&&a!==t&&a!==n)return a}else if(!1===r&&et(n)&&t!==n)return null}return!1}function Ii(i,e,t,n){const s=e._rootScopes,o=vs(e._fallback,t,n),r=[...i,...s],a=new Set;a.add(n);let l=ws(a,r,t,o||t,n);return!(null===l||et(o)&&o!==t&&(l=ws(a,r,o,l,n),null===l))&&Ei(Array.from(a),[""],s,o,()=>function _d(i,e,t){const n=i._getTarget();e in n||(n[e]={});const s=n[e];return z(s)&&A(t)?t:s}(e,t,n))}function ws(i,e,t,n,s){for(;t;)t=bd(i,e,t,n,s);return t}function Ms(i,e){for(const t of e){if(!t)continue;const n=t[i];if(et(n))return n}}function Ss(i){let e=i._keys;return e||(e=i._keys=function yd(i){const e=new Set;for(const t of i)for(const n of Object.keys(t).filter(s=>!s.startsWith("_")))e.add(n);return Array.from(e)}(i._scopes)),e}function ks(i,e,t,n){const{iScale:s}=i,{key:o="r"}=this._parsing,r=new Array(n);let a,l,c,h;for(a=0,l=n;a<l;++a)c=a+t,h=e[c],r[a]={r:s.parse(mt(h,o),c)};return r}const vd=Number.EPSILON||1e-14,Ht=(i,e)=>e<i.length&&!i[e].skip&&i[e],Ps=i=>"x"===i?"y":"x";function wd(i,e,t,n){const s=i.skip?e:i,o=e,r=t.skip?e:t,a=yi(o,s),l=yi(r,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=n*c,u=n*h;return{previous:{x:o.x-d*(r.x-s.x),y:o.y-d*(r.y-s.y)},next:{x:o.x+u*(r.x-s.x),y:o.y+u*(r.y-s.y)}}}function Ne(i,e,t){return Math.max(Math.min(i,t),e)}function Cd(i,e,t,n,s){let o,r,a,l;if(e.spanGaps&&(i=i.filter(c=>!c.skip)),"monotone"===e.cubicInterpolationMode)!function kd(i,e="x"){const t=Ps(e),n=i.length,s=Array(n).fill(0),o=Array(n);let r,a,l,c=Ht(i,0);for(r=0;r<n;++r)if(a=l,l=c,c=Ht(i,r+1),l){if(c){const h=c[e]-l[e];s[r]=0!==h?(c[t]-l[t])/h:0}o[r]=a?c?rt(s[r-1])!==rt(s[r])?0:(s[r-1]+s[r])/2:s[r-1]:s[r]}(function Md(i,e,t){const n=i.length;let s,o,r,a,l,c=Ht(i,0);for(let h=0;h<n-1;++h)if(l=c,c=Ht(i,h+1),l&&c){if(te(e[h],0,vd)){t[h]=t[h+1]=0;continue}s=t[h]/e[h],o=t[h+1]/e[h],a=Math.pow(s,2)+Math.pow(o,2),!(a<=9)&&(r=3/Math.sqrt(a),t[h]=s*r*e[h],t[h+1]=o*r*e[h])}})(i,s,o),function Sd(i,e,t="x"){const n=Ps(t),s=i.length;let o,r,a,l=Ht(i,0);for(let c=0;c<s;++c){if(r=a,a=l,l=Ht(i,c+1),!a)continue;const h=a[t],d=a[n];r&&(o=(h-r[t])/3,a[`cp1${t}`]=h-o,a[`cp1${n}`]=d-o*e[c]),l&&(o=(l[t]-h)/3,a[`cp2${t}`]=h+o,a[`cp2${n}`]=d+o*e[c])}}(i,o,e)}(i,s);else{let c=n?i[i.length-1]:i[0];for(o=0,r=i.length;o<r;++o)a=i[o],l=wd(c,a,i[Math.min(o+1,r-(n?0:1))%r],e.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}e.capBezierPoints&&function Pd(i,e){let t,n,s,o,r,a=re(i[0],e);for(t=0,n=i.length;t<n;++t)r=o,o=a,a=t<n-1&&re(i[t+1],e),o&&(s=i[t],r&&(s.cp1x=Ne(s.cp1x,e.left,e.right),s.cp1y=Ne(s.cp1y,e.top,e.bottom)),a&&(s.cp2x=Ne(s.cp2x,e.left,e.right),s.cp2y=Ne(s.cp2y,e.top,e.bottom)))}(i,t)}function Cs(){return typeof window<"u"&&typeof document<"u"}function Fi(i){let e=i.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function Ve(i,e,t){let n;return"string"==typeof i?(n=parseInt(i,10),-1!==i.indexOf("%")&&(n=n/100*e.parentNode[t])):n=i,n}const He=i=>window.getComputedStyle(i,null),Ad=["top","right","bottom","left"];function Ot(i,e,t){const n={};t=t?"-"+t:"";for(let s=0;s<4;s++){const o=Ad[s];n[o]=parseFloat(i[e+"-"+o+t])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const Td=(i,e,t)=>(i>0||e>0)&&(!t||!t.shadowRoot);function At(i,e){if("native"in i)return i;const{canvas:t,currentDevicePixelRatio:n}=e,s=He(t),o="border-box"===s.boxSizing,r=Ot(s,"padding"),a=Ot(s,"border","width"),{x:l,y:c,box:h}=function Dd(i,e){const t=i.touches,n=t&&t.length?t[0]:i,{offsetX:s,offsetY:o}=n;let a,l,r=!1;if(Td(s,o,i.target))a=s,l=o;else{const c=e.getBoundingClientRect();a=n.clientX-c.left,l=n.clientY-c.top,r=!0}return{x:a,y:l,box:r}}(i,t),d=r.left+(h&&a.left),u=r.top+(h&&a.top);let{width:f,height:g}=e;return o&&(f-=r.width+a.width,g-=r.height+a.height),{x:Math.round((l-d)/f*t.width/n),y:Math.round((c-u)/g*t.height/n)}}const zi=i=>Math.round(10*i)/10;function Os(i,e,t){const n=e||1,s=Math.floor(i.height*n),o=Math.floor(i.width*n);i.height=s/n,i.width=o/n;const r=i.canvas;return r.style&&(t||!r.style.height&&!r.style.width)&&(r.style.height=`${i.height}px`,r.style.width=`${i.width}px`),(i.currentDevicePixelRatio!==n||r.height!==s||r.width!==o)&&(i.currentDevicePixelRatio=n,r.height=s,r.width=o,i.ctx.setTransform(n,0,0,n,0,0),!0)}const Rd=function(){let i=!1;try{const e={get passive(){return i=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return i}();function As(i,e){const t=function Od(i,e){return He(i).getPropertyValue(e)}(i,e),n=t&&t.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Tt(i,e,t,n){return{x:i.x+t*(e.x-i.x),y:i.y+t*(e.y-i.y)}}function Id(i,e,t,n){return{x:i.x+t*(e.x-i.x),y:"middle"===n?t<.5?i.y:e.y:"after"===n?t<1?i.y:e.y:t>0?e.y:i.y}}function Fd(i,e,t,n){const s={x:i.cp2x,y:i.cp2y},o={x:e.cp1x,y:e.cp1y},r=Tt(i,s,t),a=Tt(s,o,t),l=Tt(o,e,t),c=Tt(r,a,t),h=Tt(a,l,t);return Tt(c,h,t)}const Ts=new Map;function ce(i,e,t){return function zd(i,e){e=e||{};const t=i+JSON.stringify(e);let n=Ts.get(t);return n||(n=new Intl.NumberFormat(i,e),Ts.set(t,n)),n}(e,t).format(i)}function Wt(i,e,t){return i?function(i,e){return{x:t=>i+i+e-t,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,n)=>t-n,leftForLtr:(t,n)=>t-n}}(e,t):{x:i=>i,setWidth(i){},textAlign:i=>i,xPlus:(i,e)=>i+e,leftForLtr:(i,e)=>i}}function Ds(i,e){let t,n;("ltr"===e||"rtl"===e)&&(t=i.canvas.style,n=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",e,"important"),i.prevTextDirection=n)}function Ls(i,e){void 0!==e&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",e[0],e[1]))}function Es(i){return"angle"===i?{between:ee,compare:kh,normalize:Q}:{between:dt,compare:(e,t)=>e-t,normalize:e=>e}}function Rs({start:i,end:e,count:t,loop:n,style:s}){return{start:i%t,end:e%t,loop:n&&(e-i+1)%t==0,style:s}}function Is(i,e,t){if(!t)return[i];const{property:n,start:s,end:o}=t,r=e.length,{compare:a,between:l,normalize:c}=Es(n),{start:h,end:d,loop:u,style:f}=function Nd(i,e,t){const{property:n,start:s,end:o}=t,{between:r,normalize:a}=Es(n),l=e.length;let u,f,{start:c,end:h,loop:d}=i;if(d){for(c+=l,h+=l,u=0,f=l;u<f&&r(a(e[c%l][n]),s,o);++u)c--,h--;c%=l,h%=l}return h<c&&(h+=l),{start:c,end:h,loop:d,style:i.style}}(i,e,t),g=[];let b,_,v,p=!1,m=null;for(let S=h,k=h;S<=d;++S)_=e[S%r],!_.skip&&(b=c(_[n]),b!==v&&(p=l(b,s,o),null===m&&(p||l(s,v,b)&&0!==a(s,v))&&(m=0===a(b,s)?S:k),null!==m&&(!p||0===a(o,b)||l(o,v,b))&&(g.push(Rs({start:m,end:S,loop:u,count:r,style:f})),m=null),k=S,v=b));return null!==m&&g.push(Rs({start:m,end:d,loop:u,count:r,style:f})),g}function Fs(i,e){const t=[],n=i.segments;for(let s=0;s<n.length;s++){const o=Is(n[s],i.points,e);o.length&&t.push(...o)}return t}function Bs(i){return{backgroundColor:i.backgroundColor,borderCapStyle:i.borderCapStyle,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderJoinStyle:i.borderJoinStyle,borderWidth:i.borderWidth,borderColor:i.borderColor}}function Yd(i,e){return e&&JSON.stringify(i)!==JSON.stringify(e)}var gt=new class Ud{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,n,s){const r=t.duration;t.listeners[s].forEach(a=>a({chart:e,initial:t.initial,numSteps:r,currentStep:Math.min(n-t.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=ts.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((n,s)=>{if(!n.running||!n.items.length)return;const o=n.items;let l,r=o.length-1,a=!1;for(;r>=0;--r)l=o[r],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(e),a=!0):(o[r]=o[o.length-1],o.pop());a&&(s.draw(),this._notify(s,n,e,"progress")),o.length||(n.running=!1,this._notify(s,n,e,"complete"),n.initial=!1),t+=o.length}),this._lastDate=e,0===t&&(this._running=!1)}_getAnims(e){const t=this._charts;let n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}listen(e,t,n){this._getAnims(e).listeners[t].push(n)}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((n,s)=>Math.max(n,s._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 n=t.items;let s=n.length-1;for(;s>=0;--s)n[s].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}};const js="transparent",Xd={boolean:(i,e,t)=>t>.5?e:i,color(i,e,t){const n=ps(i||js),s=n.valid&&ps(e||js);return s&&s.valid?s.mix(n,t).hexString():e},number:(i,e,t)=>i+(e-i)*t};class Gd{constructor(e,t,n,s){const o=t[n];s=le([e.to,s,o,e.from]);const r=le([e.from,o,s]);this._active=!0,this._fn=e.fn||Xd[e.type||typeof r],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=n,this._from=r,this._to=s,this._promises=void 0}active(){return this._active}update(e,t,n){if(this._active){this._notify(!1);const s=this._target[this._prop],o=n-this._start,r=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(r,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=le([e.to,t,s,e.from]),this._from=le([e.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,n=this._duration,s=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||t<n),!this._active)return this._target[s]=a,void this._notify(!0);t<0?this._target[s]=o:(l=t/n%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,a,l))}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,n)=>{e.push({res:t,rej:n})})}_notify(e){const t=e?"res":"rej",n=this._promises||[];for(let s=0;s<n.length;s++)n[s][t]()}}T.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const Zd=Object.keys(T.animation);T.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:i=>"onProgress"!==i&&"onComplete"!==i&&"fn"!==i}),T.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),T.describe("animations",{_fallback:"animation"}),T.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:i=>0|i}}}});class Ns{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!A(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(n=>{const s=e[n];if(!A(s))return;const o={};for(const r of Zd)o[r]=s[r];(z(s.properties)&&s.properties||[n]).forEach(r=>{(r===n||!t.has(r))&&t.set(r,o)})})}_animateOptions(e,t){const n=t.options,s=function Qd(i,e){if(!e)return;let t=i.options;if(t)return t.$shared&&(i.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t;i.options=e}(e,n);if(!s)return[];const o=this._createAnimations(s,n);return n.$shared&&function Jd(i,e){const t=[],n=Object.keys(e);for(let s=0;s<n.length;s++){const o=i[n[s]];o&&o.active()&&t.push(o.wait())}return Promise.all(t)}(e.options.$animations,n).then(()=>{e.options=n},()=>{}),o}_createAnimations(e,t){const n=this._properties,s=[],o=e.$animations||(e.$animations={}),r=Object.keys(t),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if("$"===c.charAt(0))continue;if("options"===c){s.push(...this._animateOptions(e,t));continue}const h=t[c];let d=o[c];const u=n.get(c);if(d){if(u&&d.active()){d.update(u,h,a);continue}d.cancel()}u&&u.duration?(o[c]=d=new Gd(u,e,c,h),s.push(d)):e[c]=h}return s}update(e,t){if(0===this._properties.size)return void Object.assign(e,t);const n=this._createAnimations(e,t);return n.length?(gt.add(this._chart,n),!0):void 0}}function Vs(i,e){const t=i&&i.options||{},n=t.reverse,s=void 0===t.min?e:0,o=void 0===t.max?e:0;return{start:n?o:s,end:n?s:o}}function Hs(i,e){const t=[],n=i._getSortedDatasetMetas(e);let s,o;for(s=0,o=n.length;s<o;++s)t.push(n[s].index);return t}function Ws(i,e,t,n={}){const s=i.keys,o="single"===n.mode;let r,a,l,c;if(null!==e){for(r=0,a=s.length;r<a;++r){if(l=+s[r],l===t){if(n.all)continue;break}c=i.values[l],H(c)&&(o||0===e||rt(e)===rt(c))&&(e+=c)}return e}}function $s(i,e){const t=i&&i.options.stacked;return t||void 0===t&&void 0!==e.stack}function ou(i,e,t){const n=i[e]||(i[e]={});return n[t]||(n[t]={})}function Ys(i,e,t,n){for(const s of e.getMatchingVisibleMetas(n).reverse()){const o=i[s.index];if(t&&o>0||!t&&o<0)return s.index}return null}function Us(i,e){const{chart:t,_cachedMeta:n}=i,s=t._stacks||(t._stacks={}),{iScale:o,vScale:r,index:a}=n,l=o.axis,c=r.axis,h=function nu(i,e,t){return`${i.id}.${e.id}.${t.stack||t.type}`}(o,r,n),d=e.length;let u;for(let f=0;f<d;++f){const g=e[f],{[l]:p,[c]:m}=g;u=(g._stacks||(g._stacks={}))[c]=ou(s,h,p),u[a]=m,u._top=Ys(u,r,!0,n.type),u._bottom=Ys(u,r,!1,n.type)}}function Bi(i,e){const t=i.scales;return Object.keys(t).filter(n=>t[n].axis===e).shift()}function he(i,e){const t=i.controller.index,n=i.vScale&&i.vScale.axis;if(n){e=e||i._parsed;for(const s of e){const o=s._stacks;if(!o||void 0===o[n]||void 0===o[n][t])return;delete o[n][t]}}}const ji=i=>"reset"===i||"none"===i,Xs=(i,e)=>e?i:Object.assign({},i);let at=(()=>{class i{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=$s(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&he(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,s=this.getDataset(),o=(u,f,g,p)=>"x"===u?f:"r"===u?p:g,r=n.xAxisID=C(s.xAxisID,Bi(t,"x")),a=n.yAxisID=C(s.yAxisID,Bi(t,"y")),l=n.rAxisID=C(s.rAxisID,Bi(t,"r")),c=n.indexAxis,h=n.iAxisID=o(c,r,a,l),d=n.vAxisID=o(c,a,r,l);n.xScale=this.getScaleForId(r),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(h),n.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Jn(this._data,this),t._stacked&&he(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),s=this._data;if(A(n))this._data=function iu(i){const e=Object.keys(i),t=new Array(e.length);let n,s,o;for(n=0,s=e.length;n<s;++n)o=e[n],t[n]={x:o,y:i[o]};return t}(n);else if(s!==n){if(s){Jn(s,this);const o=this._cachedMeta;he(o),o._parsed=[]}n&&Object.isExtensible(n)&&function Ah(i,e){i._chartjs?i._chartjs.listeners.push(e):(Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),Zn.forEach(t=>{const n="_onData"+_i(t),s=i[t];Object.defineProperty(i,t,{configurable:!0,enumerable:!1,value(...o){const r=s.apply(this,o);return i._chartjs.listeners.forEach(a=>{"function"==typeof a[n]&&a[n](...o)}),r}})}))}(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,s=this.getDataset();let o=!1;this._dataCheck();const r=n._stacked;n._stacked=$s(n.vScale,n),n.stack!==s.stack&&(o=!0,he(n),n.stack=s.stack),this._resyncElements(t),(o||r!==n._stacked)&&Us(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:s,_data:o}=this,{iScale:r,_stacked:a}=s,l=r.axis;let d,u,f,c=0===t&&n===o.length||s._sorted,h=t>0&&s._parsed[t-1];if(!1===this._parsing)s._parsed=o,s._sorted=!0,f=o;else{f=z(o[t])?this.parseArrayData(s,o,t,n):A(o[t])?this.parseObjectData(s,o,t,n):this.parsePrimitiveData(s,o,t,n);const g=()=>null===u[l]||h&&u[l]<h[l];for(d=0;d<n;++d)s._parsed[d+t]=u=f[d],c&&(g()&&(c=!1),h=u);s._sorted=c}a&&Us(this,f)}parsePrimitiveData(t,n,s,o){const{iScale:r,vScale:a}=t,l=r.axis,c=a.axis,h=r.getLabels(),d=r===a,u=new Array(o);let f,g,p;for(f=0,g=o;f<g;++f)p=f+s,u[f]={[l]:d||r.parse(h[p],p),[c]:a.parse(n[p],p)};return u}parseArrayData(t,n,s,o){const{xScale:r,yScale:a}=t,l=new Array(o);let c,h,d,u;for(c=0,h=o;c<h;++c)d=c+s,u=n[d],l[c]={x:r.parse(u[0],d),y:a.parse(u[1],d)};return l}parseObjectData(t,n,s,o){const{xScale:r,yScale:a}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,h=new Array(o);let d,u,f,g;for(d=0,u=o;d<u;++d)f=d+s,g=n[f],h[d]={x:r.parse(mt(g,l),f),y:a.parse(mt(g,c),f)};return h}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,s){const r=this._cachedMeta,a=n[t.axis];return Ws({keys:Hs(this.chart,!0),values:n._stacks[t.axis]},a,r.index,{mode:s})}updateRangeFromParsed(t,n,s,o){const r=s[n.axis];let a=null===r?NaN:r;const l=o&&s._stacks[n.axis];o&&l&&(o.values=l,a=Ws(o,r,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,n){const s=this._cachedMeta,o=s._parsed,r=s._sorted&&t===s.iScale,a=o.length,l=this._getOtherScale(t),c=((i,e,t)=>i&&!e.hidden&&e._stacked&&{keys:Hs(this.chart,!0),values:null})(n,s),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:u}=function su(i){const{min:e,max:t,minDefined:n,maxDefined:s}=i.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:s?t:Number.POSITIVE_INFINITY}}(l);let f,g;function p(){g=o[f];const m=g[l.axis];return!H(g[t.axis])||d>m||u<m}for(f=0;f<a&&(p()||(this.updateRangeFromParsed(h,t,g,c),!r));++f);if(r)for(f=a-1;f>=0;--f)if(!p()){this.updateRangeFromParsed(h,t,g,c);break}return h}getAllParsedValues(t){const n=this._cachedMeta._parsed,s=[];let o,r,a;for(o=0,r=n.length;o<r;++o)a=n[o][t.axis],H(a)&&s.push(a);return s}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,s=n.iScale,o=n.vScale,r=this.getParsed(t);return{label:s?""+s.getLabelForValue(r[s.axis]):"",value:o?""+o.getLabelForValue(r[o.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=function eu(i){let e,t,n,s;return A(i)?(e=i.top,t=i.right,n=i.bottom,s=i.left):e=t=n=s=i,{top:e,right:t,bottom:n,left:s,disabled:!1===i}}(C(this.options.clip,function tu(i,e,t){if(!1===t)return!1;const n=Vs(i,t),s=Vs(e,t);return{top:s.end,right:n.end,bottom:s.start,left:n.start}}(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,s=this._cachedMeta,o=s.data||[],r=this.chart.chartArea,a=[],l=this._drawStart||0,c=this._drawCount||o.length-l,h=this.options.drawActiveElementsOnTop;let d;for(s.dataset&&s.dataset.draw(t,r,l,c),d=l;d<l+c;++d){const u=o[d];u.hidden||(u.active&&h?a.push(u):u.draw(t,r))}for(d=0;d<a.length;++d)a[d].draw(t,r)}getStyle(t,n){const s=n?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(t||0,s)}getContext(t,n,s){const o=this.getDataset();let r;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];r=a.$context||(a.$context=function au(i,e,t){return yt(i,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}(this.getContext(),t,a)),r.parsed=this.getParsed(t),r.raw=o.data[t],r.index=r.dataIndex=t}else r=this.$context||(this.$context=function ru(i,e){return yt(i,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),r.dataset=o,r.index=r.datasetIndex=this.index;return r.active=!!n,r.mode=s,r}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",s){const o="active"===n,r=this._cachedDataOpts,a=t+"-"+n,l=r[a],c=this.enableOptionSharing&&et(s);if(l)return Xs(l,c);const h=this.chart.config,d=h.datasetElementScopeKeys(this._type,t),u=o?[`${t}Hover`,"hover",t,""]:[t,""],f=h.getOptionScopes(this.getDataset(),d),g=Object.keys(T.elements[t]),m=h.resolveNamedOptions(f,g,()=>this.getContext(s,o),u);return m.$shared&&(m.$shared=c,r[a]=Object.freeze(Xs(m,c))),m}_resolveAnimations(t,n,s){const o=this.chart,r=this._cachedDataOpts,a=`animation-${n}`,l=r[a];if(l)return l;let c;if(!1!==o.options.animation){const d=this.chart.config,u=d.datasetAnimationScopeKeys(this._type,n),f=d.getOptionScopes(this.getDataset(),u);c=d.createResolver(f,this.getContext(t,s,n))}const h=new Ns(o,c&&c.animations);return c&&c._cacheable&&(r[a]=Object.freeze(h)),h}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||ji(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const s=this.resolveDataElementOptions(t,n),o=this._sharedOptions,r=this.getSharedOptions(s),a=this.includeOptions(n,r)||r!==o;return this.updateSharedOptions(r,n,s),{sharedOptions:r,includeOptions:a}}updateElement(t,n,s,o){ji(o)?Object.assign(t,s):this._resolveAnimations(n,o).update(t,s)}updateSharedOptions(t,n,s){t&&!ji(n)&&this._resolveAnimations(void 0,n).update(t,s)}_setStyle(t,n,s,o){t.active=o;const r=this.getStyle(n,o);this._resolveAnimations(n,s,o).update(t,{options:!o&&this.getSharedOptions(r)||r})}removeHoverStyle(t,n,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,n,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,s=this._cachedMeta.data;for(const[l,c,h]of this._syncList)this[l](c,h);this._syncList=[];const o=s.length,r=n.length,a=Math.min(r,o);a&&this.parse(0,a),r>o?this._insertElements(o,r-o,t):r<o&&this._removeElements(r,o-r)}_insertElements(t,n,s=!0){const o=this._cachedMeta,r=o.data,a=t+n;let l;const c=h=>{for(h.length+=n,l=h.length-1;l>=a;l--)h[l]=h[l-n]};for(c(r),l=t;l<a;++l)r[l]=new this.dataElementType;this._parsing&&c(o._parsed),this.parse(t,n),s&&this.updateElements(r,t,n,"reset")}updateElements(t,n,s,o){}_removeElements(t,n){const s=this._cachedMeta;if(this._parsing){const o=s._parsed.splice(t,n);s._stacked&&he(s,o)}s.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,s,o]=t;this[n](s,o)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const s=arguments.length-2;s&&this._sync(["_insertElements",t,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}return i.defaults={},i})();function hu(i){const e=i.iScale,t=function cu(i,e){if(!i._cache.$bar){const t=i.getMatchingVisibleMetas(e);let n=[];for(let s=0,o=t.length;s<o;s++)n=n.concat(t[s].controller.getAllParsedValues(i));i._cache.$bar=Qn(n.sort((s,o)=>s-o))}return i._cache.$bar}(e,i.type);let s,o,r,a,n=e._length;const l=()=>{32767===r||-32768===r||(et(a)&&(n=Math.min(n,Math.abs(r-a)||n)),a=r)};for(s=0,o=t.length;s<o;++s)r=e.getPixelForValue(t[s]),l();for(a=void 0,s=0,o=e.ticks.length;s<o;++s)r=e.getPixelForTick(s),l();return n}function Gs(i,e,t,n){return z(i)?function fu(i,e,t,n){const s=t.parse(i[0],n),o=t.parse(i[1],n),r=Math.min(s,o),a=Math.max(s,o);let l=r,c=a;Math.abs(r)>Math.abs(a)&&(l=a,c=r),e[t.axis]=c,e._custom={barStart:l,barEnd:c,start:s,end:o,min:r,max:a}}(i,e,t,n):e[t.axis]=t.parse(i,n),e}function Ks(i,e,t,n){const s=i.iScale,o=i.vScale,r=s.getLabels(),a=s===o,l=[];let c,h,d,u;for(c=t,h=t+n;c<h;++c)u=e[c],d={},d[s.axis]=a||s.parse(r[c],c),l.push(Gs(u,d,o,c));return l}function Ni(i){return i&&void 0!==i.barStart&&void 0!==i.barEnd}function mu(i,e,t,n){let s=e.borderSkipped;const o={};if(!s)return void(i.borderSkipped=o);if(!0===s)return void(i.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:r,end:a,reverse:l,top:c,bottom:h}=function pu(i){let e,t,n,s,o;return i.horizontal?(e=i.base>i.x,t="left",n="right"):(e=i.base<i.y,t="bottom",n="top"),e?(s="end",o="start"):(s="start",o="end"),{start:t,end:n,reverse:e,top:s,bottom:o}}(i);"middle"===s&&t&&(i.enableBorderRadius=!0,(t._top||0)===n?s=c:(t._bottom||0)===n?s=h:(o[qs(h,r,a,l)]=!0,s=c)),o[qs(s,r,a,l)]=!0,i.borderSkipped=o}function qs(i,e,t,n){return n?(i=function bu(i,e,t){return i===e?t:i===t?e:i}(i,e,t),i=Zs(i,t,e)):i=Zs(i,e,t),i}function Zs(i,e,t){return"start"===i?e:"end"===i?t:i}function _u(i,{inflateAmount:e},t){i.inflateAmount="auto"===e?1===t?.33:0:e}at.prototype.datasetElementType=null,at.prototype.dataElementType=null;let xu=(()=>{class i extends at{parsePrimitiveData(t,n,s,o){return Ks(t,n,s,o)}parseArrayData(t,n,s,o){return Ks(t,n,s,o)}parseObjectData(t,n,s,o){const{iScale:r,vScale:a}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,h="x"===r.axis?l:c,d="x"===a.axis?l:c,u=[];let f,g,p,m;for(f=s,g=s+o;f<g;++f)m=n[f],p={},p[r.axis]=r.parse(mt(m,h),f),u.push(Gs(mt(m,d),p,a,f));return u}updateRangeFromParsed(t,n,s,o){super.updateRangeFromParsed(t,n,s,o);const r=s._custom;r&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,r.min),t.max=Math.max(t.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:s,vScale:o}=n,r=this.getParsed(t),a=r._custom,l=Ni(a)?"["+a.start+", "+a.end+"]":""+o.getLabelForValue(r[o.axis]);return{label:""+s.getLabelForValue(r[s.axis]),value:l}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,s,o){const r="reset"===o,{index:a,_cachedMeta:{vScale:l}}=this,c=l.getBasePixel(),h=l.isHorizontal(),d=this._getRuler(),{sharedOptions:u,includeOptions:f}=this._getSharedOptions(n,o);for(let g=n;g<n+s;g++){const p=this.getParsed(g),m=r||E(p[l.axis])?{base:c,head:c}:this._calculateBarValuePixels(g),b=this._calculateBarIndexPixels(g,d),_=(p._stacks||{})[l.axis],v={horizontal:h,base:m.base,enableBorderRadius:!_||Ni(p._custom)||a===_._top||a===_._bottom,x:h?m.head:b.center,y:h?b.center:m.head,height:h?b.size:Math.abs(m.size),width:h?Math.abs(m.size):b.size};f&&(v.options=u||this.resolveDataElementOptions(g,t[g].active?"active":o));const y=v.options||t[g].options;mu(v,y,_,a),_u(v,y,d.ratio),this.updateElement(t[g],g,v,o)}}_getStacks(t,n){const{iScale:s}=this._cachedMeta,o=s.getMatchingVisibleMetas(this._type).filter(c=>c.controller.options.grouped),r=s.options.stacked,a=[],l=c=>{const h=c.controller.getParsed(n),d=h&&h[c.vScale.axis];if(E(d)||isNaN(d))return!0};for(const c of o)if((void 0===n||!l(c))&&((!1===r||-1===a.indexOf(c.stack)||void 0===r&&void 0===c.stack)&&a.push(c.stack),c.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,s){const o=this._getStacks(t,s),r=void 0!==n?o.indexOf(n):-1;return-1===r?o.length-1:r}_getRuler(){const t=this.options,n=this._cachedMeta,s=n.iScale,o=[];let r,a;for(r=0,a=n.data.length;r<a;++r)o.push(s.getPixelForValue(this.getParsed(r)[s.axis],r));const l=t.barThickness;return{min:l||hu(n),pixels:o,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:t.grouped,ratio:l?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:s},options:{base:o,minBarLength:r}}=this,a=o||0,l=this.getParsed(t),c=l._custom,h=Ni(c);let g,p,d=l[n.axis],u=0,f=s?this.applyStack(n,l,s):d;f!==d&&(u=f-d,f=d),h&&(d=c.barStart,f=c.barEnd-c.barStart,0!==d&&rt(d)!==rt(c.barEnd)&&(u=0),u+=d);const m=E(o)||h?u:o;let b=n.getPixelForValue(m);if(g=this.chart.getDataVisibility(t)?n.getPixelForValue(u+f):b,p=g-b,Math.abs(p)<r){p=function gu(i,e,t){return 0!==i?rt(i):(e.isHorizontal()?1:-1)*(e.min>=t?1:-1)}(p,n,a)*r,d===a&&(b-=p/2);const _=n.getPixelForDecimal(0),v=n.getPixelForDecimal(1),y=Math.min(_,v),x=Math.max(_,v);b=Math.max(Math.min(b,x),y),g=b+p}if(b===n.getPixelForValue(a)){const _=rt(p)*n.getLineWidthForValue(a)/2;b+=_,p-=_}return{size:p,base:b,head:g,center:g+p/2}}_calculateBarIndexPixels(t,n){const s=n.scale,o=this.options,r=o.skipNull,a=C(o.maxBarThickness,1/0);let l,c;if(n.grouped){const h=r?this._getStackCount(t):n.stackCount,d="flex"===o.barThickness?function uu(i,e,t,n){const s=e.pixels,o=s[i];let r=i>0?s[i-1]:null,a=i<s.length-1?s[i+1]:null;const l=t.categoryPercentage;null===r&&(r=o-(null===a?e.end-e.start:a-o)),null===a&&(a=o+o-r);const c=o-(o-Math.min(r,a))/2*l;return{chunk:Math.abs(a-r)/2*l/n,ratio:t.barPercentage,start:c}}(t,n,o,h):function du(i,e,t,n){const s=t.barThickness;let o,r;return E(s)?(o=e.min*t.categoryPercentage,r=t.barPercentage):(o=s*n,r=1),{chunk:o/n,ratio:r,start:e.pixels[i]-o/2}}(t,n,o,h),u=this._getStackIndex(this.index,this._cachedMeta.stack,r?t:void 0);l=d.start+d.chunk*u+d.chunk/2,c=Math.min(a,d.chunk*d.ratio)}else l=s.getPixelForValue(this.getParsed(t)[s.axis],t),c=Math.min(a,n.min*n.ratio);return{base:l-c/2,head:l+c/2,center:l,size:c}}draw(){const t=this._cachedMeta,n=t.vScale,s=t.data,o=s.length;let r=0;for(;r<o;++r)null!==this.getParsed(r)[n.axis]&&s[r].draw(this._ctx)}}return i.id="bar",i.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},i.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}},i})(),yu=(()=>{class i extends at{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,s,o){const r=super.parsePrimitiveData(t,n,s,o);for(let a=0;a<r.length;a++)r[a]._custom=this.resolveDataElementOptions(a+s).radius;return r}parseArrayData(t,n,s,o){const r=super.parseArrayData(t,n,s,o);for(let a=0;a<r.length;a++)r[a]._custom=C(n[s+a][2],this.resolveDataElementOptions(a+s).radius);return r}parseObjectData(t,n,s,o){const r=super.parseObjectData(t,n,s,o);for(let a=0;a<r.length;a++){const l=n[s+a];r[a]._custom=C(l&&l.r&&+l.r,this.resolveDataElementOptions(a+s).radius)}return r}getMaxOverflow(){const t=this._cachedMeta.data;let n=0;for(let s=t.length-1;s>=0;--s)n=Math.max(n,t[s].size(this.resolveDataElementOptions(s))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,{xScale:s,yScale:o}=n,r=this.getParsed(t),a=s.getLabelForValue(r.x),l=o.getLabelForValue(r.y),c=r._custom;return{label:n.label,value:"("+a+", "+l+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,s,o){const r="reset"===o,{iScale:a,vScale:l}=this._cachedMeta,{sharedOptions:c,includeOptions:h}=this._getSharedOptions(n,o),d=a.axis,u=l.axis;for(let f=n;f<n+s;f++){const g=t[f],p=!r&&this.getParsed(f),m={},b=m[d]=r?a.getPixelForDecimal(.5):a.getPixelForValue(p[d]),_=m[u]=r?l.getBasePixel():l.getPixelForValue(p[u]);m.skip=isNaN(b)||isNaN(_),h&&(m.options=c||this.resolveDataElementOptions(f,g.active?"active":o),r&&(m.options.radius=0)),this.updateElement(g,f,m,o)}}resolveDataElementOptions(t,n){const s=this.getParsed(t);let o=super.resolveDataElementOptions(t,n);o.$shared&&(o=Object.assign({},o,{$shared:!1}));const r=o.radius;return"active"!==n&&(o.radius=0),o.radius+=C(s&&s._custom,r),o}}return i.id="bubble",i.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},i.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title:()=>""}}}},i})(),Js=(()=>{class i extends at{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const s=this.getDataset().data,o=this._cachedMeta;if(!1===this._parsing)o._parsed=s;else{let a,l,r=c=>+s[c];if(A(s[t])){const{key:c="value"}=this._parsing;r=h=>+mt(s[h],c)}for(a=t,l=t+n;a<l;++a)o._parsed[a]=r(a)}}_getRotation(){return st(this.options.rotation-90)}_getCircumference(){return st(this.options.circumference)}_getRotationExtents(){let t=F,n=-F;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)){const o=this.chart.getDatasetMeta(s).controller,r=o._getRotation(),a=o._getCircumference();t=Math.min(t,r),n=Math.max(n,r+a)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:s}=n,o=this._cachedMeta,r=o.data,a=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,l=Math.max((Math.min(s.width,s.height)-a)/2,0),c=Math.min(((i,e)=>"string"==typeof i&&i.endsWith("%")?parseFloat(i)/100:i/e)(this.options.cutout,l),1),h=this._getRingWeight(this.index),{circumference:d,rotation:u}=this._getRotationExtents(),{ratioX:f,ratioY:g,offsetX:p,offsetY:m}=function vu(i,e,t){let n=1,s=1,o=0,r=0;if(e<F){const a=i,l=a+e,c=Math.cos(a),h=Math.sin(a),d=Math.cos(l),u=Math.sin(l),f=(v,y,x)=>ee(v,a,l,!0)?1:Math.max(y,y*t,x,x*t),g=(v,y,x)=>ee(v,a,l,!0)?-1:Math.min(y,y*t,x,x*t),p=f(0,c,d),m=f(V,h,u),b=g(N,c,d),_=g(N+V,h,u);n=(p-b)/2,s=(m-_)/2,o=-(p+b)/2,r=-(m+_)/2}return{ratioX:n,ratioY:s,offsetX:o,offsetY:r}}(u,d,c),v=Math.max(Math.min((s.width-a)/f,(s.height-a)/g)/2,0),y=Hn(this.options.radius,v),w=(y-Math.max(y*c,0))/this._getVisibleDatasetWeightTotal();this.offsetX=p*y,this.offsetY=m*y,o.total=this.calculateTotal(),this.outerRadius=y-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*h,0),this.updateElements(r,0,r.length,t)}_circumference(t,n){const s=this.options,o=this._cachedMeta,r=this._getCircumference();return n&&s.animation.animateRotate||!this.chart.getDataVisibility(t)||null===o._parsed[t]||o.data[t].hidden?0:this.calculateCircumference(o._parsed[t]*r/F)}updateElements(t,n,s,o){const r="reset"===o,a=this.chart,l=a.chartArea,d=(l.left+l.right)/2,u=(l.top+l.bottom)/2,f=r&&a.options.animation.animateScale,g=f?0:this.innerRadius,p=f?0:this.outerRadius,{sharedOptions:m,includeOptions:b}=this._getSharedOptions(n,o);let v,_=this._getRotation();for(v=0;v<n;++v)_+=this._circumference(v,r);for(v=n;v<n+s;++v){const y=this._circumference(v,r),x=t[v],w={x:d+this.offsetX,y:u+this.offsetY,startAngle:_,endAngle:_+y,circumference:y,outerRadius:p,innerRadius:g};b&&(w.options=m||this.resolveDataElementOptions(v,x.active?"active":o)),_+=y,this.updateElement(x,v,w,o)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let o,s=0;for(o=0;o<n.length;o++){const r=t._parsed[o];null!==r&&!isNaN(r)&&this.chart.getDataVisibility(o)&&!n[o].hidden&&(s+=Math.abs(r))}return s}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?F*(Math.abs(t)/n):0}getLabelAndValue(t){const s=this.chart,o=s.data.labels||[],r=ce(this._cachedMeta._parsed[t],s.options.locale);return{label:o[t]||"",value:r}}getMaxBorderWidth(t){let n=0;const s=this.chart;let o,r,a,l,c;if(!t)for(o=0,r=s.data.datasets.length;o<r;++o)if(s.isDatasetVisible(o)){a=s.getDatasetMeta(o),t=a.data,l=a.controller;break}if(!t)return 0;for(o=0,r=t.length;o<r;++o)c=l.resolveDataElementOptions(o),"inner"!==c.borderAlign&&(n=Math.max(n,c.borderWidth||0,c.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let s=0,o=t.length;s<o;++s){const r=this.resolveDataElementOptions(s);n=Math.max(n,r.offset||0,r.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let s=0;s<t;++s)this.chart.isDatasetVisible(s)&&(n+=this._getRingWeight(s));return n}_getRingWeight(t){return Math.max(C(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}return i.id="doughnut",i.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"},i.descriptors={_scriptable:e=>"spacing"!==e,_indexable:e=>"spacing"!==e},i.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n}}=e.legend.options;return t.labels.map((s,o)=>{const a=e.getDatasetMeta(0).controller.getStyle(o);return{text:s,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}},tooltip:{callbacks:{title:()=>"",label(e){let t=e.label;const n=": "+e.formattedValue;return z(t)?(t=t.slice(),t[0]+=n):t+=n,t}}}}},i})(),wu=(()=>{class i extends at{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:s,data:o=[],_dataset:r}=n,a=this.chart._animationsDisabled;let{start:l,count:c}=is(n,o,a);this._drawStart=l,this._drawCount=c,ns(n)&&(l=0,c=o.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!r._decimated,s.points=o;const h=this.resolveDatasetElementOptions(t);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(s,void 0,{animated:!a,options:h},t),this.updateElements(o,l,c,t)}updateElements(t,n,s,o){const r="reset"===o,{iScale:a,vScale:l,_stacked:c,_dataset:h}=this._cachedMeta,{sharedOptions:d,includeOptions:u}=this._getSharedOptions(n,o),f=a.axis,g=l.axis,{spanGaps:p,segment:m}=this.options,b=jt(p)?p:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||r||"none"===o;let v=n>0&&this.getParsed(n-1);for(let y=n;y<n+s;++y){const x=t[y],w=this.getParsed(y),M=_?x:{},S=E(w[g]),k=M[f]=a.getPixelForValue(w[f],y),L=M[g]=r||S?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,w,c):w[g],y);M.skip=isNaN(k)||isNaN(L)||S,M.stop=y>0&&Math.abs(w[f]-v[f])>b,m&&(M.parsed=w,M.raw=h.data[y]),u&&(M.options=d||this.resolveDataElementOptions(y,x.active?"active":o)),_||this.updateElement(x,y,M,o),v=w}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,s=n.options&&n.options.borderWidth||0,o=t.data||[];if(!o.length)return s;const r=o[0].size(this.resolveDataElementOptions(0)),a=o[o.length-1].size(this.resolveDataElementOptions(o.length-1));return Math.max(s,r,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}return i.id="line",i.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},i.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}},i})(),Mu=(()=>{class i extends at{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const s=this.chart,o=s.data.labels||[],r=ce(this._cachedMeta._parsed[t].r,s.options.locale);return{label:o[t]||"",value:r}}parseObjectData(t,n,s,o){return ks.bind(this)(t,n,s,o)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return this._cachedMeta.data.forEach((s,o)=>{const r=this.getParsed(o).r;!isNaN(r)&&this.chart.getDataVisibility(o)&&(r<n.min&&(n.min=r),r>n.max&&(n.max=r))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,s=t.options,o=Math.min(n.right-n.left,n.bottom-n.top),r=Math.max(o/2,0),l=(r-Math.max(s.cutoutPercentage?r/100*s.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=r-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(t,n,s,o){const r="reset"===o,a=this.chart,c=a.options.animation,h=this._cachedMeta.rScale,d=h.xCenter,u=h.yCenter,f=h.getIndexAngle(0)-.5*N;let p,g=f;const m=360/this.countVisibleElements();for(p=0;p<n;++p)g+=this._computeAngle(p,o,m);for(p=n;p<n+s;p++){const b=t[p];let _=g,v=g+this._computeAngle(p,o,m),y=a.getDataVisibility(p)?h.getDistanceFromCenterForValue(this.getParsed(p).r):0;g=v,r&&(c.animateScale&&(y=0),c.animateRotate&&(_=v=f));const x={x:d,y:u,innerRadius:0,outerRadius:y,startAngle:_,endAngle:v,options:this.resolveDataElementOptions(p,b.active?"active":o)};this.updateElement(b,p,x,o)}}countVisibleElements(){let n=0;return this._cachedMeta.data.forEach((s,o)=>{!isNaN(this.getParsed(o).r)&&this.chart.getDataVisibility(o)&&n++}),n}_computeAngle(t,n,s){return this.chart.getDataVisibility(t)?st(this.resolveDataElementOptions(t,n).angle||s):0}}return i.id="polarArea",i.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},i.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n}}=e.legend.options;return t.labels.map((s,o)=>{const a=e.getDatasetMeta(0).controller.getStyle(o);return{text:s,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.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}}},i})(),Su=(()=>{class i extends Js{}return i.id="pie",i.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"},i})(),ku=(()=>{class i extends at{getLabelAndValue(t){const n=this._cachedMeta.vScale,s=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(s[n.axis])}}parseObjectData(t,n,s,o){return ks.bind(this)(t,n,s,o)}update(t){const n=this._cachedMeta,s=n.dataset,o=n.data||[],r=n.iScale.getLabels();if(s.points=o,"resize"!==t){const a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0),this.updateElement(s,void 0,{_loop:!0,_fullLoop:r.length===o.length,options:a},t)}this.updateElements(o,0,o.length,t)}updateElements(t,n,s,o){const r=this._cachedMeta.rScale,a="reset"===o;for(let l=n;l<n+s;l++){const c=t[l],h=this.resolveDataElementOptions(l,c.active?"active":o),d=r.getPointPositionForValue(l,this.getParsed(l).r),u=a?r.xCenter:d.x,f=a?r.yCenter:d.y,g={x:u,y:f,angle:d.angle,skip:isNaN(u)||isNaN(f),options:h};this.updateElement(c,l,g,o)}}}return i.id="radar",i.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},i.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}},i})();class ot{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:n}=this.getProps(["x","y"],e);return{x:t,y:n}}hasValue(){return jt(this.x)&&jt(this.y)}getProps(e,t){const n=this.$animations;if(!t||!n)return this;const s={};return e.forEach(o=>{s[o]=n[o]&&n[o].active()?n[o]._to:this[o]}),s}}ot.defaults={},ot.defaultRoutes=void 0;const Qs={values:i=>z(i)?i:""+i,numeric(i,e,t){if(0===i)return"0";const n=this.chart.options.locale;let s,o=i;if(t.length>1){const c=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),o=function Pu(i,e){let t=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(t)>=1&&i!==Math.floor(i)&&(t=i-Math.floor(i)),t}(i,t)}const r=it(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),ce(i,n,l)},logarithmic(i,e,t){if(0===i)return"0";const n=i/Math.pow(10,Math.floor(it(i)));return 1===n||2===n||5===n?Qs.numeric.call(this,i,e,t):""}};var We={formatters:Qs};function $e(i,e,t,n,s){const o=C(n,0),r=Math.min(C(s,i.length),i.length);let l,c,h,a=0;for(t=Math.ceil(t),s&&(l=s-n,t=l/Math.floor(l/t)),h=o;h<0;)a++,h=Math.round(o+a*t);for(c=Math.max(o,0);c<r;c++)c===h&&(e.push(i[c]),a++,h=Math.round(o+a*t))}T.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(i,e)=>e.lineWidth,tickColor:(i,e)=>e.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:We.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),T.route("scale.ticks","color","","color"),T.route("scale.grid","color","","borderColor"),T.route("scale.grid","borderColor","","borderColor"),T.route("scale.title","color","","color"),T.describe("scale",{_fallback:!1,_scriptable:i=>!i.startsWith("before")&&!i.startsWith("after")&&"callback"!==i&&"parser"!==i,_indexable:i=>"borderDash"!==i&&"tickBorderDash"!==i}),T.describe("scales",{_fallback:"scale"}),T.describe("scale.ticks",{_scriptable:i=>"backdropPadding"!==i&&"callback"!==i,_indexable:i=>"backdropPadding"!==i});const to=(i,e,t)=>"top"===e||"left"===e?i[e]+t:i[e]-t;function eo(i,e){const t=[],n=i.length/e,s=i.length;let o=0;for(;o<s;o+=n)t.push(i[Math.floor(o)]);return t}function Ru(i,e,t){const n=i.ticks.length,s=Math.min(e,n-1),o=i._startPixel,r=i._endPixel,a=1e-6;let c,l=i.getPixelForTick(s);if(!(t&&(c=1===n?Math.max(l-o,r-l):0===e?(i.getPixelForTick(1)-l)/2:(l-i.getPixelForTick(s-1))/2,l+=s<e?c:-c,l<o-a||l>r+a)))return l}function de(i){return i.drawTicks?i.tickLength:0}function io(i,e){if(!i.display)return 0;const t=U(i.font,e),n=K(i.padding);return(z(i.text)?i.text.length:1)*t.lineHeight+n.height}function Bu(i,e,t){let n=wi(i);return(t&&"right"!==e||!t&&"right"===e)&&(n=(i=>"left"===i?"right":"right"===i?"left":i)(n)),n}class Dt extends ot{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:n,_suggestedMax:s}=this;return e=tt(e,Number.POSITIVE_INFINITY),t=tt(t,Number.NEGATIVE_INFINITY),n=tt(n,Number.POSITIVE_INFINITY),s=tt(s,Number.NEGATIVE_INFINITY),{min:tt(e,n),max:tt(t,s),minDefined:H(e),maxDefined:H(t)}}getMinMax(e){let r,{min:t,max:n,minDefined:s,maxDefined:o}=this.getUserBounds();if(s&&o)return{min:t,max:n};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)r=a[l].controller.getMinMax(this,e),s||(t=Math.min(t,r.min)),o||(n=Math.max(n,r.max));return t=o&&t>n?n:t,n=s&&t>n?t:n,{min:tt(t,tt(n,t)),max:tt(n,tt(t,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(){B(this.options.beforeUpdate,[this])}update(e,t,n){const{beginAtZero:s,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function dd(i,e,t){const{min:n,max:s}=i,o=Hn(e,(s-n)/2),r=(a,l)=>t&&0===a?0:a+l;return{min:r(n,-Math.abs(o)),max:r(s,o)}}(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?eo(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||"auto"===r.source)&&(this.ticks=function Cu(i,e){const t=i.options.ticks,n=t.maxTicksLimit||function Ou(i){const e=i.options.offset,t=i._tickSize();return Math.floor(Math.min(i._length/t+(e?0:1),i._maxLength/t))}(i),s=t.major.enabled?function Tu(i){const e=[];let t,n;for(t=0,n=i.length;t<n;t++)i[t].major&&e.push(t);return e}(e):[],o=s.length,r=s[0],a=s[o-1],l=[];if(o>n)return function Du(i,e,t,n){let r,s=0,o=t[0];for(n=Math.ceil(n),r=0;r<i.length;r++)r===o&&(e.push(i[r]),s++,o=t[s*n])}(e,l,s,o/n),l;const c=function Au(i,e,t){const n=function Lu(i){const e=i.length;let t,n;if(e<2)return!1;for(n=i[0],t=1;t<e;++t)if(i[t]-i[t-1]!==n)return!1;return n}(i),s=e.length/t;if(!n)return Math.max(s,1);const o=function Mh(i){const e=[],t=Math.sqrt(i);let n;for(n=1;n<t;n++)i%n==0&&(e.push(n),e.push(i/n));return t===(0|t)&&e.push(t),e.sort((s,o)=>s-o).pop(),e}(n);for(let r=0,a=o.length-1;r<a;r++){const l=o[r];if(l>s)return l}return Math.max(s,1)}(s,e,n);if(o>0){let h,d;const u=o>1?Math.round((a-r)/(o-1)):null;for($e(e,l,c,E(u)?0:r-u,r),h=0,d=o-1;h<d;h++)$e(e,l,c,s[h],s[h+1]);return $e(e,l,c,a,E(u)?e.length:a+u),l}return $e(e,l,c),l}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,n,e=this.options.reverse;this.isHorizontal()?(t=this.left,n=this.right):(t=this.top,n=this.bottom,e=!e),this._startPixel=t,this._endPixel=n,this._reversePixels=e,this._length=n-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){B(this.options.afterUpdate,[this])}beforeSetDimensions(){B(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){B(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),B(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){B(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const t=this.options.ticks;let n,s,o;for(n=0,s=e.length;n<s;n++)o=e[n],o.label=B(t.callback,[o.value,n,e],this)}afterTickToLabelConversion(){B(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){B(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,t=e.ticks,n=this.ticks.length,s=t.minRotation||0,o=t.maxRotation;let a,l,c,r=s;if(!this._isVisible()||!t.display||s>=o||n<=1||!this.isHorizontal())return void(this.labelRotation=s);const h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=X(this.chart.width-d,0,this.maxWidth);a=e.offset?this.maxWidth/n:f/(n-1),d+6>a&&(a=f/(n-(e.offset?.5:1)),l=this.maxHeight-de(e.grid)-t.padding-io(e.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),r=xi(Math.min(Math.asin(X((h.highest.height+6)/a,-1,1)),Math.asin(X(l/c,-1,1))-Math.asin(X(u/c,-1,1)))),r=Math.max(s,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){B(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){B(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:n,title:s,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const l=io(s,t.options.font);if(a?(e.width=this.maxWidth,e.height=de(o)+l):(e.height=this.maxHeight,e.width=de(o)+l),n.display&&this.ticks.length){const{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),f=2*n.padding,g=st(this.labelRotation),p=Math.cos(g),m=Math.sin(g);a?e.height=Math.min(this.maxHeight,e.height+(n.mirror?0:m*d.width+p*u.height)+f):e.width=Math.min(this.maxWidth,e.width+(n.mirror?0:p*d.width+m*u.height)+f),this._calculatePadding(c,h,m,p)}}this._handleMargins(),a?(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,n,s){const{ticks:{align:o,padding:r},position:a}=this.options,l=0!==this.labelRotation,c="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,f=0;l?c?(u=s*e.width,f=n*t.height):(u=n*e.height,f=s*t.width):"start"===o?f=t.width:"end"===o?u=e.width:"inner"!==o&&(u=e.width/2,f=t.width/2),this.paddingLeft=Math.max((u-h+r)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-d+r)*this.width/(this.width-d),0)}else{let h=t.height/2,d=e.height/2;"start"===o?(h=0,d=e.height):"end"===o&&(h=t.height,d=0),this.paddingTop=h+r,this.paddingBottom=d+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){B(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,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(e),t=0,n=e.length;t<n;t++)E(e[t].label)&&(e.splice(t,1),n--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const t=this.options.ticks.sampleSize;let n=this.ticks;t<n.length&&(n=eo(n,t)),this._labelSizes=e=this._computeLabelSizes(n,n.length)}return e}_computeLabelSizes(e,t){const{ctx:n,_longestTextCache:s}=this,o=[],r=[];let c,h,d,u,f,g,p,m,b,_,v,a=0,l=0;for(c=0;c<t;++c){if(u=e[c].label,f=this._resolveTickFontOptions(c),n.font=g=f.string,p=s[g]=s[g]||{data:{},gc:[]},m=f.lineHeight,b=_=0,E(u)||z(u)){if(z(u))for(h=0,d=u.length;h<d;++h)v=u[h],!E(v)&&!z(v)&&(b=ze(n,p.data,p.gc,b,v),_+=m)}else b=ze(n,p.data,p.gc,b,u),_=m;o.push(b),r.push(_),a=Math.max(b,a),l=Math.max(_,l)}!function Iu(i,e){I(i,t=>{const n=t.gc,s=n.length/2;let o;if(s>e){for(o=0;o<s;++o)delete t.data[n[o]];n.splice(0,s)}})}(s,t);const y=o.indexOf(a),x=r.indexOf(l),w=M=>({width:o[M]||0,height:r[M]||0});return{first:w(0),last:w(t-1),widest:w(y),highest:w(x),widths:o,heights:r}}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 function Ph(i){return X(i,-32768,32767)}(this._alignToPixels?kt(this.chart,t,0):t)}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&&e<t.length){const n=t[e];return n.$context||(n.$context=function zu(i,e,t){return yt(i,{tick:t,index:e,type:"tick"})}(this.getContext(),e,n))}return this.$context||(this.$context=function Fu(i,e){return yt(i,{scale:e,type:"scale"})}(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,t=st(this.labelRotation),n=Math.abs(Math.cos(t)),s=Math.abs(Math.sin(t)),o=this._getLabelSizes(),r=e.autoSkipPadding||0,a=o?o.widest.width+r:0,l=o?o.highest.height+r:0;return this.isHorizontal()?l*n>a*s?a/n:l/s:l*s<a*n?l/n:a/s}_isVisible(){const e=this.options.display;return"auto"!==e?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const t=this.axis,n=this.chart,s=this.options,{grid:o,position:r}=s,a=o.offset,l=this.isHorizontal(),h=this.ticks.length+(a?1:0),d=de(o),u=[],f=o.setContext(this.getContext()),g=f.drawBorder?f.borderWidth:0,p=g/2,m=function(P){return kt(n,P,g)};let b,_,v,y,x,w,M,S,k,L,R,D;if("top"===r)b=m(this.bottom),w=this.bottom-d,S=b-p,L=m(e.top)+p,D=e.bottom;else if("bottom"===r)b=m(this.top),L=e.top,D=m(e.bottom)-p,w=b+p,S=this.top+d;else if("left"===r)b=m(this.right),x=this.right-d,M=b-p,k=m(e.left)+p,R=e.right;else if("right"===r)b=m(this.left),k=e.left,R=m(e.right)-p,x=b+p,M=this.left+d;else if("x"===t){if("center"===r)b=m((e.top+e.bottom)/2+.5);else if(A(r)){const P=Object.keys(r)[0];b=m(this.chart.scales[P].getPixelForValue(r[P]))}L=e.top,D=e.bottom,w=b+p,S=w+d}else if("y"===t){if("center"===r)b=m((e.left+e.right)/2);else if(A(r)){const P=Object.keys(r)[0];b=m(this.chart.scales[P].getPixelForValue(r[P]))}x=b-p,M=x-d,k=e.left,R=e.right}const $=C(s.ticks.maxTicksLimit,h),Z=Math.max(1,Math.ceil(h/$));for(_=0;_<h;_+=Z){const P=o.setContext(this.getContext(_)),Y=P.lineWidth,W=P.color,Et=P.borderDash||[],rn=P.borderDashOffset,Yt=P.tickWidth,ai=P.tickColor,Ut=P.tickBorderDash||[],ve=P.tickBorderDashOffset;v=Ru(this,_,a),void 0!==v&&(y=kt(n,v,Y),l?x=M=k=R=y:w=S=L=D=y,u.push({tx1:x,ty1:w,tx2:M,ty2:S,x1:k,y1:L,x2:R,y2:D,width:Y,color:W,borderDash:Et,borderDashOffset:rn,tickWidth:Yt,tickColor:ai,tickBorderDash:Ut,tickBorderDashOffset:ve}))}return this._ticksLength=h,this._borderValue=b,u}_computeLabelItems(e){const t=this.axis,n=this.options,{position:s,ticks:o}=n,r=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=o,u=de(n.grid),f=u+h,g=d?-h:f,p=-st(this.labelRotation),m=[];let b,_,v,y,x,w,M,S,k,L,R,D,$="middle";if("top"===s)w=this.bottom-g,M=this._getXAxisLabelAlignment();else if("bottom"===s)w=this.top+g,M=this._getXAxisLabelAlignment();else if("left"===s){const P=this._getYAxisLabelAlignment(u);M=P.textAlign,x=P.x}else if("right"===s){const P=this._getYAxisLabelAlignment(u);M=P.textAlign,x=P.x}else if("x"===t){if("center"===s)w=(e.top+e.bottom)/2+f;else if(A(s)){const P=Object.keys(s)[0];w=this.chart.scales[P].getPixelForValue(s[P])+f}M=this._getXAxisLabelAlignment()}else if("y"===t){if("center"===s)x=(e.left+e.right)/2-f;else if(A(s)){const P=Object.keys(s)[0];x=this.chart.scales[P].getPixelForValue(s[P])}M=this._getYAxisLabelAlignment(u).textAlign}"y"===t&&("start"===l?$="top":"end"===l&&($="bottom"));const Z=this._getLabelSizes();for(b=0,_=a.length;b<_;++b){v=a[b],y=v.label;const P=o.setContext(this.getContext(b));S=this.getPixelForTick(b)+o.labelOffset,k=this._resolveTickFontOptions(b),L=k.lineHeight,R=z(y)?y.length:1;const Y=R/2,W=P.color,Et=P.textStrokeColor,rn=P.textStrokeWidth;let ai,Yt=M;if(r?(x=S,"inner"===M&&(Yt=b===_-1?this.options.reverse?"left":"right":0===b?this.options.reverse?"right":"left":"center"),D="top"===s?"near"===c||0!==p?-R*L+L/2:"center"===c?-Z.highest.height/2-Y*L+L:L/2-Z.highest.height:"near"===c||0!==p?L/2:"center"===c?Z.highest.height/2-Y*L:Z.highest.height-R*L,d&&(D*=-1)):(w=S,D=(1-R)*L/2),P.showLabelBackdrop){const Ut=K(P.backdropPadding),ve=Z.heights[b],an=Z.widths[b];let ln=w+D-Ut.top,cn=x-Ut.left;switch($){case"middle":ln-=ve/2;break;case"bottom":ln-=ve}switch(M){case"center":cn-=an/2;break;case"right":cn-=an}ai={left:cn,top:ln,width:an+Ut.width,height:ve+Ut.height,color:P.backdropColor}}m.push({rotation:p,label:y,font:k,color:W,strokeColor:Et,strokeWidth:rn,textOffset:D,textAlign:Yt,textBaseline:$,translation:[x,w],backdrop:ai})}return m}_getXAxisLabelAlignment(){const{position:e,ticks:t}=this.options;if(-st(this.labelRotation))return"top"===e?"left":"right";let s="center";return"start"===t.align?s="left":"end"===t.align?s="right":"inner"===t.align&&(s="inner"),s}_getYAxisLabelAlignment(e){const{position:t,ticks:{crossAlign:n,mirror:s,padding:o}}=this.options,a=e+o,l=this._getLabelSizes().widest.width;let c,h;return"left"===t?s?(h=this.right+o,"near"===n?c="left":"center"===n?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-a,"near"===n?c="right":"center"===n?(c="center",h-=l/2):(c="left",h=this.left)):"right"===t?s?(h=this.left+o,"near"===n?c="right":"center"===n?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+a,"near"===n?c="left":"center"===n?(c="center",h+=l/2):(c="right",h=this.right)):c="right",{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,t=this.options.position;return"left"===t||"right"===t?{top:0,left:this.left,bottom:e.height,right:this.right}:"top"===t||"bottom"===t?{top:this.top,left:0,bottom:this.bottom,right:e.width}:void 0}drawBackground(){const{ctx:e,options:{backgroundColor:t},left:n,top:s,width:o,height:r}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(n,s,o,r),e.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const s=this.ticks.findIndex(o=>o.value===e);return s>=0?t.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const t=this.options.grid,n=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let o,r;const a=(l,c,h)=>{!h.width||!h.color||(n.save(),n.lineWidth=h.width,n.strokeStyle=h.color,n.setLineDash(h.borderDash||[]),n.lineDashOffset=h.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(c.x,c.y),n.stroke(),n.restore())};if(t.display)for(o=0,r=s.length;o<r;++o){const l=s[o];t.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),t.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:t,options:{grid:n}}=this,s=n.setContext(this.getContext()),o=n.drawBorder?s.borderWidth:0;if(!o)return;const r=n.setContext(this.getContext(0)).lineWidth,a=this._borderValue;let l,c,h,d;this.isHorizontal()?(l=kt(e,this.left,o)-o/2,c=kt(e,this.right,r)+r/2,h=d=a):(h=kt(e,this.top,o)-o/2,d=kt(e,this.bottom,r)+r/2,l=c=a),t.save(),t.lineWidth=s.borderWidth,t.strokeStyle=s.borderColor,t.beginPath(),t.moveTo(l,h),t.lineTo(c,d),t.stroke(),t.restore()}drawLabels(e){if(!this.options.ticks.display)return;const n=this.ctx,s=this._computeLabelArea();s&&Be(n,s);const o=this._labelItems||(this._labelItems=this._computeLabelItems(e));let r,a;for(r=0,a=o.length;r<a;++r){const l=o[r],c=l.font,h=l.label;l.backdrop&&(n.fillStyle=l.backdrop.color,n.fillRect(l.backdrop.left,l.backdrop.top,l.backdrop.width,l.backdrop.height)),Pt(n,h,0,l.textOffset,c,l)}s&&je(n)}drawTitle(){const{ctx:e,options:{position:t,title:n,reverse:s}}=this;if(!n.display)return;const o=U(n.font),r=K(n.padding),a=n.align;let l=o.lineHeight/2;"bottom"===t||"center"===t||A(t)?(l+=r.bottom,z(n.text)&&(l+=o.lineHeight*(n.text.length-1))):l+=r.top;const{titleX:c,titleY:h,maxWidth:d,rotation:u}=function ju(i,e,t,n){const{top:s,left:o,bottom:r,right:a,chart:l}=i,{chartArea:c,scales:h}=l;let u,f,g,d=0;const p=r-s,m=a-o;if(i.isHorizontal()){if(f=G(n,o,a),A(t)){const b=Object.keys(t)[0];g=h[b].getPixelForValue(t[b])+p-e}else g="center"===t?(c.bottom+c.top)/2+p-e:to(i,t,e);u=a-o}else{if(A(t)){const b=Object.keys(t)[0];f=h[b].getPixelForValue(t[b])-m+e}else f="center"===t?(c.left+c.right)/2-m+e:to(i,t,e);g=G(n,r,s),d="left"===t?-V:V}return{titleX:f,titleY:g,maxWidth:u,rotation:d}}(this,l,t,a);Pt(e,n.text,0,0,o,{color:n.color,maxWidth:d,rotation:u,textAlign:Bu(a,t,s),textBaseline:"middle",translation:[c,h]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,t=e.ticks&&e.ticks.z||0,n=C(e.grid&&e.grid.z,-1);return this._isVisible()&&this.draw===Dt.prototype.draw?[{z:n,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:n+1,draw:()=>{this.drawBorder()}},{z:t,draw:s=>{this.drawLabels(s)}}]:[{z:t,draw:s=>{this.draw(s)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",s=[];let o,r;for(o=0,r=t.length;o<r;++o){const a=t[o];a[n]===this.id&&(!e||a.type===e)&&s.push(a)}return s}_resolveTickFontOptions(e){return U(this.options.ticks.setContext(this.getContext(e)).font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class Ye{constructor(e,t,n){this.type=e,this.scope=t,this.override=n,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const t=Object.getPrototypeOf(e);let n;(function Hu(i){return"id"in i&&"defaults"in i})(t)&&(n=this.register(t));const s=this.items,o=e.id,r=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+e);return o in s||(s[o]=e,function Nu(i,e,t){const n=Zt(Object.create(null),[t?T.get(t):{},T.get(e),i.defaults]);T.set(e,n),i.defaultRoutes&&function Vu(i,e){Object.keys(e).forEach(t=>{const n=t.split("."),s=n.pop(),o=[i].concat(n).join("."),r=e[t].split("."),a=r.pop(),l=r.join(".");T.route(o,s,l,a)})}(e,i.defaultRoutes),i.descriptors&&T.describe(e,i.descriptors)}(e,r,n),this.override&&T.override(e.id,e.overrides)),r}get(e){return this.items[e]}unregister(e){const t=this.items,n=e.id,s=this.scope;n in t&&delete t[n],s&&n in T[s]&&(delete T[s][n],this.override&&delete St[n])}}var lt=new class Wu{constructor(){this.controllers=new Ye(at,"datasets",!0),this.elements=new Ye(ot,"elements"),this.plugins=new Ye(Object,"plugins"),this.scales=new Ye(Dt,"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,n){[...t].forEach(s=>{const o=n||this._getRegistryForType(s);n||o.isForType(s)||o===this.plugins&&s.id?this._exec(e,o,s):I(s,r=>{const a=n||this._getRegistryForType(r);this._exec(e,a,r)})})}_exec(e,t,n){const s=_i(e);B(n["before"+s],[],n),t[e](n),B(n["after"+s],[],n)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){const n=this._typedRegistries[t];if(n.isForType(e))return n}return this.plugins}_get(e,t,n){const s=t.get(e);if(void 0===s)throw new Error('"'+e+'" is not a registered '+n+".");return s}},$u=Object.freeze({__proto__:null,BarController:xu,BubbleController:yu,DoughnutController:Js,LineController:wu,PolarAreaController:Mu,PieController:Su,RadarController:ku,ScatterController:(()=>{class i extends at{update(t){const n=this._cachedMeta,{data:s=[]}=n,o=this.chart._animationsDisabled;let{start:r,count:a}=is(n,s,o);if(this._drawStart=r,this._drawCount=a,ns(n)&&(r=0,a=s.length),this.options.showLine){const{dataset:l,_dataset:c}=n;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!c._decimated,l.points=s;const h=this.resolveDatasetElementOptions(t);h.segment=this.options.segment,this.updateElement(l,void 0,{animated:!o,options:h},t)}this.updateElements(s,r,a,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=lt.getElement("line")),super.addElements()}updateElements(t,n,s,o){const r="reset"===o,{iScale:a,vScale:l,_stacked:c,_dataset:h}=this._cachedMeta,d=this.resolveDataElementOptions(n,o),u=this.getSharedOptions(d),f=this.includeOptions(o,u),g=a.axis,p=l.axis,{spanGaps:m,segment:b}=this.options,_=jt(m)?m:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||r||"none"===o;let y=n>0&&this.getParsed(n-1);for(let x=n;x<n+s;++x){const w=t[x],M=this.getParsed(x),S=v?w:{},k=E(M[p]),L=S[g]=a.getPixelForValue(M[g],x),R=S[p]=r||k?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,M,c):M[p],x);S.skip=isNaN(L)||isNaN(R)||k,S.stop=x>0&&Math.abs(M[g]-y[g])>_,b&&(S.parsed=M,S.raw=h.data[x]),f&&(S.options=u||this.resolveDataElementOptions(x,w.active?"active":o)),v||this.updateElement(w,x,S,o),y=M}this.updateSharedOptions(u,o,d)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let l=0;for(let c=n.length-1;c>=0;--c)l=Math.max(l,n[c].size(this.resolveDataElementOptions(c))/2);return l>0&&l}const s=t.dataset,o=s.options&&s.options.borderWidth||0;if(!n.length)return o;const r=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(o,r,a)/2}}return i.id="scatter",i.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},i.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:e=>"("+e.label+", "+e.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}},i})()});function Lt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var Yu={_date:(()=>{class i{constructor(t){this.options=t||{}}init(t){}formats(){return Lt()}parse(t,n){return Lt()}format(t,n){return Lt()}add(t,n,s){return Lt()}diff(t,n,s){return Lt()}startOf(t,n,s){return Lt()}endOf(t,n){return Lt()}}return i.override=function(e){Object.assign(i.prototype,e)},i})()};function Uu(i,e,t,n){const{controller:s,data:o,_sorted:r}=i,a=s._cachedMeta.iScale;if(a&&e===a.axis&&"r"!==e&&r&&o.length){const l=a._reversePixels?Ch:ut;if(!n)return l(o,e,t);if(s._sharedOptions){const c=o[0],h="function"==typeof c.getRange&&c.getRange(e);if(h){const d=l(o,e,t-h),u=l(o,e,t+h);return{lo:d.lo,hi:u.hi}}}}return{lo:0,hi:o.length-1}}function ue(i,e,t,n,s){const o=i.getSortedVisibleDatasetMetas(),r=t[e];for(let a=0,l=o.length;a<l;++a){const{index:c,data:h}=o[a],{lo:d,hi:u}=Uu(o[a],e,r,s);for(let f=d;f<=u;++f){const g=h[f];g.skip||n(g,c,f)}}}function Vi(i,e,t,n,s){const o=[];return!s&&!i.isPointInArea(e)||ue(i,t,e,function(a,l,c){!s&&!re(a,i.chartArea,0)||a.inRange(e.x,e.y,n)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function Hi(i,e,t,n,s,o){return o||i.isPointInArea(e)?"r"!==t||n?function Ku(i,e,t,n,s,o){let r=[];const a=function Xu(i){const e=-1!==i.indexOf("x"),t=-1!==i.indexOf("y");return function(n,s){const o=e?Math.abs(n.x-s.x):0,r=t?Math.abs(n.y-s.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(r,2))}}(t);let l=Number.POSITIVE_INFINITY;return ue(i,t,e,function c(h,d,u){const f=h.inRange(e.x,e.y,s);if(n&&!f)return;const g=h.getCenterPoint(s);if(!o&&!i.isPointInArea(g)&&!f)return;const m=a(e,g);m<l?(r=[{element:h,datasetIndex:d,index:u}],l=m):m===l&&r.push({element:h,datasetIndex:d,index:u})}),r}(i,e,t,n,s,o):function Gu(i,e,t,n){let s=[];return ue(i,t,e,function o(r,a,l){const{startAngle:c,endAngle:h}=r.getProps(["startAngle","endAngle"],n),{angle:d}=qn(r,{x:e.x,y:e.y});ee(d,c,h)&&s.push({element:r,datasetIndex:a,index:l})}),s}(i,e,t,s):[]}function no(i,e,t,n,s){const o=[],r="x"===t?"inXRange":"inYRange";let a=!1;return ue(i,t,e,(l,c,h)=>{l[r](e[t],s)&&(o.push({element:l,datasetIndex:c,index:h}),a=a||l.inRange(e.x,e.y,s))}),n&&!a?[]:o}var qu={evaluateInteractionItems:ue,modes:{index(i,e,t,n){const s=At(e,i),o=t.axis||"x",r=t.includeInvisible||!1,a=t.intersect?Vi(i,s,o,n,r):Hi(i,s,o,!1,n,r),l=[];return a.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{const h=a[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(i,e,t,n){const s=At(e,i),o=t.axis||"xy",r=t.includeInvisible||!1;let a=t.intersect?Vi(i,s,o,n,r):Hi(i,s,o,!1,n,r);if(a.length>0){const l=a[0].datasetIndex,c=i.getDatasetMeta(l).data;a=[];for(let h=0;h<c.length;++h)a.push({element:c[h],datasetIndex:l,index:h})}return a},point:(i,e,t,n)=>Vi(i,At(e,i),t.axis||"xy",n,t.includeInvisible||!1),nearest:(i,e,t,n)=>Hi(i,At(e,i),t.axis||"xy",t.intersect,n,t.includeInvisible||!1),x:(i,e,t,n)=>no(i,At(e,i),"x",t.intersect,n),y:(i,e,t,n)=>no(i,At(e,i),"y",t.intersect,n)}};const so=["left","top","right","bottom"];function fe(i,e){return i.filter(t=>t.pos===e)}function oo(i,e){return i.filter(t=>-1===so.indexOf(t.pos)&&t.box.axis===e)}function ge(i,e){return i.sort((t,n)=>{const s=e?n:t,o=e?t:n;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function ro(i,e,t,n){return Math.max(i[t],e[t])+Math.max(i[n],e[n])}function ao(i,e){i.top=Math.max(i.top,e.top),i.left=Math.max(i.left,e.left),i.bottom=Math.max(i.bottom,e.bottom),i.right=Math.max(i.right,e.right)}function ef(i,e,t,n){const{pos:s,box:o}=t,r=i.maxPadding;if(!A(s)){t.size&&(i[s]-=t.size);const d=n[t.stack]||{size:0,count:1};d.size=Math.max(d.size,t.horizontal?o.height:o.width),t.size=d.size/d.count,i[s]+=t.size}o.getPadding&&ao(r,o.getPadding());const a=Math.max(0,e.outerWidth-ro(r,i,"left","right")),l=Math.max(0,e.outerHeight-ro(r,i,"top","bottom")),c=a!==i.w,h=l!==i.h;return i.w=a,i.h=l,t.horizontal?{same:c,other:h}:{same:h,other:c}}function sf(i,e){const t=e.maxPadding;return function n(s){const o={left:0,top:0,right:0,bottom:0};return s.forEach(r=>{o[r]=Math.max(e[r],t[r])}),o}(i?["left","right"]:["top","bottom"])}function pe(i,e,t,n){const s=[];let o,r,a,l,c,h;for(o=0,r=i.length,c=0;o<r;++o){a=i[o],l=a.box,l.update(a.width||e.w,a.height||e.h,sf(a.horizontal,e));const{same:d,other:u}=ef(e,t,a,n);c|=d&&s.length,h=h||u,l.fullSize||s.push(a)}return c&&pe(s,e,t,n)||h}function Ue(i,e,t,n,s){i.top=t,i.left=e,i.right=e+n,i.bottom=t+s,i.width=n,i.height=s}function lo(i,e,t,n){const s=t.padding;let{x:o,y:r}=e;for(const a of i){const l=a.box,c=n[a.stack]||{count:1,placed:0,weight:1},h=a.stackWeight/c.weight||1;if(a.horizontal){const d=e.w*h,u=c.size||l.height;et(c.start)&&(r=c.start),l.fullSize?Ue(l,s.left,r,t.outerWidth-s.right-s.left,u):Ue(l,e.left+c.placed,r,d,u),c.start=r,c.placed+=d,r=l.bottom}else{const d=e.h*h,u=c.size||l.width;et(c.start)&&(o=c.start),l.fullSize?Ue(l,o,s.top,u,t.outerHeight-s.bottom-s.top):Ue(l,o,e.top+c.placed,u,d),c.start=o,c.placed+=d,o=l.right}}e.x=o,e.y=r}T.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var q={addBox(i,e){i.boxes||(i.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},i.boxes.push(e)},removeBox(i,e){const t=i.boxes?i.boxes.indexOf(e):-1;-1!==t&&i.boxes.splice(t,1)},configure(i,e,t){e.fullSize=t.fullSize,e.position=t.position,e.weight=t.weight},update(i,e,t,n){if(!i)return;const s=K(i.options.layout.padding),o=Math.max(e-s.width,0),r=Math.max(t-s.height,0),a=function tf(i){const e=function Zu(i){const e=[];let t,n,s,o,r,a;for(t=0,n=(i||[]).length;t<n;++t)s=i[t],({position:o,options:{stack:r,stackWeight:a=1}}=s),e.push({index:t,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:r&&o+r,stackWeight:a});return e}(i),t=ge(e.filter(c=>c.box.fullSize),!0),n=ge(fe(e,"left"),!0),s=ge(fe(e,"right")),o=ge(fe(e,"top"),!0),r=ge(fe(e,"bottom")),a=oo(e,"x"),l=oo(e,"y");return{fullSize:t,leftAndTop:n.concat(o),rightAndBottom:s.concat(l).concat(r).concat(a),chartArea:fe(e,"chartArea"),vertical:n.concat(s).concat(l),horizontal:o.concat(r).concat(a)}}(i.boxes),l=a.vertical,c=a.horizontal;I(i.boxes,p=>{"function"==typeof p.beforeLayout&&p.beforeLayout()});const h=l.reduce((p,m)=>m.box.options&&!1===m.box.options.display?p:p+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:t,padding:s,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/h,hBoxMaxHeight:r/2}),u=Object.assign({},s);ao(u,K(n));const f=Object.assign({maxPadding:u,w:o,h:r,x:s.left,y:s.top},s),g=function Qu(i,e){const t=function Ju(i){const e={};for(const t of i){const{stack:n,pos:s,stackWeight:o}=t;if(!n||!so.includes(s))continue;const r=e[n]||(e[n]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=o}return e}(i),{vBoxMaxWidth:n,hBoxMaxHeight:s}=e;let o,r,a;for(o=0,r=i.length;o<r;++o){a=i[o];const{fullSize:l}=a.box,c=t[a.stack],h=c&&a.stackWeight/c.weight;a.horizontal?(a.width=h?h*n:l&&e.availableWidth,a.height=s):(a.width=n,a.height=h?h*s:l&&e.availableHeight)}return t}(l.concat(c),d);pe(a.fullSize,f,d,g),pe(l,f,d,g),pe(c,f,d,g)&&pe(l,f,d,g),function nf(i){const e=i.maxPadding;function t(n){const s=Math.max(e[n]-i[n],0);return i[n]+=s,s}i.y+=t("top"),i.x+=t("left"),t("right"),t("bottom")}(f),lo(a.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,lo(a.rightAndBottom,f,d,g),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},I(a.chartArea,p=>{const m=p.box;Object.assign(m,i.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class co{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,n){}removeEventListener(e,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,n,s){return t=Math.max(0,t||e.width),n=n||e.height,{width:t,height:Math.max(0,s?Math.floor(t/s):n)}}isAttached(e){return!0}updateConfig(e){}}class of extends co{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Xe="$chartjs",rf={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ho=i=>null===i||""===i,uo=!!Rd&&{passive:!0};function cf(i,e,t){i.canvas.removeEventListener(e,t,uo)}function Ge(i,e){for(const t of i)if(t===e||t.contains(e))return!0}function df(i,e,t){const n=i.canvas,s=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Ge(a.addedNodes,n),r=r&&!Ge(a.removedNodes,n);r&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function uf(i,e,t){const n=i.canvas,s=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Ge(a.removedNodes,n),r=r&&!Ge(a.addedNodes,n);r&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}const me=new Map;let fo=0;function go(){const i=window.devicePixelRatio;i!==fo&&(fo=i,me.forEach((e,t)=>{t.currentDevicePixelRatio!==i&&e()}))}function pf(i,e,t){const n=i.canvas,s=n&&Fi(n);if(!s)return;const o=es((a,l)=>{const c=s.clientWidth;t(a,l),c<s.clientWidth&&t()},window),r=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,h=l.contentRect.height;0===c&&0===h||o(c,h)});return r.observe(s),function ff(i,e){me.size||window.addEventListener("resize",go),me.set(i,e)}(i,o),r}function Wi(i,e,t){t&&t.disconnect(),"resize"===e&&function gf(i){me.delete(i),me.size||window.removeEventListener("resize",go)}(i)}function mf(i,e,t){const n=i.canvas,s=es(o=>{null!==i.ctx&&t(function hf(i,e){const t=rf[i.type]||i.type,{x:n,y:s}=At(i,e);return{type:t,chart:e,native:i,x:void 0!==n?n:null,y:void 0!==s?s:null}}(o,i))},i,o=>{const r=o[0];return[r,r.offsetX,r.offsetY]});return function lf(i,e,t){i.addEventListener(e,t,uo)}(n,e,s),s}class bf extends co{acquireContext(e,t){const n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(function af(i,e){const t=i.style,n=i.getAttribute("height"),s=i.getAttribute("width");if(i[Xe]={initial:{height:n,width:s,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",ho(s)){const o=As(i,"width");void 0!==o&&(i.width=o)}if(ho(n))if(""===i.style.height)i.height=i.width/(e||2);else{const o=As(i,"height");void 0!==o&&(i.height=o)}}(e,t),n):null}releaseContext(e){const t=e.canvas;if(!t[Xe])return!1;const n=t[Xe].initial;["height","width"].forEach(o=>{const r=n[o];E(r)?t.removeAttribute(o):t.setAttribute(o,r)});const s=n.style||{};return Object.keys(s).forEach(o=>{t.style[o]=s[o]}),t.width=t.width,delete t[Xe],!0}addEventListener(e,t,n){this.removeEventListener(e,t),(e.$proxies||(e.$proxies={}))[t]=({attach:df,detach:uf,resize:pf}[t]||mf)(e,t,n)}removeEventListener(e,t){const n=e.$proxies||(e.$proxies={}),s=n[t];s&&(({attach:Wi,detach:Wi,resize:Wi}[t]||cf)(e,t,s),n[t]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,n,s){return function Ed(i,e,t,n){const s=He(i),o=Ot(s,"margin"),r=Ve(s.maxWidth,i,"clientWidth")||De,a=Ve(s.maxHeight,i,"clientHeight")||De,l=function Ld(i,e,t){let n,s;if(void 0===e||void 0===t){const o=Fi(i);if(o){const r=o.getBoundingClientRect(),a=He(o),l=Ot(a,"border","width"),c=Ot(a,"padding");e=r.width-c.width-l.width,t=r.height-c.height-l.height,n=Ve(a.maxWidth,o,"clientWidth"),s=Ve(a.maxHeight,o,"clientHeight")}else e=i.clientWidth,t=i.clientHeight}return{width:e,height:t,maxWidth:n||De,maxHeight:s||De}}(i,e,t);let{width:c,height:h}=l;if("content-box"===s.boxSizing){const d=Ot(s,"border","width"),u=Ot(s,"padding");c-=u.width+d.width,h-=u.height+d.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?Math.floor(c/n):h-o.height),c=zi(Math.min(c,r,l.maxWidth)),h=zi(Math.min(h,a,l.maxHeight)),c&&!h&&(h=zi(c/2)),{width:c,height:h}}(e,t,n,s)}isAttached(e){const t=Fi(e);return!(!t||!t.isConnected)}}class xf{constructor(){this._init=[]}notify(e,t,n,s){"beforeInit"===t&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const o=s?this._descriptors(e).filter(s):this._descriptors(e),r=this._notify(o,e,t,n);return"afterDestroy"===t&&(this._notify(o,e,"stop"),this._notify(this._init,e,"uninstall")),r}_notify(e,t,n,s){s=s||{};for(const o of e){const r=o.plugin;if(!1===B(r[n],[t,s,o.options],r)&&s.cancelable)return!1}return!0}invalidate(){E(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const n=e&&e.config,s=C(n.options&&n.options.plugins,{}),o=function yf(i){const e={},t=[],n=Object.keys(lt.plugins.items);for(let o=0;o<n.length;o++)t.push(lt.getPlugin(n[o]));const s=i.plugins||[];for(let o=0;o<s.length;o++){const r=s[o];-1===t.indexOf(r)&&(t.push(r),e[r.id]=!0)}return{plugins:t,localIds:e}}(n);return!1!==s||t?function wf(i,{plugins:e,localIds:t},n,s){const o=[],r=i.getContext();for(const a of e){const l=a.id,c=vf(n[l],s);null!==c&&o.push({plugin:a,options:Mf(i.config,{plugin:a,local:t[l]},c,r)})}return o}(e,o,s,t):[]}_notifyStateChanges(e){const t=this._oldCache||[],n=this._cache,s=(o,r)=>o.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(s(t,n),e,"stop"),this._notify(s(n,t),e,"start")}}function vf(i,e){return e||!1!==i?!0===i?{}:i:null}function Mf(i,{plugin:e,local:t},n,s){const o=i.pluginScopeKeys(e),r=i.getOptionScopes(n,o);return t&&e.defaults&&r.push(e.defaults),i.createResolver(r,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function $i(i,e){return((e.datasets||{})[i]||{}).indexAxis||e.indexAxis||(T.datasets[i]||{}).indexAxis||"x"}function Yi(i,e){return"x"===i||"y"===i?i:e.axis||function Pf(i){return"top"===i||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0}(e.position)||i.charAt(0).toLowerCase()}function po(i){const e=i.options||(i.options={});e.plugins=C(e.plugins,{}),e.scales=function Cf(i,e){const t=St[i.type]||{scales:{}},n=e.scales||{},s=$i(i.type,e),o=Object.create(null),r=Object.create(null);return Object.keys(n).forEach(a=>{const l=n[a];if(!A(l))return console.error(`Invalid scale configuration for scale: ${a}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const c=Yi(a,l),h=function kf(i,e){return i===e?"_index_":"_value_"}(c,s),d=t.scales||{};o[c]=o[c]||a,r[a]=Jt(Object.create(null),[{axis:c},l,d[c],d[h]])}),i.data.datasets.forEach(a=>{const l=a.type||i.type,c=a.indexAxis||$i(l,e),d=(St[l]||{}).scales||{};Object.keys(d).forEach(u=>{const f=function Sf(i,e){let t=i;return"_index_"===i?t=e:"_value_"===i&&(t="x"===e?"y":"x"),t}(u,c),g=a[f+"AxisID"]||o[f]||f;r[g]=r[g]||Object.create(null),Jt(r[g],[{axis:f},n[g],d[u]])})}),Object.keys(r).forEach(a=>{const l=r[a];Jt(l,[T.scales[l.type],T.scale])}),r}(i,e)}function mo(i){return(i=i||{}).datasets=i.datasets||[],i.labels=i.labels||[],i}const bo=new Map,_o=new Set;function Ke(i,e){let t=bo.get(i);return t||(t=e(),bo.set(i,t),_o.add(t)),t}const be=(i,e,t)=>{const n=mt(e,t);void 0!==n&&i.add(n)};class Af{constructor(e){this._config=function Of(i){return(i=i||{}).data=mo(i.data),po(i),i}(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=mo(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(),po(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Ke(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return Ke(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return Ke(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id;return Ke(`${this.type}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){const n=this._scopeCache;let s=n.get(e);return(!s||t)&&(s=new Map,n.set(e,s)),s}getOptionScopes(e,t,n){const{options:s,type:o}=this,r=this._cachedScopes(e,n),a=r.get(t);if(a)return a;const l=new Set;t.forEach(h=>{e&&(l.add(e),h.forEach(d=>be(l,e,d))),h.forEach(d=>be(l,s,d)),h.forEach(d=>be(l,St[o]||{},d)),h.forEach(d=>be(l,T,d)),h.forEach(d=>be(l,Ai,d))});const c=Array.from(l);return 0===c.length&&c.push(Object.create(null)),_o.has(t)&&r.set(t,c),c}chartOptionScopes(){const{options:e,type:t}=this;return[e,St[t]||{},T.datasets[t]||{},{type:t},T,Ai]}resolveNamedOptions(e,t,n,s=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=xo(this._resolverCache,e,s);let l=r;(function Df(i,e){const{isScriptable:t,isIndexable:n}=xs(i);for(const s of e){const o=t(s),r=n(s),a=(r||o)&&i[s];if(o&&(bt(a)||Tf(a))||r&&z(a))return!0}return!1})(r,t)&&(o.$shared=!1,l=Vt(r,n=bt(n)?n():n,this.createResolver(e,n,a)));for(const c of t)o[c]=l[c];return o}createResolver(e,t,n=[""],s){const{resolver:o}=xo(this._resolverCache,e,n);return A(t)?Vt(o,t,void 0,s):o}}function xo(i,e,t){let n=i.get(e);n||(n=new Map,i.set(e,n));const s=t.join();let o=n.get(s);return o||(o={resolver:Ei(e,t),subPrefixes:t.filter(a=>!a.toLowerCase().includes("hover"))},n.set(s,o)),o}const Tf=i=>A(i)&&Object.getOwnPropertyNames(i).reduce((e,t)=>e||bt(i[t]),!1),Ef=["top","bottom","left","right","chartArea"];function yo(i,e){return"top"===i||"bottom"===i||-1===Ef.indexOf(i)&&"x"===e}function vo(i,e){return function(t,n){return t[i]===n[i]?t[e]-n[e]:t[i]-n[i]}}function wo(i){const e=i.chart,t=e.options.animation;e.notifyPlugins("afterRender"),B(t&&t.onComplete,[i],e)}function Rf(i){const e=i.chart,t=e.options.animation;B(t&&t.onProgress,[i],e)}function Mo(i){return Cs()&&"string"==typeof i?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const qe={},So=i=>{const e=Mo(i);return Object.values(qe).filter(t=>t.canvas===e).pop()};function If(i,e,t){const n=Object.keys(i);for(const s of n){const o=+s;if(o>=e){const r=i[s];delete i[s],(t>0||o>e)&&(i[o+t]=r)}}}class Ze{constructor(e,t){const n=this.config=new Af(t),s=Mo(e),o=So(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||function _f(i){return!Cs()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?of:bf}(s)),this.platform.updateConfig(n);const a=this.platform.acquireContext(s,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,h=l&&l.width;this.id=gh(),this.ctx=a,this.canvas=l,this.width=h,this.height=c,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new xf,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function Th(i,e){let t;return function(...n){return e?(clearTimeout(t),t=setTimeout(i,e,n)):i.apply(this,n),e}}(d=>this.update(d),r.resizeDelay||0),this._dataChanges=[],qe[this.id]=this,a&&l?(gt.listen(this,"complete",wo),gt.listen(this,"progress",Rf),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:n,height:s,_aspectRatio:o}=this;return E(e)?t&&o?o:s?n/s: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():Os(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ms(this.canvas,this.ctx),this}stop(){return gt.stop(this),this}resize(e,t){gt.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const n=this.options,r=this.platform.getMaximumSize(this.canvas,e,t,n.maintainAspectRatio&&this.aspectRatio),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,Os(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),B(n.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){I(this.options.scales||{},(n,s)=>{n.id=s})}buildOrUpdateScales(){const e=this.options,t=e.scales,n=this.scales,s=Object.keys(n).reduce((r,a)=>(r[a]=!1,r),{});let o=[];t&&(o=o.concat(Object.keys(t).map(r=>{const a=t[r],l=Yi(r,a),c="r"===l,h="x"===l;return{options:a,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),I(o,r=>{const a=r.options,l=a.id,c=Yi(l,a),h=C(a.type,r.dtype);(void 0===a.position||yo(a.position,c)!==yo(r.dposition))&&(a.position=r.dposition),s[l]=!0;let d=null;l in n&&n[l].type===h?d=n[l]:(d=new(lt.getScale(h))({id:l,type:h,ctx:this.ctx,chart:this}),n[d.id]=d),d.init(a,e)}),I(s,(r,a)=>{r||delete n[a]}),I(n,r=>{q.configure(this,r,r.options),q.addBox(this,r)})}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,n=e.length;if(e.sort((s,o)=>s.index-o.index),n>t){for(let s=t;s<n;++s)this._destroyDatasetMeta(s);e.splice(t,n-t)}this._sortedMetasets=e.slice(0).sort(vo("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:t}}=this;e.length>t.length&&delete this._stacks,e.forEach((n,s)=>{0===t.filter(o=>o===n._dataset).length&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let n,s;for(this._removeUnreferencedMetasets(),n=0,s=t.length;n<s;n++){const o=t[n];let r=this.getDatasetMeta(n);const a=o.type||this.config.type;if(r.type&&r.type!==a&&(this._destroyDatasetMeta(n),r=this.getDatasetMeta(n)),r.type=a,r.indexAxis=o.indexAxis||$i(a,this.options),r.order=o.order||0,r.index=n,r.label=""+o.label,r.visible=this.isDatasetVisible(n),r.controller)r.controller.updateIndex(n),r.controller.linkScales();else{const l=lt.getController(a),{datasetElementType:c,dataElementType:h}=T.datasets[a];Object.assign(l.prototype,{dataElementType:lt.getElement(h),datasetElementType:c&<.getElement(c)}),r.controller=new l(this,n),e.push(r.controller)}}return this._updateMetasets(),e}_resetElements(){I(this.data.datasets,(e,t)=>{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const n=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0}))return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,h=this.data.datasets.length;c<h;c++){const{controller:d}=this.getDatasetMeta(c),u=!s&&-1===o.indexOf(d);d.buildOrUpdateElements(u),r=Math.max(+d.getMaxOverflow(),r)}r=this._minPadding=n.layout.autoPadding?r:0,this._updateLayout(r),s||I(o,c=>{c.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(vo("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){I(this.scales,e=>{q.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),n=new Set(e.events);(!Yn(t,n)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:n,start:s,count:o}of t)If(e,s,"_removeElements"===n?-o:o)}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,n=o=>new Set(e.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),s=n(0);for(let o=1;o<t;o++)if(!Yn(s,n(o)))return;return Array.from(s).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(e){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;q.update(this,this.width,this.height,e);const t=this.chartArea,n=t.width<=0||t.height<=0;this._layers=[],I(this.boxes,s=>{n&&"chartArea"===s.position||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,o)=>{s._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})){for(let t=0,n=this.data.datasets.length;t<n;++t)this.getDatasetMeta(t).controller.configure();for(let t=0,n=this.data.datasets.length;t<n;++t)this._updateDataset(t,bt(e)?e({datasetIndex:t}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,t){const n=this.getDatasetMeta(e),s={meta:n,index:e,mode:t,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",s)&&(n.controller._update(t),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(gt.has(this)?this.attached&&!gt.running(this)&>.start(this):(this.draw(),wo({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:n,height:s}=this._resizeBeforeDraw;this._resize(n,s),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const t=this._sortedMetasets,n=[];let s,o;for(s=0,o=t.length;s<o;++s){const r=t[s];(!e||r.visible)&&n.push(r)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,n=e._clip,s=!n.disabled,o=this.chartArea,r={meta:e,index:e.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",r)&&(s&&Be(t,{left:!1===n.left?0:o.left-n.left,right:!1===n.right?this.width:o.right+n.right,top:!1===n.top?0:o.top-n.top,bottom:!1===n.bottom?this.height:o.bottom+n.bottom}),e.controller.draw(),s&&je(t),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(e){return re(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,n,s){const o=qu.modes[t];return"function"==typeof o?o(this,e,n,s):[]}getDatasetMeta(e){const t=this.data.datasets[e],n=this._metasets;let s=n.filter(o=>o&&o._dataset===t).pop();return s||(s={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},n.push(s)),s}getContext(){return this.$context||(this.$context=yt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const n=this.getDatasetMeta(e);return"boolean"==typeof n.hidden?!n.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,n){const s=n?"show":"hide",o=this.getDatasetMeta(e),r=o.controller._resolveAnimations(void 0,s);et(t)?(o.data[t].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),r.update(o,{visible:n}),this.update(a=>a.datasetIndex===e?s: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(),gt.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),ms(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete qe[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,t=this.platform,n=(o,r)=>{t.addEventListener(this,o,r),e[o]=r},s=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};I(this.options.events,o=>n(o,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,n=(l,c)=>{t.addEventListener(this,l,c),e[l]=c},s=(l,c)=>{e[l]&&(t.removeEventListener(this,l,c),delete e[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const a=()=>{s("attach",a),this.attached=!0,this.resize(),n("resize",o),n("detach",r)};r=()=>{this.attached=!1,s("resize",o),this._stop(),this._resize(0,0),n("attach",a)},t.isAttached(this.canvas)?a():r()}unbindEvents(){I(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},I(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,n){const s=n?"set":"remove";let o,r,a,l;for("dataset"===t&&(o=this.getDatasetMeta(e[0].datasetIndex),o.controller["_"+s+"DatasetHoverStyle"]()),a=0,l=e.length;a<l;++a){r=e[a];const c=r&&this.getDatasetMeta(r.datasetIndex).controller;c&&c[s+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const t=this._active||[],n=e.map(({datasetIndex:o,index:r})=>{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!Ae(n,t)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,t))}notifyPlugins(e,t,n){return this._plugins.notify(this,e,t,n)}_updateHoverStyles(e,t,n){const s=this.options.hover,o=(l,c)=>l.filter(h=>!c.some(d=>h.datasetIndex===d.datasetIndex&&h.index===d.index)),r=o(t,e),a=n?e:o(e,t);r.length&&this.updateHoverStyle(r,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(e,t){const n={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},s=r=>(r.options.events||this.options.events).includes(e.native.type);if(!1===this.notifyPlugins("beforeEvent",n,s))return;const o=this._handleEvent(e,t,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,s),(o||n.changed)&&this.render(),this}_handleEvent(e,t,n){const{_active:s=[],options:o}=this,a=this._getActiveElements(e,s,n,t),l=function yh(i){return"mouseup"===i.type||"click"===i.type||"contextmenu"===i.type}(e),c=function Ff(i,e,t,n){return t&&"mouseout"!==i.type?n?e:i:null}(e,this._lastEvent,n,l);n&&(this._lastEvent=null,B(o.onHover,[e,a,this],this),l&&B(o.onClick,[e,a,this],this));const h=!Ae(a,s);return(h||t)&&(this._active=a,this._updateHoverStyles(a,s,t)),this._lastEvent=c,h}_getActiveElements(e,t,n,s){if("mouseout"===e.type)return[];if(!n)return t;const o=this.options.hover;return this.getElementsAtEventForMode(e,o.mode,o,s)}}const ko=()=>I(Ze.instances,i=>i._plugins.invalidate()),vt=!0;function Po(i,e,t){const{startAngle:n,pixelMargin:s,x:o,y:r,outerRadius:a,innerRadius:l}=e;let c=s/a;i.beginPath(),i.arc(o,r,a,n-c,t+c),l>s?(c=s/l,i.arc(o,r,l,t+c,n-c,!0)):i.arc(o,r,s,t+V,n-V),i.closePath(),i.clip()}function $t(i,e,t,n){return{x:t+i*Math.cos(e),y:n+i*Math.sin(e)}}function Ui(i,e,t,n,s,o){const{x:r,y:a,startAngle:l,pixelMargin:c,innerRadius:h}=e,d=Math.max(e.outerRadius+n+t-c,0),u=h>0?h+n+t+c:0;let f=0;const g=s-l;if(n){const W=((h>0?h-n:0)+(d>0?d-n:0))/2;f=(g-(0!==W?g*W/(W+n):g))/2}const m=(g-Math.max(.001,g*d-t/N)/d)/2,b=l+m+f,_=s-m-f,{outerStart:v,outerEnd:y,innerStart:x,innerEnd:w}=function Bf(i,e,t,n){const s=function zf(i){return Li(i,["outerStart","outerEnd","innerStart","innerEnd"])}(i.options.borderRadius),o=(t-e)/2,r=Math.min(o,n*e/2),a=l=>{const c=(t-Math.min(o,l))*n/2;return X(l,0,Math.min(o,c))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:X(s.innerStart,0,r),innerEnd:X(s.innerEnd,0,r)}}(e,u,d,_-b),M=d-v,S=d-y,k=b+v/M,L=_-y/S,R=u+x,D=u+w,$=b+x/R,Z=_-w/D;if(i.beginPath(),o){if(i.arc(r,a,d,k,L),y>0){const W=$t(S,L,r,a);i.arc(W.x,W.y,y,L,_+V)}const P=$t(D,_,r,a);if(i.lineTo(P.x,P.y),w>0){const W=$t(D,Z,r,a);i.arc(W.x,W.y,w,_+V,Z+Math.PI)}if(i.arc(r,a,u,_-w/u,b+x/u,!0),x>0){const W=$t(R,$,r,a);i.arc(W.x,W.y,x,$+Math.PI,b-V)}const Y=$t(M,b,r,a);if(i.lineTo(Y.x,Y.y),v>0){const W=$t(M,k,r,a);i.arc(W.x,W.y,v,b-V,k)}}else{i.moveTo(r,a);const P=Math.cos(k)*d+r,Y=Math.sin(k)*d+a;i.lineTo(P,Y);const W=Math.cos(L)*d+r,Et=Math.sin(L)*d+a;i.lineTo(W,Et)}i.closePath()}Object.defineProperties(Ze,{defaults:{enumerable:vt,value:T},instances:{enumerable:vt,value:qe},overrides:{enumerable:vt,value:St},registry:{enumerable:vt,value:lt},version:{enumerable:vt,value:"3.9.1"},getChart:{enumerable:vt,value:So},register:{enumerable:vt,value:(...i)=>{lt.add(...i),ko()}},unregister:{enumerable:vt,value:(...i)=>{lt.remove(...i),ko()}}});class Je extends ot{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,n){const s=this.getProps(["x","y"],n),{angle:o,distance:r}=qn(s,{x:e,y:t}),{startAngle:a,endAngle:l,innerRadius:c,outerRadius:h,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),u=this.options.spacing/2,g=C(d,l-a)>=F||ee(o,a,l),p=dt(r,c+u,h+u);return g&&p}getCenterPoint(e){const{x:t,y:n,startAngle:s,endAngle:o,innerRadius:r,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),{offset:l,spacing:c}=this.options,h=(s+o)/2,d=(r+a+c+l)/2;return{x:t+Math.cos(h)*d,y:n+Math.sin(h)*d}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:n}=this,s=(t.offset||0)/2,o=(t.spacing||0)/2,r=t.circular;if(this.pixelMargin="inner"===t.borderAlign?.33:0,this.fullCircles=n>F?Math.floor(n/F):0,0===n||this.innerRadius<0||this.outerRadius<0)return;e.save();let a=0;if(s){a=s/2;const c=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(c)*a,Math.sin(c)*a),this.circumference>=N&&(a=s)}e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor;const l=function jf(i,e,t,n,s){const{fullCircles:o,startAngle:r,circumference:a}=e;let l=e.endAngle;if(o){Ui(i,e,t,n,r+F,s);for(let c=0;c<o;++c)i.fill();isNaN(a)||(l=r+a%F,a%F==0&&(l+=F))}return Ui(i,e,t,n,l,s),i.fill(),l}(e,this,a,o,r);(function Vf(i,e,t,n,s,o){const{options:r}=e,{borderWidth:a,borderJoinStyle:l}=r,c="inner"===r.borderAlign;a&&(c?(i.lineWidth=2*a,i.lineJoin=l||"round"):(i.lineWidth=a,i.lineJoin=l||"bevel"),e.fullCircles&&function Nf(i,e,t){const{x:n,y:s,startAngle:o,pixelMargin:r,fullCircles:a}=e,l=Math.max(e.outerRadius-r,0),c=e.innerRadius+r;let h;for(t&&Po(i,e,o+F),i.beginPath(),i.arc(n,s,c,o+F,o,!0),h=0;h<a;++h)i.stroke();for(i.beginPath(),i.arc(n,s,l,o,o+F),h=0;h<a;++h)i.stroke()}(i,e,c),c&&Po(i,e,s),Ui(i,e,t,n,s,o),i.stroke())})(e,this,a,o,l,r),e.restore()}}function Co(i,e,t=e){i.lineCap=C(t.borderCapStyle,e.borderCapStyle),i.setLineDash(C(t.borderDash,e.borderDash)),i.lineDashOffset=C(t.borderDashOffset,e.borderDashOffset),i.lineJoin=C(t.borderJoinStyle,e.borderJoinStyle),i.lineWidth=C(t.borderWidth,e.borderWidth),i.strokeStyle=C(t.borderColor,e.borderColor)}function Hf(i,e,t){i.lineTo(t.x,t.y)}function Oo(i,e,t={}){const n=i.length,{start:s=0,end:o=n-1}=t,{start:r,end:a}=e,l=Math.max(s,r),c=Math.min(o,a);return{count:n,start:l,loop:e.loop,ilen:c<l&&!(s<r&&o<r||s>a&&o>a)?n+c-l:c-l}}function $f(i,e,t,n){const{points:s,options:o}=e,{count:r,start:a,loop:l,ilen:c}=Oo(s,t,n),h=function Wf(i){return i.stepped?nd:i.tension||"monotone"===i.cubicInterpolationMode?sd:Hf}(o);let f,g,p,{move:d=!0,reverse:u}=n||{};for(f=0;f<=c;++f)g=s[(a+(u?c-f:f))%r],!g.skip&&(d?(i.moveTo(g.x,g.y),d=!1):h(i,p,g,u,o.stepped),p=g);return l&&(g=s[(a+(u?c:0))%r],h(i,p,g,u,o.stepped)),!!l}function Yf(i,e,t,n){const s=e.points,{count:o,start:r,ilen:a}=Oo(s,t,n),{move:l=!0,reverse:c}=n||{};let u,f,g,p,m,b,h=0,d=0;const _=y=>(r+(c?a-y:y))%o,v=()=>{p!==m&&(i.lineTo(h,m),i.lineTo(h,p),i.lineTo(h,b))};for(l&&(f=s[_(0)],i.moveTo(f.x,f.y)),u=0;u<=a;++u){if(f=s[_(u)],f.skip)continue;const y=f.x,x=f.y,w=0|y;w===g?(x<p?p=x:x>m&&(m=x),h=(d*h+y)/++d):(v(),i.lineTo(y,x),g=w,d=0,p=m=x),b=x}v()}function Xi(i){const e=i.options;return i._decimated||i._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||e.borderDash&&e.borderDash.length?$f:Yf}Je.id="arc",Je.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0},Je.defaultRoutes={backgroundColor:"backgroundColor"};const Kf="function"==typeof Path2D;let Qe=(()=>{class i extends ot{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const s=this.options;!s.tension&&"monotone"!==s.cubicInterpolationMode||s.stepped||this._pointsUpdated||(Cd(this._points,s,t,s.spanGaps?this._loop:this._fullLoop,n),this._pointsUpdated=!0)}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function Wd(i,e){const t=i.points,n=i.options.spanGaps,s=t.length;if(!s)return[];const o=!!i._loop,{start:r,end:a}=function Vd(i,e,t,n){let s=0,o=e-1;if(t&&!n)for(;s<e&&!i[s].skip;)s++;for(;s<e&&i[s].skip;)s++;for(s%=e,t&&(o+=s);o>s&&i[o%e].skip;)o--;return o%=e,{start:s,end:o}}(t,s,o,n);return function zs(i,e,t,n){return n&&n.setContext&&t?function $d(i,e,t,n){const s=i._chart.getContext(),o=Bs(i.options),{_datasetIndex:r,options:{spanGaps:a}}=i,l=t.length,c=[];let h=o,d=e[0].start,u=d;function f(g,p,m,b){const _=a?-1:1;if(g!==p){for(g+=l;t[g%l].skip;)g-=_;for(;t[p%l].skip;)p+=_;g%l!=p%l&&(c.push({start:g%l,end:p%l,loop:m,style:b}),h=b,d=p%l)}}for(const g of e){d=a?d:g.start;let m,p=t[d%l];for(u=d+1;u<=g.end;u++){const b=t[u%l];m=Bs(n.setContext(yt(s,{type:"segment",p0:p,p1:b,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:r}))),Yd(m,h)&&f(d,u-1,g.loop,h),p=b,h=m}d<u-1&&f(d,u-1,g.loop,h)}return c}(i,e,t,n):e}(i,!0===n?[{start:r,end:a,loop:o}]:function Hd(i,e,t,n){const s=i.length,o=[];let l,r=e,a=i[e];for(l=e+1;l<=t;++l){const c=i[l%s];c.skip||c.stop?a.skip||(o.push({start:e%s,end:(l-1)%s,loop:n=!1}),e=r=c.stop?l:null):(r=l,a.skip&&(e=l)),a=c}return null!==r&&o.push({start:e%s,end:r%s,loop:n}),o}(t,r,a<r?a+s:a,!!i._fullLoop&&0===r&&a===s-1),t,e)}(this,this.options.segment))}first(){const t=this.segments;return t.length&&this.points[t[0].start]}last(){const t=this.segments,s=t.length;return s&&this.points[t[s-1].end]}interpolate(t,n){const s=this.options,o=t[n],r=this.points,a=Fs(this,{property:n,start:o,end:o});if(!a.length)return;const l=[],c=function Uf(i){return i.stepped?Id:i.tension||"monotone"===i.cubicInterpolationMode?Fd:Tt}(s);let h,d;for(h=0,d=a.length;h<d;++h){const{start:u,end:f}=a[h],g=r[u],p=r[f];if(g===p){l.push(g);continue}const b=c(g,p,Math.abs((o-g[n])/(p[n]-g[n])),s.stepped);b[n]=t[n],l.push(b)}return 1===l.length?l[0]:l}pathSegment(t,n,s){return Xi(this)(t,this,n,s)}path(t,n,s){const o=this.segments,r=Xi(this);let a=this._loop;n=n||0,s=s||this.points.length-n;for(const l of o)a&=r(t,this,l,{start:n,end:n+s-1});return!!a}draw(t,n,s,o){(this.points||[]).length&&(this.options||{}).borderWidth&&(t.save(),function qf(i,e,t,n){Kf&&!e.options.segment?function Xf(i,e,t,n){let s=e._path;s||(s=e._path=new Path2D,e.path(s,t,n)&&s.closePath()),Co(i,e.options),i.stroke(s)}(i,e,t,n):function Gf(i,e,t,n){const{segments:s,options:o}=e,r=Xi(e);for(const a of s)Co(i,o,a.style),i.beginPath(),r(i,e,a,{start:t,end:t+n-1})&&i.closePath(),i.stroke()}(i,e,t,n)}(t,this,s,o),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}return i.id="line",i.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},i.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},i.descriptors={_scriptable:!0,_indexable:e=>"borderDash"!==e&&"fill"!==e},i})();function Ao(i,e,t,n){const s=i.options,{[t]:o}=i.getProps([t],n);return Math.abs(e-o)<s.radius+s.hitRadius}let Zf=(()=>{class i extends ot{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,n,s){const o=this.options,{x:r,y:a}=this.getProps(["x","y"],s);return Math.pow(t-r,2)+Math.pow(n-a,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(t,n){return Ao(this,t,"x",n)}inYRange(t,n){return Ao(this,t,"y",n)}getCenterPoint(t){const{x:n,y:s}=this.getProps(["x","y"],t);return{x:n,y:s}}size(t){let n=(t=t||this.options||{}).radius||0;return n=Math.max(n,n&&t.hoverRadius||0),2*(n+(n&&t.borderWidth||0))}draw(t,n){const s=this.options;this.skip||s.radius<.1||!re(this,n,this.size(s)/2)||(t.strokeStyle=s.borderColor,t.lineWidth=s.borderWidth,t.fillStyle=s.backgroundColor,Di(t,s,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}return i.id="point",i.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},i.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},i})();function To(i,e){const{x:t,y:n,base:s,width:o,height:r}=i.getProps(["x","y","base","width","height"],e);let a,l,c,h,d;return i.horizontal?(d=r/2,a=Math.min(t,s),l=Math.max(t,s),c=n-d,h=n+d):(d=o/2,a=t-d,l=t+d,c=Math.min(n,s),h=Math.max(n,s)),{left:a,top:c,right:l,bottom:h}}function wt(i,e,t,n){return i?0:X(e,t,n)}function Gi(i,e,t,n){const s=null===e,o=null===t,a=i&&!(s&&o)&&To(i,n);return a&&(s||dt(e,a.left,a.right))&&(o||dt(t,a.top,a.bottom))}function ig(i,e){i.rect(e.x,e.y,e.w,e.h)}function Ki(i,e,t={}){const n=i.x!==t.x?-e:0,s=i.y!==t.y?-e:0;return{x:i.x+n,y:i.y+s,w:i.w+((i.x+i.w!==t.x+t.w?e:0)-n),h:i.h+((i.y+i.h!==t.y+t.h?e:0)-s),radius:i.radius}}class ti extends ot{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:t,options:{borderColor:n,backgroundColor:s}}=this,{inner:o,outer:r}=function tg(i){const e=To(i),t=e.right-e.left,n=e.bottom-e.top,s=function Jf(i,e,t){const s=i.borderSkipped,o=_s(i.options.borderWidth);return{t:wt(s.top,o.top,0,t),r:wt(s.right,o.right,0,e),b:wt(s.bottom,o.bottom,0,t),l:wt(s.left,o.left,0,e)}}(i,t/2,n/2),o=function Qf(i,e,t){const{enableBorderRadius:n}=i.getProps(["enableBorderRadius"]),s=i.options.borderRadius,o=Ct(s),r=Math.min(e,t),a=i.borderSkipped,l=n||A(s);return{topLeft:wt(!l||a.top||a.left,o.topLeft,0,r),topRight:wt(!l||a.top||a.right,o.topRight,0,r),bottomLeft:wt(!l||a.bottom||a.left,o.bottomLeft,0,r),bottomRight:wt(!l||a.bottom||a.right,o.bottomRight,0,r)}}(i,t/2,n/2);return{outer:{x:e.left,y:e.top,w:t,h:n,radius:o},inner:{x:e.left+s.l,y:e.top+s.t,w:t-s.l-s.r,h:n-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}(this),a=function eg(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}(r.radius)?ae:ig;e.save(),(r.w!==o.w||r.h!==o.h)&&(e.beginPath(),a(e,Ki(r,t,o)),e.clip(),a(e,Ki(o,-t,r)),e.fillStyle=n,e.fill("evenodd")),e.beginPath(),a(e,Ki(o,t)),e.fillStyle=s,e.fill(),e.restore()}inRange(e,t,n){return Gi(this,e,t,n)}inXRange(e,t){return Gi(this,e,null,t)}inYRange(e,t){return Gi(this,null,e,t)}getCenterPoint(e){const{x:t,y:n,base:s,horizontal:o}=this.getProps(["x","y","base","horizontal"],e);return{x:o?(t+s)/2:t,y:o?n:(n+s)/2}}getRange(e){return"x"===e?this.width/2:this.height/2}}ti.id="bar",ti.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},ti.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var ng=Object.freeze({__proto__:null,ArcElement:Je,LineElement:Qe,PointElement:Zf,BarElement:ti});function Do(i){if(i._decimated){const e=i._data;delete i._decimated,delete i._data,Object.defineProperty(i,"data",{value:e})}}function Lo(i){i.data.datasets.forEach(e=>{Do(e)})}var ag={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,e,t)=>{if(!t.enabled)return void Lo(i);const n=i.width;i.data.datasets.forEach((s,o)=>{const{_data:r,indexAxis:a}=s,l=i.getDatasetMeta(o),c=r||s.data;if("y"===le([a,i.options.indexAxis])||!l.controller.supportsDecimation)return;const h=i.scales[l.xAxisID];if("linear"!==h.type&&"time"!==h.type||i.options.parsing)return;let g,{start:d,count:u}=function rg(i,e){const t=e.length;let s,n=0;const{iScale:o}=i,{min:r,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(n=X(ut(e,o.axis,r).lo,0,t-1)),s=c?X(ut(e,o.axis,a).hi+1,n,t)-n:t-n,{start:n,count:s}}(l,c);if(u<=(t.threshold||4*n))Do(s);else{switch(E(r)&&(s._data=c,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(p){this._data=p}})),t.algorithm){case"lttb":g=function sg(i,e,t,n,s){const o=s.samples||n;if(o>=t)return i.slice(e,e+t);const r=[],a=(t-2)/(o-2);let l=0;const c=e+t-1;let d,u,f,g,p,h=e;for(r[l++]=i[h],d=0;d<o-2;d++){let _,m=0,b=0;const v=Math.floor((d+1)*a)+1+e,y=Math.min(Math.floor((d+2)*a)+1,t)+e,x=y-v;for(_=v;_<y;_++)m+=i[_].x,b+=i[_].y;m/=x,b/=x;const w=Math.floor(d*a)+1+e,M=Math.min(Math.floor((d+1)*a)+1,t)+e,{x:S,y:k}=i[h];for(f=g=-1,_=w;_<M;_++)g=.5*Math.abs((S-m)*(i[_].y-k)-(S-i[_].x)*(b-k)),g>f&&(f=g,u=i[_],p=_);r[l++]=u,h=p}return r[l++]=i[c],r}(c,d,u,n,t);break;case"min-max":g=function og(i,e,t,n){let r,a,l,c,h,d,u,f,g,p,s=0,o=0;const m=[],_=i[e].x,y=i[e+t-1].x-_;for(r=e;r<e+t;++r){a=i[r],l=(a.x-_)/y*n,c=a.y;const x=0|l;if(x===h)c<g?(g=c,d=r):c>p&&(p=c,u=r),s=(o*s+a.x)/++o;else{const w=r-1;if(!E(d)&&!E(u)){const M=Math.min(d,u),S=Math.max(d,u);M!==f&&M!==w&&m.push({...i[M],x:s}),S!==f&&S!==w&&m.push({...i[S],x:s})}r>0&&w!==f&&m.push(i[w]),m.push(a),h=x,o=0,g=p=c,d=u=f=r}}return m}(c,d,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`)}s._decimated=g}})},destroy(i){Lo(i)}};function qi(i,e,t,n){if(n)return;let s=e[i],o=t[i];return"angle"===i&&(s=Q(s),o=Q(o)),{property:i,start:s,end:o}}function Zi(i,e,t){for(;e>i;e--){const n=t[e];if(!isNaN(n.x)&&!isNaN(n.y))break}return e}function Eo(i,e,t,n){return i&&e?n(i[t],e[t]):i?i[t]:e?e[t]:0}function Ro(i,e){let t=[],n=!1;return z(i)?(n=!0,t=i):t=function cg(i,e){const{x:t=null,y:n=null}=i||{},s=e.points,o=[];return e.segments.forEach(({start:r,end:a})=>{a=Zi(r,a,s);const l=s[r],c=s[a];null!==n?(o.push({x:l.x,y:n}),o.push({x:c.x,y:n})):null!==t&&(o.push({x:t,y:l.y}),o.push({x:t,y:c.y}))}),o}(i,e),t.length?new Qe({points:t,options:{tension:0},_loop:n,_fullLoop:n}):null}function Io(i){return i&&!1!==i.fill}function hg(i,e,t){let s=i[e].fill;const o=[e];let r;if(!t)return s;for(;!1!==s&&-1===o.indexOf(s);){if(!H(s))return s;if(r=i[s],!r)return!1;if(r.visible)return s;o.push(s),s=r.fill}return!1}function dg(i,e,t){const n=function pg(i){const e=i.options,t=e.fill;let n=C(t&&t.target,t);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(i);if(A(n))return!isNaN(n.value)&&n;let s=parseFloat(n);return H(s)&&Math.floor(s)===s?function ug(i,e,t,n){return("-"===i||"+"===i)&&(t=e+t),!(t===e||t<0||t>=n)&&t}(n[0],e,s,t):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function _g(i,e,t){const n=[];for(let s=0;s<t.length;s++){const o=t[s],{first:r,last:a,point:l}=xg(o,e,"x");if(!(!l||r&&a))if(r)n.unshift(l);else if(i.push(l),!a)break}i.push(...n)}function xg(i,e,t){const n=i.interpolate(e,t);if(!n)return{};const s=n[t],o=i.segments,r=i.points;let a=!1,l=!1;for(let c=0;c<o.length;c++){const h=o[c],d=r[h.start][t],u=r[h.end][t];if(dt(s,d,u)){a=s===d,l=s===u;break}}return{first:a,last:l,point:n}}class Fo{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,t,n){const{x:s,y:o,radius:r}=this;return e.arc(s,o,r,(t=t||{start:0,end:F}).end,t.start,!0),!n.bounds}interpolate(e){const{x:t,y:n,radius:s}=this,o=e.angle;return{x:t+Math.cos(o)*s,y:n+Math.sin(o)*s,angle:o}}}function Ji(i,e,t){const n=function yg(i){const{chart:e,fill:t,line:n}=i;if(H(t))return function vg(i,e){const t=i.getDatasetMeta(e);return t&&i.isDatasetVisible(e)?t.dataset:null}(e,t);if("stack"===t)return function mg(i){const{scale:e,index:t,line:n}=i,s=[],o=n.segments,r=n.points,a=function bg(i,e){const t=[],n=i.getMatchingVisibleMetas("line");for(let s=0;s<n.length;s++){const o=n[s];if(o.index===e)break;o.hidden||t.unshift(o.dataset)}return t}(e,t);a.push(Ro({x:null,y:e.bottom},n));for(let l=0;l<o.length;l++){const c=o[l];for(let h=c.start;h<=c.end;h++)_g(s,r[h],a)}return new Qe({points:s,options:{}})}(i);if("shape"===t)return!0;const s=function wg(i){return(i.scale||{}).getPointPositionForValue?function Sg(i){const{scale:e,fill:t}=i,n=e.options,s=e.getLabels().length,o=n.reverse?e.max:e.min,r=function gg(i,e,t){let n;return n="start"===i?t:"end"===i?e.options.reverse?e.min:e.max:A(i)?i.value:e.getBaseValue(),n}(t,e,o),a=[];if(n.grid.circular){const l=e.getPointPositionForValue(0,o);return new Fo({x:l.x,y:l.y,radius:e.getDistanceFromCenterForValue(r)})}for(let l=0;l<s;++l)a.push(e.getPointPositionForValue(l,r));return a}(i):function Mg(i){const{scale:e={},fill:t}=i,n=function fg(i,e){let t=null;return"start"===i?t=e.bottom:"end"===i?t=e.top:A(i)?t=e.getPixelForValue(i.value):e.getBasePixel&&(t=e.getBasePixel()),t}(t,e);if(H(n)){const s=e.isHorizontal();return{x:s?n:null,y:s?null:n}}return null}(i)}(i);return s instanceof Fo?s:Ro(s,n)}(e),{line:s,scale:o,axis:r}=e,a=s.options,l=a.fill,c=a.backgroundColor,{above:h=c,below:d=c}=l||{};n&&s.points.length&&(Be(i,t),function kg(i,e){const{line:t,target:n,above:s,below:o,area:r,scale:a}=e,l=t._loop?"angle":e.axis;i.save(),"x"===l&&o!==s&&(zo(i,n,r.top),Bo(i,{line:t,target:n,color:s,scale:a,property:l}),i.restore(),i.save(),zo(i,n,r.bottom)),Bo(i,{line:t,target:n,color:o,scale:a,property:l}),i.restore()}(i,{line:s,target:n,above:h,below:d,area:t,scale:o,axis:r}),je(i))}function zo(i,e,t){const{segments:n,points:s}=e;let o=!0,r=!1;i.beginPath();for(const a of n){const{start:l,end:c}=a,h=s[l],d=s[Zi(l,c,s)];o?(i.moveTo(h.x,h.y),o=!1):(i.lineTo(h.x,t),i.lineTo(h.x,h.y)),r=!!e.pathSegment(i,a,{move:r}),r?i.closePath():i.lineTo(d.x,t)}i.lineTo(e.first().x,t),i.closePath(),i.clip()}function Bo(i,e){const{line:t,target:n,property:s,color:o,scale:r}=e,a=function lg(i,e,t){const n=i.segments,s=i.points,o=e.points,r=[];for(const a of n){let{start:l,end:c}=a;c=Zi(l,c,s);const h=qi(t,s[l],s[c],a.loop);if(!e.segments){r.push({source:a,target:h,start:s[l],end:s[c]});continue}const d=Fs(e,h);for(const u of d){const f=qi(t,o[u.start],o[u.end],u.loop),g=Is(a,s,f);for(const p of g)r.push({source:p,target:u,start:{[t]:Eo(h,f,"start",Math.max)},end:{[t]:Eo(h,f,"end",Math.min)}})}}return r}(t,n,s);for(const{source:l,target:c,start:h,end:d}of a){const{style:{backgroundColor:u=o}={}}=l,f=!0!==n;i.save(),i.fillStyle=u,Pg(i,r,f&&qi(s,h,d)),i.beginPath();const g=!!t.pathSegment(i,l);let p;if(f){g?i.closePath():jo(i,n,d,s);const m=!!n.pathSegment(i,c,{move:g,reverse:!0});p=g&&m,p||jo(i,n,h,s)}i.closePath(),i.fill(p?"evenodd":"nonzero"),i.restore()}}function Pg(i,e,t){const{top:n,bottom:s}=e.chart.chartArea,{property:o,start:r,end:a}=t||{};"x"===o&&(i.beginPath(),i.rect(r,n,a-r,s-n),i.clip())}function jo(i,e,t,n){const s=e.interpolate(t,n);s&&i.lineTo(s.x,s.y)}var Cg={id:"filler",afterDatasetsUpdate(i,e,t){const n=(i.data.datasets||[]).length,s=[];let o,r,a,l;for(r=0;r<n;++r)o=i.getDatasetMeta(r),a=o.dataset,l=null,a&&a.options&&a instanceof Qe&&(l={visible:i.isDatasetVisible(r),index:r,fill:dg(a,r,n),chart:i,axis:o.controller.options.indexAxis,scale:o.vScale,line:a}),o.$filler=l,s.push(l);for(r=0;r<n;++r)l=s[r],l&&!1!==l.fill&&(l.fill=hg(s,r,t.propagate))},beforeDraw(i,e,t){const n="beforeDraw"===t.drawTime,s=i.getSortedVisibleDatasetMetas(),o=i.chartArea;for(let r=s.length-1;r>=0;--r){const a=s[r].$filler;a&&(a.line.updateControlPoints(o,a.axis),n&&a.fill&&Ji(i.ctx,a,o))}},beforeDatasetsDraw(i,e,t){if("beforeDatasetsDraw"!==t.drawTime)return;const n=i.getSortedVisibleDatasetMetas();for(let s=n.length-1;s>=0;--s){const o=n[s].$filler;Io(o)&&Ji(i.ctx,o,i.chartArea)}},beforeDatasetDraw(i,e,t){const n=e.meta.$filler;!Io(n)||"beforeDatasetDraw"!==t.drawTime||Ji(i.ctx,n,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const No=(i,e)=>{let{boxHeight:t=e,boxWidth:n=e}=i;return i.usePointStyle&&(t=Math.min(t,e),n=i.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:t,itemHeight:Math.max(e,t)}};class Vo extends ot{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,n){this.maxWidth=e,this.maxHeight=t,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let t=B(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter(n=>e.filter(n,this.chart.data))),e.sort&&(t=t.sort((n,s)=>e.sort(n,s,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 n=e.labels,s=U(n.font),o=s.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=No(n,o);let c,h;t.font=s.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(r,o,a,l)+10):(h=this.maxHeight,c=this._fitCols(r,o,a,l)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(h,e.maxHeight||this.maxHeight)}_fitRows(e,t,n,s){const{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=s+a;let d=e;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-h;return this.legendItems.forEach((g,p)=>{const m=n+t/2+o.measureText(g.text).width;(0===p||c[c.length-1]+m+2*a>r)&&(d+=h,c[c.length-(p>0?0:1)]=0,f+=h,u++),l[p]={left:0,top:f,row:u,width:m,height:s},c[c.length-1]+=m+a}),d}_fitCols(e,t,n,s){const{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=r-e;let d=a,u=0,f=0,g=0,p=0;return this.legendItems.forEach((m,b)=>{const _=n+t/2+o.measureText(m.text).width;b>0&&f+s+2*a>h&&(d+=u+a,c.push({width:u,height:f}),g+=u+a,p++,u=f=0),l[b]={left:g,top:f,col:p,width:_,height:s},u=Math.max(u,_),f+=s+a}),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:n,labels:{padding:s},rtl:o}}=this,r=Wt(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=G(n,this.left+s,this.right-this.lineWidths[a]);for(const c of t)a!==c.row&&(a=c.row,l=G(n,this.left+s,this.right-this.lineWidths[a])),c.top+=this.top+e+s,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+s}else{let a=0,l=G(n,this.top+e+s,this.bottom-this.columnSizes[a].height);for(const c of t)c.col!==a&&(a=c.col,l=G(n,this.top+e+s,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+s,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const e=this.ctx;Be(e,this),this._draw(),je(e)}}_draw(){const{options:e,columnSizes:t,lineWidths:n,ctx:s}=this,{align:o,labels:r}=e,a=T.color,l=Wt(e.rtl,this.left,this.width),c=U(r.font),{color:h,padding:d}=r,u=c.size,f=u/2;let g;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;const{boxWidth:p,boxHeight:m,itemHeight:b}=No(r,u),y=this.isHorizontal(),x=this._computeTitleHeight();g=y?{x:G(o,this.left+d,this.right-n[0]),y:this.top+d+x,line:0}:{x:this.left+d,y:G(o,this.top+x+d,this.bottom-t[0].height),line:0},Ds(this.ctx,e.textDirection);const w=b+d;this.legendItems.forEach((M,S)=>{s.strokeStyle=M.fontColor||h,s.fillStyle=M.fontColor||h;const k=s.measureText(M.text).width,L=l.textAlign(M.textAlign||(M.textAlign=r.textAlign)),R=p+f+k;let D=g.x,$=g.y;l.setWidth(this.width),y?S>0&&D+R+d>this.right&&($=g.y+=w,g.line++,D=g.x=G(o,this.left+d,this.right-n[g.line])):S>0&&$+w>this.bottom&&(D=g.x=D+t[g.line].width+d,g.line++,$=g.y=G(o,this.top+x+d,this.bottom-t[g.line].height)),function(M,S,k){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;s.save();const L=C(k.lineWidth,1);if(s.fillStyle=C(k.fillStyle,a),s.lineCap=C(k.lineCap,"butt"),s.lineDashOffset=C(k.lineDashOffset,0),s.lineJoin=C(k.lineJoin,"miter"),s.lineWidth=L,s.strokeStyle=C(k.strokeStyle,a),s.setLineDash(C(k.lineDash,[])),r.usePointStyle){const R={radius:m*Math.SQRT2/2,pointStyle:k.pointStyle,rotation:k.rotation,borderWidth:L},D=l.xPlus(M,p/2);bs(s,R,D,S+f,r.pointStyleWidth&&p)}else{const R=S+Math.max((u-m)/2,0),D=l.leftForLtr(M,p),$=Ct(k.borderRadius);s.beginPath(),Object.values($).some(Z=>0!==Z)?ae(s,{x:D,y:R,w:p,h:m,radius:$}):s.rect(D,R,p,m),s.fill(),0!==L&&s.stroke()}s.restore()}(l.x(D),$,M),D=((i,e,t,n)=>i===(n?"left":"right")?t:"center"===i?(e+t)/2:e)(L,D+p+f,y?D+R:this.right,e.rtl),function(M,S,k){Pt(s,k.text,M,S+b/2,c,{strikethrough:k.hidden,textAlign:l.textAlign(k.textAlign)})}(l.x(D),$,M),y?g.x+=R+d:g.y+=w}),Ls(this.ctx,e.textDirection)}drawTitle(){const e=this.options,t=e.title,n=U(t.font),s=K(t.padding);if(!t.display)return;const o=Wt(e.rtl,this.left,this.width),r=this.ctx,a=t.position,c=s.top+n.size/2;let h,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+c,d=G(e.align,d,this.right-u);else{const g=this.columnSizes.reduce((p,m)=>Math.max(p,m.height),0);h=c+G(e.align,this.top,this.bottom-g-e.labels.padding-this._computeTitleHeight())}const f=G(a,d,d+u);r.textAlign=o.textAlign(wi(a)),r.textBaseline="middle",r.strokeStyle=t.color,r.fillStyle=t.color,r.font=n.string,Pt(r,t.text,f,h,n)}_computeTitleHeight(){const e=this.options.title,t=U(e.font),n=K(e.padding);return e.display?t.lineHeight+n.height:0}_getLegendItemAt(e,t){let n,s,o;if(dt(e,this.left,this.right)&&dt(t,this.top,this.bottom))for(o=this.legendHitBoxes,n=0;n<o.length;++n)if(s=o[n],dt(e,s.left,s.left+s.width)&&dt(t,s.top,s.top+s.height))return this.legendItems[n];return null}handleEvent(e){const t=this.options;if(!function Ag(i,e){return!(("mousemove"!==i&&"mouseout"!==i||!e.onHover&&!e.onLeave)&&(!e.onClick||"click"!==i&&"mouseup"!==i))}(e.type,t))return;const n=this._getLegendItemAt(e.x,e.y);if("mousemove"===e.type||"mouseout"===e.type){const s=this._hoveredItem,o=((i,e)=>null!==i&&null!==e&&i.datasetIndex===e.datasetIndex&&i.index===e.index)(s,n);s&&!o&&B(t.onLeave,[e,s,this],this),this._hoveredItem=n,n&&!o&&B(t.onHover,[e,n,this],this)}else n&&B(t.onClick,[e,n,this],this)}}var Tg={id:"legend",_element:Vo,start(i,e,t){const n=i.legend=new Vo({ctx:i.ctx,options:t,chart:i});q.configure(i,n,t),q.addBox(i,n)},stop(i){q.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,e,t){const n=i.legend;q.configure(i,n,t),n.options=t},afterUpdate(i){const e=i.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(i,e){e.replay||i.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,e,t){const n=e.datasetIndex,s=t.chart;s.isDatasetVisible(n)?(s.hide(n),e.hidden=!0):(s.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){const e=i.data.datasets,{labels:{usePointStyle:t,pointStyle:n,textAlign:s,color:o}}=i.legend.options;return i._getSortedDatasetMetas().map(r=>{const a=r.controller.getStyle(t?0:void 0),l=K(a.borderWidth);return{text:e[r.index].label,fillStyle:a.backgroundColor,fontColor:o,hidden:!r.visible,lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:a.borderColor,pointStyle:n||a.pointStyle,rotation:a.rotation,textAlign:s||a.textAlign,borderRadius:0,datasetIndex:r.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};class Qi extends ot{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 n=this.options;if(this.left=0,this.top=0,!n.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=e,this.height=this.bottom=t;const s=z(n.text)?n.text.length:1;this._padding=K(n.padding);const o=s*U(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const e=this.options.position;return"top"===e||"bottom"===e}_drawArgs(e){const{top:t,left:n,bottom:s,right:o,options:r}=this,a=r.align;let c,h,d,l=0;return this.isHorizontal()?(h=G(a,n,o),d=t+e,c=o-n):("left"===r.position?(h=n+e,d=G(a,s,t),l=-.5*N):(h=o-e,d=G(a,t,s),l=.5*N),c=s-t),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){const e=this.ctx,t=this.options;if(!t.display)return;const n=U(t.font),o=n.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Pt(e,t.text,0,0,n,{color:t.color,maxWidth:l,rotation:c,textAlign:wi(t.align),textBaseline:"middle",translation:[r,a]})}}var Lg={id:"title",_element:Qi,start(i,e,t){!function Dg(i,e){const t=new Qi({ctx:i.ctx,options:e,chart:i});q.configure(i,t,e),q.addBox(i,t),i.titleBlock=t}(i,t)},stop(i){q.removeBox(i,i.titleBlock),delete i.titleBlock},beforeUpdate(i,e,t){const n=i.titleBlock;q.configure(i,n,t),n.options=t},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 ei=new WeakMap;var Eg={id:"subtitle",start(i,e,t){const n=new Qi({ctx:i.ctx,options:t,chart:i});q.configure(i,n,t),q.addBox(i,n),ei.set(i,n)},stop(i){q.removeBox(i,ei.get(i)),ei.delete(i)},beforeUpdate(i,e,t){const n=ei.get(i);q.configure(i,n,t),n.options=t},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 _e={average(i){if(!i.length)return!1;let e,t,n=0,s=0,o=0;for(e=0,t=i.length;e<t;++e){const r=i[e].element;if(r&&r.hasValue()){const a=r.tooltipPosition();n+=a.x,s+=a.y,++o}}return{x:n/o,y:s/o}},nearest(i,e){if(!i.length)return!1;let o,r,a,t=e.x,n=e.y,s=Number.POSITIVE_INFINITY;for(o=0,r=i.length;o<r;++o){const l=i[o].element;if(l&&l.hasValue()){const h=yi(e,l.getCenterPoint());h<s&&(s=h,a=l)}}if(a){const l=a.tooltipPosition();t=l.x,n=l.y}return{x:t,y:n}}};function ct(i,e){return e&&(z(e)?Array.prototype.push.apply(i,e):i.push(e)),i}function pt(i){return("string"==typeof i||i instanceof String)&&i.indexOf("\n")>-1?i.split("\n"):i}function Rg(i,e){const{element:t,datasetIndex:n,index:s}=e,o=i.getDatasetMeta(n).controller,{label:r,value:a}=o.getLabelAndValue(s);return{chart:i,label:r,parsed:o.getParsed(s),raw:i.data.datasets[n].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:n,element:t}}function Ho(i,e){const t=i.chart.ctx,{body:n,footer:s,title:o}=i,{boxWidth:r,boxHeight:a}=e,l=U(e.bodyFont),c=U(e.titleFont),h=U(e.footerFont),d=o.length,u=s.length,f=n.length,g=K(e.padding);let p=g.height,m=0,b=n.reduce((y,x)=>y+x.before.length+x.lines.length+x.after.length,0);b+=i.beforeBody.length+i.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),b&&(p+=f*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(b-f)*l.lineHeight+(b-1)*e.bodySpacing),u&&(p+=e.footerMarginTop+u*h.lineHeight+(u-1)*e.footerSpacing);let _=0;const v=function(y){m=Math.max(m,t.measureText(y).width+_)};return t.save(),t.font=c.string,I(i.title,v),t.font=l.string,I(i.beforeBody.concat(i.afterBody),v),_=e.displayColors?r+2+e.boxPadding:0,I(n,y=>{I(y.before,v),I(y.lines,v),I(y.after,v)}),_=0,t.font=h.string,I(i.footer,v),t.restore(),m+=g.width,{width:m,height:p}}function zg(i,e,t,n){const{x:s,width:o}=t,{width:r,chartArea:{left:a,right:l}}=i;let c="center";return"center"===n?c=s<=(a+l)/2?"left":"right":s<=o/2?c="left":s>=r-o/2&&(c="right"),function Fg(i,e,t,n){const{x:s,width:o}=n,r=t.caretSize+t.caretPadding;if("left"===i&&s+o+r>e.width||"right"===i&&s-o-r<0)return!0}(c,i,e,t)&&(c="center"),c}function Wo(i,e,t){const n=t.yAlign||e.yAlign||function Ig(i,e){const{y:t,height:n}=e;return t<n/2?"top":t>i.height-n/2?"bottom":"center"}(i,t);return{xAlign:t.xAlign||e.xAlign||zg(i,e,t,n),yAlign:n}}function $o(i,e,t,n){const{caretSize:s,caretPadding:o,cornerRadius:r}=i,{xAlign:a,yAlign:l}=t,c=s+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=Ct(r);let g=function Bg(i,e){let{x:t,width:n}=i;return"right"===e?t-=n:"center"===e&&(t-=n/2),t}(e,a);const p=function jg(i,e,t){let{y:n,height:s}=i;return"top"===e?n+=t:n-="bottom"===e?s+t:s/2,n}(e,l,c);return"center"===l?"left"===a?g+=c:"right"===a&&(g-=c):"left"===a?g-=Math.max(h,u)+s:"right"===a&&(g+=Math.max(d,f)+s),{x:X(g,0,n.width-e.width),y:X(p,0,n.height-e.height)}}function ii(i,e,t){const n=K(t.padding);return"center"===e?i.x+i.width/2:"right"===e?i.x+i.width-n.right:i.x+n.left}function Yo(i){return ct([],pt(i))}function Uo(i,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?i.override(t):i}let Xo=(()=>{class i extends ot{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,s=this.options.setContext(this.getContext()),o=s.enabled&&n.options.animation&&s.animations,r=new Ns(this.chart,o);return o._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=function Ng(i,e,t){return yt(i,{tooltip:e,tooltipItems:t,type:"tooltip"})}(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:s}=n,o=s.beforeTitle.apply(this,[t]),r=s.title.apply(this,[t]),a=s.afterTitle.apply(this,[t]);let l=[];return l=ct(l,pt(o)),l=ct(l,pt(r)),l=ct(l,pt(a)),l}getBeforeBody(t,n){return Yo(n.callbacks.beforeBody.apply(this,[t]))}getBody(t,n){const{callbacks:s}=n,o=[];return I(t,r=>{const a={before:[],lines:[],after:[]},l=Uo(s,r);ct(a.before,pt(l.beforeLabel.call(this,r))),ct(a.lines,l.label.call(this,r)),ct(a.after,pt(l.afterLabel.call(this,r))),o.push(a)}),o}getAfterBody(t,n){return Yo(n.callbacks.afterBody.apply(this,[t]))}getFooter(t,n){const{callbacks:s}=n,o=s.beforeFooter.apply(this,[t]),r=s.footer.apply(this,[t]),a=s.afterFooter.apply(this,[t]);let l=[];return l=ct(l,pt(o)),l=ct(l,pt(r)),l=ct(l,pt(a)),l}_createItems(t){const n=this._active,s=this.chart.data,o=[],r=[],a=[];let c,h,l=[];for(c=0,h=n.length;c<h;++c)l.push(Rg(this.chart,n[c]));return t.filter&&(l=l.filter((d,u,f)=>t.filter(d,u,f,s))),t.itemSort&&(l=l.sort((d,u)=>t.itemSort(d,u,s))),I(l,d=>{const u=Uo(t.callbacks,d);o.push(u.labelColor.call(this,d)),r.push(u.labelPointStyle.call(this,d)),a.push(u.labelTextColor.call(this,d))}),this.labelColors=o,this.labelPointStyles=r,this.labelTextColors=a,this.dataPoints=l,l}update(t,n){const s=this.options.setContext(this.getContext()),o=this._active;let r,a=[];if(o.length){const l=_e[s.position].call(this,o,this._eventPosition);a=this._createItems(s),this.title=this.getTitle(a,s),this.beforeBody=this.getBeforeBody(a,s),this.body=this.getBody(a,s),this.afterBody=this.getAfterBody(a,s),this.footer=this.getFooter(a,s);const c=this._size=Ho(this,s),h=Object.assign({},l,c),d=Wo(this.chart,s,h),u=$o(s,h,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,r={opacity:1,x:u.x,y:u.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=a,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,s,o){const r=this.getCaretPosition(t,s,o);n.lineTo(r.x1,r.y1),n.lineTo(r.x2,r.y2),n.lineTo(r.x3,r.y3)}getCaretPosition(t,n,s){const{xAlign:o,yAlign:r}=this,{caretSize:a,cornerRadius:l}=s,{topLeft:c,topRight:h,bottomLeft:d,bottomRight:u}=Ct(l),{x:f,y:g}=t,{width:p,height:m}=n;let b,_,v,y,x,w;return"center"===r?(x=g+m/2,"left"===o?(b=f,_=b-a,y=x+a,w=x-a):(b=f+p,_=b+a,y=x-a,w=x+a),v=b):(_="left"===o?f+Math.max(c,d)+a:"right"===o?f+p-Math.max(h,u)-a:this.caretX,"top"===r?(y=g,x=y-a,b=_-a,v=_+a):(y=g+m,x=y+a,b=_+a,v=_-a),w=y),{x1:b,x2:_,x3:v,y1:y,y2:x,y3:w}}drawTitle(t,n,s){const o=this.title,r=o.length;let a,l,c;if(r){const h=Wt(s.rtl,this.x,this.width);for(t.x=ii(this,s.titleAlign,s),n.textAlign=h.textAlign(s.titleAlign),n.textBaseline="middle",a=U(s.titleFont),l=s.titleSpacing,n.fillStyle=s.titleColor,n.font=a.string,c=0;c<r;++c)n.fillText(o[c],h.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+l,c+1===r&&(t.y+=s.titleMarginBottom-l)}}_drawColorBox(t,n,s,o,r){const a=this.labelColors[s],l=this.labelPointStyles[s],{boxHeight:c,boxWidth:h,boxPadding:d}=r,u=U(r.bodyFont),f=ii(this,"left",r),g=o.x(f),m=n.y+(c<u.lineHeight?(u.lineHeight-c)/2:0);if(r.usePointStyle){const b={radius:Math.min(h,c)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},_=o.leftForLtr(g,h)+h/2,v=m+c/2;t.strokeStyle=r.multiKeyBackground,t.fillStyle=r.multiKeyBackground,Di(t,b,_,v),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Di(t,b,_,v)}else{t.lineWidth=A(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const b=o.leftForLtr(g,h-d),_=o.leftForLtr(o.xPlus(g,1),h-d-2),v=Ct(a.borderRadius);Object.values(v).some(y=>0!==y)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,ae(t,{x:b,y:m,w:h,h:c,radius:v}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),ae(t,{x:_,y:m+1,w:h-2,h:c-2,radius:v}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(b,m,h,c),t.strokeRect(b,m,h,c),t.fillStyle=a.backgroundColor,t.fillRect(_,m+1,h-2,c-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,n,s){const{body:o}=this,{bodySpacing:r,bodyAlign:a,displayColors:l,boxHeight:c,boxWidth:h,boxPadding:d}=s,u=U(s.bodyFont);let f=u.lineHeight,g=0;const p=Wt(s.rtl,this.x,this.width),m=function(k){n.fillText(k,p.x(t.x+g),t.y+f/2),t.y+=f+r},b=p.textAlign(a);let _,v,y,x,w,M,S;for(n.textAlign=a,n.textBaseline="middle",n.font=u.string,t.x=ii(this,b,s),n.fillStyle=s.bodyColor,I(this.beforeBody,m),g=l&&"right"!==b?"center"===a?h/2+d:h+2+d:0,x=0,M=o.length;x<M;++x){for(_=o[x],v=this.labelTextColors[x],n.fillStyle=v,I(_.before,m),y=_.lines,l&&y.length&&(this._drawColorBox(n,t,x,p,s),f=Math.max(u.lineHeight,c)),w=0,S=y.length;w<S;++w)m(y[w]),f=u.lineHeight;I(_.after,m)}g=0,f=u.lineHeight,I(this.afterBody,m),t.y-=r}drawFooter(t,n,s){const o=this.footer,r=o.length;let a,l;if(r){const c=Wt(s.rtl,this.x,this.width);for(t.x=ii(this,s.footerAlign,s),t.y+=s.footerMarginTop,n.textAlign=c.textAlign(s.footerAlign),n.textBaseline="middle",a=U(s.footerFont),n.fillStyle=s.footerColor,n.font=a.string,l=0;l<r;++l)n.fillText(o[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+s.footerSpacing}}drawBackground(t,n,s,o){const{xAlign:r,yAlign:a}=this,{x:l,y:c}=t,{width:h,height:d}=s,{topLeft:u,topRight:f,bottomLeft:g,bottomRight:p}=Ct(o.cornerRadius);n.fillStyle=o.backgroundColor,n.strokeStyle=o.borderColor,n.lineWidth=o.borderWidth,n.beginPath(),n.moveTo(l+u,c),"top"===a&&this.drawCaret(t,n,s,o),n.lineTo(l+h-f,c),n.quadraticCurveTo(l+h,c,l+h,c+f),"center"===a&&"right"===r&&this.drawCaret(t,n,s,o),n.lineTo(l+h,c+d-p),n.quadraticCurveTo(l+h,c+d,l+h-p,c+d),"bottom"===a&&this.drawCaret(t,n,s,o),n.lineTo(l+g,c+d),n.quadraticCurveTo(l,c+d,l,c+d-g),"center"===a&&"left"===r&&this.drawCaret(t,n,s,o),n.lineTo(l,c+u),n.quadraticCurveTo(l,c,l+u,c),n.closePath(),n.fill(),o.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,s=this.$animations,o=s&&s.x,r=s&&s.y;if(o||r){const a=_e[t.position].call(this,this._active,this._eventPosition);if(!a)return;const l=this._size=Ho(this,t),c=Object.assign({},a,this._size),h=Wo(n,t,c),d=$o(t,c,h,n);(o._to!==d.x||r._to!==d.y)&&(this.xAlign=h.xAlign,this.yAlign=h.yAlign,this.width=l.width,this.height=l.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(n);const o={width:this.width,height:this.height},r={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const a=K(n.padding);n.enabled&&(this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length)&&(t.save(),t.globalAlpha=s,this.drawBackground(r,t,o,n),Ds(t,n.textDirection),r.y+=a.top,this.drawTitle(r,t,n),this.drawBody(r,t,n),this.drawFooter(r,t,n),Ls(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const s=this._active,o=t.map(({datasetIndex:l,index:c})=>{const h=this.chart.getDatasetMeta(l);if(!h)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:h.data[c],index:c}}),r=!Ae(s,o),a=this._positionChanged(o,n);(r||a)&&(this._active=o,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,s=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const o=this.options,r=this._active||[],a=this._getActiveElements(t,r,n,s),l=this._positionChanged(a,t),c=n||!Ae(a,r)||l;return c&&(this._active=a,(o.enabled||o.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),c}_getActiveElements(t,n,s,o){const r=this.options;if("mouseout"===t.type)return[];if(!o)return n;const a=this.chart.getElementsAtEventForMode(t,r.mode,r,s);return r.reverse&&a.reverse(),a}_positionChanged(t,n){const{caretX:s,caretY:o,options:r}=this,a=_e[r.position].call(this,t,n);return!1!==a&&(s!==a.x||o!==a.y)}}return i.positioners=_e,i})();var Vg={id:"tooltip",_element:Xo,positioners:_e,afterInit(i,e,t){t&&(i.tooltip=new Xo({chart:i,options:t}))},beforeUpdate(i,e,t){i.tooltip&&i.tooltip.initialize(t)},reset(i,e,t){i.tooltip&&i.tooltip.initialize(t)},afterDraw(i){const e=i.tooltip;if(e&&e._willRender()){const t={tooltip:e};if(!1===i.notifyPlugins("beforeTooltipDraw",t))return;e.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",t)}},afterEvent(i,e){i.tooltip&&i.tooltip.handleEvent(e.event,e.replay,e.inChartArea)&&(e.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:(i,e)=>e.bodyFont.size,boxWidth:(i,e)=>e.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:ht,title(i){if(i.length>0){const e=i[0],t=e.chart.data.labels,n=t?t.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return t[e.dataIndex]}return""},afterTitle:ht,beforeBody:ht,beforeLabel:ht,label(i){if(this&&this.options&&"dataset"===this.options.mode)return i.label+": "+i.formattedValue||i.formattedValue;let e=i.dataset.label||"";e&&(e+=": ");const t=i.formattedValue;return E(t)||(e+=t),e},labelColor(i){const t=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(i){const t=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:ht,afterBody:ht,beforeFooter:ht,footer:ht,afterFooter:ht}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>"filter"!==i&&"itemSort"!==i&&"external"!==i,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Hg=Object.freeze({__proto__:null,Decimation:ag,Filler:Cg,Legend:Tg,SubTitle:Eg,Title:Lg,Tooltip:Vg});class ni extends Dt{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const n=this.getLabels();for(const{index:s,label:o}of t)n[s]===o&&n.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(E(e))return null;const n=this.getLabels();return((i,e)=>null===i?null:X(Math.round(i),0,e))(t=isFinite(t)&&n[t]===e?t:function $g(i,e,t,n){const s=i.indexOf(e);return-1===s?((i,e,t,n)=>("string"==typeof e?(t=i.push(e)-1,n.unshift({index:t,label:e})):isNaN(e)&&(t=null),t))(i,e,t,n):s!==i.lastIndexOf(e)?t:s}(n,e,C(t,e),this._addedLabels),n.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:n,max:s}=this.getMinMax(!0);"ticks"===this.options.bounds&&(e||(n=0),t||(s=this.getLabels().length-1)),this.min=n,this.max=s}buildTicks(){const e=this.min,t=this.max,n=this.options.offset,s=[];let o=this.getLabels();o=0===e&&t===o.length-1?o:o.slice(e,t+1),this._valueRange=Math.max(o.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let r=e;r<=t;r++)s.push({value:r});return s}getLabelForValue(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return"number"!=typeof e&&(e=this.parse(e)),null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const t=this.ticks;return e<0||e>t.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 Go(i,e,{horizontal:t,minRotation:n}){const s=st(n),o=(t?Math.sin(s):Math.cos(s))||.001;return Math.min(e/o,.75*e*(""+i).length)}ni.id="category",ni.defaults={ticks:{callback:ni.prototype.getLabelForValue}};class si extends Dt{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 E(e)||("number"==typeof e||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:s,max:o}=this;const r=l=>s=t?s:l,a=l=>o=n?o:l;if(e){const l=rt(s),c=rt(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(s===o){let l=1;(o>=Number.MAX_SAFE_INTEGER||s<=Number.MIN_SAFE_INTEGER)&&(l=Math.abs(.05*o)),a(o+l),e||r(s-l)}this.min=s,this.max=o}getTickLimit(){const e=this.options.ticks;let s,{maxTicksLimit:t,stepSize:n}=e;return n?(s=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),t=t||11),t&&(s=Math.min(t,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let n=this.getTickLimit();n=Math.max(2,n);const r=function Ug(i,e){const t=[],{bounds:s,step:o,min:r,max:a,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=i,f=o||1,g=h-1,{min:p,max:m}=e,b=!E(r),_=!E(a),v=!E(c),y=(m-p)/(d+1);let w,M,S,k,x=Xn((m-p)/g/f)*f;if(x<1e-14&&!b&&!_)return[{value:p},{value:m}];k=Math.ceil(m/x)-Math.floor(p/x),k>g&&(x=Xn(k*x/g/f)*f),E(l)||(w=Math.pow(10,l),x=Math.ceil(x*w)/w),"ticks"===s?(M=Math.floor(p/x)*x,S=Math.ceil(m/x)*x):(M=p,S=m),b&&_&&o&&function Sh(i,e){const t=Math.round(i);return t-e<=i&&t+e>=i}((a-r)/o,x/1e3)?(k=Math.round(Math.min((a-r)/x,h)),x=(a-r)/k,M=r,S=a):v?(M=b?r:M,S=_?a:S,k=c-1,x=(S-M)/k):(k=(S-M)/x,k=te(k,Math.round(k),x/1e3)?Math.round(k):Math.ceil(k));const L=Math.max(Kn(x),Kn(M));w=Math.pow(10,E(l)?L:l),M=Math.round(M*w)/w,S=Math.round(S*w)/w;let R=0;for(b&&(u&&M!==r?(t.push({value:r}),M<r&&R++,te(Math.round((M+R*x)*w)/w,r,Go(r,y,i))&&R++):M<r&&R++);R<k;++R)t.push({value:Math.round((M+R*x)*w)/w});return _&&u&&S!==a?t.length&&te(t[t.length-1].value,a,Go(a,y,i))?t[t.length-1].value=a:t.push({value:a}):(!_||S===a)&&t.push({value:S}),t}({maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:!1!==t.includeBounds},this._range||this);return"ticks"===e.bounds&&Gn(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const e=this.ticks;let t=this.min,n=this.max;if(super.configure(),this.options.offset&&e.length){const s=(n-t)/Math.max(e.length-1,1)/2;t-=s,n+=s}this._startValue=t,this._endValue=n,this._valueRange=n-t}getLabelForValue(e){return ce(e,this.chart.options.locale,this.options.ticks.format)}}class tn extends si{determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=H(e)?e:0,this.max=H(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,n=st(this.options.ticks.minRotation),s=(e?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,o.lineHeight/s))}getPixelForValue(e){return null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}function Ko(i){return i/Math.pow(10,Math.floor(it(i)))==1}tn.id="linear",tn.defaults={ticks:{callback:We.formatters.numeric}};class en extends Dt{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,t){const n=si.prototype.parse.apply(this,[e,t]);if(0!==n)return H(n)&&n>0?n:null;this._zero=!0}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=H(e)?Math.max(0,e):null,this.max=H(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let n=this.min,s=this.max;const o=l=>n=e?n:l,r=l=>s=t?s:l,a=(l,c)=>Math.pow(10,Math.floor(it(l))+c);n===s&&(n<=0?(o(1),r(10)):(o(a(n,-1)),r(a(s,1)))),n<=0&&o(a(s,-1)),s<=0&&r(a(n,1)),this._zero&&this.min!==this._suggestedMin&&n===a(this.min,0)&&o(a(n,-1)),this.min=n,this.max=s}buildTicks(){const e=this.options,n=function Xg(i,e){const t=Math.floor(it(e.max)),n=Math.ceil(e.max/Math.pow(10,t)),s=[];let o=tt(i.min,Math.pow(10,Math.floor(it(e.min)))),r=Math.floor(it(o)),a=Math.floor(o/Math.pow(10,r)),l=r<0?Math.pow(10,Math.abs(r)):1;do{s.push({value:o,major:Ko(o)}),++a,10===a&&(a=1,++r,l=r>=0?1:l),o=Math.round(a*Math.pow(10,r)*l)/l}while(r<t||r===t&&a<n);const c=tt(i.max,o);return s.push({value:c,major:Ko(o)}),s}({min:this._userMin,max:this._userMax},this);return"ticks"===e.bounds&&Gn(n,this,"value"),e.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(e){return void 0===e?"0":ce(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=it(e),this._valueRange=it(this.max)-it(e)}getPixelForValue(e){return(void 0===e||0===e)&&(e=this.min),null===e||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(it(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}function nn(i){const e=i.ticks;if(e.display&&i.display){const t=K(e.backdropPadding);return C(e.font&&e.font.size,T.font.size)+t.height}return 0}function Gg(i,e,t){return t=z(t)?t:[t],{w:id(i,e.string,t),h:t.length*e.lineHeight}}function qo(i,e,t,n,s){return i===n||i===s?{start:e-t/2,end:e+t/2}:i<n||i>s?{start:e-t,end:e}:{start:e,end:e+t}}function qg(i,e,t,n,s){const o=Math.abs(Math.sin(t)),r=Math.abs(Math.cos(t));let a=0,l=0;n.start<e.l?(a=(e.l-n.start)/o,i.l=Math.min(i.l,e.l-a)):n.end>e.r&&(a=(n.end-e.r)/o,i.r=Math.max(i.r,e.r+a)),s.start<e.t?(l=(e.t-s.start)/r,i.t=Math.min(i.t,e.t-l)):s.end>e.b&&(l=(s.end-e.b)/r,i.b=Math.max(i.b,e.b+l))}function Jg(i){return 0===i||180===i?"center":i<180?"left":"right"}function Qg(i,e,t){return"right"===t?i-=e:"center"===t&&(i-=e/2),i}function tp(i,e,t){return 90===t||270===t?i-=e/2:(t>270||t<90)&&(i-=e),i}function Zo(i,e,t,n){const{ctx:s}=i;if(t)s.arc(i.xCenter,i.yCenter,e,0,F);else{let o=i.getPointPosition(0,e);s.moveTo(o.x,o.y);for(let r=1;r<n;r++)o=i.getPointPosition(r,e),s.lineTo(o.x,o.y)}}en.id="logarithmic",en.defaults={ticks:{callback:We.formatters.logarithmic,major:{enabled:!0}}};class xe extends si{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=K(nn(this.options)/2),t=this.width=this.maxWidth-e.width,n=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+t/2+e.left),this.yCenter=Math.floor(this.top+n/2+e.top),this.drawingArea=Math.floor(Math.min(t,n)/2)}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!1);this.min=H(e)&&!isNaN(e)?e:0,this.max=H(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/nn(this.options))}generateTickLabels(e){si.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((t,n)=>{const s=B(this.options.pointLabels.callback,[t,n],this);return s||0===s?s:""}).filter((t,n)=>this.chart.getDataVisibility(n))}fit(){const e=this.options;e.display&&e.pointLabels.display?function Kg(i){const e={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},t=Object.assign({},e),n=[],s=[],o=i._pointLabels.length,r=i.options.pointLabels,a=r.centerPointLabels?N/o:0;for(let l=0;l<o;l++){const c=r.setContext(i.getPointLabelContext(l));s[l]=c.padding;const h=i.getPointPosition(l,i.drawingArea+s[l],a),d=U(c.font),u=Gg(i.ctx,d,i._pointLabels[l]);n[l]=u;const f=Q(i.getIndexAngle(l)+a),g=Math.round(xi(f));qg(t,e,f,qo(g,h.x,u.w,0,180),qo(g,h.y,u.h,90,270))}i.setCenterPoint(e.l-t.l,t.r-e.r,e.t-t.t,t.b-e.b),i._pointLabelItems=function Zg(i,e,t){const n=[],s=i._pointLabels.length,o=i.options,r=nn(o)/2,a=i.drawingArea,l=o.pointLabels.centerPointLabels?N/s:0;for(let c=0;c<s;c++){const h=i.getPointPosition(c,a+r+t[c],l),d=Math.round(xi(Q(h.angle+V))),u=e[c],f=tp(h.y,u.h,d),g=Jg(d),p=Qg(h.x,u.w,g);n.push({x:h.x,y:f,textAlign:g,left:p,top:f,right:p+u.w,bottom:f+u.h})}return n}(i,n,s)}(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,n,s){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((n-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,n,s))}getIndexAngle(e){return Q(e*(F/(this._pointLabels.length||1))+st(this.options.startAngle||0))}getDistanceFromCenterForValue(e){if(E(e))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(E(e))return NaN;const t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){const t=this._pointLabels||[];if(e>=0&&e<t.length){const n=t[e];return function np(i,e,t){return yt(i,{label:t,index:e,type:"pointLabel"})}(this.getContext(),e,n)}}getPointPosition(e,t,n=0){const s=this.getIndexAngle(e)-V+n;return{x:Math.cos(s)*t+this.xCenter,y:Math.sin(s)*t+this.yCenter,angle:s}}getPointPositionForValue(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:t,top:n,right:s,bottom:o}=this._pointLabelItems[e];return{left:t,top:n,right:s,bottom:o}}drawBackground(){const{backgroundColor:e,grid:{circular:t}}=this.options;if(e){const n=this.ctx;n.save(),n.beginPath(),Zo(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),n.closePath(),n.fillStyle=e,n.fill(),n.restore()}}drawGrid(){const e=this.ctx,t=this.options,{angleLines:n,grid:s}=t,o=this._pointLabels.length;let r,a,l;if(t.pointLabels.display&&function ep(i,e){const{ctx:t,options:{pointLabels:n}}=i;for(let s=e-1;s>=0;s--){const o=n.setContext(i.getPointLabelContext(s)),r=U(o.font),{x:a,y:l,textAlign:c,left:h,top:d,right:u,bottom:f}=i._pointLabelItems[s],{backdropColor:g}=o;if(!E(g)){const p=Ct(o.borderRadius),m=K(o.backdropPadding);t.fillStyle=g;const b=h-m.left,_=d-m.top,v=u-h+m.width,y=f-d+m.height;Object.values(p).some(x=>0!==x)?(t.beginPath(),ae(t,{x:b,y:_,w:v,h:y,radius:p}),t.fill()):t.fillRect(b,_,v,y)}Pt(t,i._pointLabels[s],a,l+r.lineHeight/2,r,{color:o.color,textAlign:c,textBaseline:"middle"})}}(this,o),s.display&&this.ticks.forEach((c,h)=>{0!==h&&(a=this.getDistanceFromCenterForValue(c.value),function ip(i,e,t,n){const s=i.ctx,o=e.circular,{color:r,lineWidth:a}=e;!o&&!n||!r||!a||t<0||(s.save(),s.strokeStyle=r,s.lineWidth=a,s.setLineDash(e.borderDash),s.lineDashOffset=e.borderDashOffset,s.beginPath(),Zo(i,t,o,n),s.closePath(),s.stroke(),s.restore())}(this,s.setContext(this.getContext(h-1)),a,o))}),n.display){for(e.save(),r=o-1;r>=0;r--){const c=n.setContext(this.getPointLabelContext(r)),{color:h,lineWidth:d}=c;!d||!h||(e.lineWidth=d,e.strokeStyle=h,e.setLineDash(c.borderDash),e.lineDashOffset=c.borderDashOffset,a=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),l=this.getPointPosition(r,a),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(l.x,l.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,t=this.options,n=t.ticks;if(!n.display)return;const s=this.getIndexAngle(0);let o,r;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((a,l)=>{if(0===l&&!t.reverse)return;const c=n.setContext(this.getContext(l)),h=U(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){e.font=h.string,r=e.measureText(a.label).width,e.fillStyle=c.backdropColor;const d=K(c.backdropPadding);e.fillRect(-r/2-d.left,-o-h.size/2-d.top,r+d.width,h.size+d.height)}Pt(e,a.label,0,-o,h,{color:c.color})}),e.restore()}drawTitle(){}}xe.id="radialLinear",xe.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:We.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:i=>i,padding:5,centerPointLabels:!1}},xe.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},xe.descriptors={angleLines:{_fallback:"grid"}};const oi={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}},J=Object.keys(oi);function sp(i,e){return i-e}function Jo(i,e){if(E(e))return null;const t=i._adapter,{parser:n,round:s,isoWeekday:o}=i._parseOpts;let r=e;return"function"==typeof n&&(r=n(r)),H(r)||(r="string"==typeof n?t.parse(r,n):t.parse(r)),null===r?null:(s&&(r="week"!==s||!jt(o)&&!0!==o?t.startOf(r,s):t.startOf(r,"isoWeek",o)),+r)}function Qo(i,e,t,n){const s=J.length;for(let o=J.indexOf(i);o<s-1;++o){const r=oi[J[o]];if(r.common&&Math.ceil((t-e)/((r.steps?r.steps:Number.MAX_SAFE_INTEGER)*r.size))<=n)return J[o]}return J[s-1]}function tr(i,e,t){if(t){if(t.length){const{lo:n,hi:s}=vi(t,e);i[t[n]>=e?t[n]:t[s]]=!0}}else i[e]=!0}function er(i,e,t){const n=[],s={},o=e.length;let r,a;for(r=0;r<o;++r)a=e[r],s[a]=r,n.push({value:a,major:!1});return 0!==o&&t?function ap(i,e,t,n){const s=i._adapter,o=+s.startOf(e[0].value,n),r=e[e.length-1].value;let a,l;for(a=o;a<=r;a=+s.add(a,1,n))l=t[a],l>=0&&(e[l].major=!0);return e}(i,n,s,t):n}let sn=(()=>{class i extends Dt{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n){const s=t.time||(t.time={}),o=this._adapter=new Yu._date(t.adapters.date);o.init(n),Jt(s.displayFormats,o.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return void 0===t?null:Jo(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,s=t.time.unit||"day";let{min:o,max:r,minDefined:a,maxDefined:l}=this.getUserBounds();function c(h){!a&&!isNaN(h.min)&&(o=Math.min(o,h.min)),!l&&!isNaN(h.max)&&(r=Math.max(r,h.max))}(!a||!l)&&(c(this._getLabelBounds()),("ticks"!==t.bounds||"labels"!==t.ticks.source)&&c(this.getMinMax(!1))),o=H(o)&&!isNaN(o)?o:+n.startOf(Date.now(),s),r=H(r)&&!isNaN(r)?r:+n.endOf(Date.now(),s)+1,this.min=Math.min(o,r-1),this.max=Math.max(o+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],s=t[t.length-1]),{min:n,max:s}}buildTicks(){const t=this.options,n=t.time,s=t.ticks,o="labels"===s.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&o.length&&(this.min=this._userMin||o[0],this.max=this._userMax||o[o.length-1]);const r=this.min,l=function Oh(i,e,t){let n=0,s=i.length;for(;n<s&&i[n]<e;)n++;for(;s>n&&i[s-1]>t;)s--;return n>0||s<i.length?i.slice(n,s):i}(o,r,this.max);return this._unit=n.unit||(s.autoSkip?Qo(n.minUnit,this.min,this.max,this._getLabelCapacity(r)):function op(i,e,t,n,s){for(let o=J.length-1;o>=J.indexOf(t);o--){const r=J[o];if(oi[r].common&&i._adapter.diff(s,n,r)>=e-1)return r}return J[t?J.indexOf(t):0]}(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=s.major.enabled&&"year"!==this._unit?function rp(i){for(let e=J.indexOf(i)+1,t=J.length;e<t;++e)if(oi[J[e]].common)return J[e]}(this._unit):void 0,this.initOffsets(o),t.reverse&&l.reverse(),er(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t){let o,r,n=0,s=0;this.options.offset&&t.length&&(o=this.getDecimalForValue(t[0]),n=1===t.length?1-o:(this.getDecimalForValue(t[1])-o)/2,r=this.getDecimalForValue(t[t.length-1]),s=1===t.length?r:(r-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;n=X(n,0,a),s=X(s,0,a),this._offsets={start:n,end:s,factor:1/(n+1+s)}}_generate(){const t=this._adapter,n=this.min,s=this.max,o=this.options,r=o.time,a=r.unit||Qo(r.minUnit,n,s,this._getLabelCapacity(n)),l=C(r.stepSize,1),c="week"===a&&r.isoWeekday,h=jt(c)||!0===c,d={};let f,g,u=n;if(h&&(u=+t.startOf(u,"isoWeek",c)),u=+t.startOf(u,h?"day":a),t.diff(s,n,a)>1e5*l)throw new Error(n+" and "+s+" are too far apart with stepSize of "+l+" "+a);const p="data"===o.ticks.source&&this.getDataTimestamps();for(f=u,g=0;f<s;f=+t.add(f,l,a),g++)tr(d,f,p);return(f===s||"ticks"===o.bounds||1===g)&&tr(d,f,p),Object.keys(d).sort((m,b)=>m-b).map(m=>+m)}getLabelForValue(t){const s=this.options.time;return this._adapter.format(t,s.tooltipFormat?s.tooltipFormat:s.displayFormats.datetime)}_tickFormatFunction(t,n,s,o){const r=this.options,a=r.time.displayFormats,l=this._unit,c=this._majorUnit,d=c&&a[c],u=s[n],g=this._adapter.format(t,o||(c&&d&&u&&u.major?d:l&&a[l])),p=r.ticks.callback;return p?B(p,[g,n,s],this):g}generateTickLabels(t){let n,s,o;for(n=0,s=t.length;n<s;++n)o=t[n],o.label=this._tickFormatFunction(o.value,n,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,s=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+s)*n.factor)}getValueForPixel(t){const n=this._offsets,s=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+s*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,s=this.ctx.measureText(t).width,o=st(this.isHorizontal()?n.maxRotation:n.minRotation),r=Math.cos(o),a=Math.sin(o),l=this._resolveTickFontOptions(0).size;return{w:s*r+l*a,h:s*a+l*r}}_getLabelCapacity(t){const n=this.options.time,s=n.displayFormats,o=s[n.unit]||s.millisecond,r=this._tickFormatFunction(t,0,er(this,[t],this._majorUnit),o),a=this._getLabelSize(r),l=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return l>0?l:1}getDataTimestamps(){let n,s,t=this._cache.data||[];if(t.length)return t;const o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(n=0,s=o.length;n<s;++n)t=t.concat(o[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,s;if(t.length)return t;const o=this.getLabels();for(n=0,s=o.length;n<s;++n)t.push(Jo(this,o[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Qn(t.sort(sp))}}return i.id="time",i.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}},i})();function ri(i,e,t){let o,r,a,l,n=0,s=i.length-1;t?(e>=i[n].pos&&e<=i[s].pos&&({lo:n,hi:s}=ut(i,"pos",e)),({pos:o,time:a}=i[n]),({pos:r,time:l}=i[s])):(e>=i[n].time&&e<=i[s].time&&({lo:n,hi:s}=ut(i,"time",e)),({time:o,pos:a}=i[n]),({time:r,pos:l}=i[s]));const c=r-o;return c?a+(l-a)*(e-o)/c:a}class on extends sn{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=ri(t,this.min),this._tableRange=ri(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:n}=this,s=[],o=[];let r,a,l,c,h;for(r=0,a=e.length;r<a;++r)c=e[r],c>=t&&c<=n&&s.push(c);if(s.length<2)return[{time:t,pos:0},{time:n,pos:1}];for(r=0,a=s.length;r<a;++r)h=s[r+1],l=s[r-1],c=s[r],Math.round((h+l)/2)!==c&&o.push({time:c,pos:r/(a-1)});return o}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const t=this.getDataTimestamps(),n=this.getLabelTimestamps();return e=t.length&&n.length?this.normalize(t.concat(n)):t.length?t:n,e=this._cache.all=e,e}getDecimalForValue(e){return(ri(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end;return ri(this._table,n*this._tableRange+this._minPos,!0)}}on.id="timeseries",on.defaults=sn.defaults;const dp=i=>{const{chart:e,tooltip:t}=i,n=(i=>{let e=i.canvas.parentNode.querySelector("div");if(!e){e=document.createElement("div"),e.classList.add("chartjs-tooltip");const t=document.createElement("table");t.style.margin="0px",e.appendChild(t),i.canvas.parentNode.appendChild(e)}return e})(e);if(0===t.opacity)return void(n.style.opacity=0);if(t.body){const r=t.title||[],a=t.body.map(d=>d.lines),l=document.createElement("thead");l.classList.add("chartjs-tooltip-header"),r.forEach(d=>{const u=document.createElement("tr");u.style.borderWidth=0,u.classList.add("chartjs-tooltip-header-item");const f=document.createElement("th");f.style.borderWidth=0;const g=document.createTextNode(d);f.appendChild(g),u.appendChild(f),l.appendChild(u)});const c=document.createElement("tbody");c.classList.add("chartjs-tooltip-body"),a.forEach((d,u)=>{const f=t.labelColors[u],g=document.createElement("span");g.style.background=f.backgroundColor,g.style.borderColor=f.borderColor,g.style.borderWidth="2px",g.style.marginRight="10px",g.style.height="10px",g.style.width="10px",g.style.display="inline-block";const p=document.createElement("tr");p.classList.add("chartjs-tooltip-body-item");const m=document.createElement("td");m.style.borderWidth=0;const b=document.createTextNode(d);m.appendChild(g),m.appendChild(b),p.appendChild(m),c.appendChild(p)});const h=n.querySelector("table");for(;h.firstChild;)h.firstChild.remove();h.appendChild(l),h.appendChild(c)}const{offsetLeft:s,offsetTop:o}=e.canvas;n.style.opacity=1,n.style.left=s+t.caretX+"px",n.style.top=o+t.caretY+"px",n.style.font=t.options.bodyFont.string,n.style.padding=t.padding+"px "+t.padding+"px"},up=["canvasElement"],fp=["*"];Ze.register($u,ng,Hg,Object.freeze({__proto__:null,CategoryScale:ni,LinearScale:tn,LogarithmicScale:en,RadialLinearScale:xe,TimeScale:sn,TimeSeriesScale:on}));let gp=0,pp=(()=>{class i{get hostClasses(){return{"chart-wrapper":this.wrapper}}constructor(t,n,s,o){this.elementRef=t,this.ngZone=n,this.renderer=s,this.changeDetectorRef=o,this.customTooltips=!0,this.id="c-chartjs-"+gp++,this.plugins=[],this.redraw=!1,this.type="bar",this.wrapper=!0,this.getDatasetAtEvent=new O.bkB,this.getElementAtEvent=new O.bkB,this.getElementsAtEvent=new O.bkB,this.chartRef=new O.bkB}ngAfterViewInit(){this.chartRender()}ngOnChanges(t){t.data&&!t.data.firstChange&&this.chartUpdate()}ngOnDestroy(){this.chartDestroy()}handleClick(t){if(!this.chart)return;const n=this.chart.getElementsAtEventForMode(t,"dataset",{intersect:!0},!1);this.getDatasetAtEvent.emit(n);const s=this.chart.getElementsAtEventForMode(t,"nearest",{intersect:!0},!1);this.getElementAtEvent.emit(s);const o=this.chart.getElementsAtEventForMode(t,"index",{intersect:!0},!1);this.getElementsAtEvent.emit(o)}chartDestroy(){this.chart?.destroy(),this.chartRef.emit(void 0)}chartRender(){if(!this.canvasElement)return;const t=this.canvasElement.nativeElement.getContext("2d");this.ngZone.runOutsideAngular(()=>{const n=this.chartConfig();n&&setTimeout(()=>{this.chart=new Ze(t,n),this.renderer.setStyle(this.canvasElement.nativeElement,"display","block"),this.changeDetectorRef.markForCheck(),this.chartRef.emit(this.chart)})})}chartUpdate(){if(!this.chart)return;if(this.redraw)return this.chartDestroy(),void setTimeout(()=>{this.chartRender()});const t=this.chartConfig();this.options&&Object.assign(this.chart.options??{},t.options??{}),this.chart.config.data||(this.chart.config.data={...t.data},this.chartUpdateOutsideAngular()),this.chart&&(Object.assign(this.chart.config.options??{},t.options??{}),Object.assign(this.chart.config.plugins??[],t.plugins??[]),Object.assign(this.chart.config.data,t.data)),this.chartUpdateOutsideAngular()}chartUpdateOutsideAngular(){setTimeout(()=>{this.ngZone.runOutsideAngular(()=>{this.chart?.update(),this.changeDetectorRef.markForCheck()})})}chartToBase64Image(){return this.chart?.toBase64Image()}chartDataConfig(){return{labels:this.data?.labels??[],datasets:this.data?.datasets??[]}}chartOptions(){return this.options}chartConfig(){return this.chartCustomTooltips(),{data:this.chartDataConfig(),options:this.chartOptions(),plugins:this.plugins,type:this.type}}chartCustomTooltips(){if(this.customTooltips){const t=this.options,n=this.options?.plugins,s=this.options?.plugins?.tooltip;this.options=fh({...t,plugins:{...n,tooltip:{...s,enabled:!1,mode:"index",position:"nearest",external:dp}}})}}static#t=this.\u0275fac=function(n){return new(n||i)(O.rXU(O.aKT),O.rXU(O.SKi),O.rXU(O.sFG),O.rXU(O.gRc))};static#e=this.\u0275cmp=O.VBU({type:i,selectors:[["c-chart"]],viewQuery:function(n,s){if(1&n&&O.GBs(up,5),2&n){let o;O.mGM(o=O.lsd())&&(s.canvasElement=o.first)}},hostVars:6,hostBindings:function(n,s){2&n&&(O.HbH(s.hostClasses),O.xc7("height",s.height,"px")("width",s.width,"px"))},inputs:{customTooltips:"customTooltips",data:"data",height:[O.Mj6.HasDecoratorInputTransform,"height","height",t=>(0,O.Udg)(t,void 0)],id:"id",options:"options",plugins:"plugins",redraw:[O.Mj6.HasDecoratorInputTransform,"redraw","redraw",O.L39],type:"type",width:[O.Mj6.HasDecoratorInputTransform,"width","width",t=>(0,O.Udg)(t,void 0)],wrapper:"wrapper"},outputs:{getDatasetAtEvent:"getDatasetAtEvent",getElementAtEvent:"getElementAtEvent",getElementsAtEvent:"getElementsAtEvent",chartRef:"chartRef"},exportAs:["cChart"],standalone:!0,features:[O.GFd,O.OA$,O.aNF],ngContentSelectors:fp,decls:3,vars:3,consts:[["canvasElement",""],["role","img",2,"display","none",3,"click","height","id","width"]],template:function(n,s){if(1&n){const o=O.RV6();O.NAR(),O.j41(0,"canvas",1,0),O.bIt("click",function(a){return O.eBV(o),O.Njj(s.handleClick(a))}),O.SdG(2),O.k0s()}2&n&&O.Y8G("height",s.height)("id",s.id)("width",s.width)},styles:[".chart-wrapper[_nghost-%COMP%]{display:block}"],changeDetection:0})}return i})(),mp=(()=>{class i{static#t=this.\u0275fac=function(n){return new(n||i)};static#e=this.\u0275mod=O.$C({type:i});static#i=this.\u0275inj=O.G2t({})}return i})()}}]); |