import{a as Es}from"./chunk-4B6CYREA.js";import{a as Ts,b as As,c as Ls}from"./chunk-5NB3MOJB.js";import{a as Cs,b as Ps,c as Ds,d as Os}from"./chunk-Q6JJUNJG.js";import{a as as}from"./chunk-ZU2GWGAY.js";import{a as Ms,b as Ss,c as ks,g as ws}from"./chunk-HUIYCCBF.js";import{a as Qn,b as ts}from"./chunk-ZYFBUEA5.js";import{a as rs,b as ls,c as cs,d as hs,e as ds,f as us,g as fs,h as gs,i as ps,j as ms,k as bs,l as xs,m as _s,n as ys,o as vs}from"./chunk-Q465MAI7.js";import{e as Zn}from"./chunk-R5OOSKPE.js";import{G as ns,N as ss,P as os}from"./chunk-VF4SIIO7.js";import{b as Gn,c as Jn}from"./chunk-3JAJZ4ZR.js";import{X as es,aa as is}from"./chunk-SIRN2M67.js";import{i as Yn,j as Un,m as Xn,n as Kn,o as qn}from"./chunk-ZEDFMZ3B.js";import{$a as ki,Ab as Pt,Lb as Hn,Ub as wi,Vb as T,Wb as Ht,Xb as Dt,Zb as jn,_a as H,_b as Ci,a as ze,ac as Ot,b as Be,bc as $n,cc as jt,ha as Wn,lb as ht,nb as dt,wb as C,xb as P,yb as wt,zb as Ct}from"./chunk-PEWEDMBK.js";function xe(i){return i+.5|0}var Tt=(i,e,t)=>Math.max(Math.min(i,t),e);function me(i){return Tt(xe(i*2.55),0,255)}function At(i){return Tt(xe(i*255),0,255)}function xt(i){return Tt(xe(i/2.55)/100,0,1)}function Rs(i){return Tt(xe(i*100),0,100)}var ot={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},Di=[..."0123456789ABCDEF"],Ga=i=>Di[i&15],Ja=i=>Di[(i&240)>>4]+Di[i&15],Ve=i=>(i&240)>>4===(i&15),Za=i=>Ve(i.r)&&Ve(i.g)&&Ve(i.b)&&Ve(i.a);function Qa(i){var e=i.length,t;return i[0]==="#"&&(e===4||e===5?t={r:255&ot[i[1]]*17,g:255&ot[i[2]]*17,b:255&ot[i[3]]*17,a:e===5?ot[i[4]]*17:255}:(e===7||e===9)&&(t={r:ot[i[1]]<<4|ot[i[2]],g:ot[i[3]]<<4|ot[i[4]],b:ot[i[5]]<<4|ot[i[6]],a:e===9?ot[i[7]]<<4|ot[i[8]]:255})),t}var tr=(i,e)=>i<255?e(i):"";function er(i){var e=Za(i)?Ga:Ja;return i?"#"+e(i.r)+e(i.g)+e(i.b)+tr(i.a,e):void 0}var ir=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Bs(i,e,t){let n=e*Math.min(t,1-t),s=(o,a=(o+i/30)%12)=>t-n*Math.max(Math.min(a-3,9-a,1),-1);return[s(0),s(8),s(4)]}function nr(i,e,t){let n=(s,o=(s+i/60)%6)=>t-t*e*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function sr(i,e,t){let n=Bs(i,1,.5),s;for(e+t>1&&(s=1/(e+t),e*=s,t*=s),s=0;s<3;s++)n[s]*=1-e-t,n[s]+=e;return n}function or(i,e,t,n,s){return i===s?(e-t)/n+(e.5?h/(2-o-a):h/(o+a),l=or(t,n,s,h,o),l=l*60+.5),[l|0,c||0,r]}function Ti(i,e,t,n){return(Array.isArray(e)?i(e[0],e[1],e[2]):i(e,t,n)).map(At)}function Ai(i,e,t){return Ti(Bs,i,e,t)}function ar(i,e,t){return Ti(sr,i,e,t)}function rr(i,e,t){return Ti(nr,i,e,t)}function Vs(i){return(i%360+360)%360}function lr(i){let e=ir.exec(i),t=255,n;if(!e)return;e[5]!==n&&(t=e[6]?me(+e[5]):At(+e[5]));let s=Vs(+e[2]),o=+e[3]/100,a=+e[4]/100;return e[1]==="hwb"?n=ar(s,o,a):e[1]==="hsv"?n=rr(s,o,a):n=Ai(s,o,a),{r:n[0],g:n[1],b:n[2],a:t}}function cr(i,e){var t=Oi(i);t[0]=Vs(t[0]+e),t=Ai(t),i.r=t[0],i.g=t[1],i.b=t[2]}function hr(i){if(!i)return;let e=Oi(i),t=e[0],n=Rs(e[1]),s=Rs(e[2]);return i.a<255?`hsla(${t}, ${n}%, ${s}%, ${xt(i.a)})`:`hsl(${t}, ${n}%, ${s}%)`}var Fs={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"},Is={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function dr(){let i={},e=Object.keys(Is),t=Object.keys(Fs),n,s,o,a,r;for(n=0;n>16&255,o>>8&255,o&255]}return i}var Ne;function ur(i){Ne||(Ne=dr(),Ne.transparent=[0,0,0,0]);let e=Ne[i.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}var fr=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function gr(i){let e=fr.exec(i),t=255,n,s,o;if(e){if(e[7]!==n){let a=+e[7];t=e[8]?me(a):Tt(a*255,0,255)}return n=+e[1],s=+e[3],o=+e[5],n=255&(e[2]?me(n):Tt(n,0,255)),s=255&(e[4]?me(s):Tt(s,0,255)),o=255&(e[6]?me(o):Tt(o,0,255)),{r:n,g:s,b:o,a:t}}}function pr(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${xt(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}var Pi=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,te=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function mr(i,e,t){let n=te(xt(i.r)),s=te(xt(i.g)),o=te(xt(i.b));return{r:At(Pi(n+t*(te(xt(e.r))-n))),g:At(Pi(s+t*(te(xt(e.g))-s))),b:At(Pi(o+t*(te(xt(e.b))-o))),a:i.a+t*(e.a-i.a)}}function We(i,e,t){if(i){let n=Oi(i);n[e]=Math.max(0,Math.min(n[e]+n[e]*t,e===0?360:1)),n=Ai(n),i.r=n[0],i.g=n[1],i.b=n[2]}}function Ns(i,e){return i&&Object.assign(e||{},i)}function zs(i){var e={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(e={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(e.a=At(i[3]))):(e=Ns(i,{r:0,g:0,b:0,a:1}),e.a=At(e.a)),e}function br(i){return i.charAt(0)==="r"?gr(i):lr(i)}var be=class i{constructor(e){if(e instanceof i)return e;let t=typeof e,n;t==="object"?n=zs(e):t==="string"&&(n=Qa(e)||ur(e)||br(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=Ns(this._rgb);return e&&(e.a=xt(e.a)),e}set rgb(e){this._rgb=zs(e)}rgbString(){return this._valid?pr(this._rgb):void 0}hexString(){return this._valid?er(this._rgb):void 0}hslString(){return this._valid?hr(this._rgb):void 0}mix(e,t){if(e){let n=this.rgb,s=e.rgb,o,a=t===o?.5:t,r=2*a-1,l=n.a-s.a,c=((r*l===-1?r:(r+l)/(1+r*l))+1)/2;o=1-c,n.r=255&c*n.r+o*s.r+.5,n.g=255&c*n.g+o*s.g+.5,n.b=255&c*n.b+o*s.b+.5,n.a=a*n.a+(1-a)*s.a,this.rgb=n}return this}interpolate(e,t){return e&&(this._rgb=mr(this._rgb,e._rgb,t)),this}clone(){return new i(this.rgb)}alpha(e){return this._rgb.a=At(e),this}clearer(e){let t=this._rgb;return t.a*=1-e,this}greyscale(){let e=this._rgb,t=xe(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=t,this}opaquer(e){let t=this._rgb;return t.a*=1+e,this}negate(){let e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return We(this._rgb,2,e),this}darken(e){return We(this._rgb,2,-e),this}saturate(e){return We(this._rgb,1,e),this}desaturate(e){return We(this._rgb,1,-e),this}rotate(e){return cr(this._rgb,e),this}};function gt(){}var Js=(()=>{let i=0;return()=>i++})();function R(i){return i===null||typeof i>"u"}function B(i){if(Array.isArray&&Array.isArray(i))return!0;let e=Object.prototype.toString.call(i);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function L(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function j(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function et(i,e){return j(i)?i:e}function D(i,e){return typeof i>"u"?e:i}var Zs=(i,e)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/e,Fi=(i,e)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*e:+i;function z(i,e,t){if(i&&typeof i.call=="function")return i.apply(t,e)}function F(i,e,t,n){let s,o,a;if(B(i))if(o=i.length,n)for(s=o-1;s>=0;s--)e.call(t,i[s],s);else for(s=0;si,x:i=>i.x,y:i=>i.y};function yr(i){let e=i.split("."),t=[],n="";for(let s of e)n+=s,n.endsWith("\\")?n=n.slice(0,-1)+".":(t.push(n),n="");return t}function vr(i){let e=yr(i);return t=>{for(let n of e){if(n==="")break;t=t&&t[n]}return t}}function vt(i,e){return(Ws[e]||(Ws[e]=vr(e)))(i)}function qe(i){return i.charAt(0).toUpperCase()+i.slice(1)}var oe=i=>typeof i<"u",_t=i=>typeof i=="function",Ii=(i,e)=>{if(i.size!==e.size)return!1;for(let t of i)if(!e.has(t))return!1;return!0};function to(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}var V=Math.PI,N=2*V,Mr=N+V,Ue=Number.POSITIVE_INFINITY,Sr=V/180,Y=V/2,$t=V/4,Hs=V*2/3,yt=Math.log10,lt=Math.sign;function ae(i,e,t){return Math.abs(i-e)s-o).pop(),e}function Xt(i){return!isNaN(parseFloat(i))&&isFinite(i)}function io(i,e){let t=Math.round(i);return t-e<=i&&t+e>=i}function Bi(i,e,t){let n,s,o;for(n=0,s=i.length;nl&&c=Math.min(e,t)-n&&i<=Math.max(e,t)+n}function Je(i,e,t){t=t||(a=>i[a]1;)o=s+n>>1,t(o)?s=o:n=o;return{lo:s,hi:n}}var ut=(i,e,t,n)=>Je(i,t,n?s=>{let o=i[s][e];return oi[s][e]Je(i,t,n=>i[n][e]>=t);function oo(i,e,t){let n=0,s=i.length;for(;nn&&i[s-1]>t;)s--;return n>0||s{let n="_onData"+qe(t),s=i[t];Object.defineProperty(i,t,{configurable:!0,enumerable:!1,value(...o){let a=s.apply(this,o);return i._chartjs.listeners.forEach(r=>{typeof r[n]=="function"&&r[n](...o)}),a}})})}function Wi(i,e){let t=i._chartjs;if(!t)return;let n=t.listeners,s=n.indexOf(e);s!==-1&&n.splice(s,1),!(n.length>0)&&(ao.forEach(o=>{delete i[o]}),delete i._chartjs)}function Hi(i){let e=new Set(i);return e.size===i.length?i:Array.from(e)}var ji=function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame}();function $i(i,e){let t=[],n=!1;return function(...s){t=s,n||(n=!0,ji.call(window,()=>{n=!1,i.apply(e,t)}))}}function lo(i,e){let t;return function(...n){return e?(clearTimeout(t),t=setTimeout(i,e,n)):i.apply(this,n),e}}var Ze=i=>i==="start"?"left":i==="end"?"right":"center",G=(i,e,t)=>i==="start"?e:i==="end"?t:(e+t)/2,co=(i,e,t,n)=>i===(n?"left":"right")?t:i==="center"?(e+t)/2:e;function Yi(i,e,t){let n=e.length,s=0,o=n;if(i._sorted){let{iScale:a,_parsed:r}=i,l=a.axis,{min:c,max:h,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(s=K(Math.min(ut(r,l,c).lo,t?n:ut(e,l,a.getPixelForValue(c)).lo),0,n-1)),u?o=K(Math.max(ut(r,a.axis,h,!0).hi+1,t?0:ut(e,l,a.getPixelForValue(h),!0).hi+1),s,n)-s:o=n-s}return{start:s,count:o}}function Ui(i){let{xScale:e,yScale:t,_scaleRanges:n}=i,s={xmin:e.min,xmax:e.max,ymin:t.min,ymax:t.max};if(!n)return i._scaleRanges=s,!0;let o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==t.min||n.ymax!==t.max;return Object.assign(n,s),o}var He=i=>i===0||i===1,js=(i,e,t)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-e)*N/t)),$s=(i,e,t)=>Math.pow(2,-10*i)*Math.sin((i-e)*N/t)+1,ee={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*Y)+1,easeOutSine:i=>Math.sin(i*Y),easeInOutSine:i=>-.5*(Math.cos(V*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>He(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>He(i)?i:js(i,.075,.3),easeOutElastic:i=>He(i)?i:$s(i,.075,.3),easeInOutElastic(i){return He(i)?i:i<.5?.5*js(i*2,.1125,.45):.5+.5*$s(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let e=1.70158;return(i/=.5)<1?.5*(i*i*(((e*=1.525)+1)*i-e)):.5*((i-=2)*i*(((e*=1.525)+1)*i+e)+2)},easeInBounce:i=>1-ee.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?ee.easeInBounce(i*2)*.5:ee.easeOutBounce(i*2-1)*.5+.5};function Xi(i){if(i&&typeof i=="object"){let e=i.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Ki(i){return Xi(i)?i:new be(i)}function Li(i){return Xi(i)?i:new be(i).saturate(.5).darken(.1).hexString()}var wr=["x","y","borderWidth","radius","tension"],Cr=["color","borderColor","backgroundColor"];function Pr(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),i.set("animations",{colors:{type:"color",properties:Cr},numbers:{type:"number",properties:wr}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function Dr(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var Ys=new Map;function Or(i,e){e=e||{};let t=i+JSON.stringify(e),n=Ys.get(t);return n||(n=new Intl.NumberFormat(i,e),Ys.set(t,n)),n}function le(i,e,t){return Or(e,t).format(i)}var ho={values(i){return B(i)?i:""+i},numeric(i,e,t){if(i===0)return"0";let n=this.chart.options.locale,s,o=i;if(t.length>1){let c=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),o=Tr(i,t)}let a=yt(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:s,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),le(i,n,l)},logarithmic(i,e,t){if(i===0)return"0";let n=t[e].significand||i/Math.pow(10,Math.floor(yt(i)));return[1,2,3,5,10,15].includes(n)||e>.8*t.length?ho.numeric.call(this,i,e,t):""}};function Tr(i,e){let t=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(t)>=1&&i!==Math.floor(i)&&(t=i-Math.floor(i)),t}var Me={formatters:ho};function Ar(i){i.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:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.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:Me.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}var Et=Object.create(null),Qe=Object.create(null);function _e(i,e){if(!e)return i;let t=e.split(".");for(let n=0,s=t.length;nn.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,s)=>Li(s.backgroundColor),this.hoverBorderColor=(n,s)=>Li(s.borderColor),this.hoverColor=(n,s)=>Li(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(t)}set(e,t){return Ei(this,e,t)}get(e){return _e(this,e)}describe(e,t){return Ei(Qe,e,t)}override(e,t){return Ei(Et,e,t)}route(e,t,n,s){let o=_e(this,e),a=_e(this,n),r="_"+t;Object.defineProperties(o,{[r]:{value:o[t],writable:!0},[t]:{enumerable:!0,get(){let l=this[r],c=a[s];return L(l)?Object.assign({},c,l):D(l,c)},set(l){this[r]=l}}})}apply(e){e.forEach(t=>t(this))}},$=new Ri({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Pr,Dr,Ar]);function Lr(i){return!i||R(i.size)||R(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function ye(i,e,t,n,s){let o=e[s];return o||(o=e[s]=i.measureText(s).width,t.push(s)),o>n&&(n=o),n}function uo(i,e,t,n){n=n||{};let s=n.data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(s=n.data={},o=n.garbageCollect=[],n.font=e),i.save(),i.font=e;let a=0,r=t.length,l,c,h,d,u;for(l=0;lt.length){for(l=0;l0&&i.stroke()}}function ft(i,e,t){return t=t||.5,!e||i&&i.x>e.left-t&&i.xe.top-t&&i.y0&&o.strokeColor!=="",l,c;for(i.save(),i.font=s.string,Er(i,o),l=0;l+i||0;function ei(i,e){let t={},n=L(e),s=n?Object.keys(e):e,o=L(i)?n?a=>D(i[a],i[e[a]]):a=>i[a]:()=>i;for(let a of s)t[a]=Vr(o(a));return t}function Ji(i){return ei(i,{top:"y",right:"x",bottom:"y",left:"x"})}function It(i){return ei(i,["topLeft","topRight","bottomLeft","bottomRight"])}function J(i){let e=Ji(i);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function X(i,e){i=i||{},e=e||$.font;let t=D(i.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let n=D(i.style,e.style);n&&!(""+n).match(zr)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);let s={family:D(i.family,e.family),lineHeight:Br(D(i.lineHeight,e.lineHeight),t),size:t,style:n,weight:D(i.weight,e.weight),string:""};return s.string=Lr(s),s}function he(i,e,t,n){let s=!0,o,a,r;for(o=0,a=i.length;ot&&r===0?0:r+l;return{min:a(n,-Math.abs(o)),max:a(s,o)}}function Mt(i,e){return Object.assign(Object.create(i),e)}function ii(i,e=[""],t,n,s=()=>i[0]){let o=t||i;typeof n>"u"&&(n=xo("_fallback",i));let a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:n,_getTarget:s,override:r=>ii([r,...i],e,o,n)};return new Proxy(a,{deleteProperty(r,l){return delete r[l],delete r._keys,delete i[0][l],!0},get(r,l){return mo(r,l,()=>Xr(l,e,i,r))},getOwnPropertyDescriptor(r,l){return Reflect.getOwnPropertyDescriptor(r._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(r,l){return Xs(r).includes(l)},ownKeys(r){return Xs(r)},set(r,l,c){let h=r._storage||(r._storage=s());return r[l]=h[l]=c,delete r._keys,!0}})}function Ut(i,e,t,n){let s={_cacheable:!1,_proxy:i,_context:e,_subProxy:t,_stack:new Set,_descriptors:Zi(i,n),setContext:o=>Ut(i,o,t,n),override:o=>Ut(i.override(o),e,t,n)};return new Proxy(s,{deleteProperty(o,a){return delete o[a],delete i[a],!0},get(o,a,r){return mo(o,a,()=>Wr(o,a,r))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(i,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,a)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,a){return Reflect.has(i,a)},ownKeys(){return Reflect.ownKeys(i)},set(o,a,r){return i[a]=r,delete o[a],!0}})}function Zi(i,e={scriptable:!0,indexable:!0}){let{_scriptable:t=e.scriptable,_indexable:n=e.indexable,_allKeys:s=e.allKeys}=i;return{allKeys:s,scriptable:t,indexable:n,isScriptable:_t(t)?t:()=>t,isIndexable:_t(n)?n:()=>n}}var Nr=(i,e)=>i?i+qe(e):e,Qi=(i,e)=>L(e)&&i!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function mo(i,e,t){if(Object.prototype.hasOwnProperty.call(i,e))return i[e];let n=t();return i[e]=n,n}function Wr(i,e,t){let{_proxy:n,_context:s,_subProxy:o,_descriptors:a}=i,r=n[e];return _t(r)&&a.isScriptable(e)&&(r=Hr(e,r,i,t)),B(r)&&r.length&&(r=jr(e,r,i,a.isIndexable)),Qi(e,r)&&(r=Ut(r,s,o&&o[e],a)),r}function Hr(i,e,t,n){let{_proxy:s,_context:o,_subProxy:a,_stack:r}=t;if(r.has(i))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+i);r.add(i);let l=e(o,a||n);return r.delete(i),Qi(i,l)&&(l=tn(s._scopes,s,i,l)),l}function jr(i,e,t,n){let{_proxy:s,_context:o,_subProxy:a,_descriptors:r}=t;if(typeof o.index<"u"&&n(i))return e[o.index%e.length];if(L(e[0])){let l=e,c=s._scopes.filter(h=>h!==l);e=[];for(let h of l){let d=tn(c,s,i,h);e.push(Ut(d,o,a&&a[i],r))}}return e}function bo(i,e,t){return _t(i)?i(e,t):i}var $r=(i,e)=>i===!0?e:typeof i=="string"?vt(e,i):void 0;function Yr(i,e,t,n,s){for(let o of e){let a=$r(t,o);if(a){i.add(a);let r=bo(a._fallback,t,s);if(typeof r<"u"&&r!==t&&r!==n)return r}else if(a===!1&&typeof n<"u"&&t!==n)return null}return!1}function tn(i,e,t,n){let s=e._rootScopes,o=bo(e._fallback,t,n),a=[...i,...s],r=new Set;r.add(n);let l=Us(r,a,t,o||t,n);return l===null||typeof o<"u"&&o!==t&&(l=Us(r,a,o,l,n),l===null)?!1:ii(Array.from(r),[""],s,o,()=>Ur(e,t,n))}function Us(i,e,t,n,s){for(;t;)t=Yr(i,e,t,n,s);return t}function Ur(i,e,t){let n=i._getTarget();e in n||(n[e]={});let s=n[e];return B(s)&&L(t)?t:s||{}}function Xr(i,e,t,n){let s;for(let o of e)if(s=xo(Nr(o,i),t),typeof s<"u")return Qi(i,s)?tn(t,n,i,s):s}function xo(i,e){for(let t of e){if(!t)continue;let n=t[i];if(typeof n<"u")return n}}function Xs(i){let e=i._keys;return e||(e=i._keys=Kr(i._scopes)),e}function Kr(i){let e=new Set;for(let t of i)for(let n of Object.keys(t).filter(s=>!s.startsWith("_")))e.add(n);return Array.from(e)}function en(i,e,t,n){let{iScale:s}=i,{key:o="r"}=this._parsing,a=new Array(n),r,l,c,h;for(r=0,l=n;rei==="x"?"y":"x";function Gr(i,e,t,n){let s=i.skip?e:i,o=e,a=t.skip?e:t,r=Xe(o,s),l=Xe(a,o),c=r/(r+l),h=l/(r+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;let d=n*c,u=n*h;return{previous:{x:o.x-d*(a.x-s.x),y:o.y-d*(a.y-s.y)},next:{x:o.x+u*(a.x-s.x),y:o.y+u*(a.y-s.y)}}}function Jr(i,e,t){let n=i.length,s,o,a,r,l,c=ne(i,0);for(let h=0;h!c.skip)),e.cubicInterpolationMode==="monotone")Qr(i,s);else{let c=n?i[i.length-1]:i[0];for(o=0,a=i.length;oi.ownerDocument.defaultView.getComputedStyle(i,null);function el(i,e){return oi(i).getPropertyValue(e)}var il=["top","right","bottom","left"];function Yt(i,e,t){let n={};t=t?"-"+t:"";for(let s=0;s<4;s++){let o=il[s];n[o]=parseFloat(i[e+"-"+o+t])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}var nl=(i,e,t)=>(i>0||e>0)&&(!t||!t.shadowRoot);function sl(i,e){let t=i.touches,n=t&&t.length?t[0]:i,{offsetX:s,offsetY:o}=n,a=!1,r,l;if(nl(s,o,i.target))r=s,l=o;else{let c=e.getBoundingClientRect();r=n.clientX-c.left,l=n.clientY-c.top,a=!0}return{x:r,y:l,box:a}}function zt(i,e){if("native"in i)return i;let{canvas:t,currentDevicePixelRatio:n}=e,s=oi(t),o=s.boxSizing==="border-box",a=Yt(s,"padding"),r=Yt(s,"border","width"),{x:l,y:c,box:h}=sl(i,t),d=a.left+(h&&r.left),u=a.top+(h&&r.top),{width:f,height:g}=e;return o&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((l-d)/f*t.width/n),y:Math.round((c-u)/g*t.height/n)}}function ol(i,e,t){let n,s;if(e===void 0||t===void 0){let o=si(i);if(!o)e=i.clientWidth,t=i.clientHeight;else{let a=o.getBoundingClientRect(),r=oi(o),l=Yt(r,"border","width"),c=Yt(r,"padding");e=a.width-c.width-l.width,t=a.height-c.height-l.height,n=Ke(r.maxWidth,o,"clientWidth"),s=Ke(r.maxHeight,o,"clientHeight")}}return{width:e,height:t,maxWidth:n||Ue,maxHeight:s||Ue}}var $e=i=>Math.round(i*10)/10;function vo(i,e,t,n){let s=oi(i),o=Yt(s,"margin"),a=Ke(s.maxWidth,i,"clientWidth")||Ue,r=Ke(s.maxHeight,i,"clientHeight")||Ue,l=ol(i,e,t),{width:c,height:h}=l;if(s.boxSizing==="content-box"){let u=Yt(s,"border","width"),f=Yt(s,"padding");c-=f.width+u.width,h-=f.height+u.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?c/n:h-o.height),c=$e(Math.min(c,a,l.maxWidth)),h=$e(Math.min(h,r,l.maxHeight)),c&&!h&&(h=$e(c/2)),(e!==void 0||t!==void 0)&&n&&l.height&&h>l.height&&(h=l.height,c=$e(Math.floor(h*n))),{width:c,height:h}}function nn(i,e,t){let n=e||1,s=Math.floor(i.height*n),o=Math.floor(i.width*n);i.height=Math.floor(i.height),i.width=Math.floor(i.width);let a=i.canvas;return a.style&&(t||!a.style.height&&!a.style.width)&&(a.style.height=`${i.height}px`,a.style.width=`${i.width}px`),i.currentDevicePixelRatio!==n||a.height!==s||a.width!==o?(i.currentDevicePixelRatio=n,a.height=s,a.width=o,i.ctx.setTransform(n,0,0,n,0,0),!0):!1}var Mo=function(){let i=!1;try{let e={get passive(){return i=!0,!1}};ni()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return i}();function sn(i,e){let t=el(i,e),n=t&&t.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Lt(i,e,t,n){return{x:i.x+t*(e.x-i.x),y:i.y+t*(e.y-i.y)}}function So(i,e,t,n){return{x:i.x+t*(e.x-i.x),y:n==="middle"?t<.5?i.y:e.y:n==="after"?t<1?i.y:e.y:t>0?e.y:i.y}}function ko(i,e,t,n){let s={x:i.cp2x,y:i.cp2y},o={x:e.cp1x,y:e.cp1y},a=Lt(i,s,t),r=Lt(s,o,t),l=Lt(o,e,t),c=Lt(a,r,t),h=Lt(r,l,t);return Lt(c,h,t)}var al=function(i,e){return{x(t){return i+i+e-t},setWidth(t){e=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,n){return t-n},leftForLtr(t,n){return t-n}}},rl=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,e){return i+e},leftForLtr(i,e){return i}}};function Kt(i,e,t){return i?al(e,t):rl()}function on(i,e){let t,n;(e==="ltr"||e==="rtl")&&(t=i.canvas.style,n=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",e,"important"),i.prevTextDirection=n)}function an(i,e){e!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",e[0],e[1]))}function wo(i){return i==="angle"?{between:re,compare:kr,normalize:tt}:{between:pt,compare:(e,t)=>e-t,normalize:e=>e}}function Ks({start:i,end:e,count:t,loop:n,style:s}){return{start:i%t,end:e%t,loop:n&&(e-i+1)%t===0,style:s}}function ll(i,e,t){let{property:n,start:s,end:o}=t,{between:a,normalize:r}=wo(n),l=e.length,{start:c,end:h,loop:d}=i,u,f;if(d){for(c+=l,h+=l,u=0,f=l;ul(s,y,x)&&r(s,y)!==0,_=()=>r(o,x)===0||l(o,y,x),v=()=>p||M(),k=()=>!p||_();for(let S=h,w=h;S<=d;++S)b=e[S%a],!b.skip&&(x=c(b[n]),x!==y&&(p=l(x,s,o),m===null&&v()&&(m=r(x,s)===0?S:w),m!==null&&k()&&(g.push(Ks({start:m,end:S,loop:u,count:a,style:f})),m=null),w=S,y=x));return m!==null&&g.push(Ks({start:m,end:d,loop:u,count:a,style:f})),g}function ln(i,e){let t=[],n=i.segments;for(let s=0;ss&&i[o%e].skip;)o--;return o%=e,{start:s,end:o}}function hl(i,e,t,n){let s=i.length,o=[],a=e,r=i[e],l;for(l=e+1;l<=t;++l){let c=i[l%s];c.skip||c.stop?r.skip||(n=!1,o.push({start:e%s,end:(l-1)%s,loop:n}),e=a=c.stop?l:null):(a=l,r.skip&&(e=l)),r=c}return a!==null&&o.push({start:e%s,end:a%s,loop:n}),o}function Co(i,e){let t=i.points,n=i.options.spanGaps,s=t.length;if(!s)return[];let o=!!i._loop,{start:a,end:r}=cl(t,s,o,n);if(n===!0)return qs(i,[{start:a,end:r,loop:o}],t,e);let l=rr({chart:e,initial:t.initial,numSteps:a,currentStep:Math.min(n-t.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=ji.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((n,s)=>{if(!n.running||!n.items.length)return;let o=n.items,a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(e),r=!0):(o[a]=o[o.length-1],o.pop());r&&(s.draw(),this._notify(s,n,e,"progress")),o.length||(n.running=!1,this._notify(s,n,e,"complete"),n.initial=!1),t+=o.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){let t=this._charts,n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}listen(e,t,n){this._getAnims(e).listeners[t].push(n)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){let t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((n,s)=>Math.max(n,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;let t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){let t=this._charts.get(e);if(!t||!t.items.length)return;let n=t.items,s=n.length-1;for(;s>=0;--s)n[s].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}},St=new xn,Po="transparent",fl={boolean(i,e,t){return t>.5?e:i},color(i,e,t){let n=Ki(i||Po),s=n.valid&&Ki(e||Po);return s&&s.valid?s.mix(n,t).hexString():e},number(i,e,t){return i+(e-i)*t}},_n=class{constructor(e,t,n,s){let o=t[n];s=he([e.to,s,o,e.from]);let a=he([e.from,o,s]);this._active=!0,this._fn=e.fn||fl[e.type||typeof a],this._easing=ee[e.easing]||ee.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=n,this._from=a,this._to=s,this._promises=void 0}active(){return this._active}update(e,t,n){if(this._active){this._notify(!1);let s=this._target[this._prop],o=n-this._start,a=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=he([e.to,t,s,e.from]),this._from=he([e.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){let t=e-this._start,n=this._duration,s=this._prop,o=this._from,a=this._loop,r=this._to,l;if(this._active=o!==r&&(a||t1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,r,l)}wait(){let e=this._promises||(this._promises=[]);return new Promise((t,n)=>{e.push({res:t,rej:n})})}_notify(e){let t=e?"res":"rej",n=this._promises||[];for(let s=0;s{let o=e[s];if(!L(o))return;let a={};for(let r of t)a[r]=o[r];(B(o.properties)&&o.properties||[s]).forEach(r=>{(r===s||!n.has(r))&&n.set(r,a)})})}_animateOptions(e,t){let n=t.options,s=pl(e,n);if(!s)return[];let o=this._createAnimations(s,n);return n.$shared&&gl(e.options.$animations,n).then(()=>{e.options=n},()=>{}),o}_createAnimations(e,t){let n=this._properties,s=[],o=e.$animations||(e.$animations={}),a=Object.keys(t),r=Date.now(),l;for(l=a.length-1;l>=0;--l){let c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(e,t));continue}let h=t[c],d=o[c],u=n.get(c);if(d)if(u&&d.active()){d.update(u,h,r);continue}else d.cancel();if(!u||!u.duration){e[c]=h;continue}o[c]=d=new _n(u,e,c,h),s.push(d)}return s}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}let n=this._createAnimations(e,t);if(n.length)return St.add(this._chart,n),!0}};function gl(i,e){let t=[],n=Object.keys(e);for(let s=0;s0||!t&&o<0)return s.index}return null}function Lo(i,e){let{chart:t,_cachedMeta:n}=i,s=t._stacks||(t._stacks={}),{iScale:o,vScale:a,index:r}=n,l=o.axis,c=a.axis,h=_l(o,a,n),d=e.length,u;for(let f=0;ft[n].axis===e).shift()}function Ml(i,e){return Mt(i,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Sl(i,e,t){return Mt(i,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}function we(i,e){let t=i.controller.index,n=i.vScale&&i.vScale.axis;if(n){e=e||i._parsed;for(let s of e){let o=s._stacks;if(!o||o[n]===void 0||o[n][t]===void 0)return;delete o[n][t],o[n]._visualValues!==void 0&&o[n]._visualValues[t]!==void 0&&delete o[n]._visualValues[t]}}}var hn=i=>i==="reset"||i==="none",Eo=(i,e)=>e?i:Object.assign({},i),kl=(i,e,t)=>i&&!e.hidden&&e._stacked&&{keys:Da(t,!0),values:null},Vt=(()=>{class i{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=To(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&&we(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,n=this._cachedMeta,s=this.getDataset(),o=(u,f,g,p)=>u==="x"?f:u==="r"?p:g,a=n.xAxisID=D(s.xAxisID,cn(t,"x")),r=n.yAxisID=D(s.yAxisID,cn(t,"y")),l=n.rAxisID=D(s.rAxisID,cn(t,"r")),c=n.indexAxis,h=n.iAxisID=o(c,a,r,l),d=n.vAxisID=o(c,r,a,l);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(r),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(h),n.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&Wi(this._data,this),t._stacked&&we(t)}_dataCheck(){let t=this.getDataset(),n=t.data||(t.data=[]),s=this._data;if(L(n))this._data=xl(n);else if(s!==n){if(s){Wi(s,this);let o=this._cachedMeta;we(o),o._parsed=[]}n&&Object.isExtensible(n)&&ro(n,this),this._syncList=[],this._data=n}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let n=this._cachedMeta,s=this.getDataset(),o=!1;this._dataCheck();let a=n._stacked;n._stacked=To(n.vScale,n),n.stack!==s.stack&&(o=!0,we(n),n.stack=s.stack),this._resyncElements(t),(o||a!==n._stacked)&&Lo(this,n._parsed)}configure(){let t=this.chart.config,n=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){let{_cachedMeta:s,_data:o}=this,{iScale:a,_stacked:r}=s,l=a.axis,c=t===0&&n===o.length?!0:s._sorted,h=t>0&&s._parsed[t-1],d,u,f;if(this._parsing===!1)s._parsed=o,s._sorted=!0,f=o;else{B(o[t])?f=this.parseArrayData(s,o,t,n):L(o[t])?f=this.parseObjectData(s,o,t,n):f=this.parsePrimitiveData(s,o,t,n);let g=()=>u[l]===null||h&&u[l]m||u=0;--f)if(!p()){this.updateRangeFromParsed(h,t,g,c);break}}return h}getAllParsedValues(t){let n=this._cachedMeta._parsed,s=[],o,a,r;for(o=0,a=n.length;o=0&&tthis.getContext(s,o,n),m=h.resolveNamedOptions(f,g,p,u);return m.$shared&&(m.$shared=c,a[r]=Object.freeze(Eo(m,c))),m}_resolveAnimations(t,n,s){let o=this.chart,a=this._cachedDataOpts,r=`animation-${n}`,l=a[r];if(l)return l;let c;if(o.options.animation!==!1){let d=this.chart.config,u=d.datasetAnimationScopeKeys(this._type,n),f=d.getOptionScopes(this.getDataset(),u);c=d.createResolver(f,this.getContext(t,s,n))}let h=new pi(o,c&&c.animations);return c&&c._cacheable&&(a[r]=Object.freeze(h)),h}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||hn(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){let s=this.resolveDataElementOptions(t,n),o=this._sharedOptions,a=this.getSharedOptions(s),r=this.includeOptions(n,a)||a!==o;return this.updateSharedOptions(a,n,s),{sharedOptions:a,includeOptions:r}}updateElement(t,n,s,o){hn(o)?Object.assign(t,s):this._resolveAnimations(n,o).update(t,s)}updateSharedOptions(t,n,s){t&&!hn(n)&&this._resolveAnimations(void 0,n).update(t,s)}_setStyle(t,n,s,o){t.active=o;let a=this.getStyle(n,o);this._resolveAnimations(n,s,o).update(t,{options:!o&&this.getSharedOptions(a)||a})}removeHoverStyle(t,n,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,n,s){this._setStyle(t,s,"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 n=this._data,s=this._cachedMeta.data;for(let[l,c,h]of this._syncList)this[l](c,h);this._syncList=[];let o=s.length,a=n.length,r=Math.min(a,o);r&&this.parse(0,r),a>o?this._insertElements(o,a-o,t):a{for(h.length+=n,l=h.length-1;l>=r;l--)h[l]=h[l-n]};for(c(a),l=t;ls-o))}return i._cache.$bar}function Cl(i){let e=i.iScale,t=wl(e,i.type),n=e._length,s,o,a,r,l=()=>{a===32767||a===-32768||(oe(r)&&(n=Math.min(n,Math.abs(a-r)||n)),r=a)};for(s=0,o=t.length;s0?s[i-1]:null,r=iMath.abs(r)&&(l=r,c=a),e[t.axis]=c,e._custom={barStart:l,barEnd:c,start:s,end:o,min:a,max:r}}function Oa(i,e,t,n){return B(i)?Ol(i,e,t,n):e[t.axis]=t.parse(i,n),e}function Ro(i,e,t,n){let s=i.iScale,o=i.vScale,a=s.getLabels(),r=s===o,l=[],c,h,d,u;for(c=t,h=t+n;c=t?1:-1)}function Al(i){let e,t,n,s,o;return i.horizontal?(e=i.base>i.x,t="left",n="right"):(e=i.base{class i extends Vt{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,n,s,o){return Ro(t,n,s,o)}parseArrayData(t,n,s,o){return Ro(t,n,s,o)}parseObjectData(t,n,s,o){let{iScale:a,vScale:r}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,h=a.axis==="x"?l:c,d=r.axis==="x"?l:c,u=[],f,g,p,m;for(f=s,g=s+o;fc.controller.options.grouped),a=s.options.stacked,r=[],l=c=>{let h=c.controller.getParsed(n),d=h&&h[c.vScale.axis];if(R(d)||isNaN(d))return!0};for(let c of o)if(!(n!==void 0&&l(c))&&((a===!1||r.indexOf(c.stack)===-1||a===void 0&&c.stack===void 0)&&r.push(c.stack),c.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,s){let o=this._getStacks(t,s),a=n!==void 0?o.indexOf(n):-1;return a===-1?o.length-1:a}_getRuler(){let t=this.options,n=this._cachedMeta,s=n.iScale,o=[],a,r;for(a=0,r=n.data.length;a{class i extends Vt{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,s,o){let a=super.parsePrimitiveData(t,n,s,o);for(let r=0;r=0;--s)n=Math.max(n,t[s].size(this.resolveDataElementOptions(s))/2);return n>0&&n}getLabelAndValue(t){let n=this._cachedMeta,s=this.chart.data.labels||[],{xScale:o,yScale:a}=n,r=this.getParsed(t),l=o.getLabelForValue(r.x),c=a.getLabelForValue(r.y),h=r._custom;return{label:s[t]||"",value:"("+l+", "+c+(h?", "+h:"")+")"}}update(t){let n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,s,o){let a=o==="reset",{iScale:r,vScale:l}=this._cachedMeta,{sharedOptions:c,includeOptions:h}=this._getSharedOptions(n,o),d=r.axis,u=l.axis;for(let f=n;fre(y,r,l,!0)?1:Math.max(M,M*t,_,_*t),g=(y,M,_)=>re(y,r,l,!0)?-1:Math.min(M,M*t,_,_*t),p=f(0,c,d),m=f(Y,h,u),x=g(V,c,d),b=g(V+Y,h,u);n=(p-x)/2,s=(m-b)/2,o=-(p+x)/2,a=-(m+b)/2}return{ratioX:n,ratioY:s,offsetX:o,offsetY:a}}var Vn=(()=>{class i extends Vt{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let n=t.data;if(n.labels.length&&n.datasets.length){let{labels:{pointStyle:s,color:o}}=t.legend.options;return n.labels.map((a,r)=>{let c=t.getDatasetMeta(0).controller.getStyle(r);return{text:a,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:o,lineWidth:c.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,n,s){s.chart.toggleDataVisibility(n.index),s.chart.update()}}}};constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){let s=this.getDataset().data,o=this._cachedMeta;if(this._parsing===!1)o._parsed=s;else{let a=c=>+s[c];if(L(s[t])){let{key:c="value"}=this._parsing;a=h=>+vt(s[h],c)}let r,l;for(r=t,l=t+n;r0&&!isNaN(t)?N*(Math.abs(t)/n):0}getLabelAndValue(t){let n=this._cachedMeta,s=this.chart,o=s.data.labels||[],a=le(n._parsed[t],s.options.locale);return{label:o[t]||"",value:a}}getMaxBorderWidth(t){let n=0,s=this.chart,o,a,r,l,c;if(!t){for(o=0,a=s.data.datasets.length;o{class i extends Vt{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let n=this._cachedMeta,{dataset:s,data:o=[],_dataset:a}=n,r=this.chart._animationsDisabled,{start:l,count:c}=Yi(n,o,r);this._drawStart=l,this._drawCount=c,Ui(n)&&(l=0,c=o.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!a._decimated,s.points=o;let h=this.resolveDatasetElementOptions(t);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(s,void 0,{animated:!r,options:h},t),this.updateElements(o,l,c,t)}updateElements(t,n,s,o){let a=o==="reset",{iScale:r,vScale:l,_stacked:c,_dataset:h}=this._cachedMeta,{sharedOptions:d,includeOptions:u}=this._getSharedOptions(n,o),f=r.axis,g=l.axis,{spanGaps:p,segment:m}=this.options,x=Xt(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||a||o==="none",y=n+s,M=t.length,_=n>0&&this.getParsed(n-1);for(let v=0;v=y){S.skip=!0;continue}let w=this.getParsed(v),A=R(w[g]),O=S[f]=r.getPixelForValue(w[f],v),E=S[g]=a||A?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,w,c):w[g],v);S.skip=isNaN(O)||isNaN(E)||A,S.stop=v>0&&Math.abs(w[f]-_[f])>x,m&&(S.parsed=w,S.raw=h.data[v]),u&&(S.options=d||this.resolveDataElementOptions(v,k.active?"active":o)),b||this.updateElement(k,v,S,o),_=w}}getMaxOverflow(){let t=this._cachedMeta,n=t.dataset,s=n.options&&n.options.borderWidth||0,o=t.data||[];if(!o.length)return s;let a=o[0].size(this.resolveDataElementOptions(0)),r=o[o.length-1].size(this.resolveDataElementOptions(o.length-1));return Math.max(s,a,r)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}return i})(),Ta=(()=>{class i extends Vt{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let n=t.data;if(n.labels.length&&n.datasets.length){let{labels:{pointStyle:s,color:o}}=t.legend.options;return n.labels.map((a,r)=>{let c=t.getDatasetMeta(0).controller.getStyle(r);return{text:a,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:o,lineWidth:c.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,n,s){s.chart.toggleDataVisibility(n.index),s.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let n=this._cachedMeta,s=this.chart,o=s.data.labels||[],a=le(n._parsed[t].r,s.options.locale);return{label:o[t]||"",value:a}}parseObjectData(t,n,s,o){return en.bind(this)(t,n,s,o)}update(t){let n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){let t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((s,o)=>{let a=this.getParsed(o).r;!isNaN(a)&&this.chart.getDataVisibility(o)&&(an.max&&(n.max=a))}),n}_updateRadius(){let t=this.chart,n=t.chartArea,s=t.options,o=Math.min(n.right-n.left,n.bottom-n.top),a=Math.max(o/2,0),r=Math.max(s.cutoutPercentage?a/100*s.cutoutPercentage:1,0),l=(a-r)/t.getVisibleDatasetCount();this.outerRadius=a-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(t,n,s,o){let a=o==="reset",r=this.chart,c=r.options.animation,h=this._cachedMeta.rScale,d=h.xCenter,u=h.yCenter,f=h.getIndexAngle(0)-.5*V,g=f,p,m=360/this.countVisibleElements();for(p=0;p{!isNaN(this.getParsed(o).r)&&this.chart.getDataVisibility(o)&&n++}),n}_computeAngle(t,n,s){return this.chart.getDataVisibility(t)?at(this.resolveDataElementOptions(t,n).angle||s):0}}return i})(),Vl=(()=>{class i extends Vn{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}return i})(),Nl=(()=>{class i extends Vt{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){let n=this._cachedMeta.vScale,s=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(s[n.axis])}}parseObjectData(t,n,s,o){return en.bind(this)(t,n,s,o)}update(t){let n=this._cachedMeta,s=n.dataset,o=n.data||[],a=n.iScale.getLabels();if(s.points=o,t!=="resize"){let r=this.resolveDatasetElementOptions(t);this.options.showLine||(r.borderWidth=0);let l={_loop:!0,_fullLoop:a.length===o.length,options:r};this.updateElement(s,void 0,l,t)}this.updateElements(o,0,o.length,t)}updateElements(t,n,s,o){let a=this._cachedMeta.rScale,r=o==="reset";for(let l=n;l{class i extends Vt{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){let n=this._cachedMeta,s=this.chart.data.labels||[],{xScale:o,yScale:a}=n,r=this.getParsed(t),l=o.getLabelForValue(r.x),c=a.getLabelForValue(r.y);return{label:s[t]||"",value:"("+l+", "+c+")"}}update(t){let n=this._cachedMeta,{data:s=[]}=n,o=this.chart._animationsDisabled,{start:a,count:r}=Yi(n,s,o);if(this._drawStart=a,this._drawCount=r,Ui(n)&&(a=0,r=s.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:l,_dataset:c}=n;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!c._decimated,l.points=s;let h=this.resolveDatasetElementOptions(t);h.segment=this.options.segment,this.updateElement(l,void 0,{animated:!o,options:h},t)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(s,a,r,t)}addElements(){let{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,n,s,o){let a=o==="reset",{iScale:r,vScale:l,_stacked:c,_dataset:h}=this._cachedMeta,d=this.resolveDataElementOptions(n,o),u=this.getSharedOptions(d),f=this.includeOptions(o,u),g=r.axis,p=l.axis,{spanGaps:m,segment:x}=this.options,b=Xt(m)?m:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||a||o==="none",M=n>0&&this.getParsed(n-1);for(let _=n;_0&&Math.abs(k[g]-M[g])>b,x&&(S.parsed=k,S.raw=h.data[_]),f&&(S.options=u||this.resolveDataElementOptions(_,v.active?"active":o)),y||this.updateElement(v,_,S,o),M=k}this.updateSharedOptions(u,o,d)}getMaxOverflow(){let t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let l=0;for(let c=n.length-1;c>=0;--c)l=Math.max(l,n[c].size(this.resolveDataElementOptions(c))/2);return l>0&&l}let s=t.dataset,o=s.options&&s.options.borderWidth||0;if(!n.length)return o;let a=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(o,a,r)/2}}return i})(),Hl=Object.freeze({__proto__:null,BarController:Fl,BubbleController:Il,DoughnutController:Vn,LineController:Bl,PieController:Vl,PolarAreaController:Ta,RadarController:Nl,ScatterController:Wl});function qt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var yn=class i{static override(e){Object.assign(i.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return qt()}parse(){return qt()}format(){return qt()}add(){return qt()}diff(){return qt()}startOf(){return qt()}endOf(){return qt()}},jl={_date:yn};function $l(i,e,t,n){let{controller:s,data:o,_sorted:a}=i,r=s._cachedMeta.iScale;if(r&&e===r.axis&&e!=="r"&&a&&o.length){let l=r._reversePixels?so:ut;if(n){if(s._sharedOptions){let c=o[0],h=typeof c.getRange=="function"&&c.getRange(e);if(h){let d=l(o,e,t-h),u=l(o,e,t+h);return{lo:d.lo,hi:u.hi}}}}else return l(o,e,t)}return{lo:0,hi:o.length-1}}function Fe(i,e,t,n,s){let o=i.getSortedVisibleDatasetMetas(),a=t[e];for(let r=0,l=o.length;r{l[a](e[t],s)&&(o.push({element:l,datasetIndex:c,index:h}),r=r||l.inRange(e.x,e.y,s))}),n&&!r?[]:o}var Kl={evaluateInteractionItems:Fe,modes:{index(i,e,t,n){let s=zt(e,i),o=t.axis||"x",a=t.includeInvisible||!1,r=t.intersect?un(i,s,o,n,a):fn(i,s,o,!1,n,a),l=[];return r.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{let h=r[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(i,e,t,n){let s=zt(e,i),o=t.axis||"xy",a=t.includeInvisible||!1,r=t.intersect?un(i,s,o,n,a):fn(i,s,o,!1,n,a);if(r.length>0){let l=r[0].datasetIndex,c=i.getDatasetMeta(l).data;r=[];for(let h=0;ht.pos===e)}function Bo(i,e){return i.filter(t=>Aa.indexOf(t.pos)===-1&&t.box.axis===e)}function Pe(i,e){return i.sort((t,n)=>{let s=e?n:t,o=e?t:n;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function ql(i){let e=[],t,n,s,o,a,r;for(t=0,n=(i||[]).length;tc.box.fullSize),!0),n=Pe(Ce(e,"left"),!0),s=Pe(Ce(e,"right")),o=Pe(Ce(e,"top"),!0),a=Pe(Ce(e,"bottom")),r=Bo(e,"x"),l=Bo(e,"y");return{fullSize:t,leftAndTop:n.concat(o),rightAndBottom:s.concat(l).concat(a).concat(r),chartArea:Ce(e,"chartArea"),vertical:n.concat(s).concat(l),horizontal:o.concat(a).concat(r)}}function Vo(i,e,t,n){return Math.max(i[t],e[t])+Math.max(i[n],e[n])}function La(i,e){i.top=Math.max(i.top,e.top),i.left=Math.max(i.left,e.left),i.bottom=Math.max(i.bottom,e.bottom),i.right=Math.max(i.right,e.right)}function Ql(i,e,t,n){let{pos:s,box:o}=t,a=i.maxPadding;if(!L(s)){t.size&&(i[s]-=t.size);let d=n[t.stack]||{size:0,count:1};d.size=Math.max(d.size,t.horizontal?o.height:o.width),t.size=d.size/d.count,i[s]+=t.size}o.getPadding&&La(a,o.getPadding());let r=Math.max(0,e.outerWidth-Vo(a,i,"left","right")),l=Math.max(0,e.outerHeight-Vo(a,i,"top","bottom")),c=r!==i.w,h=l!==i.h;return i.w=r,i.h=l,t.horizontal?{same:c,other:h}:{same:h,other:c}}function tc(i){let e=i.maxPadding;function t(n){let s=Math.max(e[n]-i[n],0);return i[n]+=s,s}i.y+=t("top"),i.x+=t("left"),t("right"),t("bottom")}function ec(i,e){let t=e.maxPadding;function n(s){let o={left:0,top:0,right:0,bottom:0};return s.forEach(a=>{o[a]=Math.max(e[a],t[a])}),o}return n(i?["left","right"]:["top","bottom"])}function Te(i,e,t,n){let s=[],o,a,r,l,c,h;for(o=0,a=i.length,c=0;o{typeof p.beforeLayout=="function"&&p.beforeLayout()});let h=l.reduce((p,m)=>m.box.options&&m.box.options.display===!1?p:p+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:t,padding:s,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},s);La(u,J(n));let f=Object.assign({maxPadding:u,w:o,h:a,x:s.left,y:s.top},s),g=Jl(l.concat(c),d);Te(r.fullSize,f,d,g),Te(l,f,d,g),Te(c,f,d,g)&&Te(l,f,d,g),tc(f),No(r.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,No(r.rightAndBottom,f,d,g),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},F(r.chartArea,p=>{let m=p.box;Object.assign(m,i.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}},mi=class{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,n){}removeEventListener(e,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,n,s){return t=Math.max(0,t||e.width),n=n||e.height,{width:t,height:Math.max(0,s?Math.floor(t/s):n)}}isAttached(e){return!0}updateConfig(e){}},vn=class extends mi{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}},fi="$chartjs",ic={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Wo=i=>i===null||i==="";function nc(i,e){let t=i.style,n=i.getAttribute("height"),s=i.getAttribute("width");if(i[fi]={initial:{height:n,width:s,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",Wo(s)){let o=sn(i,"width");o!==void 0&&(i.width=o)}if(Wo(n))if(i.style.height==="")i.height=i.width/(e||2);else{let o=sn(i,"height");o!==void 0&&(i.height=o)}return i}var Ea=Mo?{passive:!0}:!1;function sc(i,e,t){i&&i.addEventListener(e,t,Ea)}function oc(i,e,t){i&&i.canvas&&i.canvas.removeEventListener(e,t,Ea)}function ac(i,e){let t=ic[i.type]||i.type,{x:n,y:s}=zt(i,e);return{type:t,chart:e,native:i,x:n!==void 0?n:null,y:s!==void 0?s:null}}function bi(i,e){for(let t of i)if(t===e||t.contains(e))return!0}function rc(i,e,t){let n=i.canvas,s=new MutationObserver(o=>{let a=!1;for(let r of o)a=a||bi(r.addedNodes,n),a=a&&!bi(r.removedNodes,n);a&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function lc(i,e,t){let n=i.canvas,s=new MutationObserver(o=>{let a=!1;for(let r of o)a=a||bi(r.removedNodes,n),a=a&&!bi(r.addedNodes,n);a&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}var Le=new Map,Ho=0;function Ra(){let i=window.devicePixelRatio;i!==Ho&&(Ho=i,Le.forEach((e,t)=>{t.currentDevicePixelRatio!==i&&e()}))}function cc(i,e){Le.size||window.addEventListener("resize",Ra),Le.set(i,e)}function hc(i){Le.delete(i),Le.size||window.removeEventListener("resize",Ra)}function dc(i,e,t){let n=i.canvas,s=n&&si(n);if(!s)return;let o=$i((r,l)=>{let c=s.clientWidth;t(r,l),c{let l=r[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return a.observe(s),cc(i,o),a}function gn(i,e,t){t&&t.disconnect(),e==="resize"&&hc(i)}function uc(i,e,t){let n=i.canvas,s=$i(o=>{i.ctx!==null&&t(ac(o,i))},i);return sc(n,e,s),s}var Mn=class extends mi{acquireContext(e,t){let n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(nc(e,t),n):null}releaseContext(e){let t=e.canvas;if(!t[fi])return!1;let n=t[fi].initial;["height","width"].forEach(o=>{let a=n[o];R(a)?t.removeAttribute(o):t.setAttribute(o,a)});let s=n.style||{};return Object.keys(s).forEach(o=>{t.style[o]=s[o]}),t.width=t.width,delete t[fi],!0}addEventListener(e,t,n){this.removeEventListener(e,t);let s=e.$proxies||(e.$proxies={}),a={attach:rc,detach:lc,resize:dc}[t]||uc;s[t]=a(e,t,n)}removeEventListener(e,t){let n=e.$proxies||(e.$proxies={}),s=n[t];if(!s)return;({attach:gn,detach:gn,resize:gn}[t]||oc)(e,t,s),n[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,n,s){return vo(e,t,n,s)}isAttached(e){let t=si(e);return!!(t&&t.isConnected)}};function fc(i){return!ni()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?vn:Mn}var ct=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){let{x:t,y:n}=this.getProps(["x","y"],e);return{x:t,y:n}}hasValue(){return Xt(this.x)&&Xt(this.y)}getProps(e,t){let n=this.$animations;if(!t||!n)return this;let s={};return e.forEach(o=>{s[o]=n[o]&&n[o].active()?n[o]._to:this[o]}),s}};function gc(i,e){let t=i.options.ticks,n=pc(i),s=Math.min(t.maxTicksLimit||n,n),o=t.major.enabled?bc(e):[],a=o.length,r=o[0],l=o[a-1],c=[];if(a>s)return xc(e,c,o,a/s),c;let h=mc(o,e,s);if(a>0){let d,u,f=a>1?Math.round((l-r)/(a-1)):null;for(ri(e,c,h,R(f)?0:r-f,r),d=0,u=a-1;ds)return l}return Math.max(s,1)}function bc(i){let e=[],t,n;for(t=0,n=i.length;ti==="left"?"right":i==="right"?"left":i,jo=(i,e,t)=>e==="top"||e==="left"?i[e]+t:i[e]-t,$o=(i,e)=>Math.min(e||i,i);function Yo(i,e){let t=[],n=i.length/e,s=i.length,o=0;for(;oa+r)))return l}function Mc(i,e){F(i,t=>{let n=t.gc,s=n.length/2,o;if(s>e){for(o=0;on?n:t,n=s&&t>n?t:n,{min:et(t,et(n,t)),max:et(n,et(t,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){z(this.options.beforeUpdate,[this])}update(e,t,n){let{beginAtZero:s,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=po(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=r=o||n<=1||!this.isHorizontal()){this.labelRotation=s;return}let h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=K(this.chart.width-d,0,this.maxWidth);r=e.offset?this.maxWidth/n:f/(n-1),d+6>r&&(r=f/(n-(e.offset?.5:1)),l=this.maxHeight-De(e.grid)-t.padding-Uo(e.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),a=Ge(Math.min(Math.asin(K((h.highest.height+6)/r,-1,1)),Math.asin(K(l/c,-1,1))-Math.asin(K(u/c,-1,1)))),a=Math.max(s,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){z(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){z(this.options.beforeFit,[this])}fit(){let e={width:0,height:0},{chart:t,options:{ticks:n,title:s,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){let l=Uo(s,t.options.font);if(r?(e.width=this.maxWidth,e.height=De(o)+l):(e.height=this.maxHeight,e.width=De(o)+l),n.display&&this.ticks.length){let{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),f=n.padding*2,g=at(this.labelRotation),p=Math.cos(g),m=Math.sin(g);if(r){let x=n.mirror?0:m*d.width+p*u.height;e.height=Math.min(this.maxHeight,e.height+x+f)}else{let x=n.mirror?0:p*d.width+m*u.height;e.width=Math.min(this.maxWidth,e.width+x+f)}this._calculatePadding(c,h,m,p)}}this._handleMargins(),r?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,n,s){let{ticks:{align:o,padding:a},position:r}=this.options,l=this.labelRotation!==0,c=r!=="top"&&this.axis==="x";if(this.isHorizontal()){let h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1),u=0,f=0;l?c?(u=s*e.width,f=n*t.height):(u=n*e.height,f=s*t.width):o==="start"?f=t.width:o==="end"?u=e.width:o!=="inner"&&(u=e.width/2,f=t.width/2),this.paddingLeft=Math.max((u-h+a)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-d+a)*this.width/(this.width-d),0)}else{let h=t.height/2,d=e.height/2;o==="start"?(h=0,d=e.height):o==="end"&&(h=t.height,d=0),this.paddingTop=h+a,this.paddingBottom=d+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){z(this.options.afterFit,[this])}isHorizontal(){let{axis:e,position:t}=this.options;return t==="top"||t==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let t,n;for(t=0,n=e.length;t({width:a[w]||0,height:r[w]||0});return{first:S(0),last:S(t-1),widest:S(v),highest:S(k),widths:a,heights:r}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){let t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);let t=this._startPixel+e*this._length;return no(this._alignToPixels?Rt(this.chart,t,0):t)}getDecimalForPixel(e){let t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){let t=this.ticks||[];if(e>=0&&er*s?r/n:l/s:l*s0}_computeGridLineItems(e){let t=this.axis,n=this.chart,s=this.options,{grid:o,position:a,border:r}=s,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),u=De(o),f=[],g=r.setContext(this.getContext()),p=g.display?g.width:0,m=p/2,x=function(W){return Rt(n,W,p)},b,y,M,_,v,k,S,w,A,O,E,q;if(a==="top")b=x(this.bottom),k=this.bottom-u,w=b-m,O=x(e.top)+m,q=e.bottom;else if(a==="bottom")b=x(this.top),O=e.top,q=x(e.bottom)-m,k=b+m,w=this.top+u;else if(a==="left")b=x(this.right),v=this.right-u,S=b-m,A=x(e.left)+m,E=e.right;else if(a==="right")b=x(this.left),A=e.left,E=x(e.right)-m,v=b+m,S=this.left+u;else if(t==="x"){if(a==="center")b=x((e.top+e.bottom)/2+.5);else if(L(a)){let W=Object.keys(a)[0],U=a[W];b=x(this.chart.scales[W].getPixelForValue(U))}O=e.top,q=e.bottom,k=b+m,w=k+u}else if(t==="y"){if(a==="center")b=x((e.left+e.right)/2);else if(L(a)){let W=Object.keys(a)[0],U=a[W];b=x(this.chart.scales[W].getPixelForValue(U))}v=b-m,S=v-u,A=e.left,E=e.right}let st=D(s.ticks.maxTicksLimit,d),I=Math.max(1,Math.ceil(d/st));for(y=0;y0&&(Wt-=Nt/2);break}Ie={left:Wt,top:pe,width:Nt+Qt.width,height:ge+Qt.height,color:I.backdropColor}}m.push({label:M,font:w,textOffset:E,options:{rotation:p,color:U,strokeColor:rt,strokeWidth:Z,textAlign:Zt,textBaseline:q,translation:[_,v],backdrop:Ie}})}return m}_getXAxisLabelAlignment(){let{position:e,ticks:t}=this.options;if(-at(this.labelRotation))return e==="top"?"left":"right";let s="center";return t.align==="start"?s="left":t.align==="end"?s="right":t.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(e){let{position:t,ticks:{crossAlign:n,mirror:s,padding:o}}=this.options,a=this._getLabelSizes(),r=e+o,l=a.widest.width,c,h;return t==="left"?s?(h=this.right+o,n==="near"?c="left":n==="center"?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-r,n==="near"?c="right":n==="center"?(c="center",h-=l/2):(c="left",h=this.left)):t==="right"?s?(h=this.left+o,n==="near"?c="right":n==="center"?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+r,n==="near"?c="left":n==="center"?(c="center",h+=l/2):(c="right",h=this.right)):c="right",{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;let e=this.chart,t=this.options.position;if(t==="left"||t==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(t==="top"||t==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){let{ctx:e,options:{backgroundColor:t},left:n,top:s,width:o,height:a}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(n,s,o,a),e.restore())}getLineWidthForValue(e){let t=this.options.grid;if(!this._isVisible()||!t.display)return 0;let s=this.ticks.findIndex(o=>o.value===e);return s>=0?t.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){let t=this.options.grid,n=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e)),o,a,r=(l,c,h)=>{!h.width||!h.color||(n.save(),n.lineWidth=h.width,n.strokeStyle=h.color,n.setLineDash(h.borderDash||[]),n.lineDashOffset=h.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(c.x,c.y),n.stroke(),n.restore())};if(t.display)for(o=0,a=s.length;o{this.draw(o)}}]:[{z:n,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:t,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(e){let t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",s=[],o,a;for(o=0,a=t.length;o{let n=t.split("."),s=n.pop(),o=[i].concat(n).join("."),a=e[t].split("."),r=a.pop(),l=a.join(".");$.route(o,s,l,r)})}function Oc(i){return"id"in i&&"defaults"in i}var Sn=class{constructor(){this.controllers=new ue(Vt,"datasets",!0),this.elements=new ue(ct,"elements"),this.plugins=new ue(Object,"plugins"),this.scales=new ue(Jt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,n){[...t].forEach(s=>{let o=n||this._getRegistryForType(s);n||o.isForType(s)||o===this.plugins&&s.id?this._exec(e,o,s):F(s,a=>{let r=n||this._getRegistryForType(a);this._exec(e,r,a)})})}_exec(e,t,n){let s=qe(e);z(n["before"+s],[],n),t[e](n),z(n["after"+s],[],n)}_getRegistryForType(e){for(let t=0;to.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(s(t,n),e,"stop"),this._notify(s(n,t),e,"start")}};function Tc(i){let e={},t=[],n=Object.keys(bt.plugins.items);for(let o=0;o1&&Xo(i[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function Ko(i,e,t){if(t[e+"AxisID"]===i)return{axis:e}}function zc(i,e){if(e.data&&e.data.datasets){let t=e.data.datasets.filter(n=>n.xAxisID===i||n.yAxisID===i);if(t.length)return Ko(i,"x",t[0])||Ko(i,"y",t[0])}return{}}function Bc(i,e){let t=Et[i.type]||{scales:{}},n=e.scales||{},s=wn(i.type,e),o=Object.create(null);return Object.keys(n).forEach(a=>{let r=n[a];if(!L(r))return console.error(`Invalid scale configuration for scale: ${a}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);let l=Cn(a,r,zc(a,i),$.scales[r.type]),c=Fc(l,s),h=t.scales||{};o[a]=se(Object.create(null),[{axis:l},r,h[l],h[c]])}),i.data.datasets.forEach(a=>{let r=a.type||i.type,l=a.indexAxis||wn(r,e),h=(Et[r]||{}).scales||{};Object.keys(h).forEach(d=>{let u=Rc(d,l),f=a[u+"AxisID"]||u;o[f]=o[f]||Object.create(null),se(o[f],[{axis:u},n[f],h[d]])})}),Object.keys(o).forEach(a=>{let r=o[a];se(r,[$.scales[r.type],$.scale])}),o}function Fa(i){let e=i.options||(i.options={});e.plugins=D(e.plugins,{}),e.scales=Bc(i,e)}function Ia(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function Vc(i){return i=i||{},i.data=Ia(i.data),Fa(i),i}var qo=new Map,za=new Set;function li(i,e){let t=qo.get(i);return t||(t=e(),qo.set(i,t),za.add(t)),t}var Oe=(i,e,t)=>{let n=vt(e,t);n!==void 0&&i.add(n)},Pn=class{constructor(e){this._config=Vc(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Ia(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){let e=this._config;this.clearCache(),Fa(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return li(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return li(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return li(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){let t=e.id,n=this.type;return li(`${n}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){let n=this._scopeCache,s=n.get(e);return(!s||t)&&(s=new Map,n.set(e,s)),s}getOptionScopes(e,t,n){let{options:s,type:o}=this,a=this._cachedScopes(e,n),r=a.get(t);if(r)return r;let l=new Set;t.forEach(h=>{e&&(l.add(e),h.forEach(d=>Oe(l,e,d))),h.forEach(d=>Oe(l,s,d)),h.forEach(d=>Oe(l,Et[o]||{},d)),h.forEach(d=>Oe(l,$,d)),h.forEach(d=>Oe(l,Qe,d))});let c=Array.from(l);return c.length===0&&c.push(Object.create(null)),za.has(t)&&a.set(t,c),c}chartOptionScopes(){let{options:e,type:t}=this;return[e,Et[t]||{},$.datasets[t]||{},{type:t},$,Qe]}resolveNamedOptions(e,t,n,s=[""]){let o={$shared:!0},{resolver:a,subPrefixes:r}=Go(this._resolverCache,e,s),l=a;if(Wc(a,t)){o.$shared=!1,n=_t(n)?n():n;let c=this.createResolver(e,n,r);l=Ut(a,n,c)}for(let c of t)o[c]=l[c];return o}createResolver(e,t,n=[""],s){let{resolver:o}=Go(this._resolverCache,e,n);return L(t)?Ut(o,t,void 0,s):o}};function Go(i,e,t){let n=i.get(e);n||(n=new Map,i.set(e,n));let s=t.join(),o=n.get(s);return o||(o={resolver:ii(e,t),subPrefixes:t.filter(r=>!r.toLowerCase().includes("hover"))},n.set(s,o)),o}var Nc=i=>L(i)&&Object.getOwnPropertyNames(i).some(e=>_t(i[e]));function Wc(i,e){let{isScriptable:t,isIndexable:n}=Zi(i);for(let s of e){let o=t(s),a=n(s),r=(a||o)&&i[s];if(o&&(_t(r)||Nc(r))||a&&B(r))return!0}return!1}var Hc="4.4.2",jc=["top","bottom","left","right","chartArea"];function Jo(i,e){return i==="top"||i==="bottom"||jc.indexOf(i)===-1&&e==="x"}function Zo(i,e){return function(t,n){return t[i]===n[i]?t[e]-n[e]:t[i]-n[i]}}function Qo(i){let e=i.chart,t=e.options.animation;e.notifyPlugins("afterRender"),z(t&&t.onComplete,[i],e)}function $c(i){let e=i.chart,t=e.options.animation;z(t&&t.onProgress,[i],e)}function Ba(i){return ni()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}var gi={},ta=i=>{let e=Ba(i);return Object.values(gi).filter(t=>t.canvas===e).pop()};function Yc(i,e,t){let n=Object.keys(i);for(let s of n){let o=+s;if(o>=e){let a=i[s];delete i[s],(t>0||o>e)&&(i[o+t]=a)}}}function Uc(i,e,t,n){return!t||i.type==="mouseout"?null:n?e:i}function ci(i,e,t){return i.options.clip?i[t]:e[t]}function Xc(i,e){let{xScale:t,yScale:n}=i;return t&&n?{left:ci(t,e,"left"),right:ci(t,e,"right"),top:ci(n,e,"top"),bottom:ci(n,e,"bottom")}:e}var vi=(()=>{class i{static defaults=$;static instances=gi;static overrides=Et;static registry=bt;static version=Hc;static getChart=ta;static register(...t){bt.add(...t),ea()}static unregister(...t){bt.remove(...t),ea()}constructor(t,n){let s=this.config=new Pn(n),o=Ba(t),a=ta(o);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");let r=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||fc(o)),this.platform.updateConfig(s);let l=this.platform.acquireContext(o,r.aspectRatio),c=l&&l.canvas,h=c&&c.height,d=c&&c.width;if(this.id=Js(),this.ctx=l,this.canvas=c,this.width=d,this.height=h,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new kn,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=lo(u=>this.update(u),r.resizeDelay||0),this._dataChanges=[],gi[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}St.listen(this,"complete",Qo),St.listen(this,"progress",$c),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:n},width:s,height:o,_aspectRatio:a}=this;return R(t)?n&&a?a:o?s/o: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 bt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():nn(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return qi(this.canvas,this.ctx),this}stop(){return St.stop(this),this}resize(t,n){St.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){let s=this.options,o=this.canvas,a=s.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(o,t,n,a),l=s.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,nn(this,l,!0)&&(this.notifyPlugins("resize",{size:r}),z(s.onResize,[this,r],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){let n=this.options.scales||{};F(n,(s,o)=>{s.id=o})}buildOrUpdateScales(){let t=this.options,n=t.scales,s=this.scales,o=Object.keys(s).reduce((r,l)=>(r[l]=!1,r),{}),a=[];n&&(a=a.concat(Object.keys(n).map(r=>{let l=n[r],c=Cn(r,l),h=c==="r",d=c==="x";return{options:l,dposition:h?"chartArea":d?"bottom":"left",dtype:h?"radialLinear":d?"category":"linear"}}))),F(a,r=>{let l=r.options,c=l.id,h=Cn(c,l),d=D(l.type,r.dtype);(l.position===void 0||Jo(l.position,h)!==Jo(r.dposition))&&(l.position=r.dposition),o[c]=!0;let u=null;if(c in s&&s[c].type===d)u=s[c];else{let f=bt.getScale(d);u=new f({id:c,type:d,ctx:this.ctx,chart:this}),s[u.id]=u}u.init(l,t)}),F(o,(r,l)=>{r||delete s[l]}),F(s,r=>{Q.configure(this,r,r.options),Q.addBox(this,r)})}_updateMetasets(){let t=this._metasets,n=this.data.datasets.length,s=t.length;if(t.sort((o,a)=>o.index-a.index),s>n){for(let o=n;on.length&&delete this._stacks,t.forEach((s,o)=>{n.filter(a=>a===s._dataset).length===0&&this._destroyDatasetMeta(o)})}buildOrUpdateControllers(){let t=[],n=this.data.datasets,s,o;for(this._removeUnreferencedMetasets(),s=0,o=n.length;s{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let n=this.config;n.update();let s=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),o=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let h=0,d=this.data.datasets.length;h{h.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Zo("z","_idx"));let{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){F(this.scales,t=>{Q.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,n=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!Ii(n,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(let{method:s,start:o,count:a}of n){let r=s==="_removeElements"?-a:a;Yc(t,o,r)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let n=this.data.datasets.length,s=a=>new Set(t.filter(r=>r[0]===a).map((r,l)=>l+","+r.splice(1).join(","))),o=s(0);for(let a=1;aa.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Q.update(this,this.width,this.height,t);let n=this.chartArea,s=n.width<=0||n.height<=0;this._layers=[],F(this.boxes,o=>{s&&o.position==="chartArea"||(o.configure&&o.configure(),this._layers.push(...o._layers()))},this),this._layers.forEach((o,a)=>{o._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,s=this.data.datasets.length;n=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let n=this.ctx,s=t._clip,o=!s.disabled,a=Xc(t,this.chartArea),r={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(o&&Se(n,{left:s.left===!1?0:a.left-s.left,right:s.right===!1?this.width:a.right+s.right,top:s.top===!1?0:a.top-s.top,bottom:s.bottom===!1?this.height:a.bottom+s.bottom}),t.controller.draw(),o&&ke(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return ft(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,s,o){let a=Kl.modes[n];return typeof a=="function"?a(this,t,s,o):[]}getDatasetMeta(t){let n=this.data.datasets[t],s=this._metasets,o=s.filter(a=>a&&a._dataset===n).pop();return o||(o={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},s.push(o)),o}getContext(){return this.$context||(this.$context=Mt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let n=this.data.datasets[t];if(!n)return!1;let s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!n.hidden}setDatasetVisibility(t,n){let s=this.getDatasetMeta(t);s.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,s){let o=s?"show":"hide",a=this.getDatasetMeta(t),r=a.controller._resolveAnimations(void 0,o);oe(n)?(a.data[n].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),r.update(a,{visible:s}),this.update(l=>l.datasetIndex===t?o:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){let n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),St.remove(this),t=0,n=this.data.datasets.length;t{n.addEventListener(this,a,r),t[a]=r},o=(a,r,l)=>{a.offsetX=r,a.offsetY=l,this._eventHandler(a)};F(this.options.events,a=>s(a,o))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,n=this.platform,s=(c,h)=>{n.addEventListener(this,c,h),t[c]=h},o=(c,h)=>{t[c]&&(n.removeEventListener(this,c,h),delete t[c])},a=(c,h)=>{this.canvas&&this.resize(c,h)},r,l=()=>{o("attach",l),this.attached=!0,this.resize(),s("resize",a),s("detach",r)};r=()=>{this.attached=!1,o("resize",a),this._stop(),this._resize(0,0),s("attach",l)},n.isAttached(this.canvas)?l():r()}unbindEvents(){F(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},F(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,s){let o=s?"set":"remove",a,r,l,c;for(n==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+o+"DatasetHoverStyle"]()),l=0,c=t.length;l{let l=this.getDatasetMeta(a);if(!l)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:l.data[r],index:r}});!ve(s,n)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,n))}notifyPlugins(t,n,s){return this._plugins.notify(this,t,n,s)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,s){let o=this.options.hover,a=(c,h)=>c.filter(d=>!h.some(u=>d.datasetIndex===u.datasetIndex&&d.index===u.index)),r=a(n,t),l=s?t:a(t,n);r.length&&this.updateHoverStyle(r,o.mode,!1),l.length&&o.mode&&this.updateHoverStyle(l,o.mode,!0)}_eventHandler(t,n){let s={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},o=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,o)===!1)return;let a=this._handleEvent(t,n,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,o),(a||s.changed)&&this.render(),this}_handleEvent(t,n,s){let{_active:o=[],options:a}=this,r=n,l=this._getActiveElements(t,o,s,r),c=to(t),h=Uc(t,this._lastEvent,s,c);s&&(this._lastEvent=null,z(a.onHover,[t,l,this],this),c&&z(a.onClick,[t,l,this],this));let d=!ve(l,o);return(d||n)&&(this._active=l,this._updateHoverStyles(l,o,n)),this._lastEvent=h,d}_getActiveElements(t,n,s,o){if(t.type==="mouseout")return[];if(!s)return n;let a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,o)}}return i})();function ea(){return F(vi.instances,i=>i._plugins.invalidate())}function Kc(i,e,t){let{startAngle:n,pixelMargin:s,x:o,y:a,outerRadius:r,innerRadius:l}=e,c=s/r;i.beginPath(),i.arc(o,a,r,n-c,t+c),l>s?(c=s/l,i.arc(o,a,l,t+c,n-c,!0)):i.arc(o,a,s,t+Y,n-Y),i.closePath(),i.clip()}function qc(i){return ei(i,["outerStart","outerEnd","innerStart","innerEnd"])}function Gc(i,e,t,n){let s=qc(i.options.borderRadius),o=(t-e)/2,a=Math.min(o,n*e/2),r=l=>{let c=(t-Math.min(o,l))*n/2;return K(l,0,Math.min(o,c))};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:K(s.innerStart,0,a),innerEnd:K(s.innerEnd,0,a)}}function de(i,e,t,n){return{x:t+i*Math.cos(e),y:n+i*Math.sin(e)}}function xi(i,e,t,n,s,o){let{x:a,y:r,startAngle:l,pixelMargin:c,innerRadius:h}=e,d=Math.max(e.outerRadius+n+t-c,0),u=h>0?h+n+t+c:0,f=0,g=s-l;if(n){let I=h>0?h-n:0,W=d>0?d-n:0,U=(I+W)/2,rt=U!==0?g*U/(U+n):g;f=(g-rt)/2}let p=Math.max(.001,g*d-t/V)/d,m=(g-p)/2,x=l+m+f,b=s-m-f,{outerStart:y,outerEnd:M,innerStart:_,innerEnd:v}=Gc(e,u,d,b-x),k=d-y,S=d-M,w=x+y/k,A=b-M/S,O=u+_,E=u+v,q=x+_/O,st=b-v/E;if(i.beginPath(),o){let I=(w+A)/2;if(i.arc(a,r,d,w,I),i.arc(a,r,d,I,A),M>0){let Z=de(S,A,a,r);i.arc(Z.x,Z.y,M,A,b+Y)}let W=de(E,b,a,r);if(i.lineTo(W.x,W.y),v>0){let Z=de(E,st,a,r);i.arc(Z.x,Z.y,v,b+Y,st+Math.PI)}let U=(b-v/u+(x+_/u))/2;if(i.arc(a,r,u,b-v/u,U,!0),i.arc(a,r,u,U,x+_/u,!0),_>0){let Z=de(O,q,a,r);i.arc(Z.x,Z.y,_,q+Math.PI,x-Y)}let rt=de(k,x,a,r);if(i.lineTo(rt.x,rt.y),y>0){let Z=de(k,w,a,r);i.arc(Z.x,Z.y,y,x-Y,w)}}else{i.moveTo(a,r);let I=Math.cos(w)*d+a,W=Math.sin(w)*d+r;i.lineTo(I,W);let U=Math.cos(A)*d+a,rt=Math.sin(A)*d+r;i.lineTo(U,rt)}i.closePath()}function Jc(i,e,t,n,s){let{fullCircles:o,startAngle:a,circumference:r}=e,l=e.endAngle;if(o){xi(i,e,t,n,l,s);for(let c=0;ce!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,n){let s=this.getProps(["x","y"],n),{angle:o,distance:a}=Ni(s,{x:e,y:t}),{startAngle:r,endAngle:l,innerRadius:c,outerRadius:h,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),u=(this.options.spacing+this.options.borderWidth)/2,g=D(d,l-r)>=N||re(o,r,l),p=pt(a,c+u,h+u);return g&&p}getCenterPoint(e){let{x:t,y:n,startAngle:s,endAngle:o,innerRadius:a,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:l,spacing:c}=this.options,h=(s+o)/2,d=(a+r+c+l)/2;return{x:t+Math.cos(h)*d,y:n+Math.sin(h)*d}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){let{options:t,circumference:n}=this,s=(t.offset||0)/4,o=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=n>N?Math.floor(n/N):0,n===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let r=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(r)*s,Math.sin(r)*s);let l=1-Math.sin(Math.min(V,n||0)),c=s*l;e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,Jc(e,this,c,o,a),Zc(e,this,c,o,a),e.restore()}};function Va(i,e,t=e){i.lineCap=D(t.borderCapStyle,e.borderCapStyle),i.setLineDash(D(t.borderDash,e.borderDash)),i.lineDashOffset=D(t.borderDashOffset,e.borderDashOffset),i.lineJoin=D(t.borderJoinStyle,e.borderJoinStyle),i.lineWidth=D(t.borderWidth,e.borderWidth),i.strokeStyle=D(t.borderColor,e.borderColor)}function Qc(i,e,t){i.lineTo(t.x,t.y)}function th(i){return i.stepped?fo:i.tension||i.cubicInterpolationMode==="monotone"?go:Qc}function Na(i,e,t={}){let n=i.length,{start:s=0,end:o=n-1}=t,{start:a,end:r}=e,l=Math.max(s,a),c=Math.min(o,r),h=sr&&o>r;return{count:n,start:l,loop:e.loop,ilen:c(a+(c?r-M:M))%o,y=()=>{p!==m&&(i.lineTo(h,m),i.lineTo(h,p),i.lineTo(h,x))};for(l&&(f=s[b(0)],i.moveTo(f.x,f.y)),u=0;u<=r;++u){if(f=s[b(u)],f.skip)continue;let M=f.x,_=f.y,v=M|0;v===g?(_m&&(m=_),h=(d*h+M)/++d):(y(),i.lineTo(M,_),g=v,d=0,p=m=_),x=_}y()}function On(i){let e=i.options,t=e.borderDash&&e.borderDash.length;return!i._decimated&&!i._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!t?ih:eh}function nh(i){return i.stepped?So:i.tension||i.cubicInterpolationMode==="monotone"?ko:Lt}function sh(i,e,t,n){let s=e._path;s||(s=e._path=new Path2D,e.path(s,t,n)&&s.closePath()),Va(i,e.options),i.stroke(s)}function oh(i,e,t,n){let{segments:s,options:o}=e,a=On(e);for(let r of s)Va(i,o,r.style),i.beginPath(),a(i,e,r,{start:t,end:t+n-1})&&i.closePath(),i.stroke()}var ah=typeof Path2D=="function";function rh(i,e,t,n){ah&&!e.options.segment?sh(i,e,t,n):oh(i,e,t,n)}var Mi=(()=>{class i extends ct{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){let s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){let o=s.spanGaps?this._loop:this._fullLoop;yo(this._points,s,t,o,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Co(this,this.options.segment))}first(){let t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){let t=this.segments,n=this.points,s=t.length;return s&&n[t[s-1].end]}interpolate(t,n){let s=this.options,o=t[n],a=this.points,r=ln(this,{property:n,start:o,end:o});if(!r.length)return;let l=[],c=nh(s),h,d;for(h=0,d=r.length;h{class i extends ct{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,n,s){let o=this.options,{x:a,y:r}=this.getProps(["x","y"],s);return Math.pow(t-a,2)+Math.pow(n-r,2)i.replace("rgb(","rgba(").replace(")",", 0.5)"));function Ha(i){return An[i%An.length]}function ja(i){return na[i%na.length]}function ph(i,e){return i.borderColor=Ha(e),i.backgroundColor=ja(e),++e}function mh(i,e){return i.backgroundColor=i.data.map(()=>Ha(e++)),e}function bh(i,e){return i.backgroundColor=i.data.map(()=>ja(e++)),e}function xh(i){let e=0;return(t,n)=>{let s=i.getDatasetMeta(n).controller;s instanceof Vn?e=mh(t,e):s instanceof Ta?e=bh(t,e):s&&(e=ph(t,e))}}function sa(i){let e;for(e in i)if(i[e].borderColor||i[e].backgroundColor)return!0;return!1}function _h(i){return i&&(i.borderColor||i.backgroundColor)}var yh={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(i,e,t){if(!t.enabled)return;let{data:{datasets:n},options:s}=i.config,{elements:o}=s;if(!t.forceOverride&&(sa(n)||_h(s)||o&&sa(o)))return;let a=xh(i);n.forEach(a)}};function vh(i,e,t,n,s){let o=s.samples||n;if(o>=t)return i.slice(e,e+t);let a=[],r=(t-2)/(o-2),l=0,c=e+t-1,h=e,d,u,f,g,p;for(a[l++]=i[h],d=0;df&&(f=g,u=i[b],p=b);a[l++]=u,h=p}return a[l++]=i[c],a}function Mh(i,e,t,n){let s=0,o=0,a,r,l,c,h,d,u,f,g,p,m=[],x=e+t-1,b=i[e].x,M=i[x].x-b;for(a=e;ap&&(p=c,u=a),s=(o*s+r.x)/++o;else{let v=a-1;if(!R(d)&&!R(u)){let k=Math.min(d,u),S=Math.max(d,u);k!==f&&k!==v&&m.push(Be(ze({},i[k]),{x:s})),S!==f&&S!==v&&m.push(Be(ze({},i[S]),{x:s}))}a>0&&v!==f&&m.push(i[v]),m.push(r),h=_,o=0,g=p=c,d=u=f=a}}return m}function $a(i){if(i._decimated){let e=i._data;delete i._decimated,delete i._data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function oa(i){i.data.datasets.forEach(e=>{$a(e)})}function Sh(i,e){let t=e.length,n=0,s,{iScale:o}=i,{min:a,max:r,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(n=K(ut(e,o.axis,a).lo,0,t-1)),c?s=K(ut(e,o.axis,r).hi+1,n,t)-n:s=t-n,{start:n,count:s}}var kh={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,e,t)=>{if(!t.enabled){oa(i);return}let n=i.width;i.data.datasets.forEach((s,o)=>{let{_data:a,indexAxis:r}=s,l=i.getDatasetMeta(o),c=a||s.data;if(he([r,i.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;let h=i.scales[l.xAxisID];if(h.type!=="linear"&&h.type!=="time"||i.options.parsing)return;let{start:d,count:u}=Sh(l,c),f=t.threshold||4*n;if(u<=f){$a(s);return}R(a)&&(s._data=c,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(p){this._data=p}}));let g;switch(t.algorithm){case"lttb":g=vh(c,d,u,n,t);break;case"min-max":g=Mh(c,d,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`)}s._decimated=g})},destroy(i){oa(i)}};function wh(i,e,t){let n=i.segments,s=i.points,o=e.points,a=[];for(let r of n){let{start:l,end:c}=r;c=Nn(l,c,s);let h=Ln(t,s[l],s[c],r.loop);if(!e.segments){a.push({source:r,target:h,start:s[l],end:s[c]});continue}let d=ln(e,h);for(let u of d){let f=Ln(t,o[u.start],o[u.end],u.loop),g=rn(r,s,f);for(let p of g)a.push({source:p,target:u,start:{[t]:aa(h,f,"start",Math.max)},end:{[t]:aa(h,f,"end",Math.min)}})}}return a}function Ln(i,e,t,n){if(n)return;let s=e[i],o=t[i];return i==="angle"&&(s=tt(s),o=tt(o)),{property:i,start:s,end:o}}function Ch(i,e){let{x:t=null,y:n=null}=i||{},s=e.points,o=[];return e.segments.forEach(({start:a,end:r})=>{r=Nn(a,r,s);let l=s[a],c=s[r];n!==null?(o.push({x:l.x,y:n}),o.push({x:c.x,y:n})):t!==null&&(o.push({x:t,y:l.y}),o.push({x:t,y:c.y}))}),o}function Nn(i,e,t){for(;e>i;e--){let n=t[e];if(!isNaN(n.x)&&!isNaN(n.y))break}return e}function aa(i,e,t,n){return i&&e?n(i[t],e[t]):i?i[t]:e?e[t]:0}function Ya(i,e){let t=[],n=!1;return B(i)?(n=!0,t=i):t=Ch(i,e),t.length?new Mi({points:t,options:{tension:0},_loop:n,_fullLoop:n}):null}function ra(i){return i&&i.fill!==!1}function Ph(i,e,t){let s=i[e].fill,o=[e],a;if(!t)return s;for(;s!==!1&&o.indexOf(s)===-1;){if(!j(s))return s;if(a=i[s],!a)return!1;if(a.visible)return s;o.push(s),s=a.fill}return!1}function Dh(i,e,t){let n=Lh(i);if(L(n))return isNaN(n.value)?!1:n;let s=parseFloat(n);return j(s)&&Math.floor(s)===s?Oh(n[0],e,s,t):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function Oh(i,e,t,n){return(i==="-"||i==="+")&&(t=e+t),t===e||t<0||t>=n?!1:t}function Th(i,e){let t=null;return i==="start"?t=e.bottom:i==="end"?t=e.top:L(i)?t=e.getPixelForValue(i.value):e.getBasePixel&&(t=e.getBasePixel()),t}function Ah(i,e,t){let n;return i==="start"?n=t:i==="end"?n=e.options.reverse?e.min:e.max:L(i)?n=i.value:n=e.getBaseValue(),n}function Lh(i){let e=i.options,t=e.fill,n=D(t&&t.target,t);return n===void 0&&(n=!!e.backgroundColor),n===!1||n===null?!1:n===!0?"origin":n}function Eh(i){let{scale:e,index:t,line:n}=i,s=[],o=n.segments,a=n.points,r=Rh(e,t);r.push(Ya({x:null,y:e.bottom},n));for(let l=0;l=0;--a){let r=s[a].$filler;r&&(r.line.updateControlPoints(o,r.axis),n&&r.fill&&bn(i.ctx,r,o))}},beforeDatasetsDraw(i,e,t){if(t.drawTime!=="beforeDatasetsDraw")return;let n=i.getSortedVisibleDatasetMetas();for(let s=n.length-1;s>=0;--s){let o=n[s].$filler;ra(o)&&bn(i.ctx,o,i.chartArea)}},beforeDatasetDraw(i,e,t){let n=e.meta.$filler;!ra(n)||t.drawTime!=="beforeDatasetDraw"||bn(i.ctx,n,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},da=(i,e)=>{let{boxHeight:t=e,boxWidth:n=e}=i;return i.usePointStyle&&(t=Math.min(t,e),n=i.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:t,itemHeight:Math.max(e,t)}},Yh=(i,e)=>i!==null&&e!==null&&i.datasetIndex===e.datasetIndex&&i.index===e.index,yi=class extends ct{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,n){this.maxWidth=e,this.maxHeight=t,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let e=this.options.labels||{},t=z(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter(n=>e.filter(n,this.chart.data))),e.sort&&(t=t.sort((n,s)=>e.sort(n,s,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){let{options:e,ctx:t}=this;if(!e.display){this.width=this.height=0;return}let n=e.labels,s=X(n.font),o=s.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=da(n,o),c,h;t.font=s.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(a,o,r,l)+10):(h=this.maxHeight,c=this._fitCols(a,s,r,l)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(h,e.maxHeight||this.maxHeight)}_fitRows(e,t,n,s){let{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=s+r,d=e;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-h;return this.legendItems.forEach((g,p)=>{let m=n+t/2+o.measureText(g.text).width;(p===0||c[c.length-1]+m+2*r>a)&&(d+=h,c[c.length-(p>0?0:1)]=0,f+=h,u++),l[p]={left:0,top:f,row:u,width:m,height:s},c[c.length-1]+=m+r}),d}_fitCols(e,t,n,s){let{ctx:o,maxHeight:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=a-e,d=r,u=0,f=0,g=0,p=0;return this.legendItems.forEach((m,x)=>{let{itemWidth:b,itemHeight:y}=Uh(n,t,o,m,s);x>0&&f+y+2*r>h&&(d+=u+r,c.push({width:u,height:f}),g+=u+r,p++,u=f=0),l[x]={left:g,top:f,col:p,width:b,height:y},u=Math.max(u,b),f+=y+r}),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;let e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:n,labels:{padding:s},rtl:o}}=this,a=Kt(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=G(n,this.left+s,this.right-this.lineWidths[r]);for(let c of t)r!==c.row&&(r=c.row,l=G(n,this.left+s,this.right-this.lineWidths[r])),c.top+=this.top+e+s,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+s}else{let r=0,l=G(n,this.top+e+s,this.bottom-this.columnSizes[r].height);for(let c of t)c.col!==r&&(r=c.col,l=G(n,this.top+e+s,this.bottom-this.columnSizes[r].height)),c.top=l,c.left+=this.left+s,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let e=this.ctx;Se(e,this),this._draw(),ke(e)}}_draw(){let{options:e,columnSizes:t,lineWidths:n,ctx:s}=this,{align:o,labels:a}=e,r=$.color,l=Kt(e.rtl,this.left,this.width),c=X(a.font),{padding:h}=a,d=c.size,u=d/2,f;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;let{boxWidth:g,boxHeight:p,itemHeight:m}=da(a,d),x=function(v,k,S){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;s.save();let w=D(S.lineWidth,1);if(s.fillStyle=D(S.fillStyle,r),s.lineCap=D(S.lineCap,"butt"),s.lineDashOffset=D(S.lineDashOffset,0),s.lineJoin=D(S.lineJoin,"miter"),s.lineWidth=w,s.strokeStyle=D(S.strokeStyle,r),s.setLineDash(D(S.lineDash,[])),a.usePointStyle){let A={radius:p*Math.SQRT2/2,pointStyle:S.pointStyle,rotation:S.rotation,borderWidth:w},O=l.xPlus(v,g/2),E=k+u;Gi(s,A,O,E,a.pointStyleWidth&&g)}else{let A=k+Math.max((d-p)/2,0),O=l.leftForLtr(v,g),E=It(S.borderRadius);s.beginPath(),Object.values(E).some(q=>q!==0)?ce(s,{x:O,y:A,w:g,h:p,radius:E}):s.rect(O,A,g,p),s.fill(),w!==0&&s.stroke()}s.restore()},b=function(v,k,S){Ft(s,S.text,v,k+m/2,c,{strikethrough:S.hidden,textAlign:l.textAlign(S.textAlign)})},y=this.isHorizontal(),M=this._computeTitleHeight();y?f={x:G(o,this.left+h,this.right-n[0]),y:this.top+h+M,line:0}:f={x:this.left+h,y:G(o,this.top+M+h,this.bottom-t[0].height),line:0},on(this.ctx,e.textDirection);let _=m+h;this.legendItems.forEach((v,k)=>{s.strokeStyle=v.fontColor,s.fillStyle=v.fontColor;let S=s.measureText(v.text).width,w=l.textAlign(v.textAlign||(v.textAlign=a.textAlign)),A=g+u+S,O=f.x,E=f.y;l.setWidth(this.width),y?k>0&&O+A+h>this.right&&(E=f.y+=_,f.line++,O=f.x=G(o,this.left+h,this.right-n[f.line])):k>0&&E+_>this.bottom&&(O=f.x=O+t[f.line].width+h,f.line++,E=f.y=G(o,this.top+M+h,this.bottom-t[f.line].height));let q=l.x(O);if(x(q,E,v),O=co(w,O+g+u,y?O+A:this.right,e.rtl),b(l.x(O),E,v),y)f.x+=A+h;else if(typeof v.text!="string"){let st=c.lineHeight;f.y+=Ua(v,st)+h}else f.y+=_}),an(this.ctx,e.textDirection)}drawTitle(){let e=this.options,t=e.title,n=X(t.font),s=J(t.padding);if(!t.display)return;let o=Kt(e.rtl,this.left,this.width),a=this.ctx,r=t.position,l=n.size/2,c=s.top+l,h,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+c,d=G(e.align,d,this.right-u);else{let g=this.columnSizes.reduce((p,m)=>Math.max(p,m.height),0);h=c+G(e.align,this.top,this.bottom-g-e.labels.padding-this._computeTitleHeight())}let f=G(r,d,d+u);a.textAlign=o.textAlign(Ze(r)),a.textBaseline="middle",a.strokeStyle=t.color,a.fillStyle=t.color,a.font=n.string,Ft(a,t.text,f,h,n)}_computeTitleHeight(){let e=this.options.title,t=X(e.font),n=J(e.padding);return e.display?t.lineHeight+n.height:0}_getLegendItemAt(e,t){let n,s,o;if(pt(e,this.left,this.right)&&pt(t,this.top,this.bottom)){for(o=this.legendHitBoxes,n=0;no.length>a.length?o:a)),e+t.size/2+n.measureText(s).width}function Kh(i,e,t){let n=i;return typeof e.text!="string"&&(n=Ua(e,t)),n}function Ua(i,e){let t=i.text?i.text.length:0;return e*t}function qh(i,e){return!!((i==="mousemove"||i==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(i==="click"||i==="mouseup"))}var Gh={id:"legend",_element:yi,start(i,e,t){let n=i.legend=new yi({ctx:i.ctx,options:t,chart:i});Q.configure(i,n,t),Q.addBox(i,n)},stop(i){Q.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,e,t){let n=i.legend;Q.configure(i,n,t),n.options=t},afterUpdate(i){let e=i.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(i,e){e.replay||i.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,e,t){let n=e.datasetIndex,s=t.chart;s.isDatasetVisible(n)?(s.hide(n),e.hidden=!0):(s.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){let e=i.data.datasets,{labels:{usePointStyle:t,pointStyle:n,textAlign:s,color:o,useBorderRadius:a,borderRadius:r}}=i.legend.options;return i._getSortedDatasetMetas().map(l=>{let c=l.controller.getStyle(t?0:void 0),h=J(c.borderWidth);return{text:e[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:n||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:a&&(r||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}},Ee=class extends ct{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t){let n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=t;let s=B(n.text)?n.text.length:1;this._padding=J(n.padding);let o=s*X(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){let e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){let{top:t,left:n,bottom:s,right:o,options:a}=this,r=a.align,l=0,c,h,d;return this.isHorizontal()?(h=G(r,n,o),d=t+e,c=o-n):(a.position==="left"?(h=n+e,d=G(r,s,t),l=V*-.5):(h=o-e,d=G(r,t,s),l=V*.5),c=s-t),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){let e=this.ctx,t=this.options;if(!t.display)return;let n=X(t.font),o=n.lineHeight/2+this._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=this._drawArgs(o);Ft(e,t.text,0,0,n,{color:t.color,maxWidth:l,rotation:c,textAlign:Ze(t.align),textBaseline:"middle",translation:[a,r]})}};function Jh(i,e){let t=new Ee({ctx:i.ctx,options:e,chart:i});Q.configure(i,t,e),Q.addBox(i,t),i.titleBlock=t}var Zh={id:"title",_element:Ee,start(i,e,t){Jh(i,t)},stop(i){let e=i.titleBlock;Q.removeBox(i,e),delete i.titleBlock},beforeUpdate(i,e,t){let n=i.titleBlock;Q.configure(i,n,t),n.options=t},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},hi=new WeakMap,Qh={id:"subtitle",start(i,e,t){let n=new Ee({ctx:i.ctx,options:t,chart:i});Q.configure(i,n,t),Q.addBox(i,n),hi.set(i,n)},stop(i){Q.removeBox(i,hi.get(i)),hi.delete(i)},beforeUpdate(i,e,t){let n=hi.get(i);Q.configure(i,n,t),n.options=t},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},Ae={average(i){if(!i.length)return!1;let e,t,n=new Set,s=0,o=0;for(e=0,t=i.length;er+l)/n.size,y:s/o}},nearest(i,e){if(!i.length)return!1;let t=e.x,n=e.y,s=Number.POSITIVE_INFINITY,o,a,r;for(o=0,a=i.length;o-1?i.split(` `):i}function td(i,e){let{element:t,datasetIndex:n,index:s}=e,o=i.getDatasetMeta(n).controller,{label:a,value:r}=o.getLabelAndValue(s);return{chart:i,label:a,parsed:o.getParsed(s),raw:i.data.datasets[n].data[s],formattedValue:r,dataset:o.getDataset(),dataIndex:s,datasetIndex:n,element:t}}function ua(i,e){let t=i.chart.ctx,{body:n,footer:s,title:o}=i,{boxWidth:a,boxHeight:r}=e,l=X(e.bodyFont),c=X(e.titleFont),h=X(e.footerFont),d=o.length,u=s.length,f=n.length,g=J(e.padding),p=g.height,m=0,x=n.reduce((M,_)=>M+_.before.length+_.lines.length+_.after.length,0);if(x+=i.beforeBody.length+i.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),x){let M=e.displayColors?Math.max(r,l.lineHeight):l.lineHeight;p+=f*M+(x-f)*l.lineHeight+(x-1)*e.bodySpacing}u&&(p+=e.footerMarginTop+u*h.lineHeight+(u-1)*e.footerSpacing);let b=0,y=function(M){m=Math.max(m,t.measureText(M).width+b)};return t.save(),t.font=c.string,F(i.title,y),t.font=l.string,F(i.beforeBody.concat(i.afterBody),y),b=e.displayColors?a+2+e.boxPadding:0,F(n,M=>{F(M.before,y),F(M.lines,y),F(M.after,y)}),b=0,t.font=h.string,F(i.footer,y),t.restore(),m+=g.width,{width:m,height:p}}function ed(i,e){let{y:t,height:n}=e;return ti.height-n/2?"bottom":"center"}function id(i,e,t,n){let{x:s,width:o}=n,a=t.caretSize+t.caretPadding;if(i==="left"&&s+o+a>e.width||i==="right"&&s-o-a<0)return!0}function nd(i,e,t,n){let{x:s,width:o}=t,{width:a,chartArea:{left:r,right:l}}=i,c="center";return n==="center"?c=s<=(r+l)/2?"left":"right":s<=o/2?c="left":s>=a-o/2&&(c="right"),id(c,i,e,t)&&(c="center"),c}function fa(i,e,t){let n=t.yAlign||e.yAlign||ed(i,t);return{xAlign:t.xAlign||e.xAlign||nd(i,e,t,n),yAlign:n}}function sd(i,e){let{x:t,width:n}=i;return e==="right"?t-=n:e==="center"&&(t-=n/2),t}function od(i,e,t){let{y:n,height:s}=i;return e==="top"?n+=t:e==="bottom"?n-=s+t:n-=s/2,n}function ga(i,e,t,n){let{caretSize:s,caretPadding:o,cornerRadius:a}=i,{xAlign:r,yAlign:l}=t,c=s+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=It(a),g=sd(e,r),p=od(e,l,c);return l==="center"?r==="left"?g+=c:r==="right"&&(g-=c):r==="left"?g-=Math.max(h,u)+s:r==="right"&&(g+=Math.max(d,f)+s),{x:K(g,0,n.width-e.width),y:K(p,0,n.height-e.height)}}function di(i,e,t){let n=J(t.padding);return e==="center"?i.x+i.width/2:e==="right"?i.x+i.width-n.right:i.x+n.left}function pa(i){return mt([],kt(i))}function ad(i,e,t){return Mt(i,{tooltip:e,tooltipItems:t,type:"tooltip"})}function ma(i,e){let t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?i.override(t):i}var Xa={beforeTitle:gt,title(i){if(i.length>0){let e=i[0],t=e.chart.data.labels,n=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex"u"?Xa[e].call(t,n):s}var ba=(()=>{class i extends ct{static positioners=Ae;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let t=this._cachedAnimations;if(t)return t;let n=this.chart,s=this.options.setContext(this.getContext()),o=s.enabled&&n.options.animation&&s.animations,a=new pi(this.chart,o);return o._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=ad(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){let{callbacks:s}=n,o=it(s,"beforeTitle",this,t),a=it(s,"title",this,t),r=it(s,"afterTitle",this,t),l=[];return l=mt(l,kt(o)),l=mt(l,kt(a)),l=mt(l,kt(r)),l}getBeforeBody(t,n){return pa(it(n.callbacks,"beforeBody",this,t))}getBody(t,n){let{callbacks:s}=n,o=[];return F(t,a=>{let r={before:[],lines:[],after:[]},l=ma(s,a);mt(r.before,kt(it(l,"beforeLabel",this,a))),mt(r.lines,it(l,"label",this,a)),mt(r.after,kt(it(l,"afterLabel",this,a))),o.push(r)}),o}getAfterBody(t,n){return pa(it(n.callbacks,"afterBody",this,t))}getFooter(t,n){let{callbacks:s}=n,o=it(s,"beforeFooter",this,t),a=it(s,"footer",this,t),r=it(s,"afterFooter",this,t),l=[];return l=mt(l,kt(o)),l=mt(l,kt(a)),l=mt(l,kt(r)),l}_createItems(t){let n=this._active,s=this.chart.data,o=[],a=[],r=[],l=[],c,h;for(c=0,h=n.length;ct.filter(d,u,f,s))),t.itemSort&&(l=l.sort((d,u)=>t.itemSort(d,u,s))),F(l,d=>{let u=ma(t.callbacks,d);o.push(it(u,"labelColor",this,d)),a.push(it(u,"labelPointStyle",this,d)),r.push(it(u,"labelTextColor",this,d))}),this.labelColors=o,this.labelPointStyles=a,this.labelTextColors=r,this.dataPoints=l,l}update(t,n){let s=this.options.setContext(this.getContext()),o=this._active,a,r=[];if(!o.length)this.opacity!==0&&(a={opacity:0});else{let l=Ae[s.position].call(this,o,this._eventPosition);r=this._createItems(s),this.title=this.getTitle(r,s),this.beforeBody=this.getBeforeBody(r,s),this.body=this.getBody(r,s),this.afterBody=this.getAfterBody(r,s),this.footer=this.getFooter(r,s);let c=this._size=ua(this,s),h=Object.assign({},l,c),d=fa(this.chart,s,h),u=ga(s,h,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,a={opacity:1,x:u.x,y:u.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}this._tooltipItems=r,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,s,o){let a=this.getCaretPosition(t,s,o);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(t,n,s){let{xAlign:o,yAlign:a}=this,{caretSize:r,cornerRadius:l}=s,{topLeft:c,topRight:h,bottomLeft:d,bottomRight:u}=It(l),{x:f,y:g}=t,{width:p,height:m}=n,x,b,y,M,_,v;return a==="center"?(_=g+m/2,o==="left"?(x=f,b=x-r,M=_+r,v=_-r):(x=f+p,b=x+r,M=_-r,v=_+r),y=x):(o==="left"?b=f+Math.max(c,d)+r:o==="right"?b=f+p-Math.max(h,u)-r:b=this.caretX,a==="top"?(M=g,_=M-r,x=b-r,y=b+r):(M=g+m,_=M+r,x=b+r,y=b-r),v=M),{x1:x,x2:b,x3:y,y1:M,y2:_,y3:v}}drawTitle(t,n,s){let o=this.title,a=o.length,r,l,c;if(a){let h=Kt(s.rtl,this.x,this.width);for(t.x=di(this,s.titleAlign,s),n.textAlign=h.textAlign(s.titleAlign),n.textBaseline="middle",r=X(s.titleFont),l=s.titleSpacing,n.fillStyle=s.titleColor,n.font=r.string,c=0;cy!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,ce(t,{x:m,y:p,w:h,h:c,radius:b}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),ce(t,{x,y:p+1,w:h-2,h:c-2,radius:b}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(m,p,h,c),t.strokeRect(m,p,h,c),t.fillStyle=r.backgroundColor,t.fillRect(x,p+1,h-2,c-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,n,s){let{body:o}=this,{bodySpacing:a,bodyAlign:r,displayColors:l,boxHeight:c,boxWidth:h,boxPadding:d}=s,u=X(s.bodyFont),f=u.lineHeight,g=0,p=Kt(s.rtl,this.x,this.width),m=function(w){n.fillText(w,p.x(t.x+g),t.y+f/2),t.y+=f+a},x=p.textAlign(r),b,y,M,_,v,k,S;for(n.textAlign=r,n.textBaseline="middle",n.font=u.string,t.x=di(this,x,s),n.fillStyle=s.bodyColor,F(this.beforeBody,m),g=l&&x!=="right"?r==="center"?h/2+d:h+2+d:0,_=0,k=o.length;_0&&n.stroke()}_updateAnimationTarget(t){let n=this.chart,s=this.$animations,o=s&&s.x,a=s&&s.y;if(o||a){let r=Ae[t.position].call(this,this._active,this._eventPosition);if(!r)return;let l=this._size=ua(this,t),c=Object.assign({},r,this._size),h=fa(n,t,c),d=ga(t,c,h,n);(o._to!==d.x||a._to!==d.y)&&(this.xAlign=h.xAlign,this.yAlign=h.yAlign,this.width=l.width,this.height=l.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(t){let n=this.options.setContext(this.getContext()),s=this.opacity;if(!s)return;this._updateAnimationTarget(n);let o={width:this.width,height:this.height},a={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;let r=J(n.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&l&&(t.save(),t.globalAlpha=s,this.drawBackground(a,t,o,n),on(t,n.textDirection),a.y+=r.top,this.drawTitle(a,t,n),this.drawBody(a,t,n),this.drawFooter(a,t,n),an(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){let s=this._active,o=t.map(({datasetIndex:l,index:c})=>{let h=this.chart.getDatasetMeta(l);if(!h)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:h.data[c],index:c}}),a=!ve(s,o),r=this._positionChanged(o,n);(a||r)&&(this._active=o,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,s=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let o=this.options,a=this._active||[],r=this._getActiveElements(t,a,n,s),l=this._positionChanged(r,t),c=n||!ve(r,a)||l;return c&&(this._active=r,(o.enabled||o.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),c}_getActiveElements(t,n,s,o){let a=this.options;if(t.type==="mouseout")return[];if(!o)return n.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);let r=this.chart.getElementsAtEventForMode(t,a.mode,a,s);return a.reverse&&r.reverse(),r}_positionChanged(t,n){let{caretX:s,caretY:o,options:a}=this,r=Ae[a.position].call(this,t,n);return r!==!1&&(s!==r.x||o!==r.y)}}return i})(),rd={id:"tooltip",_element:ba,positioners:Ae,afterInit(i,e,t){t&&(i.tooltip=new ba({chart:i,options:t}))},beforeUpdate(i,e,t){i.tooltip&&i.tooltip.initialize(t)},reset(i,e,t){i.tooltip&&i.tooltip.initialize(t)},afterDraw(i){let e=i.tooltip;if(e&&e._willRender()){let t={tooltip:e};if(i.notifyPlugins("beforeTooltipDraw",Be(ze({},t),{cancelable:!0}))===!1)return;e.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",t)}},afterEvent(i,e){if(i.tooltip){let t=e.replay;i.tooltip.handleEvent(e.event,t,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,e)=>e.bodyFont.size,boxWidth:(i,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Xa},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},ld=Object.freeze({__proto__:null,Colors:yh,Decimation:kh,Filler:$h,Legend:Gh,SubTitle:Qh,Title:Zh,Tooltip:rd}),cd=(i,e,t,n)=>(typeof e=="string"?(t=i.push(e)-1,n.unshift({index:t,label:e})):isNaN(e)&&(t=null),t);function hd(i,e,t,n){let s=i.indexOf(e);if(s===-1)return cd(i,e,t,n);let o=i.lastIndexOf(e);return s!==o?t:s}var dd=(i,e)=>i===null?null:K(Math.round(i),0,e);function xa(i){let e=this.getLabels();return i>=0&&i{class i extends Jt{static id="category";static defaults={ticks:{callback:xa}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let n=this._addedLabels;if(n.length){let s=this.getLabels();for(let{index:o,label:a}of n)s[o]===a&&s.splice(o,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(R(t))return null;let s=this.getLabels();return n=isFinite(n)&&s[n]===t?n:hd(s,t,D(n,t),this._addedLabels),dd(n,s.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:n}=this.getUserBounds(),{min:s,max:o}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(s=0),n||(o=this.getLabels().length-1)),this.min=s,this.max=o}buildTicks(){let t=this.min,n=this.max,s=this.options.offset,o=[],a=this.getLabels();a=t===0&&n===a.length-1?a:a.slice(t,n+1),this._valueRange=Math.max(a.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let r=t;r<=n;r++)o.push({value:r});return o}getLabelForValue(t){return xa.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){let n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}return i})();function fd(i,e){let t=[],{bounds:s,step:o,min:a,max:r,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=i,f=o||1,g=h-1,{min:p,max:m}=e,x=!R(a),b=!R(r),y=!R(c),M=(m-p)/(d+1),_=zi((m-p)/g/f)*f,v,k,S,w;if(_<1e-14&&!x&&!b)return[{value:p},{value:m}];w=Math.ceil(m/_)-Math.floor(p/_),w>g&&(_=zi(w*_/g/f)*f),R(l)||(v=Math.pow(10,l),_=Math.ceil(_*v)/v),s==="ticks"?(k=Math.floor(p/_)*_,S=Math.ceil(m/_)*_):(k=p,S=m),x&&b&&o&&io((r-a)/o,_/1e3)?(w=Math.round(Math.min((r-a)/_,h)),_=(r-a)/w,k=a,S=r):y?(k=x?a:k,S=b?r:S,w=c-1,_=(S-k)/w):(w=(S-k)/_,ae(w,Math.round(w),_/1e3)?w=Math.round(w):w=Math.ceil(w));let A=Math.max(Vi(_),Vi(k));v=Math.pow(10,R(l)?A:l),k=Math.round(k*v)/v,S=Math.round(S*v)/v;let O=0;for(x&&(u&&k!==a?(t.push({value:a}),kr)break;t.push({value:E})}return b&&u&&S!==r?t.length&&ae(t[t.length-1].value,r,_a(r,M,i))?t[t.length-1].value=r:t.push({value:r}):(!b||S===r)&&t.push({value:S}),t}function _a(i,e,{horizontal:t,minRotation:n}){let s=at(n),o=(t?Math.sin(s):Math.cos(s))||.001,a=.75*e*(""+i).length;return Math.min(e/o,a)}var fe=class extends Jt{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return R(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){let{beginAtZero:e}=this.options,{minDefined:t,maxDefined:n}=this.getUserBounds(),{min:s,max:o}=this,a=l=>s=t?s:l,r=l=>o=n?o:l;if(e){let l=lt(s),c=lt(o);l<0&&c<0?r(0):l>0&&c>0&&a(0)}if(s===o){let l=o===0?1:Math.abs(o*.05);r(o+l),e||a(s-l)}this.min=s,this.max=o}getTickLimit(){let e=this.options.ticks,{maxTicksLimit:t,stepSize:n}=e,s;return n?(s=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),t=t||11),t&&(s=Math.min(t,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let e=this.options,t=e.ticks,n=this.getTickLimit();n=Math.max(2,n);let s={maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},o=this._range||this,a=fd(s,o);return e.bounds==="ticks"&&Bi(a,this,"value"),e.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){let e=this.ticks,t=this.min,n=this.max;if(super.configure(),this.options.offset&&e.length){let s=(n-t)/Math.max(e.length-1,1)/2;t-=s,n+=s}this._startValue=t,this._endValue=n,this._valueRange=n-t}getLabelForValue(e){return le(e,this.chart.options.locale,this.options.ticks.format)}},En=class extends fe{static id="linear";static defaults={ticks:{callback:Me.formatters.numeric}};determineDataLimits(){let{min:e,max:t}=this.getMinMax(!0);this.min=j(e)?e:0,this.max=j(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){let e=this.isHorizontal(),t=e?this.width:this.height,n=at(this.options.ticks.minRotation),s=(e?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,o.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}},Re=i=>Math.floor(yt(i)),Gt=(i,e)=>Math.pow(10,Re(i)+e);function ya(i){return i/Math.pow(10,Re(i))===1}function va(i,e,t){let n=Math.pow(10,t),s=Math.floor(i/n);return Math.ceil(e/n)-s}function gd(i,e){let t=e-i,n=Re(t);for(;va(i,e,n)>10;)n++;for(;va(i,e,n)<10;)n--;return Math.min(n,Re(i))}function pd(i,{min:e,max:t}){e=et(i.min,e);let n=[],s=Re(e),o=gd(e,t),a=o<0?Math.pow(10,Math.abs(o)):1,r=Math.pow(10,o),l=s>o?Math.pow(10,s):0,c=Math.round((e-l)*a)/a,h=Math.floor((e-l)/r/10)*r*10,d=Math.floor((c-h)/Math.pow(10,o)),u=et(i.min,Math.round((l+h+d*Math.pow(10,o))*a)/a);for(;u=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,a=o>=0?1:a),u=Math.round((l+h+d*Math.pow(10,o))*a)/a;let f=et(i.max,u);return n.push({value:f,major:ya(f),significand:d}),n}var Rn=class extends Jt{static id="logarithmic";static defaults={ticks:{callback:Me.formatters.logarithmic,major:{enabled:!0}}};constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,t){let n=fe.prototype.parse.apply(this,[e,t]);if(n===0){this._zero=!0;return}return j(n)&&n>0?n:null}determineDataLimits(){let{min:e,max:t}=this.getMinMax(!0);this.min=j(e)?Math.max(0,e):null,this.max=j(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!j(this._userMin)&&(this.min=e===Gt(this.min,0)?Gt(this.min,-1):Gt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:e,maxDefined:t}=this.getUserBounds(),n=this.min,s=this.max,o=r=>n=e?n:r,a=r=>s=t?s:r;n===s&&(n<=0?(o(1),a(10)):(o(Gt(n,-1)),a(Gt(s,1)))),n<=0&&o(Gt(s,-1)),s<=0&&a(Gt(n,1)),this.min=n,this.max=s}buildTicks(){let e=this.options,t={min:this._userMin,max:this._userMax},n=pd(t,this);return e.bounds==="ticks"&&Bi(n,this,"value"),e.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(e){return e===void 0?"0":le(e,this.chart.options.locale,this.options.ticks.format)}configure(){let e=this.min;super.configure(),this._startValue=yt(e),this._valueRange=yt(this.max)-yt(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(yt(e)-this._startValue)/this._valueRange)}getValueForPixel(e){let t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}};function Fn(i){let e=i.ticks;if(e.display&&i.display){let t=J(e.backdropPadding);return D(e.font&&e.font.size,$.font.size)+t.height}return 0}function md(i,e,t){return t=B(t)?t:[t],{w:uo(i,e.string,t),h:t.length*e.lineHeight}}function Ma(i,e,t,n,s){return i===n||i===s?{start:e-t/2,end:e+t/2}:is?{start:e-t,end:e}:{start:e,end:e+t}}function bd(i){let e={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},t=Object.assign({},e),n=[],s=[],o=i._pointLabels.length,a=i.options.pointLabels,r=a.centerPointLabels?V/o:0;for(let l=0;le.r&&(r=(n.end-e.r)/o,i.r=Math.max(i.r,e.r+r)),s.starte.b&&(l=(s.end-e.b)/a,i.b=Math.max(i.b,e.b+l))}function _d(i,e,t){let n=i.drawingArea,{extra:s,additionalAngle:o,padding:a,size:r}=t,l=i.getPointPosition(e,n+s+a,o),c=Math.round(Ge(tt(l.angle+Y))),h=kd(l.y,r.h,c),d=Md(c),u=Sd(l.x,r.w,d);return{visible:!0,x:l.x,y:h,textAlign:d,left:u,top:h,right:u+r.w,bottom:h+r.h}}function yd(i,e){if(!e)return!0;let{left:t,top:n,right:s,bottom:o}=i;return!(ft({x:t,y:n},e)||ft({x:t,y:o},e)||ft({x:s,y:n},e)||ft({x:s,y:o},e))}function vd(i,e,t){let n=[],s=i._pointLabels.length,o=i.options,{centerPointLabels:a,display:r}=o.pointLabels,l={extra:Fn(o)/2,additionalAngle:a?V/s:0},c;for(let h=0;h270||t<90)&&(i-=e),i}function wd(i,e,t){let{left:n,top:s,right:o,bottom:a}=t,{backdropColor:r}=e;if(!R(r)){let l=It(e.borderRadius),c=J(e.backdropPadding);i.fillStyle=r;let h=n-c.left,d=s-c.top,u=o-n+c.width,f=a-s+c.height;Object.values(l).some(g=>g!==0)?(i.beginPath(),ce(i,{x:h,y:d,w:u,h:f,radius:l}),i.fill()):i.fillRect(h,d,u,f)}}function Cd(i,e){let{ctx:t,options:{pointLabels:n}}=i;for(let s=e-1;s>=0;s--){let o=i._pointLabelItems[s];if(!o.visible)continue;let a=n.setContext(i.getPointLabelContext(s));wd(t,a,o);let r=X(a.font),{x:l,y:c,textAlign:h}=o;Ft(t,i._pointLabels[s],l,c+r.lineHeight/2,r,{color:a.color,textAlign:h,textBaseline:"middle"})}}function Ka(i,e,t,n){let{ctx:s}=i;if(t)s.arc(i.xCenter,i.yCenter,e,0,N);else{let o=i.getPointPosition(0,e);s.moveTo(o.x,o.y);for(let a=1;a{let s=z(this.options.pointLabels.callback,[t,n],this);return s||s===0?s:""}).filter((t,n)=>this.chart.getDataVisibility(n))}fit(){let e=this.options;e.display&&e.pointLabels.display?bd(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,n,s){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((n-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,n,s))}getIndexAngle(e){let t=N/(this._pointLabels.length||1),n=this.options.startAngle||0;return tt(e*t+at(n))}getDistanceFromCenterForValue(e){if(R(e))return NaN;let t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(R(e))return NaN;let t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){let t=this._pointLabels||[];if(e>=0&&e{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(h.value);let u=this.getContext(d),f=s.setContext(u),g=o.setContext(u);Pd(this,f,l,a,g)}}),n.display){for(e.save(),r=a-1;r>=0;r--){let h=n.setContext(this.getPointLabelContext(r)),{color:d,lineWidth:u}=h;!u||!d||(e.lineWidth=u,e.strokeStyle=d,e.setLineDash(h.borderDash),e.lineDashOffset=h.borderDashOffset,l=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),c=this.getPointPosition(r,l),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(c.x,c.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){let e=this.ctx,t=this.options,n=t.ticks;if(!n.display)return;let s=this.getIndexAngle(0),o,a;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((r,l)=>{if(l===0&&this.min>=0&&!t.reverse)return;let c=n.setContext(this.getContext(l)),h=X(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){e.font=h.string,a=e.measureText(r.label).width,e.fillStyle=c.backdropColor;let d=J(c.backdropPadding);e.fillRect(-a/2-d.left,-o-h.size/2-d.top,a+d.width,h.size+d.height)}Ft(e,r.label,0,-o,h,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),e.restore()}drawTitle(){}},Si={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}},nt=Object.keys(Si);function Sa(i,e){return i-e}function ka(i,e){if(R(e))return null;let t=i._adapter,{parser:n,round:s,isoWeekday:o}=i._parseOpts,a=e;return typeof n=="function"&&(a=n(a)),j(a)||(a=typeof n=="string"?t.parse(a,n):t.parse(a)),a===null?null:(s&&(a=s==="week"&&(Xt(o)||o===!0)?t.startOf(a,"isoWeek",o):t.startOf(a,s)),+a)}function wa(i,e,t,n){let s=nt.length;for(let o=nt.indexOf(i);o=nt.indexOf(t);o--){let a=nt[o];if(Si[a].common&&i._adapter.diff(s,n,a)>=e-1)return a}return nt[t?nt.indexOf(t):0]}function Td(i){for(let e=nt.indexOf(i)+1,t=nt.length;e=e?t[n]:t[s];i[o]=!0}}function Ad(i,e,t,n){let s=i._adapter,o=+s.startOf(e[0].value,n),a=e[e.length-1].value,r,l;for(r=o;r<=a;r=+s.add(r,1,n))l=t[r],l>=0&&(e[l].major=!0);return e}function Pa(i,e,t){let n=[],s={},o=e.length,a,r;for(a=0;a{class i extends Jt{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){let s=t.time||(t.time={}),o=this._adapter=new jl._date(t.adapters.date);o.init(n),se(s.displayFormats,o.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:ka(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,n=this._adapter,s=t.time.unit||"day",{min:o,max:a,minDefined:r,maxDefined:l}=this.getUserBounds();function c(h){!r&&!isNaN(h.min)&&(o=Math.min(o,h.min)),!l&&!isNaN(h.max)&&(a=Math.max(a,h.max))}(!r||!l)&&(c(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&c(this.getMinMax(!1))),o=j(o)&&!isNaN(o)?o:+n.startOf(Date.now(),s),a=j(a)&&!isNaN(a)?a:+n.endOf(Date.now(),s)+1,this.min=Math.min(o,a-1),this.max=Math.max(o+1,a)}_getLabelBounds(){let t=this.getLabelTimestamps(),n=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],s=t[t.length-1]),{min:n,max:s}}buildTicks(){let t=this.options,n=t.time,s=t.ticks,o=s.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&o.length&&(this.min=this._userMin||o[0],this.max=this._userMax||o[o.length-1]);let a=this.min,r=this.max,l=oo(o,a,r);return this._unit=n.unit||(s.autoSkip?wa(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):Od(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit==="year"?void 0:Td(this._unit),this.initOffsets(o),t.reverse&&l.reverse(),Pa(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,s=0,o,a;this.options.offset&&t.length&&(o=this.getDecimalForValue(t[0]),t.length===1?n=1-o:n=(this.getDecimalForValue(t[1])-o)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?s=a:s=(a-this.getDecimalForValue(t[t.length-2]))/2);let r=t.length<3?.5:.25;n=K(n,0,r),s=K(s,0,r),this._offsets={start:n,end:s,factor:1/(n+1+s)}}_generate(){let t=this._adapter,n=this.min,s=this.max,o=this.options,a=o.time,r=a.unit||wa(a.minUnit,n,s,this._getLabelCapacity(n)),l=D(o.ticks.stepSize,1),c=r==="week"?a.isoWeekday:!1,h=Xt(c)||c===!0,d={},u=n,f,g;if(h&&(u=+t.startOf(u,"isoWeek",c)),u=+t.startOf(u,h?"day":r),t.diff(s,n,r)>1e5*l)throw new Error(n+" and "+s+" are too far apart with stepSize of "+l+" "+r);let p=o.ticks.source==="data"&&this.getDataTimestamps();for(f=u,g=0;f+m)}getLabelForValue(t){let n=this._adapter,s=this.options.time;return s.tooltipFormat?n.format(t,s.tooltipFormat):n.format(t,s.displayFormats.datetime)}format(t,n){let o=this.options.time.displayFormats,a=this._unit,r=n||o[a];return this._adapter.format(t,r)}_tickFormatFunction(t,n,s,o){let a=this.options,r=a.ticks.callback;if(r)return z(r,[t,n,s],this);let l=a.time.displayFormats,c=this._unit,h=this._majorUnit,d=c&&l[c],u=h&&l[h],f=s[n],g=h&&u&&f&&f.major;return this._adapter.format(t,o||(g?u:d))}generateTickLabels(t){let n,s,o;for(n=0,s=t.length;n0?l:1}getDataTimestamps(){let t=this._cache.data||[],n,s;if(t.length)return t;let o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(n=0,s=o.length;n=i[n].pos&&e<=i[s].pos&&({lo:n,hi:s}=ut(i,"pos",e)),{pos:o,time:r}=i[n],{pos:a,time:l}=i[s]):(e>=i[n].time&&e<=i[s].time&&({lo:n,hi:s}=ut(i,"time",e)),{time:o,pos:r}=i[n],{time:a,pos:l}=i[s]);let c=a-o;return c?r+(l-r)*(e-o)/c:r}var Bn=class extends zn{static id="timeseries";static defaults=zn.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=ui(t,this.min),this._tableRange=ui(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){let{min:t,max:n}=this,s=[],o=[],a,r,l,c,h;for(a=0,r=e.length;a=t&&c<=n&&s.push(c);if(s.length<2)return[{time:t,pos:0},{time:n,pos:1}];for(a=0,r=s.length;as-o)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;let t=this.getDataTimestamps(),n=this.getLabelTimestamps();return t.length&&n.length?e=this.normalize(t.concat(n)):e=t.length?t:n,e=this._cache.all=e,e}getDecimalForValue(e){return(ui(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){let t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end;return ui(this._table,n*this._tableRange+this._minPos,!0)}},Ld=Object.freeze({__proto__:null,CategoryScale:ud,LinearScale:En,LogarithmicScale:Rn,RadialLinearScale:In,TimeScale:zn,TimeSeriesScale:Bn}),qa=[Hl,gh,ld,Ld];function Ed(i,e){if(i&1&&(C(0,"mat-list-item")(1,"div",59)(2,"span",60),wt(3,"span",61),T(4),P(),C(5,"span",62),T(6),Ot(7,"currency"),P()()()),i&2){let t=e.$implicit;H(4),Dt(" ",t.label," "),H(2),Dt(" ",jt(7,2,t.total_montant,"FCFA","symbol","1.0-0")," ")}}function Rd(i,e){i&1&&(C(0,"mat-header-cell",63),T(1,"Date"),P())}function Fd(i,e){if(i&1&&(C(0,"mat-cell"),T(1),Ot(2,"date"),P()),i&2){let t=e.$implicit;H(),Ht($n(2,1,t.date,"dd/MM/yyy HH:mm:ss"))}}function Id(i,e){i&1&&(C(0,"mat-header-cell",63),T(1,"Op\xE9rateur"),P())}function zd(i,e){if(i&1&&(C(0,"mat-cell"),T(1),P()),i&2){let t=e.$implicit;H(),Ht(t.type_paiement_label)}}function Bd(i,e){i&1&&(C(0,"mat-header-cell",63),T(1,"R\xE9ference"),P())}function Vd(i,e){if(i&1&&(C(0,"mat-cell"),T(1),P()),i&2){let t=e.$implicit;H(),Ht(t.reference)}}function Nd(i,e){i&1&&(C(0,"mat-header-cell",63),T(1,"Montant"),P())}function Wd(i,e){if(i&1&&(C(0,"mat-cell"),T(1),Ot(2,"currency"),P()),i&2){let t=e.$implicit;H(),Ht(jt(2,1,t.montant,"FCFA","symbol","1.0-0"))}}function Hd(i,e){i&1&&(C(0,"mat-header-cell",63),T(1,"Service"),P())}function jd(i,e){if(i&1&&(C(0,"mat-cell"),T(1),P()),i&2){let t=e.$implicit;H(),Ht(t.service)}}function $d(i,e){i&1&&(C(0,"mat-header-cell",63),T(1,"Commentaire"),P())}function Yd(i,e){if(i&1&&(C(0,"mat-cell"),T(1),P()),i&2){let t=e.$implicit;H(),Ht(t.commentaire)}}function Ud(i,e){i&1&&(C(0,"mat-header-cell",63),T(1,"Status"),P())}function Xd(i,e){if(i&1&&(C(0,"mat-cell",64)(1,"span",65),T(2),P()()),i&2){let t=e.$implicit,n=Hn();H(),dt("ngClass",n.getColorStatus(t.status)),H(),Dt(" ",t.status," ")}}function Kd(i,e){i&1&&wt(0,"mat-header-row")}function qd(i,e){i&1&&wt(0,"mat-row")}var Gd=()=>["/admin"],Jd=()=>[5],Ru=(()=>{let e=class e{constructor(n,s){this.httpClient=n,this.transactionService=s,this.SUrl=`${as.apiBaseUrl}/api/tableau_bord/1`,this.breadCrumbItems=[{label:"Dashboard",url:"/dashboard"}],this.respTransaction=void 0,this.transactions=[],this.operateurs=[],this.selectedOperateur="",this.displayedColumns=["date","reference","montant","type_paiement_label","service","status","commentaire"],this.dataSource=new vs(this.transactions),vi.register(...qa)}ngOnInit(){this.transactionService.getDataTable().subscribe(n=>{this.respTransaction=n,console.log("respTransaction===>",this.respTransaction),this.transactions=this.respTransaction?.last_five_transactions,console.log("transactions==>",this.transactions),this.operateurs=this.respTransaction?.type_operateur,console.log("typeOpreateur===>",this.operateurs)}),this.initChart()}initChart(){let n=document.getElementById("salesStatistics");new vi(n,{type:"line",data:{labels:["01 Mai","02 Mai","03 Mai","04 Mai","05 Mai","06 Mai","07 Mai","08 Mai","09 Mai","10 Mai","11 Mai","12 Mai","13 Mai","14 Mai","15 Mai","16 Mai","17 Mai","18 Mai","19 Mai","20 Mai","21 Mai","22 Mai","23 Mai","14 Mai","25 Mai","26 Mai","27 Mai","28 Mai","29 Mai","30 Mai","31 Mai"],datasets:[{label:"Transaction",borderColor:"#0fac81",backgroundColor:"#0fac81",data:[5,10,20,22,30,40,45,50,50,53,55,60,65,70,75,70,65,60,58,60,65,70,88],fill:!1},{label:"Transaction Annul\xE9",borderColor:"#eb6459",backgroundColor:"#eb6459",data:[0,0,2,2,1,3,3,3,1,3,3,1,1,0,0,0,1,0,2,1,1,2,2],fill:!1}]},options:{responsive:!0,scales:{x:{display:!0,title:{display:!0,text:"Date"}},y:{display:!0,title:{display:!0,text:"Nombre de Transactions"}}}}})}getColorStatus(n){switch(n){case"SUCCESS":return"success-status";case"FAILED":return"failure-status";case"INITIATED":return"pending-status";default:return""}}};e.\u0275fac=function(s){return new(s||e)(ki(Gn),ki(Es))},e.\u0275cmp=Wn({type:e,selectors:[["bgui-admin-test"]],standalone:!0,features:[jn],decls:142,vars:34,consts:[["aria-label","breadcrumb","mat-card","","background-color-green",""],[1,"breadcrumb"],[1,"breadcrumb-item","active"],["href","#",3,"routerLink"],[1,"nk-block-head","nk-block-head-sm"],[1,"nk-block"],[1,"row","g-gs","p-2"],[1,"col-xxl-3","col-sm-6"],[1,"card","with-shadow",2,"background-color","#18b7be"],[1,"card-title-group"],[1,"card-title",2,"color","azure"],[1,"title",2,"color","azure"],[1,"data",2,"color","azure"],[1,"data-group",2,"color","azure"],[1,"amount"],[1,"text",2,"color","blanchedalmond"],[1,"card","with-shadow",2,"background-color","#5a8100"],[1,"card","with-shadow",2,"background-color","#f4b400"],[1,"data-group"],[1,"card","with-shadow",2,"background-color","#db4437"],[1,"col-xxl-6"],[1,"h-100"],[1,"card-inner"],[1,"d-flex","justify-content-between","align-items-center","mb-3"],[1,"title"],["mat-button","",1,"link","link-light","link-sm",3,"matMenuTriggerFor"],["menu","matMenu"],["mat-menu-item",""],["mat-menu-item","",1,"active"],[1,"nk-ecwg8-ck",2,"height","90%"],["id","salesStatistics",1,"ecommerce-line-chart-s4"],[1,"d-flex","justify-content-between","ps-5"],[1,"chart-label"],[1,"overflow-hidden","h-100"],[1,"card-inner","flex-grow-1"],[1,"d-flex","justify-content-between","align-items-center","mb-4"],["menu2","matMenu"],["dense",""],[4,"ngFor","ngForOf"],[1,"example-container","mat-elevation-z8",2,"margin-top","40px","border-radius","10px"],[1,"p-4"],[1,"table-container"],[1,"mat-elevation-z8",3,"dataSource"],["table",""],["matColumnDef","date"],["class","bold-text",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","type_paiement_label"],["matColumnDef","reference"],["matColumnDef","montant",1,"align-right"],["matColumnDef","service"],["matColumnDef","commentaire"],["matColumnDef","status"],["class","btn btn-btn-primary",4,"matCellDef"],[4,"matHeaderRowDef"],[4,"matRowDef","matRowDefColumns"],[3,"pageSizeOptions"],[1,"footer","bg-dark","footer-design"],[1,"text-white","text-center","mr-3"],[1,"d-flex","justify-content-between","align-items-center","w-100"],["matLine",""],[1,"dot","dot-lg","sq",2,"background","rgb(197, 228, 20)"],["matLine","",1,"amount","amount-xs"],[1,"bold-text"],[1,"btn","btn-btn-primary"],[2,"width","80px","text-align","center",3,"ngClass"]],template:function(s,o){if(s&1&&(C(0,"nav",0)(1,"ol",1)(2,"li",2)(3,"a",3),T(4,"Dashboard"),P()()()(),wt(5,"div",4),C(6,"div",5)(7,"div",6)(8,"div",7)(9,"mat-card",8)(10,"mat-card-content")(11,"div",9)(12,"div",10)(13,"h6",11),T(14,"Solde"),P()()(),C(15,"div",12)(16,"div",13)(17,"div",14)(18,"p",15),T(19),Ot(20,"currency"),P()()()()()()(),C(21,"div",7)(22,"mat-card",16)(23,"mat-card-content")(24,"div",9)(25,"div",10)(26,"h6",11),T(27," Montant total transactions "),P()()(),C(28,"div",12)(29,"div",13)(30,"div",14)(31,"p",15),T(32),Ot(33,"currency"),P()()()()()()(),C(34,"div",7)(35,"mat-card",17)(36,"mat-card-content")(37,"div",9)(38,"div",10)(39,"h6",11),T(40,"Reversement"),P()()(),C(41,"div",12)(42,"div",18)(43,"div",14)(44,"p",15),T(45),Ot(46,"currency"),P()()()()()()(),C(47,"div",7)(48,"mat-card",19)(49,"mat-card-content")(50,"div",9)(51,"div",10)(52,"h6",11),T(53,"Montant journalier"),P()()(),C(54,"div",12)(55,"div",18)(56,"div",14)(57,"p",15),T(58),Ot(59,"currency"),P()()()()()()()(),C(60,"div",6)(61,"div",20)(62,"mat-card",21)(63,"div",22)(64,"div",23)(65,"h6",24),T(66,"Statistiques des transactions"),P(),C(67,"div")(68,"button",25),T(69," Semaine "),C(70,"mat-icon"),T(71,"arrow_drop_down"),P()(),C(72,"mat-menu",null,26)(74,"button",27),T(75,"Jour"),P(),C(76,"button",28),T(77,"Semaine"),P(),C(78,"button",27),T(79,"Mois"),P()()()(),C(80,"div",29),wt(81,"canvas",30),P(),C(82,"div",31)(83,"div",32),T(84,"01 Mai, 2024"),P(),C(85,"div",32),T(86,"30 Mai, 2024"),P()()()()(),C(87,"div",20)(88,"mat-card",33)(89,"div",34)(90,"div",35)(91,"h6",24),T(92,"Montant disponible"),P(),C(93,"div")(94,"button",25),T(95," 30 Jours "),C(96,"mat-icon"),T(97,"arrow_drop_down"),P()(),C(98,"mat-menu",null,36)(100,"button",27),T(101,"15 Jours"),P(),C(102,"button",28),T(103,"30 Jours"),P(),C(104,"button",27),T(105,"3 Mois"),P()()()(),C(106,"mat-list",37),ht(107,Ed,8,7,"mat-list-item",38),P()()()(),C(108,"section")(109,"mat-card",39)(110,"mat-card-title")(111,"h6",40),T(112,"Vos 5 derni\xE8res transactions"),P()(),C(113,"div",41)(114,"mat-table",42,43),Ct(116,44),ht(117,Rd,2,0,"mat-header-cell",45)(118,Fd,3,4,"mat-cell",46),Pt(),Ct(119,47),ht(120,Id,2,0,"mat-header-cell",45)(121,zd,2,1,"mat-cell",46),Pt(),Ct(122,48),ht(123,Bd,2,0,"mat-header-cell",45)(124,Vd,2,1,"mat-cell",46),Pt(),Ct(125,49),ht(126,Nd,2,0,"mat-header-cell",45)(127,Wd,3,6,"mat-cell",46),Pt(),Ct(128,50),ht(129,Hd,2,0,"mat-header-cell",45)(130,jd,2,1,"mat-cell",46),Pt(),Ct(131,51),ht(132,$d,2,0,"mat-header-cell",45)(133,Yd,2,1,"mat-cell",46),Pt(),Ct(134,52),ht(135,Ud,2,0,"mat-header-cell",45)(136,Xd,3,2,"mat-cell",53),Pt(),ht(137,Kd,1,0,"mat-header-row",54)(138,qd,1,0,"mat-row",55),P(),wt(139,"mat-paginator",56),P()()(),C(140,"footer",57),wt(141,"div",58),P()()()),s&2){let a=wi(73),r=wi(99);H(3),dt("routerLink",Ci(32,Gd)),H(16),Dt(" ",jt(20,12,o.respTransaction==null?null:o.respTransaction.solde,"FCFA","symbol","1.0-0")," "),H(13),Dt(" ",jt(33,17,o.respTransaction==null?null:o.respTransaction.total_transaction,"FCFA","symbol","1.0-0")," "),H(13),Dt(" ",jt(46,22,o.respTransaction==null?null:o.respTransaction.revesement,"FCFA","symbol","1.0-0")," "),H(13),Dt(" ",jt(59,27,o.respTransaction==null?null:o.respTransaction.total_journee,"FCFA","symbol","1.0-0")," "),H(10),dt("matMenuTriggerFor",a),H(26),dt("matMenuTriggerFor",r),H(13),dt("ngForOf",o.operateurs),H(7),dt("dataSource",o.transactions),H(23),dt("matHeaderRowDef",o.displayedColumns),H(),dt("matRowDefColumns",o.displayedColumns),H(),dt("pageSizeOptions",Ci(33,Jd))}},dependencies:[ss,os,ys,hs,us,ms,fs,ds,bs,gs,ps,xs,_s,cs,ls,qn,Yn,Un,Kn,Xn,Jn,Zn,ns,is,es,ws,Ms,ks,Ss,Os,Ps,Cs,Ds,ts,Qn,rs,Ls,Ts,As],styles:["*[_ngcontent-%COMP%]{font-family:Roboto}.text[_ngcontent-%COMP%]{color:#00f;font-weight:700;font-size:16px}.title[_ngcontent-%COMP%]{font-size:20px}.bold-text[_ngcontent-%COMP%]{color:#00f;font-weight:700;font-size:16px}mat-card-title[_ngcontent-%COMP%]{background-color:#6bc978;border-radius:5px;box-sizing:border-box}.p-4[_ngcontent-%COMP%]{color:#fff}.align-right[_ngcontent-%COMP%] .mat-cell[_ngcontent-%COMP%]{text-align:right}.success-status[_ngcontent-%COMP%]{color:#fff;padding:5px;font-weight:700;background-color:#08a710bd;border-radius:15px;box-sizing:border-box}.failure-status[_ngcontent-%COMP%]{color:#fff;padding:5px;font-weight:700;background-color:#a70808bd;border-radius:15px;box-sizing:border-box;box-shadow:0 0 #0000004d}.pending-status[_ngcontent-%COMP%]{color:#fafafa;font-weight:700;padding:5px;background-color:#0b79f7f3;border-radius:15px;box-sizing:border-box;box-shadow:0 0 #0000004d}.failed-status[_ngcontent-%COMP%]{color:#fafafa;font-weight:700;padding:5px;background-color:#f7270bf3;border-radius:15px;box-sizing:border-box;box-shadow:0 0 #0000004d}.with-shadow[_ngcontent-%COMP%]{box-shadow:2px 2px 2px 2px #0000004d}"]});let i=e;return i})();export{Ru as a};