websites/eddie.sh-deno/_site/oneshots/bofa-rewards/chart.js

33 lines
203 KiB
JavaScript

var vn=Object.defineProperty;var d=(t,e)=>vn(t,"name",{value:e,configurable:!0});function Jt(t){return t+.5|0}d(Jt,"m");var _t=d((t,e,i)=>Math.max(Math.min(t,i),e),"b");function Kt(t){return _t(Jt(t*2.55),0,255)}d(Kt,"x");function yt(t){return _t(Jt(t*255),0,255)}d(yt,"d");function ft(t){return _t(Jt(t/2.55)/100,0,1)}d(ft,"o");function Ki(t){return _t(Jt(t*100),0,100)}d(Ki,"X");var st={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},li=[..."0123456789ABCDEF"],Mn=d(t=>li[t&15],"Z"),wn=d(t=>li[(t&240)>>4]+li[t&15],"A"),Me=d(t=>(t&240)>>4===(t&15),"F"),kn=d(t=>Me(t.r)&&Me(t.g)&&Me(t.b)&&Me(t.a),"U");function Sn(t){var e=t.length,i;return t[0]==="#"&&(e===4||e===5?i={r:255&st[t[1]]*17,g:255&st[t[2]]*17,b:255&st[t[3]]*17,a:e===5?st[t[4]]*17:255}:(e===7||e===9)&&(i={r:st[t[1]]<<4|st[t[2]],g:st[t[3]]<<4|st[t[4]],b:st[t[5]]<<4|st[t[6]],a:e===9?st[t[7]]<<4|st[t[8]]:255})),i}d(Sn,"V");var Pn=d((t,e)=>t<255?e(t):"","H");function Dn(t){var e=kn(t)?Mn:wn;return t?"#"+e(t.r)+e(t.g)+e(t.b)+Pn(t.a,e):void 0}d(Dn,"W");var Cn=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Qi(t,e,i){let s=e*Math.min(i,1-i),a=d((n,r=(n+t/30)%12)=>i-s*Math.max(Math.min(r-3,9-r,1),-1),"r");return[a(0),a(8),a(4)]}d(Qi,"$");function On(t,e,i){let s=d((a,n=(a+t/60)%6)=>i-i*e*Math.max(Math.min(n,4-n,1),0),"t");return[s(5),s(3),s(1)]}d(On,"L");function An(t,e,i){let s=Qi(t,1,.5),a;for(e+i>1&&(a=1/(e+i),e*=a,i*=a),a=0;a<3;a++)s[a]*=1-e-i,s[a]+=e;return s}d(An,"j");function Ln(t,e,i,s,a){return t===a?(e-i)/s+(e<i?6:0):e===a?(i-t)/s+2:(t-e)/s+4}d(Ln,"N");function hi(t){let e=t.r/255,i=t.g/255,s=t.b/255,a=Math.max(e,i,s),n=Math.min(e,i,s),r=(a+n)/2,o,l,h;return a!==n&&(h=a-n,l=r>.5?h/(2-a-n):h/(a+n),o=Ln(e,i,s,h,a),o=o*60+.5),[o|0,l||0,r]}d(hi,"_");function di(t,e,i,s){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,s)).map(yt)}d(di,"M");function ci(t,e,i){return di(Qi,t,e,i)}d(ci,"S");function Tn(t,e,i){return di(An,t,e,i)}d(Tn,"K");function En(t,e,i){return di(On,t,e,i)}d(En,"B");function ts(t){return(t%360+360)%360}d(ts,"P");function Rn(t){let e=Cn.exec(t),i=255,s;if(!e)return;e[5]!==s&&(i=e[6]?Kt(+e[5]):yt(+e[5]));let a=ts(+e[2]),n=+e[3]/100,r=+e[4]/100;return e[1]==="hwb"?s=Tn(a,n,r):e[1]==="hsv"?s=En(a,n,r):s=ci(a,n,r),{r:s[0],g:s[1],b:s[2],a:i}}d(Rn,"Q");function In(t,e){var i=hi(t);i[0]=ts(i[0]+e),i=ci(i),t.r=i[0],t.g=i[1],t.b=i[2]}d(In,"D");function Fn(t){if(!t)return;let e=hi(t),i=e[0],s=Ki(e[1]),a=Ki(e[2]);return t.a<255?`hsla(${i}, ${s}%, ${a}%, ${ft(t.a)})`:`hsl(${i}, ${s}%, ${a}%)`}d(Fn,"v");var Gi={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"},Ji={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function zn(){let t={},e=Object.keys(Ji),i=Object.keys(Gi),s,a,n,r,o;for(s=0;s<e.length;s++){for(r=o=e[s],a=0;a<i.length;a++)n=i[a],o=o.replace(n,Gi[n]);n=parseInt(Ji[r],16),t[o]=[n>>16&255,n>>8&255,n&255]}return t}d(zn,"G");var we;function Vn(t){we||(we=zn(),we.transparent=[0,0,0,0]);let e=we[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}d(Vn,"I");var Bn=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Wn(t){let e=Bn.exec(t),i=255,s,a,n;if(e){if(e[7]!==s){let r=+e[7];i=e[8]?Kt(r):_t(r*255,0,255)}return s=+e[1],a=+e[3],n=+e[5],s=255&(e[2]?Kt(s):_t(s,0,255)),a=255&(e[4]?Kt(a):_t(a,0,255)),n=255&(e[6]?Kt(n):_t(n,0,255)),{r:s,g:a,b:n,a:i}}}d(Wn,"z");function Nn(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${ft(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}d(Nn,"C");var oi=d(t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,"w"),Bt=d(t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4),"h");function Hn(t,e,i){let s=Bt(ft(t.r)),a=Bt(ft(t.g)),n=Bt(ft(t.b));return{r:yt(oi(s+i*(Bt(ft(e.r))-s))),g:yt(oi(a+i*(Bt(ft(e.g))-a))),b:yt(oi(n+i*(Bt(ft(e.b))-n))),a:t.a+i*(e.a-t.a)}}d(Hn,"ee");function ke(t,e,i){if(t){let s=hi(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*i,e===0?360:1)),s=ci(s),t.r=s[0],t.g=s[1],t.b=s[2]}}d(ke,"Y");function es(t,e){return t&&Object.assign(e||{},t)}d(es,"T");function Zi(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=yt(t[3]))):(e=es(t,{r:0,g:0,b:0,a:1}),e.a=yt(e.a)),e}d(Zi,"R");function jn(t){return t.charAt(0)==="r"?Wn(t):Rn(t)}d(jn,"ne");var Gt=d(class{constructor(t){if(t instanceof Gt)return t;let e=typeof t,i;e==="object"?i=Zi(t):e==="string"&&(i=Sn(t)||Vn(t)||jn(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=es(this._rgb);return t&&(t.a=ft(t.a)),t}set rgb(t){this._rgb=Zi(t)}rgbString(){return this._valid?Nn(this._rgb):void 0}hexString(){return this._valid?Dn(this._rgb):void 0}hslString(){return this._valid?Fn(this._rgb):void 0}mix(t,e){if(t){let i=this.rgb,s=t.rgb,a,n=e===a?.5:e,r=2*n-1,o=i.a-s.a,l=((r*o===-1?r:(r+o)/(1+r*o))+1)/2;a=1-l,i.r=255&l*i.r+a*s.r+.5,i.g=255&l*i.g+a*s.g+.5,i.b=255&l*i.b+a*s.b+.5,i.a=n*i.a+(1-n)*s.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=Hn(this._rgb,t._rgb,e)),this}clone(){return new Gt(this.rgb)}alpha(t){return this._rgb.a=yt(t),this}clearer(t){let e=this._rgb;return e.a*=1-t,this}greyscale(){let t=this._rgb,e=Jt(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){let e=this._rgb;return e.a*=1+t,this}negate(){let t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return ke(this._rgb,2,t),this}darken(t){return ke(this._rgb,2,-t),this}saturate(t){return ke(this._rgb,1,t),this}desaturate(t){return ke(this._rgb,1,-t),this}rotate(t){return In(this._rgb,t),this}},"l");var $n=Object.defineProperty,Yn=d((t,e,i)=>e in t?$n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,"Mo"),S=d((t,e,i)=>(Yn(t,typeof e!="symbol"?e+"":e,i),i),"S");function gt(){}d(gt,"ct");var Un=(()=>{let t=0;return()=>t++})();function T(t){return t===null||typeof t>"u"}d(T,"T");function F(t){if(Array.isArray&&Array.isArray(t))return!0;let e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}d(F,"z");function A(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}d(A,"A");function W(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}d(W,"W");function et(t,e){return W(t)?t:e}d(et,"Q");function O(t,e){return typeof t>"u"?e:t}d(O,"D");var Xn=d((t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,"Ds"),ma=d((t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t,"yi");function I(t,e,i){if(t&&typeof t.call=="function")return t.apply(i,e)}d(I,"I");function R(t,e,i,s){let a,n,r;if(F(t))if(n=t.length,s)for(a=n-1;a>=0;a--)e.call(i,t[a],a);else for(a=0;a<n;a++)e.call(i,t[a],a);else if(A(t))for(r=Object.keys(t),n=r.length,a=0;a<n;a++)e.call(i,t[r[a]],r[a])}d(R,"R");function $e(t,e){let i,s,a,n;if(!t||!e||t.length!==e.length)return!1;for(i=0,s=t.length;i<s;++i)if(a=t[i],n=e[i],a.datasetIndex!==n.datasetIndex||a.index!==n.index)return!1;return!0}d($e,"me");function Ye(t){if(F(t))return t.map(Ye);if(A(t)){let e=Object.create(null),i=Object.keys(t),s=i.length,a=0;for(;a<s;++a)e[i[a]]=Ye(t[i[a]]);return e}return t}d(Ye,"We");function ba(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}d(ba,"Os");function qn(t,e,i,s){if(!ba(t))return;let a=e[t],n=i[t];A(a)&&A(n)?ue(a,n,s):e[t]=Ye(n)}d(qn,"ko");function ue(t,e,i){let s=F(e)?e:[e],a=s.length;if(!A(t))return t;i=i||{};let n=i.merger||qn,r;for(let o=0;o<a;++o){if(r=s[o],!A(r))continue;let l=Object.keys(r);for(let h=0,c=l.length;h<c;++h)n(l[h],t,r,i)}return t}d(ue,"jt");function re(t,e){return ue(t,e,{merger:Kn})}d(re,"Yt");function Kn(t,e,i){if(!ba(t))return;let s=e[t],a=i[t];A(s)&&A(a)?re(s,a):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=Ye(a))}d(Kn,"wo");var is={"":t=>t,x:t=>t.x,y:t=>t.y};function Gn(t){let e=t.split("."),i=[],s="";for(let a of e)s+=a,s.endsWith("\\")?s=s.slice(0,-1)+".":(i.push(s),s="");return i}d(Gn,"So");function Jn(t){let e=Gn(t);return i=>{for(let s of e){if(s==="")break;i=i&&i[s]}return i}}d(Jn,"Po");function kt(t,e){return(is[e]||(is[e]=Jn(e)))(t)}d(kt,"mt");function zi(t){return t.charAt(0).toUpperCase()+t.slice(1)}d(zi,"Ue");var at=d(t=>typeof t<"u","it"),St=d(t=>typeof t=="function","gt"),ss=d((t,e)=>{if(t.size!==e.size)return!1;for(let i of t)if(!e.has(i))return!1;return!0},"vi");function Zn(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}d(Zn,"Cs");var B=Math.PI,z=2*B,Qn=z+B,Ue=Number.POSITIVE_INFINITY,tr=B/180,N=B/2,Dt=B/4,as=B*2/3,vt=Math.log10,ut=Math.sign;function oe(t,e,i){return Math.abs(t-e)<i}d(oe,"Xt");function ns(t){let e=Math.round(t);t=oe(t,e,t/1e3)?e:t;let i=Math.pow(10,Math.floor(vt(t))),s=t/i;return(s<=1?1:s<=2?2:s<=5?5:10)*i}d(ns,"Mi");function er(t){let e=[],i=Math.sqrt(t),s;for(s=1;s<i;s++)t%s===0&&(e.push(s),e.push(t/s));return i===(i|0)&&e.push(i),e.sort((a,n)=>a-n).pop(),e}d(er,"As");function Ht(t){return!isNaN(parseFloat(t))&&isFinite(t)}d(Ht,"Rt");function ir(t,e){let i=Math.round(t);return i-e<=t&&i+e>=t}d(ir,"Ts");function xa(t,e,i){let s,a,n;for(s=0,a=t.length;s<a;s++)n=t[s][i],isNaN(n)||(e.min=Math.min(e.min,n),e.max=Math.max(e.max,n))}d(xa,"ki");function rt(t){return t*(B/180)}d(rt,"ot");function Vi(t){return t*(180/B)}d(Vi,"Ye");function rs(t){if(!W(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}d(rs,"wi");function _a(t,e){let i=e.x-t.x,s=e.y-t.y,a=Math.sqrt(i*i+s*s),n=Math.atan2(s,i);return n<-.5*B&&(n+=z),{angle:n,distance:a}}d(_a,"Si");function wi(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}d(wi,"je");function sr(t,e){return(t-e+Qn)%z-B}d(sr,"Co");function it(t){return(t%z+z)%z}d(it,"J");function fe(t,e,i,s){let a=it(t),n=it(e),r=it(i),o=it(n-a),l=it(r-a),h=it(a-n),c=it(a-r);return a===n||a===r||s&&n===r||o>l&&h<c}d(fe,"Kt");function Y(t,e,i){return Math.max(e,Math.min(i,t))}d(Y,"U");function ar(t){return Y(t,-32768,32767)}d(ar,"Ls");function bt(t,e,i,s=1e-6){return t>=Math.min(e,i)-s&&t<=Math.max(e,i)+s}d(bt,"ht");function Bi(t,e,i){i=i||(r=>t[r]<e);let s=t.length-1,a=0,n;for(;s-a>1;)n=a+s>>1,i(n)?a=n:s=n;return{lo:a,hi:s}}d(Bi,"Xe");var xt=d((t,e,i,s)=>Bi(t,i,s?a=>{let n=t[a][e];return n<i||n===i&&t[a+1][e]===i}:a=>t[a][e]<i),"lt"),nr=d((t,e,i)=>Bi(t,i,s=>t[s][e]>=i),"Rs");function rr(t,e,i){let s=0,a=t.length;for(;s<a&&t[s]<e;)s++;for(;a>s&&t[a-1]>i;)a--;return s>0||a<t.length?t.slice(s,a):t}d(rr,"Es");var ya=["push","pop","shift","splice","unshift"];function or(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),ya.forEach(i=>{let s="_onData"+zi(i),a=t[i];Object.defineProperty(t,i,{configurable:!0,enumerable:!1,value(...n){let r=a.apply(this,n);return t._chartjs.listeners.forEach(o=>{typeof o[s]=="function"&&o[s](...n)}),r}})})}d(or,"zs");function os(t,e){let i=t._chartjs;if(!i)return;let s=i.listeners,a=s.indexOf(e);a!==-1&&s.splice(a,1),!(s.length>0)&&(ya.forEach(n=>{delete t[n]}),delete t._chartjs)}d(os,"Pi");function va(t){let e=new Set,i,s;for(i=0,s=t.length;i<s;++i)e.add(t[i]);return e.size===s?t:Array.from(e)}d(va,"Di");var Ma=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function wa(t,e){let i=[],s=!1;return function(...a){i=a,s||(s=!0,Ma.call(window,()=>{s=!1,t.apply(e,i)}))}}d(wa,"Ci");function lr(t,e){let i;return function(...s){return e?(clearTimeout(i),i=setTimeout(t,e,s)):t.apply(this,s),e}}d(lr,"Fs");var Wi=d(t=>t==="start"?"left":t==="end"?"right":"center","Ke"),U=d((t,e,i)=>t==="start"?e:t==="end"?i:(e+i)/2,"X"),hr=d((t,e,i,s)=>t===(s?"left":"right")?i:t==="center"?(e+i)/2:e,"Bs");function ka(t,e,i){let s=e.length,a=0,n=s;if(t._sorted){let{iScale:r,_parsed:o}=t,l=r.axis,{min:h,max:c,minDefined:u,maxDefined:f}=r.getUserBounds();u&&(a=Y(Math.min(xt(o,r.axis,h).lo,i?s:xt(e,l,r.getPixelForValue(h)).lo),0,s-1)),f?n=Y(Math.max(xt(o,r.axis,c,!0).hi+1,i?0:xt(e,l,r.getPixelForValue(c),!0).hi+1),a,s)-a:n=s-a}return{start:a,count:n}}d(ka,"Ai");function Sa(t){let{xScale:e,yScale:i,_scaleRanges:s}=t,a={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!s)return t._scaleRanges=a,!0;let n=s.xmin!==e.min||s.xmax!==e.max||s.ymin!==i.min||s.ymax!==i.max;return Object.assign(s,a),n}d(Sa,"Ti");var Se=d(t=>t===0||t===1,"Be"),ls=d((t,e,i)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*z/i)),"bs"),hs=d((t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*z/i)+1,"_s"),le={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*N)+1,easeOutSine:t=>Math.sin(t*N),easeInOutSine:t=>-.5*(Math.cos(B*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>Se(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Se(t)?t:ls(t,.075,.3),easeOutElastic:t=>Se(t)?t:hs(t,.075,.3),easeInOutElastic(t){return Se(t)?t:t<.5?.5*ls(t*2,.1125,.45):.5+.5*hs(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-le.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?le.easeInBounce(t*2)*.5:le.easeOutBounce(t*2-1)*.5+.5};function Pa(t){if(t&&typeof t=="object"){let e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}d(Pa,"Vs");function ds(t){return Pa(t)?t:new Gt(t)}d(ds,"Li");function ui(t){return Pa(t)?t:new Gt(t).saturate(.5).darken(.1).hexString()}d(ui,"bi");var dr=["x","y","borderWidth","radius","tension"],cr=["color","borderColor","backgroundColor"];function ur(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}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:cr},numbers:{type:"number",properties:dr}}),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:e=>e|0}}}})}d(ur,"Lo");function fr(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}d(fr,"Ro");var cs=new Map;function gr(t,e){e=e||{};let i=t+JSON.stringify(e),s=cs.get(i);return s||(s=new Intl.NumberFormat(t,e),cs.set(i,s)),s}d(gr,"Eo");function _e(t,e,i){return gr(e,i).format(t)}d(_e,"qt");var Da={values(t){return F(t)?t:""+t},numeric(t,e,i){if(t===0)return"0";let s=this.chart.options.locale,a,n=t;if(i.length>1){let h=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(h<1e-4||h>1e15)&&(a="scientific"),n=pr(t,i)}let r=vt(Math.abs(n)),o=Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:a,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(l,this.options.ticks.format),_e(t,s,l)},logarithmic(t,e,i){if(t===0)return"0";let s=i[e].significand||t/Math.pow(10,Math.floor(vt(t)));return[1,2,3,5,10,15].includes(s)||e>.8*i.length?Da.numeric.call(this,t,e,i):""}};function pr(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t)),i}d(pr,"Io");var ti={formatters:Da};function mr(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,i)=>i.lineWidth,tickColor:(e,i)=>i.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:ti.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.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}d(mr,"zo");var Ft=Object.create(null),ki=Object.create(null);function he(t,e){if(!e)return t;let i=e.split(".");for(let s=0,a=i.length;s<a;++s){let n=i[s];t=t[n]||(t[n]=Object.create(null))}return t}d(he,"ge");function fi(t,e,i){return typeof e=="string"?ue(he(t,e),i):ue(he(t,""),e)}d(fi,"_i");var br=d(class{constructor(t,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=i=>i.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=(i,s)=>ui(s.backgroundColor),this.hoverBorderColor=(i,s)=>ui(s.borderColor),this.hoverColor=(i,s)=>ui(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return fi(this,t,e)}get(t){return he(this,t)}describe(t,e){return fi(ki,t,e)}override(t,e){return fi(Ft,t,e)}route(t,e,i,s){let a=he(this,t),n=he(this,i),r="_"+e;Object.defineProperties(a,{[r]:{value:a[e],writable:!0},[e]:{enumerable:!0,get(){let o=this[r],l=n[s];return A(o)?Object.assign({},l,o):O(o,l)},set(o){this[r]=o}}})}apply(t){t.forEach(e=>e(this))}},"xi"),H=new br({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[ur,fr,mr]);function xr(t){return!t||T(t.size)||T(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}d(xr,"Fo");function Xe(t,e,i,s,a){let n=e[a];return n||(n=e[a]=t.measureText(a).width,i.push(a)),n>s&&(s=n),s}d(Xe,"pe");function _r(t,e,i,s){s=s||{};let a=s.data=s.data||{},n=s.garbageCollect=s.garbageCollect||[];s.font!==e&&(a=s.data={},n=s.garbageCollect=[],s.font=e),t.save(),t.font=e;let r=0,o=i.length,l,h,c,u,f;for(l=0;l<o;l++)if(u=i[l],u!=null&&F(u)!==!0)r=Xe(t,a,n,r,u);else if(F(u))for(h=0,c=u.length;h<c;h++)f=u[h],f!=null&&!F(f)&&(r=Xe(t,a,n,r,f));t.restore();let g=n.length/2;if(g>i.length){for(l=0;l<g;l++)delete a[n[l]];n.splice(0,g)}return r}d(_r,"Ws");function Ct(t,e,i){let s=t.currentDevicePixelRatio,a=i!==0?Math.max(i/2,.5):0;return Math.round((e-a)*s)/s+a}d(Ct,"St");function us(t,e){e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}d(us,"Ri");function Si(t,e,i,s){Ca(t,e,i,s,null)}d(Si,"Ge");function Ca(t,e,i,s,a){let n,r,o,l,h,c,u,f,g=e.pointStyle,p=e.rotation,b=e.radius,m=(p||0)*tr;if(g&&typeof g=="object"&&(n=g.toString(),n==="[object HTMLImageElement]"||n==="[object HTMLCanvasElement]")){t.save(),t.translate(i,s),t.rotate(m),t.drawImage(g,-g.width/2,-g.height/2,g.width,g.height),t.restore();return}if(!(isNaN(b)||b<=0)){switch(t.beginPath(),g){default:a?t.ellipse(i,s,a/2,b,0,0,z):t.arc(i,s,b,0,z),t.closePath();break;case"triangle":c=a?a/2:b,t.moveTo(i+Math.sin(m)*c,s-Math.cos(m)*b),m+=as,t.lineTo(i+Math.sin(m)*c,s-Math.cos(m)*b),m+=as,t.lineTo(i+Math.sin(m)*c,s-Math.cos(m)*b),t.closePath();break;case"rectRounded":h=b*.516,l=b-h,r=Math.cos(m+Dt)*l,u=Math.cos(m+Dt)*(a?a/2-h:l),o=Math.sin(m+Dt)*l,f=Math.sin(m+Dt)*(a?a/2-h:l),t.arc(i-u,s-o,h,m-B,m-N),t.arc(i+f,s-r,h,m-N,m),t.arc(i+u,s+o,h,m,m+N),t.arc(i-f,s+r,h,m+N,m+B),t.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*b,c=a?a/2:l,t.rect(i-c,s-l,2*c,2*l);break}m+=Dt;case"rectRot":u=Math.cos(m)*(a?a/2:b),r=Math.cos(m)*b,o=Math.sin(m)*b,f=Math.sin(m)*(a?a/2:b),t.moveTo(i-u,s-o),t.lineTo(i+f,s-r),t.lineTo(i+u,s+o),t.lineTo(i-f,s+r),t.closePath();break;case"crossRot":m+=Dt;case"cross":u=Math.cos(m)*(a?a/2:b),r=Math.cos(m)*b,o=Math.sin(m)*b,f=Math.sin(m)*(a?a/2:b),t.moveTo(i-u,s-o),t.lineTo(i+u,s+o),t.moveTo(i+f,s-r),t.lineTo(i-f,s+r);break;case"star":u=Math.cos(m)*(a?a/2:b),r=Math.cos(m)*b,o=Math.sin(m)*b,f=Math.sin(m)*(a?a/2:b),t.moveTo(i-u,s-o),t.lineTo(i+u,s+o),t.moveTo(i+f,s-r),t.lineTo(i-f,s+r),m+=Dt,u=Math.cos(m)*(a?a/2:b),r=Math.cos(m)*b,o=Math.sin(m)*b,f=Math.sin(m)*(a?a/2:b),t.moveTo(i-u,s-o),t.lineTo(i+u,s+o),t.moveTo(i+f,s-r),t.lineTo(i-f,s+r);break;case"line":r=a?a/2:Math.cos(m)*b,o=Math.sin(m)*b,t.moveTo(i-r,s-o),t.lineTo(i+r,s+o);break;case"dash":t.moveTo(i,s),t.lineTo(i+Math.cos(m)*(a?a/2:b),s+Math.sin(m)*b);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}d(Ca,"Ei");function ge(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}d(ge,"$t");function ei(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}d(ei,"be");function ii(t){t.restore()}d(ii,"_e");function yr(t,e,i,s,a){if(!e)return t.lineTo(i.x,i.y);if(a==="middle"){let n=(e.x+i.x)/2;t.lineTo(n,e.y),t.lineTo(n,i.y)}else a==="after"!=!!s?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}d(yr,"Hs");function vr(t,e,i,s){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(s?e.cp1x:e.cp2x,s?e.cp1y:e.cp2y,s?i.cp2x:i.cp1x,s?i.cp2y:i.cp1y,i.x,i.y)}d(vr,"js");function zt(t,e,i,s,a,n={}){let r=F(e)?e:[e],o=n.strokeWidth>0&&n.strokeColor!=="",l,h;for(t.save(),t.font=a.string,Mr(t,n),l=0;l<r.length;++l)h=r[l],n.backdrop&&kr(t,n.backdrop),o&&(n.strokeColor&&(t.strokeStyle=n.strokeColor),T(n.strokeWidth)||(t.lineWidth=n.strokeWidth),t.strokeText(h,i,s,n.maxWidth)),t.fillText(h,i,s,n.maxWidth),wr(t,i,s,h,n),s+=a.lineHeight;t.restore()}d(zt,"Pt");function Mr(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),T(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}d(Mr,"Bo");function wr(t,e,i,s,a){if(a.strikethrough||a.underline){let n=t.measureText(s),r=e-n.actualBoundingBoxLeft,o=e+n.actualBoundingBoxRight,l=i-n.actualBoundingBoxAscent,h=i+n.actualBoundingBoxDescent,c=a.strikethrough?(l+h)/2:h;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=a.decorationWidth||2,t.moveTo(r,c),t.lineTo(o,c),t.stroke()}}d(wr,"Vo");function kr(t,e){let i=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=i}d(kr,"No");function pe(t,e){let{x:i,y:s,w:a,h:n,radius:r}=e;t.arc(i+r.topLeft,s+r.topLeft,r.topLeft,-N,B,!0),t.lineTo(i,s+n-r.bottomLeft),t.arc(i+r.bottomLeft,s+n-r.bottomLeft,r.bottomLeft,B,N,!0),t.lineTo(i+a-r.bottomRight,s+n),t.arc(i+a-r.bottomRight,s+n-r.bottomRight,r.bottomRight,N,0,!0),t.lineTo(i+a,s+r.topRight),t.arc(i+a-r.topRight,s+r.topRight,r.topRight,0,-N,!0),t.lineTo(i+r.topLeft,s)}d(pe,"Jt");var Sr=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Pr=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Dr(t,e){let i=(""+t).match(Sr);if(!i||i[1]==="normal")return e*1.2;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100;break}return e*t}d(Dr,"jo");var Cr=d(t=>+t||0,"$o");function Ni(t,e){let i={},s=A(e),a=s?Object.keys(e):e,n=A(t)?s?r=>O(t[r],t[e[r]]):r=>t[r]:()=>t;for(let r of a)i[r]=Cr(n(r));return i}d(Ni,"Je");function Oa(t){return Ni(t,{top:"y",right:"x",bottom:"y",left:"x"})}d(Oa,"Ii");function Rt(t){return Ni(t,["topLeft","topRight","bottomLeft","bottomRight"])}d(Rt,"Dt");function q(t){let e=Oa(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}d(q,"K");function j(t,e){t=t||{},e=e||H.font;let i=O(t.size,e.size);typeof i=="string"&&(i=parseInt(i,10));let s=O(t.style,e.style);s&&!(""+s).match(Pr)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);let a={family:O(t.family,e.family),lineHeight:Dr(O(t.lineHeight,e.lineHeight),i),size:i,style:s,weight:O(t.weight,e.weight),string:""};return a.string=xr(a),a}d(j,"$");function se(t,e,i,s){let a=!0,n,r,o;for(n=0,r=t.length;n<r;++n)if(o=t[n],o!==void 0&&(e!==void 0&&typeof o=="function"&&(o=o(e),a=!1),i!==void 0&&F(o)&&(o=o[i%o.length],a=!1),o!==void 0))return s&&!a&&(s.cacheable=!1),o}d(se,"Qt");function Or(t,e,i){let{min:s,max:a}=t,n=ma(e,(a-s)/2),r=d((o,l)=>i&&o===0?0:o+l,"a");return{min:r(s,-Math.abs(n)),max:r(a,n)}}d(Or,"$s");function Pt(t,e){return Object.assign(Object.create(t),e)}d(Pt,"bt");function Hi(t,e=[""],i=t,s,a=()=>t[0]){at(s)||(s=Ea("_fallback",t));let n={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:s,_getTarget:a,override:r=>Hi([r,...t],e,i,s)};return new Proxy(n,{deleteProperty(r,o){return delete r[o],delete r._keys,delete t[0][o],!0},get(r,o){return La(r,o,()=>zr(o,e,t,r))},getOwnPropertyDescriptor(r,o){return Reflect.getOwnPropertyDescriptor(r._scopes[0],o)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(r,o){return gs(r).includes(o)},ownKeys(r){return gs(r)},set(r,o,l){let h=r._storage||(r._storage=a());return r[o]=h[o]=l,delete r._keys,!0}})}d(Hi,"Qe");function jt(t,e,i,s){let a={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Aa(t,s),setContext:n=>jt(t,n,i,s),override:n=>jt(t.override(n),e,i,s)};return new Proxy(a,{deleteProperty(n,r){return delete n[r],delete t[r],!0},get(n,r,o){return La(n,r,()=>Lr(n,r,o))},getOwnPropertyDescriptor(n,r){return n._descriptors.allKeys?Reflect.has(t,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,r)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(n,r){return Reflect.has(t,r)},ownKeys(){return Reflect.ownKeys(t)},set(n,r,o){return t[r]=o,delete n[r],!0}})}d(jt,"Lt");function Aa(t,e={scriptable:!0,indexable:!0}){let{_scriptable:i=e.scriptable,_indexable:s=e.indexable,_allKeys:a=e.allKeys}=t;return{allKeys:a,scriptable:i,indexable:s,isScriptable:St(i)?i:()=>i,isIndexable:St(s)?s:()=>s}}d(Aa,"zi");var Ar=d((t,e)=>t?t+zi(e):e,"Uo"),ji=d((t,e)=>A(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object),"Fi");function La(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];let s=i();return t[e]=s,s}d(La,"Us");function Lr(t,e,i){let{_proxy:s,_context:a,_subProxy:n,_descriptors:r}=t,o=s[e];return St(o)&&r.isScriptable(e)&&(o=Tr(e,o,t,i)),F(o)&&o.length&&(o=Er(e,o,t,r.isIndexable)),ji(e,o)&&(o=jt(o,a,n&&n[e],r)),o}d(Lr,"Yo");function Tr(t,e,i,s){let{_proxy:a,_context:n,_subProxy:r,_stack:o}=i;if(o.has(t))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+t);return o.add(t),e=e(n,r||s),o.delete(t),ji(t,e)&&(e=$i(a._scopes,a,t,e)),e}d(Tr,"Xo");function Er(t,e,i,s){let{_proxy:a,_context:n,_subProxy:r,_descriptors:o}=i;if(at(n.index)&&s(t))e=e[n.index%e.length];else if(A(e[0])){let l=e,h=a._scopes.filter(c=>c!==l);e=[];for(let c of l){let u=$i(h,a,t,c);e.push(jt(u,n,r&&r[t],o))}}return e}d(Er,"Ko");function Ta(t,e,i){return St(t)?t(e,i):t}d(Ta,"Ys");var Rr=d((t,e)=>t===!0?e:typeof t=="string"?kt(e,t):void 0,"qo");function Ir(t,e,i,s,a){for(let n of e){let r=Rr(i,n);if(r){t.add(r);let o=Ta(r._fallback,i,a);if(at(o)&&o!==i&&o!==s)return o}else if(r===!1&&at(s)&&i!==s)return null}return!1}d(Ir,"Go");function $i(t,e,i,s){let a=e._rootScopes,n=Ta(e._fallback,i,s),r=[...t,...a],o=new Set;o.add(s);let l=fs(o,r,i,n||i,s);return l===null||at(n)&&n!==i&&(l=fs(o,r,n,l,s),l===null)?!1:Hi(Array.from(o),[""],a,n,()=>Fr(e,i,s))}d($i,"Bi");function fs(t,e,i,s,a){for(;i;)i=Ir(t,e,i,s,a);return i}d(fs,"ys");function Fr(t,e,i){let s=t._getTarget();e in s||(s[e]={});let a=s[e];return F(a)&&A(i)?i:a||{}}d(Fr,"Jo");function zr(t,e,i,s){let a;for(let n of e)if(a=Ea(Ar(n,t),i),at(a))return ji(t,a)?$i(i,s,t,a):a}d(zr,"Qo");function Ea(t,e){for(let i of e){if(!i)continue;let s=i[t];if(at(s))return s}}d(Ea,"Xs");function gs(t){let e=t._keys;return e||(e=t._keys=Vr(t._scopes)),e}d(gs,"vs");function Vr(t){let e=new Set;for(let i of t)for(let s of Object.keys(i).filter(a=>!a.startsWith("_")))e.add(s);return Array.from(e)}d(Vr,"Zo");function Ra(t,e,i,s){let{iScale:a}=t,{key:n="r"}=this._parsing,r=new Array(s),o,l,h,c;for(o=0,l=s;o<l;++o)h=o+i,c=e[h],r[o]={r:a.parse(kt(c,n),h)};return r}d(Ra,"Vi");var Br=Number.EPSILON||1e-14,$t=d((t,e)=>e<t.length&&!t[e].skip&&t[e],"Ut"),Ia=d(t=>t==="x"?"y":"x","Ks");function Wr(t,e,i,s){let a=t.skip?e:t,n=e,r=i.skip?e:i,o=wi(n,a),l=wi(r,n),h=o/(o+l),c=l/(o+l);h=isNaN(h)?0:h,c=isNaN(c)?0:c;let u=s*h,f=s*c;return{previous:{x:n.x-u*(r.x-a.x),y:n.y-u*(r.y-a.y)},next:{x:n.x+f*(r.x-a.x),y:n.y+f*(r.y-a.y)}}}d(Wr,"ea");function Nr(t,e,i){let s=t.length,a,n,r,o,l,h=$t(t,0);for(let c=0;c<s-1;++c)if(l=h,h=$t(t,c+1),!(!l||!h)){if(oe(e[c],0,Br)){i[c]=i[c+1]=0;continue}a=i[c]/e[c],n=i[c+1]/e[c],o=Math.pow(a,2)+Math.pow(n,2),!(o<=9)&&(r=3/Math.sqrt(o),i[c]=a*r*e[c],i[c+1]=n*r*e[c])}}d(Nr,"ia");function Hr(t,e,i="x"){let s=Ia(i),a=t.length,n,r,o,l=$t(t,0);for(let h=0;h<a;++h){if(r=o,o=l,l=$t(t,h+1),!o)continue;let c=o[i],u=o[s];r&&(n=(c-r[i])/3,o[`cp1${i}`]=c-n,o[`cp1${s}`]=u-n*e[h]),l&&(n=(l[i]-c)/3,o[`cp2${i}`]=c+n,o[`cp2${s}`]=u+n*e[h])}}d(Hr,"sa");function jr(t,e="x"){let i=Ia(e),s=t.length,a=Array(s).fill(0),n=Array(s),r,o,l,h=$t(t,0);for(r=0;r<s;++r)if(o=l,l=h,h=$t(t,r+1),!!l){if(h){let c=h[e]-l[e];a[r]=c!==0?(h[i]-l[i])/c:0}n[r]=o?h?ut(a[r-1])!==ut(a[r])?0:(a[r-1]+a[r])/2:a[r-1]:a[r]}Nr(t,a,n),Hr(t,n,e)}d(jr,"na");function Pe(t,e,i){return Math.max(Math.min(t,i),e)}d(Pe,"Ve");function $r(t,e){let i,s,a,n,r,o=ge(t[0],e);for(i=0,s=t.length;i<s;++i)r=n,n=o,o=i<s-1&&ge(t[i+1],e),n&&(a=t[i],r&&(a.cp1x=Pe(a.cp1x,e.left,e.right),a.cp1y=Pe(a.cp1y,e.top,e.bottom)),o&&(a.cp2x=Pe(a.cp2x,e.left,e.right),a.cp2y=Pe(a.cp2y,e.top,e.bottom)))}d($r,"oa");function Yr(t,e,i,s,a){let n,r,o,l;if(e.spanGaps&&(t=t.filter(h=>!h.skip)),e.cubicInterpolationMode==="monotone")jr(t,a);else{let h=s?t[t.length-1]:t[0];for(n=0,r=t.length;n<r;++n)o=t[n],l=Wr(h,o,t[Math.min(n+1,r-(s?0:1))%r],e.tension),o.cp1x=l.previous.x,o.cp1y=l.previous.y,o.cp2x=l.next.x,o.cp2y=l.next.y,h=o}e.capBezierPoints&&$r(t,i)}d(Yr,"qs");function Fa(){return typeof document<"u"&&typeof document<"u"}d(Fa,"Ni");function Yi(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}d(Yi,"Ze");function qe(t,e,i){let s;return typeof t=="string"?(s=parseInt(t,10),t.indexOf("%")!==-1&&(s=s/100*e.parentNode[i])):s=t,s}d(qe,"$e");var si=d(t=>t.ownerDocument.defaultView.getComputedStyle(t,null),"ti");function Ur(t,e){return si(t).getPropertyValue(e)}d(Ur,"aa");var Xr=["top","right","bottom","left"];function It(t,e,i){let s={};i=i?"-"+i:"";for(let a=0;a<4;a++){let n=Xr[a];s[n]=parseFloat(t[e+"-"+n+i])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}d(It,"Tt");var qr=d((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot),"la");function Kr(t,e){let i=t.touches,s=i&&i.length?i[0]:t,{offsetX:a,offsetY:n}=s,r=!1,o,l;if(qr(a,n,t.target))o=a,l=n;else{let h=e.getBoundingClientRect();o=s.clientX-h.left,l=s.clientY-h.top,r=!0}return{x:o,y:l,box:r}}d(Kr,"ca");function Lt(t,e){if("native"in t)return t;let{canvas:i,currentDevicePixelRatio:s}=e,a=si(i),n=a.boxSizing==="border-box",r=It(a,"padding"),o=It(a,"border","width"),{x:l,y:h,box:c}=Kr(t,i),u=r.left+(c&&o.left),f=r.top+(c&&o.top),{width:g,height:p}=e;return n&&(g-=r.width+o.width,p-=r.height+o.height),{x:Math.round((l-u)/g*i.width/s),y:Math.round((h-f)/p*i.height/s)}}d(Lt,"Ot");function Gr(t,e,i){let s,a;if(e===void 0||i===void 0){let n=Yi(t);if(!n)e=t.clientWidth,i=t.clientHeight;else{let r=n.getBoundingClientRect(),o=si(n),l=It(o,"border","width"),h=It(o,"padding");e=r.width-h.width-l.width,i=r.height-h.height-l.height,s=qe(o.maxWidth,n,"clientWidth"),a=qe(o.maxHeight,n,"clientHeight")}}return{width:e,height:i,maxWidth:s||Ue,maxHeight:a||Ue}}d(Gr,"ha");var De=d(t=>Math.round(t*10)/10,"Ne");function Jr(t,e,i,s){let a=si(t),n=It(a,"margin"),r=qe(a.maxWidth,t,"clientWidth")||Ue,o=qe(a.maxHeight,t,"clientHeight")||Ue,l=Gr(t,e,i),{width:h,height:c}=l;if(a.boxSizing==="content-box"){let u=It(a,"border","width"),f=It(a,"padding");h-=f.width+u.width,c-=f.height+u.height}return h=Math.max(0,h-n.width),c=Math.max(0,s?h/s:c-n.height),h=De(Math.min(h,r,l.maxWidth)),c=De(Math.min(c,o,l.maxHeight)),h&&!c&&(c=De(h/2)),(e!==void 0||i!==void 0)&&s&&l.height&&c>l.height&&(c=l.height,h=De(Math.floor(c*s))),{width:h,height:c}}d(Jr,"Gs");function ps(t,e,i){let s=e||1,a=Math.floor(t.height*s),n=Math.floor(t.width*s);t.height=Math.floor(t.height),t.width=Math.floor(t.width);let r=t.canvas;return r.style&&(i||!r.style.height&&!r.style.width)&&(r.style.height=`${t.height}px`,r.style.width=`${t.width}px`),t.currentDevicePixelRatio!==s||r.height!==a||r.width!==n?(t.currentDevicePixelRatio=s,r.height=a,r.width=n,t.ctx.setTransform(s,0,0,s,0,0),!0):!1}d(ps,"Wi");var Zr=function(){let t=!1;try{let e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return t}();function ms(t,e){let i=Ur(t,e),s=i&&i.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}d(ms,"Hi");function Tt(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}d(Tt,"kt");function Qr(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:s==="middle"?i<.5?t.y:e.y:s==="after"?i<1?t.y:e.y:i>0?e.y:t.y}}d(Qr,"Qs");function to(t,e,i,s){let a={x:t.cp2x,y:t.cp2y},n={x:e.cp1x,y:e.cp1y},r=Tt(t,a,i),o=Tt(a,n,i),l=Tt(n,e,i),h=Tt(r,o,i),c=Tt(o,l,i);return Tt(h,c,i)}d(to,"Zs");var eo=d(function(t,e){return{x(i){return t+t+e-i},setWidth(i){e=i},textAlign(i){return i==="center"?i:i==="right"?"left":"right"},xPlus(i,s){return i-s},leftForLtr(i,s){return i-s}}},"da"),io=d(function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}},"ua");function Nt(t,e,i){return t?eo(e,i):io()}d(Nt,"Et");function za(t,e){let i,s;(e==="ltr"||e==="rtl")&&(i=t.canvas.style,s=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=s)}d(za,"ji");function Va(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}d(Va,"$i");function Ba(t){return t==="angle"?{between:fe,compare:sr,normalize:it}:{between:bt,compare:(e,i)=>e-i,normalize:e=>e}}d(Ba,"tn");function bs({start:t,end:e,count:i,loop:s,style:a}){return{start:t%i,end:e%i,loop:s&&(e-t+1)%i===0,style:a}}d(bs,"Ms");function so(t,e,i){let{property:s,start:a,end:n}=i,{between:r,normalize:o}=Ba(s),l=e.length,{start:h,end:c,loop:u}=t,f,g;if(u){for(h+=l,c+=l,f=0,g=l;f<g&&r(o(e[h%l][s]),a,n);++f)h--,c--;h%=l,c%=l}return c<h&&(c+=l),{start:h,end:c,loop:u,style:t.style}}d(so,"fa");function Wa(t,e,i){if(!i)return[t];let{property:s,start:a,end:n}=i,r=e.length,{compare:o,between:l,normalize:h}=Ba(s),{start:c,end:u,loop:f,style:g}=so(t,e,i),p=[],b=!1,m=null,x,y,M,_=d(()=>l(a,M,x)&&o(a,M)!==0,"v"),v=d(()=>o(n,x)===0||l(n,M,x),"x"),w=d(()=>b||_(),"M"),k=d(()=>!b||v(),"k");for(let P=c,D=c;P<=u;++P)y=e[P%r],!y.skip&&(x=h(y[s]),x!==M&&(b=l(x,a,n),m===null&&w()&&(m=o(x,a)===0?P:D),m!==null&&k()&&(p.push(bs({start:m,end:P,loop:f,count:r,style:g})),m=null),D=P,M=x));return m!==null&&p.push(bs({start:m,end:u,loop:f,count:r,style:g})),p}d(Wa,"Ui");function Na(t,e){let i=[],s=t.segments;for(let a=0;a<s.length;a++){let n=Wa(s[a],t.points,e);n.length&&i.push(...n)}return i}d(Na,"Yi");function ao(t,e,i,s){let a=0,n=e-1;if(i&&!s)for(;a<e&&!t[a].skip;)a++;for(;a<e&&t[a].skip;)a++;for(a%=e,i&&(n+=a);n>a&&t[n%e].skip;)n--;return n%=e,{start:a,end:n}}d(ao,"ga");function no(t,e,i,s){let a=t.length,n=[],r=e,o=t[e],l;for(l=e+1;l<=i;++l){let h=t[l%a];h.skip||h.stop?o.skip||(s=!1,n.push({start:e%a,end:(l-1)%a,loop:s}),e=r=h.stop?l:null):(r=l,o.skip&&(e=l)),o=h}return r!==null&&n.push({start:e%a,end:r%a,loop:s}),n}d(no,"pa");function ro(t,e){let i=t.points,s=t.options.spanGaps,a=i.length;if(!a)return[];let n=!!t._loop,{start:r,end:o}=ao(i,a,n,s);if(s===!0)return xs(t,[{start:r,end:o,loop:n}],i,e);let l=o<r?o+a:o,h=!!t._fullLoop&&r===0&&o===a-1;return xs(t,no(i,r,l,h),i,e)}d(ro,"en");function xs(t,e,i,s){return!s||!s.setContext||!i?e:oo(t,e,i,s)}d(xs,"ks");function oo(t,e,i,s){let a=t._chart.getContext(),n=_s(t.options),{_datasetIndex:r,options:{spanGaps:o}}=t,l=i.length,h=[],c=n,u=e[0].start,f=u;function g(p,b,m,x){let y=o?-1:1;if(p!==b){for(p+=l;i[p%l].skip;)p-=y;for(;i[b%l].skip;)b+=y;p%l!==b%l&&(h.push({start:p%l,end:b%l,loop:m,style:x}),c=x,u=b%l)}}d(g,"f");for(let p of e){u=o?u:p.start;let b=i[u%l],m;for(f=u+1;f<=p.end;f++){let x=i[f%l];m=_s(s.setContext(Pt(a,{type:"segment",p0:b,p1:x,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:r}))),lo(m,c)&&g(u,f-1,p.loop,c),b=x,c=m}u<f-1&&g(u,f-1,p.loop,c)}return h}d(oo,"ma");function _s(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}d(_s,"ws");function lo(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}d(lo,"ba");var ho=d(class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,s){let a=e.listeners[s],n=e.duration;a.forEach(r=>r({chart:t,initial:e.initial,numSteps:n,currentStep:Math.min(i-e.start,n)}))}_refresh(){this._request||(this._running=!0,this._request=Ma.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;let a=i.items,n=a.length-1,r=!1,o;for(;n>=0;--n)o=a[n],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),r=!0):(a[n]=a[a.length-1],a.pop());r&&(s.draw(),this._notify(s,i,t,"progress")),a.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=a.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){let e=this._charts,i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){let e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;let e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){let e=this._charts.get(t);if(!e||!e.items.length)return;let i=e.items,s=i.length-1;for(;s>=0;--s)i[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}},"is"),pt=new ho,ys="transparent",co={boolean(t,e,i){return i>.5?e:t},color(t,e,i){let s=ds(t||ys),a=s.valid&&ds(e||ys);return a&&a.valid?a.mix(s,i).hexString():e},number(t,e,i){return t+(e-t)*i}},uo=d(class{constructor(t,e,i,s){let a=e[i];s=se([t.to,s,a,t.from]);let n=se([t.from,a,s]);this._active=!0,this._fn=t.fn||co[t.type||typeof n],this._easing=le[t.easing]||le.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=n,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);let s=this._target[this._prop],a=i-this._start,n=this._duration-a;this._start=i,this._duration=Math.floor(Math.max(n,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=se([t.to,e,s,t.from]),this._from=se([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){let e=t-this._start,i=this._duration,s=this._prop,a=this._from,n=this._loop,r=this._to,o;if(this._active=a!==r&&(n||e<i),!this._active){this._target[s]=r,this._notify(!0);return}if(e<0){this._target[s]=a;return}o=e/i%2,o=n&&o>1?2-o:o,o=this._easing(Math.min(1,Math.max(0,o))),this._target[s]=this._fn(a,r,o)}wait(){let t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){let e=t?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][e]()}},"ss"),Ha=d(class{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!A(t))return;let e=Object.keys(H.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{let a=t[s];if(!A(a))return;let n={};for(let r of e)n[r]=a[r];(F(a.properties)&&a.properties||[s]).forEach(r=>{(r===s||!i.has(r))&&i.set(r,n)})})}_animateOptions(t,e){let i=e.options,s=go(t,i);if(!s)return[];let a=this._createAnimations(s,i);return i.$shared&&fo(t.options.$animations,i).then(()=>{t.options=i},()=>{}),a}_createAnimations(t,e){let i=this._properties,s=[],a=t.$animations||(t.$animations={}),n=Object.keys(e),r=Date.now(),o;for(o=n.length-1;o>=0;--o){let l=n[o];if(l.charAt(0)==="$")continue;if(l==="options"){s.push(...this._animateOptions(t,e));continue}let h=e[l],c=a[l],u=i.get(l);if(c)if(u&&c.active()){c.update(u,h,r);continue}else c.cancel();if(!u||!u.duration){t[l]=h;continue}a[l]=c=new uo(u,t,l,h),s.push(c)}return s}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}let i=this._createAnimations(t,e);if(i.length)return pt.add(this._chart,i),!0}},"ci");function fo(t,e){let i=[],s=Object.keys(e);for(let a=0;a<s.length;a++){let n=t[s[a]];n&&n.active()&&i.push(n.wait())}return Promise.all(i)}d(fo,"xa");function go(t,e){if(!e)return;let i=t.options;if(!i){t.options=e;return}return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i}d(go,"ya");function vs(t,e){let i=t&&t.options||{},s=i.reverse,a=i.min===void 0?e:0,n=i.max===void 0?e:0;return{start:s?n:a,end:s?a:n}}d(vs,"nn");function po(t,e,i){if(i===!1)return!1;let s=vs(t,i),a=vs(e,i);return{top:a.end,right:s.end,bottom:a.start,left:s.start}}d(po,"va");function mo(t){let e,i,s,a;return A(t)?(e=t.top,i=t.right,s=t.bottom,a=t.left):e=i=s=a=t,{top:e,right:i,bottom:s,left:a,disabled:t===!1}}d(mo,"Ma");function ja(t,e){let i=[],s=t._getSortedDatasetMetas(e),a,n;for(a=0,n=s.length;a<n;++a)i.push(s[a].index);return i}d(ja,"to");function Ms(t,e,i,s={}){let a=t.keys,n=s.mode==="single",r,o,l,h;if(e!==null){for(r=0,o=a.length;r<o;++r){if(l=+a[r],l===i){if(s.all)continue;break}h=t.values[l],W(h)&&(n||e===0||ut(e)===ut(h))&&(e+=h)}return e}}d(Ms,"on");function bo(t){let e=Object.keys(t),i=new Array(e.length),s,a,n;for(s=0,a=e.length;s<a;++s)n=e[s],i[s]={x:n,y:t[n]};return i}d(bo,"ka");function ws(t,e){let i=t&&t.options.stacked;return i||i===void 0&&e.stack!==void 0}d(ws,"an");function xo(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}d(xo,"wa");function _o(t){let{min:e,max:i,minDefined:s,maxDefined:a}=t.getUserBounds();return{min:s?e:Number.NEGATIVE_INFINITY,max:a?i:Number.POSITIVE_INFINITY}}d(_o,"Sa");function yo(t,e,i){let s=t[e]||(t[e]={});return s[i]||(s[i]={})}d(yo,"Pa");function ks(t,e,i,s){for(let a of e.getMatchingVisibleMetas(s).reverse()){let n=t[a.index];if(i&&n>0||!i&&n<0)return a.index}return null}d(ks,"rn");function Ss(t,e){let{chart:i,_cachedMeta:s}=t,a=i._stacks||(i._stacks={}),{iScale:n,vScale:r,index:o}=s,l=n.axis,h=r.axis,c=xo(n,r,s),u=e.length,f;for(let g=0;g<u;++g){let p=e[g],{[l]:b,[h]:m}=p,x=p._stacks||(p._stacks={});f=x[h]=yo(a,c,b),f[o]=m,f._top=ks(f,r,!0,s.type),f._bottom=ks(f,r,!1,s.type);let y=f._visualValues||(f._visualValues={});y[o]=m}}d(Ss,"ln");function gi(t,e){let i=t.scales;return Object.keys(i).filter(s=>i[s].axis===e).shift()}d(gi,"Xi");function vo(t,e){return Pt(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}d(vo,"Da");function Mo(t,e,i){return Pt(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}d(Mo,"Oa");function Zt(t,e){let i=t.controller.index,s=t.vScale&&t.vScale.axis;if(s){e=e||t._parsed;for(let a of e){let n=a._stacks;if(!n||n[s]===void 0||n[s][i]===void 0)return;delete n[s][i],n[s]._visualValues!==void 0&&n[s]._visualValues[i]!==void 0&&delete n[s]._visualValues[i]}}}d(Zt,"xe");var pi=d(t=>t==="reset"||t==="none","Ki"),Ps=d((t,e)=>e?t:Object.assign({},t),"cn"),wo=d((t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:ja(i,!0),values:null},"Ca"),ot=d(class{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=ws(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Zt(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=d((c,u,f,g)=>c==="x"?u:c==="r"?g:f,"n"),a=e.xAxisID=O(i.xAxisID,gi(t,"x")),n=e.yAxisID=O(i.yAxisID,gi(t,"y")),r=e.rAxisID=O(i.rAxisID,gi(t,"r")),o=e.indexAxis,l=e.iAxisID=s(o,a,n,r),h=e.vAxisID=s(o,n,a,r);e.xScale=this.getScaleForId(a),e.yScale=this.getScaleForId(n),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&os(this._data,this),t._stacked&&Zt(t)}_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(A(e))this._data=bo(e);else if(i!==e){if(i){os(i,this);let s=this._cachedMeta;Zt(s),s._parsed=[]}e&&Object.isExtensible(e)&&or(e,this),this._syncList=[],this._data=e}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let e=this._cachedMeta,i=this.getDataset(),s=!1;this._dataCheck();let a=e._stacked;e._stacked=ws(e.vScale,e),e.stack!==i.stack&&(s=!0,Zt(e),e.stack=i.stack),this._resyncElements(t),(s||a!==e._stacked)&&Ss(this,e._parsed)}configure(){let t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){let{_cachedMeta:i,_data:s}=this,{iScale:a,_stacked:n}=i,r=a.axis,o=t===0&&e===s.length?!0:i._sorted,l=t>0&&i._parsed[t-1],h,c,u;if(this._parsing===!1)i._parsed=s,i._sorted=!0,u=s;else{F(s[t])?u=this.parseArrayData(i,s,t,e):A(s[t])?u=this.parseObjectData(i,s,t,e):u=this.parsePrimitiveData(i,s,t,e);let f=d(()=>c[r]===null||l&&c[r]<l[r],"f");for(h=0;h<e;++h)i._parsed[h+t]=c=u[h],o&&(f()&&(o=!1),l=c);i._sorted=o}n&&Ss(this,u)}parsePrimitiveData(t,e,i,s){let{iScale:a,vScale:n}=t,r=a.axis,o=n.axis,l=a.getLabels(),h=a===n,c=new Array(s),u,f,g;for(u=0,f=s;u<f;++u)g=u+i,c[u]={[r]:h||a.parse(l[g],g),[o]:n.parse(e[g],g)};return c}parseArrayData(t,e,i,s){let{xScale:a,yScale:n}=t,r=new Array(s),o,l,h,c;for(o=0,l=s;o<l;++o)h=o+i,c=e[h],r[o]={x:a.parse(c[0],h),y:n.parse(c[1],h)};return r}parseObjectData(t,e,i,s){let{xScale:a,yScale:n}=t,{xAxisKey:r="x",yAxisKey:o="y"}=this._parsing,l=new Array(s),h,c,u,f;for(h=0,c=s;h<c;++h)u=h+i,f=e[u],l[h]={x:a.parse(kt(f,r),u),y:n.parse(kt(f,o),u)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){let s=this.chart,a=this._cachedMeta,n=e[t.axis],r={keys:ja(s,!0),values:e._stacks[t.axis]._visualValues};return Ms(r,n,a.index,{mode:i})}updateRangeFromParsed(t,e,i,s){let a=i[e.axis],n=a===null?NaN:a,r=s&&i._stacks[e.axis];s&&r&&(s.values=r,n=Ms(s,a,this._cachedMeta.index)),t.min=Math.min(t.min,n),t.max=Math.max(t.max,n)}getMinMax(t,e){let i=this._cachedMeta,s=i._parsed,a=i._sorted&&t===i.iScale,n=s.length,r=this._getOtherScale(t),o=wo(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:c}=_o(r),u,f;function g(){f=s[u];let p=f[r.axis];return!W(f[t.axis])||h>p||c<p}for(d(g,"g"),u=0;u<n&&!(!g()&&(this.updateRangeFromParsed(l,t,f,o),a));++u);if(a){for(u=n-1;u>=0;--u)if(!g()){this.updateRangeFromParsed(l,t,f,o);break}}return l}getAllParsedValues(t){let e=this._cachedMeta._parsed,i=[],s,a,n;for(s=0,a=e.length;s<a;++s)n=e[s][t.axis],W(n)&&i.push(n);return i}getMaxOverflow(){return!1}getLabelAndValue(t){let e=this._cachedMeta,i=e.iScale,s=e.vScale,a=this.getParsed(t);return{label:i?""+i.getLabelForValue(a[i.axis]):"",value:s?""+s.getLabelForValue(a[s.axis]):""}}_update(t){let e=this._cachedMeta;this.update(t||"default"),e._clip=mo(O(this.options.clip,po(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){let t=this._ctx,e=this.chart,i=this._cachedMeta,s=i.data||[],a=e.chartArea,n=[],r=this._drawStart||0,o=this._drawCount||s.length-r,l=this.options.drawActiveElementsOnTop,h;for(i.dataset&&i.dataset.draw(t,a,r,o),h=r;h<r+o;++h){let c=s[h];c.hidden||(c.active&&l?n.push(c):c.draw(t,a))}for(h=0;h<n.length;++h)n[h].draw(t,a)}getStyle(t,e){let i=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){let s=this.getDataset(),a;if(t>=0&&t<this._cachedMeta.data.length){let n=this._cachedMeta.data[t];a=n.$context||(n.$context=Mo(this.getContext(),t,n)),a.parsed=this.getParsed(t),a.raw=s.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=vo(this.chart.getContext(),this.index)),a.dataset=s,a.index=a.datasetIndex=this.index;return a.active=!!e,a.mode=i,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){let s=e==="active",a=this._cachedDataOpts,n=t+"-"+e,r=a[n],o=this.enableOptionSharing&&at(i);if(r)return Ps(r,o);let l=this.chart.config,h=l.datasetElementScopeKeys(this._type,t),c=s?[`${t}Hover`,"hover",t,""]:[t,""],u=l.getOptionScopes(this.getDataset(),h),f=Object.keys(H.elements[t]),g=d(()=>this.getContext(i,s,e),"g"),p=l.resolveNamedOptions(u,f,g,c);return p.$shared&&(p.$shared=o,a[n]=Object.freeze(Ps(p,o))),p}_resolveAnimations(t,e,i){let s=this.chart,a=this._cachedDataOpts,n=`animation-${e}`,r=a[n];if(r)return r;let o;if(s.options.animation!==!1){let h=this.chart.config,c=h.datasetAnimationScopeKeys(this._type,e),u=h.getOptionScopes(this.getDataset(),c);o=h.createResolver(u,this.getContext(t,i,e))}let l=new Ha(s,o&&o.animations);return o&&o._cacheable&&(a[n]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||pi(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){let i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,a=this.getSharedOptions(i),n=this.includeOptions(e,a)||a!==s;return this.updateSharedOptions(a,e,i),{sharedOptions:a,includeOptions:n}}updateElement(t,e,i,s){pi(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!pi(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;let a=this.getStyle(e,s);this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(a)||a})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let e=this._data,i=this._cachedMeta.data;for(let[r,o,l]of this._syncList)this[r](o,l);this._syncList=[];let s=i.length,a=e.length,n=Math.min(a,s);n&&this.parse(0,n),a>s?this._insertElements(s,a-s,t):a<s&&this._removeElements(a,s-a)}_insertElements(t,e,i=!0){let s=this._cachedMeta,a=s.data,n=t+e,r,o=d(l=>{for(l.length+=e,r=l.length-1;r>=n;r--)l[r]=l[r-e]},"l");for(o(a),r=t;r<n;++r)a[r]=new this.dataElementType;this._parsing&&o(s._parsed),this.parse(t,e),i&&this.updateElements(a,t,e,"reset")}updateElements(t,e,i,s){}_removeElements(t,e){let i=this._cachedMeta;if(this._parsing){let s=i._parsed.splice(t,e);i._stacked&&Zt(i,s)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{let[e,i,s]=t;this[e](i,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){let 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,e){e&&this._sync(["_removeElements",t,e]);let i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}},"st");S(ot,"defaults",{}),S(ot,"datasetElementType",null),S(ot,"dataElementType",null);function ko(t,e){if(!t._cache.$bar){let i=t.getMatchingVisibleMetas(e),s=[];for(let a=0,n=i.length;a<n;a++)s=s.concat(i[a].controller.getAllParsedValues(t));t._cache.$bar=va(s.sort((a,n)=>a-n))}return t._cache.$bar}d(ko,"Aa");function So(t){let e=t.iScale,i=ko(e,t.type),s=e._length,a,n,r,o,l=d(()=>{r===32767||r===-32768||(at(o)&&(s=Math.min(s,Math.abs(r-o)||s)),o=r)},"l");for(a=0,n=i.length;a<n;++a)r=e.getPixelForValue(i[a]),l();for(o=void 0,a=0,n=e.ticks.length;a<n;++a)r=e.getPixelForTick(a),l();return s}d(So,"Ta");function Po(t,e,i,s){let a=i.barThickness,n,r;return T(a)?(n=e.min*i.categoryPercentage,r=i.barPercentage):(n=a*s,r=1),{chunk:n/s,ratio:r,start:e.pixels[t]-n/2}}d(Po,"La");function Do(t,e,i,s){let a=e.pixels,n=a[t],r=t>0?a[t-1]:null,o=t<a.length-1?a[t+1]:null,l=i.categoryPercentage;r===null&&(r=n-(o===null?e.end-e.start:o-n)),o===null&&(o=n+n-r);let h=n-(n-Math.min(r,o))/2*l;return{chunk:Math.abs(o-r)/2*l/s,ratio:i.barPercentage,start:h}}d(Do,"Ra");function Co(t,e,i,s){let a=i.parse(t[0],s),n=i.parse(t[1],s),r=Math.min(a,n),o=Math.max(a,n),l=r,h=o;Math.abs(r)>Math.abs(o)&&(l=o,h=r),e[i.axis]=h,e._custom={barStart:l,barEnd:h,start:a,end:n,min:r,max:o}}d(Co,"Ea");function $a(t,e,i,s){return F(t)?Co(t,e,i,s):e[i.axis]=i.parse(t,s),e}d($a,"eo");function Ds(t,e,i,s){let a=t.iScale,n=t.vScale,r=a.getLabels(),o=a===n,l=[],h,c,u,f;for(h=i,c=i+s;h<c;++h)f=e[h],u={},u[a.axis]=o||a.parse(r[h],h),l.push($a(f,u,n,h));return l}d(Ds,"hn");function mi(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}d(mi,"qi");function Oo(t,e,i){return t!==0?ut(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}d(Oo,"Ia");function Ao(t){let e,i,s,a,n;return t.horizontal?(e=t.base>t.x,i="left",s="right"):(e=t.base<t.y,i="bottom",s="top"),e?(a="end",n="start"):(a="start",n="end"),{start:i,end:s,reverse:e,top:a,bottom:n}}d(Ao,"za");function Lo(t,e,i,s){let a=e.borderSkipped,n={};if(!a){t.borderSkipped=n;return}if(a===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}let{start:r,end:o,reverse:l,top:h,bottom:c}=Ao(t);a==="middle"&&i&&(t.enableBorderRadius=!0,(i._top||0)===s?a=h:(i._bottom||0)===s?a=c:(n[Cs(c,r,o,l)]=!0,a=h)),n[Cs(a,r,o,l)]=!0,t.borderSkipped=n}d(Lo,"Fa");function Cs(t,e,i,s){return s?(t=To(t,e,i),t=Os(t,i,e)):t=Os(t,e,i),t}d(Cs,"dn");function To(t,e,i){return t===e?i:t===i?e:t}d(To,"Ba");function Os(t,e,i){return t==="start"?e:t==="end"?i:t}d(Os,"un");function Eo(t,{inflateAmount:e},i){t.inflateAmount=e==="auto"?i===1?.33:0:e}d(Eo,"Va");var Ie=d(class extends ot{parsePrimitiveData(t,e,i,s){return Ds(t,e,i,s)}parseArrayData(t,e,i,s){return Ds(t,e,i,s)}parseObjectData(t,e,i,s){let{iScale:a,vScale:n}=t,{xAxisKey:r="x",yAxisKey:o="y"}=this._parsing,l=a.axis==="x"?r:o,h=n.axis==="x"?r:o,c=[],u,f,g,p;for(u=i,f=i+s;u<f;++u)p=e[u],g={},g[a.axis]=a.parse(kt(p,l),u),c.push($a(kt(p,h),g,n,u));return c}updateRangeFromParsed(t,e,i,s){super.updateRangeFromParsed(t,e,i,s);let a=i._custom;a&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){let e=this._cachedMeta,{iScale:i,vScale:s}=e,a=this.getParsed(t),n=a._custom,r=mi(n)?"["+n.start+", "+n.end+"]":""+s.getLabelForValue(a[s.axis]);return{label:""+i.getLabelForValue(a[i.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize();let t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){let e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,s){let a=s==="reset",{index:n,_cachedMeta:{vScale:r}}=this,o=r.getBasePixel(),l=r.isHorizontal(),h=this._getRuler(),{sharedOptions:c,includeOptions:u}=this._getSharedOptions(e,s);for(let f=e;f<e+i;f++){let g=this.getParsed(f),p=a||T(g[r.axis])?{base:o,head:o}:this._calculateBarValuePixels(f),b=this._calculateBarIndexPixels(f,h),m=(g._stacks||{})[r.axis],x={horizontal:l,base:p.base,enableBorderRadius:!m||mi(g._custom)||n===m._top||n===m._bottom,x:l?p.head:b.center,y:l?b.center:p.head,height:l?b.size:Math.abs(p.size),width:l?Math.abs(p.size):b.size};u&&(x.options=c||this.resolveDataElementOptions(f,t[f].active?"active":s));let y=x.options||t[f].options;Lo(x,y,m,n),Eo(x,y,h.ratio),this.updateElement(t[f],f,x,s)}}_getStacks(t,e){let{iScale:i}=this._cachedMeta,s=i.getMatchingVisibleMetas(this._type).filter(o=>o.controller.options.grouped),a=i.options.stacked,n=[],r=d(o=>{let l=o.controller.getParsed(e),h=l&&l[o.vScale.axis];if(T(h)||isNaN(h))return!0},"r");for(let o of s)if(!(e!==void 0&&r(o))&&((a===!1||n.indexOf(o.stack)===-1||a===void 0&&o.stack===void 0)&&n.push(o.stack),o.index===t))break;return n.length||n.push(void 0),n}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){let s=this._getStacks(t,i),a=e!==void 0?s.indexOf(e):-1;return a===-1?s.length-1:a}_getRuler(){let t=this.options,e=this._cachedMeta,i=e.iScale,s=[],a,n;for(a=0,n=e.data.length;a<n;++a)s.push(i.getPixelForValue(this.getParsed(a)[i.axis],a));let r=t.barThickness;return{min:r||So(e),pixels:s,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:r?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){let{_cachedMeta:{vScale:e,_stacked:i,index:s},options:{base:a,minBarLength:n}}=this,r=a||0,o=this.getParsed(t),l=o._custom,h=mi(l),c=o[e.axis],u=0,f=i?this.applyStack(e,o,i):c,g,p;f!==c&&(u=f-c,f=c),h&&(c=l.barStart,f=l.barEnd-l.barStart,c!==0&&ut(c)!==ut(l.barEnd)&&(u=0),u+=c);let b=!T(a)&&!h?a:u,m=e.getPixelForValue(b);if(this.chart.getDataVisibility(t)?g=e.getPixelForValue(u+f):g=m,p=g-m,Math.abs(p)<n){p=Oo(p,e,r)*n,c===r&&(m-=p/2);let x=e.getPixelForDecimal(0),y=e.getPixelForDecimal(1),M=Math.min(x,y),_=Math.max(x,y);m=Math.max(Math.min(m,_),M),g=m+p,i&&!h&&(o._stacks[e.axis]._visualValues[s]=e.getValueForPixel(g)-e.getValueForPixel(m))}if(m===e.getPixelForValue(r)){let x=ut(p)*e.getLineWidthForValue(r)/2;m+=x,p-=x}return{size:p,base:m,head:g,center:g+p/2}}_calculateBarIndexPixels(t,e){let i=e.scale,s=this.options,a=s.skipNull,n=O(s.maxBarThickness,1/0),r,o;if(e.grouped){let l=a?this._getStackCount(t):e.stackCount,h=s.barThickness==="flex"?Do(t,e,s,l):Po(t,e,s,l),c=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0);r=h.start+h.chunk*c+h.chunk/2,o=Math.min(n,h.chunk*h.ratio)}else r=i.getPixelForValue(this.getParsed(t)[i.axis],t),o=Math.min(n,e.min*e.ratio);return{base:r-o/2,head:r+o/2,center:r,size:o}}draw(){let t=this._cachedMeta,e=t.vScale,i=t.data,s=i.length,a=0;for(;a<s;++a)this.getParsed(a)[e.axis]!==null&&i[a].draw(this._ctx)}},"te");S(Ie,"id","bar"),S(Ie,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),S(Ie,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});var Fe=d(class extends ot{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,s){let a=super.parsePrimitiveData(t,e,i,s);for(let n=0;n<a.length;n++)a[n]._custom=this.resolveDataElementOptions(n+i).radius;return a}parseArrayData(t,e,i,s){let a=super.parseArrayData(t,e,i,s);for(let n=0;n<a.length;n++){let r=e[i+n];a[n]._custom=O(r[2],this.resolveDataElementOptions(n+i).radius)}return a}parseObjectData(t,e,i,s){let a=super.parseObjectData(t,e,i,s);for(let n=0;n<a.length;n++){let r=e[i+n];a[n]._custom=O(r&&r.r&&+r.r,this.resolveDataElementOptions(n+i).radius)}return a}getMaxOverflow(){let t=this._cachedMeta.data,e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){let e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:a}=e,n=this.getParsed(t),r=s.getLabelForValue(n.x),o=a.getLabelForValue(n.y),l=n._custom;return{label:i[t]||"",value:"("+r+", "+o+(l?", "+l:"")+")"}}update(t){let e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,s){let a=s==="reset",{iScale:n,vScale:r}=this._cachedMeta,{sharedOptions:o,includeOptions:l}=this._getSharedOptions(e,s),h=n.axis,c=r.axis;for(let u=e;u<e+i;u++){let f=t[u],g=!a&&this.getParsed(u),p={},b=p[h]=a?n.getPixelForDecimal(.5):n.getPixelForValue(g[h]),m=p[c]=a?r.getBasePixel():r.getPixelForValue(g[c]);p.skip=isNaN(b)||isNaN(m),l&&(p.options=o||this.resolveDataElementOptions(u,f.active?"active":s),a&&(p.options.radius=0)),this.updateElement(f,u,p,s)}}resolveDataElementOptions(t,e){let i=this.getParsed(t),s=super.resolveDataElementOptions(t,e);s.$shared&&(s=Object.assign({},s,{$shared:!1}));let a=s.radius;return e!=="active"&&(s.radius=0),s.radius+=O(i&&i._custom,a),s}},"ee");S(Fe,"id","bubble"),S(Fe,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),S(Fe,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function Ro(t,e,i){let s=1,a=1,n=0,r=0;if(e<z){let o=t,l=o+e,h=Math.cos(o),c=Math.sin(o),u=Math.cos(l),f=Math.sin(l),g=d((M,_,v)=>fe(M,o,l,!0)?1:Math.max(_,_*i,v,v*i),"f"),p=d((M,_,v)=>fe(M,o,l,!0)?-1:Math.min(_,_*i,v,v*i),"g"),b=g(0,h,u),m=g(N,c,f),x=p(B,h,u),y=p(B+N,c,f);s=(b-x)/2,a=(m-y)/2,n=-(b+x)/2,r=-(m+y)/2}return{ratioX:s,ratioY:a,offsetX:n,offsetY:r}}d(Ro,"Na");var Et=d(class extends ot{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){let i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let a=d(o=>+i[o],"o");if(A(i[t])){let{key:o="value"}=this._parsing;a=d(l=>+kt(i[l],o),"o")}let n,r;for(n=t,r=t+e;n<r;++n)s._parsed[n]=a(n)}}_getRotation(){return rt(this.options.rotation-90)}_getCircumference(){return rt(this.options.circumference)}_getRotationExtents(){let t=z,e=-z;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){let s=this.chart.getDatasetMeta(i).controller,a=s._getRotation(),n=s._getCircumference();t=Math.min(t,a),e=Math.max(e,a+n)}return{rotation:t,circumference:e-t}}update(t){let e=this.chart,{chartArea:i}=e,s=this._cachedMeta,a=s.data,n=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,r=Math.max((Math.min(i.width,i.height)-n)/2,0),o=Math.min(Xn(this.options.cutout,r),1),l=this._getRingWeight(this.index),{circumference:h,rotation:c}=this._getRotationExtents(),{ratioX:u,ratioY:f,offsetX:g,offsetY:p}=Ro(c,h,o),b=(i.width-n)/u,m=(i.height-n)/f,x=Math.max(Math.min(b,m)/2,0),y=ma(this.options.radius,x),M=Math.max(y*o,0),_=(y-M)/this._getVisibleDatasetWeightTotal();this.offsetX=g*y,this.offsetY=p*y,s.total=this.calculateTotal(),this.outerRadius=y-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*l,0),this.updateElements(a,0,a.length,t)}_circumference(t,e){let i=this.options,s=this._cachedMeta,a=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||s._parsed[t]===null||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*a/z)}updateElements(t,e,i,s){let a=s==="reset",n=this.chart,r=n.chartArea,o=n.options.animation,l=(r.left+r.right)/2,h=(r.top+r.bottom)/2,c=a&&o.animateScale,u=c?0:this.innerRadius,f=c?0:this.outerRadius,{sharedOptions:g,includeOptions:p}=this._getSharedOptions(e,s),b=this._getRotation(),m;for(m=0;m<e;++m)b+=this._circumference(m,a);for(m=e;m<e+i;++m){let x=this._circumference(m,a),y=t[m],M={x:l+this.offsetX,y:h+this.offsetY,startAngle:b,endAngle:b+x,circumference:x,outerRadius:f,innerRadius:u};p&&(M.options=g||this.resolveDataElementOptions(m,y.active?"active":s)),b+=x,this.updateElement(y,m,M,s)}}calculateTotal(){let t=this._cachedMeta,e=t.data,i=0,s;for(s=0;s<e.length;s++){let a=t._parsed[s];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(s)&&!e[s].hidden&&(i+=Math.abs(a))}return i}calculateCircumference(t){let e=this._cachedMeta.total;return e>0&&!isNaN(t)?z*(Math.abs(t)/e):0}getLabelAndValue(t){let e=this._cachedMeta,i=this.chart,s=i.data.labels||[],a=_e(e._parsed[t],i.options.locale);return{label:s[t]||"",value:a}}getMaxBorderWidth(t){let e=0,i=this.chart,s,a,n,r,o;if(!t){for(s=0,a=i.data.datasets.length;s<a;++s)if(i.isDatasetVisible(s)){n=i.getDatasetMeta(s),t=n.data,r=n.controller;break}}if(!t)return 0;for(s=0,a=t.length;s<a;++s)o=r.resolveDataElementOptions(s),o.borderAlign!=="inner"&&(e=Math.max(e,o.borderWidth||0,o.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,s=t.length;i<s;++i){let a=this.resolveDataElementOptions(i);e=Math.max(e,a.offset||0,a.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(O(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}},"vt");S(Et,"id","doughnut"),S(Et,"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"}),S(Et,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"}),S(Et,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map((a,n)=>{let r=t.getDatasetMeta(0).controller.getStyle(n);return{text:a,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:s,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}});var ze=d(class extends ot{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let e=this._cachedMeta,{dataset:i,data:s=[],_dataset:a}=e,n=this.chart._animationsDisabled,{start:r,count:o}=ka(e,s,n);this._drawStart=r,this._drawCount=o,Sa(e)&&(r=0,o=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!a._decimated,i.points=s;let l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!n,options:l},t),this.updateElements(s,r,o,t)}updateElements(t,e,i,s){let a=s==="reset",{iScale:n,vScale:r,_stacked:o,_dataset:l}=this._cachedMeta,{sharedOptions:h,includeOptions:c}=this._getSharedOptions(e,s),u=n.axis,f=r.axis,{spanGaps:g,segment:p}=this.options,b=Ht(g)?g:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||a||s==="none",x=e+i,y=t.length,M=e>0&&this.getParsed(e-1);for(let _=0;_<y;++_){let v=t[_],w=m?v:{};if(_<e||_>=x){w.skip=!0;continue}let k=this.getParsed(_),P=T(k[f]),D=w[u]=n.getPixelForValue(k[u],_),C=w[f]=a||P?r.getBasePixel():r.getPixelForValue(o?this.applyStack(r,k,o):k[f],_);w.skip=isNaN(D)||isNaN(C)||P,w.stop=_>0&&Math.abs(k[u]-M[u])>b,p&&(w.parsed=k,w.raw=l.data[_]),c&&(w.options=h||this.resolveDataElementOptions(_,v.active?"active":s)),m||this.updateElement(v,_,w,s),M=k}}getMaxOverflow(){let t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return i;let a=s[0].size(this.resolveDataElementOptions(0)),n=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,a,n)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}},"ie");S(ze,"id","line"),S(ze,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),S(ze,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});var de=d(class extends ot{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let e=this._cachedMeta,i=this.chart,s=i.data.labels||[],a=_e(e._parsed[t].r,i.options.locale);return{label:s[t]||"",value:a}}parseObjectData(t,e,i,s){return Ra.bind(this)(t,e,i,s)}update(t){let e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){let t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((i,s)=>{let a=this.getParsed(s).r;!isNaN(a)&&this.chart.getDataVisibility(s)&&(a<e.min&&(e.min=a),a>e.max&&(e.max=a))}),e}_updateRadius(){let t=this.chart,e=t.chartArea,i=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),a=Math.max(s/2,0),n=Math.max(i.cutoutPercentage?a/100*i.cutoutPercentage:1,0),r=(a-n)/t.getVisibleDatasetCount();this.outerRadius=a-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,i,s){let a=s==="reset",n=this.chart,r=n.options.animation,o=this._cachedMeta.rScale,l=o.xCenter,h=o.yCenter,c=o.getIndexAngle(0)-.5*B,u=c,f,g=360/this.countVisibleElements();for(f=0;f<e;++f)u+=this._computeAngle(f,s,g);for(f=e;f<e+i;f++){let p=t[f],b=u,m=u+this._computeAngle(f,s,g),x=n.getDataVisibility(f)?o.getDistanceFromCenterForValue(this.getParsed(f).r):0;u=m,a&&(r.animateScale&&(x=0),r.animateRotate&&(b=m=c));let y={x:l,y:h,innerRadius:0,outerRadius:x,startAngle:b,endAngle:m,options:this.resolveDataElementOptions(f,p.active?"active":s)};this.updateElement(p,f,y,s)}}countVisibleElements(){let t=this._cachedMeta,e=0;return t.data.forEach((i,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?rt(this.resolveDataElementOptions(t,e).angle||i):0}},"Bt");S(de,"id","polarArea"),S(de,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),S(de,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map((a,n)=>{let r=t.getDatasetMeta(0).controller.getStyle(n);return{text:a,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:s,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});var Pi=d(class extends Et{},"we");S(Pi,"id","pie"),S(Pi,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});var Ve=d(class extends ot{getLabelAndValue(t){let e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,s){return Ra.bind(this)(t,e,i,s)}update(t){let e=this._cachedMeta,i=e.dataset,s=e.data||[],a=e.iScale.getLabels();if(i.points=s,t!=="resize"){let n=this.resolveDatasetElementOptions(t);this.options.showLine||(n.borderWidth=0);let r={_loop:!0,_fullLoop:a.length===s.length,options:n};this.updateElement(i,void 0,r,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,i,s){let a=this._cachedMeta.rScale,n=s==="reset";for(let r=e;r<e+i;r++){let o=t[r],l=this.resolveDataElementOptions(r,o.active?"active":s),h=a.getPointPositionForValue(r,this.getParsed(r).r),c=n?a.xCenter:h.x,u=n?a.yCenter:h.y,f={x:c,y:u,angle:h.angle,skip:isNaN(c)||isNaN(u),options:l};this.updateElement(o,r,f,s)}}},"se");S(Ve,"id","radar"),S(Ve,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),S(Ve,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});var Be=d(class extends ot{getLabelAndValue(t){let e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:a}=e,n=this.getParsed(t),r=s.getLabelForValue(n.x),o=a.getLabelForValue(n.y);return{label:i[t]||"",value:"("+r+", "+o+")"}}update(t){let e=this._cachedMeta,{data:i=[]}=e,s=this.chart._animationsDisabled,{start:a,count:n}=ka(e,i,s);if(this._drawStart=a,this._drawCount=n,Sa(e)&&(a=0,n=i.length),this.options.showLine){let{dataset:r,_dataset:o}=e;r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;let l=this.resolveDatasetElementOptions(t);l.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:l},t)}this.updateElements(i,a,n,t)}addElements(){let{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,s){let a=s==="reset",{iScale:n,vScale:r,_stacked:o,_dataset:l}=this._cachedMeta,h=this.resolveDataElementOptions(e,s),c=this.getSharedOptions(h),u=this.includeOptions(s,c),f=n.axis,g=r.axis,{spanGaps:p,segment:b}=this.options,m=Ht(p)?p:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||a||s==="none",y=e>0&&this.getParsed(e-1);for(let M=e;M<e+i;++M){let _=t[M],v=this.getParsed(M),w=x?_:{},k=T(v[g]),P=w[f]=n.getPixelForValue(v[f],M),D=w[g]=a||k?r.getBasePixel():r.getPixelForValue(o?this.applyStack(r,v,o):v[g],M);w.skip=isNaN(P)||isNaN(D)||k,w.stop=M>0&&Math.abs(v[f]-y[f])>m,b&&(w.parsed=v,w.raw=l.data[M]),u&&(w.options=c||this.resolveDataElementOptions(M,_.active?"active":s)),x||this.updateElement(_,M,w,s),y=v}this.updateSharedOptions(c,s,h)}getMaxOverflow(){let t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let r=0;for(let o=e.length-1;o>=0;--o)r=Math.max(r,e[o].size(this.resolveDataElementOptions(o))/2);return r>0&&r}let i=t.dataset,s=i.options&&i.options.borderWidth||0;if(!e.length)return s;let a=e[0].size(this.resolveDataElementOptions(0)),n=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(s,a,n)/2}},"ne");S(Be,"id","scatter"),S(Be,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),S(Be,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Io=Object.freeze({__proto__:null,BarController:Ie,BubbleController:Fe,DoughnutController:Et,LineController:ze,PolarAreaController:de,PieController:Pi,RadarController:Ve,ScatterController:Be});function Ot(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}d(Ot,"It");var Ya=d(class{static override(t){Object.assign(Ya.prototype,t)}constructor(t){this.options=t||{}}init(){}formats(){return Ot()}parse(){return Ot()}format(){return Ot()}add(){return Ot()}diff(){return Ot()}startOf(){return Ot()}endOf(){return Ot()}},"Le"),Fo={_date:Ya};function zo(t,e,i,s){let{controller:a,data:n,_sorted:r}=t,o=a._cachedMeta.iScale;if(o&&e===o.axis&&e!=="r"&&r&&n.length){let l=o._reversePixels?nr:xt;if(s){if(a._sharedOptions){let h=n[0],c=typeof h.getRange=="function"&&h.getRange(e);if(c){let u=l(n,e,i-c),f=l(n,e,i+c);return{lo:u.lo,hi:f.hi}}}}else return l(n,e,i)}return{lo:0,hi:n.length-1}}d(zo,"ja");function ye(t,e,i,s,a){let n=t.getSortedVisibleDatasetMetas(),r=i[e];for(let o=0,l=n.length;o<l;++o){let{index:h,data:c}=n[o],{lo:u,hi:f}=zo(n[o],e,r,a);for(let g=u;g<=f;++g){let p=c[g];p.skip||s(p,h,g)}}}d(ye,"ze");function Vo(t){let e=t.indexOf("x")!==-1,i=t.indexOf("y")!==-1;return function(s,a){let n=e?Math.abs(s.x-a.x):0,r=i?Math.abs(s.y-a.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2))}}d(Vo,"$a");function bi(t,e,i,s,a){let n=[];return!a&&!t.isPointInArea(e)||ye(t,i,e,function(r,o,l){!a&&!ge(r,t.chartArea,0)||r.inRange(e.x,e.y,s)&&n.push({element:r,datasetIndex:o,index:l})},!0),n}d(bi,"Gi");function Bo(t,e,i,s){let a=[];function n(r,o,l){let{startAngle:h,endAngle:c}=r.getProps(["startAngle","endAngle"],s),{angle:u}=_a(r,{x:e.x,y:e.y});fe(u,h,c)&&a.push({element:r,datasetIndex:o,index:l})}return d(n,"o"),ye(t,i,e,n),a}d(Bo,"Ua");function Wo(t,e,i,s,a,n){let r=[],o=Vo(i),l=Number.POSITIVE_INFINITY;function h(c,u,f){let g=c.inRange(e.x,e.y,a);if(s&&!g)return;let p=c.getCenterPoint(a);if(!(n||t.isPointInArea(p))&&!g)return;let b=o(e,p);b<l?(r=[{element:c,datasetIndex:u,index:f}],l=b):b===l&&r.push({element:c,datasetIndex:u,index:f})}return d(h,"c"),ye(t,i,e,h),r}d(Wo,"Ya");function xi(t,e,i,s,a,n){return!n&&!t.isPointInArea(e)?[]:i==="r"&&!s?Bo(t,e,i,a):Wo(t,e,i,s,a,n)}d(xi,"Ji");function As(t,e,i,s,a){let n=[],r=i==="x"?"inXRange":"inYRange",o=!1;return ye(t,i,e,(l,h,c)=>{l[r](e[i],a)&&(n.push({element:l,datasetIndex:h,index:c}),o=o||l.inRange(e.x,e.y,a))}),s&&!o?[]:n}d(As,"fn");var No={evaluateInteractionItems:ye,modes:{index(t,e,i,s){let a=Lt(e,t),n=i.axis||"x",r=i.includeInvisible||!1,o=i.intersect?bi(t,a,n,s,r):xi(t,a,n,!1,s,r),l=[];return o.length?(t.getSortedVisibleDatasetMetas().forEach(h=>{let c=o[0].index,u=h.data[c];u&&!u.skip&&l.push({element:u,datasetIndex:h.index,index:c})}),l):[]},dataset(t,e,i,s){let a=Lt(e,t),n=i.axis||"xy",r=i.includeInvisible||!1,o=i.intersect?bi(t,a,n,s,r):xi(t,a,n,!1,s,r);if(o.length>0){let l=o[0].datasetIndex,h=t.getDatasetMeta(l).data;o=[];for(let c=0;c<h.length;++c)o.push({element:h[c],datasetIndex:l,index:c})}return o},point(t,e,i,s){let a=Lt(e,t),n=i.axis||"xy",r=i.includeInvisible||!1;return bi(t,a,n,s,r)},nearest(t,e,i,s){let a=Lt(e,t),n=i.axis||"xy",r=i.includeInvisible||!1;return xi(t,a,n,i.intersect,s,r)},x(t,e,i,s){let a=Lt(e,t);return As(t,a,"x",i.intersect,s)},y(t,e,i,s){let a=Lt(e,t);return As(t,a,"y",i.intersect,s)}}},Ua=["left","top","right","bottom"];function Qt(t,e){return t.filter(i=>i.pos===e)}d(Qt,"ye");function Ls(t,e){return t.filter(i=>Ua.indexOf(i.pos)===-1&&i.box.axis===e)}d(Ls,"gn");function te(t,e){return t.sort((i,s)=>{let a=e?s:i,n=e?i:s;return a.weight===n.weight?a.index-n.index:a.weight-n.weight})}d(te,"ve");function Ho(t){let e=[],i,s,a,n,r,o;for(i=0,s=(t||[]).length;i<s;++i)a=t[i],{position:n,options:{stack:r,stackWeight:o=1}}=a,e.push({index:i,box:a,pos:n,horizontal:a.isHorizontal(),weight:a.weight,stack:r&&n+r,stackWeight:o});return e}d(Ho,"Ka");function jo(t){let e={};for(let i of t){let{stack:s,pos:a,stackWeight:n}=i;if(!s||!Ua.includes(a))continue;let r=e[s]||(e[s]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=n}return e}d(jo,"qa");function $o(t,e){let i=jo(t),{vBoxMaxWidth:s,hBoxMaxHeight:a}=e,n,r,o;for(n=0,r=t.length;n<r;++n){o=t[n];let{fullSize:l}=o.box,h=i[o.stack],c=h&&o.stackWeight/h.weight;o.horizontal?(o.width=c?c*s:l&&e.availableWidth,o.height=a):(o.width=s,o.height=c?c*a:l&&e.availableHeight)}return i}d($o,"Ga");function Yo(t){let e=Ho(t),i=te(e.filter(h=>h.box.fullSize),!0),s=te(Qt(e,"left"),!0),a=te(Qt(e,"right")),n=te(Qt(e,"top"),!0),r=te(Qt(e,"bottom")),o=Ls(e,"x"),l=Ls(e,"y");return{fullSize:i,leftAndTop:s.concat(n),rightAndBottom:a.concat(l).concat(r).concat(o),chartArea:Qt(e,"chartArea"),vertical:s.concat(a).concat(l),horizontal:n.concat(r).concat(o)}}d(Yo,"Ja");function Ts(t,e,i,s){return Math.max(t[i],e[i])+Math.max(t[s],e[s])}d(Ts,"pn");function Xa(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}d(Xa,"so");function Uo(t,e,i,s){let{pos:a,box:n}=i,r=t.maxPadding;if(!A(a)){i.size&&(t[a]-=i.size);let u=s[i.stack]||{size:0,count:1};u.size=Math.max(u.size,i.horizontal?n.height:n.width),i.size=u.size/u.count,t[a]+=i.size}n.getPadding&&Xa(r,n.getPadding());let o=Math.max(0,e.outerWidth-Ts(r,t,"left","right")),l=Math.max(0,e.outerHeight-Ts(r,t,"top","bottom")),h=o!==t.w,c=l!==t.h;return t.w=o,t.h=l,i.horizontal?{same:h,other:c}:{same:c,other:h}}d(Uo,"Qa");function Xo(t){let e=t.maxPadding;function i(s){let a=Math.max(e[s]-t[s],0);return t[s]+=a,a}d(i,"e"),t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}d(Xo,"Za");function qo(t,e){let i=e.maxPadding;function s(a){let n={left:0,top:0,right:0,bottom:0};return a.forEach(r=>{n[r]=Math.max(e[r],i[r])}),n}return d(s,"s"),s(t?["left","right"]:["top","bottom"])}d(qo,"tr");function ae(t,e,i,s){let a=[],n,r,o,l,h,c;for(n=0,r=t.length,h=0;n<r;++n){o=t[n],l=o.box,l.update(o.width||e.w,o.height||e.h,qo(o.horizontal,e));let{same:u,other:f}=Uo(e,i,o,s);h|=u&&a.length,c=c||f,l.fullSize||a.push(o)}return h&&ae(a,e,i,s)||c}d(ae,"Se");function Ce(t,e,i,s,a){t.top=i,t.left=e,t.right=e+s,t.bottom=i+a,t.width=s,t.height=a}d(Ce,"ei");function Es(t,e,i,s){let a=i.padding,{x:n,y:r}=e;for(let o of t){let l=o.box,h=s[o.stack]||{count:1,placed:0,weight:1},c=o.stackWeight/h.weight||1;if(o.horizontal){let u=e.w*c,f=h.size||l.height;at(h.start)&&(r=h.start),l.fullSize?Ce(l,a.left,r,i.outerWidth-a.right-a.left,f):Ce(l,e.left+h.placed,r,u,f),h.start=r,h.placed+=u,r=l.bottom}else{let u=e.h*c,f=h.size||l.width;at(h.start)&&(n=h.start),l.fullSize?Ce(l,n,a.top,f,i.outerHeight-a.bottom-a.top):Ce(l,n,e.top+h.placed,f,u),h.start=n,h.placed+=u,n=l.right}}e.x=n,e.y=r}d(Es,"mn");var X={addBox(t,e){t.boxes||(t.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(i){e.draw(i)}}]},t.boxes.push(e)},removeBox(t,e){let i=t.boxes?t.boxes.indexOf(e):-1;i!==-1&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,s){if(!t)return;let a=q(t.options.layout.padding),n=Math.max(e-a.width,0),r=Math.max(i-a.height,0),o=Yo(t.boxes),l=o.vertical,h=o.horizontal;R(t.boxes,b=>{typeof b.beforeLayout=="function"&&b.beforeLayout()});let c=l.reduce((b,m)=>m.box.options&&m.box.options.display===!1?b:b+1,0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:a,availableWidth:n,availableHeight:r,vBoxMaxWidth:n/2/c,hBoxMaxHeight:r/2}),f=Object.assign({},a);Xa(f,q(s));let g=Object.assign({maxPadding:f,w:n,h:r,x:a.left,y:a.top},a),p=$o(l.concat(h),u);ae(o.fullSize,g,u,p),ae(l,g,u,p),ae(h,g,u,p)&&ae(l,g,u,p),Xo(g),Es(o.leftAndTop,g,u,p),g.x+=g.w,g.y+=g.h,Es(o.rightAndBottom,g,u,p),t.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},R(o.chartArea,b=>{let m=b.box;Object.assign(m,t.chartArea),m.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})})}},qa=d(class{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}},"hi"),Ko=d(class extends qa{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}},"ns"),We="$chartjs",Go={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Rs=d(t=>t===null||t==="","bn");function Jo(t,e){let i=t.style,s=t.getAttribute("height"),a=t.getAttribute("width");if(t[We]={initial:{height:s,width:a,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Rs(a)){let n=ms(t,"width");n!==void 0&&(t.width=n)}if(Rs(s))if(t.style.height==="")t.height=t.width/(e||2);else{let n=ms(t,"height");n!==void 0&&(t.height=n)}return t}d(Jo,"ir");var Ka=Zr?{passive:!0}:!1;function Zo(t,e,i){t.addEventListener(e,i,Ka)}d(Zo,"sr");function Qo(t,e,i){t.canvas.removeEventListener(e,i,Ka)}d(Qo,"nr");function tl(t,e){let i=Go[t.type]||t.type,{x:s,y:a}=Lt(t,e);return{type:i,chart:e,native:t,x:s!==void 0?s:null,y:a!==void 0?a:null}}d(tl,"or");function Ke(t,e){for(let i of t)if(i===e||i.contains(e))return!0}d(Ke,"di");function el(t,e,i){let s=t.canvas,a=new MutationObserver(n=>{let r=!1;for(let o of n)r=r||Ke(o.addedNodes,s),r=r&&!Ke(o.removedNodes,s);r&&i()});return a.observe(document,{childList:!0,subtree:!0}),a}d(el,"ar");function il(t,e,i){let s=t.canvas,a=new MutationObserver(n=>{let r=!1;for(let o of n)r=r||Ke(o.removedNodes,s),r=r&&!Ke(o.addedNodes,s);r&&i()});return a.observe(document,{childList:!0,subtree:!0}),a}d(il,"rr");var me=new Map,Is=0;function Ga(){let t=window.devicePixelRatio;t!==Is&&(Is=t,me.forEach((e,i)=>{i.currentDevicePixelRatio!==t&&e()}))}d(Ga,"oo");function sl(t,e){me.size||window.addEventListener("resize",Ga),me.set(t,e)}d(sl,"lr");function al(t){me.delete(t),me.size||window.removeEventListener("resize",Ga)}d(al,"cr");function nl(t,e,i){let s=t.canvas,a=s&&Yi(s);if(!a)return;let n=wa((o,l)=>{let h=a.clientWidth;i(o,l),h<a.clientWidth&&i()},window),r=new ResizeObserver(o=>{let l=o[0],h=l.contentRect.width,c=l.contentRect.height;h===0&&c===0||n(h,c)});return r.observe(a),sl(t,n),r}d(nl,"hr");function _i(t,e,i){i&&i.disconnect(),e==="resize"&&al(t)}d(_i,"Qi");function rl(t,e,i){let s=t.canvas,a=wa(n=>{t.ctx!==null&&i(tl(n,t))},t);return Zo(s,e,a),a}d(rl,"dr");var ol=d(class extends qa{acquireContext(t,e){let i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(Jo(t,e),i):null}releaseContext(t){let e=t.canvas;if(!e[We])return!1;let i=e[We].initial;["height","width"].forEach(a=>{let n=i[a];T(n)?e.removeAttribute(a):e.setAttribute(a,n)});let s=i.style||{};return Object.keys(s).forEach(a=>{e.style[a]=s[a]}),e.width=e.width,delete e[We],!0}addEventListener(t,e,i){this.removeEventListener(t,e);let s=t.$proxies||(t.$proxies={}),a={attach:el,detach:il,resize:nl}[e]||rl;s[e]=a(t,e,i)}removeEventListener(t,e){let i=t.$proxies||(t.$proxies={}),s=i[e];s&&(({attach:_i,detach:_i,resize:_i}[e]||Qo)(t,e,s),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return Jr(t,e,i,s)}isAttached(t){let e=Yi(t);return!!(e&&e.isConnected)}},"os");function ll(t){return!Fa()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?Ko:ol}d(ll,"ur");var lt=d(class{active=!1;tooltipPosition(t){let{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return Ht(this.x)&&Ht(this.y)}getProps(t,e){let i=this.$animations;if(!e||!i)return this;let s={};return t.forEach(a=>{s[a]=i[a]&&i[a].active()?i[a]._to:this[a]}),s}},"nt");S(lt,"defaults",{}),S(lt,"defaultRoutes");function hl(t,e){let i=t.options.ticks,s=dl(t),a=Math.min(i.maxTicksLimit||s,s),n=i.major.enabled?ul(e):[],r=n.length,o=n[0],l=n[r-1],h=[];if(r>a)return fl(e,h,n,r/a),h;let c=cl(n,e,a);if(r>0){let u,f,g=r>1?Math.round((l-o)/(r-1)):null;for(Oe(e,h,c,T(g)?0:o-g,o),u=0,f=r-1;u<f;u++)Oe(e,h,c,n[u],n[u+1]);return Oe(e,h,c,l,T(g)?e.length:l+g),h}return Oe(e,h,c),h}d(hl,"fr");function dl(t){let e=t.options.offset,i=t._tickSize(),s=t._length/i+(e?0:1),a=t._maxLength/i;return Math.floor(Math.min(s,a))}d(dl,"gr");function cl(t,e,i){let s=gl(t),a=e.length/i;if(!s)return Math.max(a,1);let n=er(s);for(let r=0,o=n.length-1;r<o;r++){let l=n[r];if(l>a)return l}return Math.max(a,1)}d(cl,"pr");function ul(t){let e=[],i,s;for(i=0,s=t.length;i<s;i++)t[i].major&&e.push(i);return e}d(ul,"mr");function fl(t,e,i,s){let a=0,n=i[0],r;for(s=Math.ceil(s),r=0;r<t.length;r++)r===n&&(e.push(t[r]),a++,n=i[a*s])}d(fl,"br");function Oe(t,e,i,s,a){let n=O(s,0),r=Math.min(O(a,t.length),t.length),o=0,l,h,c;for(i=Math.ceil(i),a&&(l=a-s,i=l/Math.floor(l/i)),c=n;c<0;)o++,c=Math.round(n+o*i);for(h=Math.max(n,0);h<r;h++)h===c&&(e.push(t[h]),o++,c=Math.round(n+o*i))}d(Oe,"ii");function gl(t){let e=t.length,i,s;if(e<2)return!1;for(s=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==s)return!1;return s}d(gl,"_r");var pl=d(t=>t==="left"?"right":t==="right"?"left":t,"xr"),Fs=d((t,e,i)=>e==="top"||e==="left"?t[e]+i:t[e]-i,"xn"),zs=d((t,e)=>Math.min(e||t,t),"yn");function Vs(t,e){let i=[],s=t.length/e,a=t.length,n=0;for(;n<a;n+=s)i.push(t[Math.floor(n)]);return i}d(Vs,"vn");function ml(t,e,i){let s=t.ticks.length,a=Math.min(e,s-1),n=t._startPixel,r=t._endPixel,o=1e-6,l=t.getPixelForTick(a),h;if(!(i&&(s===1?h=Math.max(l-n,r-l):e===0?h=(t.getPixelForTick(1)-l)/2:h=(l-t.getPixelForTick(a-1))/2,l+=a<e?h:-h,l<n-o||l>r+o)))return l}d(ml,"yr");function bl(t,e){R(t,i=>{let s=i.gc,a=s.length/2,n;if(a>e){for(n=0;n<a;++n)delete i.data[s[n]];s.splice(0,a)}})}d(bl,"vr");function ee(t){return t.drawTicks?t.tickLength:0}d(ee,"Me");function Bs(t,e){if(!t.display)return 0;let i=j(t.font,e),s=q(t.padding);return(F(t.text)?t.text.length:1)*i.lineHeight+s.height}d(Bs,"Mn");function xl(t,e){return Pt(t,{scale:e,type:"scale"})}d(xl,"Mr");function _l(t,e,i){return Pt(t,{tick:i,index:e,type:"tick"})}d(_l,"kr");function yl(t,e,i){let s=Wi(t);return(i&&e!=="right"||!i&&e==="right")&&(s=pl(s)),s}d(yl,"wr");function vl(t,e,i,s){let{top:a,left:n,bottom:r,right:o,chart:l}=t,{chartArea:h,scales:c}=l,u=0,f,g,p,b=r-a,m=o-n;if(t.isHorizontal()){if(g=U(s,n,o),A(i)){let x=Object.keys(i)[0],y=i[x];p=c[x].getPixelForValue(y)+b-e}else i==="center"?p=(h.bottom+h.top)/2+b-e:p=Fs(t,i,e);f=o-n}else{if(A(i)){let x=Object.keys(i)[0],y=i[x];g=c[x].getPixelForValue(y)-m+e}else i==="center"?g=(h.left+h.right)/2-m+e:g=Fs(t,i,e);p=U(s,r,a),u=i==="left"?-N:N}return{titleX:g,titleY:p,maxWidth:f,rotation:u}}d(vl,"Sr");var Yt=d(class extends lt{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:s}=this;return t=et(t,Number.POSITIVE_INFINITY),e=et(e,Number.NEGATIVE_INFINITY),i=et(i,Number.POSITIVE_INFINITY),s=et(s,Number.NEGATIVE_INFINITY),{min:et(t,i),max:et(e,s),minDefined:W(t),maxDefined:W(e)}}getMinMax(t){let{min:e,max:i,minDefined:s,maxDefined:a}=this.getUserBounds(),n;if(s&&a)return{min:e,max:i};let r=this.getMatchingVisibleMetas();for(let o=0,l=r.length;o<l;++o)n=r[o].controller.getMinMax(this,t),s||(e=Math.min(e,n.min)),a||(i=Math.max(i,n.max));return e=a&&e>i?i:e,i=s&&e>i?e:i,{min:et(e,et(i,e)),max:et(i,et(e,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){I(this.options.beforeUpdate,[this])}update(t,e,i){let{beginAtZero:s,grace:a,ticks:n}=this.options,r=n.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Or(this,a,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let o=r<this.ticks.length;this._convertTicksToLabels(o?Vs(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),n.display&&(n.autoSkip||n.source==="auto")&&(this.ticks=hl(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),o&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,i;this.isHorizontal()?(e=this.left,i=this.right):(e=this.top,i=this.bottom,t=!t),this._startPixel=e,this._endPixel=i,this._reversePixels=t,this._length=i-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){I(this.options.afterUpdate,[this])}beforeSetDimensions(){I(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(){I(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),I(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){I(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){let e=this.options.ticks,i,s,a;for(i=0,s=t.length;i<s;i++)a=t[i],a.label=I(e.callback,[a.value,i,t],this)}afterTickToLabelConversion(){I(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){I(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let t=this.options,e=t.ticks,i=zs(this.ticks.length,t.ticks.maxTicksLimit),s=e.minRotation||0,a=e.maxRotation,n=s,r,o,l;if(!this._isVisible()||!e.display||s>=a||i<=1||!this.isHorizontal()){this.labelRotation=s;return}let h=this._getLabelSizes(),c=h.widest.width,u=h.highest.height,f=Y(this.chart.width-c,0,this.maxWidth);r=t.offset?this.maxWidth/i:f/(i-1),c+6>r&&(r=f/(i-(t.offset?.5:1)),o=this.maxHeight-ee(t.grid)-e.padding-Bs(t.title,this.chart.options.font),l=Math.sqrt(c*c+u*u),n=Vi(Math.min(Math.asin(Y((h.highest.height+6)/r,-1,1)),Math.asin(Y(o/l,-1,1))-Math.asin(Y(u/l,-1,1)))),n=Math.max(s,Math.min(a,n))),this.labelRotation=n}afterCalculateLabelRotation(){I(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){I(this.options.beforeFit,[this])}fit(){let t={width:0,height:0},{chart:e,options:{ticks:i,title:s,grid:a}}=this,n=this._isVisible(),r=this.isHorizontal();if(n){let o=Bs(s,e.options.font);if(r?(t.width=this.maxWidth,t.height=ee(a)+o):(t.height=this.maxHeight,t.width=ee(a)+o),i.display&&this.ticks.length){let{first:l,last:h,widest:c,highest:u}=this._getLabelSizes(),f=i.padding*2,g=rt(this.labelRotation),p=Math.cos(g),b=Math.sin(g);if(r){let m=i.mirror?0:b*c.width+p*u.height;t.height=Math.min(this.maxHeight,t.height+m+f)}else{let m=i.mirror?0:p*c.width+b*u.height;t.width=Math.min(this.maxWidth,t.width+m+f)}this._calculatePadding(l,h,b,p)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,s){let{ticks:{align:a,padding:n},position:r}=this.options,o=this.labelRotation!==0,l=r!=="top"&&this.axis==="x";if(this.isHorizontal()){let h=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1),u=0,f=0;o?l?(u=s*t.width,f=i*e.height):(u=i*t.height,f=s*e.width):a==="start"?f=e.width:a==="end"?u=t.width:a!=="inner"&&(u=t.width/2,f=e.width/2),this.paddingLeft=Math.max((u-h+n)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-c+n)*this.width/(this.width-c),0)}else{let h=e.height/2,c=t.height/2;a==="start"?(h=0,c=t.height):a==="end"&&(h=e.height,c=0),this.paddingTop=h+n,this.paddingBottom=c+n}}_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(){I(this.options.afterFit,[this])}isHorizontal(){let{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,i;for(e=0,i=t.length;e<i;e++)T(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){let e=this.options.ticks.sampleSize,i=this.ticks;e<i.length&&(i=Vs(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){let{ctx:s,_longestTextCache:a}=this,n=[],r=[],o=Math.floor(e/zs(e,i)),l=0,h=0,c,u,f,g,p,b,m,x,y,M,_;for(c=0;c<e;c+=o){if(g=t[c].label,p=this._resolveTickFontOptions(c),s.font=b=p.string,m=a[b]=a[b]||{data:{},gc:[]},x=p.lineHeight,y=M=0,!T(g)&&!F(g))y=Xe(s,m.data,m.gc,y,g),M=x;else if(F(g))for(u=0,f=g.length;u<f;++u)_=g[u],!T(_)&&!F(_)&&(y=Xe(s,m.data,m.gc,y,_),M+=x);n.push(y),r.push(M),l=Math.max(y,l),h=Math.max(M,h)}bl(a,e);let v=n.indexOf(l),w=r.indexOf(h),k=d(P=>({width:n[P]||0,height:r[P]||0}),"w");return{first:k(0),last:k(e-1),widest:k(v),highest:k(w),widths:n,heights:r}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);let e=this._startPixel+t*this._length;return ar(this._alignToPixels?Ct(this.chart,e,0):e)}getDecimalForPixel(t){let e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){let e=this.ticks||[];if(t>=0&&t<e.length){let i=e[t];return i.$context||(i.$context=_l(this.getContext(),t,i))}return this.$context||(this.$context=xl(this.chart.getContext(),this))}_tickSize(){let t=this.options.ticks,e=rt(this.labelRotation),i=Math.abs(Math.cos(e)),s=Math.abs(Math.sin(e)),a=this._getLabelSizes(),n=t.autoSkipPadding||0,r=a?a.widest.width+n:0,o=a?a.highest.height+n:0;return this.isHorizontal()?o*i>r*s?r/i:o/s:o*s<r*i?o/i:r/s}_isVisible(){let t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){let e=this.axis,i=this.chart,s=this.options,{grid:a,position:n,border:r}=s,o=a.offset,l=this.isHorizontal(),h=this.ticks.length+(o?1:0),c=ee(a),u=[],f=r.setContext(this.getContext()),g=f.display?f.width:0,p=g/2,b=d(function(L){return Ct(i,L,g)},"b"),m,x,y,M,_,v,w,k,P,D,C,E;if(n==="top")m=b(this.bottom),v=this.bottom-c,k=m-p,D=b(t.top)+p,E=t.bottom;else if(n==="bottom")m=b(this.top),D=t.top,E=b(t.bottom)-p,v=m+p,k=this.top+c;else if(n==="left")m=b(this.right),_=this.right-c,w=m-p,P=b(t.left)+p,C=t.right;else if(n==="right")m=b(this.left),P=t.left,C=b(t.right)-p,_=m+p,w=this.left+c;else if(e==="x"){if(n==="center")m=b((t.top+t.bottom)/2+.5);else if(A(n)){let L=Object.keys(n)[0],V=n[L];m=b(this.chart.scales[L].getPixelForValue(V))}D=t.top,E=t.bottom,v=m+p,k=v+c}else if(e==="y"){if(n==="center")m=b((t.left+t.right)/2);else if(A(n)){let L=Object.keys(n)[0],V=n[L];m=b(this.chart.scales[L].getPixelForValue(V))}_=m-p,w=_-c,P=t.left,C=t.right}let K=O(s.ticks.maxTicksLimit,h),Q=Math.max(1,Math.ceil(h/K));for(x=0;x<h;x+=Q){let L=this.getContext(x),V=a.setContext(L),nt=r.setContext(L),tt=V.lineWidth,ht=V.color,$=nt.dash||[],ve=nt.dashOffset,Vt=V.tickWidth,Ut=V.tickColor,Xt=V.tickBorderDash||[],qt=V.tickBorderDashOffset;y=ml(this,x,o),y!==void 0&&(M=Ct(i,y,tt),l?_=w=P=C=M:v=k=D=E=M,u.push({tx1:_,ty1:v,tx2:w,ty2:k,x1:P,y1:D,x2:C,y2:E,width:tt,color:ht,borderDash:$,borderDashOffset:ve,tickWidth:Vt,tickColor:Ut,tickBorderDash:Xt,tickBorderDashOffset:qt}))}return this._ticksLength=h,this._borderValue=m,u}_computeLabelItems(t){let e=this.axis,i=this.options,{position:s,ticks:a}=i,n=this.isHorizontal(),r=this.ticks,{align:o,crossAlign:l,padding:h,mirror:c}=a,u=ee(i.grid),f=u+h,g=c?-h:f,p=-rt(this.labelRotation),b=[],m,x,y,M,_,v,w,k,P,D,C,E,K="middle";if(s==="top")v=this.bottom-g,w=this._getXAxisLabelAlignment();else if(s==="bottom")v=this.top+g,w=this._getXAxisLabelAlignment();else if(s==="left"){let L=this._getYAxisLabelAlignment(u);w=L.textAlign,_=L.x}else if(s==="right"){let L=this._getYAxisLabelAlignment(u);w=L.textAlign,_=L.x}else if(e==="x"){if(s==="center")v=(t.top+t.bottom)/2+f;else if(A(s)){let L=Object.keys(s)[0],V=s[L];v=this.chart.scales[L].getPixelForValue(V)+f}w=this._getXAxisLabelAlignment()}else if(e==="y"){if(s==="center")_=(t.left+t.right)/2-f;else if(A(s)){let L=Object.keys(s)[0],V=s[L];_=this.chart.scales[L].getPixelForValue(V)}w=this._getYAxisLabelAlignment(u).textAlign}e==="y"&&(o==="start"?K="top":o==="end"&&(K="bottom"));let Q=this._getLabelSizes();for(m=0,x=r.length;m<x;++m){y=r[m],M=y.label;let L=a.setContext(this.getContext(m));k=this.getPixelForTick(m)+a.labelOffset,P=this._resolveTickFontOptions(m),D=P.lineHeight,C=F(M)?M.length:1;let V=C/2,nt=L.color,tt=L.textStrokeColor,ht=L.textStrokeWidth,$=w;n?(_=k,w==="inner"&&(m===x-1?$=this.options.reverse?"left":"right":m===0?$=this.options.reverse?"right":"left":$="center"),s==="top"?l==="near"||p!==0?E=-C*D+D/2:l==="center"?E=-Q.highest.height/2-V*D+D:E=-Q.highest.height+D/2:l==="near"||p!==0?E=D/2:l==="center"?E=Q.highest.height/2-V*D:E=Q.highest.height-C*D,c&&(E*=-1),p!==0&&!L.showLabelBackdrop&&(_+=D/2*Math.sin(p))):(v=k,E=(1-C)*D/2);let ve;if(L.showLabelBackdrop){let Vt=q(L.backdropPadding),Ut=Q.heights[m],Xt=Q.widths[m],qt=E-Vt.top,ri=0-Vt.left;switch(K){case"middle":qt-=Ut/2;break;case"bottom":qt-=Ut;break}switch(w){case"center":ri-=Xt/2;break;case"right":ri-=Xt;break}ve={left:ri,top:qt,width:Xt+Vt.width,height:Ut+Vt.height,color:L.backdropColor}}b.push({label:M,font:P,textOffset:E,options:{rotation:p,color:nt,strokeColor:tt,strokeWidth:ht,textAlign:$,textBaseline:K,translation:[_,v],backdrop:ve}})}return b}_getXAxisLabelAlignment(){let{position:t,ticks:e}=this.options;if(-rt(this.labelRotation))return t==="top"?"left":"right";let i="center";return e.align==="start"?i="left":e.align==="end"?i="right":e.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){let{position:e,ticks:{crossAlign:i,mirror:s,padding:a}}=this.options,n=this._getLabelSizes(),r=t+a,o=n.widest.width,l,h;return e==="left"?s?(h=this.right+a,i==="near"?l="left":i==="center"?(l="center",h+=o/2):(l="right",h+=o)):(h=this.right-r,i==="near"?l="right":i==="center"?(l="center",h-=o/2):(l="left",h=this.left)):e==="right"?s?(h=this.left+a,i==="near"?l="right":i==="center"?(l="center",h-=o/2):(l="left",h-=o)):(h=this.left+r,i==="near"?l="left":i==="center"?(l="center",h+=o/2):(l="right",h=this.right)):l="right",{textAlign:l,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;let t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){let{ctx:t,options:{backgroundColor:e},left:i,top:s,width:a,height:n}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,s,a,n),t.restore())}getLineWidthForValue(t){let e=this.options.grid;if(!this._isVisible()||!e.display)return 0;let i=this.ticks.findIndex(s=>s.value===t);return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){let e=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),a,n,r=d((o,l,h)=>{!h.width||!h.color||(i.save(),i.lineWidth=h.width,i.strokeStyle=h.color,i.setLineDash(h.borderDash||[]),i.lineDashOffset=h.borderDashOffset,i.beginPath(),i.moveTo(o.x,o.y),i.lineTo(l.x,l.y),i.stroke(),i.restore())},"r");if(e.display)for(a=0,n=s.length;a<n;++a){let o=s[a];e.drawOnChartArea&&r({x:o.x1,y:o.y1},{x:o.x2,y:o.y2},o),e.drawTicks&&r({x:o.tx1,y:o.ty1},{x:o.tx2,y:o.ty2},{color:o.tickColor,width:o.tickWidth,borderDash:o.tickBorderDash,borderDashOffset:o.tickBorderDashOffset})}}drawBorder(){let{chart:t,ctx:e,options:{border:i,grid:s}}=this,a=i.setContext(this.getContext()),n=i.display?a.width:0;if(!n)return;let r=s.setContext(this.getContext(0)).lineWidth,o=this._borderValue,l,h,c,u;this.isHorizontal()?(l=Ct(t,this.left,n)-n/2,h=Ct(t,this.right,r)+r/2,c=u=o):(c=Ct(t,this.top,n)-n/2,u=Ct(t,this.bottom,r)+r/2,l=h=o),e.save(),e.lineWidth=a.width,e.strokeStyle=a.color,e.beginPath(),e.moveTo(l,c),e.lineTo(h,u),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;let e=this.ctx,i=this._computeLabelArea();i&&ei(e,i);let s=this.getLabelItems(t);for(let a of s){let n=a.options,r=a.font,o=a.label,l=a.textOffset;zt(e,o,0,l,r,n)}i&&ii(e)}drawTitle(){let{ctx:t,options:{position:e,title:i,reverse:s}}=this;if(!i.display)return;let a=j(i.font),n=q(i.padding),r=i.align,o=a.lineHeight/2;e==="bottom"||e==="center"||A(e)?(o+=n.bottom,F(i.text)&&(o+=a.lineHeight*(i.text.length-1))):o+=n.top;let{titleX:l,titleY:h,maxWidth:c,rotation:u}=vl(this,o,e,r);zt(t,i.text,0,0,a,{color:i.color,maxWidth:c,rotation:u,textAlign:yl(r,e,s),textBaseline:"middle",translation:[l,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){let t=this.options,e=t.ticks&&t.ticks.z||0,i=O(t.grid&&t.grid.z,-1),s=O(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Yt.prototype.draw?[{z:e,draw:a=>{this.draw(a)}}]:[{z:i,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(t){let e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[],a,n;for(a=0,n=e.length;a<n;++a){let r=e[a];r[i]===this.id&&(!t||r.type===t)&&s.push(r)}return s}_resolveTickFontOptions(t){let e=this.options.ticks.setContext(this.getContext(t));return j(e.font)}_maxDigits(){let t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}},"Mt"),Ae=d(class{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){let e=Object.getPrototypeOf(t),i;kl(e)&&(i=this.register(e));let s=this.items,a=t.id,n=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+t);return a in s||(s[a]=t,Ml(t,n,i),this.override&&H.override(t.id,t.overrides)),n}get(t){return this.items[t]}unregister(t){let e=this.items,i=t.id,s=this.scope;i in e&&delete e[i],s&&i in H[s]&&(delete H[s][i],this.override&&delete Ft[i])}},"le");function Ml(t,e,i){let s=ue(Object.create(null),[i?H.get(i):{},H.get(e),t.defaults]);H.set(e,s),t.defaultRoutes&&wl(e,t.defaultRoutes),t.descriptors&&H.describe(e,t.descriptors)}d(Ml,"Pr");function wl(t,e){Object.keys(e).forEach(i=>{let s=i.split("."),a=s.pop(),n=[t].concat(s).join("."),r=e[i].split("."),o=r.pop(),l=r.join(".");H.route(n,a,l,o)})}d(wl,"Dr");function kl(t){return"id"in t&&"defaults"in t}d(kl,"Or");var Sl=d(class{constructor(){this.controllers=new Ae(ot,"datasets",!0),this.elements=new Ae(lt,"elements"),this.plugins=new Ae(Object,"plugins"),this.scales=new Ae(Yt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(s=>{let a=i||this._getRegistryForType(s);i||a.isForType(s)||a===this.plugins&&s.id?this._exec(t,a,s):R(s,n=>{let r=i||this._getRegistryForType(n);this._exec(t,r,n)})})}_exec(t,e,i){let s=zi(t);I(i["before"+s],[],i),e[t](i),I(i["after"+s],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){let i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){let s=e.get(t);if(s===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return s}},"as"),ct=new Sl,Pl=d(class{constructor(){this._init=[]}notify(t,e,i,s){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));let a=s?this._descriptors(t).filter(s):this._descriptors(t),n=this._notify(a,t,e,i);return e==="afterDestroy"&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall")),n}_notify(t,e,i,s){s=s||{};for(let a of t){let n=a.plugin,r=n[i],o=[e,s,a.options];if(I(r,o,n)===!1&&s.cancelable)return!1}return!0}invalidate(){T(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;let e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){let i=t&&t.config,s=O(i.options&&i.options.plugins,{}),a=Dl(i);return s===!1&&!e?[]:Ol(t,a,s,e)}_notifyStateChanges(t){let e=this._oldCache||[],i=this._cache,s=d((a,n)=>a.filter(r=>!n.some(o=>r.plugin.id===o.plugin.id)),"n");this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}},"rs");function Dl(t){let e={},i=[],s=Object.keys(ct.plugins.items);for(let n=0;n<s.length;n++)i.push(ct.getPlugin(s[n]));let a=t.plugins||[];for(let n=0;n<a.length;n++){let r=a[n];i.indexOf(r)===-1&&(i.push(r),e[r.id]=!0)}return{plugins:i,localIds:e}}d(Dl,"Cr");function Cl(t,e){return!e&&t===!1?null:t===!0?{}:t}d(Cl,"Ar");function Ol(t,{plugins:e,localIds:i},s,a){let n=[],r=t.getContext();for(let o of e){let l=o.id,h=Cl(s[l],a);h!==null&&n.push({plugin:o,options:Al(t.config,{plugin:o,local:i[l]},h,r)})}return n}d(Ol,"Tr");function Al(t,{plugin:e,local:i},s,a){let n=t.pluginScopeKeys(e),r=t.getOptionScopes(s,n);return i&&e.defaults&&r.push(e.defaults),t.createResolver(r,a,[""],{scriptable:!1,indexable:!1,allKeys:!0})}d(Al,"Lr");function Di(t,e){let i=H.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}d(Di,"ls");function Ll(t,e){let i=t;return t==="_index_"?i=e:t==="_value_"&&(i=e==="x"?"y":"x"),i}d(Ll,"Rr");function Tl(t,e){return t===e?"_index_":"_value_"}d(Tl,"Er");function El(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}d(El,"Ir");function Ge(t,e){if(t==="x"||t==="y"||t==="r"||(t=e.axis||El(e.position)||t.length>1&&Ge(t[0].toLowerCase(),e),t))return t;throw new Error(`Cannot determine type of '${name}' axis. Please provide 'axis' or 'position' option.`)}d(Ge,"ui");function Rl(t,e){let i=Ft[t.type]||{scales:{}},s=e.scales||{},a=Di(t.type,e),n=Object.create(null);return Object.keys(s).forEach(r=>{let o=s[r];if(!A(o))return console.error(`Invalid scale configuration for scale: ${r}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);let l=Ge(r,o),h=Tl(l,a),c=i.scales||{};n[r]=re(Object.create(null),[{axis:l},o,c[l],c[h]])}),t.data.datasets.forEach(r=>{let o=r.type||t.type,l=r.indexAxis||Di(o,e),h=(Ft[o]||{}).scales||{};Object.keys(h).forEach(c=>{let u=Ll(c,l),f=r[u+"AxisID"]||u;n[f]=n[f]||Object.create(null),re(n[f],[{axis:u},s[f],h[c]])})}),Object.keys(n).forEach(r=>{let o=n[r];re(o,[H.scales[o.type],H.scale])}),n}d(Rl,"zr");function Ja(t){let e=t.options||(t.options={});e.plugins=O(e.plugins,{}),e.scales=Rl(t,e)}d(Ja,"ao");function Za(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}d(Za,"ro");function Il(t){return t=t||{},t.data=Za(t.data),Ja(t),t}d(Il,"Fr");var Ws=new Map,Qa=new Set;function Le(t,e){let i=Ws.get(t);return i||(i=e(),Ws.set(t,i),Qa.add(i)),i}d(Le,"si");var ie=d((t,e,i)=>{let s=kt(e,i);s!==void 0&&t.add(s)},"ke"),Fl=d(class{constructor(t){this._config=Il(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Za(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){let t=this._config;this.clearCache(),Ja(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Le(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Le(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Le(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){let e=t.id,i=this.type;return Le(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){let i=this._scopeCache,s=i.get(t);return(!s||e)&&(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){let{options:s,type:a}=this,n=this._cachedScopes(t,i),r=n.get(e);if(r)return r;let o=new Set;e.forEach(h=>{t&&(o.add(t),h.forEach(c=>ie(o,t,c))),h.forEach(c=>ie(o,s,c)),h.forEach(c=>ie(o,Ft[a]||{},c)),h.forEach(c=>ie(o,H,c)),h.forEach(c=>ie(o,ki,c))});let l=Array.from(o);return l.length===0&&l.push(Object.create(null)),Qa.has(e)&&n.set(e,l),l}chartOptionScopes(){let{options:t,type:e}=this;return[t,Ft[e]||{},H.datasets[e]||{},{type:e},H,ki]}resolveNamedOptions(t,e,i,s=[""]){let a={$shared:!0},{resolver:n,subPrefixes:r}=Ns(this._resolverCache,t,s),o=n;if(Vl(n,e)){a.$shared=!1,i=St(i)?i():i;let l=this.createResolver(t,i,r);o=jt(n,i,l)}for(let l of e)a[l]=o[l];return a}createResolver(t,e,i=[""],s){let{resolver:a}=Ns(this._resolverCache,t,i);return A(e)?jt(a,e,void 0,s):a}},"cs");function Ns(t,e,i){let s=t.get(e);s||(s=new Map,t.set(e,s));let a=i.join(),n=s.get(a);return n||(n={resolver:Hi(e,i),subPrefixes:i.filter(r=>!r.toLowerCase().includes("hover"))},s.set(a,n)),n}d(Ns,"wn");var zl=d(t=>A(t)&&Object.getOwnPropertyNames(t).reduce((e,i)=>e||St(t[i]),!1),"Br");function Vl(t,e){let{isScriptable:i,isIndexable:s}=Aa(t);for(let a of e){let n=i(a),r=s(a),o=(r||n)&&t[a];if(n&&(St(o)||zl(o))||r&&F(o))return!0}return!1}d(Vl,"Vr");var Bl="4.2.1",Wl=["top","bottom","left","right","chartArea"];function Hs(t,e){return t==="top"||t==="bottom"||Wl.indexOf(t)===-1&&e==="x"}d(Hs,"Sn");function js(t,e){return function(i,s){return i[t]===s[t]?i[e]-s[e]:i[t]-s[t]}}d(js,"Pn");function $s(t){let e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),I(i&&i.onComplete,[t],e)}d($s,"Dn");function Nl(t){let e=t.chart,i=e.options.animation;I(i&&i.onProgress,[t],e)}d(Nl,"Hr");function tn(t){return Fa()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}d(tn,"co");var Je={},en=d(t=>{let e=tn(t);return Object.values(Je).filter(i=>i.canvas===e).pop()},"On");function Hl(t,e,i){let s=Object.keys(t);for(let a of s){let n=+a;if(n>=e){let r=t[a];delete t[a],(i>0||n>e)&&(t[n+i]=r)}}}d(Hl,"jr");function jl(t,e,i,s){return!i||t.type==="mouseout"?null:s?e:t}d(jl,"$r");function $l(t){let{xScale:e,yScale:i}=t;if(e&&i)return{left:e.left,right:e.right,top:i.top,bottom:i.bottom}}d($l,"Ur");var J=d(class{static register(...t){ct.add(...t),Ys()}static unregister(...t){ct.remove(...t),Ys()}constructor(t,e){let i=this.config=new Fl(e),s=tn(t),a=en(s);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");let n=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||ll(s)),this.platform.updateConfig(i);let r=this.platform.acquireContext(s,n.aspectRatio),o=r&&r.canvas,l=o&&o.height,h=o&&o.width;if(this.id=Un(),this.ctx=r,this.canvas=o,this.width=h,this.height=l,this._options=n,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 Pl,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=lr(c=>this.update(c),n.resizeDelay||0),this._dataChanges=[],Je[this.id]=this,!r||!o){console.error("Failed to create chart: can't acquire context from the given item");return}pt.listen(this,"complete",$s),pt.listen(this,"progress",Nl),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:s,_aspectRatio:a}=this;return T(t)?e&&a?a:s?i/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return ct}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ps(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return us(this.canvas,this.ctx),this}stop(){return pt.stop(this),this}resize(t,e){pt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){let i=this.options,s=this.canvas,a=i.maintainAspectRatio&&this.aspectRatio,n=this.platform.getMaximumSize(s,t,e,a),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),o=this.width?"resize":"attach";this.width=n.width,this.height=n.height,this._aspectRatio=this.aspectRatio,ps(this,r,!0)&&(this.notifyPlugins("resize",{size:n}),I(i.onResize,[this,n],this),this.attached&&this._doResize(o)&&this.render())}ensureScalesHaveIDs(){let t=this.options.scales||{};R(t,(e,i)=>{e.id=i})}buildOrUpdateScales(){let t=this.options,e=t.scales,i=this.scales,s=Object.keys(i).reduce((n,r)=>(n[r]=!1,n),{}),a=[];e&&(a=a.concat(Object.keys(e).map(n=>{let r=e[n],o=Ge(n,r),l=o==="r",h=o==="x";return{options:r,dposition:l?"chartArea":h?"bottom":"left",dtype:l?"radialLinear":h?"category":"linear"}}))),R(a,n=>{let r=n.options,o=r.id,l=Ge(o,r),h=O(r.type,n.dtype);(r.position===void 0||Hs(r.position,l)!==Hs(n.dposition))&&(r.position=n.dposition),s[o]=!0;let c=null;if(o in i&&i[o].type===h)c=i[o];else{let u=ct.getScale(h);c=new u({id:o,type:h,ctx:this.ctx,chart:this}),i[c.id]=c}c.init(r,t)}),R(s,(n,r)=>{n||delete i[r]}),R(i,n=>{X.configure(this,n,n.options),X.addBox(this,n)})}_updateMetasets(){let t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((s,a)=>s.index-a.index),i>e){for(let s=e;s<i;++s)this._destroyDatasetMeta(s);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(js("order","index"))}_removeUnreferencedMetasets(){let{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((i,s)=>{e.filter(a=>a===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){let t=[],e=this.data.datasets,i,s;for(this._removeUnreferencedMetasets(),i=0,s=e.length;i<s;i++){let a=e[i],n=this.getDatasetMeta(i),r=a.type||this.config.type;if(n.type&&n.type!==r&&(this._destroyDatasetMeta(i),n=this.getDatasetMeta(i)),n.type=r,n.indexAxis=a.indexAxis||Di(r,this.options),n.order=a.order||0,n.index=i,n.label=""+a.label,n.visible=this.isDatasetVisible(i),n.controller)n.controller.updateIndex(i),n.controller.linkScales();else{let o=ct.getController(r),{datasetElementType:l,dataElementType:h}=H.datasets[r];Object.assign(o,{dataElementType:ct.getElement(h),datasetElementType:l&&ct.getElement(l)}),n.controller=new o(this,i),t.push(n.controller)}}return this._updateMetasets(),t}_resetElements(){R(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let e=this.config;e.update();let i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let n=0;for(let l=0,h=this.data.datasets.length;l<h;l++){let{controller:c}=this.getDatasetMeta(l),u=!s&&a.indexOf(c)===-1;c.buildOrUpdateElements(u),n=Math.max(+c.getMaxOverflow(),n)}n=this._minPadding=i.layout.autoPadding?n:0,this._updateLayout(n),s||R(a,l=>{l.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(js("z","_idx"));let{_active:r,_lastEvent:o}=this;o?this._eventHandler(o,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){R(this.scales,t=>{X.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!ss(e,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(let{method:i,start:s,count:a}of e){let n=i==="_removeElements"?-a:a;Hl(t,s,n)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let e=this.data.datasets.length,i=d(a=>new Set(t.filter(n=>n[0]===a).map((n,r)=>r+","+n.splice(1).join(","))),"s"),s=i(0);for(let a=1;a<e;a++)if(!ss(s,i(a)))return;return Array.from(s).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;X.update(this,this.width,this.height,t);let e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],R(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,a)=>{s._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,i=this.data.datasets.length;e<i;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,St(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){let i=this.getDatasetMeta(t),s={meta:i,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(i.controller._update(e),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(pt.has(this)?this.attached&&!pt.running(this)&&pt.start(this):(this.draw(),$s({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){let{width:i,height:s}=this._resizeBeforeDraw;this._resize(i,s),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;let e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){let e=this._sortedMetasets,i=[],s,a;for(s=0,a=e.length;s<a;++s){let n=e[s];(!t||n.visible)&&i.push(n)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;let t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let e=this.ctx,i=t._clip,s=!i.disabled,a=$l(t)||this.chartArea,n={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",n)!==!1&&(s&&ei(e,{left:i.left===!1?0:a.left-i.left,right:i.right===!1?this.width:a.right+i.right,top:i.top===!1?0:a.top-i.top,bottom:i.bottom===!1?this.height:a.bottom+i.bottom}),t.controller.draw(),s&&ii(e),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return ge(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){let a=No.modes[e];return typeof a=="function"?a(this,t,i,s):[]}getDatasetMeta(t){let e=this.data.datasets[t],i=this._metasets,s=i.filter(a=>a&&a._dataset===e).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=Pt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let e=this.data.datasets[t];if(!e)return!1;let i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!e.hidden}setDatasetVisibility(t,e){let i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){let s=i?"show":"hide",a=this.getDatasetMeta(t),n=a.controller._resolveAnimations(void 0,s);at(e)?(a.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),n.update(a,{visible:i}),this.update(r=>r.datasetIndex===t?s:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){let e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),pt.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");let{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),us(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Je[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let t=this._listeners,e=this.platform,i=d((a,n)=>{e.addEventListener(this,a,n),t[a]=n},"s"),s=d((a,n,r)=>{a.offsetX=n,a.offsetY=r,this._eventHandler(a)},"n");R(this.options.events,a=>i(a,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,e=this.platform,i=d((o,l)=>{e.addEventListener(this,o,l),t[o]=l},"s"),s=d((o,l)=>{t[o]&&(e.removeEventListener(this,o,l),delete t[o])},"n"),a=d((o,l)=>{this.canvas&&this.resize(o,l)},"o"),n,r=d(()=>{s("attach",r),this.attached=!0,this.resize(),i("resize",a),i("detach",n)},"r");n=d(()=>{this.attached=!1,s("resize",a),this._stop(),this._resize(0,0),i("attach",r)},"a"),e.isAttached(this.canvas)?r():n()}unbindEvents(){R(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},R(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){let s=i?"set":"remove",a,n,r,o;for(e==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+s+"DatasetHoverStyle"]()),r=0,o=t.length;r<o;++r){n=t[r];let l=n&&this.getDatasetMeta(n.datasetIndex).controller;l&&l[s+"HoverStyle"](n.element,n.datasetIndex,n.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){let e=this._active||[],i=t.map(({datasetIndex:s,index:a})=>{let n=this.getDatasetMeta(s);if(!n)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:n.data[a],index:a}});!$e(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,i){let s=this.options.hover,a=d((o,l)=>o.filter(h=>!l.some(c=>h.datasetIndex===c.datasetIndex&&h.index===c.index)),"o"),n=a(e,t),r=i?t:a(t,e);n.length&&this.updateHoverStyle(n,s.mode,!1),r.length&&s.mode&&this.updateHoverStyle(r,s.mode,!0)}_eventHandler(t,e){let i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=d(n=>(n.options.events||this.options.events).includes(t.native.type),"n");if(this.notifyPlugins("beforeEvent",i,s)===!1)return;let a=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(a||i.changed)&&this.render(),this}_handleEvent(t,e,i){let{_active:s=[],options:a}=this,n=e,r=this._getActiveElements(t,s,i,n),o=Zn(t),l=jl(t,this._lastEvent,i,o);i&&(this._lastEvent=null,I(a.onHover,[t,r,this],this),o&&I(a.onClick,[t,r,this],this));let h=!$e(r,s);return(h||e)&&(this._active=r,this._updateHoverStyles(r,s,e)),this._lastEvent=l,h}_getActiveElements(t,e,i,s){if(t.type==="mouseout")return[];if(!i)return e;let a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,s)}},"xt");S(J,"defaults",H),S(J,"instances",Je),S(J,"overrides",Ft),S(J,"registry",ct),S(J,"version",Bl),S(J,"getChart",en);function Ys(){return R(J.instances,t=>t._plugins.invalidate())}d(Ys,"Cn");function Yl(t,e,i){let{startAngle:s,pixelMargin:a,x:n,y:r,outerRadius:o,innerRadius:l}=e,h=a/o;t.beginPath(),t.arc(n,r,o,s-h,i+h),l>a?(h=a/l,t.arc(n,r,l,i+h,s-h,!0)):t.arc(n,r,a,i+N,s-N),t.closePath(),t.clip()}d(Yl,"Yr");function Ul(t){return Ni(t,["outerStart","outerEnd","innerStart","innerEnd"])}d(Ul,"Xr");function Xl(t,e,i,s){let a=Ul(t.options.borderRadius),n=(i-e)/2,r=Math.min(n,s*e/2),o=d(l=>{let h=(i-Math.min(n,l))*s/2;return Y(l,0,Math.min(n,h))},"r");return{outerStart:o(a.outerStart),outerEnd:o(a.outerEnd),innerStart:Y(a.innerStart,0,r),innerEnd:Y(a.innerEnd,0,r)}}d(Xl,"Kr");function Wt(t,e,i,s){return{x:i+t*Math.cos(e),y:s+t*Math.sin(e)}}d(Wt,"Zt");function Ze(t,e,i,s,a,n){let{x:r,y:o,startAngle:l,pixelMargin:h,innerRadius:c}=e,u=Math.max(e.outerRadius+s+i-h,0),f=c>0?c+s+i+h:0,g=0,p=a-l;if(s){let V=c>0?c-s:0,nt=u>0?u-s:0,tt=(V+nt)/2,ht=tt!==0?p*tt/(tt+s):p;g=(p-ht)/2}let b=Math.max(.001,p*u-i/B)/u,m=(p-b)/2,x=l+m+g,y=a-m-g,{outerStart:M,outerEnd:_,innerStart:v,innerEnd:w}=Xl(e,f,u,y-x),k=u-M,P=u-_,D=x+M/k,C=y-_/P,E=f+v,K=f+w,Q=x+v/E,L=y-w/K;if(t.beginPath(),n){let V=(D+C)/2;if(t.arc(r,o,u,D,V),t.arc(r,o,u,V,C),_>0){let $=Wt(P,C,r,o);t.arc($.x,$.y,_,C,y+N)}let nt=Wt(K,y,r,o);if(t.lineTo(nt.x,nt.y),w>0){let $=Wt(K,L,r,o);t.arc($.x,$.y,w,y+N,L+Math.PI)}let tt=(y-w/f+(x+v/f))/2;if(t.arc(r,o,f,y-w/f,tt,!0),t.arc(r,o,f,tt,x+v/f,!0),v>0){let $=Wt(E,Q,r,o);t.arc($.x,$.y,v,Q+Math.PI,x-N)}let ht=Wt(k,x,r,o);if(t.lineTo(ht.x,ht.y),M>0){let $=Wt(k,D,r,o);t.arc($.x,$.y,M,x-N,D)}}else{t.moveTo(r,o);let V=Math.cos(D)*u+r,nt=Math.sin(D)*u+o;t.lineTo(V,nt);let tt=Math.cos(C)*u+r,ht=Math.sin(C)*u+o;t.lineTo(tt,ht)}t.closePath()}d(Ze,"fi");function ql(t,e,i,s,a){let{fullCircles:n,startAngle:r,circumference:o}=e,l=e.endAngle;if(n){Ze(t,e,i,s,l,a);for(let h=0;h<n;++h)t.fill();isNaN(o)||(l=r+(o%z||z))}return Ze(t,e,i,s,l,a),t.fill(),l}d(ql,"qr");function Kl(t,e,i,s,a){let{fullCircles:n,startAngle:r,circumference:o,options:l}=e,{borderWidth:h,borderJoinStyle:c}=l,u=l.borderAlign==="inner";if(!h)return;u?(t.lineWidth=h*2,t.lineJoin=c||"round"):(t.lineWidth=h,t.lineJoin=c||"bevel");let f=e.endAngle;if(n){Ze(t,e,i,s,f,a);for(let g=0;g<n;++g)t.stroke();isNaN(o)||(f=r+(o%z||z))}u&&Yl(t,e,f),n||(Ze(t,e,i,s,f,a),t.stroke())}d(Kl,"Gr");var Ne=d(class extends lt{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){let s=this.getProps(["x","y"],i),{angle:a,distance:n}=_a(s,{x:t,y:e}),{startAngle:r,endAngle:o,innerRadius:l,outerRadius:h,circumference:c}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=this.options.spacing/2,f=O(c,o-r)>=z||fe(a,r,o),g=bt(n,l+u,h+u);return f&&g}getCenterPoint(t){let{x:e,y:i,startAngle:s,endAngle:a,innerRadius:n,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:o,spacing:l}=this.options,h=(s+a)/2,c=(n+r+l+o)/2;return{x:e+Math.cos(h)*c,y:i+Math.sin(h)*c}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){let{options:e,circumference:i}=this,s=(e.offset||0)/4,a=(e.spacing||0)/2,n=e.circular;if(this.pixelMargin=e.borderAlign==="inner"?.33:0,this.fullCircles=i>z?Math.floor(i/z):0,i===0||this.innerRadius<0||this.outerRadius<0)return;t.save();let r=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(r)*s,Math.sin(r)*s);let o=1-Math.sin(Math.min(B,i||0)),l=s*o;t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,ql(t,this,l,a,n),Kl(t,this,l,a,n),t.restore()}},"oe");S(Ne,"id","arc"),S(Ne,"defaults",{borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),S(Ne,"defaultRoutes",{backgroundColor:"backgroundColor"});function sn(t,e,i=e){t.lineCap=O(i.borderCapStyle,e.borderCapStyle),t.setLineDash(O(i.borderDash,e.borderDash)),t.lineDashOffset=O(i.borderDashOffset,e.borderDashOffset),t.lineJoin=O(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=O(i.borderWidth,e.borderWidth),t.strokeStyle=O(i.borderColor,e.borderColor)}d(sn,"ho");function Gl(t,e,i){t.lineTo(i.x,i.y)}d(Gl,"Jr");function Jl(t){return t.stepped?yr:t.tension||t.cubicInterpolationMode==="monotone"?vr:Gl}d(Jl,"Qr");function an(t,e,i={}){let s=t.length,{start:a=0,end:n=s-1}=i,{start:r,end:o}=e,l=Math.max(a,r),h=Math.min(n,o),c=a<r&&n<r||a>o&&n>o;return{count:s,start:l,loop:e.loop,ilen:h<l&&!c?s+h-l:h-l}}d(an,"uo");function Zl(t,e,i,s){let{points:a,options:n}=e,{count:r,start:o,loop:l,ilen:h}=an(a,i,s),c=Jl(n),{move:u=!0,reverse:f}=s||{},g,p,b;for(g=0;g<=h;++g)p=a[(o+(f?h-g:g))%r],!p.skip&&(u?(t.moveTo(p.x,p.y),u=!1):c(t,b,p,f,n.stepped),b=p);return l&&(p=a[(o+(f?h:0))%r],c(t,b,p,f,n.stepped)),!!l}d(Zl,"Zr");function Ql(t,e,i,s){let a=e.points,{count:n,start:r,ilen:o}=an(a,i,s),{move:l=!0,reverse:h}=s||{},c=0,u=0,f,g,p,b,m,x,y=d(_=>(r+(h?o-_:_))%n,"_"),M=d(()=>{b!==m&&(t.lineTo(c,m),t.lineTo(c,b),t.lineTo(c,x))},"y");for(l&&(g=a[y(0)],t.moveTo(g.x,g.y)),f=0;f<=o;++f){if(g=a[y(f)],g.skip)continue;let _=g.x,v=g.y,w=_|0;w===p?(v<b?b=v:v>m&&(m=v),c=(u*c+_)/++u):(M(),t.lineTo(_,v),p=w,u=0,b=m=v),x=v}M()}d(Ql,"tl");function Ci(t){let e=t.options,i=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!i?Ql:Zl}d(Ci,"hs");function th(t){return t.stepped?Qr:t.tension||t.cubicInterpolationMode==="monotone"?to:Tt}d(th,"el");function eh(t,e,i,s){let a=e._path;a||(a=e._path=new Path2D,e.path(a,i,s)&&a.closePath()),sn(t,e.options),t.stroke(a)}d(eh,"il");function ih(t,e,i,s){let{segments:a,options:n}=e,r=Ci(e);for(let o of a)sn(t,n,o.style),t.beginPath(),r(t,e,o,{start:i,end:i+s-1})&&t.closePath(),t.stroke()}d(ih,"sl");var sh=typeof Path2D=="function";function ah(t,e,i,s){sh&&!e.options.segment?eh(t,e,i,s):ih(t,e,i,s)}d(ah,"ol");var Mt=d(class extends lt{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,e){let i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){let s=i.spanGaps?this._loop:this._fullLoop;Yr(this._points,i,t,s,e),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=ro(this,this.options.segment))}first(){let t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){let t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){let i=this.options,s=t[e],a=this.points,n=Na(this,{property:e,start:s,end:s});if(!n.length)return;let r=[],o=th(i),l,h;for(l=0,h=n.length;l<h;++l){let{start:c,end:u}=n[l],f=a[c],g=a[u];if(f===g){r.push(f);continue}let p=Math.abs((s-f[e])/(g[e]-f[e])),b=o(f,g,p,i.stepped);b[e]=t[e],r.push(b)}return r.length===1?r[0]:r}pathSegment(t,e,i){return Ci(this)(t,this,e,i)}path(t,e,i){let s=this.segments,a=Ci(this),n=this._loop;e=e||0,i=i||this.points.length-e;for(let r of s)n&=a(t,this,r,{start:e,end:e+i-1});return!!n}draw(t,e,i,s){let a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),ah(t,this,i,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}},"ft");S(Mt,"id","line"),S(Mt,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),S(Mt,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),S(Mt,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Us(t,e,i,s){let a=t.options,{[i]:n}=t.getProps([i],s);return Math.abs(e-n)<a.radius+a.hitRadius}d(Us,"An");var He=d(class extends lt{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,e,i){let s=this.options,{x:a,y:n}=this.getProps(["x","y"],i);return Math.pow(t-a,2)+Math.pow(e-n,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(t,e){return Us(this,t,"x",e)}inYRange(t,e){return Us(this,t,"y",e)}getCenterPoint(t){let{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){t=t||this.options||{};let e=t.radius||0;e=Math.max(e,e&&t.hoverRadius||0);let i=e&&t.borderWidth||0;return(e+i)*2}draw(t,e){let i=this.options;this.skip||i.radius<.1||!ge(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,Si(t,i,this.x,this.y))}getRange(){let t=this.options||{};return t.radius+t.hitRadius}},"ae");S(He,"id","point"),S(He,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),S(He,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function nn(t,e){let{x:i,y:s,base:a,width:n,height:r}=t.getProps(["x","y","base","width","height"],e),o,l,h,c,u;return t.horizontal?(u=r/2,o=Math.min(i,a),l=Math.max(i,a),h=s-u,c=s+u):(u=n/2,o=i-u,l=i+u,h=Math.min(s,a),c=Math.max(s,a)),{left:o,top:h,right:l,bottom:c}}d(nn,"fo");function wt(t,e,i,s){return t?0:Y(e,i,s)}d(wt,"Ct");function nh(t,e,i){let s=t.options.borderWidth,a=t.borderSkipped,n=Oa(s);return{t:wt(a.top,n.top,0,i),r:wt(a.right,n.right,0,e),b:wt(a.bottom,n.bottom,0,i),l:wt(a.left,n.left,0,e)}}d(nh,"al");function rh(t,e,i){let{enableBorderRadius:s}=t.getProps(["enableBorderRadius"]),a=t.options.borderRadius,n=Rt(a),r=Math.min(e,i),o=t.borderSkipped,l=s||A(a);return{topLeft:wt(!l||o.top||o.left,n.topLeft,0,r),topRight:wt(!l||o.top||o.right,n.topRight,0,r),bottomLeft:wt(!l||o.bottom||o.left,n.bottomLeft,0,r),bottomRight:wt(!l||o.bottom||o.right,n.bottomRight,0,r)}}d(rh,"rl");function oh(t){let e=nn(t),i=e.right-e.left,s=e.bottom-e.top,a=nh(t,i/2,s/2),n=rh(t,i/2,s/2);return{outer:{x:e.left,y:e.top,w:i,h:s,radius:n},inner:{x:e.left+a.l,y:e.top+a.t,w:i-a.l-a.r,h:s-a.t-a.b,radius:{topLeft:Math.max(0,n.topLeft-Math.max(a.t,a.l)),topRight:Math.max(0,n.topRight-Math.max(a.t,a.r)),bottomLeft:Math.max(0,n.bottomLeft-Math.max(a.b,a.l)),bottomRight:Math.max(0,n.bottomRight-Math.max(a.b,a.r))}}}}d(oh,"ll");function yi(t,e,i,s){let a=e===null,n=i===null,r=t&&!(a&&n)&&nn(t,s);return r&&(a||bt(e,r.left,r.right))&&(n||bt(i,r.top,r.bottom))}d(yi,"Zi");function lh(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}d(lh,"cl");function hh(t,e){t.rect(e.x,e.y,e.w,e.h)}d(hh,"hl");function vi(t,e,i={}){let s=t.x!==i.x?-e:0,a=t.y!==i.y?-e:0,n=(t.x+t.w!==i.x+i.w?e:0)-s,r=(t.y+t.h!==i.y+i.h?e:0)-a;return{x:t.x+s,y:t.y+a,w:t.w+n,h:t.h+r,radius:t.radius}}d(vi,"ts");var je=d(class extends lt{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){let{inflateAmount:e,options:{borderColor:i,backgroundColor:s}}=this,{inner:a,outer:n}=oh(this),r=lh(n.radius)?pe:hh;t.save(),(n.w!==a.w||n.h!==a.h)&&(t.beginPath(),r(t,vi(n,e,a)),t.clip(),r(t,vi(a,-e,n)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),r(t,vi(a,e)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,e,i){return yi(this,t,e,i)}inXRange(t,e){return yi(this,t,null,e)}inYRange(t,e){return yi(this,null,t,e)}getCenterPoint(t){let{x:e,y:i,base:s,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(e+s)/2:e,y:a?i:(i+s)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}},"re");S(je,"id","bar"),S(je,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),S(je,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var dh=Object.freeze({__proto__:null,ArcElement:Ne,LineElement:Mt,PointElement:He,BarElement:je}),Oi=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Xs=Oi.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function rn(t){return Oi[t%Oi.length]}d(rn,"go");function on(t){return Xs[t%Xs.length]}d(on,"po");function ch(t,e){return t.borderColor=rn(e),t.backgroundColor=on(e),++e}d(ch,"ul");function uh(t,e){return t.backgroundColor=t.data.map(()=>rn(e++)),e}d(uh,"fl");function fh(t,e){return t.backgroundColor=t.data.map(()=>on(e++)),e}d(fh,"gl");function gh(t){let e=0;return(i,s)=>{let a=t.getDatasetMeta(s).controller;a instanceof Et?e=uh(i,e):a instanceof de?e=fh(i,e):a&&(e=ch(i,e))}}d(gh,"pl");function qs(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}d(qs,"Ln");function ph(t){return t&&(t.borderColor||t.backgroundColor)}d(ph,"ml");var mh={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,i){if(!i.enabled)return;let{data:{datasets:s},options:a}=t.config,{elements:n}=a;if(!i.forceOverride&&(qs(s)||ph(a)||n&&qs(n)))return;let r=gh(t);s.forEach(r)}};function bh(t,e,i,s,a){let n=a.samples||s;if(n>=i)return t.slice(e,e+i);let r=[],o=(i-2)/(n-2),l=0,h=e+i-1,c=e,u,f,g,p,b;for(r[l++]=t[c],u=0;u<n-2;u++){let m=0,x=0,y,M=Math.floor((u+1)*o)+1+e,_=Math.min(Math.floor((u+2)*o)+1,i)+e,v=_-M;for(y=M;y<_;y++)m+=t[y].x,x+=t[y].y;m/=v,x/=v;let w=Math.floor(u*o)+1+e,k=Math.min(Math.floor((u+1)*o)+1,i)+e,{x:P,y:D}=t[c];for(g=p=-1,y=w;y<k;y++)p=.5*Math.abs((P-m)*(t[y].y-D)-(P-t[y].x)*(x-D)),p>g&&(g=p,f=t[y],b=y);r[l++]=f,c=b}return r[l++]=t[h],r}d(bh,"_l");function xh(t,e,i,s){let a=0,n=0,r,o,l,h,c,u,f,g,p,b,m=[],x=e+i-1,y=t[e].x,M=t[x].x-y;for(r=e;r<e+i;++r){o=t[r],l=(o.x-y)/M*s,h=o.y;let _=l|0;if(_===c)h<p?(p=h,u=r):h>b&&(b=h,f=r),a=(n*a+o.x)/++n;else{let v=r-1;if(!T(u)&&!T(f)){let w=Math.min(u,f),k=Math.max(u,f);w!==g&&w!==v&&m.push({...t[w],x:a}),k!==g&&k!==v&&m.push({...t[k],x:a})}r>0&&v!==g&&m.push(t[v]),m.push(o),c=_,n=0,p=b=h,u=f=g=r}}return m}d(xh,"xl");function ln(t){if(t._decimated){let e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}d(ln,"mo");function Ks(t){t.data.datasets.forEach(e=>{ln(e)})}d(Ks,"Rn");function _h(t,e){let i=e.length,s=0,a,{iScale:n}=t,{min:r,max:o,minDefined:l,maxDefined:h}=n.getUserBounds();return l&&(s=Y(xt(e,n.axis,r).lo,0,i-1)),h?a=Y(xt(e,n.axis,o).hi+1,s,i)-s:a=i-s,{start:s,count:a}}d(_h,"yl");var yh={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled){Ks(t);return}let s=t.width;t.data.datasets.forEach((a,n)=>{let{_data:r,indexAxis:o}=a,l=t.getDatasetMeta(n),h=r||a.data;if(se([o,t.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;let c=t.scales[l.xAxisID];if(c.type!=="linear"&&c.type!=="time"||t.options.parsing)return;let{start:u,count:f}=_h(l,h),g=i.threshold||4*s;if(f<=g){ln(a);return}T(r)&&(a._data=h,delete a.data,Object.defineProperty(a,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(b){this._data=b}}));let p;switch(i.algorithm){case"lttb":p=bh(h,u,f,s,i);break;case"min-max":p=xh(h,u,f,s);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}a._decimated=p})},destroy(t){Ks(t)}};function vh(t,e,i){let s=t.segments,a=t.points,n=e.points,r=[];for(let o of s){let{start:l,end:h}=o;h=Ui(l,h,a);let c=Ai(i,a[l],a[h],o.loop);if(!e.segments){r.push({source:o,target:c,start:a[l],end:a[h]});continue}let u=Na(e,c);for(let f of u){let g=Ai(i,n[f.start],n[f.end],f.loop),p=Wa(o,a,g);for(let b of p)r.push({source:b,target:f,start:{[i]:Gs(c,g,"start",Math.max)},end:{[i]:Gs(c,g,"end",Math.min)}})}}return r}d(vh,"Ml");function Ai(t,e,i,s){if(s)return;let a=e[t],n=i[t];return t==="angle"&&(a=it(a),n=it(n)),{property:t,start:a,end:n}}d(Ai,"us");function Mh(t,e){let{x:i=null,y:s=null}=t||{},a=e.points,n=[];return e.segments.forEach(({start:r,end:o})=>{o=Ui(r,o,a);let l=a[r],h=a[o];s!==null?(n.push({x:l.x,y:s}),n.push({x:h.x,y:s})):i!==null&&(n.push({x:i,y:l.y}),n.push({x:i,y:h.y}))}),n}d(Mh,"kl");function Ui(t,e,i){for(;e>t;e--){let s=i[e];if(!isNaN(s.x)&&!isNaN(s.y))break}return e}d(Ui,"gs");function Gs(t,e,i,s){return t&&e?s(t[i],e[i]):t?t[i]:e?e[i]:0}d(Gs,"En");function hn(t,e){let i=[],s=!1;return F(t)?(s=!0,i=t):i=Mh(t,e),i.length?new Mt({points:i,options:{tension:0},_loop:s,_fullLoop:s}):null}d(hn,"bo");function Js(t){return t&&t.fill!==!1}d(Js,"In");function wh(t,e,i){let s=t[e].fill,a=[e],n;if(!i)return s;for(;s!==!1&&a.indexOf(s)===-1;){if(!W(s))return s;if(n=t[s],!n)return!1;if(n.visible)return s;a.push(s),s=n.fill}return!1}d(wh,"wl");function kh(t,e,i){let s=Ch(t);if(A(s))return isNaN(s.value)?!1:s;let a=parseFloat(s);return W(a)&&Math.floor(a)===a?Sh(s[0],e,a,i):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}d(kh,"Sl");function Sh(t,e,i,s){return(t==="-"||t==="+")&&(i=e+i),i===e||i<0||i>=s?!1:i}d(Sh,"Pl");function Ph(t,e){let i=null;return t==="start"?i=e.bottom:t==="end"?i=e.top:A(t)?i=e.getPixelForValue(t.value):e.getBasePixel&&(i=e.getBasePixel()),i}d(Ph,"Dl");function Dh(t,e,i){let s;return t==="start"?s=i:t==="end"?s=e.options.reverse?e.min:e.max:A(t)?s=t.value:s=e.getBaseValue(),s}d(Dh,"Ol");function Ch(t){let e=t.options,i=e.fill,s=O(i&&i.target,i);return s===void 0&&(s=!!e.backgroundColor),s===!1||s===null?!1:s===!0?"origin":s}d(Ch,"Cl");function Oh(t){let{scale:e,index:i,line:s}=t,a=[],n=s.segments,r=s.points,o=Ah(e,i);o.push(hn({x:null,y:e.bottom},s));for(let l=0;l<n.length;l++){let h=n[l];for(let c=h.start;c<=h.end;c++)Lh(a,r[c],o)}return new Mt({points:a,options:{}})}d(Oh,"Al");function Ah(t,e){let i=[],s=t.getMatchingVisibleMetas("line");for(let a=0;a<s.length;a++){let n=s[a];if(n.index===e)break;n.hidden||i.unshift(n.dataset)}return i}d(Ah,"Tl");function Lh(t,e,i){let s=[];for(let a=0;a<i.length;a++){let n=i[a],{first:r,last:o,point:l}=Th(n,e,"x");if(!(!l||r&&o)){if(r)s.unshift(l);else if(t.push(l),!o)break}}t.push(...s)}d(Lh,"Ll");function Th(t,e,i){let s=t.interpolate(e,i);if(!s)return{};let a=s[i],n=t.segments,r=t.points,o=!1,l=!1;for(let h=0;h<n.length;h++){let c=n[h],u=r[c.start][i],f=r[c.end][i];if(bt(a,u,f)){o=a===u,l=a===f;break}}return{first:o,last:l,point:s}}d(Th,"Rl");var dn=d(class{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){let{x:s,y:a,radius:n}=this;return e=e||{start:0,end:z},t.arc(s,a,n,e.end,e.start,!0),!i.bounds}interpolate(t){let{x:e,y:i,radius:s}=this,a=t.angle;return{x:e+Math.cos(a)*s,y:i+Math.sin(a)*s,angle:a}}},"gi");function Eh(t){let{chart:e,fill:i,line:s}=t;if(W(i))return Rh(e,i);if(i==="stack")return Oh(t);if(i==="shape")return!0;let a=Ih(t);return a instanceof dn?a:hn(a,s)}d(Eh,"El");function Rh(t,e){let i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}d(Rh,"Il");function Ih(t){return(t.scale||{}).getPointPositionForValue?zh(t):Fh(t)}d(Ih,"zl");function Fh(t){let{scale:e={},fill:i}=t,s=Ph(i,e);if(W(s)){let a=e.isHorizontal();return{x:a?s:null,y:a?null:s}}return null}d(Fh,"Fl");function zh(t){let{scale:e,fill:i}=t,s=e.options,a=e.getLabels().length,n=s.reverse?e.max:e.min,r=Dh(i,e,n),o=[];if(s.grid.circular){let l=e.getPointPositionForValue(0,n);return new dn({x:l.x,y:l.y,radius:e.getDistanceFromCenterForValue(r)})}for(let l=0;l<a;++l)o.push(e.getPointPositionForValue(l,r));return o}d(zh,"Bl");function Mi(t,e,i){let s=Eh(e),{line:a,scale:n,axis:r}=e,o=a.options,l=o.fill,h=o.backgroundColor,{above:c=h,below:u=h}=l||{};s&&a.points.length&&(ei(t,i),Vh(t,{line:a,target:s,above:c,below:u,area:i,scale:n,axis:r}),ii(t))}d(Mi,"es");function Vh(t,e){let{line:i,target:s,above:a,below:n,area:r,scale:o}=e,l=i._loop?"angle":e.axis;t.save(),l==="x"&&n!==a&&(Zs(t,s,r.top),Qs(t,{line:i,target:s,color:a,scale:o,property:l}),t.restore(),t.save(),Zs(t,s,r.bottom)),Qs(t,{line:i,target:s,color:n,scale:o,property:l}),t.restore()}d(Vh,"Vl");function Zs(t,e,i){let{segments:s,points:a}=e,n=!0,r=!1;t.beginPath();for(let o of s){let{start:l,end:h}=o,c=a[l],u=a[Ui(l,h,a)];n?(t.moveTo(c.x,c.y),n=!1):(t.lineTo(c.x,i),t.lineTo(c.x,c.y)),r=!!e.pathSegment(t,o,{move:r}),r?t.closePath():t.lineTo(u.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}d(Zs,"zn");function Qs(t,e){let{line:i,target:s,property:a,color:n,scale:r}=e,o=vh(i,s,a);for(let{source:l,target:h,start:c,end:u}of o){let{style:{backgroundColor:f=n}={}}=l,g=s!==!0;t.save(),t.fillStyle=f,Bh(t,r,g&&Ai(a,c,u)),t.beginPath();let p=!!i.pathSegment(t,l),b;if(g){p?t.closePath():ta(t,s,u,a);let m=!!s.pathSegment(t,h,{move:p,reverse:!0});b=p&&m,b||ta(t,s,c,a)}t.closePath(),t.fill(b?"evenodd":"nonzero"),t.restore()}}d(Qs,"Fn");function Bh(t,e,i){let{top:s,bottom:a}=e.chart.chartArea,{property:n,start:r,end:o}=i||{};n==="x"&&(t.beginPath(),t.rect(r,s,o-r,a-s),t.clip())}d(Bh,"Nl");function ta(t,e,i,s){let a=e.interpolate(i,s);a&&t.lineTo(a.x,a.y)}d(ta,"Bn");var Wh={id:"filler",afterDatasetsUpdate(t,e,i){let s=(t.data.datasets||[]).length,a=[],n,r,o,l;for(r=0;r<s;++r)n=t.getDatasetMeta(r),o=n.dataset,l=null,o&&o.options&&o instanceof Mt&&(l={visible:t.isDatasetVisible(r),index:r,fill:kh(o,r,s),chart:t,axis:n.controller.options.indexAxis,scale:n.vScale,line:o}),n.$filler=l,a.push(l);for(r=0;r<s;++r)l=a[r],!(!l||l.fill===!1)&&(l.fill=wh(a,r,i.propagate))},beforeDraw(t,e,i){let s=i.drawTime==="beforeDraw",a=t.getSortedVisibleDatasetMetas(),n=t.chartArea;for(let r=a.length-1;r>=0;--r){let o=a[r].$filler;o&&(o.line.updateControlPoints(n,o.axis),s&&o.fill&&Mi(t.ctx,o,n))}},beforeDatasetsDraw(t,e,i){if(i.drawTime!=="beforeDatasetsDraw")return;let s=t.getSortedVisibleDatasetMetas();for(let a=s.length-1;a>=0;--a){let n=s[a].$filler;Js(n)&&Mi(t.ctx,n,t.chartArea)}},beforeDatasetDraw(t,e,i){let s=e.meta.$filler;!Js(s)||i.drawTime!=="beforeDatasetDraw"||Mi(t.ctx,s,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},ea=d((t,e)=>{let{boxHeight:i=e,boxWidth:s=e}=t;return t.usePointStyle&&(i=Math.min(i,e),s=t.pointStyleWidth||Math.min(s,e)),{boxWidth:s,boxHeight:i,itemHeight:Math.max(e,i)}},"Vn"),Nh=d((t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index,"Hl"),ia=d(class extends lt{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,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(){let t=this.options.labels||{},e=I(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(i=>t.filter(i,this.chart.data))),t.sort&&(e=e.sort((i,s)=>t.sort(i,s,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){let{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}let i=t.labels,s=j(i.font),a=s.size,n=this._computeTitleHeight(),{boxWidth:r,itemHeight:o}=ea(i,a),l,h;e.font=s.string,this.isHorizontal()?(l=this.maxWidth,h=this._fitRows(n,a,r,o)+10):(h=this.maxHeight,l=this._fitCols(n,s,r,o)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,s){let{ctx:a,maxWidth:n,options:{labels:{padding:r}}}=this,o=this.legendHitBoxes=[],l=this.lineWidths=[0],h=s+r,c=t;a.textAlign="left",a.textBaseline="middle";let u=-1,f=-h;return this.legendItems.forEach((g,p)=>{let b=i+e/2+a.measureText(g.text).width;(p===0||l[l.length-1]+b+2*r>n)&&(c+=h,l[l.length-(p>0?0:1)]=0,f+=h,u++),o[p]={left:0,top:f,row:u,width:b,height:s},l[l.length-1]+=b+r}),c}_fitCols(t,e,i,s){let{ctx:a,maxHeight:n,options:{labels:{padding:r}}}=this,o=this.legendHitBoxes=[],l=this.columnSizes=[],h=n-t,c=r,u=0,f=0,g=0,p=0;return this.legendItems.forEach((b,m)=>{let{itemWidth:x,itemHeight:y}=Hh(i,e,a,b,s);m>0&&f+y+2*r>h&&(c+=u+r,l.push({width:u,height:f}),g+=u+r,p++,u=f=0),o[m]={left:g,top:f,col:p,width:x,height:y},u=Math.max(u,x),f+=y+r}),c+=u,l.push({width:u,height:f}),c}adjustHitBoxes(){if(!this.options.display)return;let t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:s},rtl:a}}=this,n=Nt(a,this.left,this.width);if(this.isHorizontal()){let r=0,o=U(i,this.left+s,this.right-this.lineWidths[r]);for(let l of e)r!==l.row&&(r=l.row,o=U(i,this.left+s,this.right-this.lineWidths[r])),l.top+=this.top+t+s,l.left=n.leftForLtr(n.x(o),l.width),o+=l.width+s}else{let r=0,o=U(i,this.top+t+s,this.bottom-this.columnSizes[r].height);for(let l of e)l.col!==r&&(r=l.col,o=U(i,this.top+t+s,this.bottom-this.columnSizes[r].height)),l.top=o,l.left+=this.left+s,l.left=n.leftForLtr(n.x(l.left),l.width),o+=l.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let t=this.ctx;ei(t,this),this._draw(),ii(t)}}_draw(){let{options:t,columnSizes:e,lineWidths:i,ctx:s}=this,{align:a,labels:n}=t,r=H.color,o=Nt(t.rtl,this.left,this.width),l=j(n.font),{padding:h}=n,c=l.size,u=c/2,f;this.drawTitle(),s.textAlign=o.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=l.string;let{boxWidth:g,boxHeight:p,itemHeight:b}=ea(n,c),m=d(function(v,w,k){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;s.save();let P=O(k.lineWidth,1);if(s.fillStyle=O(k.fillStyle,r),s.lineCap=O(k.lineCap,"butt"),s.lineDashOffset=O(k.lineDashOffset,0),s.lineJoin=O(k.lineJoin,"miter"),s.lineWidth=P,s.strokeStyle=O(k.strokeStyle,r),s.setLineDash(O(k.lineDash,[])),n.usePointStyle){let D={radius:p*Math.SQRT2/2,pointStyle:k.pointStyle,rotation:k.rotation,borderWidth:P},C=o.xPlus(v,g/2),E=w+u;Ca(s,D,C,E,n.pointStyleWidth&&g)}else{let D=w+Math.max((c-p)/2,0),C=o.leftForLtr(v,g),E=Rt(k.borderRadius);s.beginPath(),Object.values(E).some(K=>K!==0)?pe(s,{x:C,y:D,w:g,h:p,radius:E}):s.rect(C,D,g,p),s.fill(),P!==0&&s.stroke()}s.restore()},"b"),x=d(function(v,w,k){zt(s,k.text,v,w+b/2,l,{strikethrough:k.hidden,textAlign:o.textAlign(k.textAlign)})},"_"),y=this.isHorizontal(),M=this._computeTitleHeight();y?f={x:U(a,this.left+h,this.right-i[0]),y:this.top+h+M,line:0}:f={x:this.left+h,y:U(a,this.top+M+h,this.bottom-e[0].height),line:0},za(this.ctx,t.textDirection);let _=b+h;this.legendItems.forEach((v,w)=>{s.strokeStyle=v.fontColor,s.fillStyle=v.fontColor;let k=s.measureText(v.text).width,P=o.textAlign(v.textAlign||(v.textAlign=n.textAlign)),D=g+u+k,C=f.x,E=f.y;o.setWidth(this.width),y?w>0&&C+D+h>this.right&&(E=f.y+=_,f.line++,C=f.x=U(a,this.left+h,this.right-i[f.line])):w>0&&E+_>this.bottom&&(C=f.x=C+e[f.line].width+h,f.line++,E=f.y=U(a,this.top+M+h,this.bottom-e[f.line].height));let K=o.x(C);if(m(K,E,v),C=hr(P,C+g+u,y?C+D:this.right,t.rtl),x(o.x(C),E,v),y)f.x+=D+h;else if(typeof v.text!="string"){let Q=l.lineHeight;f.y+=cn(v,Q)}else f.y+=_}),Va(this.ctx,t.textDirection)}drawTitle(){let t=this.options,e=t.title,i=j(e.font),s=q(e.padding);if(!e.display)return;let a=Nt(t.rtl,this.left,this.width),n=this.ctx,r=e.position,o=i.size/2,l=s.top+o,h,c=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+l,c=U(t.align,c,this.right-u);else{let g=this.columnSizes.reduce((p,b)=>Math.max(p,b.height),0);h=l+U(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}let f=U(r,c,c+u);n.textAlign=a.textAlign(Wi(r)),n.textBaseline="middle",n.strokeStyle=e.color,n.fillStyle=e.color,n.font=i.string,zt(n,e.text,f,h,i)}_computeTitleHeight(){let t=this.options.title,e=j(t.font),i=q(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,s,a;if(bt(t,this.left,this.right)&&bt(e,this.top,this.bottom)){for(a=this.legendHitBoxes,i=0;i<a.length;++i)if(s=a[i],bt(t,s.left,s.left+s.width)&&bt(e,s.top,s.top+s.height))return this.legendItems[i]}return null}handleEvent(t){let e=this.options;if(!Yh(t.type,e))return;let i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){let s=this._hoveredItem,a=Nh(s,i);s&&!a&&I(e.onLeave,[t,s,this],this),this._hoveredItem=i,i&&!a&&I(e.onHover,[t,i,this],this)}else i&&I(e.onClick,[t,i,this],this)}},"pi");function Hh(t,e,i,s,a){let n=jh(s,t,e,i),r=$h(a,s,e.lineHeight);return{itemWidth:n,itemHeight:r}}d(Hh,"jl");function jh(t,e,i,s){let a=t.text;return a&&typeof a!="string"&&(a=a.reduce((n,r)=>n.length>r.length?n:r)),e+i.size/2+s.measureText(a).width}d(jh,"$l");function $h(t,e,i){let s=t;return typeof e.text!="string"&&(s=cn(e,i)),s}d($h,"Ul");function cn(t,e){let i=t.text?t.text.length+.5:0;return e*i}d(cn,"_o");function Yh(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}d(Yh,"Yl");var Uh={id:"legend",_element:ia,start(t,e,i){let s=t.legend=new ia({ctx:t.ctx,options:i,chart:t});X.configure(t,s,i),X.addBox(t,s)},stop(t){X.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){let s=t.legend;X.configure(t,s,i),s.options=i},afterUpdate(t){let e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){let s=e.datasetIndex,a=i.chart;a.isDatasetVisible(s)?(a.hide(s),e.hidden=!0):(a.show(s),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){let e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:s,textAlign:a,color:n,useBorderRadius:r,borderRadius:o}}=t.legend.options;return t._getSortedDatasetMetas().map(l=>{let h=l.controller.getStyle(i?0:void 0),c=q(h.borderWidth);return{text:e[l.index].label,fillStyle:h.backgroundColor,fontColor:n,hidden:!l.visible,lineCap:h.borderCapStyle,lineDash:h.borderDash,lineDashOffset:h.borderDashOffset,lineJoin:h.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:h.borderColor,pointStyle:s||h.pointStyle,rotation:h.rotation,textAlign:a||h.textAlign,borderRadius:r&&(o||h.borderRadius),datasetIndex:l.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}},Xi=d(class extends lt{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){let i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;let s=F(i.text)?i.text.length:1;this._padding=q(i.padding);let a=s*j(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){let t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){let{top:e,left:i,bottom:s,right:a,options:n}=this,r=n.align,o=0,l,h,c;return this.isHorizontal()?(h=U(r,i,a),c=e+t,l=a-i):(n.position==="left"?(h=i+t,c=U(r,s,e),o=B*-.5):(h=a-t,c=U(r,e,s),o=B*.5),l=s-e),{titleX:h,titleY:c,maxWidth:l,rotation:o}}draw(){let t=this.ctx,e=this.options;if(!e.display)return;let i=j(e.font),s=i.lineHeight/2+this._padding.top,{titleX:a,titleY:n,maxWidth:r,rotation:o}=this._drawArgs(s);zt(t,e.text,0,0,i,{color:e.color,maxWidth:r,rotation:o,textAlign:Wi(e.align),textBaseline:"middle",translation:[a,n]})}},"Ee");function Xh(t,e){let i=new Xi({ctx:t.ctx,options:e,chart:t});X.configure(t,i,e),X.addBox(t,i),t.titleBlock=i}d(Xh,"Kl");var qh={id:"title",_element:Xi,start(t,e,i){Xh(t,i)},stop(t){let e=t.titleBlock;X.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){let s=t.titleBlock;X.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},Te=new WeakMap,Kh={id:"subtitle",start(t,e,i){let s=new Xi({ctx:t.ctx,options:i,chart:t});X.configure(t,s,i),X.addBox(t,s),Te.set(t,s)},stop(t){X.removeBox(t,Te.get(t)),Te.delete(t)},beforeUpdate(t,e,i){let s=Te.get(t);X.configure(t,s,i),s.options=i},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}},ce={average(t){if(!t.length)return!1;let e,i,s=0,a=0,n=0;for(e=0,i=t.length;e<i;++e){let r=t[e].element;if(r&&r.hasValue()){let o=r.tooltipPosition();s+=o.x,a+=o.y,++n}}return{x:s/n,y:a/n}},nearest(t,e){if(!t.length)return!1;let i=e.x,s=e.y,a=Number.POSITIVE_INFINITY,n,r,o;for(n=0,r=t.length;n<r;++n){let l=t[n].element;if(l&&l.hasValue()){let h=l.getCenterPoint(),c=wi(e,h);c<a&&(a=c,o=l)}}if(o){let l=o.tooltipPosition();i=l.x,s=l.y}return{x:i,y:s}}};function dt(t,e){return e&&(F(e)?Array.prototype.push.apply(t,e):t.push(e)),t}d(dt,"dt");function mt(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
`)>-1?t.split(`
`):t}d(mt,"yt");function Gh(t,e){let{element:i,datasetIndex:s,index:a}=e,n=t.getDatasetMeta(s).controller,{label:r,value:o}=n.getLabelAndValue(a);return{chart:t,label:r,parsed:n.getParsed(a),raw:t.data.datasets[s].data[a],formattedValue:o,dataset:n.getDataset(),dataIndex:a,datasetIndex:s,element:i}}d(Gh,"Jl");function sa(t,e){let i=t.chart.ctx,{body:s,footer:a,title:n}=t,{boxWidth:r,boxHeight:o}=e,l=j(e.bodyFont),h=j(e.titleFont),c=j(e.footerFont),u=n.length,f=a.length,g=s.length,p=q(e.padding),b=p.height,m=0,x=s.reduce((_,v)=>_+v.before.length+v.lines.length+v.after.length,0);if(x+=t.beforeBody.length+t.afterBody.length,u&&(b+=u*h.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),x){let _=e.displayColors?Math.max(o,l.lineHeight):l.lineHeight;b+=g*_+(x-g)*l.lineHeight+(x-1)*e.bodySpacing}f&&(b+=e.footerMarginTop+f*c.lineHeight+(f-1)*e.footerSpacing);let y=0,M=d(function(_){m=Math.max(m,i.measureText(_).width+y)},"y");return i.save(),i.font=h.string,R(t.title,M),i.font=l.string,R(t.beforeBody.concat(t.afterBody),M),y=e.displayColors?r+2+e.boxPadding:0,R(s,_=>{R(_.before,M),R(_.lines,M),R(_.after,M)}),y=0,i.font=c.string,R(t.footer,M),i.restore(),m+=p.width,{width:m,height:b}}d(sa,"Nn");function Jh(t,e){let{y:i,height:s}=e;return i<s/2?"top":i>t.height-s/2?"bottom":"center"}d(Jh,"Ql");function Zh(t,e,i,s){let{x:a,width:n}=s,r=i.caretSize+i.caretPadding;if(t==="left"&&a+n+r>e.width||t==="right"&&a-n-r<0)return!0}d(Zh,"Zl");function Qh(t,e,i,s){let{x:a,width:n}=i,{width:r,chartArea:{left:o,right:l}}=t,h="center";return s==="center"?h=a<=(o+l)/2?"left":"right":a<=n/2?h="left":a>=r-n/2&&(h="right"),Zh(h,t,e,i)&&(h="center"),h}d(Qh,"tc");function aa(t,e,i){let s=i.yAlign||e.yAlign||Jh(t,i);return{xAlign:i.xAlign||e.xAlign||Qh(t,e,i,s),yAlign:s}}d(aa,"Wn");function td(t,e){let{x:i,width:s}=t;return e==="right"?i-=s:e==="center"&&(i-=s/2),i}d(td,"ec");function ed(t,e,i){let{y:s,height:a}=t;return e==="top"?s+=i:e==="bottom"?s-=a+i:s-=a/2,s}d(ed,"ic");function na(t,e,i,s){let{caretSize:a,caretPadding:n,cornerRadius:r}=t,{xAlign:o,yAlign:l}=i,h=a+n,{topLeft:c,topRight:u,bottomLeft:f,bottomRight:g}=Rt(r),p=td(e,o),b=ed(e,l,h);return l==="center"?o==="left"?p+=h:o==="right"&&(p-=h):o==="left"?p-=Math.max(c,f)+a:o==="right"&&(p+=Math.max(u,g)+a),{x:Y(p,0,s.width-e.width),y:Y(b,0,s.height-e.height)}}d(na,"Hn");function Ee(t,e,i){let s=q(i.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-s.right:t.x+s.left}d(Ee,"oi");function ra(t){return dt([],mt(t))}d(ra,"jn");function id(t,e,i){return Pt(t,{tooltip:e,tooltipItems:i,type:"tooltip"})}d(id,"sc");function oa(t,e){let i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}d(oa,"$n");var un={beforeTitle:gt,title(t){if(t.length>0){let e=t[0],i=e.chart.data.labels,s=i?i.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex<s)return i[e.dataIndex]}return""},afterTitle:gt,beforeBody:gt,beforeLabel:gt,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");let i=t.formattedValue;return T(i)||(e+=i),e},labelColor(t){let e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){let e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:gt,afterBody:gt,beforeFooter:gt,footer:gt,afterFooter:gt};function G(t,e,i,s){let a=t[e].call(i,s);return typeof a>"u"?un[e].call(i,s):a}d(G,"Z");var Li=d(class extends lt{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let t=this._cachedAnimations;if(t)return t;let e=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&e.options.animation&&i.animations,a=new Ha(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=id(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){let{callbacks:i}=e,s=G(i,"beforeTitle",this,t),a=G(i,"title",this,t),n=G(i,"afterTitle",this,t),r=[];return r=dt(r,mt(s)),r=dt(r,mt(a)),r=dt(r,mt(n)),r}getBeforeBody(t,e){return ra(G(e.callbacks,"beforeBody",this,t))}getBody(t,e){let{callbacks:i}=e,s=[];return R(t,a=>{let n={before:[],lines:[],after:[]},r=oa(i,a);dt(n.before,mt(G(r,"beforeLabel",this,a))),dt(n.lines,G(r,"label",this,a)),dt(n.after,mt(G(r,"afterLabel",this,a))),s.push(n)}),s}getAfterBody(t,e){return ra(G(e.callbacks,"afterBody",this,t))}getFooter(t,e){let{callbacks:i}=e,s=G(i,"beforeFooter",this,t),a=G(i,"footer",this,t),n=G(i,"afterFooter",this,t),r=[];return r=dt(r,mt(s)),r=dt(r,mt(a)),r=dt(r,mt(n)),r}_createItems(t){let e=this._active,i=this.chart.data,s=[],a=[],n=[],r=[],o,l;for(o=0,l=e.length;o<l;++o)r.push(Gh(this.chart,e[o]));return t.filter&&(r=r.filter((h,c,u)=>t.filter(h,c,u,i))),t.itemSort&&(r=r.sort((h,c)=>t.itemSort(h,c,i))),R(r,h=>{let c=oa(t.callbacks,h);s.push(G(c,"labelColor",this,h)),a.push(G(c,"labelPointStyle",this,h)),n.push(G(c,"labelTextColor",this,h))}),this.labelColors=s,this.labelPointStyles=a,this.labelTextColors=n,this.dataPoints=r,r}update(t,e){let i=this.options.setContext(this.getContext()),s=this._active,a,n=[];if(!s.length)this.opacity!==0&&(a={opacity:0});else{let r=ce[i.position].call(this,s,this._eventPosition);n=this._createItems(i),this.title=this.getTitle(n,i),this.beforeBody=this.getBeforeBody(n,i),this.body=this.getBody(n,i),this.afterBody=this.getAfterBody(n,i),this.footer=this.getFooter(n,i);let o=this._size=sa(this,i),l=Object.assign({},r,o),h=aa(this.chart,i,l),c=na(i,l,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,a={opacity:1,x:c.x,y:c.y,width:o.width,height:o.height,caretX:r.x,caretY:r.y}}this._tooltipItems=n,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){let a=this.getCaretPosition(t,i,s);e.lineTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.lineTo(a.x3,a.y3)}getCaretPosition(t,e,i){let{xAlign:s,yAlign:a}=this,{caretSize:n,cornerRadius:r}=i,{topLeft:o,topRight:l,bottomLeft:h,bottomRight:c}=Rt(r),{x:u,y:f}=t,{width:g,height:p}=e,b,m,x,y,M,_;return a==="center"?(M=f+p/2,s==="left"?(b=u,m=b-n,y=M+n,_=M-n):(b=u+g,m=b+n,y=M-n,_=M+n),x=b):(s==="left"?m=u+Math.max(o,h)+n:s==="right"?m=u+g-Math.max(l,c)-n:m=this.caretX,a==="top"?(y=f,M=y-n,b=m-n,x=m+n):(y=f+p,M=y+n,b=m+n,x=m-n),_=y),{x1:b,x2:m,x3:x,y1:y,y2:M,y3:_}}drawTitle(t,e,i){let s=this.title,a=s.length,n,r,o;if(a){let l=Nt(i.rtl,this.x,this.width);for(t.x=Ee(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",n=j(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=n.string,o=0;o<a;++o)e.fillText(s[o],l.x(t.x),t.y+n.lineHeight/2),t.y+=n.lineHeight+r,o+1===a&&(t.y+=i.titleMarginBottom-r)}}_drawColorBox(t,e,i,s,a){let n=this.labelColors[i],r=this.labelPointStyles[i],{boxHeight:o,boxWidth:l,boxPadding:h}=a,c=j(a.bodyFont),u=Ee(this,"left",a),f=s.x(u),g=o<c.lineHeight?(c.lineHeight-o)/2:0,p=e.y+g;if(a.usePointStyle){let b={radius:Math.min(l,o)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},m=s.leftForLtr(f,l)+l/2,x=p+o/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,Si(t,b,m,x),t.strokeStyle=n.borderColor,t.fillStyle=n.backgroundColor,Si(t,b,m,x)}else{t.lineWidth=A(n.borderWidth)?Math.max(...Object.values(n.borderWidth)):n.borderWidth||1,t.strokeStyle=n.borderColor,t.setLineDash(n.borderDash||[]),t.lineDashOffset=n.borderDashOffset||0;let b=s.leftForLtr(f,l-h),m=s.leftForLtr(s.xPlus(f,1),l-h-2),x=Rt(n.borderRadius);Object.values(x).some(y=>y!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,pe(t,{x:b,y:p,w:l,h:o,radius:x}),t.fill(),t.stroke(),t.fillStyle=n.backgroundColor,t.beginPath(),pe(t,{x:m,y:p+1,w:l-2,h:o-2,radius:x}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(b,p,l,o),t.strokeRect(b,p,l,o),t.fillStyle=n.backgroundColor,t.fillRect(m,p+1,l-2,o-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){let{body:s}=this,{bodySpacing:a,bodyAlign:n,displayColors:r,boxHeight:o,boxWidth:l,boxPadding:h}=i,c=j(i.bodyFont),u=c.lineHeight,f=0,g=Nt(i.rtl,this.x,this.width),p=d(function(k){e.fillText(k,g.x(t.x+f),t.y+u/2),t.y+=u+a},"p"),b=g.textAlign(n),m,x,y,M,_,v,w;for(e.textAlign=n,e.textBaseline="middle",e.font=c.string,t.x=Ee(this,b,i),e.fillStyle=i.bodyColor,R(this.beforeBody,p),f=r&&b!=="right"?n==="center"?l/2+h:l+2+h:0,M=0,v=s.length;M<v;++M){for(m=s[M],x=this.labelTextColors[M],e.fillStyle=x,R(m.before,p),y=m.lines,r&&y.length&&(this._drawColorBox(e,t,M,g,i),u=Math.max(c.lineHeight,o)),_=0,w=y.length;_<w;++_)p(y[_]),u=c.lineHeight;R(m.after,p)}f=0,u=c.lineHeight,R(this.afterBody,p),t.y-=a}drawFooter(t,e,i){let s=this.footer,a=s.length,n,r;if(a){let o=Nt(i.rtl,this.x,this.width);for(t.x=Ee(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=o.textAlign(i.footerAlign),e.textBaseline="middle",n=j(i.footerFont),e.fillStyle=i.footerColor,e.font=n.string,r=0;r<a;++r)e.fillText(s[r],o.x(t.x),t.y+n.lineHeight/2),t.y+=n.lineHeight+i.footerSpacing}}drawBackground(t,e,i,s){let{xAlign:a,yAlign:n}=this,{x:r,y:o}=t,{width:l,height:h}=i,{topLeft:c,topRight:u,bottomLeft:f,bottomRight:g}=Rt(s.cornerRadius);e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.beginPath(),e.moveTo(r+c,o),n==="top"&&this.drawCaret(t,e,i,s),e.lineTo(r+l-u,o),e.quadraticCurveTo(r+l,o,r+l,o+u),n==="center"&&a==="right"&&this.drawCaret(t,e,i,s),e.lineTo(r+l,o+h-g),e.quadraticCurveTo(r+l,o+h,r+l-g,o+h),n==="bottom"&&this.drawCaret(t,e,i,s),e.lineTo(r+f,o+h),e.quadraticCurveTo(r,o+h,r,o+h-f),n==="center"&&a==="left"&&this.drawCaret(t,e,i,s),e.lineTo(r,o+c),e.quadraticCurveTo(r,o,r+c,o),e.closePath(),e.fill(),s.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){let e=this.chart,i=this.$animations,s=i&&i.x,a=i&&i.y;if(s||a){let n=ce[t.position].call(this,this._active,this._eventPosition);if(!n)return;let r=this._size=sa(this,t),o=Object.assign({},n,this._size),l=aa(e,t,o),h=na(t,o,l,e);(s._to!==h.x||a._to!==h.y)&&(this.xAlign=l.xAlign,this.yAlign=l.yAlign,this.width=r.width,this.height=r.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){let e=this.options.setContext(this.getContext()),i=this.opacity;if(!i)return;this._updateAnimationTarget(e);let s={width:this.width,height:this.height},a={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;let n=q(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=i,this.drawBackground(a,t,s,e),za(t,e.textDirection),a.y+=n.top,this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),Va(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){let i=this._active,s=t.map(({datasetIndex:r,index:o})=>{let l=this.chart.getDatasetMeta(r);if(!l)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:l.data[o],index:o}}),a=!$e(i,s),n=this._positionChanged(s,e);(a||n)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let s=this.options,a=this._active||[],n=this._getActiveElements(t,a,e,i),r=this._positionChanged(n,t),o=e||!$e(n,a)||r;return o&&(this._active=n,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),o}_getActiveElements(t,e,i,s){let a=this.options;if(t.type==="mouseout")return[];if(!s)return e;let n=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&n.reverse(),n}_positionChanged(t,e){let{caretX:i,caretY:s,options:a}=this,n=ce[a.position].call(this,t,e);return n!==!1&&(i!==n.x||s!==n.y)}},"Te");S(Li,"positioners",ce);var sd={id:"tooltip",_element:Li,positioners:ce,afterInit(t,e,i){i&&(t.tooltip=new Li({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){let e=t.tooltip;if(e&&e._willRender()){let i={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){let i=e.replay;t.tooltip.handleEvent(e.event,i,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:(t,e)=>e.bodyFont.size,boxWidth:(t,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:un},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},ad=Object.freeze({__proto__:null,Colors:mh,Decimation:yh,Filler:Wh,Legend:Uh,SubTitle:Kh,Title:qh,Tooltip:sd}),nd=d((t,e,i,s)=>(typeof e=="string"?(i=t.push(e)-1,s.unshift({index:i,label:e})):isNaN(e)&&(i=null),i),"ac");function rd(t,e,i,s){let a=t.indexOf(e);if(a===-1)return nd(t,e,i,s);let n=t.lastIndexOf(e);return a!==n?i:a}d(rd,"rc");var od=d((t,e)=>t===null?null:Y(Math.round(t),0,e),"lc");function fn(t){let e=this.getLabels();return t>=0&&t<e.length?e[t]:t}d(fn,"Un");var Ti=d(class extends Yt{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let e=this._addedLabels;if(e.length){let i=this.getLabels();for(let{index:s,label:a}of e)i[s]===a&&i.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(T(t))return null;let i=this.getLabels();return e=isFinite(e)&&i[e]===t?e:rd(i,t,O(e,t),this._addedLabels),od(e,i.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),e||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){let t=this.min,e=this.max,i=this.options.offset,s=[],a=this.getLabels();a=t===0&&e===a.length-1?a:a.slice(t,e+1),this._valueRange=Math.max(a.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let n=t;n<=e;n++)s.push({value:n});return s}getLabelForValue(t){return fn.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}},"De");S(Ti,"id","category"),S(Ti,"defaults",{ticks:{callback:fn}});function ld(t,e){let i=[],{bounds:s,step:a,min:n,max:r,precision:o,count:l,maxTicks:h,maxDigits:c,includeBounds:u}=t,f=a||1,g=h-1,{min:p,max:b}=e,m=!T(n),x=!T(r),y=!T(l),M=(b-p)/(c+1),_=ns((b-p)/g/f)*f,v,w,k,P;if(_<1e-14&&!m&&!x)return[{value:p},{value:b}];P=Math.ceil(b/_)-Math.floor(p/_),P>g&&(_=ns(P*_/g/f)*f),T(o)||(v=Math.pow(10,o),_=Math.ceil(_*v)/v),s==="ticks"?(w=Math.floor(p/_)*_,k=Math.ceil(b/_)*_):(w=p,k=b),m&&x&&a&&ir((r-n)/a,_/1e3)?(P=Math.round(Math.min((r-n)/_,h)),_=(r-n)/P,w=n,k=r):y?(w=m?n:w,k=x?r:k,P=l-1,_=(k-w)/P):(P=(k-w)/_,oe(P,Math.round(P),_/1e3)?P=Math.round(P):P=Math.ceil(P));let D=Math.max(rs(_),rs(w));v=Math.pow(10,T(o)?D:o),w=Math.round(w*v)/v,k=Math.round(k*v)/v;let C=0;for(m&&(u&&w!==n?(i.push({value:n}),w<n&&C++,oe(Math.round((w+C*_)*v)/v,n,la(n,M,t))&&C++):w<n&&C++);C<P;++C)i.push({value:Math.round((w+C*_)*v)/v});return x&&u&&k!==r?i.length&&oe(i[i.length-1].value,r,la(r,M,t))?i[i.length-1].value=r:i.push({value:r}):(!x||k===r)&&i.push({value:k}),i}d(ld,"cc");function la(t,e,{horizontal:i,minRotation:s}){let a=rt(s),n=(i?Math.sin(a):Math.cos(a))||.001,r=.75*e*(""+t).length;return Math.min(e/n,r)}d(la,"Yn");var Qe=d(class extends Yt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return T(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){let{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds(),{min:s,max:a}=this,n=d(o=>s=e?s:o,"a"),r=d(o=>a=i?a:o,"r");if(t){let o=ut(s),l=ut(a);o<0&&l<0?r(0):o>0&&l>0&&n(0)}if(s===a){let o=a===0?1:Math.abs(a*.05);r(a+o),t||n(s-o)}this.min=s,this.max=a}getTickLimit(){let t=this.options.ticks,{maxTicksLimit:e,stepSize:i}=t,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),e=e||11),e&&(s=Math.min(e,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let t=this.options,e=t.ticks,i=this.getTickLimit();i=Math.max(2,i);let s={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},a=this._range||this,n=ld(s,a);return t.bounds==="ticks"&&xa(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){let t=this.ticks,e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){let s=(i-e)/Math.max(t.length-1,1)/2;e-=s,i+=s}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return _e(t,this.chart.options.locale,this.options.ticks.format)}},"ce"),Ei=d(class extends Qe{determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=W(t)?t:0,this.max=W(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){let t=this.isHorizontal(),e=t?this.width:this.height,i=rt(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,a.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}},"Oe");S(Ei,"id","linear"),S(Ei,"defaults",{ticks:{callback:ti.formatters.numeric}});var be=d(t=>Math.floor(vt(t)),"Ie"),At=d((t,e)=>Math.pow(10,be(t)+e),"zt");function ha(t){return t/Math.pow(10,be(t))===1}d(ha,"Xn");function da(t,e,i){let s=Math.pow(10,i),a=Math.floor(t/s);return Math.ceil(e/s)-a}d(da,"Kn");function hd(t,e){let i=e-t,s=be(i);for(;da(t,e,s)>10;)s++;for(;da(t,e,s)<10;)s--;return Math.min(s,be(t))}d(hd,"hc");function dd(t,{min:e,max:i}){e=et(t.min,e);let s=[],a=be(e),n=hd(e,i),r=n<0?Math.pow(10,Math.abs(n)):1,o=Math.pow(10,n),l=a>n?Math.pow(10,a):0,h=Math.round((e-l)*r)/r,c=Math.floor((e-l)/o/10)*o*10,u=Math.floor((h-c)/Math.pow(10,n)),f=et(t.min,Math.round((l+c+u*Math.pow(10,n))*r)/r);for(;f<i;)s.push({value:f,major:ha(f),significand:u}),u>=10?u=u<15?15:20:u++,u>=20&&(n++,u=2,r=n>=0?1:r),f=Math.round((l+c+u*Math.pow(10,n))*r)/r;let g=et(t.max,f);return s.push({value:g,major:ha(g),significand:u}),s}d(dd,"dc");var Ri=d(class extends Yt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){let i=Qe.prototype.parse.apply(this,[t,e]);if(i===0){this._zero=!0;return}return W(i)&&i>0?i:null}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=W(t)?Math.max(0,t):null,this.max=W(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!W(this._userMin)&&(this.min=t===At(this.min,0)?At(this.min,-1):At(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),i=this.min,s=this.max,a=d(r=>i=t?i:r,"o"),n=d(r=>s=e?s:r,"a");i===s&&(i<=0?(a(1),n(10)):(a(At(i,-1)),n(At(s,1)))),i<=0&&a(At(s,-1)),s<=0&&n(At(i,1)),this.min=i,this.max=s}buildTicks(){let t=this.options,e={min:this._userMin,max:this._userMax},i=dd(e,this);return t.bounds==="ticks"&&xa(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":_e(t,this.chart.options.locale,this.options.ticks.format)}configure(){let t=this.min;super.configure(),this._startValue=vt(t),this._valueRange=vt(this.max)-vt(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(vt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){let e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}},"Ce");S(Ri,"id","logarithmic"),S(Ri,"defaults",{ticks:{callback:ti.formatters.logarithmic,major:{enabled:!0}}});function Ii(t){let e=t.ticks;if(e.display&&t.display){let i=q(e.backdropPadding);return O(e.font&&e.font.size,H.font.size)+i.height}return 0}d(Ii,"fs");function cd(t,e,i){return i=F(i)?i:[i],{w:_r(t,e.string,i),h:i.length*e.lineHeight}}d(cd,"uc");function ca(t,e,i,s,a){return t===s||t===a?{start:e-i/2,end:e+i/2}:t<s||t>a?{start:e-i,end:e}:{start:e,end:e+i}}d(ca,"qn");function ud(t){let e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),s=[],a=[],n=t._pointLabels.length,r=t.options.pointLabels,o=r.centerPointLabels?B/n:0;for(let l=0;l<n;l++){let h=r.setContext(t.getPointLabelContext(l));a[l]=h.padding;let c=t.getPointPosition(l,t.drawingArea+a[l],o),u=j(h.font),f=cd(t.ctx,u,t._pointLabels[l]);s[l]=f;let g=it(t.getIndexAngle(l)+o),p=Math.round(Vi(g)),b=ca(p,c.x,f.w,0,180),m=ca(p,c.y,f.h,90,270);fd(i,e,g,b,m)}t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=gd(t,s,a)}d(ud,"fc");function fd(t,e,i,s,a){let n=Math.abs(Math.sin(i)),r=Math.abs(Math.cos(i)),o=0,l=0;s.start<e.l?(o=(e.l-s.start)/n,t.l=Math.min(t.l,e.l-o)):s.end>e.r&&(o=(s.end-e.r)/n,t.r=Math.max(t.r,e.r+o)),a.start<e.t?(l=(e.t-a.start)/r,t.t=Math.min(t.t,e.t-l)):a.end>e.b&&(l=(a.end-e.b)/r,t.b=Math.max(t.b,e.b+l))}d(fd,"gc");function gd(t,e,i){let s=[],a=t._pointLabels.length,n=t.options,r=Ii(n)/2,o=t.drawingArea,l=n.pointLabels.centerPointLabels?B/a:0;for(let h=0;h<a;h++){let c=t.getPointPosition(h,o+r+i[h],l),u=Math.round(Vi(it(c.angle+N))),f=e[h],g=bd(c.y,f.h,u),p=pd(u),b=md(c.x,f.w,p);s.push({x:c.x,y:g,textAlign:p,left:b,top:g,right:b+f.w,bottom:g+f.h})}return s}d(gd,"pc");function pd(t){return t===0||t===180?"center":t<180?"left":"right"}d(pd,"mc");function md(t,e,i){return i==="right"?t-=e:i==="center"&&(t-=e/2),t}d(md,"bc");function bd(t,e,i){return i===90||i===270?t-=e/2:(i>270||i<90)&&(t-=e),t}d(bd,"_c");function xd(t,e){let{ctx:i,options:{pointLabels:s}}=t;for(let a=e-1;a>=0;a--){let n=s.setContext(t.getPointLabelContext(a)),r=j(n.font),{x:o,y:l,textAlign:h,left:c,top:u,right:f,bottom:g}=t._pointLabelItems[a],{backdropColor:p}=n;if(!T(p)){let b=Rt(n.borderRadius),m=q(n.backdropPadding);i.fillStyle=p;let x=c-m.left,y=u-m.top,M=f-c+m.width,_=g-u+m.height;Object.values(b).some(v=>v!==0)?(i.beginPath(),pe(i,{x,y,w:M,h:_,radius:b}),i.fill()):i.fillRect(x,y,M,_)}zt(i,t._pointLabels[a],o,l+r.lineHeight/2,r,{color:n.color,textAlign:h,textBaseline:"middle"})}}d(xd,"xc");function gn(t,e,i,s){let{ctx:a}=t;if(i)a.arc(t.xCenter,t.yCenter,e,0,z);else{let n=t.getPointPosition(0,e);a.moveTo(n.x,n.y);for(let r=1;r<s;r++)n=t.getPointPosition(r,e),a.lineTo(n.x,n.y)}}d(gn,"yo");function _d(t,e,i,s,a){let n=t.ctx,r=e.circular,{color:o,lineWidth:l}=e;!r&&!s||!o||!l||i<0||(n.save(),n.strokeStyle=o,n.lineWidth=l,n.setLineDash(a.dash),n.lineDashOffset=a.dashOffset,n.beginPath(),gn(t,i,r,s),n.closePath(),n.stroke(),n.restore())}d(_d,"yc");function yd(t,e,i){return Pt(t,{label:i,index:e,type:"pointLabel"})}d(yd,"vc");var ne=d(class extends Qe{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){let t=this._padding=q(Ii(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!1);this.min=W(t)&&!isNaN(t)?t:0,this.max=W(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ii(this.options))}generateTickLabels(t){Qe.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,i)=>{let s=I(this.options.pointLabels.callback,[e,i],this);return s||s===0?s:""}).filter((e,i)=>this.chart.getDataVisibility(i))}fit(){let t=this.options;t.display&&t.pointLabels.display?ud(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,s))}getIndexAngle(t){let e=z/(this._pointLabels.length||1),i=this.options.startAngle||0;return it(t*e+rt(i))}getDistanceFromCenterForValue(t){if(T(t))return NaN;let e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(T(t))return NaN;let e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){let e=this._pointLabels||[];if(t>=0&&t<e.length){let i=e[t];return yd(this.getContext(),t,i)}}getPointPosition(t,e,i=0){let s=this.getIndexAngle(t)-N+i;return{x:Math.cos(s)*e+this.xCenter,y:Math.sin(s)*e+this.yCenter,angle:s}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){let{left:e,top:i,right:s,bottom:a}=this._pointLabelItems[t];return{left:e,top:i,right:s,bottom:a}}drawBackground(){let{backgroundColor:t,grid:{circular:e}}=this.options;if(t){let i=this.ctx;i.save(),i.beginPath(),gn(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){let t=this.ctx,e=this.options,{angleLines:i,grid:s,border:a}=e,n=this._pointLabels.length,r,o,l;if(e.pointLabels.display&&xd(this,n),s.display&&this.ticks.forEach((h,c)=>{if(c!==0){o=this.getDistanceFromCenterForValue(h.value);let u=this.getContext(c),f=s.setContext(u),g=a.setContext(u);_d(this,f,o,n,g)}}),i.display){for(t.save(),r=n-1;r>=0;r--){let h=i.setContext(this.getPointLabelContext(r)),{color:c,lineWidth:u}=h;!u||!c||(t.lineWidth=u,t.strokeStyle=c,t.setLineDash(h.borderDash),t.lineDashOffset=h.borderDashOffset,o=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),l=this.getPointPosition(r,o),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){let t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;let s=this.getIndexAngle(0),a,n;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((r,o)=>{if(o===0&&!e.reverse)return;let l=i.setContext(this.getContext(o)),h=j(l.font);if(a=this.getDistanceFromCenterForValue(this.ticks[o].value),l.showLabelBackdrop){t.font=h.string,n=t.measureText(r.label).width,t.fillStyle=l.backdropColor;let c=q(l.backdropPadding);t.fillRect(-n/2-c.left,-a-h.size/2-c.top,n+c.width,h.size+c.height)}zt(t,r.label,0,-a,h,{color:l.color})}),t.restore()}drawTitle(){}},"Ft");S(ne,"id","radialLinear"),S(ne,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:ti.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),S(ne,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),S(ne,"descriptors",{angleLines:{_fallback:"grid"}});var ai={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}},Z=Object.keys(ai);function vd(t,e){return t-e}d(vd,"Mc");function ua(t,e){if(T(e))return null;let i=t._adapter,{parser:s,round:a,isoWeekday:n}=t._parseOpts,r=e;return typeof s=="function"&&(r=s(r)),W(r)||(r=typeof s=="string"?i.parse(r,s):i.parse(r)),r===null?null:(a&&(r=a==="week"&&(Ht(n)||n===!0)?i.startOf(r,"isoWeek",n):i.startOf(r,a)),+r)}d(ua,"Gn");function fa(t,e,i,s){let a=Z.length;for(let n=Z.indexOf(t);n<a-1;++n){let r=ai[Z[n]],o=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((i-e)/(o*r.size))<=s)return Z[n]}return Z[a-1]}d(fa,"Jn");function Md(t,e,i,s,a){for(let n=Z.length-1;n>=Z.indexOf(i);n--){let r=Z[n];if(ai[r].common&&t._adapter.diff(a,s,r)>=e-1)return r}return Z[i?Z.indexOf(i):0]}d(Md,"kc");function wd(t){for(let e=Z.indexOf(t)+1,i=Z.length;e<i;++e)if(ai[Z[e]].common)return Z[e]}d(wd,"wc");function ga(t,e,i){if(!i)t[e]=!0;else if(i.length){let{lo:s,hi:a}=Bi(i,e),n=i[s]>=e?i[s]:i[a];t[n]=!0}}d(ga,"Qn");function kd(t,e,i,s){let a=t._adapter,n=+a.startOf(e[0].value,s),r=e[e.length-1].value,o,l;for(o=n;o<=r;o=+a.add(o,1,s))l=i[o],l>=0&&(e[l].major=!0);return e}d(kd,"Sc");function pa(t,e,i){let s=[],a={},n=e.length,r,o;for(r=0;r<n;++r)o=e[r],a[o]=r,s.push({value:o,major:!1});return n===0||!i?s:kd(t,s,a,i)}d(pa,"Zn");var xe=d(class extends Yt{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,e={}){let i=t.time||(t.time={}),s=this._adapter=new Fo._date(t.adapters.date);s.init(e),re(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:ua(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,e=this._adapter,i=t.time.unit||"day",{min:s,max:a,minDefined:n,maxDefined:r}=this.getUserBounds();function o(l){!n&&!isNaN(l.min)&&(s=Math.min(s,l.min)),!r&&!isNaN(l.max)&&(a=Math.max(a,l.max))}d(o,"l"),(!n||!r)&&(o(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&o(this.getMinMax(!1))),s=W(s)&&!isNaN(s)?s:+e.startOf(Date.now(),i),a=W(a)&&!isNaN(a)?a:+e.endOf(Date.now(),i)+1,this.min=Math.min(s,a-1),this.max=Math.max(s+1,a)}_getLabelBounds(){let t=this.getLabelTimestamps(),e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){let t=this.options,e=t.time,i=t.ticks,s=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);let a=this.min,n=this.max,r=rr(s,a,n);return this._unit=e.unit||(i.autoSkip?fa(e.minUnit,this.min,this.max,this._getLabelCapacity(a)):Md(this,r.length,e.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:wd(this._unit),this.initOffsets(s),t.reverse&&r.reverse(),pa(this,r,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,i=0,s,a;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?e=1-s:e=(this.getDecimalForValue(t[1])-s)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?i=a:i=(a-this.getDecimalForValue(t[t.length-2]))/2);let n=t.length<3?.5:.25;e=Y(e,0,n),i=Y(i,0,n),this._offsets={start:e,end:i,factor:1/(e+1+i)}}_generate(){let t=this._adapter,e=this.min,i=this.max,s=this.options,a=s.time,n=a.unit||fa(a.minUnit,e,i,this._getLabelCapacity(e)),r=O(s.ticks.stepSize,1),o=n==="week"?a.isoWeekday:!1,l=Ht(o)||o===!0,h={},c=e,u,f;if(l&&(c=+t.startOf(c,"isoWeek",o)),c=+t.startOf(c,l?"day":n),t.diff(i,e,n)>1e5*r)throw new Error(e+" and "+i+" are too far apart with stepSize of "+r+" "+n);let g=s.ticks.source==="data"&&this.getDataTimestamps();for(u=c,f=0;u<i;u=+t.add(u,r,n),f++)ga(h,u,g);return(u===i||s.bounds==="ticks"||f===1)&&ga(h,u,g),Object.keys(h).sort((p,b)=>p-b).map(p=>+p)}getLabelForValue(t){let e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){let i=this.options.time.displayFormats,s=this._unit,a=e||i[s];return this._adapter.format(t,a)}_tickFormatFunction(t,e,i,s){let a=this.options,n=a.ticks.callback;if(n)return I(n,[t,e,i],this);let r=a.time.displayFormats,o=this._unit,l=this._majorUnit,h=o&&r[o],c=l&&r[l],u=i[e],f=l&&c&&u&&u.major;return this._adapter.format(t,s||(f?c:h))}generateTickLabels(t){let e,i,s;for(e=0,i=t.length;e<i;++e)s=t[e],s.label=this._tickFormatFunction(s.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){let e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){let e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){let e=this.options.ticks,i=this.ctx.measureText(t).width,s=rt(this.isHorizontal()?e.maxRotation:e.minRotation),a=Math.cos(s),n=Math.sin(s),r=this._resolveTickFontOptions(0).size;return{w:i*a+r*n,h:i*n+r*a}}_getLabelCapacity(t){let e=this.options.time,i=e.displayFormats,s=i[e.unit]||i.millisecond,a=this._tickFormatFunction(t,0,pa(this,[t],this._majorUnit),s),n=this._getLabelSize(a),r=Math.floor(this.isHorizontal()?this.width/n.w:this.height/n.h)-1;return r>0?r:1}getDataTimestamps(){let t=this._cache.data||[],e,i;if(t.length)return t;let s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(e=0,i=s.length;e<i;++e)t=t.concat(s[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){let t=this._cache.labels||[],e,i;if(t.length)return t;let s=this.getLabels();for(e=0,i=s.length;e<i;++e)t.push(ua(this,s[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return va(t.sort(vd))}},"Vt");S(xe,"id","time"),S(xe,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Re(t,e,i){let s=0,a=t.length-1,n,r,o,l;i?(e>=t[s].pos&&e<=t[a].pos&&({lo:s,hi:a}=xt(t,"pos",e)),{pos:n,time:o}=t[s],{pos:r,time:l}=t[a]):(e>=t[s].time&&e<=t[a].time&&({lo:s,hi:a}=xt(t,"time",e)),{time:n,pos:o}=t[s],{time:r,pos:l}=t[a]);let h=r-n;return h?o+(l-o)*(e-n)/h:o}d(Re,"ai");var Fi=d(class extends xe{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Re(e,this.min),this._tableRange=Re(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){let{min:e,max:i}=this,s=[],a=[],n,r,o,l,h;for(n=0,r=t.length;n<r;++n)l=t[n],l>=e&&l<=i&&s.push(l);if(s.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(n=0,r=s.length;n<r;++n)h=s[n+1],o=s[n-1],l=s[n],Math.round((h+o)/2)!==l&&a.push({time:l,pos:n/(r-1)});return a}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;let e=this.getDataTimestamps(),i=this.getLabelTimestamps();return e.length&&i.length?t=this.normalize(e.concat(i)):t=e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(Re(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){let e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return Re(this._table,i*this._tableRange+this._minPos,!0)}},"Ae");S(Fi,"id","timeseries"),S(Fi,"defaults",xe.defaults);var Sd=Object.freeze({__proto__:null,CategoryScale:Ti,LinearScale:Ei,LogarithmicScale:Ri,RadialLinearScale:ne,TimeScale:xe,TimeSeriesScale:Fi}),pn=[Io,dh,ad,Sd];J.register(...pn);function Pd(t){return Math.pow(1+t,1/12)-1}d(Pd,"monthlyInterest");function bn(t,e){let i=Array(13).fill(t);for(let s=1;s<i.length;s++)i[s]=i[s-1]*(1+e(i[s-1]));return i}d(bn,"rawGrowth");var xn=1e5,_n=5e4,yn=2e4;function Dd(t){return t>=xn?4e-4:t>=_n?3e-4:t>=yn?2e-4:1e-4}d(Dd,"bofaInterestRateFromSavings");function Cd(t,e){return e>=xn?t*.75:e>=_n?t*.5:e>=yn?t*.25:t}d(Cd,"bofaAdditionalPoints");function Od(t,e){return bn(t,()=>e).map(i=>i-t)}d(Od,"hysaGrowth");function ni(t){return bn(t,e=>Dd(e)).map(e=>e-t)}d(ni,"bofaSavingsGrowth");function qi(t,e,i){return ni(t).map(s=>i*Cd(e,t+s)/100)}d(qi,"creditCardGrowth");function Ad(t,e,i){let s=ni(t);return qi(t,e,i).map((a,n)=>a+s[n])}d(Ad,"bofaCombined");function Ld(t,e,i){let s=ni(t);return qi(t,e,i).map((a,n)=>a+s[n]-i*n)}d(Ld,"bofaGrossCombined");function mn(t,e,i,s){return[{label:"HYSA",data:Od(t,Pd(e/100)).map(a=>a.toFixed(2)),borderWidth:1},{label:"BofA Savings Interest",data:ni(t).map(a=>a.toFixed(2)),borderWidth:1},{label:"Credit Card Bonus",data:qi(t,s,i).map(a=>a.toFixed(2)),borderWidth:1},{label:"BofA Savings Interest + Credit Card Bonus",data:Ad(t,s,i).map(a=>a.toFixed(2)),borderWidth:1},{label:"BofA Savings Interest + Credit Card Bonus - Amount spent",data:Ld(t,s,i).map(a=>a.toFixed(2)),borderWidth:1,hidden:!0}]}d(mn,"getDatasets");document.addEventListener("DOMContentLoaded",()=>{function t(o,l){let h=document.getElementById(o);return h.value?(document.getElementById(o+"Display").textContent=h.value,Number(h.value)):(document.getElementById(o+"Display").textContent=String(l),h.value=String(l),l)}d(t,"getOrInit");let e=t("saved",5e4),i=t("hysaPercent",3.75),s=t("monthlySpending",2e3),a=t("avgBasePoints",1.5);J.defaults.color="#ccc",J.defaults.borderColor="#9993",J.defaults.font.family="'M PLUS Code Latin', sans-serif",J.defaults.font.size=16;let n=new J(document.getElementById("myChart"),{normalized:!0,type:"line",data:{labels:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","Jan"],datasets:mn(e,i,s,a)},options:{scales:{y:{beginAtZero:!0}},animation:!1}});function r(){n.data.datasets=mn(e,i,s,a),n.update()}d(r,"updateChart"),document.getElementById("saved")?.addEventListener("input",o=>{o.target.value&&(e=o.target.value,document.getElementById("savedDisplay").textContent=o.target.value,r())}),document.getElementById("monthlySpending")?.addEventListener("input",o=>{o.target.value&&(s=o.target.value,document.getElementById("monthlySpendingDisplay").textContent=o.target.value,r())}),document.getElementById("avgBasePoints")?.addEventListener("input",o=>{o.target.value&&(a=o.target.value,document.getElementById("avgBasePointsDisplay").textContent=o.target.value,r())}),document.getElementById("hysaPercent")?.addEventListener("input",o=>{let l=o.target.value;l&&(i=Number(l),document.getElementById("hysaPercentDisplay").textContent=l,r())})});
/*! Bundled license information:
@kurkle/color/dist/color.esm.js:
(*!
* @kurkle/color v0.3.2
* https://github.com/kurkle/color#readme
* (c) 2023 Jukka Kurkela
* Released under the MIT License
*)
*/
/*! Bundled license information:
chart.js/dist/chunks/helpers.segment.js:
(*!
* Chart.js v4.2.1
* https://www.chartjs.org
* (c) 2023 Chart.js Contributors
* Released under the MIT License
*)
chart.js/dist/chart.js:
(*!
* Chart.js v4.2.1
* https://www.chartjs.org
* (c) 2023 Chart.js Contributors
* Released under the MIT License
*)
*/
//# sourceMappingURL=./chart.js.map