PageSourceSearch

https://umami-production-9e21.up.railway.app/_next/static/chunks/8001d5adf8a1233a.js

js umami-production-9e21.up.railway.app collected 2026-10-03 12:14:38 UTC 203,547 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,573478,t=>{"use strict";let e;function i(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function s(t){return t+.5|0}t.s(["Chart",()=>sM,"_adapters",()=>iM,"registerables",()=>aB],573478);let a=(t,e,i)=>Math.max(Math.min(t,i),e);function n(t){return a(s(2.55*t),0,255)}function r(t){return a(s(255*t),0,255)}function o(t){return a(s(t/2.55)/100,0,1)}function l(t){return a(s(100*t),0,100)}let h={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},d=[..."0123456789ABCDEF"],c=t=>d[15&t],u=t=>d[(240&t)>>4]+d[15&t],f=t=>(240&t)>>4==(15&t),g=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function p(t,e,i){let s=e*Math.min(i,1-i),a=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+t/30)%12;return i-s*Math.max(Math.min(a-3,9-a,1),-1)};return[a(0),a(8),a(4)]}function m(t,e,i){let s=function(s){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(s+t/60)%6;return i-i*e*Math.max(Math.min(a,4-a,1),0)};return[s(5),s(3),s(1)]}function b(t,e,i){let s,a=p(t,1,.5);for(e+i>1&&(s=1/(e+i),e*=s,i*=s),s=0;s<3;s++)a[s]*=1-e-i,a[s]+=e;return a}function x(t){let e,i,s,a=t.r/255,n=t.g/255,r=t.b/255,o=Math.max(a,n,r),l=Math.min(a,n,r),h=(o+l)/2;o!==l&&(s=o-l,i=h>.5?s/(2-o-l):s/(o+l),e=60*(e=a===o?(n-r)/s+6*(n<r):n===o?(r-a)/s+2:(a-n)/s+4)+.5);return[0|e,i||0,h]}function _(t,e,i,s){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,s)).map(r)}function y(t){return(t%360+360)%360}let v={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"},M={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"},w=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,k=t=>
1t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,P=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function S(t,e,i){if(t){let s=x(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*i,0===e?360:1)),t.r=(s=_(p,s,void 0,void 0))[0],t.g=s[1],t.b=s[2]}}function D(t,e){return t?Object.assign(e||{},t):t}function C(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=r(t[3]))):(e=D(t,{r:0,g:0,b:0,a:1})).a=r(e.a),e}class O{get valid(){return this._valid}get rgb(){var t=D(this._rgb);return t&&(t.a=o(t.a)),t}set rgb(t){this._rgb=C(t)}rgbString(){var t;return this._valid?(t=this._rgb)&&(t.a<255?"rgba(".concat(t.r,", ").concat(t.g,", ").concat(t.b,", ").concat(o(t.a),")"):"rgb(".concat(t.r,", ").concat(t.g,", ").concat(t.b,")")):void 0}hexString(){var t,e;let i,s;return this._valid?(e=f((i=t=this._rgb).r)&&f(i.g)&&f(i.b)&&f(i.a)?c:u,t?"#"+e(t.r)+e(t.g)+e(t.b)+(s=t.a,s<255?e(s):""):void 0):void 0}hslString(){return this._valid?function(t){if(!t)return;let e=x(t),i=e[0],s=l(e[1]),a=l(e[2]);return t.a<255?"hsla(".concat(i,", ").concat(s,"%, ").concat(a,"%, ").concat(o(t.a),")"):"hsl(".concat(i,", ").concat(s,"%, ").concat(a,"%)")}(this._rgb):void 0}mix(t,e){if(t){let i,s=this.rgb,a=t.rgb,n=e===i?.5:e,r=2*n-1,o=s.a-a.a,l=((r*o==-1?r:(r+o)/(1+r*o))+1)/2;i=1-l,s.r=255&l*s.r+i*a.r+.5,s.g=255&l*s.g+i*a.g+.5,s.b=255&l*s.b+i*a.b+.5,s.a=n*s.a+(1-n)*a.a,this.rgb=s}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){let s=P(o(t.r)),a=P(o(t.g)),n=P(o(t.b));return{r:r(k(s+i*(P(o(e.r))-s))),g:r(k(a+i*(P(o(e.g))-a))),b:r(k(n+i*(P(o(e.b))-n))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new O(this.rgb)}alpha(t){return this._rgb.a=r(t),this}clearer(t){let e=this._rgb;return e.a*=1-t,this}greyscale(){let t=this._rgb,e=s(.3*t.r+.59*t.g+.11*t.b);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 S(this._rgb,2,t),this}darken(t){return S(this._rgb,2,-t),this}saturate(t){return S(this._rgb,1,t),this}desaturate(t){return S(this._rgb,1,-t),this}rotate(t){var e,i;return e=this._rgb,(i=x(e))[0]=y(i[0]+t),e.r=(i=_(p,i,void 0,void 0))[0],e.g=i[1],e.b=i[2],this}constructor(t){let i;if(t instanceof O)return t;let s=typeof t;"object"===s?i=C(t):"string"===s&&(i=function(t){var e,i=t.length;return"#"===t[0]&&(4===i||5===i?e={r:255&17*h[t[1]],g:255&17*h[t[2]],b:255&17*h[t[3]],a:5===i?17*h[t[4]]:255}:(7===i||9===i)&&(e={r:h[t[1]]<<4|h[t[2]],g:h[t[3]]<<4|h[t[4]],b:h[t[5]]<<4|h[t[6]],a:9===i?h[t[7]]<<4|h[t[8]]:255})),e}(t)||function(t){e||((e=function(){let t,e,i,s,a,n={},r=Object.keys(M),o=Object.keys(v);for(t=0;t<r.length;t++){for(e=0,s=a=r[t];e<o.length;e++)i=o[e],a=a.replace(i,v[i]);i=parseInt(M[s],16),n[a]=[i>>16&255,i>>8&255,255&i]}return n}()).transparent=[0,0,0,0]);let i=e[t.toLowerCase()];return i&&{r:i[0],g:i[1],b:i[2],a:4===i.length?i[3]:255}}(t)||function(t){return"r"===t.charAt(0)?function(t){let e,i,s,r=w.exec(t),o=255;if(r){if(r[7]!==e){let t=+r[7];o=r[8]?n(t):a(255*t,0,255)}return e=+r[1],i=+r[3],s=+r[5],e=255&(r[2]?n(e):a(e,0,255)),{r:e,g:i=255&(r[4]?n(i):a(i,0,255)),b:s=255&(r[6]?n(s):a(s,0,255)),a:o}}}(t):function(t){let e,i=g.exec(t),s=255;if(!i)return;i[5]!==e&&(s=i[6]?n(+i[5]):r(+i[5]));let a=y(+i[2]),o=i[3]/100,l=i[4]/100;return{r:(e="hwb"===i[1]?_(b,a,o,l):"hsv"===i[1]?_(m,a,o,l):_(p,a,o,l))[0],g:e[1],b:e[2],a:s}}(t)}(t)),this._rgb=i,this._valid=!!i}}function A(){}let L=(()=>{let t=0;return()=>t++})();function T(t){return null==t}function E(t){if(Array.isArray&&Array.isArray(t))return!0;let e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function R(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function z(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function F(t,e){return z(t)?t:e}function V(t,e){return void 0===t?e:t}let I=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function B(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function W(t,e,i,s){let a,n,r;if(E(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(R(t))for(a=0,n=(r=Object.keys(t)).length;a<n;a++)e.call(i,t[r[a]],r[a])}function j(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}function H(t){if(E(t))return t.map(H);if(R(t)){let e=Object.create(null),i=Object.keys(t),s=i.length,a=0;for(;a<s;++a)e[i[a]]=H(t[i[a]]);return e}return t}function N(t){return -1===["__proto__","prototype","constructor"].indexOf(t)}function U(t,e,i,s){if(!N(t))return;let a=e[t],n=i[t];R(a)&&R(n)?$(a,n,s):e[t]=H(n)}function $(t,e,i){let s,a=E(e)?e:[e],n=a.length;if(!R(t))return t;let r=(i=i||{}).merger||U;for(let e=0;e<n;++e){if(!R(s=a[e]))continue;let n=Object.keys(s);for(let e=0,a=n.length;e<a;++e)r(n[e],t,s,i)}return t}function Y(t,e){return $(t,e,{merger:X})}function X(t,e,i){if(!N(t))return;let s=e[t],a=i[t];R(s)&&R(a)?Y(s,a):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=H(a))}let q={"":t=>t,x:t=>t.x,y:t=>t.y};function K(t,e){return(q[e]||(q[e]=function(t){let e=function(t){let e=t.split("."),i=[],s="";for(let t of e)(s+=t).endsWith("\\")?s=s.slice(0,-1)+".":(i.push(s),s="");return i}(t);return t=>{for(let i of e){if(""===i)break;t=t&&t[i]}return t}}(e)))(t)}function J(t){return t.charAt(0).toUpperCase()+t.slice(1)}let Z=t=>void 0!==t,Q=t=>"function"==typeof t,G=(t,e)=>{if(t.size!==e.size)return!1;for(let i of t)if(!e.has(i))return!1;return!0},tt=Math.PI,te=2*tt,ti=te+tt,ts=1/0,ta=tt/180,tn=tt/2,tr=tt/4,to=2*tt/3,tl=Math.log10,th=Math.sign;function td(t,e,i){return Math.abs(t-e)<i}function tc(t){let e=Math.round(t),i=Math.pow(10,Math.floor(tl(t=td(t,e,t/1e3)?e:t))),s=t/i;return(s<=1?1:s<=2?2:s<=5?5:10)*i}function tu(t){return"symbol"!=typeof t&&("object"!=typeof t||null===t||!!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t))&&!isNaN(parseFloat(t))&&isFinite(t)}
1function tf(t,e,i){let s,a,n;for(s=0,a=t.length;s<a;s++)isNaN(n=t[s][i])||(e.min=Math.min(e.min,n),e.max=Math.max(e.max,n))}function tg(t){return tt/180*t}function tp(t){if(!z(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function tm(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*tt&&(n+=te),{angle:n,distance:a}}function tb(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function tx(t,e){return(t-e+ti)%te-tt}function t_(t){return(t%te+te)%te}function ty(t,e,i,s){let a=t_(t),n=t_(e),r=t_(i),o=t_(n-a),l=t_(r-a),h=t_(a-n),d=t_(a-r);return a===n||a===r||s&&n===r||o>l&&h<d}function tv(t,e,i){return Math.max(e,Math.min(i,t))}function tM(t,e,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e-6;return t>=Math.min(e,i)-s&&t<=Math.max(e,i)+s}function tw(t,e,i){let s;i=i||(i=>t[i]<e);let a=t.length-1,n=0;for(;a-n>1;)i(s=n+a>>1)?n=s:a=s;return{lo:n,hi:a}}let tk=(t,e,i,s)=>tw(t,i,s?s=>{let a=t[s][e];return a<i||a===i&&t[s+1][e]===i}:s=>t[s][e]<i),tP=(t,e,i)=>tw(t,i,s=>t[s][e]>=i),tS=["push","pop","shift","splice","unshift"];function tD(t,e){let i=t._chartjs;if(!i)return;let s=i.listeners,a=s.indexOf(e);-1!==a&&s.splice(a,1),s.length>
10||(tS.forEach(e=>{delete t[e]}),delete t._chartjs)}function tC(t){let e=new Set(t);return e.size===t.length?t:Array.from(e)}let tO="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function tA(t,e){let i=[],s=!1;return function(){for(var a=arguments.length,n=Array(a),r=0;r<a;r++)n[r]=arguments[r];i=n,s||(s=!0,tO.call(window,()=>{s=!1,t.apply(e,i)}))}}let tL=t=>"start"===t?"left":"end"===t?"right":"center",tT=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function tE(t,e,i){let s=e.length,a=0,n=s;if(t._sorted){let{iScale:r,vScale:o,_parsed:l}=t,h=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,d=r.axis,{min:c,max:u,minDefined:f,maxDefined:g}=r.getUserBounds();if(f){if(a=Math.min(tk(l,d,c).lo,i?s:tk(e,d,r.getPixelForValue(c)).lo),h){let t=l.slice(0,a+1).reverse().findIndex(t=>!T(t[o.axis]));a-=Math.max(0,t)}a=tv(a,0,s-1)}if(g){let t=Math.max(tk(l,r.axis,u,!0).hi+1,i?0:tk(e,d,r.getPixelForValue(u),!0).hi+1);if(h){let e=l.slice(t-1).findIndex(t=>!T(t[o.axis]));t+=Math.max(0,e)}n=tv(t,a,s)-a}else n=s-a}return{start:a,count:n}}function tR(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}let tz=t=>0===t||1===t,tF=(t,e,i)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*te/i)),tV=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*te/i)+1,tI={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*tn)+1,easeOutSine:t=>Math.sin(t*tn),easeInOutSine:t=>-.5*(Math.cos(tt*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>tz(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(-Math.pow(2,-10*(2*t-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=>tz(t)?t:tF(t,.075,.3),easeOutElastic:t=>tz(t)?t:tV(t,.075,.3),easeInOutElastic:t=>tz(t)?t:t<.5?.5*tF(2*t,.1125,.45):.5+.5*tV(2*t-1,.1125,.45),easeInBack:t=>t*t*(2.70158*t-1.70158),easeOutBack:t=>(t-=1)*t*(2.70158*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-tI.easeOutBounce(1-t),easeOutBounce:t=>t<.36363636363636365?7.5625*t*t:t<.7272727272727273?7.5625*(t-=.5454545454545454)*t+.75:t<.9090909090909091?7.5625*(t-=.8181818181818182)*t+.9375:7.5625*(t-=.9545454545454546)*t+.984375,easeInOutBounce:t=>t<.5?.5*tI.easeInBounce(2*t):.5*tI.easeOutBounce(2*t-1)+.5};function tB(t){if(t&&"object"==typeof t){let e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function tW(t){return tB(t)?t:new O(t)}function tj(t){return tB(t)?t:new O(t).saturate(.5).darken(.1).hexString()}let tH=["x","y","borderWidth","radius","tension"],tN=["color","borderColor","backgroundColor"],tU=new Map;function t$(t,e,i){return(function(t,e){let i=t+JSON.stringify(e=e||{}),s=tU.get(i);return s||(s=new Intl.NumberFormat(t,e),tU.set(i,s)),s})(e,i).format(t)}let tY={values:t=>E(t)?t:""+t,numeric(t,e,i){let s;if(0===t)return"0";let a=this.chart.options.locale,n=t;if(i.length>1){var r,o;let e,a=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(a<1e-4||a>1e15)&&(s="scientific"),r=t,Math.abs(e=(o=i).length>3?o[2].value-o[1].value:o[1].value-o[0].value)>=1&&r!==Math.floor(r)&&(e=r-Math.floor(r)),n=e}let l=tl(Math.abs(n)),h=isNaN(l)?1:Math.max(Math.min(-1*Math.floor(l),20),0),d={notation:s,minimumFractionDigits:h,maximumFractionDigits:h};return Object.assign(d,this.options.ticks.format),t$(t,a,d)},logarithmic(t,e,i){return 0===t?"0":[1,2,3,5,10,15].includes(i[e].significand||t/Math.pow(10,Math.floor(tl(t))))||e>.8*i.length?tY.numeric.call(this,t,e,i):""}};var tX={formatters:tY};let tq=Object.create(null),tK=Object.create(null);function tJ(t,e){if(!e)return t;let i=e.split(".");for(let e=0,s=i.length;e<s;++e){let s=i[e];t=t[s]||(t[s]=Object.create(null))}return t}
1function tZ(t,e,i){return"string"==typeof e?$(tJ(t,e),i):$(tJ(t,""),e)}var tQ=new class{set(t,e){return tZ(this,t,e)}get(t){return tJ(this,t)}describe(t,e){return tZ(tK,t,e)}override(t,e){return tZ(tq,t,e)}route(t,e,i,s){let a=tJ(this,t),n=tJ(this,i),r="_"+e;Object.defineProperties(a,{[r]:{value:a[e],writable:!0},[e]:{enumerable:!0,get(){let t=this[r],e=n[s];return R(t)?Object.assign({},e,t):V(t,e)},set(t){this[r]=t}}})}apply(t){t.forEach(t=>t(this))}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=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>tj(e.backgroundColor),this.hoverBorderColor=(t,e)=>tj(e.borderColor),this.hoverColor=(t,e)=>tj(e.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={}
vendor: 4,625 bytes, line 1
1,this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(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:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:tN},numbers:{type:"number",properties:tH}}),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:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.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:tX.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:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function tG(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}function t0(t,e,i){let s=t.currentDevicePixelRatio,a=0!==i?Math.max(i/2,.5):0;return Math.round((e-a)*s)/s+a}function t1(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function t2(t,e,i,s){t5(t,e,i,s,null)}function t5(t,e,i,s,a){let n,r,o,l,h,d,c,u,f=e.pointStyle,g=e.rotation,p=e.radius,m=(g||0)*ta;if(f&&"object"==typeof f&&("[object HTMLImageElement]"===(n=f.toString())||"[object HTMLCanvasElement]"===n)){t.save(),t.translate(i,s),t.rotate(m),t.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),t.restore();return}if(!isNaN(p)&&!(p<=0)){switch(t.beginPath(),f){default:a?t.ellipse(i,s,a/2,p,0,0,te):t.arc(i,s,p,0,te),t.closePath();break;case"triangle":d=a?a/2:p,t.moveTo(i+Math.sin(m)*d,s-Math.cos(m)*p),m+=to,t.lineTo(i+Math.sin(m)*d,s-Math.cos(m)*p),m+=to,t.lineTo(i+Math.sin(m)*d,s-Math.cos(m)*p),t.closePath();break;case"rectRounded":h=.516*p,r=Math.cos(m+tr)*(l=p-h),c=Math.cos(m+tr)*(a?a/2-h:l),o=Math.sin(m+tr)*l,u=Math.sin(m+tr)*(a?a/2-h:l),t.arc(i-c,s-o,h,m-tt,m-tn),t.arc(i+u,s-r,h,m-tn,m),t.arc(i+c,s+o,h,m,m+tn),t.arc(i-u,s+r,h,m+tn,m+tt),t.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*p,d=a?a/2:l,t.rect(i-d,s-l,2*d,2*l);break}m+=tr;case"rectRot":c=Math.cos(m)*(a?a/2:p),r=Math.cos(m)*p,o=Math.sin(m)*p,u=Math.sin(m)*(a?a/2:p),t.moveTo(i-c,s-o),t.lineTo(i+u,s-r),t.lineTo(i+c,s+o),t.lineTo(i-u,s+r),t.closePath();break;case"crossRot":m+=tr;case"cross":c=Math.cos(m)*(a?a/2:p),r=Math.cos(m)*p,o=Math.sin(m)*p,u=Math.sin(m)*(a?a/2:p),t.moveTo(i-c,s-o),t.lineTo(i+c,s+o),t.moveTo(i+u,s-r),t.lineTo(i-u,s+r);break;case"star":c=Math.cos(m)*(a?a/2:p),r=Math.cos(m)*p,o=Math.sin(m)*p,u=Math.sin(m)*(a?a/2:p),t.moveTo(i-c,s-o),t.lineTo(i+c,s+o),t.moveTo(i+u,s-r),t.lineTo(i-u,s+r),m+=tr,c=Math.cos(m)*(a?a/2:p),r=Math.cos(m)*p,o=Math.sin(m)*p,u=Math.sin(m)*(a?a/2:p),t.moveTo(i-c,s-o),t.lineTo(i+c,s+o),t.moveTo(i+u,s-r),t.lineTo(i-u,s+r);break;case"line":r=a?a/2:Math.cos(m)*p,o=Math.sin(m)*p,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:p),s+Math.sin(m)*p);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function t3(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}function t8(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}
1function t4(t){t.restore()}function t6(t,e,i,s,a){if(!e)return t.lineTo(i.x,i.y);if("middle"===a){let s=(e.x+i.x)/2;t.lineTo(s,e.y),t.lineTo(s,i.y)}else"after"===a!=!!s?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function t7(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)}function t9(t,e,i,s,a){let n,r,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},l=E(e)?e:[e],h=o.strokeWidth>0&&""!==o.strokeColor;for(t.save(),t.font=a.string,o.translation&&t.translate(o.translation[0],o.translation[1]),T(o.rotation)||t.rotate(o.rotation),o.color&&(t.fillStyle=o.color),o.textAlign&&(t.textAlign=o.textAlign),o.textBaseline&&(t.textBaseline=o.textBaseline),n=0;n<l.length;++n)r=l[n],o.backdrop&&function(t,e){let i=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=i}(t,o.backdrop),h&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),T(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(r,i,s,o.maxWidth)),t.fillText(r,i,s,o.maxWidth),function(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,d=a.strikethrough?(l+h)/2:h;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=a.decorationWidth||2,t.moveTo(r,d),t.lineTo(o,d),t.stroke()}}(t,i,s,r,o),s+=Number(a.lineHeight);t.restore()}function et(t,e){let{x:i,y:s,w:a,h:n,radius:r}=e;t.arc(i+r.topLeft,s+r.topLeft,r.topLeft,1.5*tt,tt,!0),t.lineTo(i,s+n-r.bottomLeft),t.arc(i+r.bottomLeft,s+n-r.bottomLeft,r.bottomLeft,tt,tn,!0),t.lineTo(i+a-r.bottomRight,s+n),t.arc(i+a-r.bottomRight,s+n-r.bottomRight,r.bottomRight,tn,0,!0),t.lineTo(i+a,s+r.topRight),t.arc(i+a-r.topRight,s+r.topRight,r.topRight,0,-tn,!0),t.lineTo(i+r.topLeft,s)}let ee=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,ei=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/,es=t=>+t||0;function ea(t,e){let i={},s=R(e),a=s?Object.keys(e):e,n=R(t)?s?i=>V(t[i],t[e[i]]):e=>t[e]:()=>t;for(let t of a)i[t]=es(n(t));return i}function en(t){return ea(t,{top:"y",right:"x",bottom:"y",left:"x"})}function er(t){return ea(t,["topLeft","topRight","bottomLeft","bottomRight"])}function eo(t){let e=en(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function el(t,e){t=t||{},e=e||tQ.font;let i=V(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let s=V(t.style,e.style);s&&!(""+s).match(ei)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);let a={family:V(t.family,e.family),lineHeight:function(t,e){let i=(""+t).match(ee);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}(V(t.lineHeight,e.lineHeight),i),size:i,style:s,weight:V(t.weight,e.weight),string:""};return a.string=!a||T(a.size)||T(a.family)?null:(a.style?a.style+" ":"")+(a.weight?a.weight+" ":"")+a.size+"px "+a.family,a}function eh(t,e,i,s){let a,n,r,o=!0;for(a=0,n=t.length;a<n;++a)if(void 0!==(r=t[a])&&(void 0!==e&&"function"==typeof r&&(r=r(e),o=!1),void 0!==i&&E(r)&&(r=r[i%r.length],o=!1),void 0!==r))return s&&!o&&(s.cacheable=!1),r}function ed(t,e){return Object.assign(Object.create(t),e)}function ec(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[""],i=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>t[0],n=i||t;return void 0===s&&(s=ey("_fallback",t)),new Proxy({[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:n,_fallback:s,_getTarget:a,override:i=>ec([i,...t],e,n,s)},{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,s)=>em(i,s,()=>(function(t,e,i,s){let a;for(let n of e)if(void 0!==(a=ey(eg(n,t),i)))return ep(t,a)?ex(i,s,t,a):a})(s,e,t,i)),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>ev(t).includes(e),ownKeys:t=>ev(t),set(t,e,i){let s=t._storage||(t._storage=a());return t[e]=s[e]=i,delete t._keys,!0}})}function eu(t,e,i,s){return new Proxy({_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:ef(t,s),setContext:e=>eu(t,e,i,s),override:a=>eu(t.override(a),e,i,s)},{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>em(t,e,()=>
1(function(t,e,i){let{_proxy:s,_context:a,_subProxy:n,_descriptors:r}=t,o=s[e];return Q(o)&&r.isScriptable(e)&&(o=function(t,e,i,s){let{_proxy:a,_context:n,_subProxy:r,_stack:o}=i;if(o.has(t))throw Error("Recursion detected: "+Array.from(o).join("->")+"->"+t);o.add(t);let l=e(n,r||s);return o.delete(t),ep(t,l)&&(l=ex(a._scopes,a,t,l)),l}(e,o,t,i)),E(o)&&o.length&&(o=function(t,e,i,s){let{_proxy:a,_context:n,_subProxy:r,_descriptors:o}=i;if(void 0!==n.index&&s(t))return e[n.index%e.length];if(R(e[0])){let i=e,s=a._scopes.filter(t=>t!==i);for(let l of(e=[],i)){let i=ex(s,a,t,l);e.push(eu(i,n,r&&r[t],o))}}return e}(e,o,t,r.isIndexable)),ep(e,o)&&(o=eu(o,a,n&&n[e],r)),o})(t,e,i)),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,s)=>(t[i]=s,delete e[i],!0)})}function ef(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{scriptable:!0,indexable:!0},{_scriptable:i=e.scriptable,_indexable:s=e.indexable,_allKeys:a=e.allKeys}=t;return{allKeys:a,scriptable:i,indexable:s,isScriptable:Q(i)?i:()=>i,isIndexable:Q(s)?s:()=>s}}let eg=(t,e)=>t?t+J(e):e,ep=(t,e)=>R(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function em(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];let s=i();return t[e]=s,s}let eb=(t,e)=>!0===t?e:"string"==typeof t?K(e,t):void 0;function ex(t,e,i,s){var a;let n=e._rootScopes,r=(a=e._fallback,Q(a)?a(i,s):a),o=[...t,...n],l=new Set;l.add(s);let h=e_(l,o,i,r||i,s);return null!==h&&(void 0===r||r===i||null!==(h=e_(l,o,r,h,s)))&&ec(Array.from(l),[""],n,r,()=>(function(t,e,i){let s=t._getTarget();e in s||(s[e]={});let a=s[e];return E(a)&&R(i)?i:a||{}})(e,i,s))}function e_(t,e,i,s,a){for(;i;)i=function(t,e,i,s,a){for(let r of e){let e=eb(i,r);if(e){var n;t.add(e);let r=(n=e._fallback,Q(n)?n(i,a):n);if(void 0!==r&&r!==i&&r!==s)return r}else if(!1===e&&void 0!==s&&i!==s)return null}return!1}(t,e,i,s,a);return i}function ey(t,e){for(let i of e){if(!i)continue;let e=i[t];if(void 0!==e)return e}}function ev(t){let e=t._keys;return e||(e=t._keys=function(t){let e=new Set;for(let i of t)for(let t of Object.keys(i).filter(t=>!t.startsWith("_")))e.add(t);return Array.from(e)}(t._scopes)),e}function eM(t,e,i,s){let a,n,r,{iScale:o}=t,{key:l="r"}=this._parsing,h=Array(s);for(a=0;a<s;++a)r=e[n=a+i],h[a]={r:o.parse(K(r,l),n)};return h}let ew=Number.EPSILON||1e-14,ek=(t,e)=>e<t.length&&!t[e].skip&&t[e],eP=t=>"x"===t?"y":"x";function eS(t,e,i){return Math.max(Math.min(t,i),e)}function eD(){return"undefined"!=typeof window&&"undefined"!=typeof document}function eC(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function eO(t,e,i){let s;return"string"==typeof t?(s=parseInt(t,10),-1!==t.indexOf("%")&&(s=s/100*e.parentNode[i])):s=t,s}let eA=t=>t.ownerDocument.defaultView.getComputedStyle(t,null),eL=["top","right","bottom","left"];function eT(t,e,i){let s={};i=i?"-"+i:"";for(let a=0;a<4;a++){let n=eL[a];s[n]=parseFloat(t[e+"-"+n+i])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}function eE(t,e){if("native"in t)return t;let{canvas:i,currentDevicePixelRatio:s}=e,a=eA(i),n="border-box"===a.boxSizing,r=eT(a,"padding"),o=eT(a,"border","width"),{x:l,y:h,box:d}=function(t,e){let i,s,a,n=t.touches,r=n&&n.length?n[0]:t,{offsetX:o,offsetY:l}=r,h=!1;if(a=t.target,(o>0||l>0)&&(!a||!a.shadowRoot))i=o,s=l;else{let t=e.getBoundingClientRect();i=r.clientX-t.left,s=r.clientY-t.top,h=!0}return{x:i,y:s,box:h}}(t,i),c=r.left+(d&&o.left),u=r.top+(d&&o.top),{width:f,height:g}=e;return n&&(f-=r.width+o.width,g-=r.height+o.height),{x:Math.round((l-c)/f*i.width/s),y:Math.round((h-u)/g*i.height/s)}}let eR=t=>Math.round(10*t)/10;function ez(t,e,i){let s=e||1,a=eR(t.height*s),n=eR(t.width*s);t.height=eR(t.height),t.width=eR(t.width);let r=t.canvas;return r.style&&(i||!r.style.height&&!r.style.width)&&(r.style.height="".concat(t.height,"px"),r.style.width="".concat(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,
10,0,s,0,0),!0)}let eF=function(){let t=!1;try{let e={get passive(){return t=!0,!1}};eD()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function eV(t,e){let i=eA(t).getPropertyValue(e),s=i&&i.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function eI(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function eB(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:"middle"===s?i<.5?t.y:e.y:"after"===s?i<1?t.y:e.y:i>0?e.y:t.y}}function eW(t,e,i,s){let a={x:t.cp2x,y:t.cp2y},n={x:e.cp1x,y:e.cp1y},r=eI(t,a,i),o=eI(a,n,i),l=eI(n,e,i),h=eI(r,o,i),d=eI(o,l,i);return eI(h,d,i)}function ej(t,e,i){var s;return t?(s=i,{x:t=>e+e+s-t,setWidth(t){s=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function eH(t,e){let i,s;("ltr"===e||"rtl"===e)&&(s=[(i=t.canvas.style).getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=s)}function eN(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function eU(t){return"angle"===t?{between:ty,compare:tx,normalize:t_}:{between:tM,compare:(t,e)=>t-e,normalize:t=>t}}function e$(t){let{start:e,end:i,count:s,loop:a,style:n}=t;return{start:e%s,end:i%s,loop:a&&(i-e+1)%s==0,style:n}}function eY(t,e,i){let s,a,n;if(!i)return[t];let{property:r,start:o,end:l}=i,h=e.length,{compare:d,between:c,normalize:u}=eU(r),{start:f,end:g,loop:p,style:m}=function(t,e,i){let s,{property:a,start:n,end:r}=i,{between:o,normalize:l}=eU(a),h=e.length,{start:d,end:c,loop:u}=t;if(u){for(d+=h,c+=h,s=0;s<h&&o(l(e[d%h][a]),n,r);++s)d--,c--;d%=h,c%=h}return c<d&&(c+=h),{start:d,end:c,loop:u,style:t.style}}(t,e,i),b=[],x=!1,_=null,y=()=>x||c(o,n,s)&&0!==d(o,n),v=()=>!x||0===d(l,s)||c(l,n,s);for(let t=f,i=f;t<=g;++t)(a=e[t%h]).skip||(s=u(a[r]))!==n&&(x=c(s,o,l),null===_&&y()&&(_=0===d(s,o)?t:i),null!==_&&v()&&(b.push(e$({start:_,end:t,loop:p,count:h,style:m})),_=null),i=t,n=s);return null!==_&&b.push(e$({start:_,end:g,loop:p,count:h,style:m})),b}function eX(t,e){let i=[],s=t.segments;for(let a=0;a<s.length;a++){let n=eY(s[a],t.points,e);n.length&&i.push(...n)}return i}function eq(t,e,i,s){return s&&s.setContext&&i?function(t,e,i,s){let a=t._chart.getContext(),n=eK(t.options),{_datasetIndex:r,options:{spanGaps:o}}=t,l=i.length,h=[],d=n,c=e[0].start,u=c;function f(t,e,s,a){let n=o?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=n;for(;i[e%l].skip;)e+=n;t%l!=e%l&&(h.push({start:t%l,end:e%l,loop:s,style:a}),d=a,c=e%l)}}for(let t of e){let e,n=i[(c=o?c:t.start)%l];for(u=c+1;u<=t.end;u++){let o=i[u%l];(function(t,e){if(!e)return!1;let i=[],s=function(t,e){return tB(e)?(i.includes(e)||i.push(e),i.indexOf(e)):e};return JSON.stringify(t,s)!==JSON.stringify(e,s)})(e=eK(s.setContext(ed(a,{type:"segment",p0:n,p1:o,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:r}))),d)&&f(c,u-1,t.loop,d),n=o,d=e}c<u-1&&f(c,u-1,t.loop,d)}return h}(t,e,i,s):e}function eK(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function eJ(t,e,i){return t.options.clip?t[i]:e[i]}function eZ(t,e){let i=e._clip;if(i.disabled)return!1;let s=function(t,e){let{xScale:i,yScale:s}=t;return i&&s?{left:eJ(i,e,"left"),right:eJ(i,e,"right"),top:eJ(s,e,"top"),bottom:eJ(s,e,"bottom")}:e}(e,t.chartArea);return{left:!1===i.left?0:s.left-(!0===i.left?0:i.left),right:!1===i.right?t.width:s.right+(!0===i.right?0:i.right),top:!1===i.top?0:s.top-(!0===i.top?0:i.top),bottom:!1===i.bottom?t.height:s.bottom+(!0===i.bottom?0:i.bottom)}}var eQ=new class{_notify(t,e,i,s){let a=e.listeners[s],n=e.duration;a.forEach(s=>s({chart:t,initial:e.initial,numSteps:n,currentStep:Math.min(i-e.start,n)}))}_refresh(){this._request||(this._running=!0,this._request=tO.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now(),e=0;
1this._charts.forEach((i,s)=>{let a;if(!i.running||!i.items.length)return;let n=i.items,r=n.length-1,o=!1;for(;r>=0;--r)(a=n[r])._active?(a._total>i.duration&&(i.duration=a._total),a.tick(t),o=!0):(n[r]=n[n.length-1],n.pop());o&&(s.draw(),this._notify(s,i,t,"progress")),n.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=n.length}),this._lastDate=t,0===e&&(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((t,e)=>Math.max(t,e._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)}constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}};let eG="transparent",e0={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){let s=tW(t||eG),a=s.valid&&tW(e||eG);return a&&a.valid?a.mix(s,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class e1{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=eh([t.to,e,s,t.from]),this._from=eh([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){let e,i=t-this._start,s=this._duration,a=this._prop,n=this._from,r=this._loop,o=this._to;if(this._active=n!==o&&(r||i<s),!this._active){this._target[a]=o,this._notify(!0);return}if(i<0){this._target[a]=n;return}e=i/s%2,e=r&&e>1?2-e:e,e=this._easing(Math.min(1,Math.max(0,e))),this._target[a]=this._fn(n,o,e)}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 t=0;t<i.length;t++)i[t][e]()}constructor(t,e,i,s){let a=e[i];s=eh([t.to,s,a,t.from]);let n=eh([t.from,a,s]);this._active=!0,this._fn=t.fn||e0[t.type||typeof n],this._easing=tI[t.easing]||tI.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}}class e2{configure(t){if(!R(t))return;let e=Object.keys(tQ.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{let a=t[s];if(!R(a))return;let n={};for(let t of e)n[t]=a[t];(E(a.properties)&&a.properties||[s]).forEach(t=>{t!==s&&i.has(t)||i.set(t,n)})})}_animateOptions(t,e){let i=e.options,s=function(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}(t,i);if(!s)return[];let a=this._createAnimations(s,i);return i.$shared&&(function(t,e){let i=[],s=Object.keys(e);for(let e=0;e<s.length;e++){let a=t[s[e]];a&&a.active()&&i.push(a.wait())}return Promise.all(i)})(t.options.$animations,i).then(()=>{t.options=i},()=>{}),a}_createAnimations(t,e){let i,s=this._properties,a=[],n=t.$animations||(t.$animations={}),r=Object.keys(e),o=Date.now();for(i=r.length-1;i>=0;--i){let l=r[i];if("$"===l.charAt(0))continue;if("options"===l){a.push(...this._animateOptions(t,e));continue}let h=e[l],d=n[l],c=s.get(l);if(d)if(c&&d.active()){d.update(c,h,o);continue}else d.cancel();if(!c||!c.duration){t[l]=h;continue}n[l]=d=new e1(c,t,l,h),a.push(d)}return a}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);let i=this._createAnimations(t,e);if(i.length)return eQ.add(this._chart,i),!0}constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}}function e5(t,e){let i=t&&t.options||{},s=i.reverse,a=void 0===i.min?e:0,n=void 0===i.max?e:0;return{start:s?n:a,end:s?a:n}}function e3(t,e){let i,s,a=[],n=t._getSortedDatasetMetas(e);for(i=0,s=n.length;i<s;++i)a.push(n[i].index);return a}function e8(t,e,i){let s,a,n,r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},l=t.keys,h="single"===o.mode;if(null===e)return;let d=!1;for(s=0,a=l.length;s<a;
1++s){if((n=+l[s])===i){if(d=!0,o.all)continue;break}z(r=t.values[n])&&(h||0===e||th(e)===th(r))&&(e+=r)}return d||o.all?e:0}function e4(t,e){let i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function e6(t,e,i,s){for(let a of e.getMatchingVisibleMetas(s).reverse()){let e=t[a.index];if(i&&e>0||!i&&e<0)return a.index}return null}function e7(t,e){let i,{chart:s,_cachedMeta:a}=t,n=s._stacks||(s._stacks={}),{iScale:r,vScale:o,index:l}=a,h=r.axis,d=o.axis,c="".concat(r.id,".").concat(o.id,".").concat(a.stack||a.type),u=e.length;for(let t=0;t<u;++t){let s=e[t],{[h]:r,[d]:u}=s;(i=(s._stacks||(s._stacks={}))[d]=function(t,e,i){let s=t[e]||(t[e]={});return s[i]||(s[i]={})}(n,c,r))[l]=u,i._top=e6(i,o,!0,a.type),i._bottom=e6(i,o,!1,a.type),(i._visualValues||(i._visualValues={}))[l]=u}}function e9(t,e){let i=t.scales;return Object.keys(i).filter(t=>i[t].axis===e).shift()}function it(t,e){let i=t.controller.index,s=t.vScale&&t.vScale.axis;if(s)for(let a of e=e||t._parsed){let t=a._stacks;if(!t||void 0===t[s]||void 0===t[s][i])return;delete t[s][i],void 0!==t[s]._visualValues&&void 0!==t[s]._visualValues[i]&&delete t[s]._visualValues[i]}}let ie=t=>"reset"===t||"none"===t,ii=(t,e)=>e?t:Object.assign({},t);class is{initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=e4(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&&it(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=(t,e,i,s)=>"x"===t?e:"r"===t?s:i,a=e.xAxisID=V(i.xAxisID,e9(t,"x")),n=e.yAxisID=V(i.yAxisID,e9(t,"y")),r=e.rAxisID=V(i.rAxisID,e9(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&&tD(this._data,this),t._stacked&&it(t)}_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(R(e)){let t=this._cachedMeta;this._data=function(t,e){let i,s,a,{iScale:n,vScale:r}=e,o="x"===n.axis?"x":"y",l="x"===r.axis?"x":"y",h=Object.keys(t),d=Array(h.length);for(i=0,s=h.length;i<s;++i)a=h[i],d[i]={[o]:a,[l]:t[a]};return d}(e,t)}else if(i!==e){if(i){tD(i,this);let t=this._cachedMeta;it(t),t._parsed=[]}e&&Object.isExtensible(e)&&function(t,e){if(t._chartjs)return t._chartjs.listeners.push(e);Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),tS.forEach(e=>{let i="_onData"+J(e),s=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(){for(var e=arguments.length,a=Array(e),n=0;n<e;n++)a[n]=arguments[n];let r=s.apply(this,a);return t._chartjs.listeners.forEach(t=>{"function"==typeof t[i]&&t[i](...a)}),r}})})}(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=e4(e.vScale,e),e.stack!==i.stack&&(s=!0,it(e),e.stack=i.stack),this._resyncElements(t),(s||a!==e._stacked)&&(e7(this,e._parsed),e._stacked=e4(e.vScale,e))}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 i,s,a,{_cachedMeta:n,_data:r}=this,{iScale:o,_stacked:l}=n,h=o.axis,d=0===t&&e===r.length||n._sorted,c=t>0&&n._parsed[t-1];if(!1===this._parsing)n._parsed=r,n._sorted=!0,a=r;else{a=E(r[t])?this.parseArrayData(n,r,t,e):R(r[t])?this.parseObjectData(n,r,t,e):this.parsePrimitiveData(n,r,t,e);let o=()=>null===s[h]||c&&s[h]<c[h];for(i=0;i<e;++i)n._parsed[i+t]=s=a[i],d&&(o()&&(d=!1),c=s);n._sorted=d}l&&e7(this,a)}
1parsePrimitiveData(t,e,i,s){let a,n,{iScale:r,vScale:o}=t,l=r.axis,h=o.axis,d=r.getLabels(),c=r===o,u=Array(s);for(a=0;a<s;++a)n=a+i,u[a]={[l]:c||r.parse(d[n],n),[h]:o.parse(e[n],n)};return u}parseArrayData(t,e,i,s){let a,n,r,{xScale:o,yScale:l}=t,h=Array(s);for(a=0;a<s;++a)r=e[n=a+i],h[a]={x:o.parse(r[0],n),y:l.parse(r[1],n)};return h}parseObjectData(t,e,i,s){let a,n,r,{xScale:o,yScale:l}=t,{xAxisKey:h="x",yAxisKey:d="y"}=this._parsing,c=Array(s);for(a=0;a<s;++a)r=e[n=a+i],c[a]={x:o.parse(K(r,h),n),y:l.parse(K(r,d),n)};return c}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];return e8({keys:e3(s,!0),values:e._stacks[t.axis]._visualValues},n,a.index,{mode:i})}updateRangeFromParsed(t,e,i,s){let a=i[e.axis],n=null===a?NaN:a,r=s&&i._stacks[e.axis];s&&r&&(s.values=r,n=e8(s,a,this._cachedMeta.index)),t.min=Math.min(t.min,n),t.max=Math.max(t.max,n)}getMinMax(t,e){let i,s,a,n=this._cachedMeta,r=n._parsed,o=n._sorted&&t===n.iScale,l=r.length,h=this._getOtherScale(t),d=(a=this.chart,e&&!n.hidden&&n._stacked&&{keys:e3(a,!0),values:null}),c={min:1/0,max:-1/0},{min:u,max:f}=function(t){let{min:e,max:i,minDefined:s,maxDefined:a}=t.getUserBounds();return{min:s?e:-1/0,max:a?i:1/0}}(h);function g(){let e=(s=r[i])[h.axis];return!z(s[t.axis])||u>e||f<e}for(i=0;i<l&&(g()||(this.updateRangeFromParsed(c,t,s,d),!o));++i);if(o){for(i=l-1;i>=0;--i)if(!g()){this.updateRangeFromParsed(c,t,s,d);break}}return c}getAllParsedValues(t){let e,i,s,a=this._cachedMeta._parsed,n=[];for(e=0,i=a.length;e<i;++e)z(s=a[e][t.axis])&&n.push(s);return n}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){var e;let i,s,a,n,r=this._cachedMeta;this.update(t||"default"),R(e=V(this.options.clip,function(t,e,i){if(!1===i)return!1;let s=e5(t,i),a=e5(e,i);return{top:a.end,right:s.end,bottom:a.start,left:s.start}}(r.xScale,r.yScale,this.getMaxOverflow())))?(i=e.top,s=e.right,a=e.bottom,n=e.left):i=s=a=n=e,r._clip={top:i,right:s,bottom:a,left:n,disabled:!1===e}}update(t){}draw(){let t,e=this._ctx,i=this.chart,s=this._cachedMeta,a=s.data||[],n=i.chartArea,r=[],o=this._drawStart||0,l=this._drawCount||a.length-o,h=this.options.drawActiveElementsOnTop;for(s.dataset&&s.dataset.draw(e,n,o,l),t=o;t<o+l;++t){let i=a[t];i.hidden||(i.active&&h?r.push(i):i.draw(e,n))}for(t=0;t<r.length;++t)r[t].draw(e,n)}getStyle(t,e){let i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){var s,a;let n,r=this.getDataset();if(t>=0&&t<this._cachedMeta.data.length){let e=this._cachedMeta.data[t];(n=e.$context||(s=this.getContext(),e.$context=ed(s,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"}))).parsed=this.getParsed(t),n.raw=r.data[t],n.index=n.dataIndex=t}else(n=this.$context||(this.$context=ed(this.chart.getContext(),{active:!1,dataset:void 0,datasetIndex:a=this.index,index:a,mode:"default",type:"dataset"}))).dataset=r,n.index=n.datasetIndex=this.index;return n.active=!!e,n.mode=i,n}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",i=arguments.length>2?arguments[2]:void 0,s="active"===e,a=this._cachedDataOpts,n=t+"-"+e,r=a[n],o=this.enableOptionSharing&&Z(i);if(r)return ii(r,o);let l=this.chart.config,h=l.datasetElementScopeKeys(this._type,t),d=l.getOptionScopes(this.getDataset(),h),c=Object.keys(tQ.elements[t]),u=()=>this.getContext(i,s,e),f=l.resolveNamedOptions(d,c,u,s?["".concat(t,"Hover"),"hover",t,""]:[t,""]);return f.$shared&&(f.$shared=o,a[n]=Object.freeze(ii(f,o))),f}_resolveAnimations(t,e,i){let s,a=this.chart,n=this._cachedDataOpts,r="animation-".concat(e),o=n[r];if(o)return o;if(!1!==a.options.animation){let a=this.chart.config,n=a.datasetAnimationScopeKeys(this._type,e),r=a.getOptionScopes(this.getDataset(),n);s=a.createResolver(r,this.getContext(t,i,e))}let l=new e2(a,s&&s.animations);return s&&s._cacheable&&(n[r]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||ie(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){ie(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!ie(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;let a=this.getStyle(e,s);
1this._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[t,e,i]of this._syncList)this[t](e,i);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){let i,s=!(arguments.length>2)||void 0===arguments[2]||arguments[2],a=this._cachedMeta,n=a.data,r=t+e,o=t=>{for(t.length+=e,i=t.length-1;i>=r;i--)t[i]=t[i-e]};for(o(n),i=t;i<r;++i)n[i]=new this.dataElementType;this._parsing&&o(a._parsed),this.parse(t,e),s&&this.updateElements(n,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&&it(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])}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()}}function ia(t,e,i,s){return E(t)?!function(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}}(t,e,i,s):e[i.axis]=i.parse(t,s),e}function ir(t,e,i,s){let a,n,r,o,l=t.iScale,h=t.vScale,d=l.getLabels(),c=l===h,u=[];for(a=i,n=i+s;a<n;++a)o=e[a],(r={})[l.axis]=c||l.parse(d[a],a),u.push(ia(o,r,h,a));return u}function io(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function il(t,e,i,s){var a,n,r;return s?ih((a=t,n=e,r=i,t=a===n?r:a===r?n:a),i,e):ih(t,e,i)}function ih(t,e,i){return"start"===t?e:"end"===t?i:t}i(is,"defaults",{}),i(is,"datasetElementType",null),i(is,"dataElementType",null);class id extends is{parsePrimitiveData(t,e,i,s){return ir(t,e,i,s)}parseArrayData(t,e,i,s){return ir(t,e,i,s)}parseObjectData(t,e,i,s){let a,n,r,o,{iScale:l,vScale:h}=t,{xAxisKey:d="x",yAxisKey:c="y"}=this._parsing,u="x"===l.axis?d:c,f="x"===h.axis?d:c,g=[];for(a=i,n=i+s;a<n;++a)o=e[a],(r={})[l.axis]=l.parse(K(o,u),a),g.push(ia(K(o,f),r,h,a));return g}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{iScale:e,vScale:i}=this._cachedMeta,s=this.getParsed(t),a=s._custom,n=io(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(s[i.axis]);return{label:""+e.getLabelForValue(s[e.axis]),value:n}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.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="reset"===s,{index:n,_cachedMeta:{vScale:r}}=this,o=r.getBasePixel(),l=r.isHorizontal(),h=this._getRuler(),{sharedOptions:d,includeOptions:c}=this._getSharedOptions(e,s);for(let u=e;u<e+i;u++){let e=this.getParsed(u),i=a||T(e[r.axis])?{base:o,head:o}:this._calculateBarValuePixels(u),f=this._calculateBarIndexPixels(u,h),g=(e._stacks||{})[r.axis],p={horizontal:l,base:i.base,enableBorderRadius:!g||io(e._custom)||n===g._top||n===g._bottom,x:l?i.head:f.center,y:l?f.center:i.head,height:l?f.size:Math.abs(i.size),width:l?Math.abs(i.size):f.size};c&&(p.options=d||this.resolveDataElementOptions(u,t[u].active?"active":s));let m=p.options||t[u].options;
1!function(t,e,i,s){let a,n,r,o,l,h=e.borderSkipped,d={};if(!h){t.borderSkipped=d;return}if(!0===h){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}let{start:c,end:u,reverse:f,top:g,bottom:p}=(t.horizontal?(a=t.base>t.x,n="left",r="right"):(a=t.base<t.y,n="bottom",r="top"),a?(o="end",l="start"):(o="start",l="end"),{start:n,end:r,reverse:a,top:o,bottom:l});"middle"===h&&i&&(t.enableBorderRadius=!0,(i._top||0)===s?h=g:(i._bottom||0)===s?h=p:(d[il(p,c,u,f)]=!0,h=g)),d[il(h,c,u,f)]=!0,t.borderSkipped=d}(p,m,g,n),function(t,e,i){let{inflateAmount:s}=e;t.inflateAmount="auto"===s?.33*(1===i):s}(p,m,h.ratio),this.updateElement(t[u],u,p,s)}}_getStacks(t,e){let{iScale:i}=this._cachedMeta,s=i.getMatchingVisibleMetas(this._type).filter(t=>t.controller.options.grouped),a=i.options.stacked,n=[],r=this._cachedMeta.controller.getParsed(e),o=r&&r[i.axis],l=t=>{let e=t._parsed.find(t=>t[i.axis]===o),s=e&&e[t.vScale.axis];if(T(s)||isNaN(s))return!0};for(let i of s)if(!(void 0!==e&&l(i))&&((!1===a||-1===n.indexOf(i.stack)||void 0===a&&void 0===i.stack)&&n.push(i.stack),i.index===t))break;return n.length||n.push(void 0),n}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){let t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(i=>t[i].axis===e).shift()}_getAxis(){let t={},e=this.getFirstScaleIdForIndexAxis();for(let i of this.chart.data.datasets)t[V("x"===this.chart.options.indexAxis?i.xAxisID:i.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,i){let s=this._getStacks(t,i),a=void 0!==e?s.indexOf(e):-1;return -1===a?s.length-1:a}_getRuler(){let t,e,i=this.options,s=this._cachedMeta,a=s.iScale,n=[];for(t=0,e=s.data.length;t<e;++t)n.push(a.getPixelForValue(this.getParsed(t)[a.axis],t));let r=i.barThickness;return{min:r||function(t){let e,i,s,a,n=t.iScale,r=function(t,e){if(!t._cache.$bar){let i=t.getMatchingVisibleMetas(e),s=[];for(let e=0,a=i.length;e<a;e++)s=s.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=tC(s.sort((t,e)=>t-e))}return t._cache.$bar}(n,t.type),o=n._length,l=()=>{32767!==s&&-32768!==s&&(Z(a)&&(o=Math.min(o,Math.abs(s-a)||o)),a=s)};for(e=0,i=r.length;e<i;++e)s=n.getPixelForValue(r[e]),l();for(e=0,a=void 0,i=n.ticks.length;e<i;++e)s=n.getPixelForTick(e),l();return o}(s),pixels:n,start:a._startPixel,end:a._endPixel,stackCount:this._getStackCount(),scale:a,grouped:i.grouped,ratio:r?1:i.categoryPercentage*i.barPercentage}}_calculateBarValuePixels(t){let e,i,{_cachedMeta:{vScale:s,_stacked:a,index:n},options:{base:r,minBarLength:o}}=this,l=r||0,h=this.getParsed(t),d=h._custom,c=io(d),u=h[s.axis],f=0,g=a?this.applyStack(s,h,a):u;g!==u&&(f=g-u,g=u),c&&(u=d.barStart,g=d.barEnd-d.barStart,0!==u&&th(u)!==th(d.barEnd)&&(f=0),f+=u);let p=T(r)||c?f:r,m=s.getPixelForValue(p);if(Math.abs(i=(e=this.chart.getDataVisibility(t)?s.getPixelForValue(f+g):m)-m)<o){var b;i=(0!==(b=i)?th(b):(s.isHorizontal()?1:-1)*(s.min>=l?1:-1))*o,u===l&&(m-=i/2);let t=s.getPixelForDecimal(0),r=s.getPixelForDecimal(1),d=Math.min(t,r);e=(m=Math.max(Math.min(m,Math.max(t,r)),d))+i,a&&!c&&(h._stacks[s.axis]._visualValues[n]=s.getValueForPixel(e)-s.getValueForPixel(m))}if(m===s.getPixelForValue(l)){let t=th(i)*s.getLineWidthForValue(l)/2;m+=t,i-=t}return{size:i,base:m,head:e,center:e+i/2}}_calculateBarIndexPixels(t,e){let i,s,a=e.scale,n=this.options,r=n.skipNull,o=V(n.maxBarThickness,1/0),l=this._getAxisCount();if(e.grouped){let a=r?this._getStackCount(t):e.stackCount,h="flex"===n.barThickness?function(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;null===r&&(r=n-(null===o?e.end-e.start:o-n)),null===o&&(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}}(t,e,n,a*l):function(t,e,i,s){let a,n,r=i.barThickness;return T(r)?(a=e.min*i.categoryPercentage,n=i.barPercentage):(a=r*s,n=1),{chunk:a/s,ratio:n,start:e.pixels[t]-a/2}}(t,e,n,a*l),d="x"===this.chart.options.indexAxis?this.getDataset().xAxisID:this.getDataset().yAxisID,c=this._getAxis().indexOf(V(d,this.getFirstScaleIdForIndexAxis())),u=this._getStackIndex(this.index,this._cachedMeta.stack,r?t:void 0)+c;i=h.start+h.chunk*u+h.chunk/2,s=Math.min(o,h.chunk*h.ratio)}else i=a.getPixelForValue(this.getParsed(t)[a.axis],t),s=Math.min(o,e.min*e.ratio);return{base:i-s/2,head:i+s/2,center:i,size:s}}draw(){let t=this._cachedMeta,e=t.vScale,i=t.data,s=i.length,a=0;for(;a<s;++a)null===this.getParsed(a)[e.axis]||i[a].hidden||i[a].draw(this._ctx)}}i(id,"id","bar"),i(id,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),i(id,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class ic extends is{initialize(){this.enableOptionSharing=!0,super.initialize()}
1parsePrimitiveData(t,e,i,s){let a=super.parsePrimitiveData(t,e,i,s);for(let t=0;t<a.length;t++)a[t]._custom=this.resolveDataElementOptions(t+i).radius;return a}parseArrayData(t,e,i,s){let a=super.parseArrayData(t,e,i,s);for(let t=0;t<a.length;t++){let s=e[i+t];a[t]._custom=V(s[2],this.resolveDataElementOptions(t+i).radius)}return a}parseObjectData(t,e,i,s){let a=super.parseObjectData(t,e,i,s);for(let t=0;t<a.length;t++){let s=e[i+t];a[t]._custom=V(s&&s.r&&+s.r,this.resolveDataElementOptions(t+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="reset"===s,{iScale:n,vScale:r}=this._cachedMeta,{sharedOptions:o,includeOptions:l}=this._getSharedOptions(e,s),h=n.axis,d=r.axis;for(let c=e;c<e+i;c++){let e=t[c],i=!a&&this.getParsed(c),u={},f=u[h]=a?n.getPixelForDecimal(.5):n.getPixelForValue(i[h]),g=u[d]=a?r.getBasePixel():r.getPixelForValue(i[d]);u.skip=isNaN(f)||isNaN(g),l&&(u.options=o||this.resolveDataElementOptions(c,e.active?"active":s),a&&(u.options.radius=0)),this.updateElement(e,c,u,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"active"!==e&&(s.radius=0),s.radius+=V(i&&i._custom,a),s}}i(ic,"id","bubble"),i(ic,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),i(ic,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});class iu extends is{linkScales(){}parse(t,e){let i=this.getDataset().data,s=this._cachedMeta;if(!1===this._parsing)s._parsed=i;else{let a,n,r=t=>+i[t];if(R(i[t])){let{key:t="value"}=this._parsing;r=e=>+K(i[e],t)}for(a=t,n=t+e;a<n;++a)s._parsed[a]=r(a)}}_getRotation(){return tg(this.options.rotation-90)}_getCircumference(){return tg(this.options.circumference)}_getRotationExtents(){let t=te,e=-te;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,{chartArea:i}=this.chart,s=this._cachedMeta,a=s.data,n=this.getMaxBorderWidth()+this.getMaxOffset(a
1)+this.options.spacing,r=Math.max((Math.min(i.width,i.height)-n)/2,0),o=Math.min((e=this.options.cutout,"string"==typeof e&&e.endsWith("%")?parseFloat(e)/100:e/r),1),l=this._getRingWeight(this.index),{circumference:h,rotation:d}=this._getRotationExtents(),{ratioX:c,ratioY:u,offsetX:f,offsetY:g}=function(t,e,i){let s=1,a=1,n=0,r=0;if(e<te){let o=t+e,l=Math.cos(t),h=Math.sin(t),d=Math.cos(o),c=Math.sin(o),u=(e,s,a)=>ty(e,t,o,!0)?1:Math.max(s,s*i,a,a*i),f=(e,s,a)=>ty(e,t,o,!0)?-1:Math.min(s,s*i,a,a*i),g=u(0,l,d),p=u(tn,h,c),m=f(tt,l,d),b=f(tt+tn,h,c);s=(g-m)/2,a=(p-b)/2,n=-(g+m)/2,r=-(p+b)/2}return{ratioX:s,ratioY:a,offsetX:n,offsetY:r}}(d,h,o),p=Math.max(Math.min((i.width-n)/c,(i.height-n)/u)/2,0),m=I(this.options.radius,p),b=Math.max(m*o,0),x=(m-b)/this._getVisibleDatasetWeightTotal();this.offsetX=f*m,this.offsetY=g*m,s.total=this.calculateTotal(),this.outerRadius=m-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*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)||null===s._parsed[t]||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*a/te)}updateElements(t,e,i,s){let a,n="reset"===s,r=this.chart,o=r.chartArea,l=r.options.animation,h=(o.left+o.right)/2,d=(o.top+o.bottom)/2,c=n&&l.animateScale,u=c?0:this.innerRadius,f=c?0:this.outerRadius,{sharedOptions:g,includeOptions:p}=this._getSharedOptions(e,s),m=this._getRotation();for(a=0;a<e;++a)m+=this._circumference(a,n);for(a=e;a<e+i;++a){let e=this._circumference(a,n),i=t[a],r={x:h+this.offsetX,y:d+this.offsetY,startAngle:m,endAngle:m+e,circumference:e,outerRadius:f,innerRadius:u};p&&(r.options=g||this.resolveDataElementOptions(a,i.active?"active":s)),m+=e,this.updateElement(i,a,r,s)}}calculateTotal(){let t,e=this._cachedMeta,i=e.data,s=0;for(t=0;t<i.length;t++){let a=e._parsed[t];null!==a&&!isNaN(a)&&this.chart.getDataVisibility(t)&&!i[t].hidden&&(s+=Math.abs(a))}return s}calculateCircumference(t){let e=this._cachedMeta.total;return e>0&&!isNaN(t)?Math.abs(t)/e*te:0}getLabelAndValue(t){let e=this._cachedMeta,i=this.chart,s=i.data.labels||[],a=t$(e._parsed[t],i.options.locale);return{label:s[t]||"",value:a}}getMaxBorderWidth(t){let e,i,s,a,n,r=0,o=this.chart;if(!t){for(e=0,i=o.data.datasets.length;e<i;++e)if(o.isDatasetVisible(e)){t=(s=o.getDatasetMeta(e)).data,a=s.controller;break}}if(!t)return 0;for(e=0,i=t.length;e<i;++e)"inner"!==(n=a.resolveDataElementOptions(e)).borderAlign&&(r=Math.max(r,n.borderWidth||0,n.hoverBorderWidth||0));return r}getMaxOffset(t){let e=0;for(let i=0,s=t.length;i<s;++i){let t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.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(V(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}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}}i(iu,"id","doughnut"),i(iu,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),i(iu,"descriptors",{_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),i(iu,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data,{labels:{pointStyle:i,textAlign:s,color:a,useBorderRadius:n,borderRadius:r}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map((e,o)=>{let l=t.getDatasetMeta(0).controller.getStyle(o);return{text:e,fillStyle:l.backgroundColor,fontColor:a,hidden:!t.getDataVisibility(o),lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:l.borderWidth,strokeStyle:l.borderColor,textAlign:s,pointStyle:i,borderRadius:n&&(r||l.borderRadius),index:o}}):[]}}
1,onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}});class ig extends is{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}=tE(e,s,n);this._drawStart=r,this._drawCount=o,tR(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="reset"===s,{iScale:n,vScale:r,_stacked:o,_dataset:l}=this._cachedMeta,{sharedOptions:h,includeOptions:d}=this._getSharedOptions(e,s),c=n.axis,u=r.axis,{spanGaps:f,segment:g}=this.options,p=tu(f)?f:1/0,m=this.chart._animationsDisabled||a||"none"===s,b=e+i,x=t.length,_=e>0&&this.getParsed(e-1);for(let i=0;i<x;++i){let f=t[i],x=m?f:{};if(i<e||i>=b){x.skip=!0;continue}let y=this.getParsed(i),v=T(y[u]),M=x[c]=n.getPixelForValue(y[c],i),w=x[u]=a||v?r.getBasePixel():r.getPixelForValue(o?this.applyStack(r,y,o):y[u],i);x.skip=isNaN(M)||isNaN(w)||v,x.stop=i>0&&Math.abs(y[c]-_[c])>p,g&&(x.parsed=y,x.raw=l.data[i]),d&&(x.options=h||this.resolveDataElementOptions(i,f.active?"active":s)),m||this.updateElement(f,i,x,s),_=y}}getMaxOverflow(){let t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];return s.length?Math.max(i,s[0].size(this.resolveDataElementOptions(0)),s[s.length-1].size(this.resolveDataElementOptions(s.length-1)))/2:i}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}i(ig,"id","line"),i(ig,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),i(ig,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class ip extends is{getLabelAndValue(t){let e=this._cachedMeta,i=this.chart,s=i.data.labels||[],a=t$(e._parsed[t].r,i.options.locale);return{label:s[t]||"",value:a}}parseObjectData(t,e,i,s){return eM.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:1/0,max:-1/0};return t.data.forEach((t,i)=>{let s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(s<e.min&&(e.min=s),s>e.max&&(e.max=s))}),e}_updateRadius(){let t=this.chart,e=t.chartArea,i=t.options,s=Math.max(Math.min(e.right-e.left,e.bottom-e.top)/2,0),a=Math.max(i.cutoutPercentage?s/100*i.cutoutPercentage:1,0),n=(s-a)/t.getVisibleDatasetCount();this.outerRadius=s-n*this.index,this.innerRadius=this.outerRadius-n}updateElements(t,e,i,s){let a,n="reset"===s,r=this.chart,o=r.options.animation,l=this._cachedMeta.rScale,h=l.xCenter,d=l.yCenter,c=l.getIndexAngle(0)-.5*tt,u=c,f=360/this.countVisibleElements();for(a=0;a<e;++a)u+=this._computeAngle(a,s,f);for(a=e;a<e+i;a++){let e=t[a],i=u,g=u+this._computeAngle(a,s,f),p=r.getDataVisibility(a)?l.getDistanceFromCenterForValue(this.getParsed(a).r):0;u=g,n&&(o.animateScale&&(p=0),o.animateRotate&&(i=g=c));let m={x:h,y:d,innerRadius:0,outerRadius:p,startAngle:i,endAngle:g,options:this.resolveDataElementOptions(a,e.active?"active":s)};this.updateElement(e,a,m,s)}}countVisibleElements(){let t=this._cachedMeta,e=0;return t.data.forEach((t,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?tg(this.resolveDataElementOptions(t,e).angle||i):0}constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}}i(ip,"id","polarArea"),i(ip,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),i(ip,"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((e,a)=>{let n=t.getDatasetMeta(0).controller.getStyle(a);return{text:e,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,fontColor:s,lineWidth:n.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(a),index:a}})}return[]}}
1,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}}});class im extends iu{}i(im,"id","pie"),i(im,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class ib extends is{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 eM.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,"resize"!==t){let e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);let n={_loop:!0,_fullLoop:a.length===s.length,options:e};this.updateElement(i,void 0,n,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,i,s){let a=this._cachedMeta.rScale,n="reset"===s;for(let r=e;r<e+i;r++){let e=t[r],i=this.resolveDataElementOptions(r,e.active?"active":s),o=a.getPointPositionForValue(r,this.getParsed(r).r),l=n?a.xCenter:o.x,h=n?a.yCenter:o.y,d={x:l,y:h,angle:o.angle,skip:isNaN(l)||isNaN(h),options:i};this.updateElement(e,r,d,s)}}}i(ib,"id","radar"),i(ib,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),i(ib,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class ix extends is{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}=tE(e,i,s);if(this._drawStart=a,this._drawCount=n,tR(e)&&(a=0,n=i.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:a,_dataset:n}=e;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!n._decimated,a.points=i;let r=this.resolveDatasetElementOptions(t);r.segment=this.options.segment,this.updateElement(a,void 0,{animated:!s,options:r},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);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="reset"===s,{iScale:n,vScale:r,_stacked:o,_dataset:l}=this._cachedMeta,h=this.resolveDataElementOptions(e,s),d=this.getSharedOptions(h),c=this.includeOptions(s,d),u=n.axis,f=r.axis,{spanGaps:g,segment:p}=this.options,m=tu(g)?g:1/0,b=this.chart._animationsDisabled||a||"none"===s,x=e>0&&this.getParsed(e-1);for(let h=e;h<e+i;++h){let e=t[h],i=this.getParsed(h),g=b?e:{},_=T(i[f]),y=g[u]=n.getPixelForValue(i[u],h),v=g[f]=a||_?r.getBasePixel():r.getPixelForValue(o?this.applyStack(r,i,o):i[f],h);g.skip=isNaN(y)||isNaN(v)||_,g.stop=h>0&&Math.abs(i[u]-x[u])>m,p&&(g.parsed=i,g.raw=l.data[h]),c&&(g.options=d||this.resolveDataElementOptions(h,e.active?"active":s)),b||this.updateElement(e,h,g,s),x=i}this.updateSharedOptions(d,s,h)}getMaxOverflow(){let t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}let i=t.dataset,s=i.options&&i.options.borderWidth||0;return e.length?Math.max(s,e[0].size(this.resolveDataElementOptions(0)),e[e.length-1].size(this.resolveDataElementOptions(e.length-1)))/2:s}}i(ix,"id","scatter"),i(ix,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),i(ix,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var i_=Object.freeze({__proto__:null,BarController:id,BubbleController:ic,DoughnutController:iu,LineController:ig,PieController:im,PolarAreaController:ip,RadarController:ib,ScatterController:ix});function iy(){throw Error("This method is not implemented: Check that a complete date adapter is provided.")}class iv{static override(t){Object.assign(iv.prototype,t)}init(){}formats(){return iy()}parse(){return iy()}format(){return iy()}add(){return iy()}diff(){return iy()}startOf(){return iy()}endOf(){return iy()}constructor(t){i(this,"options",void 0),this.options=t||{}}}var iM={_date:iv};
1function iw(t,e,i,s,a){let n=t.getSortedVisibleDatasetMetas(),r=i[e];for(let t=0,i=n.length;t<i;++t){let{index:i,data:o}=n[t],{lo:l,hi:h}=function(t,e,i,s){let{controller:a,data:n,_sorted:r}=t,o=a._cachedMeta.iScale,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(o&&e===o.axis&&"r"!==e&&r&&n.length){let r=o._reversePixels?tP:tk;if(s){if(a._sharedOptions){let t=n[0],s="function"==typeof t.getRange&&t.getRange(e);if(s){let t=r(n,e,i-s),a=r(n,e,i+s);return{lo:t.lo,hi:a.hi}}}}else{let s=r(n,e,i);if(l){let{vScale:e}=a._cachedMeta,{_parsed:i}=t,n=i.slice(0,s.lo+1).reverse().findIndex(t=>!T(t[e.axis]));s.lo-=Math.max(0,n);let r=i.slice(s.hi).findIndex(t=>!T(t[e.axis]));s.hi+=Math.max(0,r)}return s}}return{lo:0,hi:n.length-1}}(n[t],e,r,a);for(let t=l;t<=h;++t){let e=o[t];e.skip||s(e,i,t)}}}function ik(t,e,i,s,a){let n=[];return(a||t.isPointInArea(e))&&iw(t,i,e,function(i,r,o){(a||t3(i,t.chartArea,0))&&i.inRange(e.x,e.y,s)&&n.push({element:i,datasetIndex:r,index:o})},!0),n}function iP(t,e,i,s,a,n){let r;return n||t.isPointInArea(e)?"r"!==i||s?function(t,e,i,s,a,n){let r=[],o=function(t){let e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,s){return Math.sqrt(Math.pow(e?Math.abs(t.x-s.x):0,2)+Math.pow(i?Math.abs(t.y-s.y):0,2))}}(i),l=1/0;return iw(t,i,e,function(i,h,d){let c=i.inRange(e.x,e.y,a);if(s&&!c)return;let u=i.getCenterPoint(a);if(!(n||t.isPointInArea(u))&&!c)return;let f=o(e,u);f<l?(r=[{element:i,datasetIndex:h,index:d}],l=f):f===l&&r.push({element:i,datasetIndex:h,index:d})}),r}(t,e,i,s,a,n):(r=[],iw(t,i,e,function(t,i,s){let{startAngle:n,endAngle:o}=t.getProps(["startAngle","endAngle"],a),{angle:l}=tm(t,{x:e.x,y:e.y});ty(l,n,o)&&r.push({element:t,datasetIndex:i,index:s})}),r):[]}function iS(t,e,i,s,a){let n=[],r="x"===i?"inXRange":"inYRange",o=!1;return(iw(t,i,e,(t,s,l)=>{t[r]&&t[r](e[i],a)&&(n.push({element:t,datasetIndex:s,index:l}),o=o||t.inRange(e.x,e.y,a))}),s&&!o)?[]:n}var iD={modes:{index(t,e,i,s){let a=eE(e,t),n=i.axis||"x",r=i.includeInvisible||!1,o=i.intersect?ik(t,a,n,s,r):iP(t,a,n,!1,s,r),l=[];return o.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{let e=o[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})}),l):[]},dataset(t,e,i,s){let a=eE(e,t),n=i.axis||"xy",r=i.includeInvisible||!1,o=i.intersect?ik(t,a,n,s,r):iP(t,a,n,!1,s,r);if(o.length>0){let e=o[0].datasetIndex,i=t.getDatasetMeta(e).data;o=[];for(let t=0;t<i.length;++t)o.push({element:i[t],datasetIndex:e,index:t})}return o},point(t,e,i,s){let a=eE(e,t);return ik(t,a,i.axis||"xy",s,i.includeInvisible||!1)},nearest(t,e,i,s){let a=eE(e,t),n=i.axis||"xy",r=i.includeInvisible||!1;return iP(t,a,n,i.intersect,s,r)},x(t,e,i,s){let a=eE(e,t);return iS(t,a,"x",i.intersect,s)},y(t,e,i,s){let a=eE(e,t);return iS(t,a,"y",i.intersect,s)}}};let iC=["left","top","right","bottom"];function iO(t,e){return t.filter(t=>t.pos===e)}function iA(t,e){return t.filter(t=>-1===iC.indexOf(t.pos)&&t.box.axis===e)}function iL(t,e){return t.sort((t,i)=>{let s=e?i:t,a=e?t:i;return s.weight===a.weight?s.index-a.index:s.weight-a.weight})}function iT(t,e,i,s){return Math.max(t[i],e[i])+Math.max(t[s],e[s])}function iE(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)}function iR(t,e,i,s){let a,n,r,o,l,h,d=[];for(a=0,n=t.length,l=0;a<n;++a){(o=(r=t[a]).box).update(r.width||e.w,r.height||e.h,function(t,e){let i=e.maxPadding;var s=t?["left","right"]:["top","bottom"];let a={left:0,top:0,right:0,bottom:0};return s.forEach(t=>{a[t]=Math.max(e[t],i[t])}),a}(r.horizontal,e));let{same:n,other:c}=function(t,e,i,s){let{pos:a,box:n}=i,r=t.maxPadding;if(!R(a)){i.size&&(t[a]-=i.size);let e=s[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?n.height:n.width),i.size=e.size/e.count,t[a]+=i.size}n.getPadding&&iE(r,n.getPadding());let o=Math.max(0,e.outerWidth-iT(r,t,"left","right")),l=Math.max(0,e.outerHeight-iT(r,t,"top","bottom")),h=o!==t.w,d=l!==t.h;return t.w=o,t.h=l,i.horizontal?{same:h,other:d}:{same:d,other:h}}(e,i,r,s);l|=n&&d.length,h=h||c,o.fullSize||d.push(r)}return l&&iR(d,e,i,s)||h}function iz(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}function iF(t,e,i,s){let a=i.padding,{x:n,y:r}=e;for(let o of t){let t=o.box,l=s[o.stack]||{count:1,placed:0,weight:1},h=o.stackWeight/l.weight||1;if(o.horizontal){let s=e.w*h,n=l.size||t.height;Z(l.start)&&(r=l.start),t.fullSize?iz(t,a.left,r,i.outerWidth-a.right-a.left,n):iz(t,e.left+l.placed,r,s,n),l.start=r,l.placed+=s,r=t.bottom}else{let s=e.h*h,r=l.size||t.width;Z(l.start)&&(n=l.start),t.fullSize?iz(t,n,a.top,r,i.outerHeight-a.bottom-a.top):iz(t,n,e.top+l.placed,r,s),l.start=n,l.placed+=s,n=t.right}}e.x=n,e.y=r}
1var iV={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(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){let i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&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=eo(t.options.layout.padding),n=Math.max(e-a.width,0),r=Math.max(i-a.height,0),o=function(t){let e=function(t){let e,i,s,a,n,r,o=[];for(e=0,i=(t||[]).length;e<i;++e)s=t[e],({position:a,options:{stack:n,stackWeight:r=1}}=s),o.push({index:e,box:s,pos:a,horizontal:s.isHorizontal(),weight:s.weight,stack:n&&a+n,stackWeight:r});return o}(t),i=iL(e.filter(t=>t.box.fullSize),!0),s=iL(iO(e,"left"),!0),a=iL(iO(e,"right")),n=iL(iO(e,"top"),!0),r=iL(iO(e,"bottom")),o=iA(e,"x"),l=iA(e,"y");return{fullSize:i,leftAndTop:s.concat(n),rightAndBottom:a.concat(l).concat(r).concat(o),chartArea:iO(e,"chartArea"),vertical:s.concat(a).concat(l),horizontal:n.concat(r).concat(o)}}(t.boxes),l=o.vertical,h=o.horizontal;W(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});let d=Object.freeze({outerWidth:e,outerHeight:i,padding:a,availableWidth:n,availableHeight:r,vBoxMaxWidth:n/2/(l.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1),hBoxMaxHeight:r/2}),c=Object.assign({},a);iE(c,eo(s));let u=Object.assign({maxPadding:c,w:n,h:r,x:a.left,y:a.top},a),f=function(t,e){let i,s,a,n=function(t){let e={};for(let i of t){let{stack:t,pos:s,stackWeight:a}=i;if(!t||!iC.includes(s))continue;let n=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});n.count++,n.weight+=a}return e}(t),{vBoxMaxWidth:r,hBoxMaxHeight:o}=e;for(i=0,s=t.length;i<s;++i){let{fullSize:s}=(a=t[i]).box,l=n[a.stack],h=l&&a.stackWeight/l.weight;a.horizontal?(a.width=h?h*r:s&&e.availableWidth,a.height=o):(a.width=r,a.height=h?h*o:s&&e.availableHeight)}return n}(l.concat(h),d);iR(o.fullSize,u,d,f),iR(l,u,d,f),iR(h,u,d,f)&&iR(l,u,d,f);let g=u.maxPadding;function p(t){let e=Math.max(g[t]-u[t],0);return u[t]+=e,e}u.y+=p("top"),u.x+=p("left"),p("right"),p("bottom"),iF(o.leftAndTop,u,d,f),u.x+=u.w,u.y+=u.h,iF(o.rightAndBottom,u,d,f),t.chartArea={left:u.left,top:u.top,right:u.left+u.w,bottom:u.top+u.h,height:u.h,width:u.w},W(o.chartArea,e=>{let i=e.box;Object.assign(i,t.chartArea),i.update(u.w,u.h,{left:0,top:0,right:0,bottom:0})})}};class iI{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){}}class iB extends iI{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}let iW="$chartjs",ij={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},iH=t=>null===t||""===t,iN=!!eF&&{passive:!0};function iU(t,e){for(let i of t)if(i===e||i.contains(e))return!0}function i$(t,e,i){let s=t.canvas,a=new MutationObserver(t=>{let e=!1;for(let i of t)e=(e=e||iU(i.addedNodes,s))&&!iU(i.removedNodes,s);e&&i()});return a.observe(document,{childList:!0,subtree:!0}),a}function iY(t,e,i){let s=t.canvas,a=new MutationObserver(t=>{let e=!1;for(let i of t)e=(e=e||iU(i.removedNodes,s))&&!iU(i.addedNodes,s);e&&i()});return a.observe(document,{childList:!0,subtree:!0}),a}let iX=new Map,iq=0;function iK(){let t=window.devicePixelRatio;t!==iq&&(iq=t,iX.forEach((e,i)=>{i.currentDevicePixelRatio!==t&&e()}))}function iJ(t,e,i){let s=t.canvas,a=s&&eC(s);if(!a)return;let n=tA((t,e)=>{let s=a.clientWidth;i(t,e),s<a.clientWidth&&i()},window),r=new ResizeObserver(t=>{let e=t[0],i=e.contentRect.width,s=e.contentRect.height;(0!==i||0!==s)&&n(i,s)});return r.observe(a),iX.size||window.addEventListener("resize",iK),iX.set(t,n),r}function iZ(t,e,i){i&&i.disconnect(),"resize"===e&&(iX.delete(t),iX.size||window.removeEventListener("resize",iK))}function iQ(t,e,i){let s=t.canvas,a=tA(e=>{null!==t.ctx&&i(function(t,e){let i=ij[t.type]||t.type,{x:s,y:a}=eE(t,e);return{type:i,chart:e,native:t,x:void 0!==s?s:null,y:void 0!==a?a:null}}(e,t))},t);return s&&s.addEventListener(e,a,iN),a}class iG extends iI{acquireContext(t,e){let i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(!function(t,e){let i=t.style,s=t.getAttribute("height"),a=t.getAttribute("width");
1if(t[iW]={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",iH(a)){let e=eV(t,"width");void 0!==e&&(t.width=e)}if(iH(s))if(""===t.style.height)t.height=t.width/(e||2);else{let e=eV(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){let e=t.canvas;if(!e[iW])return!1;let i=e[iW].initial;["height","width"].forEach(t=>{let s=i[t];T(s)?e.removeAttribute(t):e.setAttribute(t,s)});let s=i.style||{};return Object.keys(s).forEach(t=>{e.style[t]=s[t]}),e.width=e.width,delete e[iW],!0}addEventListener(t,e,i){this.removeEventListener(t,e);let s=t.$proxies||(t.$proxies={}),a={attach:i$,detach:iY,resize:iJ}[e]||iQ;s[e]=a(t,e,i)}removeEventListener(t,e){let i=t.$proxies||(t.$proxies={}),s=i[e];s&&((({attach:iZ,detach:iZ,resize:iZ})[e]||function(t,e,i){t&&t.canvas&&t.canvas.removeEventListener(e,i,iN)})(t,e,s),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return function(t,e,i,s){let a=eA(t),n=eT(a,"margin"),r=eO(a.maxWidth,t,"clientWidth")||ts,o=eO(a.maxHeight,t,"clientHeight")||ts,l=function(t,e,i){let s,a;if(void 0===e||void 0===i){let n=t&&eC(t);if(n){let t=n.getBoundingClientRect(),r=eA(n),o=eT(r,"border","width"),l=eT(r,"padding");e=t.width-l.width-o.width,i=t.height-l.height-o.height,s=eO(r.maxWidth,n,"clientWidth"),a=eO(r.maxHeight,n,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:s||ts,maxHeight:a||ts}}(t,e,i),{width:h,height:d}=l;if("content-box"===a.boxSizing){let t=eT(a,"border","width"),e=eT(a,"padding");h-=e.width+t.width,d-=e.height+t.height}return h=Math.max(0,h-n.width),d=Math.max(0,s?h/s:d-n.height),h=eR(Math.min(h,r,l.maxWidth)),d=eR(Math.min(d,o,l.maxHeight)),h&&!d&&(d=eR(h/2)),(void 0!==e||void 0!==i)&&s&&l.height&&d>l.height&&(h=eR(Math.floor((d=l.height)*s))),{width:h,height:d}}(t,e,i,s)}isAttached(t){let e=t&&eC(t);return!!(e&&e.isConnected)}}class i0{tooltipPosition(t){let{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return tu(this.x)&&tu(this.y)}getProps(t,e){let i=this.$animations;if(!e||!i)return this;let s={};return t.forEach(t=>{s[t]=i[t]&&i[t].active()?i[t]._to:this[t]}),s}constructor(){i(this,"x",void 0),i(this,"y",void 0),i(this,"active",!1),i(this,"options",void 0),i(this,"$animations",void 0)}}function i1(t,e,i,s,a){let n,r,o,l=V(s,0),h=Math.min(V(a,t.length),t.length),d=0;for(i=Math.ceil(i),a&&(i=(n=a-s)/Math.floor(n/i)),o=l;o<0;)o=Math.round(l+ ++d*i);for(r=Math.max(l,0);r<h;r++)r===o&&(e.push(t[r]),o=Math.round(l+ ++d*i))}i(i0,"defaults",{}),i(i0,"defaultRoutes",void 0);let i2=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i,i5=(t,e)=>Math.min(e||t,t);function i3(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}function i8(t){return t.drawTicks?t.tickLength:0}function i4(t,e){if(!t.display)return 0;let i=el(t.font,e),s=eo(t.padding);return(E(t.text)?t.text.length:1)*i.lineHeight+s.height}class i6 extends i0{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=F(t,1/0),e=F(e,-1/0),i=F(i,1/0),s=F(s,-1/0),{min:F(t,i),max:F(e,s),minDefined:z(t),maxDefined:z(e)}}getMinMax(t){let e,{min:i,max:s,minDefined:a,maxDefined:n}=this.getUserBounds();if(a&&n)return{min:i,max:s};let r=this.getMatchingVisibleMetas();for(let o=0,l=r.length;o<l;++o)e=r[o].controller.getMinMax(this,t),a||(i=Math.min(i,e.min)),n||(s=Math.max(s,e.max));return i=n&&i>s?s:i,s=a&&i>s?i:s,{min:F(i,F(s,i)),max:F(s,F(i,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.chart.chartArea;return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){B(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=function(t,e,
1i){let{min:s,max:a}=t,n=I(e,(a-s)/2),r=(t,e)=>i&&0===t?0:t+e;return{min:r(s,-Math.abs(n)),max:r(a,n)}}(this,a,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let o=r<this.ticks.length;this._convertTicksToLabels(o?i3(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),n.display&&(n.autoSkip||"auto"===n.source)&&(this.ticks=function(t,e){let i=t.options.ticks,s=function(t){let e=t.options.offset,i=t._tickSize();return Math.floor(Math.min(t._length/i+ +!e,t._maxLength/i))}(t),a=Math.min(i.maxTicksLimit||s,s),n=i.major.enabled?function(t){let e,i,s=[];for(e=0,i=t.length;e<i;e++)t[e].major&&s.push(e);return s}(e):[],r=n.length,o=n[0],l=n[r-1],h=[];if(r>a)return function(t,e,i,s){let a,n=0,r=i[0];for(a=0,s=Math.ceil(s);a<t.length;a++)a===r&&(e.push(t[a]),r=i[++n*s])}(e,h,n,r/a),h;let d=function(t,e,i){let s=function(t){let e,i,s=t.length;if(s<2)return!1;for(i=t[0],e=1;e<s;++e)if(t[e]-t[e-1]!==i)return!1;return i}(t),a=e.length/i;if(!s)return Math.max(a,1);let n=function(t){let e,i=[],s=Math.sqrt(t);for(e=1;e<s;e++)t%e==0&&(i.push(e),i.push(t/e));return s===(0|s)&&i.push(s),i.sort((t,e)=>t-e).pop(),i}(s);for(let t=0,e=n.length-1;t<e;t++){let e=n[t];if(e>a)return e}return Math.max(a,1)}(n,e,a);if(r>0){let t,i,s=r>1?Math.round((l-o)/(r-1)):null;for(i1(e,h,d,T(s)?0:o-s,o),t=0,i=r-1;t<i;t++)i1(e,h,d,n[t],n[t+1]);return i1(e,h,d,l,T(s)?e.length:l+s),h}return i1(e,h,d),h}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),o&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){B(this.options.afterUpdate,[this])}beforeSetDimensions(){B(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){B(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),B(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){B(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){let e,i,s,a=this.options.ticks;for(e=0,i=t.length;e<i;e++)(s=t[e]).label=B(a.callback,[s.value,e,t],this)}afterTickToLabelConversion(){B(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){B(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let t,e,i,s=this.options,a=s.ticks,n=i5(this.ticks.length,s.ticks.maxTicksLimit),r=a.minRotation||0,o=a.maxRotation,l=r;if(!this._isVisible()||!a.display||r>=o||n<=1||!this.isHorizontal()){this.labelRotation=r;return}let h=this._getLabelSizes(),d=h.widest.width,c=h.highest.height,u=tv(this.chart.width-d,0,this.maxWidth);d+6>(t=s.offset?this.maxWidth/n:u/(n-1))&&(t=u/(n-(s.offset?.5:1)),e=this.maxHeight-i8(s.grid)-a.padding-i4(s.title,this.chart.options.font),i=Math.sqrt(d*d+c*c),l=Math.max(r,Math.min(o,l=180/tt*Math.min(Math.asin(tv((h.highest.height+6)/t,-1,1)),Math.asin(tv(e/i,-1,1))-Math.asin(tv(c/i,-1,1)))))),this.labelRotation=l}afterCalculateLabelRotation(){B(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){B(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 n=i4(s,e.options.font);if(r?(t.width=this.maxWidth,t.height=i8(a)+n):(t.height=this.maxHeight,t.width=i8(a)+n),i.display&&this.ticks.length){let{first:e,last:s,widest:a,highest:n}=this._getLabelSizes(),o=2*i.padding,l=tg(this.labelRotation),h=Math.cos(l),d=Math.sin(l);if(r){let e=i.mirror?0:d*a.width+h*n.height;t.height=Math.min(this.maxHeight,t.height+e+o)}else{let e=i.mirror?0:h*a.width+d*n.height;t.width=Math.min(this.maxWidth,t.width+e+o)}this._calculatePadding(e,s,d,h)}}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=0!==this.labelRotation,l="top"!==r&&"x"===this.axis;if(this.isHorizontal()){let r=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1),d=0,c=0;o?l?(d=s*t.width,c=i*e.height):(d=i*t.height,c=s*e.width):"start"===a?c=e.width:"end"===a?d=t.width:"inner"!==a&&(d=t.width/2,c=e.width/2),this.paddingLeft=Math.max((d-r+n)*this.width/(this.width-r),0),this.paddingRight=Math.max((c-h+n)*this.width/(this.width-h),0)}
1else{let i=e.height/2,s=t.height/2;"start"===a?(i=0,s=t.height):"end"===a&&(i=e.height,s=0),this.paddingTop=i+n,this.paddingBottom=s+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(){B(this.options.afterFit,[this])}isHorizontal(){let{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),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=i3(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){let s,a,n,r,o,l,h,d,c,u,f,{ctx:g,_longestTextCache:p}=this,m=[],b=[],x=Math.floor(e/i5(e,i)),_=0,y=0;for(s=0;s<e;s+=x){if(r=t[s].label,g.font=l=(o=this._resolveTickFontOptions(s)).string,h=p[l]=p[l]||{data:{},gc:[]},d=o.lineHeight,c=u=0,T(r)||E(r)){if(E(r))for(a=0,n=r.length;a<n;++a)T(f=r[a])||E(f)||(c=tG(g,h.data,h.gc,c,f),u+=d)}else c=tG(g,h.data,h.gc,c,r),u=d;m.push(c),b.push(u),_=Math.max(c,_),y=Math.max(u,y)}W(p,t=>{let i,s=t.gc,a=s.length/2;if(a>e){for(i=0;i<a;++i)delete t.data[s[i]];s.splice(0,a)}});let v=m.indexOf(_),M=b.indexOf(y),w=t=>({width:m[t]||0,height:b[t]||0});return{first:w(0),last:w(e-1),widest:w(v),highest:w(M),widths:m,heights:b}}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 tv(this._alignToPixels?t0(this.chart,e,0):e,-32768,32767)}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){var e,i;let s=this.ticks||[];if(t>=0&&t<s.length){let i=s[t];return i.$context||(e=this.getContext(),i.$context=ed(e,{tick:i,index:t,type:"tick"}))}return this.$context||(this.$context=(i=this.chart.getContext(),ed(i,{scale:this,type:"scale"})))}_tickSize(){let t=this.options.ticks,e=tg(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"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){let e,i,s,a,n,r,o,l,h,d,c,u,f=this.axis,g=this.chart,p=this.options,{grid:m,position:b,border:x}=p,_=m.offset,y=this.isHorizontal(),v=this.ticks.length+ +!!_,M=i8(m),w=[],k=x.setContext(this.getContext()),P=k.display?k.width:0,S=P/2,D=function(t){return t0(g,t,P)};if("top"===b)e=D(this.bottom),r=this.bottom-M,l=e-S,d=D(t.top)+S,u=t.bottom;else if("bottom"===b)e=D(this.top),d=t.top,u=D(t.bottom)-S,r=e+S,l=this.top+M;else if("left"===b)e=D(this.right),n=this.right-M,o=e-S,h=D(t.left)+S,c=t.right;else if("right"===b)e=D(this.left),h=t.left,c=D(t.right)-S,n=e+S,o=this.left+M;else if("x"===f){if("center"===b)e=D((t.top+t.bottom)/2+.5);else if(R(b)){let t=Object.keys(b)[0],i=b[t];e=D(this.chart.scales[t].getPixelForValue(i))}d=t.top,u=t.bottom,l=(r=e+S)+M}else if("y"===f){if("center"===b)e=D((t.left+t.right)/2);else if(R(b)){let t=Object.keys(b)[0],i=b[t];e=D(this.chart.scales[t].getPixelForValue(i))}o=(n=e-S)-M,h=t.left,c=t.right}let C=V(p.ticks.maxTicksLimit,v),O=Math.max(1,Math.ceil(v/C));for(i=0;i<v;i+=O){let t=this.getContext(i),e=m.setContext(t),f=x.setContext(t),p=e.lineWidth,b=e.color,v=f.dash||[],M=f.dashOffset,k=e.tickWidth,P=e.tickColor,S=e.tickBorderDash||[],D=e.tickBorderDashOffset;
1void 0!==(s=function(t,e,i){let s,a=t.ticks.length,n=Math.min(e,a-1),r=t._startPixel,o=t._endPixel,l=t.getPixelForTick(n);if(!i||(s=1===a?Math.max(l-r,o-l):0===e?(t.getPixelForTick(1)-l)/2:(l-t.getPixelForTick(n-1))/2,!((l+=n<e?s:-s)<r-1e-6)&&!(l>o+1e-6)))return l}(this,i,_))&&(a=t0(g,s,p),y?n=o=h=c=a:r=l=d=u=a,w.push({tx1:n,ty1:r,tx2:o,ty2:l,x1:h,y1:d,x2:c,y2:u,width:p,color:b,borderDash:v,borderDashOffset:M,tickWidth:k,tickColor:P,tickBorderDash:S,tickBorderDashOffset:D}))}return this._ticksLength=v,this._borderValue=e,w}_computeLabelItems(t){let e,i,s,a,n,r,o,l,h,d,c,u=this.axis,f=this.options,{position:g,ticks:p}=f,m=this.isHorizontal(),b=this.ticks,{align:x,crossAlign:_,padding:y,mirror:v}=p,M=i8(f.grid),w=M+y,k=v?-y:w,P=-tg(this.labelRotation),S=[],D="middle";if("top"===g)n=this.bottom-k,r=this._getXAxisLabelAlignment();else if("bottom"===g)n=this.top+k,r=this._getXAxisLabelAlignment();else if("left"===g){let t=this._getYAxisLabelAlignment(M);r=t.textAlign,a=t.x}else if("right"===g){let t=this._getYAxisLabelAlignment(M);r=t.textAlign,a=t.x}else if("x"===u){if("center"===g)n=(t.top+t.bottom)/2+w;else if(R(g)){let t=Object.keys(g)[0],e=g[t];n=this.chart.scales[t].getPixelForValue(e)+w}r=this._getXAxisLabelAlignment()}else if("y"===u){if("center"===g)a=(t.left+t.right)/2-w;else if(R(g)){let t=Object.keys(g)[0],e=g[t];a=this.chart.scales[t].getPixelForValue(e)}r=this._getYAxisLabelAlignment(M).textAlign}"y"===u&&("start"===x?D="top":"end"===x&&(D="bottom"));let C=this._getLabelSizes();for(e=0,i=b.length;e<i;++e){let t;s=b[e].label;let u=p.setContext(this.getContext(e));o=this.getPixelForTick(e)+p.labelOffset,h=(l=this._resolveTickFontOptions(e)).lineHeight;let f=(d=E(s)?s.length:1)/2,x=u.color,y=u.textStrokeColor,M=u.textStrokeWidth,w=r;if(m?(a=o,"inner"===r&&(w=e===i-1?this.options.reverse?"left":"right":0===e?this.options.reverse?"right":"left":"center"),c="top"===g?"near"===_||0!==P?-d*h+h/2:"center"===_?-C.highest.height/2-f*h+h:-C.highest.height+h/2:"near"===_||0!==P?h/2:"center"===_?C.highest.height/2-f*h:C.highest.height-d*h,v&&(c*=-1),0===P||u.showLabelBackdrop||(a+=h/2*Math.sin(P))):(n=o,c=(1-d)*h/2),u.showLabelBackdrop){let s=eo(u.backdropPadding),a=C.heights[e],n=C.widths[e],o=c-s.top,l=0-s.left;switch(D){case"middle":o-=a/2;break;case"bottom":o-=a}switch(r){case"center":l-=n/2;break;case"right":l-=n;break;case"inner":e===i-1?l-=n:e>0&&(l-=n/2)}t={left:l,top:o,width:n+s.width,height:a+s.height,color:u.backdropColor}}S.push({label:s,font:l,textOffset:c,options:{rotation:P,color:x,strokeColor:y,strokeWidth:M,textAlign:w,textBaseline:D,translation:[a,n],backdrop:t}})}return S}_getXAxisLabelAlignment(){let{position:t,ticks:e}=this.options;if(-tg(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){let e,i,{position:s,ticks:{crossAlign:a,mirror:n,padding:r}}=this.options,o=this._getLabelSizes(),l=t+r,h=o.widest.width;return"left"===s?n?(i=this.right+r,"near"===a?e="left":"center"===a?(e="center",i+=h/2):(e="right",i+=h)):(i=this.right-l,"near"===a?e="right":"center"===a?(e="center",i-=h/2):(e="left",i=this.left)):"right"===s?n?(i=this.left+r,"near"===a?e="right":"center"===a?(e="center",i-=h/2):(e="left",i-=h)):(i=this.left+l,"near"===a?e="left":"center"===a?(e="center",i+=h/2):(e="right",i=this.right)):e="right",{textAlign:e,x:i}}_computeLabelArea(){if(this.options.ticks.mirror)return;let t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}
1:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}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(e=>e.value===t);return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){let e,i,s=this.options.grid,a=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),r=(t,e,i)=>{i.width&&i.color&&(a.save(),a.lineWidth=i.width,a.strokeStyle=i.color,a.setLineDash(i.borderDash||[]),a.lineDashOffset=i.borderDashOffset,a.beginPath(),a.moveTo(t.x,t.y),a.lineTo(e.x,e.y),a.stroke(),a.restore())};if(s.display)for(e=0,i=n.length;e<i;++e){let t=n[e];s.drawOnChartArea&&r({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),s.drawTicks&&r({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){let t,e,i,s,{chart:a,ctx:n,options:{border:r,grid:o}}=this,l=r.setContext(this.getContext()),h=r.display?l.width:0;
1if(!h)return;let d=o.setContext(this.getContext(0)).lineWidth,c=this._borderValue;this.isHorizontal()?(t=t0(a,this.left,h)-h/2,e=t0(a,this.right,d)+d/2,i=s=c):(i=t0(a,this.top,h)-h/2,s=t0(a,this.bottom,d)+d/2,t=e=c),n.save(),n.lineWidth=l.width,n.strokeStyle=l.color,n.beginPath(),n.moveTo(t,i),n.lineTo(e,s),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;let e=this.ctx,i=this._computeLabelArea();for(let s of(i&&t8(e,i),this.getLabelItems(t))){let t=s.options,i=s.font;t9(e,s.label,0,s.textOffset,i,t)}i&&t4(e)}drawTitle(){let t,e,{ctx:i,options:{position:s,title:a,reverse:n}}=this;if(!a.display)return;let r=el(a.font),o=eo(a.padding),l=a.align,h=r.lineHeight/2;"bottom"===s||"center"===s||R(s)?(h+=o.bottom,E(a.text)&&(h+=r.lineHeight*(a.text.length-1))):h+=o.top;let{titleX:d,titleY:c,maxWidth:u,rotation:f}=function(t,e,i,s){let a,n,r,{top:o,left:l,bottom:h,right:d,chart:c}=t,{chartArea:u,scales:f}=c,g=0,p=h-o,m=d-l;if(t.isHorizontal()){if(n=tT(s,l,d),R(i)){let t=Object.keys(i)[0],s=i[t];r=f[t].getPixelForValue(s)+p-e}else r="center"===i?(u.bottom+u.top)/2+p-e:i2(t,i,e);a=d-l}else{if(R(i)){let t=Object.keys(i)[0],s=i[t];n=f[t].getPixelForValue(s)-m+e}else n="center"===i?(u.left+u.right)/2-m+e:i2(t,i,e);r=tT(s,h,o),g="left"===i?-tn:tn}return{titleX:n,titleY:r,maxWidth:a,rotation:g}}(this,h,s,l);t9(i,a.text,0,0,r,{color:a.color,maxWidth:u,rotation:f,textAlign:(t=tL(l),(n&&"right"!==s||!n&&"right"===s)&&(t="left"===(e=t)?"right":"right"===e?"left":e),t),textBaseline:"middle",translation:[d,c]})}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=V(t.grid&&t.grid.z,-1),s=V(t.border&&t.border.z,0);return this._isVisible()&&this.draw===i6.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){let e,i,s=this.chart.getSortedVisibleDatasetMetas(),a=this.axis+"AxisID",n=[];for(e=0,i=s.length;e<i;++e){let i=s[e];i[a]!==this.id||t&&i.type!==t||n.push(i)}return n}_resolveTickFontOptions(t){return el(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){let t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}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}}class i7{isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){var e;let i,s=Object.getPrototypeOf(t);"id"in(e=s)&&"defaults"in e&&(i=this.register(s));let a=this.items,n=t.id,r=this.scope+"."+n;if(!n)throw Error("class does not have id: "+t);return n in a||(a[n]=t,function(t,e,i){var s,a;let n=$(Object.create(null),[i?tQ.get(i):{},tQ.get(e),t.defaults]);tQ.set(e,n),t.defaultRoutes&&(s=e,Object.keys(a=t.defaultRoutes).forEach(t=>{let e=t.split("."),i=e.pop(),n=[s].concat(e).join("."),r=a[t].split("."),o=r.pop(),l=r.join(".");tQ.route(n,i,l,o)})),t.descriptors&&tQ.describe(e,t.descriptors)}(t,r,i),this.override&&tQ.override(t.id,t.overrides)),r}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 tQ[s]&&(delete tQ[s][i],this.override&&delete tq[i])}constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}}
1var i9=new class{add(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e)}remove(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e)}addControllers(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e,this.controllers)}addElements(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e,this.elements)}addPlugins(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e,this.plugins)}addScales(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e,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(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e,this.controllers)}removeElements(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e,this.elements)}removePlugins(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e,this.plugins)}removeScales(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e,this.scales)}_each(t,e,i){[...e].forEach(e=>{let s=i||this._getRegistryForType(e);i||s.isForType(e)||s===this.plugins&&e.id?this._exec(t,s,e):W(e,e=>{let s=i||this._getRegistryForType(e);this._exec(t,s,e)})})}_exec(t,e,i){let s=J(t);B(i["before"+s],[],i),e[t](i),B(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(void 0===s)throw Error('"'+t+'" is not a registered '+i+".");return s}constructor(){this.controllers=new i7(is,"datasets",!0),this.elements=new i7(i0,"elements"),this.plugins=new i7(Object,"plugins"),this.scales=new i7(i6,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}};class st{notify(t,e,i,s){if("beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),void 0===this._init)return;let a=s?this._descriptors(t).filter(s):this._descriptors(t),n=this._notify(a,t,e,i);return"afterDestroy"===e&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),n}_notify(t,e,i,s){for(let a of(s=s||{},t)){let t=a.plugin;if(!1===B(t[i],[e,s,a.options],t)&&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=V(i.options&&i.options.plugins,{}),a=function(t){let e={},i=[],s=Object.keys(i9.plugins.items);for(let t=0;t<s.length;t++)i.push(i9.getPlugin(s[t]));let a=t.plugins||[];for(let t=0;t<a.length;t++){let s=a[t];-1===i.indexOf(s)&&(i.push(s),e[s.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==s||e?function(t,e,i,s){let{plugins:a,localIds:n}=e,r=[],o=t.getContext();for(let e of a){var l;let a=e.id,h=(l=i[a],s||!1!==l?!0===l?{}:l:null);null!==h&&r.push({plugin:e,options:function(t,e,i,s){let{plugin:a,local:n}=e,r=t.pluginScopeKeys(a),o=t.getOptionScopes(i,r);return n&&a.defaults&&o.push(a.defaults),t.createResolver(o,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}(t.config,{plugin:e,local:n[a]},h,o)})}return r}(t,a,s,e):[]}_notifyStateChanges(t){let e=this._oldCache||[],i=this._cache,s=(t,e)=>t.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}constructor(){this._init=void 0}}function se(t,e){let i=tQ.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function si(t){if("x"===t||"y"===t||"r"===t)return t}function ss(t){for(var e,i=arguments.length,s=Array(i>1?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];if(si(t))return t;for(let i of s){let s=i.axis||("top"===(e=i.position)||"bottom"===e?"x":"left"
1===e||"right"===e?"y":void 0)||t.length>1&&si(t[0].toLowerCase());if(s)return s}throw Error("Cannot determine type of '".concat(t,"' axis. Please provide 'axis' or 'position' option."))}function sa(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function sn(t){let e=t.options||(t.options={});e.plugins=V(e.plugins,{}),e.scales=function(t,e){let i=tq[t.type]||{scales:{}},s=e.scales||{},a=se(t.type,e),n=Object.create(null);return Object.keys(s).forEach(e=>{let r=s[e];if(!R(r))return console.error("Invalid scale configuration for scale: ".concat(e));if(r._proxy)return console.warn("Ignoring resolver passed as options for scale: ".concat(e));let o=ss(e,r,function(t,e){if(e.data&&e.data.datasets){let i=e.data.datasets.filter(e=>e.xAxisID===t||e.yAxisID===t);if(i.length)return sa(t,"x",i[0])||sa(t,"y",i[0])}return{}}(e,t),tQ.scales[r.type]),l=o===a?"_index_":"_value_",h=i.scales||{};n[e]=Y(Object.create(null),[{axis:o},r,h[o],h[l]])}),t.data.datasets.forEach(i=>{let a=i.type||t.type,r=i.indexAxis||se(a,e),o=(tq[a]||{}).scales||{};Object.keys(o).forEach(t=>{let e,a=(e=t,"_index_"===t?e=r:"_value_"===t&&(e="x"===r?"y":"x"),e),l=i[a+"AxisID"]||a;n[l]=n[l]||Object.create(null),Y(n[l],[{axis:a},s[l],o[t]])})}),Object.keys(n).forEach(t=>{let e=n[t];Y(e,[tQ.scales[e.type],tQ.scale])}),n}(t,e)}function sr(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}let so=new Map,sl=new Set;function sh(t,e){let i=so.get(t);return i||(i=e(),so.set(t,i),sl.add(i)),i}let sd=(t,e,i)=>{let s=K(e,i);void 0!==s&&t.add(s)};class sc{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=sr(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(),sn(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return sh(t,()=>[["datasets.".concat(t),""]])}datasetAnimationScopeKeys(t,e){return sh("".concat(t,".transition.").concat(e),()=>[["datasets.".concat(t,".transitions.").concat(e),"transitions.".concat(e)],["datasets.".concat(t),""]])}datasetElementScopeKeys(t,e){return sh("".concat(t,"-").concat(e),()=>[["datasets.".concat(t,".elements.").concat(e),"datasets.".concat(t),"elements.".concat(e),""]])}pluginScopeKeys(t){let e=t.id,i=this.type;return sh("".concat(i,"-plugin-").concat(e),()=>[["plugins.".concat(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(e=>
1{t&&(o.add(t),e.forEach(e=>sd(o,t,e))),e.forEach(t=>sd(o,s,t)),e.forEach(t=>sd(o,tq[a]||{},t)),e.forEach(t=>sd(o,tQ,t)),e.forEach(t=>sd(o,tK,t))});let l=Array.from(o);return 0===l.length&&l.push(Object.create(null)),sl.has(e)&&n.set(e,l),l}chartOptionScopes(){let{options:t,type:e}=this;return[t,tq[e]||{},tQ.datasets[e]||{},{type:e},tQ,tK]}resolveNamedOptions(t,e,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[""],a={$shared:!0},{resolver:n,subPrefixes:r}=su(this._resolverCache,t,s),o=n;if(function(t,e){let{isScriptable:i,isIndexable:s}=ef(t);for(let a of e){let e=i(a),n=s(a),r=(n||e)&&t[a];if(e&&(Q(r)||sf(r))||n&&E(r))return!0}return!1}(n,e)){a.$shared=!1,i=Q(i)?i():i;let e=this.createResolver(t,i,r);o=eu(n,i,e)}for(let t of e)a[t]=o[t];return a}createResolver(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[""],s=arguments.length>3?arguments[3]:void 0,{resolver:a}=su(this._resolverCache,t,i);return R(e)?eu(a,e,void 0,s):a}constructor(t){this._config=function(t){return(t=t||{}).data=sr(t.data),sn(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}}function su(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:ec(e,i),subPrefixes:i.filter(t=>!t.toLowerCase().includes("hover"))},s.set(a,n)),n}let sf=t=>R(t)&&Object.getOwnPropertyNames(t).some(e=>Q(t[e])),sg=["top","bottom","left","right","chartArea"];function sp(t,e){return"top"===t||"bottom"===t||-1===sg.indexOf(t)&&"x"===e}function sm(t,e){return function(i,s){return i[t]===s[t]?i[e]-s[e]:i[t]-s[t]}}function sb(t){let e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),B(i&&i.onComplete,[t],e)}function sx(t){let e=t.chart,i=e.options.animation;B(i&&i.onProgress,[t],e)}function s_(t){return eD()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}let sy={},sv=t=>{let e=s_(t);return Object.values(sy).filter(t=>t.canvas===e).pop()};class sM{static register(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];i9.add(...e),sw()}static unregister(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];i9.remove(...e),sw()}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 i9}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ez(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return t1(this.canvas,this.ctx),this}stop(){return eQ.stop(this),this}resize(t,e){eQ.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,ez(this,r,!0)&&(this.notifyPlugins("resize",{size:n}),B(i.onResize,[this,n],this),this.attached&&this._doResize(o)&&this.render())}ensureScalesHaveIDs(){W(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){let t=this.options,e=t.scales,i=this.scales,s=Object.keys(i).reduce((t,e)=>(t[e]=!1,t),{}),a=[];e&&(a=a.concat(Object.keys(e).map(t=>{let i=e[t],s=ss(t,i),a="r"===s,n="x"===s;return{options:i,dposition:a?"chartArea":n?"bottom":"left",dtype:a?"radialLinear":n?"category":"linear"}}))),W(a,e=>{let a=e.options,n=a.id,r=ss(n,a),o=V(a.type,e.dtype);(void 0===a.position||sp(a.position,r)!==sp(e.dposition))&&(a.position=e.dposition),s[n]=!0;let l=null;n in i&&i[n].type===o?l=i[n]:i[(l=new(i9.getScale(o))({id:n,type:o,ctx:this.ctx,chart:this})).id]=l,l.init(a,t)}),W(s,(t,e)=>{t||delete i[e]}),W(i,t=>{iV.configure(this,t,t.options),iV.addBox(this,t)})}_updateMetasets(){let t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((t,e)=>t.index-e.index),i>e){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(sm("order","index"))}_removeUnreferencedMetasets(){let{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((t,i)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){let t,e,i=[],s=this.data.datasets;for(this._removeUnreferencedMetasets(),t=0,e=s.length;t<e;t++){let e=s[t],a=this.getDatasetMeta(t),n=e.type||this.config.type;if(a.type&&a.type!==n&&(this._destroyDatasetMeta(t),a=this.getDatasetMeta(t)),a.type=n,a.indexAxis=e.indexAxis||se(n,this.options),a.order=e.order||0,a.index=t,a.label=""+e.label,a.visible=this.isDatasetVisible(t),a.controller)a.controller.updateIndex(t),a.controller.linkScales();else{let e=i9.getController(n),{datasetElementType:s,dataElementType:r}=tQ.datasets[n];Object.assign(e,{dataElementType:i9.getElement(r),datasetElementType:s&&i9.getElement(s)}),a.controller=new e(this,t),i.push(a.controller)}}return this._updateMetasets(),i}_resetElements(){W(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let e=this.config;
1e.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(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;let a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let n=0;for(let t=0,e=this.data.datasets.length;t<e;t++){let{controller:e}=this.getDatasetMeta(t),i=!s&&-1===a.indexOf(e);e.buildOrUpdateElements(i),n=Math.max(+e.getMaxOverflow(),n)}n=this._minPadding=i.layout.autoPadding?n:0,this._updateLayout(n),s||W(a,t=>{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(sm("z","_idx"));let{_active:r,_lastEvent:o}=this;o?this._eventHandler(o,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){W(this.scales,t=>{iV.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options;G(new Set(Object.keys(this._listeners)),new Set(t.events))&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this;for(let{method:i,start:s,count:a}of this._getUniformDataChanges()||[]){var e="_removeElements"===i?-a:a;for(let i of Object.keys(t)){let a=+i;if(a>=s){let n=t[i];delete t[i],(e>0||a>s)&&(t[a+e]=n)}}}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let e=this.data.datasets.length,i=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),s=i(0);for(let t=1;t<e;t++)if(!G(s,i(t)))return;return Array.from(s).map(t=>t.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;iV.update(this,this.width,this.height,t);let e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],W(this.boxes,t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,Q(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};!1!==this.notifyPlugins("beforeDatasetUpdate",s)&&(i.controller._update(e),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(eQ.has(this)?this.attached&&!eQ.running(this)&&eQ.start(this):(this.draw(),sb({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){let{width:t,height:e}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(t,e)}if(this.clear(),this.width<=0||this.height<=0||!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))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,i,s=this._sortedMetasets,a=[];for(e=0,i=s.length;e<i;++e){let i=s[e];(!t||i.visible)&&a.push(i)}return a}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))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={meta:t,index:t.index,cancelable:!0},s=eZ(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",i)&&(s&&t8(e,s),t.controller.draw(),s&&t4(e),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return t3(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){let a=iD.modes[e];return"function"==typeof a?a(this,t,i,s):[]}getDatasetMeta(t){let e=this.data.datasets[t],i=this._metasets,s=i.filter(t=>t&&t._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=ed(null,{chart:this,type:"chart"}))}
1getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let e=this.data.datasets[t];if(!e)return!1;let i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).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);Z(e)?(a.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),n.update(a,{visible:i}),this.update(e=>e.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(),eQ.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(),t1(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete sy[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let t=this._listeners,e=this.platform,i=(i,s)=>{e.addEventListener(this,i,s),t[i]=s},s=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};W(this.options.events,t=>i(t,s))}bindResponsiveEvents(){let t;this._responsiveListeners||(this._responsiveListeners={});let e=this._responsiveListeners,i=this.platform,s=(t,s)=>{i.addEventListener(this,t,s),e[t]=s},a=(t,s)=>{e[t]&&(i.removeEventListener(this,t,s),delete e[t])},n=(t,e)=>{this.canvas&&this.resize(t,e)},r=()=>{a("attach",r),this.attached=!0,this.resize(),s("resize",n),s("detach",t)};t=()=>{this.attached=!1,a("resize",n),this._stop(),this._resize(0,0),s("attach",r)},i.isAttached(this.canvas)?r():t()}unbindEvents(){W(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},W(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){let s,a,n,r=i?"set":"remove";for("dataset"===e&&this.getDatasetMeta(t[0].datasetIndex).controller["_"+r+"DatasetHoverStyle"](),a=0,n=t.length;a<n;++a){let e=(s=t[a])&&this.getDatasetMeta(s.datasetIndex).controller;e&&e[r+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){let e=this._active||[],i=t.map(t=>{let{datasetIndex:e,index:i}=t,s=this.getDatasetMeta(e);if(!s)throw Error("No dataset found at index "+e);return{datasetIndex:e,element:s.data[i],index:i}});j(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 1===this._plugins._cache.filter(e=>e.plugin.id===t).length}_updateHoverStyles(t,e,i){let s=this.options.hover,a=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),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=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,s))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){var s;let{_active:a=[],options:n}=this,r=this._getActiveElements(t,a,i,e),o="mouseup"===t.type||"click"===t.type||"contextmenu"===t.type,l=(s=this._lastEvent,i&&"mouseout"!==t.type?o?s:t:null);i&&(this._lastEvent=null,B(n.onHover,[t,r,this],this),o&&B(n.onClick,[t,r,this],this));let h=!j(r,a);return(h||e)&&(this._active=r,this._updateHoverStyles(r,a,e)),this._lastEvent=l,h}_getActiveElements(t,e,i,s){if("mouseout"===t.type)return[];if(!i)return e;let a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,s)}constructor(t,e){let i=this.config=new sc(e),s=s_(t),a=sv(s);if(a)throw 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||(!eD()||"undefined"!=typeof OffscreenCanvas&&s instanceof OffscreenCanvas?iB:iG)),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=L(),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 st,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(){for(var s=arguments.length,a=Array(s),n=0;n<s;n++)a[n]=arguments[n];return e?(clearTimeout(i),i=setTimeout(t,e,a)):t.apply(this,a),e}}(t=>this.update(t),n.resizeDelay||0),this._dataChanges=[],sy[this.id]=this,!r||!o)return void console.error("Failed to create chart: can't acquire context from the given item");eQ.listen(this,"complete",sb),eQ.listen(this,"progress",sx),this._initialize(),this.attached&&this.update()}}function sw(){return W(sM.instances,t=>t._plugins.invalidate())}function sk(t,e,i,s){return{x:i+t*Math.cos(e),y:s+t*Math.sin(e)}}function sP(t,e,i,s,a,n){let{x:r,y:o,startAngle:l,pixelMargin:h,innerRadius:d}=e,c=Math.max(e.outerRadius+s+i-h,0),u=d>0?d+s+i+h:0,f=0,g=a-l;if(s){let t=c>
10?c-s:0,e=((d>0?d-s:0)+t)/2;f=(g-(0!==e?g*e/(e+s):g))/2}let p=Math.max(.001,g*c-i/tt)/c,m=(g-p)/2,b=l+m+f,x=a-m-f,{outerStart:_,outerEnd:y,innerStart:v,innerEnd:M}=function(t,e,i,s){let a=ea(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),n=(i-e)/2,r=Math.min(n,s*e/2),o=t=>{let e=(i-Math.min(n,t))*s/2;return tv(t,0,Math.min(n,e))};return{outerStart:o(a.outerStart),outerEnd:o(a.outerEnd),innerStart:tv(a.innerStart,0,r),innerEnd:tv(a.innerEnd,0,r)}}(e,u,c,x-b),w=c-_,k=c-y,P=b+_/w,S=x-y/k,D=u+v,C=u+M,O=b+v/D,A=x-M/C;if(t.beginPath(),n){let e=(P+S)/2;if(t.arc(r,o,c,P,e),t.arc(r,o,c,e,S),y>0){let e=sk(k,S,r,o);t.arc(e.x,e.y,y,S,x+tn)}let i=sk(C,x,r,o);if(t.lineTo(i.x,i.y),M>0){let e=sk(C,A,r,o);t.arc(e.x,e.y,M,x+tn,A+Math.PI)}let s=(x-M/u+(b+v/u))/2;if(t.arc(r,o,u,x-M/u,s,!0),t.arc(r,o,u,s,b+v/u,!0),v>0){let e=sk(D,O,r,o);t.arc(e.x,e.y,v,O+Math.PI,b-tn)}let a=sk(w,b,r,o);if(t.lineTo(a.x,a.y),_>0){let e=sk(w,P,r,o);t.arc(e.x,e.y,_,b-tn,P)}}else{t.moveTo(r,o);let e=Math.cos(P)*c+r,i=Math.sin(P)*c+o;t.lineTo(e,i);let s=Math.cos(S)*c+r,a=Math.sin(S)*c+o;t.lineTo(s,a)}t.closePath()}i(sM,"defaults",tQ),i(sM,"instances",sy),i(sM,"overrides",tq),i(sM,"registry",i9),i(sM,"version","4.5.1"),i(sM,"getChart",sv);class sS extends i0{inRange(t,e,i){let{angle:s,distance:a}=tm(this.getProps(["x","y"],i),{x:t,y:e}),{startAngle:n,endAngle:r,innerRadius:o,outerRadius:l,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=(this.options.spacing+this.options.borderWidth)/2,c=V(h,r-n),u=ty(s,n,r)&&n!==r,f=c>
1=te||u,g=tM(a,o+d,l+d);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,d=(n+r+l+o)/2;return{x:e+Math.cos(h)*d,y:i+Math.sin(h)*d}}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=.33*("inner"===e.borderAlign),this.fullCircles=i>te?Math.floor(i/te):0,0===i||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=s*(1-Math.sin(Math.min(tt,i||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,i,s,a){let{fullCircles:n,startAngle:r,circumference:o}=e,l=e.endAngle;if(n){sP(t,e,i,s,l,a);for(let e=0;e<n;++e)t.fill();isNaN(o)||(l=r+(o%te||te))}sP(t,e,i,s,l,a),t.fill()}(t,this,o,a,n),function(t,e,i,s,a){let{fullCircles:n,startAngle:r,circumference:o,options:l}=e,{borderWidth:h,borderJoinStyle:d,borderDash:c,borderDashOffset:u,borderRadius:f}=l,g="inner"===l.borderAlign;if(!h)return;t.setLineDash(c||[]),t.lineDashOffset=u,g?(t.lineWidth=2*h,t.lineJoin=d||"round"):(t.lineWidth=h,t.lineJoin=d||"bevel");let p=e.endAngle;if(n){sP(t,e,i,s,p,a);for(let e=0;e<n;++e)t.stroke();isNaN(o)||(p=r+(o%te||te))}g&&function(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+tn,s-tn),t.closePath(),t.clip()}(t,e,p),l.selfJoin&&p-r>=tt&&0===f&&"miter"!==d&&function(t,e,i){let{startAngle:s,x:a,y:n,outerRadius:r,innerRadius:o,options:l}=e,{borderWidth:h,borderJoinStyle:d}=l,c=Math.min(h/r,t_(s-i));if(t.beginPath(),t.arc(a,n,r-h/2,s+c/2,i-c/2),o>0){let e=Math.min(h/o,t_(s-i));t.arc(a,n,o+h/2,i-e/2,s+e/2,!0)}else{let e=Math.min(h/2,r*t_(s-i));if("round"===d)t.arc(a,n,e,i-tt/2,s+tt/2,!0);else if("bevel"===d){let r=2*e*e,o=-r*Math.cos(i+tt/2)+a,l=-r*Math.sin(i+tt/2)+n,h=r*Math.cos(s+tt/2)+a,d=r*Math.sin(s+tt/2)+n;t.lineTo(o,l),t.lineTo(h,d)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}(t,e,p),n||(sP(t,e,i,s,p,a),t.stroke())}(t,this,o,a,n),t.restore()}constructor(t){super(),i(this,"circumference",void 0),i(this,"endAngle",void 0),i(this,"fullCircles",void 0),i(this,"innerRadius",void 0),i(this,"outerRadius",void 0),i(this,"pixelMargin",void 0),i(this,"startAngle",void 0),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)}}function sD(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;t.lineCap=V(i.borderCapStyle,e.borderCapStyle),t.setLineDash(V(i.borderDash,e.borderDash)),t.lineDashOffset=V(i.borderDashOffset,e.borderDashOffset),t.lineJoin=V(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=V(i.borderWidth,e.borderWidth),t.strokeStyle=V(i.borderColor,e.borderColor)}function sC(t,e,i){t.lineTo(i.x,i.y)}function sO(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},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);return{count:s,start:l,loop:e.loop,ilen:h<l&&!(a<r&&n<r||a>o&&n>o)?s+h-l:h-l}}function sA(t,e,i,s){let a,n,r,{points:o,options:l}=e,{count:h,start:d,loop:c,ilen:u}=sO(o,i,s),f=l.stepped?t6:l.tension||"monotone"===l.cubicInterpolationMode?t7:sC,{move:g=!0,reverse:p}=s||{};for(a=0;a<=u;++a)(n=o[(d+(p?u-a:a))%h]).skip||(g?(t.moveTo(n.x,n.y),g=!1):f(t,r,n,p,l.stepped),r=n);return c&&f(t,r,n=o[(d+(p?u:0))%h],p,l.stepped),!!c}
1function sL(t,e,i,s){let a,n,r,o,l,h,d=e.points,{count:c,start:u,ilen:f}=sO(d,i,s),{move:g=!0,reverse:p}=s||{},m=0,b=0,x=t=>(u+(p?f-t:t))%c,_=()=>{o!==l&&(t.lineTo(m,l),t.lineTo(m,o),t.lineTo(m,h))};for(g&&(n=d[x(0)],t.moveTo(n.x,n.y)),a=0;a<=f;++a){if((n=d[x(a)]).skip)continue;let e=n.x,i=n.y,s=0|e;s===r?(i<o?o=i:i>l&&(l=i),m=(b*m+e)/++b):(_(),t.lineTo(e,i),r=s,b=0,o=l=i),h=i}_()}function sT(t){let e=t.options,i=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i?sA:sL}i(sS,"id","arc"),i(sS,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),i(sS,"defaultRoutes",{backgroundColor:"backgroundColor"}),i(sS,"descriptors",{_scriptable:!0,_indexable:t=>"borderDash"!==t});let sE="function"==typeof Path2D;class sR extends i0{updateControlPoints(t,e){let i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){let s=i.spanGaps?this._loop:this._fullLoop;!function(t,e,i,s,a){let n,r,o,l;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)!function(t){let e,i,s,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",n=eP(a),r=t.length,o=Array(r).fill(0),l=Array(r),h=ek(t,0);for(e=0;e<r;++e)if(i=s,s=h,h=ek(t,e+1),s){if(h){let t=h[a]-s[a];o[e]=0!==t?(h[n]-s[n])/t:0}l[e]=i?h?th(o[e-1])!==th(o[e])?0:(o[e-1]+o[e])/2:o[e-1]:o[e]}!function(t,e,i){let s,a,n,r,o,l=t.length,h=ek(t,0);for(let d=0;d<l-1;++d)if(o=h,h=ek(t,d+1),o&&h){if(td(e[d],0,ew)){i[d]=i[d+1]=0;continue}(r=Math.pow(s=i[d]/e[d],2)+Math.pow(a=i[d+1]/e[d],2))<=9||(n=3/Math.sqrt(r),i[d]=s*n*e[d],i[d+1]=a*n*e[d])}}(t,o,l),function(t,e){let i,s,a,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"x",r=eP(n),o=t.length,l=ek(t,0);for(let h=0;h<o;++h){if(s=a,a=l,l=ek(t,h+1),!a)continue;let o=a[n],d=a[r];s&&(i=(o-s[n])/3,a["cp1".concat(n)]=o-i,a["cp1".concat(r)]=d-i*e[h]),l&&(i=(l[n]-o)/3,a["cp2".concat(n)]=o+i,a["cp2".concat(r)]=d+i*e[h])}}(t,l,a)}(t,a);else{let i=s?t[t.length-1]:t[0];for(n=0,r=t.length;n<r;++n)l=function(t,e,i,s){let a=t.skip?e:t,n=i.skip?e:i,r=tb(e,a),o=tb(n,e),l=r/(r+o),h=o/(r+o);l=isNaN(l)?0:l,h=isNaN(h)?0:h;let d=s*l,c=s*h;return{previous:{x:e.x-d*(n.x-a.x),y:e.y-d*(n.y-a.y)},next:{x:e.x+c*(n.x-a.x),y:e.y+c*(n.y-a.y)}}}(i,o=t[n],t[Math.min(n+1,r-!s)%r],e.tension),o.cp1x=l.previous.x,o.cp1y=l.previous.y,o.cp2x=l.next.x,o.cp2y=l.next.y,i=o}e.capBezierPoints&&function(t,e){let i,s,a,n,r,o=t3(t[0],e);for(i=0,s=t.length;i<s;++i)r=n,n=o,o=i<s-1&&t3(t[i+1],e),n&&(a=t[i],r&&(a.cp1x=eS(a.cp1x,e.left,e.right),a.cp1y=eS(a.cp1y,e.top,e.bottom)),o&&(a.cp2x=eS(a.cp2x,e.left,e.right),a.cp2y=eS(a.cp2y,e.top,e.bottom)))}(t,i)}(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=function(t,e){let i=t.points,s=t.options.spanGaps,a=i.length;if(!a)return[];let n=!!t._loop,{start:r,end:o}=function(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{start:a,end:n%=e}}(i,a,n,s);if(!0===s)return eq(t,[{start:r,end:o,loop:n}],i,e);let l=o<r?o+a:o,h=!!t._fullLoop&&0===r&&o===a-1;return eq(t,function(t,e,i,s){let a,n=t.length,r=[],o=e,l=t[e];for(a=e+1;a<=i;++a){let i=t[a%n];i.skip||i.stop?l.skip||(s=!1,r.push({start:e%n,end:(a-1)%n,loop:s}),e=o=i.stop?a:null):(o=a,l.skip&&(e=a)),l=i}return null!==o&&r.push({start:e%n,end:o%n,loop:s}),r}(i,r,l,h),i,e)}(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,s,a=this.options,n=t[e],r=this.points,o=eX(this,{property:e,start:n,end:n});if(!o.length)return;let l=[],h=a.stepped?eB:a.tension||"monotone"===a.cubicInterpolationMode?eW:eI;for(i=0,s=o.length;i<s;++i){let{start:s,end:d}=o[i],c=r[s],u=r[d];if(c===u){l.push(c);continue}let f=Math.abs((n-c[e])/(u[e]-c[e])),g=h(c,u,f,a.stepped);g[e]=t[e],l.push(g)}return 1===l.length?l[0]:l}pathSegment(t,e,i){return sT(this)(t,this,e,i)}path(t,e,i){let s=this.segments,a=sT(this),n=this._loop;for(let r of(e=e||0,i=i||this.points.length-e,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(),function(t,e,
1i,s){if(sE&&!e.options.segment){let a;(a=e._path)||(a=e._path=new Path2D,e.path(a,i,s)&&a.closePath()),sD(t,e.options),t.stroke(a)}else{let{segments:a,options:n}=e,r=sT(e);for(let o of a)sD(t,n,o.style),t.beginPath(),r(t,e,o,{start:i,end:i+s-1})&&t.closePath(),t.stroke()}}(t,this,i,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}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)}}function sz(t,e,i,s){let a=t.options,{[i]:n}=t.getProps([i],s);return Math.abs(e-n)<a.radius+a.hitRadius}i(sR,"id","line"),i(sR,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),i(sR,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),i(sR,"descriptors",{_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t});class sF extends i0{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 sz(this,t,"x",e)}inYRange(t,e){return sz(this,t,"y",e)}getCenterPoint(t){let{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0,i=(e=Math.max(e,e&&t.hoverRadius||0))&&t.borderWidth||0;return(e+i)*2}draw(t,e){let i=this.options;!this.skip&&!(i.radius<.1)&&t3(this,e,this.size(i)/2)&&(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,t2(t,i,this.x,this.y))}getRange(){let t=this.options||{};return t.radius+t.hitRadius}constructor(t){super(),i(this,"parsed",void 0),i(this,"skip",void 0),i(this,"stop",void 0),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}}function sV(t,e){let i,s,a,n,r,{x:o,y:l,base:h,width:d,height:c}=t.getProps(["x","y","base","width","height"],e);return t.horizontal?(r=c/2,i=Math.min(o,h),s=Math.max(o,h),a=l-r,n=l+r):(i=o-(r=d/2),s=o+r,a=Math.min(l,h),n=Math.max(l,h)),{left:i,top:a,right:s,bottom:n}}function sI(t,e,i,s){return t?0:tv(e,i,s)}function sB(t,e,i,s){let a=null===e,n=null===i,r=t&&!(a&&n)&&sV(t,s);return r&&(a||tM(e,r.left,r.right))&&(n||tM(i,r.top,r.bottom))}function sW(t,e){t.rect(e.x,e.y,e.w,e.h)}function sj(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},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}}i(sF,"id","point"),i(sF,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),i(sF,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});class sH extends i0{draw(t){var e;let{inflateAmount:i,options:{borderColor:s,backgroundColor:a}}=this,{inner:n,outer:r}=function(t){let e=sV(t),i=e.right-e.left,s=e.bottom-e.top,a=function(t,e,i){let s=t.options.borderWidth,a=t.borderSkipped,n=en(s);return{t:sI(a.top,n.top,0,i),r:sI(a.right,n.right,0,e),b:sI(a.bottom,n.bottom,0,i),l:sI(a.left,n.left,0,e)}}(t,i/2,s/2),n=function(t,e,i){let{enableBorderRadius:s}=t.getProps(["enableBorderRadius"]),a=t.options.borderRadius,n=er(a),r=Math.min(e,i),o=t.borderSkipped,l=s||R(a);return{topLeft:sI(!l||o.top||o.left,n.topLeft,0,r),topRight:sI(!l||o.top||o.right,n.topRight,0,r),bottomLeft:sI(!l||o.bottom||o.left,n.bottomLeft,0,r),bottomRight:sI(!l||o.bottom||o.right,n.bottomRight,0,r)}}(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))}}}}(this),o=(e=r.radius).topLeft||e.topRight||e.bottomLeft||e.bottomRight?et:sW;t.save(),(r.w!==n.w||r.h!==n.h)&&(t.beginPath(),o(t,sj(r,i,n)),t.clip(),o(t,sj(n,-i,r)),t.fillStyle=s,t.fill("evenodd")),t.beginPath(),o(t,sj(n,i)),t.fillStyle=a,t.fill(),t.restore(
1)}inRange(t,e,i){return sB(this,t,e,i)}inXRange(t,e){return sB(this,t,null,e)}inYRange(t,e){return sB(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"x"===t?this.width/2:this.height/2}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)}}i(sH,"id","bar"),i(sH,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),i(sH,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var sN=Object.freeze({__proto__:null,ArcElement:sS,BarElement:sH,LineElement:sR,PointElement:sF});let sU=["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)"],s$=sU.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function sY(t){return sU[t%sU.length]}function sX(t){return s$[t%s$.length]}function sq(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function sK(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})}}function sJ(t){t.data.datasets.forEach(t=>{sK(t)})}function sZ(t,e,i,s){if(s)return;let a=e[t],n=i[t];return"angle"===t&&(a=t_(a),n=t_(n)),{property:t,start:a,end:n}}function sQ(t,e,i){for(;e>t;e--){let t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function sG(t,e,i,s){return t&&e?s(t[i],e[i]):t?t[i]:e?e[i]:0}function s0(t,e){let i=[],s=!1;return E(t)?(s=!0,i=t):i=function(t,e){let{x:i=null,y:s=null}=t||{},a=e.points,n=[];return e.segments.forEach(t=>{let{start:e,end:r}=t;r=sQ(e,r,a);let o=a[e],l=a[r];null!==s?(n.push({x:o.x,y:s}),n.push({x:l.x,y:s})):null!==i&&(n.push({x:i,y:o.y}),n.push({x:i,y:l.y}))}),n}(t,e),i.length?new sR({points:i,options:{tension:0},_loop:s,_fullLoop:s}):null}function s1(t){return t&&!1!==t.fill}class s2{pathSegment(t,e,i){let{x:s,y:a,radius:n}=this;return e=e||{start:0,end:te},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}}constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}}function s5(t,e,i){let s=function(t){let{chart:e,fill:i,line:s}=t;if(z(i)){var a,n=e,r=i;let t=n.getDatasetMeta(r);return t&&n.isDatasetVisible(r)?t.dataset:null}if("stack"===i)return function(t){let{scale:e,index:i,line:s}=t,a=[],n=s.segments,r=s.points,o=function(t,e){let i=[],s=t.getMatchingVisibleMetas("line");for(let t=0;t<s.length;t++){let a=s[t];if(a.index===e)break;a.hidden||i.unshift(a.dataset)}return i}(e,i);o.push(s0({x:null,y:e.bottom},s));for(let t=0;t<n.length;t++){let e=n[t];for(let t=e.start;t<=e.end;t++)!function(t,e,i){let s=[];for(let a=0;a<i.length;a++){let{first:n,last:r,point:o}=function(t,e,i){let s=t.interpolate(e,"x");if(!s)return{};let a=s[i],n=t.segments,r=t.points,o=!1,l=!1;for(let t=0;t<n.length;t++){let e=n[t],s=r[e.start][i],h=r[e.end][i];if(tM(a,s,h)){o=a===s,l=a===h;break}}return{first:o,last:l,point:s}}(i[a],e,"x");if(o&&(!n||!r)){if(n)s.unshift(o);else if(t.push(o),!r)break}}t.push(...s)}(a,r[t],o)}return new sR({points:a,options:{}})}(t);if("shape"===i)return!0;let o=((a=t).scale||{}).getPointPositionForValue?function(t){let{scale:e,fill:i}=t,s=e.options,a=e.getLabels().length,n=s.reverse?e.max:e.min,r="start"===i?n:"end"===i?e.options.reverse?e.min:e.max:R(i)?i.value:e.getBaseValue(),o=[];if(s.grid.circular){let t=e.getPointPositionForValue(0,n);return new s2({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(r)})}for(let t=0;t<a;++t)o.push(e.getPointPositionForValue(t,r));return o}(a):function(t){let e,{scale:i={},fill:s}=t,a=(e=null,"start"===s?e=i.bottom:"end"===s?e=i.top:R(s)?e=i.getPixelForValue(s.value):i.getBasePixel&&(e=i.getBasePixel()),e);if(z(a)){let t=i.isHorizontal();return{x:t?a:null,y:t?null:a}}return null}(a);return o instanceof s2?o:s0(o,s)}(e),{chart:a,index:n,line:r,scale:o,axis:l}=e,h=r.options,d=h.fill,c=h.backgroundColor,{above:u=c,below:f=c}=d||{},g=a.getDatasetMeta(n),p=eZ(a,g);s&&r.points.length&&(t8(t,i),function(t,e){let{line:i,target:s,above:a,below:n,area:r,scale:o,clip:l}=e,h=i._loop?"angle":e.axis;t.save();let d=n;n!==a&&("x"===h?(s3(t,s,r.top),s4(t,{line:i,target:s,color:a,scale:o,property:h,clip:l}
1),t.restore(),t.save(),s3(t,s,r.bottom)):"y"===h&&(s8(t,s,r.left),s4(t,{line:i,target:s,color:n,scale:o,property:h,clip:l}),t.restore(),t.save(),s8(t,s,r.right),d=a)),s4(t,{line:i,target:s,color:d,scale:o,property:h,clip:l}),t.restore()}(t,{line:r,target:s,above:u,below:f,area:i,scale:o,axis:l,clip:p}),t4(t))}function s3(t,e,i){let{segments:s,points:a}=e,n=!0,r=!1;for(let o of(t.beginPath(),s)){let{start:s,end:l}=o,h=a[s],d=a[sQ(s,l,a)];n?(t.moveTo(h.x,h.y),n=!1):(t.lineTo(h.x,i),t.lineTo(h.x,h.y)),(r=!!e.pathSegment(t,o,{move:r}))?t.closePath():t.lineTo(d.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function s8(t,e,i){let{segments:s,points:a}=e,n=!0,r=!1;for(let o of(t.beginPath(),s)){let{start:s,end:l}=o,h=a[s],d=a[sQ(s,l,a)];n?(t.moveTo(h.x,h.y),n=!1):(t.lineTo(i,h.y),t.lineTo(h.x,h.y)),(r=!!e.pathSegment(t,o,{move:r}))?t.closePath():t.lineTo(i,d.y)}t.lineTo(i,e.first().y),t.closePath(),t.clip()}function s4(t,e){let{line:i,target:s,property:a,color:n,scale:r,clip:o}=e;for(let{source:e,target:l,start:h,end:d}of function(t,e,i){let s=t.segments,a=t.points,n=e.points,r=[];for(let t of s){let{start:s,end:o}=t;o=sQ(s,o,a);let l=sZ(i,a[s],a[o],t.loop);if(!e.segments){r.push({source:t,target:l,start:a[s],end:a[o]});continue}for(let s of eX(e,l)){let e=sZ(i,n[s.start],n[s.end],s.loop);for(let n of eY(t,a,e))r.push({source:n,target:s,start:{[i]:sG(l,e,"start",Math.max)},end:{[i]:sG(l,e,"end",Math.min)}})}}return r}(i,s,a)){let c,{style:{backgroundColor:u=n}={}}=e,f=!0!==s;t.save(),t.fillStyle=u,function(t,e,i,s){let a=e.chart.chartArea,{property:n,start:r,end:o}=s||{};if("x"===n||"y"===n){let e,s,l,h;"x"===n?(e=r,s=a.top,l=o,h=a.bottom):(e=a.left,s=r,l=a.right,h=o),t.beginPath(),i&&(e=Math.max(e,i.left),l=Math.min(l,i.right),s=Math.max(s,i.top),h=Math.min(h,i.bottom)),t.rect(e,s,l-e,h-s),t.clip()}}(t,r,o,f&&sZ(a,h,d)),t.beginPath();let g=!!i.pathSegment(t,e);if(f){g?t.closePath():s6(t,s,d,a);let e=!!s.pathSegment(t,l,{move:g,reverse:!0});(c=g&&e)||s6(t,s,h,a)}t.closePath(),t.fill(c?"evenodd":"nonzero"),t.restore()}}function s6(t,e,i,s){let a=e.interpolate(i,s);a&&t.lineTo(a.x,a.y)}let s7=(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)}};class s9 extends i0{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=B(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(e=>t.filter(e,this.chart.data))),t.sort&&(e=e.sort((e,i)=>t.sort(e,i,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){let t,e,{options:i,ctx:s}=this;if(!i.display){this.width=this.height=0;return}let a=i.labels,n=el(a.font),r=n.size,o=this._computeTitleHeight(),{boxWidth:l,itemHeight:h}=s7(a,r);s.font=n.string,this.isHorizontal()?(t=this.maxWidth,e=this._fitRows(o,r,l,h)+10):(e=this.maxHeight,t=this._fitCols(o,n,l,h)+10),this.width=Math.min(t,i.maxWidth||this.maxWidth),this.height=Math.min(e,i.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,d=t;a.textAlign="left",a.textBaseline="middle";let c=-1,u=-h;return this.legendItems.forEach((t,f)=>{let g=i+e/2+a.measureText(t.text).width;(0===f||l[l.length-1]+g+2*r>n)&&(d+=h,l[l.length-(f>0?0:1)]=0,u+=h,c++),o[f]={left:0,top:u,row:c,width:g,height:s},l[l.length-1]+=g+r}),d}_fitCols(t,e,i,s){let{ctx:a,maxHeight:n,options:{labels:{padding:r}}}=this,o=this.legendHitBoxes=[],l=this.columnSizes=[],h=n-t,d=r,c=0,u=0,f=0,g=0;return this.legendItems.forEach((t,n)=>{var p,m,b,x,_,y,v,M,w,k,P,S;let D,C,{itemWidth:O,itemHeight:A}=(p=i,m=e,b=a,x=t,_=s,{itemWidth:(y=x,v=p,M=m,w=b,(D=y.text)&&"string"!=typeof D&&(D=D.reduce((t,e)=>t.length>e.length?t:e)),v+M.size/2+w.measureText(D).width),itemHeight:(k=_,P=x,S=m.lineHeight,C=k,"string"!=typeof P.text&&(C=at(P,S)),C)});n>0&&u+A+2*r>h&&(d+=c+r,l.push({width:c,height:u}),f+=c+r,g++,c=u=0),o[n]={left:f,top:u,col:g,width:O,height:A},c=Math.max(c,O),u+=A+r}),d+=c,l.push({width:c,height:u}),d}adjustHitBoxes(){if(!this.options.display)return;let t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:s},rtl:a}}=this,n=ej(a,this.left,this.width);if(this.isHorizontal()){let a=0,r=tT(i,this.left+s,this.right-this.lineWidths[a]);for(let o of e)a!==o.row&&(a=o.row,r=tT(i,this.left+s,this.right-this.lineWidths[a])),o.top+=this.top+t+s,o.left
1=n.leftForLtr(n.x(r),o.width),r+=o.width+s}else{let a=0,r=tT(i,this.top+t+s,this.bottom-this.columnSizes[a].height);for(let o of e)o.col!==a&&(a=o.col,r=tT(i,this.top+t+s,this.bottom-this.columnSizes[a].height)),o.top=r,o.left+=this.left+s,o.left=n.leftForLtr(n.x(o.left),o.width),r+=o.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){let t=this.ctx;t8(t,this),this._draw(),t4(t)}}_draw(){let t,{options:e,columnSizes:i,lineWidths:s,ctx:a}=this,{align:n,labels:r}=e,o=tQ.color,l=ej(e.rtl,this.left,this.width),h=el(r.font),{padding:d}=r,c=h.size,u=c/2;this.drawTitle(),a.textAlign=l.textAlign("left"),a.textBaseline="middle",a.lineWidth=.5,a.font=h.string;let{boxWidth:f,boxHeight:g,itemHeight:p}=s7(r,c),m=function(t,e,i){if(isNaN(f)||f<=0||isNaN(g)||g<0)return;a.save();let s=V(i.lineWidth,1);if(a.fillStyle=V(i.fillStyle,o),a.lineCap=V(i.lineCap,"butt"),a.lineDashOffset=V(i.lineDashOffset,0),a.lineJoin=V(i.lineJoin,"miter"),a.lineWidth=s,a.strokeStyle=V(i.strokeStyle,o),a.setLineDash(V(i.lineDash,[])),r.usePointStyle){let n={radius:g*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:s};t5(a,n,l.xPlus(t,f/2),e+u,r.pointStyleWidth&&f)}else{let n=e+Math.max((c-g)/2,0),r=l.leftForLtr(t,f),o=er(i.borderRadius);a.beginPath(),Object.values(o).some(t=>0!==t)?et(a,{x:r,y:n,w:f,h:g,radius:o}):a.rect(r,n,f,g),a.fill(),0!==s&&a.stroke()}a.restore()},b=function(t,e,i){t9(a,i.text,t,e+p/2,h,{strikethrough:i.hidden,textAlign:l.textAlign(i.textAlign)})},x=this.isHorizontal(),_=this._computeTitleHeight();t=x?{x:tT(n,this.left+d,this.right-s[0]),y:this.top+d+_,line:0}:{x:this.left+d,y:tT(n,this.top+_+d,this.bottom-i[0].height),line:0},eH(this.ctx,e.textDirection);let y=p+d;this.legendItems.forEach((o,c)=>{var g,p;a.strokeStyle=o.fontColor,a.fillStyle=o.fontColor;let v=a.measureText(o.text).width,M=l.textAlign(o.textAlign||(o.textAlign=r.textAlign)),w=f+u+v,k=t.x,P=t.y;if(l.setWidth(this.width),x?c>0&&k+w+d>this.right&&(P=t.y+=y,t.line++,k=t.x=tT(n,this.left+d,this.right-s[t.line])):c>0&&P+y>this.bottom&&(k=t.x=k+i[t.line].width+d,t.line++,P=t.y=tT(n,this.top+_+d,this.bottom-i[t.line].height)),m(l.x(k),P,o),g=k+f+u,p=x?k+w:this.right,k=M===(e.rtl?"left":"right")?p:"center"===M?(g+p)/2:g,b(l.x(k),P,o),x)t.x+=w+d;else if("string"!=typeof o.text){let e=h.lineHeight;t.y+=at(o,e)+d}else t.y+=y}),eN(this.ctx,e.textDirection)}drawTitle(){let t,e=this.options,i=e.title,s=el(i.font),a=eo(i.padding);if(!i.display)return;let n=ej(e.rtl,this.left,this.width),r=this.ctx,o=i.position,l=s.size/2,h=a.top+l,d=this.left,c=this.width;if(this.isHorizontal())c=Math.max(...this.lineWidths),t=this.top+h,d=tT(e.align,d,this.right-c);else{let i=this.columnSizes.reduce((t,e)=>Math.max(t,e.height),0);t=h+tT(e.align,this.top,this.bottom-i-e.labels.padding-this._computeTitleHeight())}let u=tT(o,d,d+c);r.textAlign=n.textAlign(tL(o)),r.textBaseline="middle",r.strokeStyle=i.color,r.fillStyle=i.color,r.font=s.string,t9(r,i.text,u,t,s)}_computeTitleHeight(){let t=this.options.title,e=el(t.font),i=eo(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,s,a;if(tM(t,this.left,this.right)&&tM(e,this.top,this.bottom)){for(i=0,a=this.legendHitBoxes;i<a.length;++i)if(tM(t,(s=a[i]).left,s.left+s.width)&&tM(e,s.top,s.top+s.height))return this.legendItems[i]}return null}handleEvent(t){var e,i;let s=this.options;if(e=t.type,i=s,("mousemove"!==e&&"mouseout"!==e||!i.onHover&&!i.onLeave)&&(!i.onClick||"click"!==e&&"mouseup"!==e))return;let a=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){let e=this._hoveredItem,i=null!==e&&null!==a&&e.datasetIndex===a.datasetIndex&&e.index===a.index;e&&!i&&B(s.onLeave,[t,e,this],this),this._hoveredItem=a,a&&!i&&B(s.onHover,[t,a,this],this)}else a&&B(s.onClick,[t,a,this],this)}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}}function at(t,e){return e*(t.text?t.text.length:0)}class ae extends i0{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=E(i.text)?i.text.length:1;this._padding=eo(i.padding);let a=s*el(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){let t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){let e,i,s,{top:a,left:n,bottom:r,right:o,options:l}=this,h=l.align,d=0;return this.isHorizontal()?(i=tT(h,n,o),s=a+t,e=o-n):("left"===l.position?(i=n+t,s=tT(h,r,a),d=-.5*tt):(i=o-t,s=tT(h,a,r),d=.5*tt),e=r-a),{titleX:i,titleY:s,maxWidth:e,rotation:d}}draw(){let t=this.ctx,e=this.options;if(!e.display)return;let i=el(e.font),s=i.lineHeight/2+this._padding.top,{titleX:a,titleY:n,maxWidth:r,rotation:o}=this._drawArgs(s);t9(t,e.text,0,0,i,{color:e.color,maxWidth:r,rotation:o,textAlign:tL(e.align),textBaseline:"middle",translation:[a,n]})}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}}let ai=new WeakMap,as={average(t){let e,i;if(!t.length)return!1;let s=new Set,a=0,n=0;for(e=0,i=t.length;e<i;++e){let i=t[e].element;if(i&&i.hasValue()){let t=i.tooltipPosition();s.add(t.x),a+=t.y,++n}}return 0!==n&&0!==s.size&&{x:[...s].reduce((t,e)=>t+e)/s.size,y:a/n}},nearest(t,e){let i,s,a;if(!t.length)return!1;let n=e.x,r=e.y,o=1/0;for(i=0,s=t.length;i<s;++i){let s=t[i].element;if(s&&s.hasValue()){let t=tb(e,s.getCenterPoint());t<o&&(o=t,a=s)}}if(a){let t=a.tooltipPosition();n=t.x,r=t.y}return{x:n,y:r}}};function aa(t,e){return e&&(E(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function an(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function ar(t,e){let i=t.chart.ctx,{body:s,footer:a,title:n}=t,{boxWidth:r,boxHeight:o}=e,l=el(e.bodyFont),h=el(e.titleFont),d=el(e.footerFont),c=n.length,u=a.length,f=s.length,g=eo(e.padding),p=g.height,m=0,b=s.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);b+=t.beforeBody.length+t.afterBody.length,c&&(p+=c*h.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),b&&(p+=f*(e.displayColors?Math.max(o,l.lineHeight):l.lineHeight)+(b-f)*l.lineHeight+(b-1)*e.bodySpacing),u&&(p+=e.footerMarginTop+u*d.lineHeight+(u-1)*e.footerSpacing);let x=0,_=function(t){m=Math.max(m,i.measureText(t).width+x)};return i.save(),i.font=h.string,W(t.title,_),i.font=l.string,W(t.beforeBody.concat(t.afterBody),_),x=e.displayColors?r+2+e.boxPadding:0,W(s,t=>{W(t.before,_),W(t.lines,_),W(t.after,_)}
1),x=0,i.font=d.string,W(t.footer,_),i.restore(),{width:m+=g.width,height:p}}function ao(t,e,i){let s=i.yAlign||e.yAlign||function(t,e){let{y:i,height:s}=e;return i<s/2?"top":i>t.height-s/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||function(t,e,i,s){let{x:a,width:n}=i,{width:r,chartArea:{left:o,right:l}}=t,h="center";return"center"===s?h=a<=(o+l)/2?"left":"right":a<=n/2?h="left":a>=r-n/2&&(h="right"),function(t,e,i,s){let{x:a,width:n}=s,r=i.caretSize+i.caretPadding;if("left"===t&&a+n+r>e.width||"right"===t&&a-n-r<0)return!0}(h,t,e,i)&&(h="center"),h}(t,e,i,s),yAlign:s}}function al(t,e,i,s){let{caretSize:a,caretPadding:n,cornerRadius:r}=t,{xAlign:o,yAlign:l}=i,h=a+n,{topLeft:d,topRight:c,bottomLeft:u,bottomRight:f}=er(r),g=function(t,e){let{x:i,width:s}=t;return"right"===e?i-=s:"center"===e&&(i-=s/2),i}(e,o),p=function(t,e,i){let{y:s,height:a}=t;return"top"===e?s+=i:"bottom"===e?s-=a+i:s-=a/2,s}(e,l,h);return"center"===l?"left"===o?g+=h:"right"===o&&(g-=h):"left"===o?g-=Math.max(d,u)+a:"right"===o&&(g+=Math.max(c,f)+a),{x:tv(g,0,s.width-e.width),y:tv(p,0,s.height-e.height)}}function ah(t,e,i){let s=eo(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-s.right:t.x+s.left}function ad(t,e){let i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}let ac={beforeTitle:A,title(t){if(t.length>0){let e=t[0],i=e.chart.data.labels,s=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex<s)return i[e.dataIndex]}return""},afterTitle:A,beforeBody:A,beforeLabel:A,label(t){if(this&&this.options&&"dataset"===this.options.mode)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:A,afterBody:A,beforeFooter:A,footer:A,afterFooter:A};function au(t,e,i,s){let a=t[e].call(i,s);return void 0===a?ac[e].call(i,s):a}class af extends i0{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 e2(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){var t;return this.$context||(this.$context=(t=this.chart.getContext(),ed(t,{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"})))}getTitle(t,e){let{callbacks:i}=e,s=au(i,"beforeTitle",this,t),a=au(i,"title",this,t),n=au(i,"afterTitle",this,t),r=[];return r=aa(r,an(s)),r=aa(r,an(a)),r=aa(r,an(n))}getBeforeBody(t,e){return aa([],an(au(e.callbacks,"beforeBody",this,t)))}getBody(t,e){let{callbacks:i}=e,s=[];return W(t,t=>{let e={before:[],lines:[],after:[]},a=ad(i,t);aa(e.before,an(au(a,"beforeLabel",this,t))),aa(e.lines,au(a,"label",this,t)),aa(e.after,an(au(a,"afterLabel",this,t))),s.push(e)}),s}getAfterBody(t,e){return aa([],an(au(e.callbacks,"afterBody",this,t)))}getFooter(t,e){let{callbacks:i}=e,s=au(i,"beforeFooter",this,t),a=au(i,"footer",this,t),n=au(i,"afterFooter",this,t),r=[];return r=aa(r,an(s)),r=aa(r,an(a)),r=aa(r,an(n))}_createItems(t){let e,i,s=this._active,a=this.chart.data,n=[],r=[],o=[],l=[];for(e=0,i=s.length;e<i;++e)l.push(function(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}}(this.chart,s[e]));return t.filter&&(l=l.filter((e,i,s)=>t.filter(e,i,s,a))),t.itemSort&&(l=l.sort((e,i)=>t.itemSort(e,i,a))),W(l,e=>{let i=ad(t.callbacks,e);n.push(au(i,"labelColor",this,e)),r.push(au(i,"labelPointStyle",this,e)),o.push(au(i,"labelTextColor",this,e))}),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){let i,s=this.options.setContext(this.getContext()),a=this._active,n=[];if(a.length){let t=as[s.position].call(this,a,this._eventPosition);n=this._createItems(s),this.title=this.getTitle(n,s),this.beforeBody=this.getBeforeBody(n,s),this.body=this.getBody(n,s),this.afterBody=this.getAfterBody(n,s),this.footer=this.getFooter(n,s);let e=this._size=ar(this,s),r=Object.assign({},t,e),o=ao(this.chart,s,r),l=al(s,r,o,this.chart);this.xAlign=o.xAlign,this.yAlign=o.yAlign,i={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(i={opacity:0}
1);this._tooltipItems=n,this.$context=void 0,i&&this._resolveAnimations().update(this,i),t&&s.external&&s.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 s,a,n,r,o,l,{xAlign:h,yAlign:d}=this,{caretSize:c,cornerRadius:u}=i,{topLeft:f,topRight:g,bottomLeft:p,bottomRight:m}=er(u),{x:b,y:x}=t,{width:_,height:y}=e;return"center"===d?(o=x+y/2,"left"===h?(a=(s=b)-c,r=o+c,l=o-c):(a=(s=b+_)+c,r=o-c,l=o+c),n=s):(a="left"===h?b+Math.max(f,p)+c:"right"===h?b+_-Math.max(g,m)-c:this.caretX,"top"===d?(o=(r=x)-c,s=a-c,n=a+c):(o=(r=x+y)+c,s=a+c,n=a-c),l=r),{x1:s,x2:a,x3:n,y1:r,y2:o,y3:l}}drawTitle(t,e,i){let s,a,n,r=this.title,o=r.length;if(o){let l=ej(i.rtl,this.x,this.width);for(n=0,t.x=ah(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",s=el(i.titleFont),a=i.titleSpacing,e.fillStyle=i.titleColor,e.font=s.string;n<o;++n)e.fillText(r[n],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+a,n+1===o&&(t.y+=i.titleMarginBottom-a)}}_drawColorBox(t,e,i,s,a){let n=this.labelColors[i],r=this.labelPointStyles[i],{boxHeight:o,boxWidth:l}=a,h=el(a.bodyFont),d=ah(this,"left",a),c=s.x(d),u=o<h.lineHeight?(h.lineHeight-o)/2:0,f=e.y+u;if(a.usePointStyle){let e={radius:Math.min(l,o)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},i=s.leftForLtr(c,l)+l/2,h=f+o/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,t2(t,e,i,h),t.strokeStyle=n.borderColor,t.fillStyle=n.backgroundColor,t2(t,e,i,h)}else{t.lineWidth=R(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 e=s.leftForLtr(c,l),i=s.leftForLtr(s.xPlus(c,1),l-2),r=er(n.borderRadius);Object.values(r).some(t=>0!==t)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,et(t,{x:e,y:f,w:l,h:o,radius:r}),t.fill(),t.stroke(),t.fillStyle=n.backgroundColor,t.beginPath(),et(t,{x:i,y:f+1,w:l-2,h:o-2,radius:r}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(e,f,l,o),t.strokeRect(e,f,l,o),t.fillStyle=n.backgroundColor,t.fillRect(i,f+1,l-2,o-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){let s,a,n,r,o,l,{body:h}=this,{bodySpacing:d,bodyAlign:c,displayColors:u,boxHeight:f,boxWidth:g,boxPadding:p}=i,m=el(i.bodyFont),b=m.lineHeight,x=0,_=ej(i.rtl,this.x,this.width),y=function(i){e.fillText(i,_.x(t.x+x),t.y+b/2),t.y+=b+d},v=_.textAlign(c);for(e.textAlign=c,e.textBaseline="middle",e.font=m.string,t.x=ah(this,v,i),e.fillStyle=i.bodyColor,W(this.beforeBody,y),x=u&&"right"!==v?"center"===c?g/2+p:g+2+p:0,n=0,o=h.length;n<o;++n){for(s=h[n],e.fillStyle=this.labelTextColors[n],W(s.before,y),a=s.lines,u&&a.length&&(this._drawColorBox(e,t,n,_,i),b=Math.max(m.lineHeight,f)),r=0,l=a.length;r<l;++r)y(a[r]),b=m.lineHeight;W(s.after,y)}x=0,b=m.lineHeight,W(this.afterBody,y),t.y-=d}drawFooter(t,e,i){let s,a,n=this.footer,r=n.length;if(r){let o=ej(i.rtl,this.x,this.width);for(t.x=ah(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=o.textAlign(i.footerAlign),e.textBaseline="middle",s=el(i.footerFont),e.fillStyle=i.footerColor,e.font=s.string,a=0;a<r;++a)e.fillText(n[a],o.x(t.x),t.y+s.lineHeight/2),t.y+=s.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:d,topRight:c,bottomLeft:u,bottomRight:f}=er(s.cornerRadius);e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.beginPath(),e.moveTo(r+d,o),"top"===n&&this.drawCaret(t,e,i,s),e.lineTo(r+l-c,o),e.quadraticCurveTo(r+l,o,r+l,o+c),"center"===n&&"right"===a&&this.drawCaret(t,e,i,s),e.lineTo(r+l,o+h-f),e.quadraticCurveTo(r+l,o+h,r+l-f,o+h),"bottom"===n&&this.drawCaret(t,e,i,s),e.lineTo(r+u,o+h),e.quadraticCurveTo(r,o+h,r,o+h-u),"center"===n&&"left"===a&&this.drawCaret(t,e,i,s),e.lineTo(r,o+d),e.quadraticCurveTo(r,o,r+d,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 i=as[t.position].call(this,this._active,this._eventPosition);if(!i)return;let n=this._size=ar(this,t),r=Object.assign({},i,this._size),o=ao(e,t,r),l=al(t,r,o,e);
1(s._to!==l.x||a._to!==l.y)&&(this.xAlign=o.xAlign,this.yAlign=o.yAlign,this.width=n.width,this.height=n.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_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=.001>Math.abs(i)?0:i;let n=eo(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),eH(t,e.textDirection),a.y+=n.top,this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),eN(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){let i=this._active,s=t.map(t=>{let{datasetIndex:e,index:i}=t,s=this.chart.getDatasetMeta(e);if(!s)throw Error("Cannot find a dataset at index "+e);return{datasetIndex:e,element:s.data[i],index:i}}),a=!j(i,s),n=this._positionChanged(s,e);(a||n)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];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||!j(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("mouseout"===t.type)return[];if(!s)return e.filter(t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index));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=as[a.position].call(this,t,e);return!1!==n&&(i!==n.x||s!==n.y)}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}}i(af,"positioners",as);var ag=Object.freeze({__proto__:null,Colors:{id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,i){let s;if(!i.enabled)return;let{data:{datasets:a},options:n}=t.config,{elements:r}=n,o=sq(a)||n&&(n.borderColor||n.backgroundColor)||r&&sq(r)||"rgba(0,0,0,0.1)"!==tQ.borderColor||"rgba(0,0,0,0.1)"!==tQ.backgroundColor;if(!i.forceOverride&&o)return;let l=(s=0,(e,i)=>{var a,n,r;let o=t.getDatasetMeta(i).controller;o instanceof iu?(a=s,e.backgroundColor=e.data.map(()=>sY(a++)),s=a):o instanceof ip?(n=s,e.backgroundColor=e.data.map(()=>sX(n++)),s=n):o&&(e.borderColor=sY(r=s),e.backgroundColor=sX(r),s=++r)});a.forEach(l)}},Decimation:{id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void sJ(t);let s=t.width;t.data.datasets.forEach((e,a)=>{let n,{_data:r,indexAxis:o}=e,l=t.getDatasetMeta(a),h=r||e.data;if("y"===eh([o,t.options.indexAxis])||!l.controller.supportsDecimation)return;let d=t.scales[l.xAxisID];if("linear"!==d.type&&"time"!==d.type||t.options.parsing)return;let{start:c,count:u}=function(t,e){let i,s=e.length,a=0,{iScale:n}=t,{min:r,max:o,minDefined:l,maxDefined:h}=n.getUserBounds();return l&&(a=tv(tk(e,n.axis,r).lo,0,s-1)),i=h?tv(tk(e,n.axis,o).hi+1,a,s)-a:s-a,{start:a,count:i}}(l,h);if(u<=(i.threshold||4*s))return void sK(e);switch(T(r)&&(e._data=h,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}}
1)),i.algorithm){case"lttb":n=function(t,e,i,s,a){let n,r,o,l,h,d=a.samples||s;if(d>=i)return t.slice(e,e+i);let c=[],u=(i-2)/(d-2),f=0,g=e+i-1,p=e;for(n=0,c[f++]=t[p];n<d-2;n++){let s,a=0,d=0,g=Math.floor((n+1)*u)+1+e,m=Math.min(Math.floor((n+2)*u)+1,i)+e,b=m-g;for(s=g;s<m;s++)a+=t[s].x,d+=t[s].y;a/=b,d/=b;let x=Math.floor(n*u)+1+e,_=Math.min(Math.floor((n+1)*u)+1,i)+e,{x:y,y:v}=t[p];for(o=l=-1,s=x;s<_;s++)(l=.5*Math.abs((y-a)*(t[s].y-v)-(y-t[s].x)*(d-v)))>o&&(o=l,r=t[s],h=s);c[f++]=r,p=h}return c[f++]=t[g],c}(h,c,u,s,i);break;case"min-max":n=function(t,e,i,s){let a,n,r,o,l,h,d,c,u,f,g=0,p=0,m=[],b=t[e].x,x=t[e+i-1].x-b;for(a=e;a<e+i;++a){r=((n=t[a]).x-b)/x*s,o=n.y;let e=0|r;if(e===l)o<u?(u=o,h=a):o>f&&(f=o,d=a),g=(p*g+n.x)/++p;else{let i=a-1;if(!T(h)&&!T(d)){let e=Math.min(h,d),s=Math.max(h,d);e!==c&&e!==i&&m.push({...t[e],x:g}),s!==c&&s!==i&&m.push({...t[s],x:g})}a>0&&i!==c&&m.push(t[i]),m.push(n),l=e,p=0,u=f=o,h=d=c=a}}return m}(h,c,u,s);break;default:throw Error("Unsupported decimation algorithm '".concat(i.algorithm,"'"))}e._decimated=n})},destroy(t){sJ(t)}}
1,Filler:{id:"filler",afterDatasetsUpdate(t,e,i){let s,a,n,r,o=(t.data.datasets||[]).length,l=[];for(a=0;a<o;++a)n=(s=t.getDatasetMeta(a)).dataset,r=null,n&&n.options&&n instanceof sR&&(r={visible:t.isDatasetVisible(a),index:a,fill:function(t,e,i){var s,a,n,r;let o=function(t){let e=t.options,i=e.fill,s=V(i&&i.target,i);return void 0===s&&(s=!!e.backgroundColor),!1!==s&&null!==s&&(!0===s?"origin":s)}(t);if(R(o))return!isNaN(o.value)&&o;let l=parseFloat(o);return z(l)&&Math.floor(l)===l?(s=o[0],a=e,n=l,r=i,("-"===s||"+"===s)&&(n=a+n),n!==a&&!(n<0)&&!(n>=r)&&n):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}(n,a,o),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:n}),s.$filler=r,l.push(r);for(a=0;a<o;++a)(r=l[a])&&!1!==r.fill&&(r.fill=function(t,e,i){let s,a=t[e].fill,n=[e];if(!i)return a;for(;!1!==a&&-1===n.indexOf(a);){if(!z(a))return a;if(!(s=t[a]))break;if(s.visible)return a;n.push(a),a=s.fill}return!1}(l,a,i.propagate))},beforeDraw(t,e,i){let s="beforeDraw"===i.drawTime,a=t.getSortedVisibleDatasetMetas(),n=t.chartArea;for(let e=a.length-1;e>=0;--e){let i=a[e].$filler;i&&(i.line.updateControlPoints(n,i.axis),s&&i.fill&&s5(t.ctx,i,n))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;let s=t.getSortedVisibleDatasetMetas();for(let e=s.length-1;e>=0;--e){let i=s[e].$filler;s1(i)&&s5(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){let s=e.meta.$filler;s1(s)&&"beforeDatasetDraw"===i.drawTime&&s5(t.ctx,s,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},Legend:{id:"legend",_element:s9,start(t,e,i){let s=t.legend=new s9({ctx:t.ctx,options:i,chart:t});iV.configure(t,s,i),iV.addBox(t,s)},stop(t){iV.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){let s=t.legend;iV.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(t=>{let l=t.controller.getStyle(i?0:void 0),h=eo(l.borderWidth);return{text:e[t.index].label,fillStyle:l.backgroundColor,fontColor:n,hidden:!t.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:l.borderColor,pointStyle:s||l.pointStyle,rotation:l.rotation,textAlign:a||l.textAlign,borderRadius:r&&(o||l.borderRadius),datasetIndex:t.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)}}},SubTitle:{id:"subtitle",start(t,e,i){let s=new ae({ctx:t.ctx,options:i,chart:t});iV.configure(t,s,i),iV.addBox(t,s),ai.set(t,s)},stop(t){iV.removeBox(t,ai.get(t)),ai.delete(t)},beforeUpdate(t,e,i){let s=ai.get(t);iV.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}},Title:{id:"title",_element:ae,start(t,e,i){let s=new ae({ctx:t.ctx,options:i,chart:t});iV.configure(t,s,i),iV.addBox(t,s),t.titleBlock=s},stop(t){let e=t.titleBlock;iV.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){let s=t.titleBlock;iV.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}},Tooltip:{id:"tooltip",_element:af,positioners:as,afterInit(t,e,i){i&&(t.tooltip=new af({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(!1===t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))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)=>
1e.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:ac},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]}});function ap(t){let e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class am extends i6{init(t){let e=this._addedLabels;if(e.length){let t=this.getLabels();for(let{index:i,label:s}of e)t[i]===s&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){let i,s;if(T(t))return null;let a=this.getLabels();return i=e=isFinite(e)&&a[e]===t?e:function(t,e,i,s){let a=t.indexOf(e);if(-1===a){var n;return n=i,"string"==typeof e?(n=t.push(e)-1,s.unshift({index:n,label:e})):isNaN(e)&&(n=null),n}return a!==t.lastIndexOf(e)?i:a}(a,t,V(e,t),this._addedLabels),s=a.length-1,null===i?null:tv(Math.round(i),0,s)}determineDataLimits(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),{min:i,max:s}=this.getMinMax(!0);"ticks"===this.options.bounds&&(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=0===t&&e===a.length-1?a:a.slice(t,e+1),this._valueRange=Math.max(a.length-!i,1),this._startValue=this.min-.5*!!i;for(let i=t;i<=e;i++)s.push({value:i});return s}getLabelForValue(t){return ap.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?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}constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}}function ab(t,e,i){let{horizontal:s,minRotation:a}=i,n=tg(a),r=(s?Math.sin(n):Math.cos(n))||.001,o=.75*e*(""+t).length;return Math.min(e/r,o)}i(am,"id","category"),i(am,"defaults",{ticks:{callback:ap}});class ax extends i6{parse(t,e){return T(t)||("number"==typeof t||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=t=>s=e?s:t,r=t=>a=i?a:t;if(t){let t=th(s),e=th(a);t<0&&e<0?r(0):t>0&&e>0&&n(0)}if(s===a){let e=0===a?1:Math.abs(.05*a);r(a+e),t||n(s-e)}this.min=s,this.max=a}getTickLimit(){let t,{maxTicksLimit:e,stepSize:i}=this.options.ticks;return i?(t=Math.ceil(this.max/i)-Math.floor(this.min/i)+1)>1e3&&(console.warn("scales.".concat(this.id,".ticks.stepSize: ").concat(i," would result generating up to ").concat(t," ticks. Limiting to 1000.")),t=1e3):(t=this.computeTickLimit(),e=e||11),e&&(t=Math.min(e,t)),t}computeTickLimit(){return 1/0}buildTicks(){let t=this.options,e=t.ticks,i=this.getTickLimit(),s=function(t,e){let i,s,a,n,r=[],{bounds:o,step:l,min:h,max:d,precision:c,count:u,maxTicks:f,maxDigits:g,includeBounds:p}=t,m=l||1,b=f-1,{min:x,max:_}=e,y=!T(h),v=!T(d),M=!T(u),w=(_-x)/(g+1),k=tc((_-x)/b/m)*m;if(k<1e-14&&!y&&!v)return[{value:x},{value:_}];(n=Math.ceil(_/k)-Math.floor(x/k))>b&&(k=tc(n*k/b/m)*m),T(c)||(k=Math.ceil(k*(i=Math.pow(10,c)))/i),"ticks"===o?(s=Math.floor(x/k)*k,a=Math.ceil(_/k)*k):(s=x,a=_),y&&v&&l&&function(t,e){let i=Math.round(t);return i-e<=t&&i+e>=t}((d-h)/l,k/1e3)?(n=Math.round(Math.min((d-h)/k,f)),k=(d-h)/n,s=h,a=d):M?(s=y?h:s,k=((a=v?d:a)-s)/(n=u-1)):n=td(n=(a-s)/k,Math.round(n),k/1e3)?Math.round(n):Math.ceil(n);let P=Math.max(tp(k),tp(s));s=Math.round(s*(i=Math.pow(10,T(c)?P:c)))/i,a=Math.round(a*i)/i;let S=0;for(y&&(p&&s!==h?(r.push({value:h}),s<h&&S++,td(Math.round((s+S*k)*i)/i,h,ab(h,w,t))&&S++):s<h&&S++);S<n;++S){let t=Math.round((s+S*k)*i)/i;if(v&&t>d)break;r.push({value:t})}return v&&p&&a!==d?r.length&&td(r[r.length-1].value,d,ab(d,w,t))?r[r.length-1].value=d:r.push({value:d}):v&&a!==d||r.push({value:a}),r}({maxTicks:i=Math.max(2,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:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&tf(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}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 t$(t,this.chart.options.locale,this.options.ticks.format)}constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}}class a_ extends ax{determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=z(t)?t:0,this.max=z(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){let t=this.isHorizontal(),e=t?this.width:this.height,i=tg(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001;return Math.ceil(e/Math.min(40,this._resolveTickFontOptions(0).lineHeight/s))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}i(a_,"id","linear"),i(a_,"defaults",{ticks:{callback:tX.formatters.numeric}});let ay=t=>Math.floor(tl(t)),av=(t,e)=>Math.pow(10,ay(t)+e);function aM(t){return 1==t/Math.pow(10,ay(t))}function aw(t,e,i){let s=Math.pow(10,i),a=Math.floor(t/s);return Math.ceil(e/s)-a}class ak extends i6{parse(t,e){let i=ax.prototype.parse.apply(this,[t,e]);if(0===i){this._zero=!0;return}return z(i)&&i>0?i:null}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=z(t)?Math.max(0,t):null,this.max=z(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!z(this._userMin)&&(this.min=t===av(this.min,0)?av(this.min,-1):av(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),i=this.min,s=this.max,a=e=>i=t?i:e,n=t=>s=e?s:t;i===s&&(i<=0?(a(1),n(10)):(a(av(i,-1)),n(av(s,1)))),i<=0&&a(av(s,-1)),s<=0&&n(av(i,1)),this.min=i,this.max=s}buildTicks(){let t=this.options,e=function(t,e){let{min:i,max:s}=e;i=F(t.min,i);let a=[],n=ay(i),r=function(t,e){let i=ay(e-t);for(;aw(t,e,i)>10;)i++;for(;10>
1aw(t,e,i);)i--;return Math.min(i,ay(t))}(i,s),o=r<0?Math.pow(10,Math.abs(r)):1,l=Math.pow(10,r),h=n>r?Math.pow(10,n):0,d=Math.round((i-h)*o)/o,c=Math.floor((i-h)/l/10)*l*10,u=Math.floor((d-c)/Math.pow(10,r)),f=F(t.min,Math.round((h+c+u*Math.pow(10,r))*o)/o);for(;f<s;)a.push({value:f,major:aM(f),significand:u}),u>=10?u=u<15?15:20:u++,u>=20&&(u=2,o=++r>=0?1:o),f=Math.round((h+c+u*Math.pow(10,r))*o)/o;let g=F(t.max,f);return a.push({value:g,major:aM(g),significand:u}),a}({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&tf(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":t$(t,this.chart.options.locale,this.options.ticks.format)}configure(){let t=this.min;super.configure(),this._startValue=tl(t),this._valueRange=tl(this.max)-tl(t)}getPixelForValue(t){return((void 0===t||0===t)&&(t=this.min),null===t||isNaN(t))?NaN:this.getPixelForDecimal(t===this.min?0:(tl(t)-this._startValue)/this._valueRange)}getValueForPixel(t){let e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}}function aP(t){let e=t.ticks;if(e.display&&t.display){let t=eo(e.backdropPadding);return V(e.font&&e.font.size,tQ.font.size)+t.height}return 0}function aS(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}}function aD(t,e,i,s){let{ctx:a}=t;if(i)a.arc(t.xCenter,t.yCenter,e,0,te);else{let i=t.getPointPosition(0,e);a.moveTo(i.x,i.y);for(let n=1;n<s;n++)i=t.getPointPosition(n,e),a.lineTo(i.x,i.y)}}i(ak,"id","logarithmic"),i(ak,"defaults",{ticks:{callback:tX.formatters.logarithmic,major:{enabled:!0}}});class aC extends ax{setDimensions(){let t=this._padding=eo(aP(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=z(t)&&!isNaN(t)?t:0,this.max=z(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/aP(this.options))}generateTickLabels(t){ax.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((t,e)=>{let i=B(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){let t=this.options;t.display&&t.pointLabels.display?function(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?tt/n:0;for(let d=0;d<n;d++){var l,h;let n=r.setContext(t.getPointLabelContext(d));a[d]=n.padding;let c=t.getPointPosition(d,t.drawingArea+a[d],o),u=el(n.font),f=(l=t.ctx,h=E(h=t._pointLabels[d])?h:[h],{w:function(t,e,i,s){let a,n,r,o,l,h=(s=s||{}).data=s.data||{},d=s.garbageCollect=s.garbageCollect||[];s.font!==e&&(h=s.data={},d=s.garbageCollect=[],s.font=e),t.save(),t.font=e;let c=0,u=i.length;for(a=0;a<u;a++)if(null==(o=i[a])||E(o)){if(E(o))for(n=0,r=o.length;n<r;n++)null==(l=o[n])||E(l)||(c=tG(t,h,d,c,l))}else c=tG(t,h,d,c,o);t.restore();let f=d.length/2;if(f>i.length){for(a=0;a<f;a++)delete h[d[a]];d.splice(0,f)}return c}(l,u.string,h),h:h.length*u.lineHeight});s[d]=f;let g=t_(t.getIndexAngle(d)+o),p=Math.round(180/tt*g);!function(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))}(i,e,g,aS(p,c.x,f.w,0,180),aS(p,c.y,f.h,90,270))}t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=function(t,e,i){let s,a=[],n=t._pointLabels.length,r=t.options,{centerPointLabels:o,display:l}=r.pointLabels,h={extra:aP(r)/2,additionalAngle:o?tt/n:0};for(let r=0;r<n;r++){h.padding=i[r],h.size=e[r];
1let n=function(t,e,i){var s,a,n,r,o,l,h;let d=t.drawingArea,{extra:c,additionalAngle:u,padding:f,size:g}=i,p=t.getPointPosition(e,d+c+f,u),m=Math.round(180/tt*t_(p.angle+tn)),b=(s=p.y,a=g.h,90===(n=m)||270===n?s-=a/2:(n>270||n<90)&&(s-=a),s),x=0===(r=m)||180===r?"center":r<180?"left":"right",_=(o=p.x,l=g.w,"right"===(h=x)?o-=l:"center"===h&&(o-=l/2),o);return{visible:!0,x:p.x,y:b,textAlign:x,left:_,top:b,right:_+g.w,bottom:b+g.h}}(t,r,h);a.push(n),"auto"===l&&(n.visible=function(t,e){if(!e)return!0;let{left:i,top:s,right:a,bottom:n}=t;return!(t3({x:i,y:s},e)||t3({x:i,y:n},e)||t3({x:a,y:s},e)||t3({x:a,y:n},e))}(n,s),n.visible&&(s=n))}return a}(t,s,a)}(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){return t_(t*(te/(this._pointLabels.length||1))+tg(this.options.startAngle||0))}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){var i;let s=e[t];return i=this.getContext(),ed(i,{label:s,index:t,type:"pointLabel"})}}getPointPosition(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=this.getIndexAngle(t)-tn+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(),aD(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){let t,e,i,s=this.ctx,a=this.options,{angleLines:n,grid:r,border:o}=a,l=this._pointLabels.length;if(a.pointLabels.display&&function(t,e){let{ctx:i,options:{pointLabels:s}}=t;for(let a=e-1;a>=0;a--){let e=t._pointLabelItems[a];if(!e.visible)continue;let n=s.setContext(t.getPointLabelContext(a));!function(t,e,i){let{left:s,top:a,right:n,bottom:r}=i,{backdropColor:o}=e;if(!T(o)){let i=er(e.borderRadius),l=eo(e.backdropPadding);t.fillStyle=o;let h=s-l.left,d=a-l.top,c=n-s+l.width,u=r-a+l.height;Object.values(i).some(t=>0!==t)?(t.beginPath(),et(t,{x:h,y:d,w:c,h:u,radius:i}
1),t.fill()):t.fillRect(h,d,c,u)}}(i,n,e);let r=el(n.font),{x:o,y:l,textAlign:h}=e;t9(i,t._pointLabels[a],o,l+r.lineHeight/2,r,{color:n.color,textAlign:h,textBaseline:"middle"})}}(this,l),r.display&&this.ticks.forEach((t,i)=>{if(0!==i||0===i&&this.min<0){e=this.getDistanceFromCenterForValue(t.value);let s=this.getContext(i),a=r.setContext(s),n=o.setContext(s);!function(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(),aD(t,i,r,s),n.closePath(),n.stroke(),n.restore())}(this,a,e,l,n)}}),n.display){for(s.save(),t=l-1;t>=0;t--){let r=n.setContext(this.getPointLabelContext(t)),{color:o,lineWidth:l}=r;l&&o&&(s.lineWidth=l,s.strokeStyle=o,s.setLineDash(r.borderDash),s.lineDashOffset=r.borderDashOffset,e=this.getDistanceFromCenterForValue(a.reverse?this.min:this.max),i=this.getPointPosition(t,e),s.beginPath(),s.moveTo(this.xCenter,this.yCenter),s.lineTo(i.x,i.y),s.stroke())}s.restore()}}drawBorder(){}drawLabels(){let t,e,i=this.ctx,s=this.options,a=s.ticks;if(!a.display)return;let n=this.getIndexAngle(0);i.save(),i.translate(this.xCenter,this.yCenter),i.rotate(n),i.textAlign="center",i.textBaseline="middle",this.ticks.forEach((n,r)=>{if(0===r&&this.min>=0&&!s.reverse)return;let o=a.setContext(this.getContext(r)),l=el(o.font);if(t=this.getDistanceFromCenterForValue(this.ticks[r].value),o.showLabelBackdrop){i.font=l.string,e=i.measureText(n.label).width,i.fillStyle=o.backdropColor;let s=eo(o.backdropPadding);i.fillRect(-e/2-s.left,-t-l.size/2-s.top,e+s.width,l.size+s.height)}t9(i,n.label,0,-t,l,{color:o.color,strokeColor:o.textStrokeColor,strokeWidth:o.textStrokeWidth})}),i.restore()}drawTitle(){}constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}}i(aC,"id","radialLinear"),i(aC,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:tX.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}}),i(aC,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),i(aC,"descriptors",{angleLines:{_fallback:"grid"}});let aO={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}},aA=Object.keys(aO);function aL(t,e){return t-e}function aT(t,e){if(T(e))return null;let i=t._adapter,{parser:s,round:a,isoWeekday:n}=t._parseOpts,r=e;return("function"==typeof s&&(r=s(r)),z(r)||(r="string"==typeof s?i.parse(r,s):i.parse(r)),null===r)?null:(a&&(r="week"===a&&(tu(n)||!0===n)?i.startOf(r,"isoWeek",n):i.startOf(r,a)),+r)}function aE(t,e,i,s){let a=aA.length;for(let n=aA.indexOf(t);n<a-1;++n){let t=aO[aA[n]],a=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(a*t.size))<=s)return aA[n]}return aA[a-1]}function aR(t,e,i){if(i){if(i.length){let{lo:s,hi:a}=tw(i,e);t[i[s]>=e?i[s]:i[a]]=!0}}else t[e]=!0}function az(t,e,i){let s,a,n=[],r={},o=e.length;for(s=0;s<o;++s)r[a=e[s]]=s,n.push({value:a,major:!1});return 0!==o&&i?function(t,e,i,s){let a,n,r=t._adapter,o=+r.startOf(e[0].value,s),l=e[e.length-1].value;for(a=o;a<=l;a=+r.add(a,1,s))(n=i[a])>=0&&(e[n].major=!0);return e}(t,n,r,i):n}class aF extends i6{init(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
1,i=t.time||(t.time={}),s=this._adapter=new iM._date(t.adapters.date);s.init(e),Y(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 void 0===t?null:aT(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(t){n||isNaN(t.min)||(s=Math.min(s,t.min)),r||isNaN(t.max)||(a=Math.max(a,t.max))}n&&r||(o(this._getLabelBounds()),("ticks"!==t.bounds||"labels"!==t.ticks.source)&&o(this.getMinMax(!1))),s=z(s)&&!isNaN(s)?s:+e.startOf(Date.now(),i),a=z(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=1/0,i=-1/0;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="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);let a=this.min,n=function(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}(s,a,this.max);return this._unit=e.unit||(i.autoSkip?aE(e.minUnit,this.min,this.max,this._getLabelCapacity(a)):function(t,e,i,s,a){for(let n=aA.length-1;n>=aA.indexOf(i);n--){let i=aA[n];if(aO[i].common&&t._adapter.diff(a,s,i)>=e-1)return i}return aA[i?aA.indexOf(i):0]}(this,n.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=aA.indexOf(t)+1,i=aA.length;e<i;++e)if(aO[aA[e]].common)return aA[e]}(this._unit):void 0,this.initOffsets(s),t.reverse&&n.reverse(),az(this,n,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(){let t,e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],s=0,a=0;this.options.offset&&i.length&&(t=this.getDecimalForValue(i[0]),s=1===i.length?1-t:(this.getDecimalForValue(i[1])-t)/2,e=this.getDecimalForValue(i[i.length-1]),a=1===i.length?e:(e-this.getDecimalForValue(i[i.length-2]))/2);let n=i.length<3?.5:.25;s=tv(s,0,n),a=tv(a,0,n),this._offsets={start:s,end:a,factor:1/(s+1+a)}}_generate(){let t,e,i=this._adapter,s=this.min,a=this.max,n=this.options,r=n.time,o=r.unit||aE(r.minUnit,s,a,this._getLabelCapacity(s)),l=V(n.ticks.stepSize,1),h="week"===o&&r.isoWeekday,d=tu(h)||!0===h,c={},u=s;if(d&&(u=+i.startOf(u,"isoWeek",h)),u=+i.startOf(u,d?"day":o),i.diff(a,s,o)>1e5*l)throw Error(s+" and "+a+" are too far apart with stepSize of "+l+" "+o);let f="data"===n.ticks.source&&this.getDataTimestamps();for(t=u,e=0;t<a;t=+i.add(t,l,o),e++)aR(c,t,f);return(t===a||"ticks"===n.bounds||1===e)&&aR(c,t,f),Object.keys(c).sort(aL).map(t=>+t)}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 B(n,[t,e,i],this);let r=a.time.displayFormats,o=this._unit,l=this._majorUnit,h=o&&r[o],d=l&&r[l],c=i[e],u=l&&d&&c&&c.major;return this._adapter.format(t,s||(u?d:h))}generateTickLabels(t){let e,i,s;for(e=0,i=t.length;e<i;++e)(s=t[e]).label=this._tickFormatFunction(s.value,e,t)}getDecimalForValue(t){return null===t?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=tg(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._tick
1FormatFunction(t,0,az(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,e,i=this._cache.data||[];if(i.length)return i;let s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,e=s.length;t<e;++t)i=i.concat(s[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){let t,e,i=this._cache.labels||[];if(i.length)return i;let s=this.getLabels();for(t=0,e=s.length;t<e;++t)i.push(aT(this,s[t]));return this._cache.labels=this._normalized?i:this.normalize(i)}normalize(t){return tC(t.sort(aL))}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}}function aV(t,e,i){let s,a,n,r,o=0,l=t.length-1;i?(e>=t[o].pos&&e<=t[l].pos&&({lo:o,hi:l}=tk(t,"pos",e)),{pos:s,time:n}=t[o],{pos:a,time:r}=t[l]):(e>=t[o].time&&e<=t[l].time&&({lo:o,hi:l}=tk(t,"time",e)),{time:s,pos:n}=t[o],{time:a,pos:r}=t[l]);let h=a-s;return h?n+(r-n)*(e-s)/h:n}i(aF,"id","time"),i(aF,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});class aI extends aF{initOffsets(){let t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=aV(e,this.min),this._tableRange=aV(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){let e,i,s,{min:a,max:n}=this,r=[],o=[];for(e=0,i=t.length;e<i;++e)(s=t[e])>=a&&s<=n&&r.push(s);if(r.length<2)return[{time:a,pos:0},{time:n,pos:1}];for(e=0,i=r.length;e<i;++e)Math.round((r[e+1]+r[e-1])/2)!==(s=r[e])&&o.push({time:s,pos:e/(i-1)});return o}_generate(){let t=this.min,e=this.max,i=super.getDataTimestamps();return i.includes(t)&&i.length||i.splice(0,0,t),i.includes(e)&&1!==i.length||i.push(e),i.sort((t,e)=>t-e)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;let e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t}getDecimalForValue(t){return(aV(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){let e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return aV(this._table,i*this._tableRange+this._minPos,!0)}constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}}i(aI,"id","timeseries"),i(aI,"defaults",aF.defaults);let aB=[i_,sN,ag,Object.freeze({__proto__:null,CategoryScale:am,LinearScale:a_,LogarithmicScale:ak,RadialLinearScale:aC,TimeScale:aF,TimeSeriesScale:aI})]}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.