vendor: 13,119 bytes, line 1
1import{a as vs}from"./chunk-ON34RJXS.js";import{c as ys}from"./chunk-ZYY4W4NW.js";import{a as xs}from"./chunk-XS55SZE2.js";import"./chunk-CPKOI6VL.js";import"./chunk-RCWCPYHS.js";import{a as ms,e as _s}from"./chunk-Q5O6IKJB.js";import"./chunk-73V4VKII.js";import"./chunk-6Z3DZMN7.js";import"./chunk-SWAQ6B4I.js";import{a as fs}from"./chunk-2TJ32G4Y.js";import"./chunk-QKEFPGH4.js";import{c as ps}from"./chunk-4EUWD6ED.js";import"./chunk-SFXINL4V.js";import{a as bs}from"./chunk-IYMPPYJL.js";import{b as gs}from"./chunk-HZ4GS72B.js";import"./chunk-4ATCHR4B.js";import"./chunk-EQDPBI3H.js";import{l as ds,n as us}from"./chunk-FZUEVYJ3.js";import"./chunk-UL5XZWBY.js";import{$b as Me,Ac as rs,Bc as Lt,Fa as ut,Ga as ft,Ib as Mt,Kb as Q,L as Ce,Qb as it,Sb as es,T as Ze,Tb as ns,Ub as is,Vb as M,Wb as k,Xb as E,_c as ls,bc as bt,cc as G,fc as ss,hb as we,lb as T,mc as ke,nc as os,nd as cs,oa as ie,pc as L,qc as se,rc as Yt,u as ve,ua as ts,ud as hs,xb as gt,yb as Se,yc as as,z as Qe,zc as Vn}from"./chunk-LR4QF4PP.js";import{a as Ke,b as qe}from"./chunk-ZC4Q6QYY.js";function Oe(n){return n+.5|0}var Rt=(n,e,t)=>Math.max(Math.min(n,t),e);function Pe(n){return Rt(Oe(n*2.55),0,255)}function It(n){return Rt(Oe(n*255),0,255)}function kt(n){return Rt(Oe(n/2.55)/100,0,1)}function Cs(n){return Rt(Oe(n*100),0,100)}var ct={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},Nn=[..."0123456789ABCDEF"],Ba=n=>Nn[n&15],Va=n=>Nn[(n&240)>>4]+Nn[n&15],Je=n=>(n&240)>>4===(n&15),Ha=n=>Je(n.r)&&Je(n.g)&&Je(n.b)&&Je(n.a);function Na(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&ct[n[1]]*17,g:255&ct[n[2]]*17,b:255&ct[n[3]]*17,a:e===5?ct[n[4]]*17:255}:(e===7||e===9)&&(t={r:ct[n[1]]<<4|ct[n[2]],g:ct[n[3]]<<4|ct[n[4]],b:ct[n[5]]<<4|ct[n[6]],a:e===9?ct[n[7]]<<4|ct[n[8]]:255})),t}var Wa=(n,e)=>n<255?e(n):"";function ja(n){var e=Ha(n)?Ba:Va;return n?"#"+e(n.r)+e(n.g)+e(n.b)+Wa(n.a,e):void 0}var Ua=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function ks(n,e,t){let i=e*Math.min(t,1-t),s=(o,a=(o+n/30)%12)=>t-i*Math.max(Math.min(a-3,9-a,1),-1);return[s(0),s(8),s(4)]}function $a(n,e,t){let i=(s,o=(s+n/60)%6)=>t-t*e*Math.max(Math.min(o,4-o,1),0);return[i(5),i(3),i(1)]}function Ya(n,e,t){let i=ks(n,1,.5),s;for(e+t>1&&(s=1/(e+t),e*=s,t*=s),s=0;s<3;s++)i[s]*=1-e-t,i[s]+=e;return i}function Xa(n,e,t,i,s){return n===s?(e-t)/i+(e<t?6:0):e===s?(t-n)/i+2:(n-e)/i+4}function Wn(n){let t=n.r/255,i=n.g/255,s=n.b/255,o=Math.max(t,i,s),a=Math.min(t,i,s),r=(o+a)/2,l,c,h;return o!==a&&(h=o-a,c=r>.5?h/(2-o-a):h/(o+a),l=Xa(t,i,s,h,o),l=l*60+.5),[l|0,c||0,r]}function jn(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(It)}function Un(n,e,t){return jn(ks,n,e,t)}function Ga(n,e,t){return jn(Ya,n,e,t)}function Ka(n,e,t){return jn($a,n,e,t)}function Ps(n){return(n%360+360)%360}function qa(n){let e=Ua.exec(n),t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?Pe(+e[5]):It(+e[5]));let s=Ps(+e[2]),o=+e[3]/100,a=+e[4]/100;return e[1]==="hwb"?i=Ga(s,o,a):e[1]==="hsv"?i=Ka(s,o,a):i=Un(s,o,a),{r:i[0],g:i[1],b:i[2],a:t}}function Qa(n,e){var t=Wn(n);t[0]=Ps(t[0]+e),t=Un(t),n.r=t[0],n.g=t[1],n.b=t[2]}function Za(n){if(!n)return;let e=Wn(n),t=e[0],i=Cs(e[1]),s=Cs(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${kt(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}var ws={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"},Ss={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 Ja(){let n={},e=Object.keys(Ss),t=Object.keys(ws),i,s,o,a,r;for(i=0;i<e.length;i++){for(a=r=e[i],s=0;s<t.length;s++)o=t[s],r=r.replace(o,ws[o]);o=parseInt(Ss[a],16),n[r]=[o>>16&255,o>>8&255,o&255]}return n}var tn;function tr(n){tn||(tn=Ja(),tn.transparent=[0,0,0,0]);let e=tn[n.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}var er=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function nr(n){let e=er.exec(n),t=255,i,s,o;if(e){if(e[7]!==i){let a=+e[7];t=e[8]?Pe(a):Rt(a*255,0,255)}return i=+e[1],s=+e[3],o=+e[5],i=255&(e[2]?Pe(i):Rt(i,0,255)),s=255&(e[4]?Pe(s):Rt(s,0,255)),o=255&(e[6]?Pe(o):Rt(o,0,255)),{r:i,g:s,b:o,a:t}}}function ir(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${kt(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}var Hn=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,oe=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function sr(n,e,t){let i=oe(kt(n.r)),s=oe(kt(n.g)),o=oe(kt(n.b));return{r:It(Hn(i+t*(oe(kt(e.r))-i))),g:It(Hn(s+t*(oe(kt(e.g))-s))),b:It(Hn(o+t*(oe(kt(e.b))-o))),a:n.a+t*(e.a-n.a)}}function en(n,e,t){if(n){let i=Wn(n);i[e]=Math.max(0,Math.min(i[e]+i[e]*t,e===0?360:1)),i=Un(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function Ds(n,e){return n&&Object.assign(e||{},n)}function Ms(n){var e={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(e={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(e.a=It(n[3]))):(e=Ds(n,{r:0,g:0,b:0,a:1}),e.a=It(e.a)),e}function or(n){return n.charAt(0)==="r"?nr(n):qa(n)}var De=class n{constructor(e){if(e instanceof n)return e;let t=typeof e,i;t==="object"?i=Ms(e):t==="string"&&(i=Na(e)||tr(e)||or(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=Ds(this._rgb);return e&&(e.a=kt(e.a)),e}set rgb(e){this._rgb=Ms(e)}rgbString(){return this._valid?ir(this._rgb):void 0}hexString(){return this._valid?ja(this._rgb):void 0}hslString(){return this._valid?Za(this._rgb):void 0}mix(e,t){if(e){let i=this.rgb,s=e.rgb,o,a=t===o?.5:t,r=2*a-1,l=i.a-s.a,c=((r*l===-1?r:(r+l)/(1+r*l))+1)/2;o=1-c,i.r=255&c*i.r+o*s.r+.5,i.g=255&c*i.g+o*s.g+.5,i.b=255&c*i.b+o*s.b+.5,i.a=a*i.a+(1-a)*s.a,this.rgb=i}return this}interpolate(e,t){return e&&(this._rgb=sr(this._rgb,e._rgb,t)),this}clone(){return new n(this.rgb)}alpha(e){return this._rgb.a=It(e),this}clearer(e){let t=this._rgb;return t.a*=1-e,this}greyscale(){let e=this._rgb,t=Oe(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 en(this._rgb,2,e),this}darken(e){return en(this._rgb,2,-e),this}saturate(e){return en(this._rgb,1,e),this}desaturate(e){return en(this._rgb,1,-e),this}rotate(e){return Qa(this._rgb,e),this}};function yt(){}var Vs=(()=>{let n=0;return()=>n++})();function R(n){return n==null}function H(n){if(Array.isArray&&Array.isArray(n))return!0;let e=Object.prototype.toString.call(n);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function I(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}function $(n){return(typeof n=="number"||n instanceof Number)&&isFinite(+n)}function ot(n,e){return $(n)?n:e}function D(n,e){return typeof n>"u"?e:n}var Hs=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:+n/e,Gn=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function V(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function z(n,e,t,i){let s,o,a;if(H(n))if(o=n.length,i)for(s=o-1;s>=0;s--)e.call(t,n[s],s);else for(s=0;s<o;s++)e.call(t,n[s],s);else if(I(n))for(a=Object.keys(n),o=a.length,s=0;s<o;s++)e.call(t,n[a[s]],a[s])}function Ee(n,e){let t,i,s,o;if(!n||!e||n.length!==e.length)return!1;for(t=0,i=n.length;t<i;++t)if(s=n[t],o=e[t],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function an(n){if(H(n))return n.map(an);if(I(n)){let e=Object.create(null),t=Object.keys(n),i=t.length,s=0;for(;s<i;++s)e[t[s]]=an(n[t[s]]);return e}return n}function Ns(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function ar(n,e,t,i){if(!Ns(n))return;let s=e[n],o=t[n];I(s)&&I(o)?re(s,o,i):e[n]=an(o)}function re(n,e,t){let i=H(e)?e:[e],s=i.length;if(!I(n))return n;t=t||{};let o=t.merger||ar,a;for(let r=0;r<s;++r){if(a=i[r],!I(a))continue;let l=Object.keys(a);for(let c=0,h=l.length;c<h;++c)o(l[c],n,a,t)}return n}function ce(n,e){return re(n,e,{merger:rr})}function rr(n,e,t){if(!Ns(n))return;let i=e[n],s=t[n];I(i)&&I(s)?ce(i,s):Object.prototype.hasOwnProperty.call(e,n)||(e[n]=an(s))}var Os={"":n=>n,x:n=>n.x,y:n=>n.y};function lr(n){let e=n.split("."),t=[],i="";for(let s of e)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(t.push(i),i="");return t}function cr(n){let e=lr(n);return t=>{for(let i of e){if(i==="")break;t=t&&t[i]}return t}}function Ot(n,e){return(Os[e]||(Os[e]=cr(e)))(n)}function hn(n){return n.charAt(0).toUpperCase()+n.slice(1)}var he=n=>typeof n<"u",Pt=n=>typeof n=="function",Kn=(n,e)=>{if(n.size!==e.size)return!1;for(let t of n)if(!e.has(t))return!1;return!0};function Ws(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}var N=Math.PI,W=2*N,hr=W+N,rn=Number.POSITIVE_INFINITY,dr=N/180,Y=N/2,Xt=N/4,As=N*2/3,Dt=Math.log10,pt=Math.sign;function de(n,e,t){return Math.abs(n-e)<t}function qn(n){let e=Math.round(n);n=de(n,e,n/1e3)?e:n;let t=Math.pow(10,Math.floor(Dt(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function js(n){let e=[],t=Math.sqrt(n),i;for(i=1;i<t;i++)n%i===0&&(e.push(i),e.push(n/i));return t===(t|0)&&e.push(t),e.sort((s,o)=>s-o).pop(),e}function ur(n){return typeof n=="symbol"||typeof n=="object"&&n!==null&&!(Symbol.toPrimitive in n||"toString"in n||"valueOf"in n)}function qt(n){return!ur(n)&&!isNaN(parseFloat(n))&&isFinite(n)}function Us(n,e){let t=Math.round(n);return t-e<=n&&t+e>=n}function Qn(n,e,t){let i,s,o;for(i=0,s=n.length;i<s;i++)o=n[i][t],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function ht(n){return n*(N/180)}function dn(n){return n*(180/N)}function Zn(n){if(!$(n))return;let e=1,t=0;for(;Math.round(n*e)/e!==n;)e*=10,t++;return t}function Jn(n,e){let t=e.x-n.x,i=e.y-n.y,s=Math.sqrt(t*t+i*i),o=Math.atan2(i,t);return o<-.5*N&&(o+=W),{angle:o,distance:s}}function ln(n,e){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function fr(n,e){return(n-e+hr)%W-N}function st(n){return(n%W+W)%W}function ue(n,e,t,i){let s=st(n),o=st(e),a=st(t),r=st(o-s),l=st(a-s),c=st(s-o),h=st(s-a);return s===o||s===a||i&&o===a||r>l&&c<h}function q(n,e,t){return Math.max(e,Math.min(t,n))}function $s(n){return q(n,-32768,32767)}function vt(n,e,t,i=1e-6){return n>=Math.min(e,t)-i&&n<=Math.max(e,t)+i}function un(n,e,t){t=t||(a=>n[a]<e);let i=n.length-1,s=0,o;for(;i-s>1;)o=s+i>>1,t(o)?s=o:i=o;return{lo:s,hi:i}}var _t=(n,e,t,i)=>un(n,t,i?s=>{let o=n[s][e];return o<t||o===t&&n[s+1][e]===t}:s=>n[s][e]<t),Ys=(n,e,t)=>un(n,t,i=>n[i][e]>=t);function Xs(n,e,t){let i=0,s=n.length;for(;i<s&&n[i]<e;)i++;for(;s>i&&n[s-1]>t;)s--;return i>0||s<n.length?n.slice(i,s):n}var Gs=["push","pop","shift","splice","unshift"];function Ks(n,e){if(n._chartjs){n._chartjs.listeners.push(e);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}
1),Gs.forEach(t=>{let i="_onData"+hn(t),s=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...o){let a=s.apply(this,o);return n._chartjs.listeners.forEach(r=>{typeof r[i]=="function"&&r[i](...o)}),a}})})}function ti(n,e){let t=n._chartjs;if(!t)return;let i=t.listeners,s=i.indexOf(e);s!==-1&&i.splice(s,1),!(i.length>0)&&(Gs.forEach(o=>{delete n[o]}),delete n._chartjs)}function ei(n){let e=new Set(n);return e.size===n.length?n:Array.from(e)}var ni=function(){return typeof window>"u"?function(n){return n()}:window.requestAnimationFrame}();function ii(n,e){let t=[],i=!1;return function(...s){t=s,i||(i=!0,ni.call(window,()=>{i=!1,n.apply(e,t)}))}}function qs(n,e){let t;return function(...i){return e?(clearTimeout(t),t=setTimeout(n,e,i)):n.apply(this,i),e}}var fn=n=>n==="start"?"left":n==="end"?"right":"center",J=(n,e,t)=>n==="start"?e:n==="end"?t:(e+t)/2,Qs=(n,e,t,i)=>n===(i?"left":"right")?t:n==="center"?(e+t)/2:e;function si(n,e,t){let i=e.length,s=0,o=i;if(n._sorted){let{iScale:a,vScale:r,_parsed:l}=n,c=n.dataset&&n.dataset.options?n.dataset.options.spanGaps:null,h=a.axis,{min:d,max:u,minDefined:f,maxDefined:g}=a.getUserBounds();if(f){if(s=Math.min(_t(l,h,d).lo,t?i:_t(e,h,a.getPixelForValue(d)).lo),c){let p=l.slice(0,s+1).reverse().findIndex(m=>!R(m[r.axis]));s-=Math.max(0,p)}s=q(s,0,i-1)}if(g){let p=Math.max(_t(l,a.axis,u,!0).hi+1,t?0:_t(e,h,a.getPixelForValue(u),!0).hi+1);if(c){let m=l.slice(p-1).findIndex(_=>!R(_[r.axis]));p+=Math.max(0,m)}o=q(p,s,i)-s}else o=i-s}return{start:s,count:o}}function oi(n){let{xScale:e,yScale:t,_scaleRanges:i}=n,s={xmin:e.min,xmax:e.max,ymin:t.min,ymax:t.max};if(!i)return n._scaleRanges=s,!0;let o=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==t.min||i.ymax!==t.max;return Object.assign(i,s),o}var nn=n=>n===0||n===1,Ts=(n,e,t)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-e)*W/t)),Es=(n,e,t)=>Math.pow(2,-10*n)*Math.sin((n-e)*W/t)+1,ae={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*Y)+1,easeOutSine:n=>Math.sin(n*Y),easeInOutSine:n=>-.5*(Math.cos(N*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>nn(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>nn(n)?n:Ts(n,.075,.3),easeOutElastic:n=>nn(n)?n:Es(n,.075,.3),easeInOutElastic(n){return nn(n)?n:n<.5?.5*Ts(n*2,.1125,.45):.5+.5*Es(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let e=1.70158;return(n/=.5)<1?.5*(n*n*(((e*=1.525)+1)*n-e)):.5*((n-=2)*n*(((e*=1.525)+1)*n+e)+2)},easeInBounce:n=>1-ae.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?ae.easeInBounce(n*2)*.5:ae.easeOutBounce(n*2-1)*.5+.5};function ai(n){if(n&&typeof n=="object"){let e=n.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function ri(n){return ai(n)?n:new De(n)}function $n(n){return ai(n)?n:new De(n).saturate(.5).darken(.1).hexString()}var gr=["x","y","borderWidth","radius","tension"],pr=["color","borderColor","backgroundColor"];function mr(n){n.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),n.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),n.set("animations",{colors:{type:"color",properties:pr},numbers:{type:"number",properties:gr}}),n.describe("animations",{_fallback:"animation"}),n.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 br(n){n.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var Ls=new Map;function _r(n,e){e=e||{};let t=n+JSON.stringify(e),i=Ls.get(t);
vendor: 3,151 bytes, line 1
1return i||(i=new Intl.NumberFormat(n,e),Ls.set(t,i)),i}function fe(n,e,t){return _r(e,t).format(n)}var Zs={values(n){return H(n)?n:""+n},numeric(n,e,t){if(n===0)return"0";let i=this.chart.options.locale,s,o=n;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=xr(n,t)}let a=Dt(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),fe(n,i,l)},logarithmic(n,e,t){if(n===0)return"0";let i=t[e].significand||n/Math.pow(10,Math.floor(Dt(n)));return[1,2,3,5,10,15].includes(i)||e>.8*t.length?Zs.numeric.call(this,n,e,t):""}};function xr(n,e){let t=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(t)>=1&&n!==Math.floor(n)&&(t=n-Math.floor(n)),t}var Le={formatters:Zs};function yr(n){n.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:Le.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),n.route("scale.ticks","color","","color"),n.route("scale.grid","color","","borderColor"),n.route("scale.border","color","","borderColor"),n.route("scale.title","color","","color"),n.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),n.describe("scales",{_fallback:"scale"}),n.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}var zt=Object.create(null),gn=Object.create(null);function Ae(n,e){if(!e)return n;let t=e.split(".");for(let i=0,s=t.length;i<s;++i){let o=t[i];n=n[o]||(n[o]=Object.create(null))}return n}function Yn(n,e,t){return typeof e=="string"?re(Ae(n,e),t):re(Ae(n,""),e)}var Xn=class{constructor(e,t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=i=>i.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,s)=>$n(s.backgroundColor),this.hoverBorderColor=(i,s)=>$n(s.borderColor),this.hoverColor=(i,s)=>$n(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={}
vendor: 4,306 bytes, line 1
1,this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(t)}set(e,t){return Yn(this,e,t)}get(e){return Ae(this,e)}describe(e,t){return Yn(gn,e,t)}override(e,t){return Yn(zt,e,t)}route(e,t,i,s){let o=Ae(this,e),a=Ae(this,i),r="_"+t;Object.defineProperties(o,{[r]:{value:o[t],writable:!0},[t]:{enumerable:!0,get(){let l=this[r],c=a[s];return I(l)?Object.assign({},c,l):D(l,c)},set(l){this[r]=l}}})}apply(e){e.forEach(t=>t(this))}},j=new Xn({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[mr,br,yr]);function vr(n){return!n||R(n.size)||R(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function Te(n,e,t,i,s){let o=e[s];return o||(o=e[s]=n.measureText(s).width,t.push(s)),o>i&&(i=o),i}function Js(n,e,t,i){i=i||{};let s=i.data=i.data||{},o=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(s=i.data={},o=i.garbageCollect=[],i.font=e),n.save(),n.font=e;let a=0,r=t.length,l,c,h,d,u;for(l=0;l<r;l++)if(d=t[l],d!=null&&!H(d))a=Te(n,s,o,a,d);else if(H(d))for(c=0,h=d.length;c<h;c++)u=d[c],u!=null&&!H(u)&&(a=Te(n,s,o,a,u));n.restore();let f=o.length/2;if(f>t.length){for(l=0;l<f;l++)delete s[o[l]];o.splice(0,f)}return a}function Bt(n,e,t){let i=n.currentDevicePixelRatio,s=t!==0?Math.max(t/2,.5):0;return Math.round((e-s)*i)/i+s}function li(n,e){!e&&!n||(e=e||n.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,n.width,n.height),e.restore())}function pn(n,e,t,i){ci(n,e,t,i,null)}function ci(n,e,t,i,s){let o,a,r,l,c,h,d,u,f=e.pointStyle,g=e.rotation,p=e.radius,m=(g||0)*dr;if(f&&typeof f=="object"&&(o=f.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){n.save(),n.translate(t,i),n.rotate(m),n.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),n.restore();return}if(!(isNaN(p)||p<=0)){switch(n.beginPath(),f){default:s?n.ellipse(t,i,s/2,p,0,0,W):n.arc(t,i,p,0,W),n.closePath();break;case"triangle":h=s?s/2:p,n.moveTo(t+Math.sin(m)*h,i-Math.cos(m)*p),m+=As,n.lineTo(t+Math.sin(m)*h,i-Math.cos(m)*p),m+=As,n.lineTo(t+Math.sin(m)*h,i-Math.cos(m)*p),n.closePath();break;case"rectRounded":c=p*.516,l=p-c,a=Math.cos(m+Xt)*l,d=Math.cos(m+Xt)*(s?s/2-c:l),r=Math.sin(m+Xt)*l,u=Math.sin(m+Xt)*(s?s/2-c:l),n.arc(t-d,i-r,c,m-N,m-Y),n.arc(t+u,i-a,c,m-Y,m),n.arc(t+d,i+r,c,m,m+Y),n.arc(t-u,i+a,c,m+Y,m+N),n.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*p,h=s?s/2:l,n.rect(t-h,i-l,2*h,2*l);break}m+=Xt;case"rectRot":d=Math.cos(m)*(s?s/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(s?s/2:p),n.moveTo(t-d,i-r),n.lineTo(t+u,i-a),n.lineTo(t+d,i+r),n.lineTo(t-u,i+a),n.closePath();break;case"crossRot":m+=Xt;case"cross":d=Math.cos(m)*(s?s/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(s?s/2:p),n.moveTo(t-d,i-r),n.lineTo(t+d,i+r),n.moveTo(t+u,i-a),n.lineTo(t-u,i+a);break;case"star":d=Math.cos(m)*(s?s/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(s?s/2:p),n.moveTo(t-d,i-r),n.lineTo(t+d,i+r),n.moveTo(t+u,i-a),n.lineTo(t-u,i+a),m+=Xt,d=Math.cos(m)*(s?s/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(s?s/2:p),n.moveTo(t-d,i-r),n.lineTo(t+d,i+r),n.moveTo(t+u,i-a),n.lineTo(t-u,i+a);break;case"line":a=s?s/2:Math.cos(m)*p,r=Math.sin(m)*p,n.moveTo(t-a,i-r),n.lineTo(t+a,i+r);break;case"dash":n.moveTo(t,i),n.lineTo(t+Math.cos(m)*(s?s/2:p),i+Math.sin(m)*p);break;case!1:n.closePath();break}n.fill(),e.borderWidth>0&&n.stroke()}}function xt(n,e,t){return t=t||.5,!e||n&&n.x>e.left-t&&n.x<e.right+t&&n.y>e.top-t&&n.y<e.bottom+t}function Re(n,e){n.save(),n.beginPath(),n.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),n.clip()}function Ie(n){n.restore()}function to(n,e,t,i,s){if(!e)return n.lineTo(t.x,t.y);if(s==="middle"){let o=(e.x+t.x)/2;n.lineTo(o,e.y),n.lineTo(o,t.y)}else s==="after"!=!!i?n.lineTo(e.x,t.y):n.lineTo(t.x,e.y);n.lineTo(t.x,t.y)}function eo(n,e,t,i){if(!e)return n.lineTo(t.x,t.y);n.bezierCurveTo(i?e.cp1x:e.cp2x,i?e.cp1y:e.cp2y,i?t.cp2x:t.cp1x,i?t.cp2y:t.cp1y,t.x,t.y)}function Cr(n,e){e.translation&&n.translate(e.translation[0],e.translation[1]),R(e.rotation)||n.rotate(e.rotation),e.color&&(n.fillStyle=e.color),e.textAlign&&(n.textAlign=e.textAlign),e.textBaseline&&(n.textBaseline=e.textBaseline)}function wr(n,e,t,i,s){if(s.strikethrough||s.underline){let o=n.measureText(i),a=e-
vendor: 6,742 bytes, line 1
1o.actualBoundingBoxLeft,r=e+o.actualBoundingBoxRight,l=t-o.actualBoundingBoxAscent,c=t+o.actualBoundingBoxDescent,h=s.strikethrough?(l+c)/2:c;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=s.decorationWidth||2,n.moveTo(a,h),n.lineTo(r,h),n.stroke()}}function Sr(n,e){let t=n.fillStyle;n.fillStyle=e.color,n.fillRect(e.left,e.top,e.width,e.height),n.fillStyle=t}function Vt(n,e,t,i,s,o={}){let a=H(e)?e:[e],r=o.strokeWidth>0&&o.strokeColor!=="",l,c;for(n.save(),n.font=s.string,Cr(n,o),l=0;l<a.length;++l)c=a[l],o.backdrop&&Sr(n,o.backdrop),r&&(o.strokeColor&&(n.strokeStyle=o.strokeColor),R(o.strokeWidth)||(n.lineWidth=o.strokeWidth),n.strokeText(c,t,i,o.maxWidth)),n.fillText(c,t,i,o.maxWidth),wr(n,t,i,c,o),i+=Number(s.lineHeight);n.restore()}function ge(n,e){let{x:t,y:i,w:s,h:o,radius:a}=e;n.arc(t+a.topLeft,i+a.topLeft,a.topLeft,1.5*N,N,!0),n.lineTo(t,i+o-a.bottomLeft),n.arc(t+a.bottomLeft,i+o-a.bottomLeft,a.bottomLeft,N,Y,!0),n.lineTo(t+s-a.bottomRight,i+o),n.arc(t+s-a.bottomRight,i+o-a.bottomRight,a.bottomRight,Y,0,!0),n.lineTo(t+s,i+a.topRight),n.arc(t+s-a.topRight,i+a.topRight,a.topRight,0,-Y,!0),n.lineTo(t+a.topLeft,i)}var Mr=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,kr=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Pr(n,e){let t=(""+n).match(Mr);if(!t||t[1]==="normal")return e*1.2;switch(n=+t[2],t[3]){case"px":return n;case"%":n/=100;break}return e*n}var Dr=n=>+n||0;function mn(n,e){let t={},i=I(e),s=i?Object.keys(e):e,o=I(n)?i?a=>D(n[a],n[e[a]]):a=>n[a]:()=>n;for(let a of s)t[a]=Dr(o(a));return t}function hi(n){return mn(n,{top:"y",right:"x",bottom:"y",left:"x"})}function Ht(n){return mn(n,["topLeft","topRight","bottomLeft","bottomRight"])}function tt(n){let e=hi(n);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function K(n,e){n=n||{},e=e||j.font;let t=D(n.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let i=D(n.style,e.style);i&&!(""+i).match(kr)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);let s={family:D(n.family,e.family),lineHeight:Pr(D(n.lineHeight,e.lineHeight),t),size:t,style:i,weight:D(n.weight,e.weight),string:""};return s.string=vr(s),s}function pe(n,e,t,i){let s=!0,o,a,r;for(o=0,a=n.length;o<a;++o)if(r=n[o],r!==void 0&&(e!==void 0&&typeof r=="function"&&(r=r(e),s=!1),t!==void 0&&H(r)&&(r=r[t%r.length],s=!1),r!==void 0))return i&&!s&&(i.cacheable=!1),r}function no(n,e,t){let{min:i,max:s}=n,o=Gn(e,(s-i)/2),a=(r,l)=>t&&r===0?0:r+l;return{min:a(i,-Math.abs(o)),max:a(s,o)}}function At(n,e){return Object.assign(Object.create(n),e)}function bn(n,e=[""],t,i,s=()=>n[0]){let o=t||n;typeof i>"u"&&(i=oo("_fallback",n));let a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:o,_fallback:i,_getTarget:s,override:r=>bn([r,...n],e,o,i)};return new Proxy(a,{deleteProperty(r,l){return delete r[l],delete r._keys,delete n[0][l],!0},get(r,l){return io(r,l,()=>Fr(l,e,n,r))},getOwnPropertyDescriptor(r,l){return Reflect.getOwnPropertyDescriptor(r._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(r,l){return Is(r).includes(l)},ownKeys(r){return Is(r)},set(r,l,c){let h=r._storage||(r._storage=s());return r[l]=h[l]=c,delete r._keys,!0}})}function Kt(n,e,t,i){let s={_cacheable:!1,_proxy:n,_context:e,_subProxy:t,_stack:new Set,_descriptors:di(n,i),setContext:o=>Kt(n,o,t,i),override:o=>Kt(n.override(o),e,t,i)};return new Proxy(s,{deleteProperty(o,a){return delete o[a],delete n[a],!0},get(o,a,r){return io(o,a,()=>Ar(o,a,r))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(n,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,a)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(o,a){return Reflect.has(n,a)},ownKeys(){return Reflect.ownKeys(n)},set(o,a,r){return n[a]=r,delete o[a],!0}})}function di(n,e={scriptable:!0,indexable:!0}){let{_scriptable:t=e.scriptable,_indexable:i=e.indexable,_allKeys:s=e.allKeys}=n;return{allKeys:s,scriptable:t,indexable:i,isScriptable:Pt(t)?t:()=>t,isIndexable:Pt(i)?i:()=>i}}var Or=(n,e)=>n?n+hn(e):e,ui=(n,e)=>I(e)&&n!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function io(n,e,t){if(Object.prototype.hasOwnProperty.call(n,e)||e==="constructor")return n[e];let i=t();return n[e]=i,i}function Ar(n,e,t){let{_proxy:i,_context:s,_subProxy:o,_descriptors:a}=n,r=i[e];return Pt(r)&&a.isScriptable(e)&&(r=Tr(e,r,n,t)),H(r)&&r.length&&(r=Er(e,r,n,a.isIndexable)),ui(e,r)&&(r=Kt(r,s,o&&o[e],a)),r}function Tr(n,e,t,i){let{_proxy:s,_context:o,_subProxy:a,_stack:r}=t;if(r.has(n))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+n);r.add(n);let l=e(o,a||i);return r.delete(n),ui(n,l)&&(l=fi(s._scopes,s,n,l)),l}function Er(n,e,t,i){let{_proxy:s,_context:o,_subProxy:a,_descriptors:r}=t;if(typeof o.index<"u"&&i(n))return e[o.index%e.length];if(I(e[0])){let l=e,c=s._scopes.filter(h=>h!==l);e=[];for(let h of l){let d=fi(c,s,n,h);e.push(Kt(d,o,a&&a[n],r))}}return e}function so(n,e,t){return Pt(n)?n(e,t):n}var Lr=(n,e)=>n===!0?e:typeof n=="string"?Ot(e,n):void 0;function Rr(n,e,t,i,s){for(let o of e){let a=Lr(t,o);if(a){n.add(a);let r=so(a._fallback,t,s);if(typeof r<"u"&&r!==t&&r!==i)return r}else if(a===!1&&typeof i<"u"&&t!==i)return null}return!1}function fi(n,e,t,i){let s=e._rootScopes,o=so(e._fallback,t,i),a=[...n,...s],r=new Set;r.add(i);let l=Rs(r,a,t,o||t,i);return l===null||typeof o<"u"&&o!==t&&(l=Rs(r,a,o,l,i),l===null)?!1:bn(Array.from(r),[""],s,o,()=>Ir(e,t,i))}function Rs(n,e,t,i,s){for(;t;)t=Rr(n,e,t,i,s);return t}function Ir(n,e,t){let i=n._getTarget();e in i||(i[e]={});let s=i[e];return H(s)&&I(t)?t:s||{}}function Fr(n,e,t,i){let s;for(let o of e)if(s=oo(Or(o,n),t),typeof s<"u")return ui(n,s)?fi(t,i,n,s):s}function oo(n,e){for(let t of e){if(!t)continue;let i=t[n];if(typeof i<"u")return i}}function Is(n){let e=n._keys;return e||(e=n._keys=zr(n._scopes)),e}function zr(n){let e=new Set;for(let t of n)for(let i of Object.keys(t).filter(s=>!s.startsWith("_")))e.add(i);return Array.from(e)}function gi(n,e,t,i){let{iScale:s}=n,{key:o="r"}=this._parsing,a=new Array(i),r,l,c,h;for(r=0,l=i;r<l;++r)c=r+t,h=e[c],a[r]={r:s.parse(Ot(h,o),c)};return a}var Br=Number.EPSILON||1e-14,le=(n,e)=>e<n.length&&!n[e].skip&&n[e],ao=n=>n==="x"?"y":"x";function Vr(n,e,t,i){let s=n.skip?e:n,o=e,a=t.skip?e:t,r=ln(o,s),l=ln(a,o),c=r/(r+l),h=l/(r+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;let d=i*c,u=i*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 Hr(n,e,t){let i=n.length,s,o,a,r,l,c=le(n,0);for(let h=0;h<i-1;++h)if(l=c,c=le(n,h+1),!(!l||!c)){if(de(e[h],0,Br)){t[h]=t[h+1]=0;continue}s=t[h]/e[h],o=t[h+1]/e[h],r=Math.pow(s,2)+Math.pow(o,2),!(r<=9)&&(a=3/Math.sqrt(r),t[h]=s*a*e[h],t[h+1]=o
vendor: 6,782 bytes, line 1
1*a*e[h])}}function Nr(n,e,t="x"){let i=ao(t),s=n.length,o,a,r,l=le(n,0);for(let c=0;c<s;++c){if(a=r,r=l,l=le(n,c+1),!r)continue;let h=r[t],d=r[i];a&&(o=(h-a[t])/3,r[`cp1${t}`]=h-o,r[`cp1${i}`]=d-o*e[c]),l&&(o=(l[t]-h)/3,r[`cp2${t}`]=h+o,r[`cp2${i}`]=d+o*e[c])}}function Wr(n,e="x"){let t=ao(e),i=n.length,s=Array(i).fill(0),o=Array(i),a,r,l,c=le(n,0);for(a=0;a<i;++a)if(r=l,l=c,c=le(n,a+1),!!l){if(c){let h=c[e]-l[e];s[a]=h!==0?(c[t]-l[t])/h:0}o[a]=r?c?pt(s[a-1])!==pt(s[a])?0:(s[a-1]+s[a])/2:s[a-1]:s[a]}Hr(n,s,o),Nr(n,o,e)}function sn(n,e,t){return Math.max(Math.min(n,t),e)}function jr(n,e){let t,i,s,o,a,r=xt(n[0],e);for(t=0,i=n.length;t<i;++t)a=o,o=r,r=t<i-1&&xt(n[t+1],e),o&&(s=n[t],a&&(s.cp1x=sn(s.cp1x,e.left,e.right),s.cp1y=sn(s.cp1y,e.top,e.bottom)),r&&(s.cp2x=sn(s.cp2x,e.left,e.right),s.cp2y=sn(s.cp2y,e.top,e.bottom)))}function ro(n,e,t,i,s){let o,a,r,l;if(e.spanGaps&&(n=n.filter(c=>!c.skip)),e.cubicInterpolationMode==="monotone")Wr(n,s);else{let c=i?n[n.length-1]:n[0];for(o=0,a=n.length;o<a;++o)r=n[o],l=Vr(c,r,n[Math.min(o+1,a-(i?0:1))%a],e.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,c=r}e.capBezierPoints&&jr(n,t)}function _n(){return typeof window<"u"&&typeof document<"u"}function xn(n){let e=n.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function cn(n,e,t){let i;return typeof n=="string"?(i=parseInt(n,10),n.indexOf("%")!==-1&&(i=i/100*e.parentNode[t])):i=n,i}var yn=n=>n.ownerDocument.defaultView.getComputedStyle(n,null);function Ur(n,e){return yn(n).getPropertyValue(e)}var $r=["top","right","bottom","left"];function Gt(n,e,t){let i={};t=t?"-"+t:"";for(let s=0;s<4;s++){let o=$r[s];i[o]=parseFloat(n[e+"-"+o+t])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}var Yr=(n,e,t)=>(n>0||e>0)&&(!t||!t.shadowRoot);function Xr(n,e){let t=n.touches,i=t&&t.length?t[0]:n,{offsetX:s,offsetY:o}=i,a=!1,r,l;if(Yr(s,o,n.target))r=s,l=o;else{let c=e.getBoundingClientRect();r=i.clientX-c.left,l=i.clientY-c.top,a=!0}return{x:r,y:l,box:a}}function Nt(n,e){if("native"in n)return n;let{canvas:t,currentDevicePixelRatio:i}=e,s=yn(t),o=s.boxSizing==="border-box",a=Gt(s,"padding"),r=Gt(s,"border","width"),{x:l,y:c,box:h}=Xr(n,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/i),y:Math.round((c-u)/g*t.height/i)}}function Gr(n,e,t){let i,s;if(e===void 0||t===void 0){let o=n&&xn(n);if(!o)e=n.clientWidth,t=n.clientHeight;else{let a=o.getBoundingClientRect(),r=yn(o),l=Gt(r,"border","width"),c=Gt(r,"padding");e=a.width-c.width-l.width,t=a.height-c.height-l.height,i=cn(r.maxWidth,o,"clientWidth"),s=cn(r.maxHeight,o,"clientHeight")}}return{width:e,height:t,maxWidth:i||rn,maxHeight:s||rn}}var on=n=>Math.round(n*10)/10;function lo(n,e,t,i){let s=yn(n),o=Gt(s,"margin"),a=cn(s.maxWidth,n,"clientWidth")||rn,r=cn(s.maxHeight,n,"clientHeight")||rn,l=Gr(n,e,t),{width:c,height:h}=l;if(s.boxSizing==="content-box"){let u=Gt(s,"border","width"),f=Gt(s,"padding");c-=f.width+u.width,h-=f.height+u.height}return c=Math.max(0,c-o.width),h=Math.max(0,i?c/i:h-o.height),c=on(Math.min(c,a,l.maxWidth)),h=on(Math.min(h,r,l.maxHeight)),c&&!h&&(h=on(c/2)),(e!==void 0||t!==void 0)&&i&&l.height&&h>l.height&&(h=l.height,c=on(Math.floor(h*i))),{width:c,height:h}}function pi(n,e,t){let i=e||1,s=Math.floor(n.height*i),o=Math.floor(n.width*i);n.height=Math.floor(n.height),n.width=Math.floor(n.width);let a=n.canvas;return a.style&&(t||!a.style.height&&!a.style.width)&&(a.style.height=`${n.height}px`,a.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||a.height!==s||a.width!==o?(n.currentDevicePixelRatio=i,a.height=s,a.width=o,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}var co=function(){let n=!1;try{let e={get passive(){return n=!0,!1}};_n()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return n}();function mi(n,e){let t=Ur(n,e),i=t&&t.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Ft(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:n.y+t*(e.y-n.y)}}function ho(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:i==="middle"?t<.5?n.y:e.y:i==="after"?t<1?n.y:e.y:t>0?e.y:n.y}}function uo(n,e,t,i){let s={x:n.cp2x,y:n.cp2y},o={x:e.cp1x,y:e.cp1y},a=Ft(n,s,t),r=Ft(s,o,t),l=Ft(o,e,t),c=Ft(a,r,t),h=Ft(r,l,t);return Ft(c,h,t)}var Kr=function(n,e){return{x(t){return n+n+e-t},setWidth(t){e=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,i){return t-i},leftForLtr(t,i){return t-i}}},qr=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,e){return n+e},leftForLtr(n,e){return n}}};function Qt(n,e,t){return n?Kr(e,t):qr()}function bi(n,e){let t,i;(e==="ltr"||e==="rtl")&&(t=n.canvas.style,i=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",e,"important"),n.prevTextDirection=i)}function _i(n,e){e!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",e[0],e[1]))}function fo(n){return n==="angle"?{between:ue,compare:fr,normalize:st}:{between:vt,compare:(e,t)=>e-t,normalize:e=>e}}function Fs({start:n,end:e,count:t,loop:i,style:s}){return{start:n%t,end:e%t,loop:i&&(e-n+1)%t===0,style:s}}function Qr(n,e,t){let{property:i,start:s,end:o}=t,{between:a,normalize:r}=fo(i),l=e.length,{start:c,end:h,loop:d}=n,u,f;if(d){for(c+=l,h+=l,u=0,f=l;u<f&&a(r(e[c%l][i]),s,o);++u)c--,h--;c%=l,h%=l}return h<c&&(h+=l),{start:c,end:h,loop:d,style:n.style}}function xi(n,e,t){if(!t)return[n];let{property:i,start:s,end:o}=t,a=e.length,{compare:r,between:l,normalize:c}=fo(i),{start:h,end:d,loop:u,style:f}=Qr(n,e,t),g=[],p=!1,m=null,_,b,y,v=()=>l(s,y,_)&&r(s,y)!==0,x=()=>r(o,_)===0||l(o,y,_),C=()=>p||v(),S=()=>!p||x();for(let w=h,P=h;w<=d;++w)b=e[w%a],!b.skip&&(_=c(b[i]),_!==y&&(p=l(_,s,o),m===null&&C()&&(m=r(_,s)===0?w:P),m!==null&&S()&&(g.push(Fs({start:m,end:w,loop:u,count:a,style:f})),m=null),P=w,y=_));return m!==null&&g.push(Fs({start:m,end:d,loop:u,count:a,style:f})),g}function yi(n,e){let t=[],i=n.segments;for(let s=0;s<i.length;s++){let o=xi(i[s],n.points,e);o.length&&t.push(...o)}return t}function Zr(n,e,t,i){let s=0,o=e-1;if(t&&!i)for(;s<e&&!n[s].skip;)s++;for(;s<e&&n[s].skip;)s++;for(s%=e,t&&(o+=s);o>s&&n[o%e].skip;)o--;return o%=e,{start:s,end:o}}function Jr(n,e,t,i){let s=n.length,o=[],a=e,r=n[e],l;for(l=e+1;l<=t;++l){let c=n[l%s];c.skip||c.stop?r.skip||(i=!1,o.push({start:e%s,end:(l-1)%s,loop:i}),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:i}),o}function go(n,e){let t=n.points,i=n.options.spanGaps,s=t.length;if(!s)return[];let o=!!n._loop,{start:a,end:r}=Zr(t,s,o,i);if(i===!0)return zs(n,[{start:a,end:r,loop:o}],t,e);let l=r<a?r+s:r,c=!!n._fullLoop&&a===0&&r===s-1;return zs(n,Jr(t,a,l,c),t,e)}
vendor: 4,309 bytes, line 1
1function zs(n,e,t,i){return!i||!i.setContext||!t?e:tl(n,e,t,i)}function tl(n,e,t,i){let s=n._chart.getContext(),o=Bs(n.options),{_datasetIndex:a,options:{spanGaps:r}}=n,l=t.length,c=[],h=o,d=e[0].start,u=d;function f(g,p,m,_){let b=r?-1:1;if(g!==p){for(g+=l;t[g%l].skip;)g-=b;for(;t[p%l].skip;)p+=b;g%l!==p%l&&(c.push({start:g%l,end:p%l,loop:m,style:_}),h=_,d=p%l)}}for(let g of e){d=r?d:g.start;let p=t[d%l],m;for(u=d+1;u<=g.end;u++){let _=t[u%l];m=Bs(i.setContext(At(s,{type:"segment",p0:p,p1:_,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:a}))),el(m,h)&&f(d,u-1,g.loop,h),p=_,h=m}d<u-1&&f(d,u-1,g.loop,h)}return c}function Bs(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function el(n,e){if(!e)return!1;let t=[],i=function(s,o){return ai(o)?(t.includes(o)||t.push(o),t.indexOf(o)):o};return JSON.stringify(n,i)!==JSON.stringify(e,i)}var Ti=class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,i,s){let o=t.listeners[s],a=t.duration;o.forEach(r=>r({chart:e,initial:t.initial,numSteps:a,currentStep:Math.min(i-t.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=ni.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;let o=i.items,a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(e),r=!0):(o[a]=o[o.length-1],o.pop());r&&(s.draw(),this._notify(s,i,e,"progress")),o.length||(i.running=!1,this._notify(s,i,e,"complete"),i.initial=!1),t+=o.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){let t=this._charts,i=t.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,i)),i}listen(e,t,i){this._getAnims(e).listeners[t].push(i)}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((i,s)=>Math.max(i,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 i=t.items,s=i.length-1;for(;s>=0;--s)i[s].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}},Tt=new Ti,po="transparent",nl={boolean(n,e,t){return t>.5?e:n},color(n,e,t){let i=ri(n||po),s=i.valid&&ri(e||po);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}},Ei=class{constructor(e,t,i,s){let o=t[i];s=pe([e.to,s,o,e.from]);let a=pe([e.from,o,s]);this._active=!0,this._fn=e.fn||nl[e.type||typeof a],this._easing=ae[e.easing]||ae.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=i,this._from=a,this._to=s,this._promises=void 0}active(){return this._active}update(e,t,i){if(this._active){this._notify(!1);let s=this._target[this._prop],o=i-this._start,a=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=pe([e.to,t,s,e.from]),this._from=pe([e.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){let t=e-this._start,i=this._duration,s=this._prop,o=this._from,a=this._loop,r=this._to,l;if(this._active=o!==r&&(a||t<i),!this._active){this._target[s]=r,this._notify(!0);return}if(t<0){this._target[s]=o;return}l=t/i%2,l=a&&l>1?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,i)=>{e.push({res:t,rej:i})})}_notify(e){let t=e?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][t]()}},An=class{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!I(e))return;let t=Object.keys(j.animation),i=this._properties;Object.getOwnPropertyNames(e).forEach(s=>{let o=e[s];if(!I(o))return;let a={};for(let r of t)a[r]=o[r];
vendor: 11,203 bytes, line 1
1(H(o.properties)&&o.properties||[s]).forEach(r=>{(r===s||!i.has(r))&&i.set(r,a)})})}_animateOptions(e,t){let i=t.options,s=sl(e,i);if(!s)return[];let o=this._createAnimations(s,i);return i.$shared&&il(e.options.$animations,i).then(()=>{e.options=i},()=>{}),o}_createAnimations(e,t){let i=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=i.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 Ei(u,e,c,h),s.push(d)}return s}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}let i=this._createAnimations(e,t);if(i.length)return Tt.add(this._chart,i),!0}};function il(n,e){let t=[],i=Object.keys(e);for(let s=0;s<i.length;s++){let o=n[i[s]];o&&o.active()&&t.push(o.wait())}return Promise.all(t)}function sl(n,e){if(!e)return;let t=n.options;if(!t){n.options=e;return}return t.$shared&&(n.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t}function mo(n,e){let t=n&&n.options||{},i=t.reverse,s=t.min===void 0?e:0,o=t.max===void 0?e:0;return{start:i?o:s,end:i?s:o}}function ol(n,e,t){if(t===!1)return!1;let i=mo(n,t),s=mo(e,t);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}function al(n){let e,t,i,s;return I(n)?(e=n.top,t=n.right,i=n.bottom,s=n.left):e=t=i=s=n,{top:e,right:t,bottom:i,left:s,disabled:n===!1}}function pa(n,e){let t=[],i=n._getSortedDatasetMetas(e),s,o;for(s=0,o=i.length;s<o;++s)t.push(i[s].index);return t}function bo(n,e,t,i={}){let s=n.keys,o=i.mode==="single",a,r,l,c;if(e===null)return;let h=!1;for(a=0,r=s.length;a<r;++a){if(l=+s[a],l===t){if(h=!0,i.all)continue;break}c=n.values[l],$(c)&&(o||e===0||pt(e)===pt(c))&&(e+=c)}return!h&&!i.all?0:e}function rl(n,e){let{iScale:t,vScale:i}=e,s=t.axis==="x"?"x":"y",o=i.axis==="x"?"x":"y",a=Object.keys(n),r=new Array(a.length),l,c,h;for(l=0,c=a.length;l<c;++l)h=a[l],r[l]={[s]:h,[o]:n[h]};return r}function vi(n,e){let t=n&&n.options.stacked;return t||t===void 0&&e.stack!==void 0}function ll(n,e,t){return`${n.id}.${e.id}.${t.stack||t.type}`}function cl(n){let{min:e,max:t,minDefined:i,maxDefined:s}=n.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:s?t:Number.POSITIVE_INFINITY}}function hl(n,e,t){let i=n[e]||(n[e]={});return i[t]||(i[t]={})}function _o(n,e,t,i){for(let s of e.getMatchingVisibleMetas(i).reverse()){let o=n[s.index];if(t&&o>0||!t&&o<0)return s.index}return null}function xo(n,e){let{chart:t,_cachedMeta:i}=n,s=t._stacks||(t._stacks={}),{iScale:o,vScale:a,index:r}=i,l=o.axis,c=a.axis,h=ll(o,a,i),d=e.length,u;for(let f=0;f<d;++f){let g=e[f],{[l]:p,[c]:m}=g,_=g._stacks||(g._stacks={});u=_[c]=hl(s,h,p),u[r]=m,u._top=_o(u,a,!0,i.type),u._bottom=_o(u,a,!1,i.type);let b=u._visualValues||(u._visualValues={});b[r]=m}}function Ci(n,e){let t=n.scales;return Object.keys(t).filter(i=>t[i].axis===e).shift()}function dl(n,e){return At(n,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function ul(n,e,t){return At(n,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}function Fe(n,e){let t=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){e=e||n._parsed;for(let s of e){let o=s._stacks;if(!o||o[i]===void 0||o[i][t]===void 0)return;delete o[i][t],o[i]._visualValues!==void 0&&o[i]._visualValues[t]!==void 0&&delete o[i]._visualValues[t]}}}var wi=n=>n==="reset"||n==="none",yo=(n,e)=>e?n:Object.assign({},n),fl=(n,e,t)=>n&&!e.hidden&&e._stacked&&{keys:pa(t,!0),values:null},jt=(()=>{class n{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,i){this.chart=t,this._ctx=t.ctx,this.index=i,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=vi(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&&Fe(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,i=this._cachedMeta,s=this.getDataset(),o=(u,f,g,p)=>u==="x"?f:u==="r"?p:g,a=i.xAxisID=D(s.xAxisID,Ci(t,"x")),r=i.yAxisID=D(s.yAxisID,Ci(t,"y")),l=i.rAxisID=D(s.rAxisID,Ci(t,"r")),c=i.indexAxis,h=i.iAxisID=o(c,a,r,l),d=i.vAxisID=o(c,r,a,l);i.xScale=this.getScaleForId(a),i.yScale=this.getScaleForId(r),i.rScale=this.getScaleForId(l),i.iScale=this.getScaleForId(h),i.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 i=this._cachedMeta;return t===i.iScale?i.vScale:i.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&ti(this._data,this),t._stacked&&Fe(t)}_dataCheck(){let t=this.getDataset(),i=t.data||(t.data=[]),s=this._data;if(I(i)){let o=this._cachedMeta;this._data=rl(i,o)}else if(s!==i){if(s){ti(s,this);let o=this._cachedMeta;Fe(o),o._parsed=[]}i&&Object.isExtensible(i)&&Ks(i,this),this._syncList=[],this._data=i}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let i=this._cachedMeta,s=this.getDataset(),o=!1;this._dataCheck();let a=i._stacked;i._stacked=vi(i.vScale,i),i.stack!==s.stack&&(o=!0,Fe(i),i.stack=s.stack),this._resyncElements(t),(o||a!==i._stacked)&&(xo(this,i._parsed),i._stacked=vi(i.vScale,i))}configure(){let t=this.chart.config,i=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),i,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,i){let{_cachedMeta:s,_data:o}=this,{iScale:a,_stacked:r}=s,l=a.axis,c=t===0&&i===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{H(o[t])?f=this.parseArrayData(s,o,t,i):I(o[t])?f=this.parseObjectData(s,o,t,i):f=this.parsePrimitiveData(s,o,t,i);let g=()=>u[l]===null||h&&u[l]<h[l];for(d=0;d<i;++d)s._parsed[d+t]=u=f[d],c&&(g()&&(c=!1),h=u);s._sorted=c}r&&xo(this,f)}parsePrimitiveData(t,i,s,o){let{iScale:a,vScale:r}=t,l=a.axis,c=r.axis,h=a.getLabels(),d=a===r,u=new Array(o),f,g,p;for(f=0,g=o;f<g;++f)p=f+s,u[f]={[l]:d||a.parse(h[p],p),[c]:r.parse(i[p],p)};return u}parseArrayData(t,i,s,o){let{xScale:a,yScale:r}=t,l=new Array(o),c,h,d,u;for(c=0,h=o;c<h;++c)d=c+s,u=i[d],l[c]={x:a.parse(u[0],d),y:r.parse(u[1],d)};return l}parseObjectData(t,i,s,o){let{xScale:a,yScale:r}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,h=new Array(o),d,u,f,g;for(d=0,u=o;d<u;++d)f=d+s,g=i[f],h[d]={x:a.parse(Ot(g,l),f),y:r.parse(Ot(g,c),f)};return h}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,i,s){let o=this.chart,a=this._cachedMeta,r=i[t.axis],l={keys:pa(o,!0),values:i._stacks[t.axis]._visualValues};return bo(l,r,a.index,{mode:s})}updateRangeFromParsed(t,i,s,o){let a=s[i.axis],r=a===null?NaN:a,l=o&&s._stacks[i.axis];o&&l&&(o.values=l,r=bo(o,a,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,i){let s=this._cachedMeta,o=s._parsed,a=s._sorted&&t===s.iScale,r=o.length,l=this._getOtherScale(t),c=fl(i,s,this.chart),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:u}=cl(l),f,g;function p(){g=o[f];let m=g[l.axis];return!$(g[t.axis])||d>m||u<m}for(f=0;f<r&&!(!p()&&(this.updateRangeFromParsed(h,t,g,c),a));++f);if(a){for(f=r-1;f>=0;--f)if(!p()){this.updateRangeFromParsed(h,t,g,c);break}}return h}getAllParsedValues(t){let i=this._cachedMeta._parsed,s=[],o,a,r;for(o=0,a=i.length;o<a;++o)r=i[o][t.axis],$(r)&&s.push(r);return s}getMaxOverflow(){return!1}getLabelAndValue(t){let i=this._cachedMeta,s=i.iScale,o=i.vScale,a=this.getParsed(t);return{label:s?""+s.getLabelForValue(a[s.axis]):"",value:o?""+o.getLabelForValue(a[o.axis]):""}}_update(t){let i=this._cachedMeta;this.update(t||"default"),i._clip=al(D(this.options.clip,ol(i.xScale,i.yScale,this.getMaxOverflow())))}update(t){}draw(){let t=this._ctx,i=this.chart,s=this._cachedMeta,o=s.data||[],a=i.chartArea,r=[],l=this._drawStart||0,c=this._drawCount||o.length-l,h=this.options.drawActiveElementsOnTop,d;for(s.dataset&&s.dataset.draw(t,a,l,c),d=l;d<l+c;++d){let u=o[d];u.hidden||(u.active&&h?r.push(u):u.draw(t,a))}for(d=0;d<r.length;++d)r[d].draw(t,a)}getStyle(t,i){let s=i?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(t||0,s)}getContext(t,i,s){let o=this.getDataset(),a;if(t>=0&&t<this._cachedMeta.data.length){let r=this._cachedMeta.data[t];a=r.$context||(r.$context=ul(this.getContext(),t,r)),a.parsed=this.getParsed(t),a.raw=o.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=dl(this.chart.getContext(),this.index)),a.dataset=o,a.index=a.datasetIndex=this.index;return a.active=!!i,a.mode=s,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,i){return this._resolveElementOptions(this.dataElementType.id,i,t)}_resolveElementOptions(t,i="default",s){let o=i==="active",a=this._cachedDataOpts,r=t+"-"+i,l=a[r],c=this.enableOptionSharing&&he(s);if(l)return yo(l,c);let h=this.chart.config,d=h.datasetElementScopeKeys(this._type,t),u=o?[`${t}Hover`,"hover",t,""]:[t,""],f=h.getOptionScopes(this.getDataset(),d),g=Object.keys(j.elements[t]),p=()=>this.getContext(s,o,i),m=h.resolveNamedOptions(f,g,p,u);return m.$shared&&(m.$shared=c,a[r]=Object.freeze(yo(m,c))),m}_resolveAnimations(t,i,s){let o=this.chart,a=this._cachedDataOpts,r=`animation-${i}`,l=a[r];if(l)return l;let c;if(o.options.animation!==!1){let d=this.chart.config,u=d.datasetAnimationScopeKeys(this._type,i),f=d.getOptionScopes(this.getDataset(),u);c=d.createResolver(f,this.getContext(t,s,i))}let h=new An(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,i){return!i||wi(t)||this.chart._animationsDisabled}_getSharedOptions(t,i){let s=this.resolveDataElementOptions(t,i),o=this._sharedOptions,a=this.getSharedOptions(s),r=this.includeOptions(i,a)||a!==o;return this.updateSharedOptions(a,i,s),{sharedOptions:a,includeOptions:r}}updateElement(t,i,s,o){wi(o)?Object.assign(t,s):this._resolveAnimations(i,o).update(t,s)}updateSharedOptions(t,i,s){t&&!wi(i)&&this._resolveAnimations(void 0,i).update(t,s)}_setStyle(t,i,s,o){t.active=o;let a=this.getStyle(i,o);
vendor: 4,517 bytes, line 1
1this._resolveAnimations(i,s,o).update(t,{options:!o&&this.getSharedOptions(a)||a})}removeHoverStyle(t,i,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,i,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 i=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=i.length,r=Math.min(a,o);r&&this.parse(0,r),a>o?this._insertElements(o,a-o,t):a<o&&this._removeElements(a,o-a)}_insertElements(t,i,s=!0){let o=this._cachedMeta,a=o.data,r=t+i,l,c=h=>{for(h.length+=i,l=h.length-1;l>=r;l--)h[l]=h[l-i]};for(c(a),l=t;l<r;++l)a[l]=new this.dataElementType;this._parsing&&c(o._parsed),this.parse(t,i),s&&this.updateElements(a,t,i,"reset")}updateElements(t,i,s,o){}_removeElements(t,i){let s=this._cachedMeta;if(this._parsing){let o=s._parsed.splice(t,i);s._stacked&&Fe(s,o)}s.data.splice(t,i)}_sync(t){if(this._parsing)this._syncList.push(t);else{let[i,s,o]=t;this[i](s,o)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){let t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,i){i&&this._sync(["_removeElements",t,i]);let s=arguments.length-2;s&&this._sync(["_insertElements",t,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}return n})();function gl(n,e){if(!n._cache.$bar){let t=n.getMatchingVisibleMetas(e),i=[];for(let s=0,o=t.length;s<o;s++)i=i.concat(t[s].controller.getAllParsedValues(n));n._cache.$bar=ei(i.sort((s,o)=>s-o))}return n._cache.$bar}function pl(n){let e=n.iScale,t=gl(e,n.type),i=e._length,s,o,a,r,l=()=>{a===32767||a===-32768||(he(r)&&(i=Math.min(i,Math.abs(a-r)||i)),r=a)};for(s=0,o=t.length;s<o;++s)a=e.getPixelForValue(t[s]),l();for(r=void 0,s=0,o=e.ticks.length;s<o;++s)a=e.getPixelForTick(s),l();return i}function ml(n,e,t,i){let s=t.barThickness,o,a;return R(s)?(o=e.min*t.categoryPercentage,a=t.barPercentage):(o=s*i,a=1),{chunk:o/i,ratio:a,start:e.pixels[n]-o/2}}function bl(n,e,t,i){let s=e.pixels,o=s[n],a=n>0?s[n-1]:null,r=n<s.length-1?s[n+1]:null,l=t.categoryPercentage;a===null&&(a=o-(r===null?e.end-e.start:r-o)),r===null&&(r=o+o-a);let c=o-(o-Math.min(a,r))/2*l;return{chunk:Math.abs(r-a)/2*l/i,ratio:t.barPercentage,start:c}}function _l(n,e,t,i){let s=t.parse(n[0],i),o=t.parse(n[1],i),a=Math.min(s,o),r=Math.max(s,o),l=a,c=r;Math.abs(a)>Math.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 ma(n,e,t,i){return H(n)?_l(n,e,t,i):e[t.axis]=t.parse(n,i),e}function vo(n,e,t,i){let s=n.iScale,o=n.vScale,a=s.getLabels(),r=s===o,l=[],c,h,d,u;for(c=t,h=t+i;c<h;++c)u=e[c],d={},d[s.axis]=r||s.parse(a[c],c),l.push(ma(u,d,o,c));return l}function Si(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function xl(n,e,t){return n!==0?pt(n):(e.isHorizontal()?1:-1)*(e.min>=t?1:-1)}function yl(n){let e,t,i,s,o;return n.horizontal?(e=n.base>n.x,t="left",i="right"):(e=n.base<n.y,t="bottom",i="top"),e?(s="end",o="start"):(s="start",o="end"),{start:t,end:i,reverse:e,top:s,bottom:o}}function vl(n,e,t,i){let s=e.borderSkipped,o={};if(!s){n.borderSkipped=o;return}if(s===!0){n.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}let{start:a,end:r,reverse:l,top:c,bottom:h}=yl(n);s==="middle"&&t&&(n.enableBorderRadius=!0,(t._top||0)===i?s=c:(t._bottom||0)===i?s=h:(o[Co(h,a,r,l)]=!0,s=c)),o[Co(s,a,r,l)]=!0,n.borderSkipped=o}function Co(n,e,t,i){return i?(n=Cl(n,e,t),n=wo(n,t,e)):n=wo(n,e,t),n}function Cl(n,e,t){return n===e?t:n===t?e:n}function wo(n,e,t){return n==="start"?e:n==="end"?t:n}function wl(n,{inflateAmount:e},t){n.inflateAmount=e==="auto"?t===1?.33:0:e}var Sl=(()=>{class n extends jt{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,i,s,o){return vo(t,i,s,o)}parseArrayData(t,i,s,o){return vo(t,i,s,o)}parseObjectData(t,i,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;
1for(f=s,g=s+o;f<g;++f)m=i[f],p={},p[a.axis]=a.parse(Ot(m,h),f),u.push(ma(Ot(m,d),p,r,f));return u}updateRangeFromParsed(t,i,s,o){super.updateRangeFromParsed(t,i,s,o);let a=s._custom;a&&i===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){let i=this._cachedMeta,{iScale:s,vScale:o}=i,a=this.getParsed(t),r=a._custom,l=Si(r)?"["+r.start+", "+r.end+"]":""+o.getLabelForValue(a[o.axis]);return{label:""+s.getLabelForValue(a[s.axis]),value:l}}initialize(){this.enableOptionSharing=!0,super.initialize();let t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){let i=this._cachedMeta;this.updateElements(i.data,0,i.data.length,t)}updateElements(t,i,s,o){let a=o==="reset",{index:r,_cachedMeta:{vScale:l}}=this,c=l.getBasePixel(),h=l.isHorizontal(),d=this._getRuler(),{sharedOptions:u,includeOptions:f}=this._getSharedOptions(i,o);for(let g=i;g<i+s;g++){let p=this.getParsed(g),m=a||R(p[l.axis])?{base:c,head:c}:this._calculateBarValuePixels(g),_=this._calculateBarIndexPixels(g,d),b=(p._stacks||{})[l.axis],y={horizontal:h,base:m.base,enableBorderRadius:!b||Si(p._custom)||r===b._top||r===b._bottom,x:h?m.head:_.center,y:h?_.center:m.head,height:h?_.size:Math.abs(m.size),width:h?Math.abs(m.size):_.size};f&&(y.options=u||this.resolveDataElementOptions(g,t[g].active?"active":o));let v=y.options||t[g].options;vl(y,v,b,r),wl(y,v,d.ratio),this.updateElement(t[g],g,y,o)}}_getStacks(t,i){let{iScale:s}=this._cachedMeta,o=s.getMatchingVisibleMetas(this._type).filter(d=>d.controller.options.grouped),a=s.options.stacked,r=[],l=this._cachedMeta.controller.getParsed(i),c=l&&l[s.axis],h=d=>{let u=d._parsed.find(g=>g[s.axis]===c),f=u&&u[d.vScale.axis];if(R(f)||isNaN(f))return!0};for(let d of o)if(!(i!==void 0&&h(d))&&((a===!1||r.indexOf(d.stack)===-1||a===void 0&&d.stack===void 0)&&r.push(d.stack),d.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,i,s){let o=this._getStacks(t,s),a=i!==void 0?o.indexOf(i):-1;return a===-1?o.length-1:a}_getRuler(){let t=this.options,i=this._cachedMeta,s=i.iScale,o=[],a,r;for(a=0,r=i.data.length;a<r;++a)o.push(s.getPixelForValue(this.getParsed(a)[s.axis],a));let l=t.barThickness;return{min:l||pl(i),pixels:o,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:t.grouped,ratio:l?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){let{_cachedMeta:{vScale:i,_stacked:s,index:o},options:{base:a,minBarLength:r}}=this,l=a||0,c=this.getParsed(t),h=c._custom,d=Si(h),u=c[i.axis],f=0,g=s?this.applyStack(i,c,s):u,p,m;g!==u&&(f=g-u,g=u),d&&(u=h.barStart,g=h.barEnd-h.barStart,u!==0&&pt(u)!==pt(h.barEnd)&&(f=0),f+=u);let _=!R(a)&&!d?a:f,b=i.getPixelForValue(_);if(this.chart.getDataVisibility(t)?p=i.getPixelForValue(f+g):p=b,m=p-b,Math.abs(m)<r){m=xl(m,i,l)*r,u===l&&(b-=m/2);let y=i.getPixelForDecimal(0),v=i.getPixelForDecimal(1),x=Math.min(y,v),C=Math.max(y,v);b=Math.max(Math.min(b,C),x),p=b+m,s&&!d&&(c._stacks[i.axis]._visualValues[o]=i.getValueForPixel(p)-i.getValueForPixel(b))}if(b===i.getPixelForValue(l)){let y=pt(m)*i.getLineWidthForValue(l)/2;b+=y,m-=y}return{size:m,base:b,head:p,center:p+m/2}}_calculateBarIndexPixels(t,i){let s=i.scale,o=this.options,a=o.skipNull,r=D(o.maxBarThickness,1/0),l,c;if(i.grouped){let h=a?this._getStackCount(t):i.stackCount,d=o.barThickness==="flex"?bl(t,i,o,h):ml(t,i,o,h),u=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0);l=d.start+d.chunk*u+d.chunk/2,c=Math.min(r,d.chunk*d.ratio)}else l=s.getPixelForValue(this.getParsed(t)[s.axis],t),c=Math.min(r,i.min*i.ratio);return{base:l-c/2,head:l+c/2,center:l,size:c}}draw(){let t=this._cachedMeta,i=t.vScale,s=t.data,o=s.length,a=0;for(;a<o;++a)this.getParsed(a)[i.axis]!==null&&!s[a].hidden&&s[a].draw(this._ctx)}}return n})(),Ml=(()=>{class n extends jt{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,i,s,o){let a=super.parsePrimitiveData(t,i,s,o);for(let r=0;r<a.length;r++)a[r]._custom=this.resolveDataElementOptions(r+s).radius;return a}parseArrayData(t,i,s,o){let a=super.parseArrayData(t,i,s,o);for(let r=0;r<a.length;r++){let l=i[s+r];a[r]._custom=D(l[2],this.resolveDataElementOptions(r+s).radius)}return a}parseObjectData(t,i,s,o){let a=super.parseObjectData(t,i,s,o);for(let r=0;r<a.length;r++){let l=i[s+r];a[r]._custom=D(l&&l.r&&+l.r,this.resolveDataElementOptions(r+s).radius)}return a}getMaxOverflow(){let t=this._cachedMeta.data,i=0;for(let s=t.length-1;s>=0;--s)i=Math.max(i,t[s].size(this.resolveDataElementOptions(s))/2);return i>0&&i}getLabelAndValue(t){let i=this._cachedMeta,s=this.chart.data.labels||[],{xScale:o,yScale:a}=i,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 i=this._cachedMeta.data;this.updateElements(i,0,i.length,t)}updateElements(t,i,s,o){let a=o==="reset",{iScale:r,vScale:l}=this._cachedMeta,{sharedOptions:c,includeOptions:h}=this._getSharedOptions(i,o),d=r.axis,u=l.axis;for(let f=i;f<i+s;f++){let g=t[f],p=!a&&this.getParsed(f),m={},_=m[d]=a?r.getPixelForDecimal(.5):r.getPixelForValue(p[d]),b=m[u]=a?l.getBasePixel():l.getPixelForValue(p[u]);m.skip=isNaN(_)||isNaN(b),h&&(m.options=c||this.resolveDataElementOptions(f,g.active?"active":o),a&&(m.options.radius=0)),this.updateElement(g,f,m,o)}}resolveDataElementOptions(t,i){let s=this.getParsed(t),o=super.resolveDataElementOptions(t,i);o.$shared&&(o=Object.assign({},o,{$shared:!1}));let a=o.radius;return i!=="active"&&(o.radius=0),o.radius+=D(s&&s._custom,a),o}}return n})();function kl(n,e,t){let i=1,s=1,o=0,a=0;if(e<W){let r=n,l=r+e,c=Math.cos(r),h=Math.sin(r),d=Math.cos(l),u=Math.sin(l),f=(y,v,x)=>ue(y,r,l,!0)?1:Math.max(v,v*t,x,x*t),g=(y,v,x)=>ue(y,r,l,!0)?-1:Math.min(v,v*t,x,x*t),p=f(0,c,d),m=f(Y,h,u),_=g(N,c,d),b=g(N+Y,h,u);i=(p-_)/2,s=(m-b)/2,o=-(p+_)/2,a=-(m+b)/2}return{ratioX:i,ratioY:s,offsetX:o,offsetY:a}}var Zi=(()=>{class n extends jt{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"]}}
1,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 i=t.data;if(i.labels.length&&i.datasets.length){let{labels:{pointStyle:s,color:o}}=t.legend.options;return i.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,i,s){s.chart.toggleDataVisibility(i.index),s.chart.update()}}}};constructor(t,i){super(t,i),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,i){let s=this.getDataset().data,o=this._cachedMeta;if(this._parsing===!1)o._parsed=s;else{let a=c=>+s[c];if(I(s[t])){let{key:c="value"}=this._parsing;a=h=>+Ot(s[h],c)}let r,l;for(r=t,l=t+i;r<l;++r)o._parsed[r]=a(r)}}_getRotation(){return ht(this.options.rotation-90)}_getCircumference(){return ht(this.options.circumference)}_getRotationExtents(){let t=W,i=-W;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)&&this.chart.getDatasetMeta(s).type===this._type){let o=this.chart.getDatasetMeta(s).controller,a=o._getRotation(),r=o._getCircumference();t=Math.min(t,a),i=Math.max(i,a+r)}return{rotation:t,circumference:i-t}}update(t){let i=this.chart,{chartArea:s}=i,o=this._cachedMeta,a=o.data,r=this.getMaxBorderWidth()+this.getMaxOffset(a
vendor: 4,097 bytes, line 1
1)+this.options.spacing,l=Math.max((Math.min(s.width,s.height)-r)/2,0),c=Math.min(Hs(this.options.cutout,l),1),h=this._getRingWeight(this.index),{circumference:d,rotation:u}=this._getRotationExtents(),{ratioX:f,ratioY:g,offsetX:p,offsetY:m}=kl(u,d,c),_=(s.width-r)/f,b=(s.height-r)/g,y=Math.max(Math.min(_,b)/2,0),v=Gn(this.options.radius,y),x=Math.max(v*c,0),C=(v-x)/this._getVisibleDatasetWeightTotal();this.offsetX=p*v,this.offsetY=m*v,o.total=this.calculateTotal(),this.outerRadius=v-C*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-C*h,0),this.updateElements(a,0,a.length,t)}_circumference(t,i){let s=this.options,o=this._cachedMeta,a=this._getCircumference();return i&&s.animation.animateRotate||!this.chart.getDataVisibility(t)||o._parsed[t]===null||o.data[t].hidden?0:this.calculateCircumference(o._parsed[t]*a/W)}updateElements(t,i,s,o){let a=o==="reset",r=this.chart,l=r.chartArea,h=r.options.animation,d=(l.left+l.right)/2,u=(l.top+l.bottom)/2,f=a&&h.animateScale,g=f?0:this.innerRadius,p=f?0:this.outerRadius,{sharedOptions:m,includeOptions:_}=this._getSharedOptions(i,o),b=this._getRotation(),y;for(y=0;y<i;++y)b+=this._circumference(y,a);for(y=i;y<i+s;++y){let v=this._circumference(y,a),x=t[y],C={x:d+this.offsetX,y:u+this.offsetY,startAngle:b,endAngle:b+v,circumference:v,outerRadius:p,innerRadius:g};_&&(C.options=m||this.resolveDataElementOptions(y,x.active?"active":o)),b+=v,this.updateElement(x,y,C,o)}}calculateTotal(){let t=this._cachedMeta,i=t.data,s=0,o;for(o=0;o<i.length;o++){let a=t._parsed[o];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(o)&&!i[o].hidden&&(s+=Math.abs(a))}return s}calculateCircumference(t){let i=this._cachedMeta.total;return i>0&&!isNaN(t)?W*(Math.abs(t)/i):0}getLabelAndValue(t){let i=this._cachedMeta,s=this.chart,o=s.data.labels||[],a=fe(i._parsed[t],s.options.locale);return{label:o[t]||"",value:a}}getMaxBorderWidth(t){let i=0,s=this.chart,o,a,r,l,c;if(!t){for(o=0,a=s.data.datasets.length;o<a;++o)if(s.isDatasetVisible(o)){r=s.getDatasetMeta(o),t=r.data,l=r.controller;break}}if(!t)return 0;for(o=0,a=t.length;o<a;++o)c=l.resolveDataElementOptions(o),c.borderAlign!=="inner"&&(i=Math.max(i,c.borderWidth||0,c.hoverBorderWidth||0));return i}getMaxOffset(t){let i=0;for(let s=0,o=t.length;s<o;++s){let a=this.resolveDataElementOptions(s);i=Math.max(i,a.offset||0,a.hoverOffset||0)}return i}_getRingWeightOffset(t){let i=0;for(let s=0;s<t;++s)this.chart.isDatasetVisible(s)&&(i+=this._getRingWeight(s));return i}_getRingWeight(t){return Math.max(D(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}return n})(),Pl=(()=>{class n extends jt{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 i=this._cachedMeta,{dataset:s,data:o=[],_dataset:a}=i,r=this.chart._animationsDisabled,{start:l,count:c}=si(i,o,r);this._drawStart=l,this._drawCount=c,oi(i)&&(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,i,s,o){let a=o==="reset",{iScale:r,vScale:l,_stacked:c,_dataset:h}=this._cachedMeta,{sharedOptions:d,includeOptions:u}=this._getSharedOptions(i,o),f=r.axis,g=l.axis,{spanGaps:p,segment:m}=this.options,_=qt(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||a||o==="none",y=i+s,v=t.length,x=i>0&&this.getParsed(i-1);for(let C=0;C<v;++C){let S=t[C],w=b?S:{};if(C<i||C>=y){w.skip=!0;continue}let P=this.getParsed(C),A=R(P[g]),O=w[f]=r.getPixelForValue(P[f],C),F=w[g]=a||A?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,P,c):P[g],C);w.skip=isNaN(O)||isNaN(F)||A,w.stop=C>0&&Math.abs(P[f]-x[f])>
1_,m&&(w.parsed=P,w.raw=h.data[C]),u&&(w.options=d||this.resolveDataElementOptions(C,S.active?"active":o)),b||this.updateElement(S,C,w,o),x=P}}getMaxOverflow(){let t=this._cachedMeta,i=t.dataset,s=i.options&&i.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 n})(),ba=(()=>{class n extends jt{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 i=t.data;if(i.labels.length&&i.datasets.length){let{labels:{pointStyle:s,color:o}}=t.legend.options;return i.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,i,s){s.chart.toggleDataVisibility(i.index),s.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,i){super(t,i),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let i=this._cachedMeta,s=this.chart,o=s.data.labels||[],a=fe(i._parsed[t].r,s.options.locale);return{label:o[t]||"",value:a}}parseObjectData(t,i,s,o){return gi.bind(this)(t,i,s,o)}update(t){let i=this._cachedMeta.data;this._updateRadius(),this.updateElements(i,0,i.length,t)}getMinMax(){let t=this._cachedMeta,i={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)&&(a<i.min&&(i.min=a),a>i.max&&(i.max=a))}),i}_updateRadius(){let t=this.chart,i=t.chartArea,s=t.options,o=Math.min(i.right-i.left,i.bottom-i.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,i,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*N,g=f,p,m=360/this.countVisibleElements();for(p=0;p<i;++p)g+=this._computeAngle(p,o,m);for(p=i;p<i+s;p++){let _=t[p],b=g,y=g+this._computeAngle(p,o,m),v=r.getDataVisibility(p)?h.getDistanceFromCenterForValue(this.getParsed(p).r):0;g=y,a&&(c.animateScale&&(v=0),c.animateRotate&&(b=y=f));let x={x:d,y:u,innerRadius:0,outerRadius:v,startAngle:b,endAngle:y,options:this.resolveDataElementOptions(p,_.active?"active":o)};this.updateElement(_,p,x,o)}}countVisibleElements(){let t=this._cachedMeta,i=0;return t.data.forEach((s,o)=>{!isNaN(this.getParsed(o).r)&&this.chart.getDataVisibility(o)&&i++}),i}_computeAngle(t,i,s){return this.chart.getDataVisibility(t)?ht(this.resolveDataElementOptions(t,i).angle||s):0}}return n})(),Dl=(()=>{class n extends Zi{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}return n})(),Ol=(()=>{class n extends jt{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 i=this._cachedMeta.vScale,s=this.getParsed(t);return{label:i.getLabels()[t],value:""+i.getLabelForValue(s[i.axis])}}parseObjectData(t,i,s,o){return gi.bind(this)(t,i,s,o)}update(t){let i=this._cachedMeta,s=i.dataset,o=i.data||[],a=i.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,i,s,o){let a=this._cachedMeta.rScale,r=o==="reset";for(let l=i;l<i+s;l++){let c=t[l],h=this.resolveDataElementOptions(l,c.active?"active":o),d=a.getPointPositionForValue(l,this.getParsed(l).r),u=r?a.xCenter:d.x,f=r?a.yCenter:d.y,g={x:u,y:f,angle:d.angle,skip:isNaN(u)||isNaN(f),options:h};this.updateElement(c,l,g,o)}}}return n})(),Al=(()=>{class n extends jt{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 i=this._cachedMeta,s=this.chart.data.labels||[],{xScale:o,yScale:a}=i,r=this.getParsed(t),l=o.getLabelForValue(r.x),c=a.getLabelForValue(r.y);return{label:s[t]||"",value:"("+l+", "+c+")"}}update(t){let i=this._cachedMeta,{data:s=[]}=i,o=this.chart._animationsDisabled,{start:a,count:r}=si(i,s,o);if(this._drawStart=a,this._drawCount=r,oi(i)&&(a=0,r=s.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:l,_dataset:c}=i;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 i.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,i,s,o){let a=o==="reset",{iScale:r,vScale:l,_stacked:c,_dataset:h}=this._cachedMeta,d=this.resolveDataElementOptions(i,o),u=this.getSharedOptions(d),f=this.includeOptions(o,u),g=r.axis,p=l.axis,{spanGaps:m,segment:_}=this.options,b=qt(m)?m:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||a||o==="none",v=i>0&&this.getParsed(i-1);for(let x=i;x<i+s;++x){let C=t[x],S=this.getParsed(x),w=y?C:{},P=R(S[p]),A=w[g]=r.getPixelForValue(S[g],x),O=w[p]=a||P?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,S,c):S[p],x);w.skip=isNaN(A)||isNaN(O)||P,w.stop=x>0&&Math.abs(S[g]-v[g])>b,_&&(w.parsed=S,w.raw=h.data[x]),f&&(w.options=u||this.resolveDataElementOptions(x,C.active?"active":o)),y||this.updateElement(C,x,w,o),v=S}this.updateSharedOptions(u,o,d)}getMaxOverflow(){let t=this._cachedMeta,i=t.data||[];if(!this.options.showLine){let l=0;for(let c=i.length-1;c>=0;--c)l=Math.max(l,i[c].size(this.resolveDataElementOptions(c))/2);return l>0&&l}let s=t.dataset,o=s.options&&s.options.borderWidth||0;if(!i.length)return o;let a=i[0].size(this.resolveDataElementOptions(0)),r=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(o,a,r)/2}}return n})(),Tl=Object.freeze({__proto__:null,BarController:Sl,BubbleController:Ml,DoughnutController:Zi,LineController:Pl,PieController:Dl,PolarAreaController:ba,RadarController:Ol,ScatterController:Al});function Zt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var Li=class n{static override(e){Object.assign(n.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return Zt()}parse(){return Zt()}format(){return Zt()}add(){return Zt()}diff(){return Zt()}startOf(){return Zt()}endOf(){return Zt()}},El={_date:Li};function Ll(n,e,t,i){let{controller:s,data:o,_sorted:a}=n,r=s._cachedMeta.iScale,l=n.dataset&&n.dataset.options?n.dataset.options.spanGaps:null;if(r&&e===r.axis&&e!=="r"&&a&&o.length){let c=r._reversePixels?Ys:_t;if(i){if(s._sharedOptions){let h=o[0],d=typeof h.getRange=="function"&&h.getRange(e);if(d){let u=c(o,e,t-d),f=c(o,e,t+d);return{lo:u.lo,hi:f.hi}}}}else{let h=c(o,e,t);if(l){let{vScale:d}=s._cachedMeta,{_parsed:u}=n,f=u.slice(0,h.lo+1).reverse().findIndex(p=>!R(p[d.axis]));h.lo-=Math.max(0,f);let g=u.slice(h.hi).findIndex(p=>!R(p[d.axis]));h.hi+=Math.max(0,g)}return h}}return{lo:0,hi:o.length-1}}
vendor: 54,662 bytes, line 1
1function Ye(n,e,t,i,s){let o=n.getSortedVisibleDatasetMetas(),a=t[e];for(let r=0,l=o.length;r<l;++r){let{index:c,data:h}=o[r],{lo:d,hi:u}=Ll(o[r],e,a,s);for(let f=d;f<=u;++f){let g=h[f];g.skip||i(g,c,f)}}}function Rl(n){let e=n.indexOf("x")!==-1,t=n.indexOf("y")!==-1;return function(i,s){let o=e?Math.abs(i.x-s.x):0,a=t?Math.abs(i.y-s.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function Mi(n,e,t,i,s){let o=[];return!s&&!n.isPointInArea(e)||Ye(n,t,e,function(r,l,c){!s&&!xt(r,n.chartArea,0)||r.inRange(e.x,e.y,i)&&o.push({element:r,datasetIndex:l,index:c})},!0),o}function Il(n,e,t,i){let s=[];function o(a,r,l){let{startAngle:c,endAngle:h}=a.getProps(["startAngle","endAngle"],i),{angle:d}=Jn(a,{x:e.x,y:e.y});ue(d,c,h)&&s.push({element:a,datasetIndex:r,index:l})}return Ye(n,t,e,o),s}function Fl(n,e,t,i,s,o){let a=[],r=Rl(t),l=Number.POSITIVE_INFINITY;function c(h,d,u){let f=h.inRange(e.x,e.y,s);if(i&&!f)return;let g=h.getCenterPoint(s);if(!(!!o||n.isPointInArea(g))&&!f)return;let m=r(e,g);m<l?(a=[{element:h,datasetIndex:d,index:u}],l=m):m===l&&a.push({element:h,datasetIndex:d,index:u})}return Ye(n,t,e,c),a}function ki(n,e,t,i,s,o){return!o&&!n.isPointInArea(e)?[]:t==="r"&&!i?Il(n,e,t,s):Fl(n,e,t,i,s,o)}function So(n,e,t,i,s){let o=[],a=t==="x"?"inXRange":"inYRange",r=!1;return Ye(n,t,e,(l,c,h)=>{l[a]&&l[a](e[t],s)&&(o.push({element:l,datasetIndex:c,index:h}),r=r||l.inRange(e.x,e.y,s))}),i&&!r?[]:o}var zl={evaluateInteractionItems:Ye,modes:{index(n,e,t,i){let s=Nt(e,n),o=t.axis||"x",a=t.includeInvisible||!1,r=t.intersect?Mi(n,s,o,i,a):ki(n,s,o,!1,i,a),l=[];return r.length?(n.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(n,e,t,i){let s=Nt(e,n),o=t.axis||"xy",a=t.includeInvisible||!1,r=t.intersect?Mi(n,s,o,i,a):ki(n,s,o,!1,i,a);if(r.length>0){let l=r[0].datasetIndex,c=n.getDatasetMeta(l).data;r=[];for(let h=0;h<c.length;++h)r.push({element:c[h],datasetIndex:l,index:h})}return r},point(n,e,t,i){let s=Nt(e,n),o=t.axis||"xy",a=t.includeInvisible||!1;return Mi(n,s,o,i,a)},nearest(n,e,t,i){let s=Nt(e,n),o=t.axis||"xy",a=t.includeInvisible||!1;return ki(n,s,o,t.intersect,i,a)},x(n,e,t,i){let s=Nt(e,n);return So(n,s,"x",t.intersect,i)},y(n,e,t,i){let s=Nt(e,n);return So(n,s,"y",t.intersect,i)}}},_a=["left","top","right","bottom"];function ze(n,e){return n.filter(t=>t.pos===e)}function Mo(n,e){return n.filter(t=>_a.indexOf(t.pos)===-1&&t.box.axis===e)}function Be(n,e){return n.sort((t,i)=>{let s=e?i:t,o=e?t:i;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function Bl(n){let e=[],t,i,s,o,a,r;for(t=0,i=(n||[]).length;t<i;++t)s=n[t],{position:o,options:{stack:a,stackWeight:r=1}}=s,e.push({index:t,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:a&&o+a,stackWeight:r});return e}function Vl(n){let e={};for(let t of n){let{stack:i,pos:s,stackWeight:o}=t;if(!i||!_a.includes(s))continue;let a=e[i]||(e[i]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return e}function Hl(n,e){let t=Vl(n),{vBoxMaxWidth:i,hBoxMaxHeight:s}=e,o,a,r;for(o=0,a=n.length;o<a;++o){r=n[o];let{fullSize:l}=r.box,c=t[r.stack],h=c&&r.stackWeight/c.weight;r.horizontal?(r.width=h?h*i:l&&e.availableWidth,r.height=s):(r.width=i,r.height=h?h*s:l&&e.availableHeight)}return t}function Nl(n){let e=Bl(n),t=Be(e.filter(c=>c.box.fullSize),!0),i=Be(ze(e,"left"),!0),s=Be(ze(e,"right")),o=Be(ze(e,"top"),!0),a=Be(ze(e,"bottom")),r=Mo(e,"x"),l=Mo(e,"y");return{fullSize:t,leftAndTop:i.concat(o),rightAndBottom:s.concat(l).concat(a).concat(r),chartArea:ze(e,"chartArea"),vertical:i.concat(s).concat(l),horizontal:o.concat(a).concat(r)}}function ko(n,e,t,i){return Math.max(n[t],e[t])+Math.max(n[i],e[i])}function xa(n,e){n.top=Math.max(n.top,e.top),n.left=Math.max(n.left,e.left),n.bottom=Math.max(n.bottom,e.bottom),n.right=Math.max(n.right,e.right)}function Wl(n,e,t,i){let{pos:s,box:o}=t,a=n.maxPadding;if(!I(s)){t.size&&(n[s]-=t.size);let d=i[t.stack]||{size:0,count:1};d.size=Math.max(d.size,t.horizontal?o.height:o.width),t.size=d.size/d.count,n[s]+=t.size}o.getPadding&&xa(a,o.getPadding());let r=Math.max(0,e.outerWidth-ko(a,n,"left","right")),l=Math.max(0,e.outerHeight-ko(a,n,"top","bottom")),c=r!==n.w,h=l!==n.h;return n.w=r,n.h=l,t.horizontal?{same:c,other:h}:{same:h,other:c}}function jl(n){let e=n.maxPadding;function t(i){let s=Math.max(e[i]-n[i],0);return n[i]+=s,s}n.y+=t("top"),n.x+=t("left"),t("right"),t("bottom")}function Ul(n,e){let t=e.maxPadding;function i(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 i(n?["left","right"]:["top","bottom"])}function Ne(n,e,t,i){let s=[],o,a,r,l,c,h;for(o=0,a=n.length,c=0;o<a;++o){r=n[o],l=r.box,l.update(r.width||e.w,r.height||e.h,Ul(r.horizontal,e));let{same:d,other:u}=Wl(e,t,r,i);c|=d&&s.length,h=h||u,l.fullSize||s.push(r)}return c&&Ne(s,e,t,i)||h}function vn(n,e,t,i,s){n.top=t,n.left=e,n.right=e+i,n.bottom=t+s,n.width=i,n.height=s}function Po(n,e,t,i){let s=t.padding,{x:o,y:a}=e;for(let r of n){let l=r.box,c=i[r.stack]||{count:1,placed:0,weight:1},h=r.stackWeight/c.weight||1;if(r.horizontal){let d=e.w*h,u=c.size||l.height;he(c.start)&&(a=c.start),l.fullSize?vn(l,s.left,a,t.outerWidth-s.right-s.left,u):vn(l,e.left+c.placed,a,d,u),c.start=a,c.placed+=d,a=l.bottom}else{let d=e.h*h,u=c.size||l.width;he(c.start)&&(o=c.start),l.fullSize?vn(l,o,s.top,u,t.outerHeight-s.bottom-s.top):vn(l,o,e.top+c.placed,u,d),c.start=o,c.placed+=d,o=l.right}}e.x=o,e.y=a}var nt={addBox(n,e){n.boxes||(n.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},n.boxes.push(e)},removeBox(n,e){let t=n.boxes?n.boxes.indexOf(e):-1;t!==-1&&n.boxes.splice(t,1)},configure(n,e,t){e.fullSize=t.fullSize,e.position=t.position,e.weight=t.weight},update(n,e,t,i){if(!n)return;let s=tt(n.options.layout.padding),o=Math.max(e-s.width,0),a=Math.max(t-s.height,0),r=Nl(n.boxes),l=r.vertical,c=r.horizontal;z(n.boxes,p=>{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);xa(u,tt(i));let f=Object.assign({maxPadding:u,w:o,h:a,x:s.left,y:s.top},s),g=Hl(l.concat(c),d);Ne(r.fullSize,f,d,g),Ne(l,f,d,g),Ne(c,f,d,g)&&Ne(l,f,d,g),jl(f),Po(r.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,Po(r.rightAndBottom,f,d,g),n.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},z(r.chartArea,p=>{let m=p.box;Object.assign(m,n.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}},Tn=class{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,i){}removeEventListener(e,t,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,i,s){return t=Math.max(0,t||e.width),i=i||e.height,{width:t,height:Math.max(0,s?Math.floor(t/s):i)}}isAttached(e){return!0}updateConfig(e){}},Ri=class extends Tn{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}},Dn="$chartjs",$l={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Do=n=>n===null||n==="";function Yl(n,e){let t=n.style,i=n.getAttribute("height"),s=n.getAttribute("width");if(n[Dn]={initial:{height:i,width:s,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",Do(s)){let o=mi(n,"width");o!==void 0&&(n.width=o)}if(Do(i))if(n.style.height==="")n.height=n.width/(e||2);else{let o=mi(n,"height");o!==void 0&&(n.height=o)}return n}var ya=co?{passive:!0}:!1;function Xl(n,e,t){n&&n.addEventListener(e,t,ya)}function Gl(n,e,t){n&&n.canvas&&n.canvas.removeEventListener(e,t,ya)}function Kl(n,e){let t=$l[n.type]||n.type,{x:i,y:s}=Nt(n,e);return{type:t,chart:e,native:n,x:i!==void 0?i:null,y:s!==void 0?s:null}}function En(n,e){for(let t of n)if(t===e||t.contains(e))return!0}function ql(n,e,t){let i=n.canvas,s=new MutationObserver(o=>{let a=!1;for(let r of o)a=a||En(r.addedNodes,i),a=a&&!En(r.removedNodes,i);a&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function Ql(n,e,t){let i=n.canvas,s=new MutationObserver(o=>{let a=!1;for(let r of o)a=a||En(r.removedNodes,i),a=a&&!En(r.addedNodes,i);a&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}var je=new Map,Oo=0;function va(){let n=window.devicePixelRatio;n!==Oo&&(Oo=n,je.forEach((e,t)=>{t.currentDevicePixelRatio!==n&&e()}))}function Zl(n,e){je.size||window.addEventListener("resize",va),je.set(n,e)}function Jl(n){je.delete(n),je.size||window.removeEventListener("resize",va)}function tc(n,e,t){let i=n.canvas,s=i&&xn(i);if(!s)return;let o=ii((r,l)=>{let c=s.clientWidth;t(r,l),c<s.clientWidth&&t()},window),a=new ResizeObserver(r=>{let l=r[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return a.observe(s),Zl(n,o),a}function Pi(n,e,t){t&&t.disconnect(),e==="resize"&&Jl(n)}function ec(n,e,t){let i=n.canvas,s=ii(o=>{n.ctx!==null&&t(Kl(o,n))},n);return Xl(i,e,s),s}var Ii=class extends Tn{acquireContext(e,t){let i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(Yl(e,t),i):null}releaseContext(e){let t=e.canvas;if(!t[Dn])return!1;let i=t[Dn].initial;["height","width"].forEach(o=>{let a=i[o];R(a)?t.removeAttribute(o):t.setAttribute(o,a)});let s=i.style||{};return Object.keys(s).forEach(o=>{t.style[o]=s[o]}),t.width=t.width,delete t[Dn],!0}addEventListener(e,t,i){this.removeEventListener(e,t);let s=e.$proxies||(e.$proxies={}),a={attach:ql,detach:Ql,resize:tc}[t]||ec;s[t]=a(e,t,i)}removeEventListener(e,t){let i=e.$proxies||(e.$proxies={}),s=i[t];if(!s)return;({attach:Pi,detach:Pi,resize:Pi}[t]||Gl)(e,t,s),i[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,i,s){return lo(e,t,i,s)}isAttached(e){let t=e&&xn(e);return!!(t&&t.isConnected)}};function nc(n){return!_n()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?Ri:Ii}var mt=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){let{x:t,y:i}=this.getProps(["x","y"],e);return{x:t,y:i}}hasValue(){return qt(this.x)&&qt(this.y)}getProps(e,t){let i=this.$animations;if(!t||!i)return this;let s={};return e.forEach(o=>{s[o]=i[o]&&i[o].active()?i[o]._to:this[o]}),s}};function ic(n,e){let t=n.options.ticks,i=sc(n),s=Math.min(t.maxTicksLimit||i,i),o=t.major.enabled?ac(e):[],a=o.length,r=o[0],l=o[a-1],c=[];if(a>s)return rc(e,c,o,a/s),c;let h=oc(o,e,s);if(a>0){let d,u,f=a>1?Math.round((l-r)/(a-1)):null;for(Cn(e,c,h,R(f)?0:r-f,r),d=0,u=a-1;d<u;d++)Cn(e,c,h,o[d],o[d+1]);return Cn(e,c,h,l,R(f)?e.length:l+f),c}return Cn(e,c,h),c}function sc(n){let e=n.options.offset,t=n._tickSize(),i=n._length/t+(e?0:1),s=n._maxLength/t;return Math.floor(Math.min(i,s))}function oc(n,e,t){let i=lc(n),s=e.length/t;if(!i)return Math.max(s,1);let o=js(i);for(let a=0,r=o.length-1;a<r;a++){let l=o[a];if(l>s)return l}return Math.max(s,1)}function ac(n){let e=[],t,i;for(t=0,i=n.length;t<i;t++)n[t].major&&e.push(t);return e}function rc(n,e,t,i){let s=0,o=t[0],a;for(i=Math.ceil(i),a=0;a<n.length;a++)a===o&&(e.push(n[a]),s++,o=t[s*i])}function Cn(n,e,t,i,s){let o=D(i,0),a=Math.min(D(s,n.length),n.length),r=0,l,c,h;for(t=Math.ceil(t),s&&(l=s-i,t=l/Math.floor(l/t)),h=o;h<0;)r++,h=Math.round(o+r*t);for(c=Math.max(o,0);c<a;c++)c===h&&(e.push(n[c]),r++,h=Math.round(o+r*t))}function lc(n){let e=n.length,t,i;if(e<2)return!1;for(i=n[0],t=1;t<e;++t)if(n[t]-n[t-1]!==i)return!1;return i}var cc=n=>n==="left"?"right":n==="right"?"left":n,Ao=(n,e,t)=>e==="top"||e==="left"?n[e]+t:n[e]-t,To=(n,e)=>Math.min(e||n,n);function Eo(n,e){let t=[],i=n.length/e,s=n.length,o=0;for(;o<s;o+=i)t.push(n[Math.floor(o)]);return t}function hc(n,e,t){let i=n.ticks.length,s=Math.min(e,i-1),o=n._startPixel,a=n._endPixel,r=1e-6,l=n.getPixelForTick(s),c;if(!(t&&(i===1?c=Math.max(l-o,a-l):e===0?c=(n.getPixelForTick(1)-l)/2:c=(l-n.getPixelForTick(s-1))/2,l+=s<e?c:-c,l<o-r||l>a+r)))return l}function dc(n,e){z(n,t=>{let i=t.gc,s=i.length/2,o;if(s>e){for(o=0;o<s;++o)delete t.data[i[o]];i.splice(0,s)}})}function Ve(n){return n.drawTicks?n.tickLength:0}function Lo(n,e){if(!n.display)return 0;let t=K(n.font,e),i=tt(n.padding);return(H(n.text)?n.text.length:1)*t.lineHeight+i.height}function uc(n,e){return At(n,{scale:e,type:"scale"})}function fc(n,e,t){return At(n,{tick:t,index:e,type:"tick"})}function gc(n,e,t){let i=fn(n);return(t&&e!=="right"||!t&&e==="right")&&(i=cc(i)),i}function pc(n,e,t,i){let{top:s,left:o,bottom:a,right:r,chart:l}=n,{chartArea:c,scales:h}=l,d=0,u,f,g,p=a-s,m=r-o;if(n.isHorizontal()){if(f=J(i,o,r),I(t)){let _=Object.keys(t)[0],b=t[_];g=h[_].getPixelForValue(b)+p-e}else t==="center"?g=(c.bottom+c.top)/2+p-e:g=Ao(n,t,e);u=r-o}else{if(I(t)){let _=Object.keys(t)[0],b=t[_];f=h[_].getPixelForValue(b)-m+e}else t==="center"?f=(c.left+c.right)/2-m+e:f=Ao(n,t,e);g=J(i,a,s),d=t==="left"?-Y:Y}return{titleX:f,titleY:g,maxWidth:u,rotation:d}}var te=class n extends mt{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:i,_suggestedMax:s}=this;return e=ot(e,Number.POSITIVE_INFINITY),t=ot(t,Number.NEGATIVE_INFINITY),i=ot(i,Number.POSITIVE_INFINITY),s=ot(s,Number.NEGATIVE_INFINITY),{min:ot(e,i),max:ot(t,s),minDefined:$(e),maxDefined:$(t)}}getMinMax(e){let{min:t,max:i,minDefined:s,maxDefined:o}=this.getUserBounds(),a;if(s&&o)return{min:t,max:i};let r=this.getMatchingVisibleMetas();for(let l=0,c=r.length;l<c;++l)a=r[l].controller.getMinMax(this,e),s||(t=Math.min(t,a.min)),o||(i=Math.max(i,a.max));return t=o&&t>i?i:t,i=s&&t>i?t:i,{min:ot(t,ot(i,t)),max:ot(i,ot(t,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let 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(){V(this.options.beforeUpdate,[this])}update(e,t,i){let{beginAtZero:s,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=no(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=r<this.ticks.length;this._convertTicksToLabels(l?Eo(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=ic(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,t,i;this.isHorizontal()?(t=this.left,i=this.right):(t=this.top,i=this.bottom,e=!e),this._startPixel=t,this._endPixel=i,this._reversePixels=e,this._length=i-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){V(this.options.afterUpdate,[this])}beforeSetDimensions(){V(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){V(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),V(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){V(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){let t=this.options.ticks,i,s,o;for(i=0,s=e.length;i<s;i++)o=e[i],o.label=V(t.callback,[o.value,i,e],this)}afterTickToLabelConversion(){V(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){V(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let e=this.options,t=e.ticks,i=To(this.ticks.length,e.ticks.maxTicksLimit),s=t.minRotation||0,o=t.maxRotation,a=s,r,l,c;if(!this._isVisible()||!t.display||s>=o||i<=1||!this.isHorizontal()){this.labelRotation=s;return}let h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=q(this.chart.width-d,0,this.maxWidth);r=e.offset?this.maxWidth/i:f/(i-1),d+6>r&&(r=f/(i-(e.offset?.5:1)),l=this.maxHeight-Ve(e.grid)-t.padding-Lo(e.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),a=dn(Math.min(Math.asin(q((h.highest.height+6)/r,-1,1)),Math.asin(q(l/c,-1,1))-Math.asin(q(u/c,-1,1)))),a=Math.max(s,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){V(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){V(this.options.beforeFit,[this])}fit(){let e={width:0,height:0},{chart:t,options:{ticks:i,title:s,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){let l=Lo(s,t.options.font);if(r?(e.width=this.maxWidth,e.height=Ve(o)+l):(e.height=this.maxHeight,e.width=Ve(o)+l),i.display&&this.ticks.length){let{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),f=i.padding*2,g=ht(this.labelRotation),p=Math.cos(g),m=Math.sin(g);if(r){let _=i.mirror?0:m*d.width+p*u.height;e.height=Math.min(this.maxHeight,e.height+_+f)}else{let _=i.mirror?0:p*d.width+m*u.height;e.width=Math.min(this.maxWidth,e.width+_+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,i,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=i*t.height):(u=i*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(){V(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,i;for(t=0,i=e.length;t<i;t++)R(e[t].label)&&(e.splice(t,1),i--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){let t=this.options.ticks.sampleSize,i=this.ticks;t<i.length&&(i=Eo(i,t)),this._labelSizes=e=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,t,i){let{ctx:s,_longestTextCache:o}=this,a=[],r=[],l=Math.floor(t/To(t,i)),c=0,h=0,d,u,f,g,p,m,_,b,y,v,x;for(d=0;d<t;d+=l){if(g=e[d].label,p=this._resolveTickFontOptions(d),s.font=m=p.string,_=o[m]=o[m]||{data:{},gc:[]},b=p.lineHeight,y=v=0,!R(g)&&!H(g))y=Te(s,_.data,_.gc,y,g),v=b;else if(H(g))for(u=0,f=g.length;u<f;++u)x=g[u],!R(x)&&!H(x)&&(y=Te(s,_.data,_.gc,y,x),v+=b);a.push(y),r.push(v),c=Math.max(y,c),h=Math.max(v,h)}dc(o,t);let C=a.indexOf(c),S=r.indexOf(h),w=P=>({width:a[P]||0,height:r[P]||0});return{first:w(0),last:w(t-1),widest:w(C),highest:w(S),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 $s(this._alignToPixels?Bt(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&&e<t.length){let i=t[e];return i.$context||(i.$context=fc(this.getContext(),e,i))}return this.$context||(this.$context=uc(this.chart.getContext(),this))}_tickSize(){let e=this.options.ticks,t=ht(this.labelRotation),i=Math.abs(Math.cos(t)),s=Math.abs(Math.sin(t)),o=this._getLabelSizes(),a=e.autoSkipPadding||0,r=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return this.isHorizontal()?l*i>r*s?r/i:l/s:l*s<r*i?l/i:r/s}_isVisible(){let e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){let t=this.axis,i=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=Ve(o),f=[],g=r.setContext(this.getContext()),p=g.display?g.width:0,m=p/2,_=function(U){return Bt(i,U,p)},b,y,v,x,C,S,w,P,A,O,F,Z;if(a==="top")b=_(this.bottom),S=this.bottom-u,P=b-m,O=_(e.top)+m,Z=e.bottom;else if(a==="bottom")b=_(this.top),O=e.top,Z=_(e.bottom)-m,S=b+m,P=this.top+u;else if(a==="left")b=_(this.right),C=this.right-u,w=b-m,A=_(e.left)+m,F=e.right;else if(a==="right")b=_(this.left),A=e.left,F=_(e.right)-m,C=b+m,w=this.left+u;else if(t==="x"){if(a==="center")b=_((e.top+e.bottom)/2+.5);else if(I(a)){let U=Object.keys(a)[0],X=a[U];b=_(this.chart.scales[U].getPixelForValue(X))}O=e.top,Z=e.bottom,S=b+m,P=S+u}else if(t==="y"){if(a==="center")b=_((e.left+e.right)/2);else if(I(a)){let U=Object.keys(a)[0],X=a[U];b=_(this.chart.scales[U].getPixelForValue(X))}C=b-m,w=C-u,A=e.left,F=e.right}let lt=D(s.ticks.maxTicksLimit,d),B=Math.max(1,Math.ceil(d/lt));for(y=0;y<d;y+=B){let U=this.getContext(y),X=o.setContext(U),dt=r.setContext(U),et=X.lineWidth,ee=X.color,Ge=dt.dash||[],ne=dt.dashOffset,xe=X.tickWidth,Ut=X.tickColor,ye=X.tickBorderDash||[],$t=X.tickBorderDashOffset;v=hc(this,y,l),v!==void 0&&(x=Bt(i,v,et),c?C=w=A=F=x:S=P=O=Z=x,f.push({tx1:C,ty1:S,tx2:w,ty2:P,x1:A,y1:O,x2:F,y2:Z,width:et,color:ee,borderDash:Ge,borderDashOffset:ne,tickWidth:xe,tickColor:Ut,tickBorderDash:ye,tickBorderDashOffset:$t}))}return this._ticksLength=d,this._borderValue=b,f}_computeLabelItems(e){let t=this.axis,i=this.options,{position:s,ticks:o}=i,a=this.isHorizontal(),r=this.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=o,u=Ve(i.grid),f=u+h,g=d?-h:f,p=-ht(this.labelRotation),m=[],_,b,y,v,x,C,S,w,P,A,O,F,Z="middle";if(s==="top")C=this.bottom-g,S=this._getXAxisLabelAlignment();else if(s==="bottom")C=this.top+g,S=this._getXAxisLabelAlignment();else if(s==="left"){let B=this._getYAxisLabelAlignment(u);S=B.textAlign,x=B.x}else if(s==="right"){let B=this._getYAxisLabelAlignment(u);S=B.textAlign,x=B.x}else if(t==="x"){if(s==="center")C=(e.top+e.bottom)/2+f;else if(I(s)){let B=Object.keys(s)[0],U=s[B];C=this.chart.scales[B].getPixelForValue(U)+f}S=this._getXAxisLabelAlignment()}else if(t==="y"){if(s==="center")x=(e.left+e.right)/2-f;else if(I(s)){let B=Object.keys(s)[0],U=s[B];x=this.chart.scales[B].getPixelForValue(U)}S=this._getYAxisLabelAlignment(u).textAlign}t==="y"&&(l==="start"?Z="top":l==="end"&&(Z="bottom"));let lt=this._getLabelSizes();for(_=0,b=r.length;_<b;++_){y=r[_],v=y.label;let B=o.setContext(this.getContext(_));w=this.getPixelForTick(_)+o.labelOffset,P=this._resolveTickFontOptions(_),A=P.lineHeight,O=H(v)?v.length:1;let U=O/2,X=B.color,dt=B.textStrokeColor,et=B.textStrokeWidth,ee=S;a?(x=w,S==="inner"&&(_===b-1?ee=this.options.reverse?"left":"right":_===0?ee=this.options.reverse?"right":"left":ee="center"),s==="top"?c==="near"||p!==0?F=-O*A+A/2:c==="center"?F=-lt.highest.height/2-U*A+A:F=-lt.highest.height+A/2:c==="near"||p!==0?F=A/2:c==="center"?F=lt.highest.height/2-U*A:F=lt.highest.height-O*A,d&&(F*=-1),p!==0&&!B.showLabelBackdrop&&(x+=A/2*Math.sin(p))):(C=w,F=(1-O)*A/2);let Ge;if(B.showLabelBackdrop){let ne=tt(B.backdropPadding),xe=lt.heights[_],Ut=lt.widths[_],ye=F-ne.top,$t=0-ne.left;switch(Z){case"middle":ye-=xe/2;break;case"bottom":ye-=xe;break}switch(S){case"center":$t-=Ut/2;break;case"right":$t-=Ut;break;case"inner":_===b-1?$t-=Ut:_>0&&($t-=Ut/2);break}Ge={left:$t,top:ye,width:Ut+ne.width,height:xe+ne.height,color:B.backdropColor}}m.push({label:v,font:P,textOffset:F,options:{rotation:p,color:X,strokeColor:dt,strokeWidth:et,textAlign:ee,textBaseline:Z,translation:[x,C],backdrop:Ge}})}return m}_getXAxisLabelAlignment(){let{position:e,ticks:t}=this.options;if(-ht(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:i,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,i==="near"?c="left":i==="center"?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-r,i==="near"?c="right":i==="center"?(c="center",h-=l/2):(c="left",h=this.left)):t==="right"?s?(h=this.left+o,i==="near"?c="right":i==="center"?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+r,i==="near"?c="left":i==="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:i,top:s,width:o,height:a}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(i,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,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e)),o,a,r=(l,c,h)=>{!h.width||!h.color||(i.save(),i.lineWidth=h.width,i.strokeStyle=h.color,i.setLineDash(h.borderDash||[]),i.lineDashOffset=h.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(c.x,c.y),i.stroke(),i.restore())};if(t.display)for(o=0,a=s.length;o<a;++o){let l=s[o];t.drawOnChartArea&&r({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),t.drawTicks&&r({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){let{chart:e,ctx:t,options:{border:i,grid:s}}=this,o=i.setContext(this.getContext()),a=i.display?o.width:0;if(!a)return;let r=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue,c,h,d,u;this.isHorizontal()?(c=Bt(e,this.left,a)-a/2,h=Bt(e,this.right,r)+r/2,d=u=l):(d=Bt(e,this.top,a)-a/2,u=Bt(e,this.bottom,r)+r/2,c=h=l),t.save(),t.lineWidth=o.width,t.strokeStyle=o.color,t.beginPath(),t.moveTo(c,d),t.lineTo(h,u),t.stroke(),t.restore()}drawLabels(e){if(!this.options.ticks.display)return;let i=this.ctx,s=this._computeLabelArea();s&&Re(i,s);let o=this.getLabelItems(e);for(let a of o){let r=a.options,l=a.font,c=a.label,h=a.textOffset;Vt(i,c,0,h,l,r)}s&&Ie(i)}drawTitle(){let{ctx:e,options:{position:t,title:i,reverse:s}}=this;if(!i.display)return;let o=K(i.font),a=tt(i.padding),r=i.align,l=o.lineHeight/2;t==="bottom"||t==="center"||I(t)?(l+=a.bottom,H(i.text)&&(l+=o.lineHeight*(i.text.length-1))):l+=a.top;let{titleX:c,titleY:h,maxWidth:d,rotation:u}=pc(this,l,t,r);Vt(e,i.text,0,0,o,{color:i.color,maxWidth:d,rotation:u,textAlign:gc(r,t,s),textBaseline:"middle",translation:[c,h]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){let e=this.options,t=e.ticks&&e.ticks.z||0,i=D(e.grid&&e.grid.z,-1),s=D(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==n.prototype.draw?[{z:t,draw:o=>{this.draw(o)}}]:[{z:i,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(),i=this.axis+"AxisID",s=[],o,a;for(o=0,a=t.length;o<a;++o){let r=t[o];r[i]===this.id&&(!e||r.type===e)&&s.push(r)}return s}_resolveTickFontOptions(e){let t=this.options.ticks.setContext(this.getContext(e));return K(t.font)}_maxDigits(){let e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}},be=class{constructor(e,t,i){this.type=e,this.scope=t,this.override=i,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){let t=Object.getPrototypeOf(e),i;_c(t)&&(i=this.register(t));let s=this.items,o=e.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+e);return o in s||(s[o]=e,mc(e,a,i),this.override&&j.override(e.id,e.overrides)),a}get(e){return this.items[e]}unregister(e){let t=this.items,i=e.id,s=this.scope;i in t&&delete t[i],s&&i in j[s]&&(delete j[s][i],this.override&&delete zt[i])}};function mc(n,e,t){let i=re(Object.create(null),[t?j.get(t):{},j.get(e),n.defaults]);j.set(e,i),n.defaultRoutes&&bc(e,n.defaultRoutes),n.descriptors&&j.describe(e,n.descriptors)}function bc(n,e){Object.keys(e).forEach(t=>{let i=t.split("."),s=i.pop(),o=[n].concat(i).join("."),a=e[t].split("."),r=a.pop(),l=a.join(".");j.route(o,s,l,r)})}function _c(n){return"id"in n&&"defaults"in n}var Fi=class{constructor(){this.controllers=new be(jt,"datasets",!0),this.elements=new be(mt,"elements"),this.plugins=new be(Object,"plugins"),this.scales=new be(te,"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,i){[...t].forEach(s=>{let o=i||this._getRegistryForType(s);i||o.isForType(s)||o===this.plugins&&s.id?this._exec(e,o,s):z(s,a=>{let r=i||this._getRegistryForType(a);this._exec(e,r,a)})})}_exec(e,t,i){let s=hn(e);V(i["before"+s],[],i),t[e](i),V(i["after"+s],[],i)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){let i=this._typedRegistries[t];if(i.isForType(e))return i}return this.plugins}_get(e,t,i){let s=t.get(e);if(s===void 0)throw new Error('"'+e+'" is not a registered '+i+".");return s}},wt=new Fi,zi=class{constructor(){this._init=[]}notify(e,t,i,s){t==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));let o=s?this._descriptors(e).filter(s):this._descriptors(e),a=this._notify(o,e,t,i);return t==="afterDestroy"&&(this._notify(o,e,"stop"),this._notify(this._init,e,"uninstall")),a}_notify(e,t,i,s){s=s||{};for(let o of e){let a=o.plugin,r=a[i],l=[t,s,o.options];if(V(r,l,a)===!1&&s.cancelable)return!1}return!0}invalidate(){R(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;let t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){let i=e&&e.config,s=D(i.options&&i.options.plugins,{}),o=xc(i);return s===!1&&!t?[]:vc(e,o,s,t)}_notifyStateChanges(e){let t=this._oldCache||[],i=this._cache,s=(o,a)=>o.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(s(t,i),e,"stop"),this._notify(s(i,t),e,"start")}};function xc(n){let e={},t=[],i=Object.keys(wt.plugins.items);for(let o=0;o<i.length;o++)t.push(wt.getPlugin(i[o]));let s=n.plugins||[];for(let o=0;o<s.length;o++){let a=s[o];t.indexOf(a)===-1&&(t.push(a),e[a.id]=!0)}return{plugins:t,localIds:e}}function yc(n,e){return!e&&n===!1?null:n===!0?{}:n}function vc(n,{plugins:e,localIds:t},i,s){let o=[],a=n.getContext();for(let r of e){let l=r.id,c=yc(i[l],s);c!==null&&o.push({plugin:r,options:Cc(n.config,{plugin:r,local:t[l]},c,a)})}return o}function Cc(n,{plugin:e,local:t},i,s){let o=n.pluginScopeKeys(e),a=n.getOptionScopes(i,o);return t&&e.defaults&&a.push(e.defaults),n.createResolver(a,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Bi(n,e){let t=j.datasets[n]||{};return((e.datasets||{})[n]||{}).indexAxis||e.indexAxis||t.indexAxis||"x"}function wc(n,e){let t=n;return n==="_index_"?t=e:n==="_value_"&&(t=e==="x"?"y":"x"),t}function Sc(n,e){return n===e?"_index_":"_value_"}function Ro(n){if(n==="x"||n==="y"||n==="r")return n}function Mc(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function Vi(n,...e){if(Ro(n))return n;for(let t of e){let i=t.axis||Mc(t.position)||n.length>1&&Ro(n[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${n}' axis. Please provide 'axis' or 'position' option.`)}function Io(n,e,t){if(t[e+"AxisID"]===n)return{axis:e}}function kc(n,e){if(e.data&&e.data.datasets){let t=e.data.datasets.filter(i=>i.xAxisID===n||i.yAxisID===n);if(t.length)return Io(n,"x",t[0])||Io(n,"y",t[0])}return{}}function Pc(n,e){let t=zt[n.type]||{scales:{}},i=e.scales||{},s=Bi(n.type,e),o=Object.create(null);return Object.keys(i).forEach(a=>{let r=i[a];if(!I(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=Vi(a,r,kc(a,n),j.scales[r.type]),c=Sc(l,s),h=t.scales||{};o[a]=ce(Object.create(null),[{axis:l},r,h[l],h[c]])}),n.data.datasets.forEach(a=>{let r=a.type||n.type,l=a.indexAxis||Bi(r,e),h=(zt[r]||{}).scales||{};Object.keys(h).forEach(d=>{let u=wc(d,l),f=a[u+"AxisID"]||u;o[f]=o[f]||Object.create(null),ce(o[f],[{axis:u},i[f],h[d]])})}),Object.keys(o).forEach(a=>{let r=o[a];ce(r,[j.scales[r.type],j.scale])}),o}function Ca(n){let e=n.options||(n.options={});e.plugins=D(e.plugins,{}),e.scales=Pc(n,e)}function wa(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function Dc(n){return n=n||{},n.data=wa(n.data),Ca(n),n}var Fo=new Map,Sa=new Set;function wn(n,e){let t=Fo.get(n);return t||(t=e(),Fo.set(n,t),Sa.add(t)),t}var He=(n,e,t)=>{let i=Ot(e,t);i!==void 0&&n.add(i)},Hi=class{constructor(e){this._config=Dc(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=wa(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(),Ca(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return wn(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return wn(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return wn(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){let t=e.id,i=this.type;return wn(`${i}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){let i=this._scopeCache,s=i.get(e);return(!s||t)&&(s=new Map,i.set(e,s)),s}getOptionScopes(e,t,i){let{options:s,type:o}=this,a=this._cachedScopes(e,i),r=a.get(t);if(r)return r;let l=new Set;t.forEach(h=>{e&&(l.add(e),h.forEach(d=>He(l,e,d))),h.forEach(d=>He(l,s,d)),h.forEach(d=>He(l,zt[o]||{},d)),h.forEach(d=>He(l,j,d)),h.forEach(d=>He(l,gn,d))});let c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Sa.has(t)&&a.set(t,c),c}chartOptionScopes(){let{options:e,type:t}=this;return[e,zt[t]||{},j.datasets[t]||{},{type:t},j,gn]}resolveNamedOptions(e,t,i,s=[""]){let o={$shared:!0},{resolver:a,subPrefixes:r}=zo(this._resolverCache,e,s),l=a;if(Ac(a,t)){o.$shared=!1,i=Pt(i)?i():i;let c=this.createResolver(e,i,r);l=Kt(a,i,c)}for(let c of t)o[c]=l[c];return o}createResolver(e,t,i=[""],s){let{resolver:o}=zo(this._resolverCache,e,i);return I(t)?Kt(o,t,void 0,s):o}};function zo(n,e,t){let i=n.get(e);i||(i=new Map,n.set(e,i));let s=t.join(),o=i.get(s);return o||(o={resolver:bn(e,t),subPrefixes:t.filter(r=>!r.toLowerCase().includes("hover"))},i.set(s,o)),o}var Oc=n=>I(n)&&Object.getOwnPropertyNames(n).some(e=>Pt(n[e]));function Ac(n,e){let{isScriptable:t,isIndexable:i}=di(n);for(let s of e){let o=t(s),a=i(s),r=(a||o)&&n[s];if(o&&(Pt(r)||Oc(r))||a&&H(r))return!0}return!1}var Tc="4.4.8",Ec=["top","bottom","left","right","chartArea"];function Bo(n,e){return n==="top"||n==="bottom"||Ec.indexOf(n)===-1&&e==="x"}function Vo(n,e){return function(t,i){return t[n]===i[n]?t[e]-i[e]:t[n]-i[n]}}function Ho(n){let e=n.chart,t=e.options.animation;e.notifyPlugins("afterRender"),V(t&&t.onComplete,[n],e)}function Lc(n){let e=n.chart,t=e.options.animation;V(t&&t.onProgress,[n],e)}function Ma(n){return _n()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}var On={},No=n=>{let e=Ma(n);return Object.values(On).filter(t=>t.canvas===e).pop()};function Rc(n,e,t){let i=Object.keys(n);for(let s of i){let o=+s;if(o>=e){let a=n[s];delete n[s],(t>0||o>e)&&(n[o+t]=a)}}}function Ic(n,e,t,i){return!t||n.type==="mouseout"?null:i?e:n}function Sn(n,e,t){return n.options.clip?n[t]:e[t]}function Fc(n,e){let{xScale:t,yScale:i}=n;return t&&i?{left:Sn(t,e,"left"),right:Sn(t,e,"right"),top:Sn(i,e,"top"),bottom:Sn(i,e,"bottom")}:e}var St=(()=>{class n{static defaults=j;static instances=On;static overrides=zt;static registry=wt;static version=Tc;static getChart=No;static register(...t){wt.add(...t),Wo()}static unregister(...t){wt.remove(...t),Wo()}constructor(t,i){let s=this.config=new Hi(i),o=Ma(t),a=No(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||nc(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=Vs(),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 zi,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=qs(u=>this.update(u),r.resizeDelay||0),this._dataChanges=[],On[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}Tt.listen(this,"complete",Ho),Tt.listen(this,"progress",Lc),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:i},width:s,height:o,_aspectRatio:a}=this;return R(t)?i&&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 wt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():pi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return li(this.canvas,this.ctx),this}stop(){return Tt.stop(this),this}resize(t,i){Tt.running(this)?this._resizeBeforeDraw={width:t,height:i}:this._resize(t,i)}_resize(t,i){let s=this.options,o=this.canvas,a=s.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(o,t,i,a),l=s.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,pi(this,l,!0)&&(this.notifyPlugins("resize",{size:r}),V(s.onResize,[this,r],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){let i=this.options.scales||{};z(i,(s,o)=>{s.id=o})}buildOrUpdateScales(){let t=this.options,i=t.scales,s=this.scales,o=Object.keys(s).reduce((r,l)=>(r[l]=!1,r),{}),a=[];i&&(a=a.concat(Object.keys(i).map(r=>{let l=i[r],c=Vi(r,l),h=c==="r",d=c==="x";return{options:l,dposition:h?"chartArea":d?"bottom":"left",dtype:h?"radialLinear":d?"category":"linear"}}))),z(a,r=>{let l=r.options,c=l.id,h=Vi(c,l),d=D(l.type,r.dtype);(l.position===void 0||Bo(l.position,h)!==Bo(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=wt.getScale(d);u=new f({id:c,type:d,ctx:this.ctx,chart:this}),s[u.id]=u}u.init(l,t)}),z(o,(r,l)=>{r||delete s[l]}),z(s,r=>{nt.configure(this,r,r.options),nt.addBox(this,r)})}_updateMetasets(){let t=this._metasets,i=this.data.datasets.length,s=t.length;if(t.sort((o,a)=>o.index-a.index),s>i){for(let o=i;o<s;++o)this._destroyDatasetMeta(o);t.splice(i,s-i)}this._sortedMetasets=t.slice(0).sort(Vo("order","index"))}_removeUnreferencedMetasets(){let{_metasets:t,data:{datasets:i}}=this;t.length>i.length&&delete this._stacks,t.forEach((s,o)=>{i.filter(a=>a===s._dataset).length===0&&this._destroyDatasetMeta(o)})}buildOrUpdateControllers(){let t=[],i=this.data.datasets,s,o;for(this._removeUnreferencedMetasets(),s=0,o=i.length;s<o;s++){let a=i[s],r=this.getDatasetMeta(s),l=a.type||this.config.type;if(r.type&&r.type!==l&&(this._destroyDatasetMeta(s),r=this.getDatasetMeta(s)),r.type=l,r.indexAxis=a.indexAxis||Bi(l,this.options),r.order=a.order||0,r.index=s,r.label=""+a.label,r.visible=this.isDatasetVisible(s),r.controller)r.controller.updateIndex(s),r.controller.linkScales();else{let c=wt.getController(l),{datasetElementType:h,dataElementType:d}=j.datasets[l];Object.assign(c,{dataElementType:wt.getElement(d),datasetElementType:h&&wt.getElement(h)}),r.controller=new c(this,s),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){z(this.data.datasets,(t,i)=>{this.getDatasetMeta(i).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let i=this.config;i.update();let s=this._options=i.createResolver(i.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<d;h++){let{controller:u}=this.getDatasetMeta(h),f=!o&&a.indexOf(u)===-1;u.buildOrUpdateElements(f),r=Math.max(+u.getMaxOverflow(),r)}r=this._minPadding=s.layout.autoPadding?r:0,this._updateLayout(r),o||z(a,h=>{h.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Vo("z","_idx"));let{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){z(this.scales,t=>{nt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,i=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!Kn(i,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,i=this._getUniformDataChanges()||[];for(let{method:s,start:o,count:a}of i){let r=s==="_removeElements"?-a:a;Rc(t,o,r)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let i=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;a<i;a++)if(!Kn(o,s(a)))return;return Array.from(o).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;nt.update(this,this.width,this.height,t);let i=this.chartArea,s=i.width<=0||i.height<=0;this._layers=[],z(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 i=0,s=this.data.datasets.length;i<s;++i)this.getDatasetMeta(i).controller.configure();for(let i=0,s=this.data.datasets.length;i<s;++i)this._updateDataset(i,Pt(t)?t({datasetIndex:i}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,i){let s=this.getDatasetMeta(t),o={meta:s,index:t,mode:i,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",o)!==!1&&(s.controller._update(i),o.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",o))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Tt.has(this)?this.attached&&!Tt.running(this)&&Tt.start(this):(this.draw(),Ho({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){let{width:s,height:o}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(s,o)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;let i=this._layers;for(t=0;t<i.length&&i[t].z<=0;++t)i[t].draw(this.chartArea);for(this._drawDatasets();t<i.length;++t)i[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){let i=this._sortedMetasets,s=[],o,a;for(o=0,a=i.length;o<a;++o){let r=i[o];(!t||r.visible)&&s.push(r)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;let t=this.getSortedVisibleDatasetMetas();for(let i=t.length-1;i>=0;--i)this._drawDataset(t[i]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let i=this.ctx,s=t._clip,o=!s.disabled,a=Fc(t,this.chartArea),r={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(o&&Re(i,{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&&Ie(i),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return xt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,i,s,o){let a=zl.modes[i];return typeof a=="function"?a(this,t,s,o):[]}getDatasetMeta(t){let i=this.data.datasets[t],s=this._metasets,o=s.filter(a=>a&&a._dataset===i).pop();return o||(o={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:i&&i.order||0,index:t,_dataset:i,_parsed:[],_sorted:!1},s.push(o)),o}getContext(){return this.$context||(this.$context=At(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let i=this.data.datasets[t];if(!i)return!1;let s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!i.hidden}setDatasetVisibility(t,i){let s=this.getDatasetMeta(t);s.hidden=!i}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,i,s){let o=s?"show":"hide",a=this.getDatasetMeta(t),r=a.controller._resolveAnimations(void 0,o);he(i)?(a.data[i].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),r.update(a,{visible:s}),this.update(l=>l.datasetIndex===t?o:void 0))}hide(t,i){this._updateVisibility(t,i,!1)}show(t,i){this._updateVisibility(t,i,!0)}_destroyDatasetMeta(t){let i=this._metasets[t];i&&i.controller&&i.controller._destroy(),delete this._metasets[t]}_stop(){let t,i;for(this.stop(),Tt.remove(this),t=0,i=this.data.datasets.length;t<i;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");let{canvas:t,ctx:i}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),li(t,i),this.platform.releaseContext(i),this.canvas=null,this.ctx=null),delete On[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let t=this._listeners,i=this.platform,s=(a,r)=>{i.addEventListener(this,a,r),t[a]=r},o=(a,r,l)=>{a.offsetX=r,a.offsetY=l,this._eventHandler(a)};z(this.options.events,a=>s(a,o))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,i=this.platform,s=(c,h)=>{i.addEventListener(this,c,h),t[c]=h},o=(c,h)=>{t[c]&&(i.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)},i.isAttached(this.canvas)?l():r()}unbindEvents(){z(this._listeners,(t,i)=>{this.platform.removeEventListener(this,i,t)}),this._listeners={},z(this._responsiveListeners,(t,i)=>{this.platform.removeEventListener(this,i,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,i,s){let o=s?"set":"remove",a,r,l,c;for(i==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+o+"DatasetHoverStyle"]()),l=0,c=t.length;l<c;++l){r=t[l];let h=r&&this.getDatasetMeta(r.datasetIndex).controller;h&&h[o+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){let i=this._active||[],s=t.map(({datasetIndex:a,index:r})=>{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}});!Ee(s,i)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,i))}notifyPlugins(t,i,s){return this._plugins.notify(this,t,i,s)}isPluginEnabled(t){return this._plugins._cache.filter(i=>i.plugin.id===t).length===1}_updateHoverStyles(t,i,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(i,t),l=s?t:a(t,i);r.length&&this.updateHoverStyle(r,o.mode,!1),l.length&&o.mode&&this.updateHoverStyle(l,o.mode,!0)}_eventHandler(t,i){let s={event:t,replay:i,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,i,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,o),(a||s.changed)&&this.render(),this}_handleEvent(t,i,s){let{_active:o=[],options:a}=this,r=i,l=this._getActiveElements(t,o,s,r),c=Ws(t),h=Ic(t,this._lastEvent,s,c);s&&(this._lastEvent=null,V(a.onHover,[t,l,this],this),c&&V(a.onClick,[t,l,this],this));let d=!Ee(l,o);return(d||i)&&(this._active=l,this._updateHoverStyles(l,o,i)),this._lastEvent=h,d}_getActiveElements(t,i,s,o){if(t.type==="mouseout")return[];if(!s)return i;let a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,o)}}return n})();function Wo(){return z(St.instances,n=>n._plugins.invalidate())}function zc(n,e,t){let{startAngle:i,pixelMargin:s,x:o,y:a,outerRadius:r,innerRadius:l}=e,c=s/r;n.beginPath(),n.arc(o,a,r,i-c,t+c),l>s?(c=s/l,n.arc(o,a,l,t+c,i-c,!0)):n.arc(o,a,s,t+Y,i-Y),n.closePath(),n.clip()}function Bc(n){return mn(n,["outerStart","outerEnd","innerStart","innerEnd"])}function Vc(n,e,t,i){let s=Bc(n.options.borderRadius),o=(t-e)/2,a=Math.min(o,i*e/2),r=l=>{let c=(t-Math.min(o,l))*i/2;return q(l,0,Math.min(o,c))};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:q(s.innerStart,0,a),innerEnd:q(s.innerEnd,0,a)}}function me(n,e,t,i){return{x:t+n*Math.cos(e),y:i+n*Math.sin(e)}}function Ln(n,e,t,i,s,o){let{x:a,y:r,startAngle:l,pixelMargin:c,innerRadius:h}=e,d=Math.max(e.outerRadius+i+t-c,0),u=h>0?h+i+t+c:0,f=0,g=s-l;if(i){let B=h>0?h-i:0,U=d>0?d-i:0,X=(B+U)/2,dt=X!==0?g*X/(X+i):g;f=(g-dt)/2}let p=Math.max(.001,g*d-t/N)/d,m=(g-p)/2,_=l+m+f,b=s-m-f,{outerStart:y,outerEnd:v,innerStart:x,innerEnd:C}=Vc(e,u,d,b-_),S=d-y,w=d-v,P=_+y/S,A=b-v/w,O=u+x,F=u+C,Z=_+x/O,lt=b-C/F;if(n.beginPath(),o){let B=(P+A)/2;if(n.arc(a,r,d,P,B),n.arc(a,r,d,B,A),v>0){let et=me(w,A,a,r);n.arc(et.x,et.y,v,A,b+Y)}let U=me(F,b,a,r);if(n.lineTo(U.x,U.y),C>0){let et=me(F,lt,a,r);
vendor: 6,702 bytes, line 1
1n.arc(et.x,et.y,C,b+Y,lt+Math.PI)}let X=(b-C/u+(_+x/u))/2;if(n.arc(a,r,u,b-C/u,X,!0),n.arc(a,r,u,X,_+x/u,!0),x>0){let et=me(O,Z,a,r);n.arc(et.x,et.y,x,Z+Math.PI,_-Y)}let dt=me(S,_,a,r);if(n.lineTo(dt.x,dt.y),y>0){let et=me(S,P,a,r);n.arc(et.x,et.y,y,_-Y,P)}}else{n.moveTo(a,r);let B=Math.cos(P)*d+a,U=Math.sin(P)*d+r;n.lineTo(B,U);let X=Math.cos(A)*d+a,dt=Math.sin(A)*d+r;n.lineTo(X,dt)}n.closePath()}function Hc(n,e,t,i,s){let{fullCircles:o,startAngle:a,circumference:r}=e,l=e.endAngle;if(o){Ln(n,e,t,i,l,s);for(let c=0;c<o;++c)n.fill();isNaN(r)||(l=a+(r%W||W))}return Ln(n,e,t,i,l,s),n.fill(),l}function Nc(n,e,t,i,s){let{fullCircles:o,startAngle:a,circumference:r,options:l}=e,{borderWidth:c,borderJoinStyle:h,borderDash:d,borderDashOffset:u}=l,f=l.borderAlign==="inner";if(!c)return;n.setLineDash(d||[]),n.lineDashOffset=u,f?(n.lineWidth=c*2,n.lineJoin=h||"round"):(n.lineWidth=c,n.lineJoin=h||"bevel");let g=e.endAngle;if(o){Ln(n,e,t,i,g,s);for(let p=0;p<o;++p)n.stroke();isNaN(r)||(g=a+(r%W||W))}f&&zc(n,e,g),o||(Ln(n,e,t,i,g,s),n.stroke())}var Ni=class extends mt{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="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,i){let s=this.getProps(["x","y"],i),{angle:o,distance:a}=Jn(s,{x:e,y:t}),{startAngle:r,endAngle:l,innerRadius:c,outerRadius:h,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=(this.options.spacing+this.options.borderWidth)/2,f=D(d,l-r),g=ue(o,r,l)&&r!==l,p=f>=W||g,m=vt(a,c+u,h+u);return p&&m}getCenterPoint(e){let{x:t,y:i,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:i+Math.sin(h)*d}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){let{options:t,circumference:i}=this,s=(t.offset||0)/4,o=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=i>W?Math.floor(i/W):0,i===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(N,i||0)),c=s*l;e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,Hc(e,this,c,o,a),Nc(e,this,c,o,a),e.restore()}};function ka(n,e,t=e){n.lineCap=D(t.borderCapStyle,e.borderCapStyle),n.setLineDash(D(t.borderDash,e.borderDash)),n.lineDashOffset=D(t.borderDashOffset,e.borderDashOffset),n.lineJoin=D(t.borderJoinStyle,e.borderJoinStyle),n.lineWidth=D(t.borderWidth,e.borderWidth),n.strokeStyle=D(t.borderColor,e.borderColor)}function Wc(n,e,t){n.lineTo(t.x,t.y)}function jc(n){return n.stepped?to:n.tension||n.cubicInterpolationMode==="monotone"?eo:Wc}function Pa(n,e,t={}){let i=n.length,{start:s=0,end:o=i-1}=t,{start:a,end:r}=e,l=Math.max(s,a),c=Math.min(o,r),h=s<a&&o<a||s>r&&o>r;return{count:i,start:l,loop:e.loop,ilen:c<l&&!h?i+c-l:c-l}}function Uc(n,e,t,i){let{points:s,options:o}=e,{count:a,start:r,loop:l,ilen:c}=Pa(s,t,i),h=jc(o),{move:d=!0,reverse:u}=i||{},f,g,p;for(f=0;f<=c;++f)g=s[(r+(u?c-f:f))%a],!g.skip&&(d?(n.moveTo(g.x,g.y),d=!1):h(n,p,g,u,o.stepped),p=g);return l&&(g=s[(r+(u?c:0))%a],h(n,p,g,u,o.stepped)),!!l}function $c(n,e,t,i){let s=e.points,{count:o,start:a,ilen:r}=Pa(s,t,i),{move:l=!0,reverse:c}=i||{},h=0,d=0,u,f,g,p,m,_,b=v=>(a+(c?r-v:v))%o,y=()=>{p!==m&&(n.lineTo(h,m),n.lineTo(h,p),n.lineTo(h,_))};for(l&&(f=s[b(0)],n.moveTo(f.x,f.y)),u=0;u<=r;++u){if(f=s[b(u)],f.skip)continue;let v=f.x,x=f.y,C=v|0;C===g?(x<p?p=x:x>m&&(m=x),h=(d*h+v)/++d):(y(),n.lineTo(v,x),g=C,d=0,p=m=x),_=x}y()}function Wi(n){let e=n.options,t=e.borderDash&&e.borderDash.length;return!n._decimated&&!n._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!t?$c:Uc}function Yc(n){return n.stepped?ho:n.tension||n.cubicInterpolationMode==="monotone"?uo:Ft}function Xc(n,e,t,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,t,i)&&s.closePath()),ka(n,e.options),n.stroke(s)}function Gc(n,e,t,i){let{segments:s,options:o}=e,a=Wi(e);for(let r of s)ka(n,o,r.style),n.beginPath(),a(n,e,r,{start:t,end:t+i-1})&&n.closePath(),n.stroke()}var Kc=typeof Path2D=="function";function qc(n,e,t,i){Kc&&!e.options.segment?Xc(n,e,t,i):Gc(n,e,t,i)}var Fn=(()=>{class n extends mt{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,i){let s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){let o=s.spanGaps?this._loop:this._fullLoop;ro(this._points,s,t,o,i),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=go(this,this.options.segment))}first(){let t=this.segments,i=this.points;return t.length&&i[t[0].start]}last(){let t=this.segments,i=this.points,s=t.length;return s&&i[t[s-1].end]}interpolate(t,i){let s=this.options,o=t[i],a=this.points,r=yi(this,{property:i,start:o,end:o});if(!r.length)return;let l=[],c=Yc(s),h,d;for(h=0,d=r.length;h<d;++h){let{start:u,end:f}=r[h],g=a[u],p=a[f];if(g===p){l.push(g);continue}let m=Math.abs((o-g[i])/(p[i]-g[i])),_=c(g,p,m,s.stepped);_[i]=t[i],l.push(_)}return l.length===1?l[0]:l}pathSegment(t,i,s){return Wi(this)(t,this,i,s)}path(t,i,s){let o=this.segments,a=Wi(this),r=this._loop;i=i||0,s=s||this.points.length-i;for(let l of o)r&=a(t,this,l,{start:i,end:i+s-1});return!!r}draw(t,i,s,o){let a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),qc(t,this,s,o),t.restore(
1)),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}return n})();function jo(n,e,t,i){let s=n.options,{[t]:o}=n.getProps([t],i);return Math.abs(e-o)<s.radius+s.hitRadius}var Qc=(()=>{class n extends mt{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,i,s){let o=this.options,{x:a,y:r}=this.getProps(["x","y"],s);return Math.pow(t-a,2)+Math.pow(i-r,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(t,i){return jo(this,t,"x",i)}inYRange(t,i){return jo(this,t,"y",i)}getCenterPoint(t){let{x:i,y:s}=this.getProps(["x","y"],t);return{x:i,y:s}}size(t){t=t||this.options||{};let i=t.radius||0;i=Math.max(i,i&&t.hoverRadius||0);let s=i&&t.borderWidth||0;return(i+s)*2}draw(t,i){let s=this.options;this.skip||s.radius<.1||!xt(this,i,this.size(s)/2)||(t.strokeStyle=s.borderColor,t.lineWidth=s.borderWidth,t.fillStyle=s.backgroundColor,pn(t,s,this.x,this.y))}getRange(){let t=this.options||{};return t.radius+t.hitRadius}}return n})();function Da(n,e){let{x:t,y:i,base:s,width:o,height:a}=n.getProps(["x","y","base","width","height"],e),r,l,c,h,d;return n.horizontal?(d=a/2,r=Math.min(t,s),l=Math.max(t,s),c=i-d,h=i+d):(d=o/2,r=t-d,l=t+d,c=Math.min(i,s),h=Math.max(i,s)),{left:r,top:c,right:l,bottom:h}}function Wt(n,e,t,i){return n?0:q(e,t,i)}function Zc(n,e,t){let i=n.options.borderWidth,s=n.borderSkipped,o=hi(i);return{t:Wt(s.top,o.top,0,t),r:Wt(s.right,o.right,0,e),b:Wt(s.bottom,o.bottom,0,t),l:Wt(s.left,o.left,0,e)}}function Jc(n,e,t){let{enableBorderRadius:i}=n.getProps(["enableBorderRadius"]),s=n.options.borderRadius,o=Ht(s),a=Math.min(e,t),r=n.borderSkipped,l=i||I(s);return{topLeft:Wt(!l||r.top||r.left,o.topLeft,0,a),topRight:Wt(!l||r.top||r.right,o.topRight,0,a),bottomLeft:Wt(!l||r.bottom||r.left,o.bottomLeft,0,a),bottomRight:Wt(!l||r.bottom||r.right,o.bottomRight,0,a)}}function th(n){let e=Da(n),t=e.right-e.left,i=e.bottom-e.top,s=Zc(n,t/2,i/2),o=Jc(n,t/2,i/2);return{outer:{x:e.left,y:e.top,w:t,h:i,radius:o},inner:{x:e.left+s.l,y:e.top+s.t,w:t-s.l-s.r,h:i-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function Di(n,e,t,i){let s=e===null,o=t===null,r=n&&!(s&&o)&&Da(n,i);return r&&(s||vt(e,r.left,r.right))&&(o||vt(t,r.top,r.bottom))}function eh(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function nh(n,e){n.rect(e.x,e.y,e.w,e.h)}function Oi(n,e,t={}){let i=n.x!==t.x?-e:0,s=n.y!==t.y?-e:0,o=(n.x+n.w!==t.x+t.w?e:0)-i,a=(n.y+n.h!==t.y+t.h?e:0)-s;return{x:n.x+i,y:n.y+s,w:n.w+o,h:n.h+a,radius:n.radius}}var ji=class extends mt{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){let{inflateAmount:t,options:{borderColor:i,backgroundColor:s}}=this,{inner:o,outer:a}=th(this),r=eh(a.radius)?ge:nh;e.save(),(a.w!==o.w||a.h!==o.h)&&(e.beginPath(),r(e,Oi(a,t,o)),e.clip(),r(e,Oi(o,-t,a)),e.fillStyle=i,e.fill("evenodd")),e.beginPath(),r(e,Oi(o,t)),e.fillStyle=s,e.fill(),e.restore()}inRange(e,t,i){return Di(this,e,t,i)}inXRange(e,t){return Di(this,e,null,t)}inYRange(e,t){return Di(this,null,e,t)}getCenterPoint(e){let{x:t,y:i,base:s,horizontal:o}=this.getProps(["x","y","base","horizontal"],e);return{x:o?(t+s)/2:t,y:o?i:(i+s)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}},ih=Object.freeze({__proto__:null,ArcElement:Ni,BarElement:ji,LineElement:Fn,PointElement:Qc}),Ui=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Uo=Ui.map(n=>n.replace("rgb(","rgba(").replace(")",", 0.5)"));function Oa(n){return Ui[n%Ui.length]}function Aa(n){return Uo[n%Uo.length]}function sh(n,e){return n.borderColor=Oa(e),n.backgroundColor=Aa(e),++e}function oh(n,e){return n.backgroundColor=n.data.map(()=>Oa(e++)),e}function ah(n,e){return n.backgroundColor=n.data.map(()=>Aa(e++)),e}function rh(n){let e=0;return(t,i)=>{let s=n.getDatasetMeta(i).controller;s instanceof Zi?e=oh(t,e):s instanceof ba?e=ah(t,e):s&&(e=sh(t,e))}}function $o(n){let e;for(e in n)if(n[e].borderColor||n[e].backgroundColor)return!0;return!1}function lh(n){return n&&(n.borderColor||n.backgroundColor)}function ch(){return j.borderColor!=="rgba(0,0,0,0.1)"||j.backgroundColor!=="rgba(0,0,0,0.1)"}
1var hh={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(n,e,t){if(!t.enabled)return;let{data:{datasets:i},options:s}=n.config,{elements:o}=s,a=$o(i)||lh(s)||o&&$o(o)||ch();if(!t.forceOverride&&a)return;let r=rh(n);i.forEach(r)}};function dh(n,e,t,i,s){let o=s.samples||i;if(o>=t)return n.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++]=n[h],d=0;d<o-2;d++){let m=0,_=0,b,y=Math.floor((d+1)*r)+1+e,v=Math.min(Math.floor((d+2)*r)+1,t)+e,x=v-y;for(b=y;b<v;b++)m+=n[b].x,_+=n[b].y;m/=x,_/=x;let C=Math.floor(d*r)+1+e,S=Math.min(Math.floor((d+1)*r)+1,t)+e,{x:w,y:P}=n[h];for(f=g=-1,b=C;b<S;b++)g=.5*Math.abs((w-m)*(n[b].y-P)-(w-n[b].x)*(_-P)),g>f&&(f=g,u=n[b],p=b);a[l++]=u,h=p}return a[l++]=n[c],a}function uh(n,e,t,i){let s=0,o=0,a,r,l,c,h,d,u,f,g,p,m=[],_=e+t-1,b=n[e].x,v=n[_].x-b;for(a=e;a<e+t;++a){r=n[a],l=(r.x-b)/v*i,c=r.y;let x=l|0;if(x===h)c<g?(g=c,d=a):c>p&&(p=c,u=a),s=(o*s+r.x)/++o;else{let C=a-1;if(!R(d)&&!R(u)){let S=Math.min(d,u),w=Math.max(d,u);S!==f&&S!==C&&m.push(qe(Ke({},n[S]),{x:s})),w!==f&&w!==C&&m.push(qe(Ke({},n[w]),{x:s}))}a>0&&C!==f&&m.push(n[C]),m.push(r),h=x,o=0,g=p=c,d=u=f=a}}return m}function Ta(n){if(n._decimated){let e=n._data;delete n._decimated,delete n._data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function Yo(n){n.data.datasets.forEach(e=>{Ta(e)})}function fh(n,e){let t=e.length,i=0,s,{iScale:o}=n,{min:a,max:r,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(i=q(_t(e,o.axis,a).lo,0,t-1)),c?s=q(_t(e,o.axis,r).hi+1,i,t)-i:s=t-i,{start:i,count:s}}var gh={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(n,e,t)=>{if(!t.enabled){Yo(n);return}let i=n.width;n.data.datasets.forEach((s,o)=>{let{_data:a,indexAxis:r}=s,l=n.getDatasetMeta(o),c=a||s.data;if(pe([r,n.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;let h=n.scales[l.xAxisID];if(h.type!=="linear"&&h.type!=="time"||n.options.parsing)return;let{start:d,count:u}=fh(l,c),f=t.threshold||4*i;if(u<=f){Ta(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=dh(c,d,u,i,t);break;case"min-max":g=uh(c,d,u,i);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`)}s._decimated=g})},destroy(n){Yo(n)}};function ph(n,e,t){let i=n.segments,s=n.points,o=e.points,a=[];for(let r of i){let{start:l,end:c}=r;c=Ji(l,c,s);let h=$i(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=yi(e,h);for(let u of d){let f=$i(t,o[u.start],o[u.end],u.loop),g=xi(r,s,f);for(let p of g)a.push({source:p,target:u,start:{[t]:Xo(h,f,"start",Math.max)},end:{[t]:Xo(h,f,"end",Math.min)}})}}return a}function $i(n,e,t,i){if(i)return;let s=e[n],o=t[n];return n==="angle"&&(s=st(s),o=st(o)),{property:n,start:s,end:o}}function mh(n,e){let{x:t=null,y:i=null}=n||{},s=e.points,o=[];return e.segments.forEach(({start:a,end:r})=>{r=Ji(a,r,s);let l=s[a],c=s[r];i!==null?(o.push({x:l.x,y:i}),o.push({x:c.x,y:i})):t!==null&&(o.push({x:t,y:l.y}),o.push({x:t,y:c.y}))}),o}function Ji(n,e,t){for(;e>n;e--){let i=t[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function Xo(n,e,t,i){return n&&e?i(n[t],e[t]):n?n[t]:e?e[t]:0}function Ea(n,e){let t=[],i=!1;return H(n)?(i=!0,t=n):t=mh(n,e),t.length?new Fn({points:t,options:{tension:0},_loop:i,_fullLoop:i}):null}function Go(n){return n&&n.fill!==!1}function bh(n,e,t){let s=n[e].fill,o=[e],a;if(!t)return s;for(;s!==!1&&o.indexOf(s)===-1;){if(!$(s))return s;if(a=n[s],!a)return!1;if(a.visible)return s;o.push(s),s=a.fill}return!1}function _h(n,e,t){let i=Ch(n);if(I(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return $(s)&&Math.floor(s)===s?xh(i[0],e,s,t):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function xh(n,e,t,i){return(n==="-"||n==="+")&&(t=e+t),t===e||t<0||t>=i?!1:t}function yh(n,e){let t=null;return n==="start"?t=e.bottom:n==="end"?t=e.top:I(n)?t=e.getPixelForValue(n.value):e.getBasePixel&&(t=e.getBasePixel()),t}function vh(n,e,t){let i;return n==="start"?i=t:n==="end"?i=e.options.reverse?e.min:e.max:I(n)?i=n.value:i=e.getBaseValue(),i}function Ch(n){let e=n.options,t=e.fill,i=D(t&&t.target,t);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function wh(n){let{scale:e,index:t,line:i}=n,s=[],o=i.segments,a=i.points,r=Sh(e,t);r.push(Ea({x:null,y:e.bottom},i));for(let l=0;l<o.length;l++){let c=o[l];for(let h=c.start;h<=c.end;h++)Mh(s,a[h],r)}return new Fn({points:s,options:{}})}function Sh(n,e){let t=[],i=n.getMatchingVisibleMetas("line");for(let s=0;s<i.length;s++){let o=i[s];if(o.index===e)break;o.hidden||t.unshift(o.dataset)}return t}function Mh(n,e,t){let i=[];for(let s=0;s<t.length;s++){let o=t[s],{first:a,last:r,point:l}=kh(o,e,"x");if(!(!l||a&&r)){if(a)i.unshift(l);else if(n.push(l),!r)break}}n.push(...i)}function kh(n,e,t){let i=n.interpolate(e,t);if(!i)return{};let s=i[t],o=n.segments,a=n.points,r=!1,l=!1;for(let c=0;c<o.length;c++){let h=o[c],d=a[h.start][t],u=a[h.end][t];if(vt(s,d,u)){r=s===d,l=s===u;break}}return{first:r,last:l,point:i}}var Rn=class{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,t,i){let{x:s,y:o,radius:a}=this;return t=t||{start:0,end:W},e.arc(s,o,a,t.end,t.start,!0),!i.bounds}interpolate(e){let{x:t,y:i,radius:s}=this,o=e.angle;return{x:t+Math.cos(o)*s,y:i+Math.sin(o)*s,angle:o}}};function Ph(n){let{chart:e,fill:t,line:i}=n;if($(t))return Dh(e,t);if(t==="stack")return wh(n);if(t==="shape")return!0;let s=Oh(n);return s instanceof Rn?s:Ea(s,i)}function Dh(n,e){let t=n.getDatasetMeta(e);return t&&n.isDatasetVisible(e)?t.dataset:null}function Oh(n){return(n.scale||{}).getPointPositionForValue?Th(n):Ah(n)}function Ah(n){let{scale:e={},fill:t}=n,i=yh(t,e);if($(i)){let s=e.isHorizontal();return{x:s?i:null,y:s?null:i}}return null}function Th(n){let{scale:e,fill:t}=n,i=e.options,s=e.getLabels().length,o=i.reverse?e.max:e.min,a=vh(t,e,o),r=[];if(i.grid.circular){let l=e.getPointPositionForValue(0,o);return new Rn({x:l.x,y:l.y,radius:e.getDistanceFromCenterForValue(a)})}for(let l=0;l<s;++l)r.push(e.getPointPositionForValue(l,a));return r}function Ai(n,e,t){let i=Ph(e),{line:s,scale:o,axis:a}=e,r=s.options,l=r.fill,c=r.backgroundColor,{above:h=c,below:d=c}
vendor: 4,205 bytes, line 1
1=l||{};i&&s.points.length&&(Re(n,t),Eh(n,{line:s,target:i,above:h,below:d,area:t,scale:o,axis:a}),Ie(n))}function Eh(n,e){let{line:t,target:i,above:s,below:o,area:a,scale:r}=e,l=t._loop?"angle":e.axis;n.save(),l==="x"&&o!==s&&(Ko(n,i,a.top),qo(n,{line:t,target:i,color:s,scale:r,property:l}),n.restore(),n.save(),Ko(n,i,a.bottom)),qo(n,{line:t,target:i,color:o,scale:r,property:l}),n.restore()}function Ko(n,e,t){let{segments:i,points:s}=e,o=!0,a=!1;n.beginPath();for(let r of i){let{start:l,end:c}=r,h=s[l],d=s[Ji(l,c,s)];o?(n.moveTo(h.x,h.y),o=!1):(n.lineTo(h.x,t),n.lineTo(h.x,h.y)),a=!!e.pathSegment(n,r,{move:a}),a?n.closePath():n.lineTo(d.x,t)}n.lineTo(e.first().x,t),n.closePath(),n.clip()}function qo(n,e){let{line:t,target:i,property:s,color:o,scale:a}=e,r=ph(t,i,s);for(let{source:l,target:c,start:h,end:d}of r){let{style:{backgroundColor:u=o}={}}=l,f=i!==!0;n.save(),n.fillStyle=u,Lh(n,a,f&&$i(s,h,d)),n.beginPath();let g=!!t.pathSegment(n,l),p;if(f){g?n.closePath():Qo(n,i,d,s);let m=!!i.pathSegment(n,c,{move:g,reverse:!0});p=g&&m,p||Qo(n,i,h,s)}n.closePath(),n.fill(p?"evenodd":"nonzero"),n.restore()}}function Lh(n,e,t){let{top:i,bottom:s}=e.chart.chartArea,{property:o,start:a,end:r}=t||{};o==="x"&&(n.beginPath(),n.rect(a,i,r-a,s-i),n.clip())}function Qo(n,e,t,i){let s=e.interpolate(t,i);s&&n.lineTo(s.x,s.y)}var Rh={id:"filler",afterDatasetsUpdate(n,e,t){let i=(n.data.datasets||[]).length,s=[],o,a,r,l;for(a=0;a<i;++a)o=n.getDatasetMeta(a),r=o.dataset,l=null,r&&r.options&&r instanceof Fn&&(l={visible:n.isDatasetVisible(a),index:a,fill:_h(r,a,i),chart:n,axis:o.controller.options.indexAxis,scale:o.vScale,line:r}),o.$filler=l,s.push(l);for(a=0;a<i;++a)l=s[a],!(!l||l.fill===!1)&&(l.fill=bh(s,a,t.propagate))},beforeDraw(n,e,t){let i=t.drawTime==="beforeDraw",s=n.getSortedVisibleDatasetMetas(),o=n.chartArea;for(let a=s.length-1;a>=0;--a){let r=s[a].$filler;r&&(r.line.updateControlPoints(o,r.axis),i&&r.fill&&Ai(n.ctx,r,o))}},beforeDatasetsDraw(n,e,t){if(t.drawTime!=="beforeDatasetsDraw")return;let i=n.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){let o=i[s].$filler;Go(o)&&Ai(n.ctx,o,n.chartArea)}},beforeDatasetDraw(n,e,t){let i=e.meta.$filler;!Go(i)||t.drawTime!=="beforeDatasetDraw"||Ai(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},Zo=(n,e)=>{let{boxHeight:t=e,boxWidth:i=e}=n;return n.usePointStyle&&(t=Math.min(t,e),i=n.pointStyleWidth||Math.min(i,e)),{boxWidth:i,boxHeight:t,itemHeight:Math.max(e,t)}},Ih=(n,e)=>n!==null&&e!==null&&n.datasetIndex===e.datasetIndex&&n.index===e.index,In=class extends mt{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,i){this.maxWidth=e,this.maxHeight=t,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let e=this.options.labels||{},t=V(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter(i=>e.filter(i,this.chart.data))),e.sort&&(t=t.sort((i,s)=>e.sort(i,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 i=e.labels,s=K(i.font),o=s.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=Zo(i,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,i,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;
vendor: 5,944 bytes, line 1
1return this.legendItems.forEach((g,p)=>{let m=i+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,i,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,_)=>{let{itemWidth:b,itemHeight:y}=Fh(i,t,o,m,s);_>0&&f+y+2*r>h&&(d+=u+r,c.push({width:u,height:f}),g+=u+r,p++,u=f=0),l[_]={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:i,labels:{padding:s},rtl:o}}=this,a=Qt(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=J(i,this.left+s,this.right-this.lineWidths[r]);for(let c of t)r!==c.row&&(r=c.row,l=J(i,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=J(i,this.top+e+s,this.bottom-this.columnSizes[r].height);for(let c of t)c.col!==r&&(r=c.col,l=J(i,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;Re(e,this),this._draw(),Ie(e)}}_draw(){let{options:e,columnSizes:t,lineWidths:i,ctx:s}=this,{align:o,labels:a}=e,r=j.color,l=Qt(e.rtl,this.left,this.width),c=K(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}=Zo(a,d),_=function(C,S,w){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;s.save();let P=D(w.lineWidth,1);if(s.fillStyle=D(w.fillStyle,r),s.lineCap=D(w.lineCap,"butt"),s.lineDashOffset=D(w.lineDashOffset,0),s.lineJoin=D(w.lineJoin,"miter"),s.lineWidth=P,s.strokeStyle=D(w.strokeStyle,r),s.setLineDash(D(w.lineDash,[])),a.usePointStyle){let A={radius:p*Math.SQRT2/2,pointStyle:w.pointStyle,rotation:w.rotation,borderWidth:P},O=l.xPlus(C,g/2),F=S+u;ci(s,A,O,F,a.pointStyleWidth&&g)}else{let A=S+Math.max((d-p)/2,0),O=l.leftForLtr(C,g),F=Ht(w.borderRadius);s.beginPath(),Object.values(F).some(Z=>Z!==0)?ge(s,{x:O,y:A,w:g,h:p,radius:F}):s.rect(O,A,g,p),s.fill(),P!==0&&s.stroke()}s.restore()},b=function(C,S,w){Vt(s,w.text,C,S+m/2,c,{strikethrough:w.hidden,textAlign:l.textAlign(w.textAlign)})},y=this.isHorizontal(),v=this._computeTitleHeight();y?f={x:J(o,this.left+h,this.right-i[0]),y:this.top+h+v,line:0}:f={x:this.left+h,y:J(o,this.top+v+h,this.bottom-t[0].height),line:0},bi(this.ctx,e.textDirection);let x=m+h;this.legendItems.forEach((C,S)=>{s.strokeStyle=C.fontColor,s.fillStyle=C.fontColor;let w=s.measureText(C.text).width,P=l.textAlign(C.textAlign||(C.textAlign=a.textAlign)),A=g+u+w,O=f.x,F=f.y;l.setWidth(this.width),y?S>0&&O+A+h>this.right&&(F=f.y+=x,f.line++,O=f.x=J(o,this.left+h,this.right-i[f.line])):S>0&&F+x>this.bottom&&(O=f.x=O+t[f.line].width+h,f.line++,F=f.y=J(o,this.top+v+h,this.bottom-t[f.line].height));let Z=l.x(O);if(_(Z,F,C),O=Qs(P,O+g+u,y?O+A:this.right,e.rtl),b(l.x(O),F,C),y)f.x+=A+h;else if(typeof C.text!="string"){let lt=c.lineHeight;f.y+=La(C,lt)+h}else f.y+=x}),_i(this.ctx,e.textDirection)}drawTitle(){let e=this.options,t=e.title,i=K(t.font),s=tt(t.padding);if(!t.display)return;let o=Qt(e.rtl,this.left,this.width),a=this.ctx,r=t.position,l=i.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=J(e.align,d,this.right-u);else{let g=this.columnSizes.reduce((p,m)=>Math.max(p,m.height),0);h=c+J(e.align,this.top,this.bottom-g-e.labels.padding-this._computeTitleHeight())}let f=J(r,d,d+u);a.textAlign=o.textAlign(fn(r)),a.textBaseline="middle",a.strokeStyle=t.color,a.fillStyle=t.color,a.font=i.string,Vt(a,t.text,f,h,i)}_computeTitleHeight(){let e=this.options.title,t=K(e.font),i=tt(e.padding);return e.display?t.lineHeight+i.height:0}_getLegendItemAt(e,t){let i,s,o;if(vt(e,this.left,this.right)&&vt(t,this.top,this.bottom)){for(o=this.legendHitBoxes,i=0;i<o.length;++i)if(s=o[i],vt(e,s.left,s.left+s.width)&&vt(t,s.top,s.top+s.height))return this.legendItems[i]}return null}handleEvent(e){let t=this.options;if(!Vh(e.type,t))return;let i=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){let s=this._hoveredItem,o=Ih(s,i);s&&!o&&V(t.onLeave,[e,s,this],this),this._hoveredItem=i,i&&!o&&V(t.onHover,[e,i,this],this)}else i&&V(t.onClick,[e,i,this],this)}};function Fh(n,e,t,i,s){let o=zh(i,n,e,t),a=Bh(s,i,e.lineHeight);return{itemWidth:o,itemHeight:a}}function zh(n,e,t,i){let s=n.text;return s&&typeof s!="string"&&(s=s.reduce((o,a)=>o.length>a.length?o:a)),e+t.size/2+i.measureText(s).width}function Bh(n,e,t){let i=n;return typeof e.text!="string"&&(i=La(e,t)),i}function La(n,e){let t=n.text?n.text.length:0;return e*t}function Vh(n,e){return!!((n==="mousemove"||n==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(n==="click"||n==="mouseup"))}var Hh={id:"legend",_element:In,start(n,e,t){let i=n.legend=new In({ctx:n.ctx,options:t,chart:n});nt.configure(n,i,t),nt.addBox(n,i)},stop(n){nt.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,e,t){let i=n.legend;nt.configure(n,i,t),i.options=t},afterUpdate(n){let e=n.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(n,e){e.replay||n.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(n,e,t){let i=e.datasetIndex,s=t.chart;s.isDatasetVisible(i)?(s.hide(i),e.hidden=!0):(s.show(i),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:n=>n.chart.options.color,boxWidth:40,padding:10,generateLabels(n){let e=n.data.datasets,{labels:{usePointStyle:t,pointStyle:i,textAlign:s,color:o,useBorderRadius:a,borderRadius:r}}=n.legend.options;
vendor: 4,568 bytes, lines 1-3
1return n._getSortedDatasetMetas().map(l=>{let c=l.controller.getStyle(t?0:void 0),h=tt(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:i||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:a&&(r||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:n=>n.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:n=>!n.startsWith("on"),labels:{_scriptable:n=>!["generateLabels","filter","sort"].includes(n)}}},Ue=class extends mt{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 i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=t;let s=H(i.text)?i.text.length:1;this._padding=tt(i.padding);let o=s*K(i.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:i,bottom:s,right:o,options:a}=this,r=a.align,l=0,c,h,d;return this.isHorizontal()?(h=J(r,i,o),d=t+e,c=o-i):(a.position==="left"?(h=i+e,d=J(r,s,t),l=N*-.5):(h=o-e,d=J(r,t,s),l=N*.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 i=K(t.font),o=i.lineHeight/2+this._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=this._drawArgs(o);Vt(e,t.text,0,0,i,{color:t.color,maxWidth:l,rotation:c,textAlign:fn(t.align),textBaseline:"middle",translation:[a,r]})}};function Nh(n,e){let t=new Ue({ctx:n.ctx,options:e,chart:n});nt.configure(n,t,e),nt.addBox(n,t),n.titleBlock=t}var Wh={id:"title",_element:Ue,start(n,e,t){Nh(n,t)},stop(n){let e=n.titleBlock;nt.removeBox(n,e),delete n.titleBlock},beforeUpdate(n,e,t){let i=n.titleBlock;nt.configure(n,i,t),i.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}},Mn=new WeakMap,jh={id:"subtitle",start(n,e,t){let i=new Ue({ctx:n.ctx,options:t,chart:n});nt.configure(n,i,t),nt.addBox(n,i),Mn.set(n,i)},stop(n){nt.removeBox(n,Mn.get(n)),Mn.delete(n)},beforeUpdate(n,e,t){let i=Mn.get(n);nt.configure(n,i,t),i.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}},We={average(n){if(!n.length)return!1;let e,t,i=new Set,s=0,o=0;for(e=0,t=n.length;e<t;++e){let r=n[e].element;if(r&&r.hasValue()){let l=r.tooltipPosition();i.add(l.x),s+=l.y,++o}}return o===0||i.size===0?!1:{x:[...i].reduce((r,l)=>r+l)/i.size,y:s/o}},nearest(n,e){if(!n.length)return!1;let t=e.x,i=e.y,s=Number.POSITIVE_INFINITY,o,a,r;for(o=0,a=n.length;o<a;++o){let l=n[o].element;if(l&&l.hasValue()){let c=l.getCenterPoint(),h=ln(e,c);h<s&&(s=h,r=l)}}if(r){let l=r.tooltipPosition();t=l.x,i=l.y}return{x:t,y:i}}};function Ct(n,e){return e&&(H(e)?Array.prototype.push.apply(n,e):n.push(e)),n}function Et(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(` 2`)>-1?n.split(` 3`):n}function Uh(n,e){let{element:t,datasetIndex:i,index:s}=e,o=n.getDatasetMeta(i).controller,{label:a,value:r}=o.getLabelAndValue(s);return{chart:n,label:a,parsed:o.getParsed(s),raw:n.data.datasets[i].data[s],formattedValue:r,dataset:o.getDataset(),dataIndex:s,datasetIndex:i,element:t}}function Jo(n,e){let t=n.chart.ctx,{body:i,footer:s,title:o}=n,{boxWidth:a,boxHeight:r}=e,l=K(e.bodyFont),c=K(e.titleFont),h=K(e.footerFont),d=o.length,u=s.length,f=i.length,g=tt(e.padding),p=g.height,m=0,_=i.reduce((v,x)=>v+x.before.length+x.lines.length+x.after.length,0);if(_+=n.beforeBody.length+n.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),_){let v=e.displayColors?Math.max(r,l.lineHeight):l.lineHeight;p+=f*v+(_-f)*l.lineHeight+(_-1)*e.bodySpacing}u&&(p+=e.footerMarginTop+u*h.lineHeight+(u-1)*e.footerSpacing);let b=0,y=function(v){m=Math.max(m,t.measureText(v).width+b)};return t.save(),t.font=c.string,z(n.title,y),t.font=l.string,z(n.beforeBody.concat(n.afterBody),y),b=e.dis
vendor: 12,688 bytes, line 3
3playColors?a+2+e.boxPadding:0,z(i,v=>{z(v.before,y),z(v.lines,y),z(v.after,y)}),b=0,t.font=h.string,z(n.footer,y),t.restore(),m+=g.width,{width:m,height:p}}function $h(n,e){let{y:t,height:i}=e;return t<i/2?"top":t>n.height-i/2?"bottom":"center"}function Yh(n,e,t,i){let{x:s,width:o}=i,a=t.caretSize+t.caretPadding;if(n==="left"&&s+o+a>e.width||n==="right"&&s-o-a<0)return!0}function Xh(n,e,t,i){let{x:s,width:o}=t,{width:a,chartArea:{left:r,right:l}}=n,c="center";return i==="center"?c=s<=(r+l)/2?"left":"right":s<=o/2?c="left":s>=a-o/2&&(c="right"),Yh(c,n,e,t)&&(c="center"),c}function ta(n,e,t){let i=t.yAlign||e.yAlign||$h(n,t);return{xAlign:t.xAlign||e.xAlign||Xh(n,e,t,i),yAlign:i}}function Gh(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function Kh(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function ea(n,e,t,i){let{caretSize:s,caretPadding:o,cornerRadius:a}=n,{xAlign:r,yAlign:l}=t,c=s+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=Ht(a),g=Gh(e,r),p=Kh(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:q(g,0,i.width-e.width),y:q(p,0,i.height-e.height)}}function kn(n,e,t){let i=tt(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function na(n){return Ct([],Et(n))}function qh(n,e,t){return At(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function ia(n,e){let t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}var Ra={beforeTitle:yt,title(n){if(n.length>0){let e=n[0],t=e.chart.data.labels,i=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex<i)return t[e.dataIndex]}return""},afterTitle:yt,beforeBody:yt,beforeLabel:yt,label(n){if(this&&this.options&&this.options.mode==="dataset")return n.label+": "+n.formattedValue||n.formattedValue;let e=n.dataset.label||"";e&&(e+=": ");let t=n.formattedValue;return R(t)||(e+=t),e},labelColor(n){let t=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(n){let t=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:yt,afterBody:yt,beforeFooter:yt,footer:yt,afterFooter:yt};function at(n,e,t,i){let s=n[e].call(t,i);return typeof s>"u"?Ra[e].call(t,i):s}var sa=(()=>{class n extends mt{static positioners=We;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 i=this.chart,s=this.options.setContext(this.getContext()),o=s.enabled&&i.options.animation&&s.animations,a=new An(this.chart,o);return o._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=qh(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,i){let{callbacks:s}=i,o=at(s,"beforeTitle",this,t),a=at(s,"title",this,t),r=at(s,"afterTitle",this,t),l=[];return l=Ct(l,Et(o)),l=Ct(l,Et(a)),l=Ct(l,Et(r)),l}getBeforeBody(t,i){return na(at(i.callbacks,"beforeBody",this,t))}getBody(t,i){let{callbacks:s}=i,o=[];return z(t,a=>{let r={before:[],lines:[],after:[]},l=ia(s,a);Ct(r.before,Et(at(l,"beforeLabel",this,a))),Ct(r.lines,at(l,"label",this,a)),Ct(r.after,Et(at(l,"afterLabel",this,a))),o.push(r)}),o}getAfterBody(t,i){return na(at(i.callbacks,"afterBody",this,t))}getFooter(t,i){let{callbacks:s}=i,o=at(s,"beforeFooter",this,t),a=at(s,"footer",this,t),r=at(s,"afterFooter",this,t),l=[];return l=Ct(l,Et(o)),l=Ct(l,Et(a)),l=Ct(l,Et(r)),l}_createItems(t){let i=this._active,s=this.chart.data,o=[],a=[],r=[],l=[],c,h;for(c=0,h=i.length;c<h;++c)l.push(Uh(this.chart,i[c]));return t.filter&&(l=l.filter((d,u,f)=>t.filter(d,u,f,s))),t.itemSort&&(l=l.sort((d,u)=>t.itemSort(d,u,s))),z(l,d=>{let u=ia(t.callbacks,d);o.push(at(u,"labelColor",this,d)),a.push(at(u,"labelPointStyle",this,d)),r.push(at(u,"labelTextColor",this,d))}),this.labelColors=o,this.labelPointStyles=a,this.labelTextColors=r,this.dataPoints=l,l}update(t,i){let s=this.options.setContext(this.getContext()),o=this._active,a,r=[];if(!o.length)this.opacity!==0&&(a={opacity:0});else{let l=We[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=Jo(this,s),h=Object.assign({},l,c),d=ta(this.chart,s,h),u=ea(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:i})}drawCaret(t,i,s,o){let a=this.getCaretPosition(t,s,o);i.lineTo(a.x1,a.y1),i.lineTo(a.x2,a.y2),i.lineTo(a.x3,a.y3)}getCaretPosition(t,i,s){let{xAlign:o,yAlign:a}=this,{caretSize:r,cornerRadius:l}=s,{topLeft:c,topRight:h,bottomLeft:d,bottomRight:u}=Ht(l),{x:f,y:g}=t,{width:p,height:m}=i,_,b,y,v,x,C;return a==="center"?(x=g+m/2,o==="left"?(_=f,b=_-r,v=x+r,C=x-r):(_=f+p,b=_+r,v=x-r,C=x+r),y=_):(o==="left"?b=f+Math.max(c,d)+r:o==="right"?b=f+p-Math.max(h,u)-r:b=this.caretX,a==="top"?(v=g,x=v-r,_=b-r,y=b+r):(v=g+m,x=v+r,_=b+r,y=b-r),C=v),{x1:_,x2:b,x3:y,y1:v,y2:x,y3:C}}drawTitle(t,i,s){let o=this.title,a=o.length,r,l,c;if(a){let h=Qt(s.rtl,this.x,this.width);for(t.x=kn(this,s.titleAlign,s),i.textAlign=h.textAlign(s.titleAlign),i.textBaseline="middle",r=K(s.titleFont),l=s.titleSpacing,i.fillStyle=s.titleColor,i.font=r.string,c=0;c<a;++c)i.fillText(o[c],h.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+l,c+1===a&&(t.y+=s.titleMarginBottom-l)}}_drawColorBox(t,i,s,o,a){let r=this.labelColors[s],l=this.labelPointStyles[s],{boxHeight:c,boxWidth:h}=a,d=K(a.bodyFont),u=kn(this,"left",a),f=o.x(u),g=c<d.lineHeight?(d.lineHeight-c)/2:0,p=i.y+g;if(a.usePointStyle){let m={radius:Math.min(h,c)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},_=o.leftForLtr(f,h)+h/2,b=p+c/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,pn(t,m,_,b),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,pn(t,m,_,b)}else{t.lineWidth=I(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;let m=o.leftForLtr(f,h),_=o.leftForLtr(o.xPlus(f,1),h-2),b=Ht(r.borderRadius);Object.values(b).some(y=>y!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,ge(t,{x:m,y:p,w:h,h:c,radius:b}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),ge(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(_,p+1,h-2,c-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,i,s){let{body:o}=this,{bodySpacing:a,bodyAlign:r,displayColors:l,boxHeight:c,boxWidth:h,boxPadding:d}=s,u=K(s.bodyFont),f=u.lineHeight,g=0,p=Qt(s.rtl,this.x,this.width),m=function(P){i.fillText(P,p.x(t.x+g),t.y+f/2),t.y+=f+a},_=p.textAlign(r),b,y,v,x,C,S,w;for(i.textAlign=r,i.textBaseline="middle",i.font=u.string,t.x=kn(this,_,s),i.fillStyle=s.bodyColor,z(this.beforeBody,m),g=l&&_!=="right"?r==="center"?h/2+d:h+2+d:0,x=0,S=o.length;x<S;++x){for(b=o[x],y=this.labelTextColors[x],i.fillStyle=y,z(b.before,m),v=b.lines,l&&v.length&&(this._drawColorBox(i,t,x,p,s),f=Math.max(u.lineHeight,c)),C=0,w=v.length;C<w;++C)m(v[C]),f=u.lineHeight;z(b.after,m)}g=0,f=u.lineHeight,z(this.afterBody,m),t.y-=a}drawFooter(t,i,s){let o=this.footer,a=o.length,r,l;if(a){let c=Qt(s.rtl,this.x,this.width);for(t.x=kn(this,s.footerAlign,s),t.y+=s.footerMarginTop,i.textAlign=c.textAlign(s.footerAlign),i.textBaseline="middle",r=K(s.footerFont),i.fillStyle=s.footerColor,i.font=r.string,l=0;l<a;++l)i.fillText(o[l],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+s.footerSpacing}}drawBackground(t,i,s,o){let{xAlign:a,yAlign:r}=this,{x:l,y:c}=t,{width:h,height:d}=s,{topLeft:u,topRight:f,bottomLeft:g,bottomRight:p}=Ht(o.cornerRadius);i.fillStyle=o.backgroundColor,i.strokeStyle=o.borderColor,i.lineWidth=o.borderWidth,i.beginPath(),i.moveTo(l+u,c),r==="top"&&this.drawCaret(t,i,s,o),i.lineTo(l+h-f,c),i.quadraticCurveTo(l+h,c,l+h,c+f),r==="center"&&a==="right"&&this.drawCaret(t,i,s,o),i.lineTo(l+h,c+d-p),i.quadraticCurveTo(l+h,c+d,l+h-p,c+d),r==="bottom"&&this.drawCaret(t,i,s,o),i.lineTo(l+g,c+d),i.quadraticCurveTo(l,c+d,l,c+d-g),r==="center"&&a==="left"&&this.drawCaret(t,i,s,o),i.lineTo(l,c+u),i.quadraticCurveTo(l,c,l+u,c),i.closePath(),i.fill(),o.borderWidth>0&&i.stroke()}_updateAnimationTarget(t){let i=this.chart,s=this.$animations,o=s&&s.x,a=s&&s.y;if(o||a){let r=We[t.position].call(this,this._active,this._eventPosition);if(!r)return;let l=this._size=Jo(this,t),c=Object.assign({},r,this._size),h=ta(i,t,c),d=ea(t,c,h,i);(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 i=this.options.setContext(this.getContext()),s=this.opacity;if(!s)return;this._updateAnimationTarget(i);let o={width:this.width,height:this.height},a={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;let r=tt(i.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;i.enabled&&l&&(t.save(),t.globalAlpha=s,this.drawBackground(a,t,o,i),bi(t,i.textDirection),a.y+=r.top,this.drawTitle(a,t,i),this.drawBody(a,t,i),this.drawFooter(a,t,i),_i(t,i.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,i){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=!Ee(s,o),r=this._positionChanged(o,i);(a||r)&&(this._active=o,this._eventPosition=i,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,i,s=!0){if(i&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let o=this.options,a=this._active||[],r=this._getActiveElements(t,a,i,s),l=this._positionChanged(r,t),c=i||!Ee(r,a)||l;return c&&(this._active=r,(o.enabled||o.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,i))),c}_getActiveElements(t,i,s,o){let a=this.options;if(t.type==="mouseout")return[];if(!o)return i.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,i){let{caretX:s,caretY:o,options:a}=this,r=We[a.position].call(this,t,i);return r!==!1&&(s!==r.x||o!==r.y)}}return n})(),Qh={id:"tooltip",_element:sa,positioners:We,afterInit(n,e,t){t&&(n.tooltip=new sa({chart:n,options:t}))},beforeUpdate(n,e,t){n.tooltip&&n.tooltip.initialize(t)},reset(n,e,t){n.tooltip&&n.tooltip.initialize(t)},afterDraw(n){let e=n.tooltip;if(e&&e._willRender()){let t={tooltip:e};if(n.notifyPlugins("beforeTooltipDraw",qe(Ke({},t),{cancelable:!0}))===!1)return;e.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",t)}},afterEvent(n,e){if(n.tooltip){let t=e.replay;n.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:(n,e)=>e.bodyFont.size,boxWidth:(n,e)=>
3e.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:Ra},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:n=>n!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Zh=Object.freeze({__proto__:null,Colors:hh,Decimation:gh,Filler:Rh,Legend:Hh,SubTitle:jh,Title:Wh,Tooltip:Qh}),Jh=(n,e,t,i)=>(typeof e=="string"?(t=n.push(e)-1,i.unshift({index:t,label:e})):isNaN(e)&&(t=null),t);function td(n,e,t,i){let s=n.indexOf(e);if(s===-1)return Jh(n,e,t,i);let o=n.lastIndexOf(e);return s!==o?t:s}var ed=(n,e)=>n===null?null:q(Math.round(n),0,e);function oa(n){let e=this.getLabels();return n>=0&&n<e.length?e[n]:n}var nd=(()=>{class n extends te{static id="category";static defaults={ticks:{callback:oa}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let i=this._addedLabels;if(i.length){let s=this.getLabels();for(let{index:o,label:a}of i)s[o]===a&&s.splice(o,1);this._addedLabels=[]}super.init(t)}parse(t,i){if(R(t))return null;let s=this.getLabels();return i=isFinite(i)&&s[i]===t?i:td(s,t,D(i,t),this._addedLabels),ed(i,s.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:i}=this.getUserBounds(),{min:s,max:o}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(s=0),i||(o=this.getLabels().length-1)),this.min=s,this.max=o}buildTicks(){let t=this.min,i=this.max,s=this.options.offset,o=[],a=this.getLabels();a=t===0&&i===a.length-1?a:a.slice(t,i+1),this._valueRange=Math.max(a.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let r=t;r<=i;r++)o.push({value:r});return o}getLabelForValue(t){return oa.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 i=this.ticks;return t<0||t>i.length-1?null:this.getPixelForValue(i[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}return n})();function id(n,e){let t=[],{bounds:s,step:o,min:a,max:r,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=n,f=o||1,g=h-1,{min:p,max:m}=e,_=!R(a),b=!R(r),y=!R(c),v=(m-p)/(d+1),x=qn((m-p)/g/f)*f,C,S,w,P;if(x<1e-14&&!_&&!b)return[{value:p},{value:m}];P=Math.ceil(m/x)-Math.floor(p/x),P>g&&(x=qn(P*x/g/f)*f),R(l)||(C=Math.pow(10,l),x=Math.ceil(x*C)/C),s==="ticks"?(S=Math.floor(p/x)*x,w=Math.ceil(m/x)*x):(S=p,w=m),_&&b&&o&&Us((r-a)/o,x/1e3)?(P=Math.round(Math.min((r-a)/x,h)),x=(r-a)/P,S=a,w=r):y?(S=_?a:S,w=b?r:w,P=c-1,x=(w-S)/P):(P=(w-S)/x,de(P,Math.round(P),x/1e3)?P=Math.round(P):P=Math.ceil(P));let A=Math.max(Zn(x),Zn(S));C=Math.pow(10,R(l)?A:l),S=Math.round(S*C)/C,w=Math.round(w*C)/C;let O=0;for(_&&(u&&S!==a?(t.push({value:a}),S<a&&O++,de(Math.round((S+O*x)*C)/C,a,aa(a,v,n))&&O++):S<a&&O++);O<P;++O){let F=Math.round((S+O*x)*C)/C;if(b&&F>r)break;t.push({value:F})}return b&&u&&w!==r?t.length&&de(t[t.length-1].value,r,aa(r,v,n))?t[t.length-1].value=r:t.push({value:r}):(!b||w===r)&&t.push({value:w}),t}function aa(n,e,{horizontal:t,minRotation:i}){let s=ht(i),o=(t?Math.sin(s):Math.cos(s))||.001,a=.75*e*(""+n).length;return Math.min(e/o,a)}var _e=class extends te{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:i}=this.getUserBounds(),{min:s,max:o}=this,a=l=>s=t?s:l,r=l=>o=i?o:l;if(e){let l=pt(s),c=pt(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:i}=e,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),t=t||11),t&&(s=Math.min(t,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let e=this.options,t=e.ticks,i=this.getTickLimit();i=Math.max(2,i);let s={maxTicks:i,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=id(s,o);
vendor: 5,836 bytes, line 3
3return e.bounds==="ticks"&&Qn(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,i=this.max;if(super.configure(),this.options.offset&&e.length){let s=(i-t)/Math.max(e.length-1,1)/2;t-=s,i+=s}this._startValue=t,this._endValue=i,this._valueRange=i-t}getLabelForValue(e){return fe(e,this.chart.options.locale,this.options.ticks.format)}},Yi=class extends _e{static id="linear";static defaults={ticks:{callback:Le.formatters.numeric}};determineDataLimits(){let{min:e,max:t}=this.getMinMax(!0);this.min=$(e)?e:0,this.max=$(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){let e=this.isHorizontal(),t=e?this.width:this.height,i=ht(this.options.ticks.minRotation),s=(e?Math.sin(i):Math.cos(i))||.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}},$e=n=>Math.floor(Dt(n)),Jt=(n,e)=>Math.pow(10,$e(n)+e);function ra(n){return n/Math.pow(10,$e(n))===1}function la(n,e,t){let i=Math.pow(10,t),s=Math.floor(n/i);return Math.ceil(e/i)-s}function sd(n,e){let t=e-n,i=$e(t);for(;la(n,e,i)>10;)i++;for(;la(n,e,i)<10;)i--;return Math.min(i,$e(n))}function od(n,{min:e,max:t}){e=ot(n.min,e);let i=[],s=$e(e),o=sd(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=ot(n.min,Math.round((l+h+d*Math.pow(10,o))*a)/a);for(;u<t;)i.push({value:u,major:ra(u),significand:d}),d>=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=ot(n.max,u);return i.push({value:f,major:ra(f),significand:d}),i}var Xi=class extends te{static id="logarithmic";static defaults={ticks:{callback:Le.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 i=_e.prototype.parse.apply(this,[e,t]);if(i===0){this._zero=!0;return}return $(i)&&i>0?i:null}determineDataLimits(){let{min:e,max:t}=this.getMinMax(!0);this.min=$(e)?Math.max(0,e):null,this.max=$(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!$(this._userMin)&&(this.min=e===Jt(this.min,0)?Jt(this.min,-1):Jt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:e,maxDefined:t}=this.getUserBounds(),i=this.min,s=this.max,o=r=>i=e?i:r,a=r=>s=t?s:r;i===s&&(i<=0?(o(1),a(10)):(o(Jt(i,-1)),a(Jt(s,1)))),i<=0&&o(Jt(s,-1)),s<=0&&a(Jt(i,1)),this.min=i,this.max=s}buildTicks(){let e=this.options,t={min:this._userMin,max:this._userMax},i=od(t,this);return e.bounds==="ticks"&&Qn(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":fe(e,this.chart.options.locale,this.options.ticks.format)}configure(){let e=this.min;super.configure(),this._startValue=Dt(e),this._valueRange=Dt(this.max)-Dt(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Dt(e)-this._startValue)/this._valueRange)}getValueForPixel(e){let t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}};function Gi(n){let e=n.ticks;if(e.display&&n.display){let t=tt(e.backdropPadding);return D(e.font&&e.font.size,j.font.size)+t.height}return 0}function ad(n,e,t){return t=H(t)?t:[t],{w:Js(n,e.string,t),h:t.length*e.lineHeight}}function ca(n,e,t,i,s){return n===i||n===s?{start:e-t/2,end:e+t/2}:n<i||n>s?{start:e-t,end:e}:{start:e,end:e+t}}function rd(n){let e={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},t=Object.assign({},e),i=[],s=[],o=n._pointLabels.length,a=n.options.pointLabels,r=a.centerPointLabels?N/o:0;for(let l=0;l<o;l++){let c=a.setContext(n.getPointLabelContext(l));s[l]=c.padding;let h=n.getPointPosition(l,n.drawingArea+s[l],r),d=K(c.font),u=ad(n.ctx,d,n._pointLabels[l]);i[l]=u;let f=st(n.getIndexAngle(l)+r),g=Math.round(dn(f)),p=ca(g,h.x,u.w,0,180),m=ca(g,h.y,u.h,90,270);ld(t,e,f,p,m)}n.setCenterPoint(e.l-t.l,t.r-e.r,e.t-t.t,t.b-e.b),n._pointLabelItems=dd(n,i,s)}function ld(n,e,t,i,s){let o=Math.abs(Math.sin(t)),a=Math.abs(Math.cos(t)),r=0,l=0;i.start<e.l?(r=(e.l-i.start)/o,n.l=Math.min(n.l,e.l-r)):i.end>e.r&&(r=(i.end-e.r)/o,n.r=Math.max(n.r,e.r+r)),s.start<e.t?(l=(e.t-s.start)/a,n.t=Math.min(n.t,e.t-l)):s.end>e.b&&(l=(s.end-e.b)/a,n.b=Math.max(n.b,e.b+l))}function cd(n,e,t){let i=n.drawingArea,{extra:s,additionalAngle:o,padding:a,size:r}=t,l=n.getPointPosition(e,i+s+a,o),c=Math.round(dn(st(l.angle+Y))),h=gd(l.y,r.h,c),d=ud(c),u=fd(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 hd(n,e){if(!e)return!0;let{left:t,top:i,right:s,bottom:o}=n;return!(xt({x:t,y:i},e)||xt({x:t,y:o},e)||xt({x:s,y:i},e)||xt({x:s,y:o},e))}function dd(n,e,t){let i=[],s=n._pointLabels.length,o=n.options,{centerPointLabels:a,display:r}=o.pointLabels,l={extra:Gi(o)/2,additionalAngle:a?N/s:0},c;for(let h=0;h<s;h++){l.padding=t[h],l.size=e[h];let d=cd(n,h,l);i.push(d),r==="auto"&&(d.visible=hd(d,c),d.visible&&(c=d))}return i}function ud(n){return n===0||n===180?"center":n<180?"left":"right"}function fd(n,e,t){return t==="right"?n-=e:t==="center"&&(n-=e/2),n}function gd(n,e,t){return t===90||t===270?n-=e/2:(t>270||t<90)&&(n-=e),n}function pd(n,e,t){let{left:i,top:s,right:o,bottom:a}=t,{backdropColor:r}=e;if(!R(r)){let l=Ht(e.borderRadius),c=tt(e.backdropPadding);n.fillStyle=r;let h=i-c.left,d=s-c.top,u=o-i+c.width,f=a-s+c.height;
vendor: 4,555 bytes, line 3
3Object.values(l).some(g=>g!==0)?(n.beginPath(),ge(n,{x:h,y:d,w:u,h:f,radius:l}),n.fill()):n.fillRect(h,d,u,f)}}function md(n,e){let{ctx:t,options:{pointLabels:i}}=n;for(let s=e-1;s>=0;s--){let o=n._pointLabelItems[s];if(!o.visible)continue;let a=i.setContext(n.getPointLabelContext(s));pd(t,a,o);let r=K(a.font),{x:l,y:c,textAlign:h}=o;Vt(t,n._pointLabels[s],l,c+r.lineHeight/2,r,{color:a.color,textAlign:h,textBaseline:"middle"})}}function Ia(n,e,t,i){let{ctx:s}=n;if(t)s.arc(n.xCenter,n.yCenter,e,0,W);else{let o=n.getPointPosition(0,e);s.moveTo(o.x,o.y);for(let a=1;a<i;a++)o=n.getPointPosition(a,e),s.lineTo(o.x,o.y)}}function bd(n,e,t,i,s){let o=n.ctx,a=e.circular,{color:r,lineWidth:l}=e;!a&&!i||!r||!l||t<0||(o.save(),o.strokeStyle=r,o.lineWidth=l,o.setLineDash(s.dash||[]),o.lineDashOffset=s.dashOffset,o.beginPath(),Ia(n,t,a,i),o.closePath(),o.stroke(),o.restore())}function _d(n,e,t){return At(n,{label:t,index:e,type:"pointLabel"})}var Ki=class extends _e{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Le.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){let e=this._padding=tt(Gi(this.options)/2),t=this.width=this.maxWidth-e.width,i=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+t/2+e.left),this.yCenter=Math.floor(this.top+i/2+e.top),this.drawingArea=Math.floor(Math.min(t,i)/2)}determineDataLimits(){let{min:e,max:t}=this.getMinMax(!1);this.min=$(e)&&!isNaN(e)?e:0,this.max=$(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Gi(this.options))}generateTickLabels(e){_e.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((t,i)=>{let s=V(this.options.pointLabels.callback,[t,i],this);return s||s===0?s:""}).filter((t,i)=>this.chart.getDataVisibility(i))}fit(){let e=this.options;e.display&&e.pointLabels.display?rd(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,i,s){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,i,s))}getIndexAngle(e){let t=W/(this._pointLabels.length||1),i=this.options.startAngle||0;return st(e*t+ht(i))}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<t.length){let i=t[e];return _d(this.getContext(),e,i)}}getPointPosition(e,t,i=0){let s=this.getIndexAngle(e)-Y+i;return{x:Math.cos(s)*t+this.xCenter,y:Math.sin(s)*t+this.yCenter,angle:s}}getPointPositionForValue(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){let{left:t,top:i,right:s,bottom:o}=this._pointLabelItems[e];return{left:t,top:i,right:s,bottom:o}}drawBackground(){let{backgroundColor:e,grid:{circular:t}}=this.options;if(e){let i=this.ctx;i.save(),i.beginPath(),Ia(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),i.closePath(),i.fillStyle=e,i.fill(),i.restore()}}drawGrid(){let e=this.ctx,t=this.options,{angleLines:i,grid:s,border:o}=t,a=this._pointLabels.length,r,l,c;if(t.pointLabels.display&&md(this,a),s.display&&this.ticks.forEach((h,d)=>{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);bd(this,f,l,a,g)}}),i.display){for(e.save(),r=a-1;r>=0;r--){let h=i.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.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())}
vendor: 5,776 bytes, line 3
3e.restore()}}drawBorder(){}drawLabels(){let e=this.ctx,t=this.options,i=t.ticks;if(!i.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=i.setContext(this.getContext(l)),h=K(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=tt(c.backdropPadding);e.fillRect(-a/2-d.left,-o-h.size/2-d.top,a+d.width,h.size+d.height)}Vt(e,r.label,0,-o,h,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),e.restore()}drawTitle(){}},zn={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}},rt=Object.keys(zn);function ha(n,e){return n-e}function da(n,e){if(R(e))return null;let t=n._adapter,{parser:i,round:s,isoWeekday:o}=n._parseOpts,a=e;return typeof i=="function"&&(a=i(a)),$(a)||(a=typeof i=="string"?t.parse(a,i):t.parse(a)),a===null?null:(s&&(a=s==="week"&&(qt(o)||o===!0)?t.startOf(a,"isoWeek",o):t.startOf(a,s)),+a)}function ua(n,e,t,i){let s=rt.length;for(let o=rt.indexOf(n);o<s-1;++o){let a=zn[rt[o]],r=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((t-e)/(r*a.size))<=i)return rt[o]}return rt[s-1]}function xd(n,e,t,i,s){for(let o=rt.length-1;o>=rt.indexOf(t);o--){let a=rt[o];if(zn[a].common&&n._adapter.diff(s,i,a)>=e-1)return a}return rt[t?rt.indexOf(t):0]}function yd(n){for(let e=rt.indexOf(n)+1,t=rt.length;e<t;++e)if(zn[rt[e]].common)return rt[e]}function fa(n,e,t){if(!t)n[e]=!0;else if(t.length){let{lo:i,hi:s}=un(t,e),o=t[i]>=e?t[i]:t[s];n[o]=!0}}function vd(n,e,t,i){let s=n._adapter,o=+s.startOf(e[0].value,i),a=e[e.length-1].value,r,l;for(r=o;r<=a;r=+s.add(r,1,i))l=t[r],l>=0&&(e[l].major=!0);return e}function ga(n,e,t){let i=[],s={},o=e.length,a,r;for(a=0;a<o;++a)r=e[a],s[r]=a,i.push({value:r,major:!1});return o===0||!t?i:vd(n,i,s,t)}var qi=(()=>{class n extends te{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,i={}){let s=t.time||(t.time={}),o=this._adapter=new El._date(t.adapters.date);o.init(i),ce(s.displayFormats,o.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(t),this._normalized=i.normalized}parse(t,i){return t===void 0?null:da(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,i=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=$(o)&&!isNaN(o)?o:+i.startOf(Date.now(),s),a=$(a)&&!isNaN(a)?a:+i.endOf(Date.now(),s)+1,this.min=Math.min(o,a-1),this.max=Math.max(o+1,a)}_getLabelBounds(){let t=this.getLabelTimestamps(),i=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return t.length&&(i=t[0],s=t[t.length-1]),{min:i,max:s}}buildTicks(){let t=this.options,i=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=Xs(o,a,r);return this._unit=i.unit||(s.autoSkip?ua(i.minUnit,this.min,this.max,this._getLabelCapacity(a)):xd(this,l.length,i.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit==="year"?void 0:yd(this._unit),this.initOffsets(o),t.reverse&&l.reverse(),ga(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let i=0,s=0,o,a;this.options.offset&&t.length&&(o=this.getDecimalForValue(t[0]),t.length===1?i=1-o:i=(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;i=q(i,0,r),s=q(s,0,r),this._offsets={start:i,end:s,factor:1/(i+1+s)}}_generate(){let t=this._adapter,i=this.min,s=this.max,o=this.options,a=o.time,r=a.unit||ua(a.minUnit,i,s,this._getLabelCapacity(i)),l=D(o.ticks.stepSize,1),c=r==="week"?a.isoWeekday:!1,h=qt(c)||c===!0,d={},u=i,f,g;if(h&&(u=+t.startOf(u,"isoWeek",c)),u=+t.startOf(u,h?"day":r),t.diff(s,i,r)>1e5*l)throw new Error(i+" 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<s;f=+t.add(f,l,r),g++)fa(d,f,p);return(f===s||o.bounds==="ticks"||g===1)&&fa(d,f,p),Object.keys(d).sort(ha).map(m=>+m)}getLabelForValue(t){let i=this._adapter,s=this.options.time;return s.tooltipFormat?i.format(t,s.tooltipFormat):i.format(t,s.displayFormats.datetime)}format(t,i){let o=this.options.time.displayFormats,a=this._unit,r=i||o[a];return this._adapter.format(t,r)}_tickFormatFunction(t,i,s,o){let a=this.options,r=a.ticks.callback;if(r)return V(r,[t,i,s],this);let l=a.time.displayFormats,c=this._unit,h=this._majorUnit,d=c&&l[c],u=h&&l[h],f=s[i],g=h&&u&&f&&f.major;return this._adapter.format(t,o||(g?u:d))}generateTickLabels(t){let i,s,o;for(i=0,s=t.length;i<s;
3++i)o=t[i],o.label=this._tickFormatFunction(o.value,i,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){let i=this._offsets,s=this.getDecimalForValue(t);return this.getPixelForDecimal((i.start+s)*i.factor)}getValueForPixel(t){let i=this._offsets,s=this.getDecimalForPixel(t)/i.factor-i.end;return this.min+s*(this.max-this.min)}_getLabelSize(t){let i=this.options.ticks,s=this.ctx.measureText(t).width,o=ht(this.isHorizontal()?i.maxRotation:i.minRotation),a=Math.cos(o),r=Math.sin(o),l=this._resolveTickFontOptions(0).size;return{w:s*a+l*r,h:s*r+l*a}}_getLabelCapacity(t){let i=this.options.time,s=i.displayFormats,o=s[i.unit]||s.millisecond,a=this._tickFormatFunction(t,0,ga(this,[t],this._majorUnit),o),r=this._getLabelSize(a),l=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return l>0?l:1}getDataTimestamps(){let t=this._cache.data||[],i,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(i=0,s=o.length;i<s;++i)t=t.concat(o[i].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){let t=this._cache.labels||[],i,s;if(t.length)return t;let o=this.getLabels();for(i=0,s=o.length;i<s;++i)t.push(da(this,o[i]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return ei(t.sort(ha))}}return n})();function Pn(n,e,t){let i=0,s=n.length-1,o,a,r,l;t?(e>=n[i].pos&&e<=n[s].pos&&({lo:i,hi:s}=_t(n,"pos",e)),{pos:o,time:r}=n[i],{pos:a,time:l}=n[s]):(e>=n[i].time&&e<=n[s].time&&({lo:i,hi:s}=_t(n,"time",e)),{time:o,pos:r}=n[i],{time:a,pos:l}=n[s]);let c=a-o;return c?r+(l-r)*(e-o)/c:r}var Qi=class extends qi{static id="timeseries";static defaults=qi.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=Pn(t,this.min),this._tableRange=Pn(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){let{min:t,max:i}=this,s=[],o=[],a,r,l,c,h;for(a=0,r=e.length;a<r;++a)c=e[a],c>=t&&c<=i&&s.push(c);if(s.length<2)return[{time:t,pos:0},{time:i,pos:1}];for(a=0,r=s.length;a<r;++a)h=s[a+1],l=s[a-1],c=s[a],Math.round((h+l)/2)!==c&&o.push({time:c,pos:a/(r-1)});return o}_generate(){let e=this.min,t=this.max,i=super.getDataTimestamps();return(!i.includes(e)||!i.length)&&i.splice(0,0,e),(!i.includes(t)||i.length===1)&&i.push(t),i.sort((s,o)=>s-o)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;let t=this.getDataTimestamps(),i=this.getLabelTimestamps();return t.length&&i.length?e=this.normalize(t.concat(i)):e=t.length?t:i,e=this._cache.all=e,e}getDecimalForValue(e){return(Pn(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){let t=this._offsets,i=this.getDecimalForPixel(e)/t.factor-t.end;return Pn(this._table,i*this._tableRange+this._minPos,!0)}},Cd=Object.freeze({__proto__:null,CategoryScale:nd,LinearScale:Yi,LogarithmicScale:Xi,RadialLinearScale:Ki,TimeScale:qi,TimeSeriesScale:Qi}),Xe=[Tl,ih,Zh,Cd];var wd=["connectionsDonutChart"],Sd=["featureUsageChart"],Md=["aiConversationsChart"],kd=["dataScopesChart"],za=()=>({add:!0}),Fa=(n,e)=>({"border-b-2 border-[#0575E6] text-[#0575E6] font-semibold":n,"text-gray-600 hover:text-[#0575E6] transition-colors duration-200":e}),Pd=(n,e)=>({"bg-white hover:bg-gray-100 transition text-black font-medium":n,"bg-[#D1CFCF] text-[#888888]":e}),Bn=(n,e)=>({"text-[#12B76A]":n,"text-[#F04438]":e}),Dd=n=>({"background-color":n});function Od(n,e){n&1&&(M(0,"div",78)(1,"div",79),E(2,"img",80),k()(),M(3,"p",81),L(4," No connections have been made so we can't display any data yet. "),k())}function Ad(n,e){if(n&1&&(M(0,"div",88),E(1,"div",89),M(2,"span",90),L(3),k()()),n&2){let t=e.$implicit,i=e.$index,s=G(3);T(),Q("ngStyle",rs(2,Dd,s.chartColors[i%s.chartColors.length])),T(2),se(t)}}function Td(n,e){if(n&1&&(M(0,"div",28)(1,"div",82),E(2,"canvas",83,2),M(4,"div",84)(5,"span",85),L(6),k(),M(7,"span",86),L(8,"Connections"),k()()(),M(9,"div",87),ns(10,Ad,4,4,"div",88,es),k()()),n&2){let t,i=G(2);T(6),se((t=i.assetInsights())==null||t.connections==null?null:t.connections.total),T(4),is(i.chartLegendItems())}}function Ed(n,e){if(n&1){let t=Me();M(0,"div",16)(1,"div",21)(2,"div",22)(3,"div",23),E(4,"div",24),k(),M(5,"div",25)(6,"p",26),L(7,"Connections Breakdown"),k(),E(8,"ui-icon",27),k(),Mt(9,Od,5,0)(10,Td,12,1,"div",28),M(11,"div",29)(12,"button",30),bt("click",function(){ut(t);let s=G();return ft(s.viewConnection())}),L(13," View Connections "),k()()()(),M(14,"div",31),E(15,"div",24),M(16,"div",32)(17,"div",33)(18,"div",34),E(19,"img",35),k(),M(20,"div",36)(21,"p",37),L(22,"Data Scopes"),k(),M(23,"p",38),L(24,"Analyse datasets, create Data Scopes"),k()()(),E(25,"div",39),M(26,"div",40)(27,"div",41)(28,"div",42)(29,"span",43),L(30),k(),M(31,"span",44),L(32,"scopes"),k()(),M(33,"div",45),E(34,"img",46),M(35,"span",47),L(36),k(),M(37,"span",48),L(38,"vs last month"),k()()(),M(39,"div",49),E(40,"canvas",50,0),k()()(),E(42,"div",51),k(),M(43,"div",52),E(44,"div",53),M(45,"div",54),E(46,"div",55)(47,"div",56),k(),E(48,"div",24),M(49,"div",32)(50,"div",57)(51,"div",58),E(52,"img",59),k()(),E(53,"div",39),M(54,"div",60)(55,"div",61)(56,"div",42)(57,"span",62),L(58),k(),M(59,"span",44),L(60,"Total Connections"),k()(),M(61,"div",63)(62,"div",64),E(63,"img",65),M(64,"span",66),L(65),k()(),M(66,"span",48),L(67,"vs last month"),k()()()()(),E(68,"div",67)(69,"div",68),k(),M(70,"div",69),E(71,"div",53),M(72,"div",54),E(73,"div",55)(74,"div",56),k(),E(75,"div",24),M(76,"div",32)(77,"div",57)(78,"div",70),E(79,"img",71),k()(),E(80,"div",39),M(81,"div",60)(82,"div",61)(83,"div",42)(84,"span",62),L(85),k(),M(86,"span",44),L(87,"Total Reports"),k()(),M(88,"div",63)(89,"div",64),E(90,"img",65),M(91,"span",66),L(92),k()(),M(93,"span",48),L(94,"vs last month"),k()()()()(),E(95,"div",67)(96,"div",68),k(),M(97,"div",72),bt("click",function(){ut(t);let s=G();return ft(s.getAiInsights())}),E(98,"div",73)(99,"div",74),M(100,"div",32)(101,"div",33)(102,"div",75),E(103,"img",76),k(),M(104,"div",36)(105,"p",37),L(106,"AI Data Copilot"),k(),M(107,"p",38),L(108,"Query data, gain insights"),k()()(),E(109,"div",39),M(110,"div",40)(111,"div",41)(112,"div",42)(113,"span",43),L(114),k(),M(115,"span",44),L(116,"conversations"),k()(),M(117,"div",45),E(118,"img",46),M(119,"span",47),L(120),k(),M(121,"span",48),L(122,"vs last month"),k()()(),M(123,"div",49),E(124,"canvas",77,1),k()()(),E(126,"div",51),k()()}if(n&2){let t,i,s,o,a,r,l,c,h,d,u,f,g,p,m,_,b,y,v,x=G();T(9),it(9,((t=x.assetInsights())==null||t.connections==null?null:t.connections.total)===0?9:-1),T(),it(10,((i=x.assetInsights())==null||i.connections==null?null:i.connections.total)>0?10:-1),T(2),Q("ngClass",Lt(19,Pd,((s=x.assetInsights())==null||s.connections==null?null:s.connections.total)>0,((s=x.assetInsights())==null||s.connections==null?null:s.connections.total)===0)),T(18),se(((o=x.assetInsights())==null||o.dataScopes==null?null:o.dataScopes.total)||0),T(4),Q("src",((a=x.assetInsights())==null||a.dataScopes==null||a.dataScopes.trend==null?null:a.dataScopes.trend.direction)==="up"?"assets/icons/arrow-up.svg":"assets/icons/arrow-down.svg",we),T(),Q("ngClass",Lt(22,Bn,((r=x.assetInsights())==null||r.dataScopes==null||r.dataScopes.trend==null?null:r.dataScopes.trend.direction)==="up",((r=x.assetInsights())==null||r.dataScopes==null||r.dataScopes.trend==null?null:r.dataScopes.trend.direction)!=="up")),T(),Yt(" ",((l=x.assetInsights())==null||l.dataScopes==null||l.dataScopes.trend==null?null:l.dataScopes.trend.difference)||0,"% "),T(22),Yt(" ",(c=x.assetInsights())==null||c.connections==null?null:c.connections.total," "),T(5),Q("src",((h=x.assetInsights())==null||h.connections==null||h.connections.trend==null?null:h.connections.trend.direction)==="up"?"assets/icons/arrow-up.svg":"assets/icons/arrow-down.svg",we),T(),Q("ngClass",Lt(25,Bn,((d=x.assetInsights())==null||d.connections==null||d.connections.trend==null?null:d.connections.trend.direction)==="up",((d=x.assetInsights())==null||d.connections==null||d.connections.trend==null?null:d.connections.trend.direction)!=="up")),T(),Yt(" ",(u=x.assetInsights())==null||u.connections==null||u.connections.trend==null?null:u.connections.trend.difference,"% "),T(20),Yt(" ",(f=x.assetInsights())==null||f.reports==null?null:f.reports.total," "),T(5),Q("src",((g=x.assetInsights())==null||g.reports==null||g.reports.trend==null?null:g.reports.trend.direction)==="up"?"assets/icons/arrow-up.svg":"assets/icons/arrow-down.svg",we),T(),Q("ngClass",Lt(28,Bn,((
3p=x.assetInsights())==null||p.reports==null||p.reports.trend==null?null:p.reports.trend.direction)==="up",((p=x.assetInsights())==null||p.reports==null||p.reports.trend==null?null:p.reports.trend.direction)!=="up")),T(),Yt(" ",(m=x.assetInsights())==null||m.reports==null||m.reports.trend==null?null:m.reports.trend.difference,"% "),T(22),se(((_=x.assetInsights())==null||_.conversations==null?null:_.conversations.total)||0),T(4),Q("src",((b=x.assetInsights())==null||b.conversations==null||b.conversations.trend==null?null:b.conversations.trend.direction)==="up"?"assets/icons/arrow-up.svg":"assets/icons/arrow-down.svg",we),T(),Q("ngClass",Lt(31,Bn,((y=x.assetInsights())==null||y.conversations==null||y.conversations.trend==null?null:y.conversations.trend.direction)==="up",((y=x.assetInsights())==null||y.conversations==null||y.conversations.trend==null?null:y.conversations.trend.direction)!=="up")),T(),Yt(" ",((v=x.assetInsights())==null||v.conversations==null||v.conversations.trend==null?null:v.conversations.trend.difference)||0,"% ")}}function Ld(n,e){n&1&&E(0,"ui-skeleton-table")}function Rd(n,e){n&1&&(M(0,"div",91)(1,"div",93),E(2,"img",94),k(),M(3,"p",95),L(4,"Soo much empty!"),k(),M(5,"p",96),L(6," Seems you have no connections made on your account. Navigate to connections section to create one "),k(),M(7,"a",97),E(8,"img",98),L(9," Add First Connection "),k()()),n&2&&(T(7),Q("queryParams",Vn(1,za)))}function Id(n,e){if(n&1){let t=Me();M(0,"app-assets-flat-list-table",99),bt("showManageAssetModal",function(){ut(t);let s=G(3);return ft(s.setShowManageConnectionModal(!0))})("refreshAssets",function(){ut(t);let s=G(3);return ft(s.getConnections())})("onScroll",function(){ut(t);let s=G(3);return ft(s.handleReportScroll())}),k()}if(n&2){let t=G(3);Q("assetType",t.assetType)("assetsInput",t.connections())("assetHeight",t.cardExpanded()?350:50)}}function Fd(n,e){if(n&1&&Mt(0,Rd,10,2,"div",91)(1,Id,1,3,"app-assets-flat-list-table",92),n&2){let t=G(2);it(0,t.connections().length===0?0:-1),T(),it(1,t.connections().length>0?1:-1)}}function zd(n,e){if(n&1&&Mt(0,Ld,1,0,"ui-skeleton-table")(1,Fd,2,2),n&2){let t=G();it(0,t.loadingConnections()?0:-1),T(),it(1,t.loadingConnections()?-1:1)}}function Bd(n,e){n&1&&E(0,"ui-skeleton-table")}function Vd(n,e){n&1&&(M(0,"div",91)(1,"div",93),E(2,"img",101),k(),M(3,"p",102),L(4,"No reports available!"),k(),M(5,"p",96),L(6," You have not created any reports yet. Start by navigating to the reports section. "),k(),M(7,"a",103),L(8," Create First Report "),k()())}function Hd(n,e){if(n&1){let t=Me();M(0,"app-assets-flat-list-table",104),bt("changeListType",function(s){ut(t);let o=G(3);return ft(o.changeListType(s))})("refreshAssets",function(){ut(t);let s=G(3);return ft(s.getReports())})("onScroll",function(){ut(t);let s=G(3);return ft(s.handleReportScroll())}),k()}if(n&2){let t=G(3);Q("listType",t.listType)("assetType","REPORT")("assetsInput",t.reports())("assetHeight",t.cardExpanded()?350:50)}}function Nd(n,e){if(n&1&&Mt(0,Vd,9,0,"div",91)(1,Hd,1,4,"app-assets-flat-list-table",100),n&2){let t=G(2);it(0,t.reports().length===0?0:-1),T(),it(1,t.reports().length>0?1:-1)}}function Wd(n,e){if(n&1&&Mt(0,Bd,1,0,"ui-skeleton-table")(1,Nd,2,2),n&2){let t=G();it(0,t.loadingReports()?0:-1),T(),it(1,t.loadingReports()?-1:1)}}function jd(n,e){if(n&1){let t=Me();M(0,"app-manage-connection",105),bt("close",function(){ut(t);let s=G();return ft(s.onCloseManageConnectionModal())})("success",function(){ut(t);let s=G();return ft(s.onSuccessManageConnectionModal())}),k()}}var pu=(()=>{let e=class e{constructor(){this.connectionsDonutChartRef=Se("connectionsDonutChart"),this.featureUsageChartRef=Se("featureUsageChart"),this.aiConversationsChartRef=Se("aiConversationsChart"),this.dataScopesChartRef=Se("dataScopesChart"),this.assetsApiService=ie(ps),this.dataScopeService=ie(xs),this.userService=ie(fs),this.postHogService=ie(gs),this.meteringService=ie(vs),this.loadingConnections=gt(!1),this.connections=gt([]),this.userFirstName=this.userService.select("firstName"),this.showManageConnectionModal=gt(!1),this.assetType="CONNECTION",this.listType="category",this.assetInsights=gt(null),this.loadingReports=gt(!1),this.reports=gt([]),this.cardExpanded=gt(!0),this.chartColors2=["#92C5F9","#4394E5","#0066CC","#004D99","#003366"],this.chartColors=["#d4bbff","#be95ff","#a56eff","#8a3ffc","#6929c4"],this.chartLegendItems=ls(()=>Object.keys(this.assetInsights()?.connections?.byDatasource||{}).map(i=>i.replace(/_/g," ").toLowerCase().replace(/\b\w/g,s=>s.toUpperCase()))),this.featureUsageData=gt([]),this.loadingFeatureUsage=gt(!1),this.activeTab=gt("connections")}ngOnInit(){this.getConnections(),this.getAssetInsights(),this.getReports(),this.getFeatureUsage()}ngAfterViewInit(){this.loadConnectionsChart(),this.loadReportsChart(),this.loadAiConversationsChart(),this.loadDataScopesChart()}setActiveTab(i){this.activeTab.set(i)}getReports(){this.loadingReports.set(!0),this.assetsApiService.getAssetByType("REPORT","network-only").pipe(Qe(i=>i.data.assetsByType),Ce(i=>(console.error("Error getting reports:",i),this.loadingReports.set(!1),ve([]))),Ze(()=>this.loadingReports.set(!1))).subscribe({next:i=>this.reports.set(i)})}updateTrendCharts(){}getAssetInsights(){this.dataScopeService.getUserAssetInsights().pipe(Qe(i=>{this.assetInsights.set(i),setTimeout(()=>{this.updateTrendCharts(),this.assetInsights()?.connections?.total>0&&this.connectionsDonutChartRef()&&this.loadConnectionsDonutChart()}
3,0)}),Ce(i=>(console.error("Error fetching asset insights:",i),ve(null)))).subscribe()}loadConnectionsChart(){}loadReportsChart(){}loadConnectionsDonutChart(){let i=this.connectionsDonutChartRef();if(!i)return;let s=i.nativeElement,o=s.getContext("2d");if(o){St.register(...Xe);let a=this.chartColors.map(r=>{let l=o.createLinearGradient(0,0,0,s.height);return l.addColorStop(0,r),l.addColorStop(1,this.hexToRGBA(r,.7)),l});this.connectionsDonutChart=new St(o,{type:"doughnut",data:{labels:this.chartLegendItems(),datasets:[{data:Object.values(this.assetInsights()?.connections.byDatasource||{}),backgroundColor:a,borderColor:"#FFFFFF",borderWidth:2,hoverBackgroundColor:this.chartColors,hoverBorderColor:"#FFFFFF",hoverBorderWidth:4,hoverOffset:10}]},options:{responsive:!0,maintainAspectRatio:!1,cutout:"70%",radius:"90%",plugins:{legend:{display:!1},tooltip:{backgroundColor:"rgba(255, 255, 255, 0.9)",titleColor:"#333",bodyColor:"#666",borderColor:"#ddd",borderWidth:1,padding:10,boxWidth:10,boxHeight:10,boxPadding:3,usePointStyle:!0,callbacks:{label:function(r){let l=r.label||"",c=r.raw,d=r.chart.data.datasets[0].data.filter(f=>typeof f=="number").reduce((f,g)=>f+g,0),u=d>0?Math.round(c/d*100):0;return`${l}: ${c} (${u}%)`}}}},animation:{animateRotate:!0,animateScale:!0,duration:1e3,easing:"easeOutQuart"}}})}}hexToRGBA(i,s){let o=parseInt(i.slice(1,3),16),a=parseInt(i.slice(3,5),16),r=parseInt(i.slice(5,7),16);return`rgba(${o}, ${a}, ${r}, ${s})`}getConnections(){this.loadingConnections.set(!0),this.assetsApiService.getAssetByType(this.assetType,"network-only").pipe(Qe(i=>i.data.assetsByType),Ce(i=>(console.error("Error getting asset by type: CONNECTION:",i),this.loadingConnections.set(!1),ve([]))),Ze(()=>this.loadingConnections.set(!1))).subscribe({next:i=>this.connections.set(i)})}onSuccessManageConnectionModal(){this.showManageConnectionModal.set(!1)}onCloseManageConnectionModal(){this.showManageConnectionModal.set(!1)}setShowManageConnectionModal(i){this.showManageConnectionModal.set(i)}toggleCards(){this.cardExpanded.update(i=>!i),this.cardExpanded()&&(this.loadConnectionsDonutChart(),this.loadConnectionsChart(),this.loadReportsChart(),this.loadAiConversationsChart(),this.loadDataScopesChart(),this.featureUsageData().length>0&&this.loadFeatureUsageChart())}handleReportScroll(){this.cardExpanded()&&this.cardExpanded.set(!1)}addNewConnection(){this.postHogService.capture("HOME: ADD CONNECTION")}viewConnection(){this.postHogService.capture("HOME: VIEW CONNECTION")}addDataSource(){this.postHogService.capture("HOME: NEW DATA SOURCE CONNECTION")}getAiInsights(){this.postHogService.capture("HOME: GET AI INSIGHTS")}changeListType(i){i=="list"?this.listType="category":i=="category"&&(this.listType="list")}getFeatureUsage(){this.loadingFeatureUsage.set(!0),this.meteringService.getAllFeatureUsage().pipe(Ce(i=>(console.error("Error fetching feature usage:",i),this.loadingFeatureUsage.set(!1),ve([]))),Ze(()=>{this.loadingFeatureUsage.set(!1),this.featureUsageData().length>0&&this.cardExpanded()&&setTimeout(()=>this.loadFeatureUsageChart(),0)})).subscribe({next:i=>{this.featureUsageData.set(i.data)}})}loadFeatureUsageChart(){let i=this.featureUsageChartRef();if(!i)return;let s=i.nativeElement,o=s.getContext("2d");if(!o)return;St.register(...Xe);let r=this.featureUsageData().map(u=>({label:(()=>{let f=u.feature.name;return f.includes("Conversations")?"Conversations":f.includes("Connection")?"Connection":f.includes("Questions")?"Questions":f.includes("Report")?"Report":f.includes("Datascopes")?"Datascopes":f})(),count:u.count})).sort(()=>Math.random()-.5),l=r.map(u=>u.label),c=r.map(u=>u.count),h=this.chartColors2.map(u=>{let f=o.createLinearGradient(0,0,0,s.height);return f.addColorStop(0,this.adjustColorBrightness(u,20)),f.addColorStop(1,u),f}),d=this.chartColors2.map(u=>this.adjustColorBrightness(u,-30));this.featureUsageChart=new St(o,{type:"bar",data:{labels:l,datasets:[{label:"Usage Count",data:c,backgroundColor:h.slice(0,c.length),borderColor:d.slice(0,c.length),borderWidth:2,borderRadius:8,barThickness:20,maxBarThickness:30,categoryPercentage:.2,barPercentage:.8,hoverBackgroun
3dColor:this.chartColors2.map(u=>this.adjustColorBrightness(u,-10)),hoverBorderColor:this.chartColors2.map(u=>this.adjustColorBrightness(u,-40))}]},options:{responsive:!0,maintainAspectRatio:!1,indexAxis:"x",scales:{x:{grid:{display:!1},ticks:{font:{size:10},color:"#475467"}},y:{beginAtZero:!0,grid:{display:!0,color:"rgba(200, 200, 200, 0.2)"},ticks:{font:{size:10}}}},plugins:{legend:{display:!1},tooltip:{enabled:!0,backgroundColor:"rgba(0, 0, 0, 0.8)",titleColor:"#FFFFFF",bodyColor:"#E0E0E0",borderColor:"#333333",borderWidth:1,padding:12,cornerRadius:6,boxWidth:10,boxHeight:10,boxPadding:4,usePointStyle:!0,callbacks:{title:function(u){return u[0].label},label:function(u){return`Usage Count: ${u.raw}`}}}},animation:{delay:u=>u.dataIndex*100,easing:"easeOutQuart",duration:1e3}}})}adjustColorBrightness(i,s){let o=parseInt(i.slice(1,3),16),a=parseInt(i.slice(3,5),16),r=parseInt(i.slice(5,7),16);return o=Math.max(0,Math.min(255,o+s)),a=Math.max(0,Math.min(255,a+s)),r=Math.max(0,Math.min(255,r+s)),`#${o.toString(16).padStart(2,"0")}${a.toString(16).padStart(2,"0")}${r.toString(16).padStart(2,"0")}`}loadAiConversationsChart(){let i=this.aiConversationsChartRef()?.nativeElement;if(!i)return;let s=i.getContext("2d");if(!s){console.error("2D context not available for AI conversations chart");return}St.register(...Xe);let o=this.assetInsights()?.conversations?.trend?.direction||"up",a=o==="up"?"#12B76A":"#F04438",r=o==="up"?[0,25,20,55,54]:[54,55,20,25,0],l=s.createLinearGradient(0,0,0,i.height);o==="up"?(l.addColorStop(0,"rgba(18,183,106,0.2)"),l.addColorStop(1,"rgba(18,183,106,0.05)")):(l.addColorStop(0,"rgba(240,68,56,0.2)"),l.addColorStop(1,"rgba(240,68,56,0.05)")),this.aiConversationsChart=new St(s,{type:"line",data:{labels:[1,2,3,4,5],datasets:[{data:r,borderColor:a,backgroundColor:l,fill:!0,tension:.3,pointRadius:0}]},options:{responsive:!0,maintainAspectRatio:!1,scales:{x:{display:!1},y:{display:!1}},plugins:{legend:{display:!1}}}})}loadDataScopesChart(){let i=this.dataScopesChartRef()?.nativeElement;if(!i)return;let s=i.getContext("2d");if(!s){console.error("2D context not available for data scopes chart");return}St.register(...Xe);let o=this.assetInsights()?.dataScopes?.trend?.direction||"up",a=o==="up"?"#12B76A":"#F04438",r=o==="up"?[0,25,20,55,54]:[54,55,20,25,0],l=s.createLinearGradient(0,0,0,i.height);o==="up"?(l.addColorStop(0,"rgba(18,183,106,0.2)"),l.addColorStop(1,"rgba(18,183,106,0.05)")):(l.addColorStop(0,"rgba(240,68,56,0.2)"),l.addColorStop(1,"rgba(240,68,56,0.05)")),this.dataScopesChart=new St(s,{type:"line",data:{labels:[1,2,3,4,5],datasets:[{data:r,borderColor:a,backgroundColor:l,fill:!0,tension:.3,pointRadius:0}]},options:{responsive:!0,maintainAspectRatio:!1,scales:{x:{display:!1},y:{display:!1}},plugins:{legend:{display:!1}}}})}};e.\u0275fac=function(s){return new(s||e)},e.\u0275cmp=ts({type:e,selectors:[["app-home"]],viewQuery:function(s,o){s&1&&(ke(o.connectionsDonutChartRef,wd,5),ke(o.featureUsageChartRef,Sd,5),ke(o.aiConversationsChartRef,Md,5),ke(o.dataScopesChartRef,kd,5)),s&2&&os(4)},standalone:!0,features:[as],decls:28,vars:17,consts:[["dataScopesChart",""],["aiConversationsChart",""],["connectionsDonutChart",""],[1,"p-6","bg-white"],[1,"flex","flex-col","md:flex-row","items-start","md:items-center","justify-between","align-center","mb-4"],[1,"mb-4","md:mb-0"],[1,"text-3xl","font-bold","mb-2"],[1,"text-yellow-500","mr-2"],[1,"bg-clip-text","text-transparent","bg-gradient-to-r","from-[#0575E6]","to-[#021B79]"],[1,"text-sm","text-[#475467]","font-medium"],[1,"flex","items-center"],["routerLink","/dashboard/connections",1,"flex","items-center","text-md","rounded-lg","py-2.5","px-5","text-white","font-medium","bg-[#0575E6]","bg-gradient-to-r","from-[#0575E6]","to-[#021B79]","hover:from-[#0464c9]","hover:to-[#021667]","transition-all","duration-300","shadow-md","hover:shadow-lg","transform","hover:-translate-y-0.5",3,"click","queryParams"],["src","assets/icons/plus.svg","alt","",1,"mr-3"],[1,"relative","mb-6"],[1,"absolute","-top-2","right-2","z-10","w-8","h-8","flex","items-center","justify-center","rounded-full","bg-white","shadow-md","hover:shadow-lg","border","border-[#
3EAECF0]","transition-all","duration-200","hover:scale-110",3,"click","title"],["size","size-4",1,"stroke-current","stroke-2","text-[#0575E6]",3,"name"],[1,"grid","grid-cols-9","gap-4","mb-6","perspective-1000"],[1,"bg-gray-50","rounded-xl","shadow-md","border","border-[#EAECF0]","mb-6","overflow-hidden","hover:shadow-lg","transition-all","duration-300"],[1,"flex","items-center","border-b","[&>li]:py-4","[&>li]:px-8","[&>li]:cursor-pointer"],[1,"transition-all","duration-200",3,"click","ngClass"],[1,"p-4","bg-white","rounded-b-xl"],[1,"col-start-1","col-end-4","row-start-1","row-end-3","rounded-xl","border","border-[#EAECF0]","p-4","hover:shadow-xl","transition-all","duration-500","card-tilt","bg-gradient-to-br","from-white","via-white","to-gray-50","backdrop-blur-lg","card-glow"],[1,"flex","flex-col","h-full","relative"],[1,"absolute","inset-0","overflow-hidden","pointer-events-none"],[1,"card-shine"],[1,"flex","items-center","justify-between","mb-2"],[1,"text-sm","font-semibold","text-[#475467]"],["name","vertical-dots","size","size-3",1,"opacity-60","hover:opacity-100","cursor-pointer","hover:rotate-90","transition-all","duration-300"],[1,"flex","flex-col","items-center","justify-center","mt-2","chart-container"],[1,"pt-3","mt-auto","border-t","text-right"],["routerLink","/dashboard/connections",1,"inline-flex","items-center","text-sm","border","border-[#D0D5DD]","rounded-lg","py-1.5","px-4","font-bold","shadow-sm","hover:shadow","transition-all","duration-300","hover:scale-105",3,"click","ngClass"],[1,"col-start-4","col-span-3","row-start-1","rounded-xl","border","border-[#EAECF0]","p-5","bg-gradient-to-br","from-white","to-gray-50","hover:shadow-xl","transition-all","duration-500","card-tilt","card-glow","relative"],[1,"flex","items-center","justify-between","h-full","relative","z-10"],[1,"flex","flex-col","items-start"],[1,"w-16","mb-3","transform","group-hover:scale-125","group-hover:rotate-6","transition-all","duration-500"],["src","assets/img/scope.png","alt","",1,"group-hover:animate-pulse"],[1,"space-y-1"],[1,"font-bold","text-base","text-[#0575E6]","group-hover:text-[#021B79]","transition-colors","duration-300"],[1,"text-xs","text-gray-500","leading-relaxed"],[1,"w-px","h-16","bg-gradient-to-b","from-[#EAECF0]","to-transparent","mx-6"],[1,"flex","items-end","justify-between","flex-1"],[1,"flex","flex-col","space-y-2"],[1,"flex","items-baseline","space-x-2"],[1,"text-3xl","font-bold","text-[#0575E6]","group-hover:text-[#021B79]","transition-colors","duration-300"],[1,"text-sm","text-gray-600","font-medium"],[1,"flex","items-center","space-x-2"],["alt","",1,"w-4","h-4","trend-bounce",3,"src"],[1,"text-sm","font-bold",3,"ngClass"],[1,"text-xs","text-gray-400","font-medium"],[1,"w-32","h-16","chart-container"],["id","data-scopes-chart",1,"chart-animate"],[1,"absolute","inset-0","bg-gradient-to-br","from-[#0575E6]/5","to-[#021B79]/10","rounded-xl","opacity-0","group-hover:opacity-100","transition-opacity","duration-500"],[1,"col-start-4","col-span-3","row-start-2","rounded-xl","border","border-[#EAECF0]","p-5","bg-gradient-to-br","from-white","via-blue-50/30","to-gray-50","hover:shadow-xl","hover:shadow-blue-100/50","transition-all","duration-500","card-tilt","card-glow","relative","group","overflow-hidden"],[1,"absolute","inset-0","bg-gradient-to-br","from-blue-500/5","via-transparent","to-purple-500/5","opacity-0","group-hover:opacity-100","transition-opacity","duration-700"],[1,"absolute","inset-0","overflow-hidden"],[1,"absolute","top-3","left-3","w-1.5","h-1.5","bg-blue-400/20","rounded-full","animate-pulse"],[1,"absolute","bottom-4","right-6","w-1","h-1","bg-purple-400/20","rounded-full","animate-pulse","animation-delay-500"],[1,"flex","items-center","justify-center","flex-1"],[1,"relative","w-[16rem]","h-[7rem]","overflow-hidden","rounded-lg"],["src","assets/img/connectionsdesign.png","alt","Connections Design",1,"w-full","h-full","object-fill","object-center","drop-shadow-sm"],[1,"flex","flex-col","items-end","space-y-2"],[1,"text-right"],[1,"text-3xl","font-bold","bg-gradient-to-r","from-[#0575E6]","to-[#021B79]","bg-clip-text","text-transparent","group-hover:scale-110","transition-transform","duration-300"],[1,"flex","items-center","justify-end","space-x-2","bg-gray-50/80","rounded-full","px-2","py-1","mt-1","group-hover:bg-blue-50/80","transition-colors","duration-300"],[1,"flex","items-center","space-x-1"],["alt","",1,"w-3","h-3","trend-bounce",3,"src"],[1,"text-xs","font-bold",3,"ngClass"],[1,"absolute","
3inset-0","bg-gradient-to-br","from-[#0575E6]/8","to-[#021B79]/12","rounded-xl","opacity-0","group-hover:opacity-100","transition-opacity","duration-500"],[1,"absolute","top-0","right-0","w-12","h-12","bg-gradient-to-bl","from-blue-500/10","to-transparent","rounded-bl-full","opacity-0","group-hover:opacity-100","transition-opacity","duration-500"],[1,"col-start-7","col-span-3","row-start-1","rounded-xl","border","border-[#EAECF0]","p-5","bg-gradient-to-br","from-white","via-blue-50/30","to-gray-50","hover:shadow-xl","hover:shadow-blue-100/50","transition-all","duration-500","card-tilt","card-glow","relative","group","overflow-hidden"],[1,"relative","w-[14rem]","h-[7rem]","overflow-hidden","rounded-lg"],["src","assets/img/reportIllustration.png","alt","Reports Design",1,"w-full","h-full","object-fill","object-center","drop-shadow-sm"],["routerLink","/dashboard/data-copilot",1,"col-start-7","col-span-3","row-start-2","cursor-pointer","rounded-xl","border","border-[#EAECF0]","p-5","bg-gradient-to-br","from-white","to-gray-50","hover:shadow-xl","hover:border-[#0575E6]","transition-all","duration-500","card-tilt","card-glow","group","ai-card","relative","overflow-hidden","active:scale-95","hover:scale-105",3,"click"],[1,"absolute","inset-0","bg-gradient-to-r","from-transparent","via-white/20","to-transparent","-translate-x-full","group-hover:translate-x-full","transition-transform","duration-1000"],[1,"absolute","inset-0","bg-gradient-to-r","from-[#0575E6]/10","to-[#021B79]/5","rounded-xl","opacity-0","group-hover:opacity-100","transition-all","duration-700","scale-0","group-hover:scale-100"],[1,"w-12","mb-3","transform","group-hover:scale-125","group-hover:rotate-6","transition-all","duration-500"],["src","assets/img/chip.png","alt","",1,"group-hover:animate-pulse"],["id","ai-conversations-chart",1,"chart-animate"],[1,"flex","items-center","justify-center","py-4"],[1,"w-40","py-2"],["src","assets/img/sand-clock.png","alt","",1,"w-full","h-auto","animate-pulse"],[1,"text-sm","text-center","text-[#475467]","px-2"],[1,"donut-chart-container","relative","w-48","h-48"],["id","connections-donut-chart","width","180","height","180",1,"chart-animate",2,"font-family","'Arial', sans-serif"],[1,"absolute","inset-0","flex","items-center","justify-center","flex-col"],[1,"text-3xl","font-bold","text-[#0575E6]"],[1,"text-xs","text-gray-500"],[1,"flex","flex-wrap","justify-center","gap-2","mt-2"],[1,"flex","items-center","chart-legend-item"],[1,"w-3","h-3","rounded-sm","mr-1",3,"ngStyle"],[1,"text-xs"],[1,"flex","flex-col","items-center","py-16"],[3,"assetType","assetsInput","assetHeight"],[1,"mb-6","w-40","animate-float"],["src","assets/img/clouds.svg","alt","",1,"w-full","h-auto"],[1,"text-xl","font-bold","mb-3","text-[#0575E6]"],[1,"mb-6","text-center","text-gray-600","max-w-md"],["routerLink","/dashboard/connections",1,"inline-flex","items-center","py-2","px-5","bg-[#0575E6]","text-white","rounded-lg","font-medium","hover:bg-[#0464c9]","transition-colors","duration-300","shadow-sm","hover:shadow",3,"queryParams"],["src","assets/icons/plus.svg","alt","",1,"mr-2","w-4","h-4"],[3,"showManageAssetModal","refreshAssets","onScroll","assetType","assetsInput","assetHeight"],[3,"listType","assetType","assetsInput","assetHeight"],["src","assets/img/clouds.svg","alt","No reports available",1,"w-full","h-auto"],[1,"text-xl","font-bold","mb-3","text-[#021B79]"],["routerLink","/dashboard/reports",1,"inline-flex","items-center","py-2","px-5","bg-[#021B79]","text-white","rounded-lg","font-medium","hover:bg-[#021667]","transition-colors","duration-300","shadow-sm","hover:shadow"],[3,"changeListType","refreshAssets","onScroll","listType","assetType","assetsInput","assetHeight"],[3,"close","success"]],template:function(s,o){s&1&&(M(0,"section",3)(1,"div",4)(2,"div",5)(3,"h1",6)(4,"span",7),L(5,"\u{1F44B}"),k(),M(6,"span",8),L(7),k()(),M(8,"p",9),L(9,"Pick up from where you left off"),k()(),M(10,"div",10)(11,"a",11),bt("click",function(){return o.addNewConnection()}),E(12,"img",12),L(13," Add New Connection "),k()()(),M(14,"div",13)(15,"button",14),bt("click",function(){return o.toggleCards()}),E(16,"ui-icon",15),k()(),Mt(17,Ed,127,34,"div",16),M(18,"div",17)(19,"ul",18)(20,"li",19),bt("click",function(){return o.setActiveTab("connections")}),L(21," Your Connections "),k(),M(22,"li",19),bt("click",function(){return o.setActiveTab("reports")}),L(23," Your Reports "),k()(),M(24,"div",20),Mt(25,zd,2,2)(26,Wd,2,2),k()()(),Mt(27,jd,1,0,"app-manage-connection")),s&2&&(T(7),se(o.userFirstName()),T(4),Q("queryParams",Vn(10,za)),T(4),ss("title",o.cardExpanded()?"Collapse View":"Expand View"),T(),Q("name",o.cardExpanded()?"chevron-up":"chevron-down"),T(),it(17,o.cardExpanded()?17:-1),T(3),Q("ngClass",Lt(11,Fa,o.activeTab()==="connections",o.activeTab()!=="connections")),T(2),Q("ngClass",Lt(14,Fa,o.activeTab()==="reports",o.activeTab()!=="reports")),T(3),it(25,o.activeTab()==="connections"?25:-1),T(),it(26,o.activeTab()==="reports"?26:-1),T(),it(27,o.showManageConnectionModal()?27:-1))},dependencies:[bs,cs,hs,us,ds,_s,ys,ms],styles:[`.animate-float[_ngcontent-%COMP%] { 4 animation: _ngcontent-%COMP%_float 3s ease-in-out infinite; 5 } 6 7 @keyframes _ngcontent-%COMP%_float { 8 0% { transform: translateY(0px); } 9 50% { transform: translateY(-10px); } 10 100% { transform: translateY(0px); } 11 } 12 13 .animate-pulse-slow[_ngcontent-%COMP%] { 14 animation: _ngcontent-%COMP%_pulseSlow 4s ease-in-out infinite; 15 } 16 17 @keyframes _ngcontent-%COMP%_pulseSlow { 18 0% { transform: scale(1); opacity: 0.2; } 19 50% { transform: scale(1.5); opacity: 0.1; } 20 100% { transform: scale(1); opacity: 0.2; } 21 } 22 23 .animation-delay-500[_ngcontent-%COMP%] { 24 animation-delay: 1.5s; 25 } 26 27 28 29 .perspective-1000[_ngcontent-%COMP%] { 30 perspective: 1000px; 31 } 32 33 .card-tilt[_ngcontent-%COMP%] { 34 transition: transform 0.5s ease, box-shadow 0.5s ease; 35 } 36 37 .card-tilt[_ngcontent-%COMP%]:hover { 38 transform: translateY(-5px) rotateX(2deg) rotateY(2deg); 39 } 40 41 .card-glow[_ngcontent-%COMP%] { 42 position: relative; 43 overflow: hidden; 44 } 45 46 .card-glow[_ngcontent-%COMP%]:hover { 47 box-shadow: 0 10px 25px -5px rgba(5, 117, 230, 0.1), 0 8px 10px -6px rgba(2, 27, 121, 0.1); 48 } 49 50 .card-shine[_ngcontent-%COMP%] { 51 position: absolute; 52 top: 0; 53 left: 0; 54 right: 0; 55 bottom: 0; 56 background: linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%); 57 transform: translateX(-100%); 58 opacity: 0; 59 transition: opacity 0.3s ease; 60 pointer-events: none; 61 } 62 63 .card-glow[_ngcontent-%COMP%]:hover .card-shine[_ngcontent-%COMP%] { 64 opacity: 1; 65 animation: _ngcontent-%COMP%_shine 1.5s ease-in-out; 66 } 67 68 @keyframes _ngcontent-%COMP%_shine { 69 0% { transform: translateX(-100%); } 70 100% { transform: translateX(100%); } 71 } 72 73 .chart-container[_ngcontent-%COMP%] { 74 position: relative; 75 } 76 77 .chart-animate[_ngcontent-%COMP%] { 78 animation: _ngcontent-%COMP%_fadeIn 1s ease; 79 } 80 81 @keyframes _ngcontent-%COMP%_fadeIn { 82 from { opacity: 0; transform: scale(0.9); } 83 to { opacity: 1; transform: scale(1); } 84 } 85 86 .counter-anim[_ngcontent-%COMP%] { 87 animation: _ngcontent-%COMP%_countUp 1.5s ease forwards; 88 opacity: 0; 89 animation-delay: 0.2s; 90 } 91 92 @keyframes _ngcontent-%COMP%_countUp { 93 from { opacity: 0; transform: translateY(10px); } 94 to { opacity: 1; transform: translateY(0); } 95 } 96 97 .trend-bounce[_ngcontent-%COMP%] { 98 transition: transform 0.3s ease; 99 } 100 101 .trend-bounce[_ngcontent-%COMP%]:hover { 102 transform: scale(1.3); 103 } 104 105 .ai-pulse[_ngcontent-%COMP%] { 106 animation: _ngcontent-%COMP%_aiPulse 3s ease-in-out infinite; 107 } 108 109 @keyframes _ngcontent-%COMP%_aiPulse { 110 0%, 100% { transform: scale(1); opacity: 0.2; } 111 50% { transform: scale(1.8); opacity: 0.5; } 112 } 113 114 .ai-card[_ngcontent-%COMP%]:hover { 115 background: linear-gradient(225deg, rgba(255,255,255,0.8) 0%, rgba(240,245,255,0.9) 100%); 116 border-width: 2px; 117 transform: translateY(-10px) rotateX(5deg) rotateY(5deg) scale(1.02); 118 } 119 120 121 122 .animation-delay-1000[_ngcontent-%COMP%] { 123 animation-delay: 1s; 124 } 125 126 .animation-delay-500[_ngcontent-%COMP%] { 127 animation-delay: 0.5s; 128 } 129 130 131 132 .group[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%] { 133 filter: brightness(1.05) contrast(1.05); 134 } 135 136 137 138 .card-tilt[_ngcontent-%COMP%]:hover { 139 transform: translateY(-8px) rotateX(3deg) rotateY(3deg); 140 box-shadow: 141 0 20px 25px -5px rgba(5, 117, 230, 0.15), 142 0 10px 10px -5px rgba(2, 27, 121, 0.1), 143 0 0 0 1px rgba(5, 117, 230, 0.1); 144 } 145 146 147 148 .bg-gradient-to-r[_ngcontent-%COMP%] { 149 background-size: 200% 200%; 150 } 151 152 .group[_ngcontent-%COMP%]:hover .bg-gradient-to-r[_ngcontent-%COMP%] { 153 animation: _ngcontent-%COMP%_gradientShift 2s ease infinite; 154 } 155 156 @keyframes _ngcontent-%COMP%_gradientShift { 157 0% { background-position: 0% 50%; } 158 50% { background-position: 100% 50%; } 159 100% { background-position: 0% 50%; } 160 } 161 162 163 164 .animate-pulse[_ngcontent-%COMP%] { 165 animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; 166 } 167 168 169 170 .drop-shadow-sm[_ngcontent-%COMP%] { 171 filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.05)); 172 } 173 174 .drop-shadow-md[_ngcontent-%COMP%] { 175 filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1)); 176 }`],changeDetection:0});let n=e;return n})();export{pu as HomeComponent};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.