vendor: 4,185 bytes, line 1
1"use strict";(self.webpackChunkbh_admin=self.webpackChunkbh_admin||[]).push([[788],{4788:(Kh,Ni,q)=>{q.r(Ni),q.d(Ni,{DashboardModule:()=>Gh});var Je=q(2881),g=q(1360),po=q(6241);function Bt(e){return e+.5|0}const ct=(e,i,t)=>Math.max(Math.min(e,t),i);function Gt(e){return ct(Bt(2.55*e),0,255)}function xt(e){return ct(Bt(255*e),0,255)}function ht(e){return ct(Bt(e/2.55)/100,0,1)}function Vi(e){return ct(Bt(100*e),0,100)}const st={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},qe=[..."0123456789ABCDEF"],mo=e=>qe[15&e],bo=e=>qe[(240&e)>>4]+qe[15&e],be=e=>(240&e)>>4==(15&e);const ko=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Wi(e,i,t){const s=i*Math.min(t,1-t),n=(o,r=(o+e/30)%12)=>t-s*Math.max(Math.min(r-3,9-r,1),-1);return[n(0),n(8),n(4)]}function Mo(e,i,t){const s=(n,o=(n+e/60)%6)=>t-t*i*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function So(e,i,t){const s=Wi(e,1,.5);let n;for(i+t>1&&(n=1/(i+t),i*=n,t*=n),n=0;n<3;n++)s[n]*=1-i-t,s[n]+=i;return s}function Qe(e){const t=e.r/255,s=e.g/255,n=e.b/255,o=Math.max(t,s,n),r=Math.min(t,s,n),a=(o+r)/2;let l,c,h;return o!==r&&(h=o-r,c=a>.5?h/(2-o-r):h/(o+r),l=function wo(e,i,t,s,n){return e===n?(i-t)/s+(i<t?6:0):i===n?(t-e)/s+2:(e-i)/s+4}(t,s,n,h,o),l=60*l+.5),[0|l,c||0,a]}function Ze(e,i,t,s){return(Array.isArray(i)?e(i[0],i[1],i[2]):e(i,t,s)).map(xt)}function ti(e,i,t){return Ze(Wi,e,i,t)}function Hi(e){return(e%360+360)%360}const $i={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"},Yi={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let xe;const Lo=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,ei=e=>
1e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055,jt=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function _e(e,i,t){if(e){let s=Qe(e);s[i]=Math.max(0,Math.min(s[i]+s[i]*t,0===i?360:1)),s=ti(s),e.r=s[0],e.g=s[1],e.b=s[2]}}function Ui(e,i){return e&&Object.assign(i||{},e)}function Xi(e){var i={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(i={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(i.a=xt(e[3]))):(i=Ui(e,{r:0,g:0,b:0,a:1})).a=xt(i.a),i}function zo(e){return"r"===e.charAt(0)?function Fo(e){const i=Lo.exec(e);let s,n,o,t=255;if(i){if(i[7]!==s){const r=+i[7];t=i[8]?Gt(r):ct(255*r,0,255)}return s=+i[1],n=+i[3],o=+i[5],s=255&(i[2]?Gt(s):ct(s,0,255)),n=255&(i[4]?Gt(n):ct(n,0,255)),o=255&(i[6]?Gt(o):ct(o,0,255)),{r:s,g:n,b:o,a:t}}}(e):function Co(e){const i=ko.exec(e);let s,t=255;if(!i)return;i[5]!==s&&(t=i[6]?Gt(+i[5]):xt(+i[5]));const n=Hi(+i[2]),o=+i[3]/100,r=+i[4]/100;return s="hwb"===i[1]?function Do(e,i,t){return Ze(So,e,i,t)}(n,o,r):"hsv"===i[1]?function Po(e,i,t){return Ze(Mo,e,i,t)}(n,o,r):ti(n,o,r),{r:s[0],g:s[1],b:s[2],a:t}}(e)}class Nt{constructor(i){if(i instanceof Nt)return i;const t=typeof i;let s;"object"===t?s=Xi(i):"string"===t&&(s=function _o(e){var t,i=e.length;return"#"===e[0]&&(4===i||5===i?t={r:255&17*st[e[1]],g:255&17*st[e[2]],b:255&17*st[e[3]],a:5===i?17*st[e[4]]:255}:(7===i||9===i)&&(t={r:st[e[1]]<<4|st[e[2]],g:st[e[3]]<<4|st[e[4]],b:st[e[5]]<<4|st[e[6]],a:9===i?st[e[7]]<<4|st[e[8]]:255})),t}(i)||function To(e){xe||(xe=function Ro(){const e={},i=Object.keys(Yi),t=Object.keys($i);let s,n,o,r,a;for(s=0;s<i.length;s++){for(r=a=i[s],n=0;n<t.length;n++)o=t[n],a=a.replace(o,$i[o]);o=parseInt(Yi[r],16),e[a]=[o>>16&255,o>>8&255,255&o]}return e}(),xe.transparent=[0,0,0,0]);const i=xe[e.toLowerCase()];return i&&{r:i[0],g:i[1],b:i[2],a:4===i.length?i[3]:255}}(i)||zo(i)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var i=Ui(this._rgb);return i&&(i.a=ht(i.a)),i}set rgb(i){this._rgb=Xi(i)}rgbString(){return this._valid?function Io(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${ht(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}(this._rgb):void 0}hexString(){return this._valid?function vo(e){var i=(e=>be(e.r)&&be(e.g)&&be(e.b)&&be(e.a))(e)?mo:bo;return e?"#"+i(e.r)+i(e.g)+i(e.b)+((e,i)=>e<255?i(e):"")(e.a,i):void 0}(this._rgb):void 0}hslString(){return this._valid?function Ao(e){if(!e)return;const i=Qe(e),t=i[0],s=Vi(i[1]),n=Vi(i[2]);return e.a<255?`hsla(${t}, ${s}%, ${n}%, ${ht(e.a)})`:`hsl(${t}, ${s}%, ${n}%)`}(this._rgb):void 0}mix(i,t){if(i){const s=this.rgb,n=i.rgb;let o;const r=t===o?.5:t,a=2*r-1,l=s.a-n.a,c=((a*l==-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,s.r=255&c*s.r+o*n.r+.5,s.g=255&c*s.g+o*n.g+.5,s.b=255&c*s.b+o*n.b+.5,s.a=r*s.a+(1-r)*n.a,this.rgb=s}return this}interpolate(i,t){return i&&(this._rgb=function Eo(e,i,t){const s=jt(ht(e.r)),n=jt(ht(e.g)),o=jt(ht(e.b));return{r:xt(ei(s+t*(jt(ht(i.r))-s))),g:xt(ei(n+t*(jt(ht(i.g))-n))),b:xt(ei(o+t*(jt(ht(i.b))-o))),a:e.a+t*(i.a-e.a)}}(this._rgb,i._rgb,t)),this}clone(){return new Nt(this.rgb)}alpha(i){return this._rgb.a=xt(i),this}clearer(i){return this._rgb.a*=1-i,this}greyscale(){const i=this._rgb,t=Bt(.3*i.r+.59*i.g+.11*i.b);return i.r=i.g=i.b=t,this}opaquer(i){return this._rgb.a*=1+i,this}negate(){const i=this._rgb;return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,this}lighten(i){return _e(this._rgb,2,i),this}darken(i){return _e(this._rgb,2,-i),this}saturate(i){return _e(this._rgb,1,i),this}desaturate(i){return _e(this._rgb,1,-i),this}rotate(i){return function Oo(e,i){var t=Qe(e);t[0]=Hi(t[0]+i),t=ti(t),e.r=t[0],e.g=t[1],e.b=t[2]}(this._rgb,i),this}}function dt(){}const Bo=(()=>{let e=0;return()=>e++})();function A(e){return null==e}function E(e){if(Array.isArray&&Array.isArray(e))return!0;const i=Object.prototype.toString.call(e);return"[object"===i.slice(0,7)&&"Array]"===i.slice(-6)}function R(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function V(e){return("number"==typeof e||e instanceof Number)&&isFinite(+e)}function tt(e,i){return V(e)?e:i}
1function P(e,i){return typeof e>"u"?i:e}const Gi=(e,i)=>"string"==typeof e&&e.endsWith("%")?parseFloat(e)/100*i:+e;function I(e,i,t){if(e&&"function"==typeof e.call)return e.apply(t,i)}function L(e,i,t,s){let n,o,r;if(E(e))if(o=e.length,s)for(n=o-1;n>=0;n--)i.call(t,e[n],n);else for(n=0;n<o;n++)i.call(t,e[n],n);else if(R(e))for(r=Object.keys(e),o=r.length,n=0;n<o;n++)i.call(t,e[r[n]],r[n])}function ye(e,i){let t,s,n,o;if(!e||!i||e.length!==i.length)return!1;for(t=0,s=e.length;t<s;++t)if(n=e[t],o=i[t],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function ve(e){if(E(e))return e.map(ve);if(R(e)){const i=Object.create(null),t=Object.keys(e),s=t.length;let n=0;for(;n<s;++n)i[t[n]]=ve(e[t[n]]);return i}return e}function Ki(e){return-1===["__proto__","prototype","constructor"].indexOf(e)}function No(e,i,t,s){if(!Ki(e))return;const n=i[e],o=t[e];R(n)&&R(o)?Kt(n,o,s):i[e]=ve(o)}function Kt(e,i,t){const s=E(i)?i:[i],n=s.length;if(!R(e))return e;const o=(t=t||{}).merger||No;let r;for(let a=0;a<n;++a){if(r=s[a],!R(r))continue;const l=Object.keys(r);for(let c=0,h=l.length;c<h;++c)o(l[c],e,r,t)}return e}function Jt(e,i){return Kt(e,i,{merger:Vo})}function Vo(e,i,t){if(!Ki(e))return;const s=i[e],n=t[e];R(s)&&R(n)?Jt(s,n):Object.prototype.hasOwnProperty.call(i,e)||(i[e]=ve(n))}const Ji={"":e=>e,x:e=>e.x,y:e=>e.y};function _t(e,i){return(Ji[i]||(Ji[i]=function Ho(e){const i=function Wo(e){const i=e.split("."),t=[];let s="";for(const n of i)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(t.push(s),s="");return t}(e);return t=>{for(const s of i){if(""===s)break;t=t&&t[s]}return t}}(i)))(e)}function ii(e){return e.charAt(0).toUpperCase()+e.slice(1)}const qt=e=>typeof e<"u",yt=e=>"function"==typeof e,qi=(e,i)=>{if(e.size!==i.size)return!1;for(const t of e)if(!i.has(t))return!1;return!0},z=Math.PI,B=2*z,Yo=B+z,ke=Number.POSITIVE_INFINITY,Uo=z/180,W=z/2,wt=z/4,Qi=2*z/3,vt=Math.log10,rt=Math.sign;function Qt(e,i,t){return Math.abs(e-i)<t}function Zi(e){const i=Math.round(e);e=Qt(e,i,e/1e3)?i:e;const t=Math.pow(10,Math.floor(vt(e))),s=e/t;return(s<=1?1:s<=2?2:s<=5?5:10)*t}function Vt(e){return!function Go(e){return"symbol"==typeof e||"object"==typeof e&&null!==e&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function ts(e,i,t){let s,n,o;for(s=0,n=e.length;s<n;s++)o=e[s][t],isNaN(o)||(i.min=Math.min(i.min,o),i.max=Math.max(i.max,o))}function nt(e){return e*(z/180)}function si(e){return e*(180/z)}function es(e){if(!V(e))return;let i=1,t=0;for(;Math.round(e*i)/i!==e;)i*=10,t++;return t}function is(e,i){const t=i.x-e.x,s=i.y-e.y,n=Math.sqrt(t*t+s*s);let o=Math.atan2(s,t);return o<-.5*z&&(o+=B),{angle:o,distance:n}}function ni(e,i){return Math.sqrt(Math.pow(i.x-e.x,2)+Math.pow(i.y-e.y,2))}function Jo(e,i){return(e-i+Yo)%B-z}function et(e){return(e%B+B)%B}function Zt(e,i,t,s){const n=et(e),o=et(i),r=et(t),a=et(o-n),l=et(r-n),c=et(n-o),h=et(n-r);return n===o||n===r||s&&o===r||a>l&&c<h}function Y(e,i,t){return Math.max(i,Math.min(t,e))}function ut(e,i,t,s=1e-6){return e>=Math.min(i,t)-s&&e<=Math.max(i,t)+s}function oi(e,i,t){t=t||(r=>e[r]<i);let o,s=e.length-1,n=0;for(;s-n>1;)o=n+s>>1,t(o)?n=o:s=o;return{lo:n,hi:s}}const ft=(e,i,t,s)=>oi(e,t,s?n=>{const o=e[n][i];return o<t||o===t&&e[n+1][i]===t}:n=>e[n][i]<t),Qo=(e,i,t)=>oi(e,t,s=>e[s][i]>=t),ss=["push","pop","shift","splice","unshift"];function ns(e,i){const t=e._chartjs;if(!t)return;const s=t.listeners,n=s.indexOf(i);-1!==n&&s.splice(n,1),!(s.length>0)&&(ss.forEach(o=>{delete e[o]}),delete e._chartjs)}function os(e){const i=new Set(e);return i.size===e.length?e:Array.from(i)}const rs=typeof window>"u"?function(e){return e()}:window.requestAnimationFrame;function as(e,i){let t=[],s=!1;return function(...n){t=n,s||(s=!0,rs.call(window,()=>{s=!1,e.apply(i,t)}))}}const ri=e=>"start"===e?"left":"end"===e?"right":"center",X=(e,i,t)=>"start"===e?i:"end"===e?t:(i+t)/2;function ls(e,i,t){const s=i.length;let n=0,o=s;if(e._sorted){const{iScale:r,vScale:a,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,h=r.axis,{min:d,max:u,minDefined:f,maxDefined:p}=r.getUserBounds();if(f){if(n=Math.min(ft(l,h,d).lo,t?s:ft(i,h,r.getPixelForValue(d)).lo),c){const m=l.slice(0,n+1).reverse().findIndex(b=>!A(b[a.axis]));n-=Math.max(0,m)}n=Y(n,0,s-1)}if(p){let m=Math.max(ft(l,r.axis,u,!0).hi+1,t?0:ft(i,h,r.getPixelForValue(u),!0).hi+1);if(c){const b=l.slice(m-1).findIndex(x=>!A(x[a.axis]));m+=Math.max(0,b)}o=Y(m,n,s)-n}else o=s-n}return{start:n,count:o}}function cs(e){const{xScale:i,yScale:t,_scaleRanges:s}=e,n={xmin:i.min,xmax:i.max,ymin:t.min,ymax:t.max};if(!s)return e._scaleRanges=n,!0;const o=s.xmin!==i.min||s.xmax!==i.max||s.ymin!==t.min||s.ymax!==t.max;return Object.assign(s,n),o}const Me=e=>0===e||1===e,hs=(e,i,t)=>
1-Math.pow(2,10*(e-=1))*Math.sin((e-i)*B/t),ds=(e,i,t)=>Math.pow(2,-10*e)*Math.sin((e-i)*B/t)+1,te={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>1-Math.cos(e*W),easeOutSine:e=>Math.sin(e*W),easeInOutSine:e=>-.5*(Math.cos(z*e)-1),easeInExpo:e=>0===e?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>Me(e)?e:e<.5?.5*Math.pow(2,10*(2*e-1)):.5*(2-Math.pow(2,-10*(2*e-1))),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Me(e)?e:hs(e,.075,.3),easeOutElastic:e=>Me(e)?e:ds(e,.075,.3),easeInOutElastic:e=>Me(e)?e:e<.5?.5*hs(2*e,.1125,.45):.5+.5*ds(2*e-1,.1125,.45),easeInBack:e=>e*e*(2.70158*e-1.70158),easeOutBack:e=>(e-=1)*e*(2.70158*e+1.70158)+1,easeInOutBack(e){let i=1.70158;return(e/=.5)<1?e*e*((1+(i*=1.525))*e-i)*.5:.5*((e-=2)*e*((1+(i*=1.525))*e+i)+2)},easeInBounce:e=>1-te.easeOutBounce(1-e),easeOutBounce:e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,easeInOutBounce:e=>e<.5?.5*te.easeInBounce(2*e):.5*te.easeOutBounce(2*e-1)+.5};function ai(e){if(e&&"object"==typeof e){const i=e.toString();return"[object CanvasPattern]"===i||"[object CanvasGradient]"===i}return!1}function us(e){return ai(e)?e:new Nt(e)}function li(e){return ai(e)?e:new Nt(e).saturate(.5).darken(.1).hexString()}const sr=["x","y","borderWidth","radius","tension"],nr=["color","borderColor","backgroundColor"],fs=new Map;function ee(e,i,t){return function ar(e,i){i=i||{};const t=e+JSON.stringify(i);let s=fs.get(t);return s||(s=new Intl.NumberFormat(e,i),fs.set(t,s)),s}(i,t).format(e)}const gs={values:e=>E(e)?e:""+e,numeric(e,i,t){if(0===e)return"0";const s=this.chart.options.locale;let n,o=e;if(t.length>1){const c=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(c<1e-4||c>1e15)&&(n="scientific"),o=function lr(e,i){let t=i.length>3?i[2].value-i[1].value:i[1].value-i[0].value;return Math.abs(t)>=1&&e!==Math.floor(e)&&(t=e-Math.floor(e)),t}(e,t)}const r=vt(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:n,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),ee(e,s,l)},logarithmic(e,i,t){if(0===e)return"0";const s=t[i].significand||e/Math.pow(10,Math.floor(vt(e)));return[1,2,3,5,10,15].includes(s)||i>.8*t.length?gs.numeric.call(this,e,i,t):""}};var Se={formatters:gs};const Dt=Object.create(null),ci=Object.create(null);function ie(e,i){if(!i)return e;const t=i.split(".");for(let s=0,n=t.length;s<n;++s){const o=t[s];e=e[o]||(e[o]=Object.create(null))}return e}function hi(e,i,t){return"string"==typeof i?Kt(ie(e,i),t):Kt(ie(e,""),i)}class hr{constructor(i,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=s=>s.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=(s,n)=>li(n.backgroundColor),this.hoverBorderColor=(s,n)=>li(n.borderColor),this.hoverColor=(s,n)=>li(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={}
vendor: 10,622 bytes, line 1
1,this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(i),this.apply(t)}set(i,t){return hi(this,i,t)}get(i){return ie(this,i)}describe(i,t){return hi(ci,i,t)}override(i,t){return hi(Dt,i,t)}route(i,t,s,n){const o=ie(this,i),r=ie(this,s),a="_"+t;Object.defineProperties(o,{[a]:{value:o[t],writable:!0},[t]:{enumerable:!0,get(){const l=this[a],c=r[n];return R(l)?Object.assign({},c,l):P(l,c)},set(l){this[a]=l}}})}apply(i){i.forEach(t=>t(this))}}var j=new hr({_scriptable:e=>!e.startsWith("on"),_indexable:e=>"events"!==e,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function or(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:i=>"onProgress"!==i&&"onComplete"!==i&&"fn"!==i}),e.set("animations",{colors:{type:"color",properties:nr},numbers:{type:"number",properties:sr}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:i=>0|i}}}})},function rr(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function cr(e){e.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:(i,t)=>t.lineWidth,tickColor:(i,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:Se.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:i=>!i.startsWith("before")&&!i.startsWith("after")&&"callback"!==i&&"parser"!==i,_indexable:i=>"borderDash"!==i&&"tickBorderDash"!==i&&"dash"!==i}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:i=>"backdropPadding"!==i&&"callback"!==i,_indexable:i=>"backdropPadding"!==i})}]);function we(e,i,t,s,n){let o=i[n];return o||(o=i[n]=e.measureText(n).width,t.push(n)),o>s&&(s=o),s}function ur(e,i,t,s){let n=(s=s||{}).data=s.data||{},o=s.garbageCollect=s.garbageCollect||[];s.font!==i&&(n=s.data={},o=s.garbageCollect=[],s.font=i),e.save(),e.font=i;let r=0;const a=t.length;let l,c,h,d,u;for(l=0;l<a;l++)if(d=t[l],null==d||E(d)){if(E(d))for(c=0,h=d.length;c<h;c++)u=d[c],null!=u&&!E(u)&&(r=we(e,n,o,r,u))}else r=we(e,n,o,r,d);e.restore();const f=o.length/2;if(f>t.length){for(l=0;l<f;l++)delete n[o[l]];o.splice(0,f)}return r}function Pt(e,i,t){const s=e.currentDevicePixelRatio,n=0!==t?Math.max(t/2,.5):0;return Math.round((i-n)*s)/s+n}function ps(e,i){!i&&!e||((i=i||e.getContext("2d")).save(),i.resetTransform(),i.clearRect(0,0,e.width,e.height),i.restore())}function di(e,i,t,s){ms(e,i,t,s,null)}function ms(e,i,t,s,n){let o,r,a,l,c,h,d,u;const f=i.pointStyle,p=i.rotation,m=i.radius;let b=(p||0)*Uo;if(f&&"object"==typeof f&&(o=f.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return e.save(),e.translate(t,s),e.rotate(b),e.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),void e.restore();if(!(isNaN(m)||m<=0)){switch(e.beginPath(),f){default:n?e.ellipse(t,s,n/2,m,0,0,B):e.arc(t,s,m,0,B),e.closePath();break;case"triangle":h=n?n/2:m,e.moveTo(t+Math.sin(b)*h,s-Math.cos(b)*m),b+=Qi,e.lineTo(t+Math.sin(b)*h,s-Math.cos(b)*m),b+=Qi,e.lineTo(t+Math.sin(b)*h,s-Math.cos(b)*m),e.closePath();break;case"rectRounded":c=.516*m,l=m-c,r=Math.cos(b+wt)*l,d=Math.cos(b+wt)*(n?n/2-c:l),a=Math.sin(b+wt)*l,u=Math.sin(b+wt)*(n?n/2-c:l),e.arc(t-d,s-a,c,b-z,b-W),e.arc(t+u,s-r,c,b-W,b),e.arc(t+d,s+a,c,b,b+W),e.arc(t-u,s+r,c,b+W,b+z),e.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*m,h=n?n/2:l,e.rect(t-h,s-l,2*h,2*l);break}b+=wt;case"rectRot":d=Math.cos(b)*(n?n/2:m),r=Math.cos(b)*m,a=Math.sin(b)*m,u=Math.sin(b)*(n?n/2:m),e.moveTo(t-d,s-a),e.lineTo(t+u,s-r),e.lineTo(t+d,s+a),e.lineTo(t-u,s+r),e.closePath();break;case"crossRot":b+=wt;case"cross":d=Math.cos(b)*(n?n/2:m),r=Math.cos(b)*m,a=Math.sin(b)*m,u=Math.sin(b)*(n?n/2:m),e.moveTo(t-d,s-a),e.lineTo(t+d,s+a),e.moveTo(t+u,s-r),e.lineTo(t-u,s+r);break;case"star":d=Math.cos(b)*(n?n/2:m),r=Math.cos(b)*m,a=Math.sin(b)*m,u=Math.sin(b)*(n?n/2:m),e.moveTo(t-d,s-a),e.lineTo(t+d,s+a),e.moveTo(t+u,s-r),e.lineTo(t-u,s+r),b+=wt,d=Math.cos(b)*(n?n/2:m),r=Math.cos(b)*m,a=Math.sin(b)*m,u=Math.sin(b)*(n?n/2:m),e.moveTo(t-d,s-a),e.lineTo(t+d,s+a),e.moveTo(t+u,s-r),e.lineTo(t-u,s+r);break;case"line":r=n?n/2:Math.cos(b)*m,a=Math.sin(b)*m,e.moveTo(t-r,s-a),e.lineTo(t+r,s+a);break;case"dash":e.moveTo(t,s),e.lineTo(t+Math.cos(b)*(n?n/2:m),s+Math.sin(b)*m);break;case!1:e.closePath()}e.fill(),i.borderWidth>0&&e.stroke()}}function gt(e,i,t){return t=t||.5,!i||e&&e.x>i.left-t&&e.x<i.right+t&&e.y>i.top-t&&e.y<i.bottom+t}function De(e,i){e.save(),e.beginPath(),e.rect(i.left,i.top,i.right-i.left,i.bottom-i.top),e.clip()}function Pe(e){e.restore()}function fr(e,i,t,s,n){if(!i)return e.lineTo(t.x,t.y);if("middle"===n){const o=(i.x+t.x)/2;e.lineTo(o,i.y),e.lineTo(o,t.y)}else"after"===n!=!!s?e.lineTo(i.x,t.y):e.lineTo(t.x,i.y);e.lineTo(t.x,t.y)}function gr(e,i,t,s){if(!i)return e.lineTo(t.x,t.y);e.bezierCurveTo(s?i.cp1x:i.cp2x,s?i.cp1y:i.cp2y,s?t.cp2x:t.cp1x,s?t.cp2y:t.cp1y,t.x,t.y)}function mr(e,i,t,s,n){if(n.strikethrough||n.underline){const o=e.measureText(s),r=i-o.actualBoundingBoxLeft,a=i+o.actualBoundingBoxRight,c=t+o.actualBoundingBoxDescent,h=n.strikethrough?(t-o.actualBoundingBoxAscent+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=n.decorationWidth||2,e.moveTo(r,h),e.lineTo(a,h),e.stroke()}}function br(e,i){const t=e.fillStyle;e.fillStyle=i.color,e.fillRect(i.left,i.top,i.width,i.height),e.fillStyle=t}function Ct(e,i,t,s,n,o={}){const r=E(i)?i:[i],a=o.strokeWidth>0&&""!==o.strokeColor;let l,c;for(e.save(),e.font=n.string,function pr(e,i){i.translation&&e.translate(i.translation[0],i.translation[1]),A(i.rotation)||e.rotate(i.rotation),i.color&&(e.fillStyle=i.color),i.textAlign&&(e.textAlign=i.textAlign),i.textBaseline&&(e.textBaseline=i.textBaseline)}(e,o),l=0;l<r.length;++l)c=r[l],o.backdrop&&br(e,o.backdrop),a&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),A(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(c,t,s,o.maxWidth)),e.fillText(c,t,s,o.maxWidth),mr(e,t,s,c,o),s+=Number(n.lineHeight);e.restore()}function se(e,i){const{x:t,y:s,w:n,h:o,radius:r}=i;e.arc(t+r.topLeft,s+r.topLeft,r.topLeft,1.5*z,z,!0),e.lineTo(t,s+o-r.bottomLeft),e.arc(t+r.bottomLeft,s+o-r.bottomLeft,r.bottomLeft,z,W,!0),e.lineTo(t+n-r.bottomRight,s+o),e.arc(t+n-r.bottomRight,s+o-r.bottomRight,r.bottomRight,W,0,!0),e.lineTo(t+n,s+r.topRight),e.arc(t+n-r.topRight,s+r.topRight,r.topRight,0,-W,!0),e.lineTo(t+r.topLeft,s)}const xr=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,_r=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function yr(e,i){const t=(""+e).match(xr);if(!t||"normal"===t[1])return 1.2*i;switch(e=+t[2],t[3]){case"px":return e;case"%":e/=100}return i*e}const vr=e=>+e||0;function ui(e,i){const t={},s=R(i),n=s?Object.keys(i):i,o=R(e)?s?r=>P(e[r],e[i[r]]):r=>e[r]:()=>e;for(const r of n)t[r]=vr(o(r));return t}function bs(e){return ui(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Ot(e){return ui(e,["topLeft","topRight","bottomLeft","bottomRight"])}function G(e){const i=bs(e);return i.width=i.left+i.right,i.height=i.top+i.bottom,i}function $(e,i){let t=P((e=e||{}).size,(i=i||j.font).size);"string"==typeof t&&(t=parseInt(t,10));let s=P(e.style,i.style);s&&!(""+s).match(_r)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:P(e.family,i.family),lineHeight:yr(P(e.lineHeight,i.lineHeight),t),size:t,style:s,weight:P(e.weight,i.weight),string:""};return n.string=function dr(e){return!e||A(e.size)||A(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}(n),n}function ne(e,i,t,s){let o,r,a,n=!0;for(o=0,r=e.length;o<r;++o)if(a=e[o],void 0!==a&&(void 0!==i&&"function"==typeof a&&(a=a(i),n=!1),void 0!==t&&E(a)&&(a=a[t%a.length],n=!1),void 0!==a))return s&&!n&&(s.cacheable=!1),a}function kt(e,i){return Object.assign(Object.create(e),i)}function fi(e,i=[""],t,s,n=()=>e[0]){const o=t||e;typeof s>"u"&&(s=ks("_fallback",e));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:s,_getTarget:n,override:a=>fi([a,...e],i,o,s)};return new Proxy(r,{deleteProperty:(a,l)=>(delete a[l],delete a._keys,delete e[0][l],!0),get:(a,l)=>_s(a,l,()=>function Ar(e,i,t,s){let n;for(const o of i)if(n=ks(Mr(o,e),t),typeof n<"u")return gi(e,n)?pi(t,s,e,n):n}(l,i,e,a)),getOwnPropertyDescriptor:(a,l)=>Reflect.getOwnPropertyDescriptor(a._scopes[0],l),getPrototypeOf:()=>Reflect.getPrototypeOf(e[0]),has:(a,l)=>Ms(a).includes(l),ownKeys:a=>Ms(a),set(a,l,c){const h=a._storage||(a._storage=n());return a[l]=h[l]=c,delete a._keys,!0}})}function Wt(e,i,t,s){const n={_cacheable:!1,_proxy:e,_context:i,_subProxy:t,_stack:new Set,_descriptors:xs(e,s),setContext:o=>Wt(e,o,t,s),override:o=>Wt(e.override(o),i,t,s)};return new Proxy(n,{deleteProperty:(o,r)=>(delete o[r],delete e[r],!0),get:(o,r,a)=>_s(o,r,()=>function Sr(e,i,t){const{_proxy:s,_context:n,_subProxy:o,_descriptors:r}=e;let a=s[i];return yt(a)&&r.isScriptable(i)&&(a=function wr(e,i,t,s){const{_proxy:n,_context:o,_subProxy:r,_stack:a}=t;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=i(o,r||s);return a.delete(e),gi(e,l)&&(l=pi(n._scopes,n,e,l)),l}(i,a,e,t)),E(a)&&a.length&&(a=function Dr(e,i,t,s){const{_proxy:n,_context:o,_subProxy:r,_descriptors:a}=t;if(typeof o.index<"u"&&s(e))return i[o.index%i.length];if(R(i[0])){const l=i,c=n._scopes.filter(h=>h!==l);i=[];for(const h of l){const d=pi(c,n,e,h);i.push(Wt(d,o,r&&r[e],a))}}return i}(i,a,e,r.isIndexable)),gi(i,a)&&(a=Wt(a,n,o&&o[i],r)),a}(o,r,a)),getOwnPropertyDescriptor:(o,r)=>o._descriptors.allKeys?Reflect.has(e,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,r),getPrototypeOf:()=>Reflect.getPrototypeOf(e),has:(o,r)=>
1Reflect.has(e,r),ownKeys:()=>Reflect.ownKeys(e),set:(o,r,a)=>(e[r]=a,delete o[r],!0)})}function xs(e,i={scriptable:!0,indexable:!0}){const{_scriptable:t=i.scriptable,_indexable:s=i.indexable,_allKeys:n=i.allKeys}=e;return{allKeys:n,scriptable:t,indexable:s,isScriptable:yt(t)?t:()=>t,isIndexable:yt(s)?s:()=>s}}const Mr=(e,i)=>e?e+ii(i):i,gi=(e,i)=>R(i)&&"adapters"!==e&&(null===Object.getPrototypeOf(i)||i.constructor===Object);function _s(e,i,t){if(Object.prototype.hasOwnProperty.call(e,i)||"constructor"===i)return e[i];const s=t();return e[i]=s,s}function ys(e,i,t){return yt(e)?e(i,t):e}const Pr=(e,i)=>!0===e?i:"string"==typeof e?_t(i,e):void 0;function Cr(e,i,t,s,n){for(const o of i){const r=Pr(t,o);if(r){e.add(r);const a=ys(r._fallback,t,n);if(typeof a<"u"&&a!==t&&a!==s)return a}else if(!1===r&&typeof s<"u"&&t!==s)return null}return!1}function pi(e,i,t,s){const n=i._rootScopes,o=ys(i._fallback,t,s),r=[...e,...n],a=new Set;a.add(s);let l=vs(a,r,t,o||t,s);return!(null===l||typeof o<"u"&&o!==t&&(l=vs(a,r,o,l,s),null===l))&&fi(Array.from(a),[""],n,o,()=>function Or(e,i,t){const s=e._getTarget();i in s||(s[i]={});const n=s[i];return E(n)&&R(t)?t:n||{}}(i,t,s))}function vs(e,i,t,s,n){for(;t;)t=Cr(e,i,t,s,n);return t}function ks(e,i){for(const t of i){if(!t)continue;const s=t[e];if(typeof s<"u")return s}}function Ms(e){let i=e._keys;return i||(i=e._keys=function Rr(e){const i=new Set;for(const t of e)for(const s of Object.keys(t).filter(n=>!n.startsWith("_")))i.add(s);return Array.from(i)}(e._scopes)),i}function Ss(e,i,t,s){const{iScale:n}=e,{key:o="r"}=this._parsing,r=new Array(s);let a,l,c,h;for(a=0,l=s;a<l;++a)c=a+t,h=i[c],r[a]={r:n.parse(_t(h,o),c)};return r}const Tr=Number.EPSILON||1e-14,Ht=(e,i)=>i<e.length&&!e[i].skip&&e[i],ws=e=>"x"===e?"y":"x";function Lr(e,i,t,s){const n=e.skip?i:e,o=i,r=t.skip?i:t,a=ni(o,n),l=ni(r,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=s*c,u=s*h;return{previous:{x:o.x-d*(r.x-n.x),y:o.y-d*(r.y-n.y)},next:{x:o.x+u*(r.x-n.x),y:o.y+u*(r.y-n.y)}}}function Ce(e,i,t){return Math.max(Math.min(e,t),i)}function Br(e,i,t,s,n){let o,r,a,l;if(i.spanGaps&&(e=e.filter(c=>!c.skip)),"monotone"===i.cubicInterpolationMode)!function Er(e,i="x"){const t=ws(i),s=e.length,n=Array(s).fill(0),o=Array(s);let r,a,l,c=Ht(e,0);for(r=0;r<s;++r)if(a=l,l=c,c=Ht(e,r+1),l){if(c){const h=c[i]-l[i];n[r]=0!==h?(c[t]-l[t])/h:0}o[r]=a?c?rt(n[r-1])!==rt(n[r])?0:(n[r-1]+n[r])/2:n[r-1]:n[r]}(function Fr(e,i,t){const s=e.length;let n,o,r,a,l,c=Ht(e,0);for(let h=0;h<s-1;++h)if(l=c,c=Ht(e,h+1),l&&c){if(Qt(i[h],0,Tr)){t[h]=t[h+1]=0;continue}n=t[h]/i[h],o=t[h+1]/i[h],a=Math.pow(n,2)+Math.pow(o,2),!(a<=9)&&(r=3/Math.sqrt(a),t[h]=n*r*i[h],t[h+1]=o*r*i[h])}})(e,n,o),function Ir(e,i,t="x"){const s=ws(t),n=e.length;let o,r,a,l=Ht(e,0);for(let c=0;c<n;++c){if(r=a,a=l,l=Ht(e,c+1),!a)continue;const h=a[t],d=a[s];r&&(o=(h-r[t])/3,a[`cp1${t}`]=h-o,a[`cp1${s}`]=d-o*i[c]),l&&(o=(l[t]-h)/3,a[`cp2${t}`]=h+o,a[`cp2${s}`]=d+o*i[c])}}(e,o,i)}(e,n);else{let c=s?e[e.length-1]:e[0];for(o=0,r=e.length;o<r;++o)a=e[o],l=Lr(c,a,e[Math.min(o+1,r-(s?0:1))%r],i.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}i.capBezierPoints&&function zr(e,i){let t,s,n,o,r,a=gt(e[0],i);for(t=0,s=e.length;t<s;++t)r=o,o=a,a=t<s-1&>(e[t+1],i),o&&(n=e[t],r&&(n.cp1x=Ce(n.cp1x,i.left,i.right),n.cp1y=Ce(n.cp1y,i.top,i.bottom)),a&&(n.cp2x=Ce(n.cp2x,i.left,i.right),n.cp2y=Ce(n.cp2y,i.top,i.bottom)))}(e,t)}function mi(){return typeof window<"u"&&typeof document<"u"}function bi(e){let i=e.parentNode;return i&&"[object ShadowRoot]"===i.toString()&&(i=i.host),i}function Oe(e,i,t){let s;return"string"==typeof e?(s=parseInt(e,10),-1!==e.indexOf("%")&&(s=s/100*i.parentNode[t])):s=e,s}const Ae=e=>e.ownerDocument.defaultView.getComputedStyle(e,null),Nr=["top","right","bottom","left"];function At(e,i,t){const s={};t=t?"-"+t:"";for(let n=0;n<4;n++){const o=Nr[n];s[o]=parseFloat(e[i+"-"+o+t])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}function Rt(e,i){if("native"in e)return e;const{canvas:t,currentDevicePixelRatio:s}=i,n=Ae(t),o="border-box"===n.boxSizing,r=At(n,"padding"),a=At(n,"border","width"),{x:l,y:c,box:h}=function Wr(e,i){const t=e.touches,s=t&&t.length?t[0]:e,{offsetX:n,offsetY:o}=s;let a,l,r=!1;if(((e,i,t)=>(e>0||i>0)&&(!t||!t.shadowRoot))(n,o,e.target))a=n,l=o;else{const c=i.getBoundingClientRect();a=s.clientX-c.left,l=s.clientY-c.top,r=!0}return{x:a,y:l,box:r}}(e,t),d=r.left+(h&&a.left),u=r.top+(h&&a.top);let{width:f,height:p}=i;return o&&(f-=r.width+a.width,p-=r.height+a.height),{x:Math.round((l-d)/f*t.
1width/s),y:Math.round((c-u)/p*t.height/s)}}const Re=e=>Math.round(10*e)/10;function Ds(e,i,t){const s=i||1,n=Math.floor(e.height*s),o=Math.floor(e.width*s);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const r=e.canvas;return r.style&&(t||!r.style.height&&!r.style.width)&&(r.style.height=`${e.height}px`,r.style.width=`${e.width}px`),(e.currentDevicePixelRatio!==s||r.height!==n||r.width!==o)&&(e.currentDevicePixelRatio=s,r.height=n,r.width=o,e.ctx.setTransform(s,0,0,s,0,0),!0)}const Yr=function(){let e=!1;try{const i={get passive(){return e=!0,!1}};mi()&&(window.addEventListener("test",null,i),window.removeEventListener("test",null,i))}catch{}return e}();function Ps(e,i){const t=function jr(e,i){return Ae(e).getPropertyValue(i)}(e,i),s=t&&t.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function Tt(e,i,t,s){return{x:e.x+t*(i.x-e.x),y:e.y+t*(i.y-e.y)}}function Ur(e,i,t,s){return{x:e.x+t*(i.x-e.x),y:"middle"===s?t<.5?e.y:i.y:"after"===s?t<1?e.y:i.y:t>0?i.y:e.y}}function Xr(e,i,t,s){const n={x:e.cp2x,y:e.cp2y},o={x:i.cp1x,y:i.cp1y},r=Tt(e,n,t),a=Tt(n,o,t),l=Tt(o,i,t),c=Tt(r,a,t),h=Tt(a,l,t);return Tt(c,h,t)}function $t(e,i,t){return e?function(e,i){return{x:t=>e+e+i-t,setWidth(t){i=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,s)=>t-s,leftForLtr:(t,s)=>t-s}}(i,t):{x:e=>e,setWidth(e){},textAlign:e=>e,xPlus:(e,i)=>e+i,leftForLtr:(e,i)=>e}}function Cs(e,i){let t,s;("ltr"===i||"rtl"===i)&&(t=e.canvas.style,s=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",i,"important"),e.prevTextDirection=s)}function Os(e,i){void 0!==i&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",i[0],i[1]))}function As(e){return"angle"===e?{between:Zt,compare:Jo,normalize:et}:{between:ut,compare:(i,t)=>i-t,normalize:i=>i}}function Rs({start:e,end:i,count:t,loop:s,style:n}){return{start:e%t,end:i%t,loop:s&&(i-e+1)%t==0,style:n}}function Ts(e,i,t){if(!t)return[e];const{property:s,start:n,end:o}=t,r=i.length,{compare:a,between:l,normalize:c}=As(s),{start:h,end:d,loop:u,style:f}=function Jr(e,i,t){const{property:s,start:n,end:o}=t,{between:r,normalize:a}=As(s),l=i.length;let u,f,{start:c,end:h,loop:d}=e;if(d){for(c+=l,h+=l,u=0,f=l;u<f&&r(a(i[c%l][s]),n,o);++u)c--,h--;c%=l,h%=l}return h<c&&(h+=l),{start:c,end:h,loop:d,style:e.style}}(e,i,t),p=[];let x,_,v,m=!1,b=null;for(let S=h,D=h;S<=d;++S)_=i[S%r],!_.skip&&(x=c(_[s]),x!==v&&(m=l(x,n,o),null===b&&(m||l(n,v,x)&&0!==a(n,v))&&(b=0===a(x,n)?S:D),null!==b&&(!m||0===a(o,x)||l(o,v,x))&&(p.push(Rs({start:b,end:S,loop:u,count:r,style:f})),b=null),D=S,v=x));return null!==b&&p.push(Rs({start:b,end:d,loop:u,count:r,style:f})),p}function Ls(e,i){const t=[],s=e.segments;for(let n=0;n<s.length;n++){const o=Ts(s[n],e.points,i);o.length&&t.push(...o)}return t}function Is(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function ea(e,i){if(!i)return!1;const t=[],s=function(n,o){return ai(o)?(t.includes(o)||t.push(o),t.indexOf(o)):o};return JSON.stringify(e,s)!==JSON.stringify(i,s)}function Te(e,i,t){return e.options.clip?e[t]:i[t]}function Es(e,i){const t=i._clip;if(t.disabled)return!1;const s=function ia(e,i){const{xScale:t,yScale:s}=e;return t&&s?{left:Te(t,i,"left"),right:Te(t,i,"right"),top:Te(s,i,"top"),bottom:Te(s,i,"bottom")}:i}(i,e.chartArea);return{left:!1===t.left?0:s.left-(!0===t.left?0:t.left),right:!1===t.right?e.width:s.right+(!0===t.right?0:t.right),top:!1===t.top?0:s.top-(!0===t.top?0:t.top),bottom:!1===t.bottom?e.height:s.bottom+(!0===t.bottom?0:t.bottom)}}class sa{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(i,t,s,n){const r=t.duration;t.listeners[n].forEach(a=>a({chart:i,initial:t.initial,numSteps:r,currentStep:Math.min(s-t.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=rs.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(i=Date.now()){let t=0;
1this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;const o=s.items;let l,r=o.length-1,a=!1;for(;r>=0;--r)l=o[r],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(i),a=!0):(o[r]=o[o.length-1],o.pop());a&&(n.draw(),this._notify(n,s,i,"progress")),o.length||(s.running=!1,this._notify(n,s,i,"complete"),s.initial=!1),t+=o.length}),this._lastDate=i,0===t&&(this._running=!1)}_getAnims(i){const t=this._charts;let s=t.get(i);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(i,s)),s}listen(i,t,s){this._getAnims(i).listeners[t].push(s)}add(i,t){!t||!t.length||this._getAnims(i).items.push(...t)}has(i){return this._getAnims(i).items.length>0}start(i){const t=this._charts.get(i);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(i){if(!this._running)return!1;const t=this._charts.get(i);return!(!t||!t.running||!t.items.length)}stop(i){const t=this._charts.get(i);if(!t||!t.items.length)return;const s=t.items;let n=s.length-1;for(;n>=0;--n)s[n].cancel();t.items=[],this._notify(i,t,Date.now(),"complete")}remove(i){return this._charts.delete(i)}}var pt=new sa;const zs="transparent",na={boolean:(e,i,t)=>t>.5?i:e,color(e,i,t){const s=us(e||zs),n=s.valid&&us(i||zs);
1return n&&n.valid?n.mix(s,t).hexString():i},number:(e,i,t)=>e+(i-e)*t};class oa{constructor(i,t,s,n){const o=t[s];n=ne([i.to,n,o,i.from]);const r=ne([i.from,o,n]);this._active=!0,this._fn=i.fn||na[i.type||typeof r],this._easing=te[i.easing]||te.linear,this._start=Math.floor(Date.now()+(i.delay||0)),this._duration=this._total=Math.floor(i.duration),this._loop=!!i.loop,this._target=t,this._prop=s,this._from=r,this._to=n,this._promises=void 0}active(){return this._active}update(i,t,s){if(this._active){this._notify(!1);const n=this._target[this._prop],o=s-this._start,r=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(r,i.duration)),this._total+=o,this._loop=!!i.loop,this._to=ne([i.to,t,n,i.from]),this._from=ne([i.from,n,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(i){const t=i-this._start,s=this._duration,n=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||t<s),!this._active)return this._target[n]=a,void this._notify(!0);t<0?this._target[n]=o:(l=t/s%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,a,l))}wait(){const i=this._promises||(this._promises=[]);return new Promise((t,s)=>{i.push({res:t,rej:s})})}_notify(i){const t=i?"res":"rej",s=this._promises||[];for(let n=0;n<s.length;n++)s[n][t]()}}class Bs{constructor(i,t){this._chart=i,this._properties=new Map,this.configure(t)}configure(i){if(!R(i))return;const t=Object.keys(j.animation),s=this._properties;Object.getOwnPropertyNames(i).forEach(n=>{const o=i[n];if(!R(o))return;const r={};for(const a of t)r[a]=o[a];(E(o.properties)&&o.properties||[n]).forEach(a=>{(a===n||!s.has(a))&&s.set(a,r)})})}_animateOptions(i,t){const s=t.options,n=function aa(e,i){if(!i)return;let t=e.options;
vendor: 11,514 bytes, line 1
1if(t)return t.$shared&&(e.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t;e.options=i}(i,s);if(!n)return[];const o=this._createAnimations(n,s);return s.$shared&&function ra(e,i){const t=[],s=Object.keys(i);for(let n=0;n<s.length;n++){const o=e[s[n]];o&&o.active()&&t.push(o.wait())}return Promise.all(t)}(i.options.$animations,s).then(()=>{i.options=s},()=>{}),o}_createAnimations(i,t){const s=this._properties,n=[],o=i.$animations||(i.$animations={}),r=Object.keys(t),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if("$"===c.charAt(0))continue;if("options"===c){n.push(...this._animateOptions(i,t));continue}const h=t[c];let d=o[c];const u=s.get(c);if(d){if(u&&d.active()){d.update(u,h,a);continue}d.cancel()}u&&u.duration?(o[c]=d=new oa(u,i,c,h),n.push(d)):i[c]=h}return n}update(i,t){if(0===this._properties.size)return void Object.assign(i,t);const s=this._createAnimations(i,t);return s.length?(pt.add(this._chart,s),!0):void 0}}function js(e,i){const t=e&&e.options||{},s=t.reverse,n=void 0===t.min?i:0,o=void 0===t.max?i:0;return{start:s?o:n,end:s?n:o}}function Ns(e,i){const t=[],s=e._getSortedDatasetMetas(i);let n,o;for(n=0,o=s.length;n<o;++n)t.push(s[n].index);return t}function Vs(e,i,t,s={}){const n=e.keys,o="single"===s.mode;let r,a,l,c;if(null===i)return;let h=!1;for(r=0,a=n.length;r<a;++r){if(l=+n[r],l===t){if(h=!0,s.all)continue;break}c=e.values[l],V(c)&&(o||0===i||rt(i)===rt(c))&&(i+=c)}return h||s.all?i:0}function xi(e,i){const t=e&&e.options.stacked;return t||void 0===t&&void 0!==i.stack}function fa(e,i,t){const s=e[i]||(e[i]={});return s[t]||(s[t]={})}function Ws(e,i,t,s){for(const n of i.getMatchingVisibleMetas(s).reverse()){const o=e[n.index];if(t&&o>0||!t&&o<0)return n.index}return null}function Hs(e,i){const{chart:t,_cachedMeta:s}=e,n=t._stacks||(t._stacks={}),{iScale:o,vScale:r,index:a}=s,l=o.axis,c=r.axis,h=function da(e,i,t){return`${e.id}.${i.id}.${t.stack||t.type}`}(o,r,s),d=i.length;let u;for(let f=0;f<d;++f){const p=i[f],{[l]:m,[c]:b}=p;u=(p._stacks||(p._stacks={}))[c]=fa(n,h,m),u[a]=b,u._top=Ws(u,r,!0,s.type),u._bottom=Ws(u,r,!1,s.type),(u._visualValues||(u._visualValues={}))[a]=b}}function _i(e,i){const t=e.scales;return Object.keys(t).filter(s=>t[s].axis===i).shift()}function oe(e,i){const t=e.controller.index,s=e.vScale&&e.vScale.axis;if(s){i=i||e._parsed;for(const n of i){const o=n._stacks;if(!o||void 0===o[s]||void 0===o[s][t])return;delete o[s][t],void 0!==o[s]._visualValues&&void 0!==o[s]._visualValues[t]&&delete o[s]._visualValues[t]}}}const yi=e=>"reset"===e||"none"===e,$s=(e,i)=>i?e:Object.assign({},e);let Mt=(()=>class e{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,s){this.chart=t,this._ctx=t.ctx,this.index=s,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(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=xi(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&&oe(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,s=this._cachedMeta,n=this.getDataset(),o=(u,f,p,m)=>"x"===u?f:"r"===u?m:p,r=s.xAxisID=P(n.xAxisID,_i(t,"x")),a=s.yAxisID=P(n.yAxisID,_i(t,"y")),l=s.rAxisID=P(n.rAxisID,_i(t,"r")),c=s.indexAxis,h=s.iAxisID=o(c,r,a,l),d=s.vAxisID=o(c,a,r,l);s.xScale=this.getScaleForId(r),s.yScale=this.getScaleForId(a),s.rScale=this.getScaleForId(l),s.iScale=this.getScaleForId(h),s.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const s=this._cachedMeta;return t===s.iScale?s.vScale:s.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&ns(this._data,this),t._stacked&&oe(t)}_dataCheck(){const t=this.getDataset(),s=t.data||(t.data=[]),n=this._data;if(R(s))this._data=function ha(e,i){const{iScale:t,vScale:s}=i,n="x"===t.axis?"x":"y",o="x"===s.axis?"x":"y",r=Object.keys(e),a=new Array(r.length);let l,c,h;for(l=0,c=r.length;l<c;++l)h=r[l],a[l]={[n]:h,[o]:e[h]};return a}(s,this._cachedMeta);else if(n!==s){if(n){ns(n,this);const o=this._cachedMeta;oe(o),o._parsed=[]}s&&Object.isExtensible(s)&&function tr(e,i){e._chartjs?e._chartjs.listeners.push(i):(Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[i]}}),ss.forEach(t=>{const s="_onData"+ii(t),n=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...o){const r=n.apply(this,o);return e._chartjs.listeners.forEach(a=>{"function"==typeof a[s]&&a[s](...o)}),r}})}))}(s,this),this._syncList=[],this._data=s}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const s=this._cachedMeta,n=this.getDataset();let o=!1;this._dataCheck();const r=s._stacked;s._stacked=xi(s.vScale,s),s.stack!==n.stack&&(o=!0,oe(s),s.stack=n.stack),this._resyncElements(t),(o||r!==s._stacked)&&(Hs(this,s._parsed),s._stacked=xi(s.vScale,s))}configure(){const t=this.chart.config,s=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),s,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,s){const{_cachedMeta:n,_data:o}=this,{iScale:r,_stacked:a}=n,l=r.axis;let d,u,f,c=0===t&&s===o.length||n._sorted,h=t>0&&n._parsed[t-1];if(!1===this._parsing)n._parsed=o,n._sorted=!0,f=o;else{f=E(o[t])?this.parseArrayData(n,o,t,s):R(o[t])?this.parseObjectData(n,o,t,s):this.parsePrimitiveData(n,o,t,s);const p=()=>null===u[l]||h&&u[l]<h[l];for(d=0;d<s;++d)n._parsed[d+t]=u=f[d],c&&(p()&&(c=!1),h=u);n._sorted=c}a&&Hs(this,f)}parsePrimitiveData(t,s,n,o){const{iScale:r,vScale:a}=t,l=r.axis,c=a.axis,h=r.getLabels(),d=r===a,u=new Array(o);let f,p,m;for(f=0,p=o;f<p;++f)m=f+n,u[f]={[l]:d||r.parse(h[m],m),[c]:a.parse(s[m],m)};return u}parseArrayData(t,s,n,o){const{xScale:r,yScale:a}=t,l=new Array(o);let c,h,d,u;for(c=0,h=o;c<h;++c)d=c+n,u=s[d],l[c]={x:r.parse(u[0],d),y:a.parse(u[1],d)};return l}parseObjectData(t,s,n,o){const{xScale:r,yScale:a}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,h=new Array(o);let d,u,f,p;for(d=0,u=o;d<u;++d)f=d+n,p=s[f],h[d]={x:r.parse(_t(p,l),f),y:a.parse(_t(p,c),f)};return h}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,s,n){const r=this._cachedMeta,a=s[t.axis];return Vs({keys:Ns(this.chart,!0),values:s._stacks[t.axis]._visualValues},a,r.index,{mode:n})}updateRangeFromParsed(t,s,n,o){const r=n[s.axis];let a=null===r?NaN:r;const l=o&&n._stacks[s.axis];o&&l&&(o.values=l,a=Vs(o,r,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,s){const n=this._cachedMeta,o=n._parsed,r=n._sorted&&t===n.iScale,a=o.length,l=this._getOtherScale(t),c=((e,i)=>e&&!i.hidden&&i._stacked&&{keys:Ns(this.chart,!0),values:null})(s,n),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:u}=function ua(e){const{min:i,max:t,minDefined:s,maxDefined:n}=e.getUserBounds();return{min:s?i:Number.NEGATIVE_INFINITY,max:n?t:Number.POSITIVE_INFINITY}}(l);let f,p;function m(){p=o[f];const b=p[l.axis];return!V(p[t.axis])||d>b||u<b}for(f=0;f<a&&(m()||(this.updateRangeFromParsed(h,t,p,c),!r));++f);if(r)for(f=a-1;f>=0;--f)if(!m()){this.updateRangeFromParsed(h,t,p,c);break}return h}getAllParsedValues(t){const s=this._cachedMeta._parsed,n=[];let o,r,a;for(o=0,r=s.length;o<r;++o)a=s[o][t.axis],V(a)&&n.push(a);return n}getMaxOverflow(){return!1}getLabelAndValue(t){const s=this._cachedMeta,n=s.iScale,o=s.vScale,r=this.getParsed(t);return{label:n?""+n.getLabelForValue(r[n.axis]):"",value:o?""+o.getLabelForValue(r[o.axis]):""}}_update(t){const s=this._cachedMeta;this.update(t||"default"),s._clip=function ca(e){let i,t,s,n;return R(e)?(i=e.top,t=e.right,s=e.bottom,n=e.left):i=t=s=n=e,{top:i,right:t,bottom:s,left:n,disabled:!1===e}}(P(this.options.clip,function la(e,i,t){if(!1===t)return!1;const s=js(e,t),n=js(i,t);return{top:n.end,right:s.end,bottom:n.start,left:s.start}}(s.xScale,s.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this._cachedMeta,o=n.data||[],r=this.chart.chartArea,a=[],l=this._drawStart||0,c=this._drawCount||o.length-l,h=this.options.drawActiveElementsOnTop;let d;for(n.dataset&&n.dataset.draw(t,r,l,c),d=l;d<l+c;++d){const u=o[d];u.hidden||(u.active&&h?a.push(u):u.draw(t,r))}for(d=0;d<a.length;++d)a[d].draw(t,r)}getStyle(t,s){const n=s?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,s,n){const o=this.getDataset();let r;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];r=a.$context||(a.$context=function pa(e,i,t){return kt(e,{active:!1,dataIndex:i,parsed:void 0,raw:void 0,element:t,index:i,mode:"default",type:"data"})}(this.getContext(),t,a)),r.parsed=this.getParsed(t),r.raw=o.data[t],r.index=r.dataIndex=t}else r=this.$context||(this.$context=function ga(e,i){return kt(e,{active:!1,dataset:void 0,datasetIndex:i,index:i,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),r.dataset=o,r.index=r.datasetIndex=this.index;return r.active=!!s,r.mode=n,r}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,s){return this._resolveElementOptions(this.dataElementType.id,s,t)}_resolveElementOptions(t,s="default",n){const o="active"===s,r=this._cachedDataOpts,a=t+"-"+s,l=r[a],c=this.enableOptionSharing&&qt(n);if(l)return $s(l,c);const h=this.chart.config,d=h.datasetElementScopeKeys(this._type,t),u=o?[`${t}Hover`,"hover",t,""]:[t,""],f=h.getOptionScopes(this.getDataset(),d),p=Object.keys(j.elements[t]),b=h.resolveNamedOptions(f,p,()=>this.getContext(n,o,s),u);return b.$shared&&(b.$shared=c,r[a]=Object.freeze($s(b,c))),b}_resolveAnimations(t,s,n){const o=this.chart,r=this._cachedDataOpts,a=`animation-${s}`,l=r[a];if(l)return l;let c;if(!1!==o.options.animation){const d=this.chart.config,u=d.datasetAnimationScopeKeys(this._type,s),f=d.getOptionScopes(this.getDataset(),u);c=d.createResolver(f,this.getContext(t,n,s))}const h=new Bs(o,c&&c.animations);return c&&c._cacheable&&(r[a]=Object.freeze(h)),h}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,s){return!s||yi(t)||this.chart._animationsDisabled}_getSharedOptions(t,s){const n=this.resolveDataElementOptions(t,s),o=this._sharedOptions,r=this.getSharedOptions(n),a=this.includeOptions(s,r)||r!==o;return this.updateSharedOptions(r,s,n),{sharedOptions:r,includeOptions:a}}updateElement(t,s,n,o){yi(o)?Object.assign(t,n):this._resolveAnimations(s,o).update(t,n)}updateSharedOptions(t,s,n){t&&!yi(s)&&this._resolveAnimations(void 0,s).update(t,n)}_setStyle(t,s,n,o){t.active=o;const r=this.getStyle(s,o);
vendor: 5,471 bytes, line 1
1this._resolveAnimations(s,n,o).update(t,{options:!o&&this.getSharedOptions(r)||r})}removeHoverStyle(t,s,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,s,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const s=this._data,n=this._cachedMeta.data;for(const[l,c,h]of this._syncList)this[l](c,h);this._syncList=[];const o=n.length,r=s.length,a=Math.min(r,o);a&&this.parse(0,a),r>o?this._insertElements(o,r-o,t):r<o&&this._removeElements(r,o-r)}_insertElements(t,s,n=!0){const o=this._cachedMeta,r=o.data,a=t+s;let l;const c=h=>{for(h.length+=s,l=h.length-1;l>=a;l--)h[l]=h[l-s]};for(c(r),l=t;l<a;++l)r[l]=new this.dataElementType;this._parsing&&c(o._parsed),this.parse(t,s),n&&this.updateElements(r,t,s,"reset")}updateElements(t,s,n,o){}_removeElements(t,s){const n=this._cachedMeta;if(this._parsing){const o=n._parsed.splice(t,s);n._stacked&&oe(n,o)}n.data.splice(t,s)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[s,n,o]=t;this[s](n,o)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,s){s&&this._sync(["_removeElements",t,s]);const n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}})();function xa(e){const i=e.iScale,t=function ba(e,i){if(!e._cache.$bar){const t=e.getMatchingVisibleMetas(i);let s=[];for(let n=0,o=t.length;n<o;n++)s=s.concat(t[n].controller.getAllParsedValues(e));e._cache.$bar=os(s.sort((n,o)=>n-o))}return e._cache.$bar}(i,e.type);let n,o,r,a,s=i._length;const l=()=>{32767===r||-32768===r||(qt(a)&&(s=Math.min(s,Math.abs(r-a)||s)),a=r)};for(n=0,o=t.length;n<o;++n)r=i.getPixelForValue(t[n]),l();for(a=void 0,n=0,o=i.ticks.length;n<o;++n)r=i.getPixelForTick(n),l();return s}function Ys(e,i,t,s){return E(e)?function va(e,i,t,s){const n=t.parse(e[0],s),o=t.parse(e[1],s),r=Math.min(n,o),a=Math.max(n,o);let l=r,c=a;Math.abs(r)>Math.abs(a)&&(l=a,c=r),i[t.axis]=c,i._custom={barStart:l,barEnd:c,start:n,end:o,min:r,max:a}}(e,i,t,s):i[t.axis]=t.parse(e,s),i}function Us(e,i,t,s){const n=e.iScale,o=e.vScale,r=n.getLabels(),a=n===o,l=[];let c,h,d,u;for(c=t,h=t+s;c<h;++c)u=i[c],d={},d[n.axis]=a||n.parse(r[c],c),l.push(Ys(u,d,o,c));return l}function vi(e){return e&&void 0!==e.barStart&&void 0!==e.barEnd}function Sa(e,i,t,s){let n=i.borderSkipped;const o={};if(!n)return void(e.borderSkipped=o);if(!0===n)return void(e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:r,end:a,reverse:l,top:c,bottom:h}=function Ma(e){let i,t,s,n,o;return e.horizontal?(i=e.base>e.x,t="left",s="right"):(i=e.base<e.y,t="bottom",s="top"),i?(n="end",o="start"):(n="start",o="end"),{start:t,end:s,reverse:i,top:n,bottom:o}}(e);"middle"===n&&t&&(e.enableBorderRadius=!0,(t._top||0)===s?n=c:(t._bottom||0)===s?n=h:(o[Xs(h,r,a,l)]=!0,n=c)),o[Xs(n,r,a,l)]=!0,e.borderSkipped=o}function Xs(e,i,t,s){return s?(e=function wa(e,i,t){return e===i?t:e===t?i:e}(e,i,t),e=Gs(e,t,i)):e=Gs(e,i,t),e}function Gs(e,i,t){return"start"===e?i:"end"===e?t:e}function Da(e,{inflateAmount:i},t){e.inflateAmount="auto"===i?1===t?.33:0:i}let Pa=(()=>class e extends Mt{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,s,n,o){return Us(t,s,n,o)}parseArrayData(t,s,n,o){return Us(t,s,n,o)}parseObjectData(t,s,n,o){const{iScale:r,vScale:a}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,h="x"===r.axis?l:c,d="x"===a.axis?l:c,u=[];let f,p,m,b;for(f=n,p=n+o;f<p;++f)b=s[f],m={},m[r.axis]=r.parse(_t(b,h),f),u.push(Ys(_t(b,d),m,a,f));return u}updateRangeFromParsed(t,s,n,o){super.updateRangeFromParsed(t,s,n,o);const r=n._custom;r&&s===this._cachedMeta.vScale&&(t.min=Math.min(t.min,r.min),t.max=Math.max(t.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const s=this._cachedMeta,{iScale:n,vScale:o}=s,r=this.getParsed(t),a=r._custom,l=vi(a)?"["+a.start+", "+a.end+"]":""+o.getLabelForValue(r[o.axis]);return{label:""+n.getLabelForValue(r[n.axis]),value:l}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){const s=this._cachedMeta;this.updateElements(s.data,0,s.data.length,t)}updateElements(t,s,n,o){const r="reset"===o,{index:a,_cachedMeta:{vScale:l}}=this,c=l.getBasePixel(),h=l.isHorizontal(),d=this._getRuler(),{sharedOptions:u,includeOptions:f}=this._getSharedOptions(s,o);for(let p=s;p<s+n;p++){const m=this.getParsed(p),b=r||A(m[l.axis])?{base:c,head:c}:this._calculateBarValuePixels(p),x=this._calculateBarIndexPixels(p,d),_=(m._stacks||{})[l.axis],v={horizontal:h,base:b.base,enableBorderRadius:!_||vi(m._custom)||a===_._top||a===_._bottom,x:h?b.head:x.center,y:h?x.center:b.head,height:h?x.size:Math.abs(b.size),width:h?Math.abs(b.size):x.size};f&&(v.options=u||this.resolveDataElementOptions(p,t[p].active?"active":o));const M=v.options||t[p].options;
vendor: 5,377 bytes, line 1
1Sa(v,M,_,a),Da(v,M,d.ratio),this.updateElement(t[p],p,v,o)}}_getStacks(t,s){const{iScale:n}=this._cachedMeta,o=n.getMatchingVisibleMetas(this._type).filter(d=>d.controller.options.grouped),r=n.options.stacked,a=[],l=this._cachedMeta.controller.getParsed(s),c=l&&l[n.axis],h=d=>{const u=d._parsed.find(p=>p[n.axis]===c),f=u&&u[d.vScale.axis];if(A(f)||isNaN(f))return!0};for(const d of o)if((void 0===s||!h(d))&&((!1===r||-1===a.indexOf(d.stack)||void 0===r&&void 0===d.stack)&&a.push(d.stack),d.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,s,n){const o=this._getStacks(t,n),r=void 0!==s?o.indexOf(s):-1;return-1===r?o.length-1:r}_getRuler(){const t=this.options,s=this._cachedMeta,n=s.iScale,o=[];let r,a;for(r=0,a=s.data.length;r<a;++r)o.push(n.getPixelForValue(this.getParsed(r)[n.axis],r));const l=t.barThickness;return{min:l||xa(s),pixels:o,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:t.grouped,ratio:l?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:s,_stacked:n,index:o},options:{base:r,minBarLength:a}}=this,l=r||0,c=this.getParsed(t),h=c._custom,d=vi(h);let m,b,u=c[s.axis],f=0,p=n?this.applyStack(s,c,n):u;p!==u&&(f=p-u,p=u),d&&(u=h.barStart,p=h.barEnd-h.barStart,0!==u&&rt(u)!==rt(h.barEnd)&&(f=0),f+=u);const x=A(r)||d?f:r;let _=s.getPixelForValue(x);if(m=this.chart.getDataVisibility(t)?s.getPixelForValue(f+p):_,b=m-_,Math.abs(b)<a){b=function ka(e,i,t){return 0!==e?rt(e):(i.isHorizontal()?1:-1)*(i.min>=t?1:-1)}(b,s,l)*a,u===l&&(_-=b/2);const v=s.getPixelForDecimal(0),M=s.getPixelForDecimal(1),y=Math.min(v,M),k=Math.max(v,M);_=Math.max(Math.min(_,k),y),m=_+b,n&&!d&&(c._stacks[s.axis]._visualValues[o]=s.getValueForPixel(m)-s.getValueForPixel(_))}if(_===s.getPixelForValue(l)){const v=rt(b)*s.getLineWidthForValue(l)/2;_+=v,b-=v}return{size:b,base:_,head:m,center:m+b/2}}_calculateBarIndexPixels(t,s){const n=s.scale,o=this.options,r=o.skipNull,a=P(o.maxBarThickness,1/0);let l,c;if(s.grouped){const h=r?this._getStackCount(t):s.stackCount,d="flex"===o.barThickness?function ya(e,i,t,s){const n=i.pixels,o=n[e];let r=e>0?n[e-1]:null,a=e<n.length-1?n[e+1]:null;const l=t.categoryPercentage;null===r&&(r=o-(null===a?i.end-i.start:a-o)),null===a&&(a=o+o-r);const c=o-(o-Math.min(r,a))/2*l;return{chunk:Math.abs(a-r)/2*l/s,ratio:t.barPercentage,start:c}}(t,s,o,h):function _a(e,i,t,s){const n=t.barThickness;let o,r;return A(n)?(o=i.min*t.categoryPercentage,r=t.barPercentage):(o=n*s,r=1),{chunk:o/s,ratio:r,start:i.pixels[e]-o/2}}(t,s,o,h),u=this._getStackIndex(this.index,this._cachedMeta.stack,r?t:void 0);l=d.start+d.chunk*u+d.chunk/2,c=Math.min(a,d.chunk*d.ratio)}else l=n.getPixelForValue(this.getParsed(t)[n.axis],t),c=Math.min(a,s.min*s.ratio);return{base:l-c/2,head:l+c/2,center:l,size:c}}draw(){const t=this._cachedMeta,s=t.vScale,n=t.data,o=n.length;let r=0;for(;r<o;++r)null!==this.getParsed(r)[s.axis]&&!n[r].hidden&&n[r].draw(this._ctx)}})(),Ca=(()=>class e extends Mt{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,s,n,o){const r=super.parsePrimitiveData(t,s,n,o);for(let a=0;a<r.length;a++)r[a]._custom=this.resolveDataElementOptions(a+n).radius;return r}parseArrayData(t,s,n,o){const r=super.parseArrayData(t,s,n,o);for(let a=0;a<r.length;a++)r[a]._custom=P(s[n+a][2],this.resolveDataElementOptions(a+n).radius);return r}parseObjectData(t,s,n,o){const r=super.parseObjectData(t,s,n,o);for(let a=0;a<r.length;a++){const l=s[n+a];r[a]._custom=P(l&&l.r&&+l.r,this.resolveDataElementOptions(a+n).radius)}return r}getMaxOverflow(){const t=this._cachedMeta.data;let s=0;for(let n=t.length-1;n>=0;--n)s=Math.max(s,t[n].size(this.resolveDataElementOptions(n))/2);return s>0&&s}getLabelAndValue(t){const s=this._cachedMeta,n=this.chart.data.labels||[],{xScale:o,yScale:r}=s,a=this.getParsed(t),l=o.getLabelForValue(a.x),c=r.getLabelForValue(a.y),h=a._custom;return{label:n[t]||"",value:"("+l+", "+c+(h?", "+h:"")+")"}}update(t){const s=this._cachedMeta.data;this.updateElements(s,0,s.length,t)}updateElements(t,s,n,o){const r="reset"===o,{iScale:a,vScale:l}=this._cachedMeta,{sharedOptions:c,includeOptions:h}=this._getSharedOptions(s,o),d=a.axis,u=l.axis;for(let f=s;f<s+n;f++){const p=t[f],m=!r&&this.getParsed(f),b={},x=b[d]=r?a.getPixelForDecimal(.5):a.getPixelForValue(m[d]),_=b[u]=r?l.getBasePixel():l.getPixelForValue(m[u]);b.skip=isNaN(x)||isNaN(_),h&&(b.options=c||this.resolveDataElementOptions(f,p.active?"active":o),r&&(b.options.radius=0)),this.updateElement(p,f,b,o)}}resolveDataElementOptions(t,s){const n=this.getParsed(t);let o=super.resolveDataElementOptions(t,s);o.$shared&&(o=Object.assign({},o,{$shared:!1}));const r=o.radius;return"active"!==s&&(o.radius=0),o.radius+=P(n&&n._custom,r),o}})(),ki=(()=>class e extends Mt{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"]}}
vendor: 13,301 bytes, line 1
1,cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const s=t.data;if(s.labels.length&&s.datasets.length){const{labels:{pointStyle:n,color:o}}=t.legend.options;return s.labels.map((r,a)=>{const c=t.getDatasetMeta(0).controller.getStyle(a);return{text:r,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:o,lineWidth:c.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,s,n){n.chart.toggleDataVisibility(s.index),n.chart.update()}}}};constructor(t,s){super(t,s),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,s){const n=this.getDataset().data,o=this._cachedMeta;if(!1===this._parsing)o._parsed=n;else{let a,l,r=c=>+n[c];if(R(n[t])){const{key:c="value"}=this._parsing;r=h=>+_t(n[h],c)}for(a=t,l=t+s;a<l;++a)o._parsed[a]=r(a)}}_getRotation(){return nt(this.options.rotation-90)}_getCircumference(){return nt(this.options.circumference)}_getRotationExtents(){let t=B,s=-B;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const o=this.chart.getDatasetMeta(n).controller,r=o._getRotation(),a=o._getCircumference();t=Math.min(t,r),s=Math.max(s,r+a)}return{rotation:t,circumference:s-t}}update(t){const s=this.chart,{chartArea:n}=s,o=this._cachedMeta,r=o.data,a=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,l=Math.max((Math.min(n.width,n.height)-a)/2,0),c=Math.min(((e,i)=>"string"==typeof e&&e.endsWith("%")?parseFloat(e)/100:+e/i)(this.options.cutout,l),1),h=this._getRingWeight(this.index),{circumference:d,rotation:u}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:m,offsetY:b}=function Oa(e,i,t){let s=1,n=1,o=0,r=0;if(i<B){const a=e,l=a+i,c=Math.cos(a),h=Math.sin(a),d=Math.cos(l),u=Math.sin(l),f=(v,M,y)=>Zt(v,a,l,!0)?1:Math.max(M,M*t,y,y*t),p=(v,M,y)=>Zt(v,a,l,!0)?-1:Math.min(M,M*t,y,y*t),m=f(0,c,d),b=f(W,h,u),x=p(z,c,d),_=p(z+W,h,u);s=(m-x)/2,n=(b-_)/2,o=-(m+x)/2,r=-(b+_)/2}return{ratioX:s,ratioY:n,offsetX:o,offsetY:r}}(u,d,c),v=Math.max(Math.min((n.width-a)/f,(n.height-a)/p)/2,0),M=Gi(this.options.radius,v),k=(M-Math.max(M*c,0))/this._getVisibleDatasetWeightTotal();this.offsetX=m*M,this.offsetY=b*M,o.total=this.calculateTotal(),this.outerRadius=M-k*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-k*h,0),this.updateElements(r,0,r.length,t)}_circumference(t,s){const n=this.options,o=this._cachedMeta,r=this._getCircumference();return s&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||null===o._parsed[t]||o.data[t].hidden?0:this.calculateCircumference(o._parsed[t]*r/B)}updateElements(t,s,n,o){const r="reset"===o,a=this.chart,l=a.chartArea,d=(l.left+l.right)/2,u=(l.top+l.bottom)/2,f=r&&a.options.animation.animateScale,p=f?0:this.innerRadius,m=f?0:this.outerRadius,{sharedOptions:b,includeOptions:x}=this._getSharedOptions(s,o);let v,_=this._getRotation();for(v=0;v<s;++v)_+=this._circumference(v,r);for(v=s;v<s+n;++v){const M=this._circumference(v,r),y=t[v],k={x:d+this.offsetX,y:u+this.offsetY,startAngle:_,endAngle:_+M,circumference:M,outerRadius:m,innerRadius:p};x&&(k.options=b||this.resolveDataElementOptions(v,y.active?"active":o)),_+=M,this.updateElement(y,v,k,o)}}calculateTotal(){const t=this._cachedMeta,s=t.data;let o,n=0;for(o=0;o<s.length;o++){const r=t._parsed[o];null!==r&&!isNaN(r)&&this.chart.getDataVisibility(o)&&!s[o].hidden&&(n+=Math.abs(r))}return n}calculateCircumference(t){const s=this._cachedMeta.total;return s>0&&!isNaN(t)?B*(Math.abs(t)/s):0}getLabelAndValue(t){const n=this.chart,o=n.data.labels||[],r=ee(this._cachedMeta._parsed[t],n.options.locale);return{label:o[t]||"",value:r}}getMaxBorderWidth(t){let s=0;const n=this.chart;let o,r,a,l,c;if(!t)for(o=0,r=n.data.datasets.length;o<r;++o)if(n.isDatasetVisible(o)){a=n.getDatasetMeta(o),t=a.data,l=a.controller;break}if(!t)return 0;for(o=0,r=t.length;o<r;++o)c=l.resolveDataElementOptions(o),"inner"!==c.borderAlign&&(s=Math.max(s,c.borderWidth||0,c.hoverBorderWidth||0));return s}getMaxOffset(t){let s=0;for(let n=0,o=t.length;n<o;++n){const r=this.resolveDataElementOptions(n);s=Math.max(s,r.offset||0,r.hoverOffset||0)}return s}_getRingWeightOffset(t){let s=0;for(let n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(s+=this._getRingWeight(n));return s}_getRingWeight(t){return Math.max(P(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}})(),Aa=(()=>class e extends Mt{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){const s=this._cachedMeta,{dataset:n,data:o=[],_dataset:r}=s,a=this.chart._animationsDisabled;let{start:l,count:c}=ls(s,o,a);this._drawStart=l,this._drawCount=c,cs(s)&&(l=0,c=o.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!r._decimated,n.points=o;const h=this.resolveDatasetElementOptions(t);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(n,void 0,{animated:!a,options:h},t),this.updateElements(o,l,c,t)}updateElements(t,s,n,o){const r="reset"===o,{iScale:a,vScale:l,_stacked:c,_dataset:h}=this._cachedMeta,{sharedOptions:d,includeOptions:u}=this._getSharedOptions(s,o),f=a.axis,p=l.axis,{spanGaps:m,segment:b}=this.options,x=Vt(m)?m:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||r||"none"===o,v=s+n,M=t.length;let y=s>0&&this.getParsed(s-1);for(let k=0;k<M;++k){const w=t[k],S=_?w:{};if(k<s||k>=v){S.skip=!0;continue}const D=this.getParsed(k),O=A(D[p]),C=S[f]=a.getPixelForValue(D[f],k),T=S[p]=r||O?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,D,c):D[p],k);S.skip=isNaN(C)||isNaN(T)||O,S.stop=k>0&&Math.abs(D[f]-y[f])>x,b&&(S.parsed=D,S.raw=h.data[k]),u&&(S.options=d||this.resolveDataElementOptions(k,w.active?"active":o)),_||this.updateElement(w,k,S,o),y=D}}getMaxOverflow(){const t=this._cachedMeta,s=t.dataset,n=s.options&&s.options.borderWidth||0,o=t.data||[];if(!o.length)return n;const r=o[0].size(this.resolveDataElementOptions(0)),a=o[o.length-1].size(this.resolveDataElementOptions(o.length-1));return Math.max(n,r,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}})(),Ks=(()=>class e extends Mt{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){const s=t.data;if(s.labels.length&&s.datasets.length){const{labels:{pointStyle:n,color:o}}=t.legend.options;return s.labels.map((r,a)=>{const c=t.getDatasetMeta(0).controller.getStyle(a);return{text:r,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:o,lineWidth:c.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,s,n){n.chart.toggleDataVisibility(s.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,s){super(t,s),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this.chart,o=n.data.labels||[],r=ee(this._cachedMeta._parsed[t].r,n.options.locale);return{label:o[t]||"",value:r}}parseObjectData(t,s,n,o){return Ss.bind(this)(t,s,n,o)}update(t){const s=this._cachedMeta.data;this._updateRadius(),this.updateElements(s,0,s.length,t)}getMinMax(){const s={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return this._cachedMeta.data.forEach((n,o)=>{const r=this.getParsed(o).r;!isNaN(r)&&this.chart.getDataVisibility(o)&&(r<s.min&&(s.min=r),r>s.max&&(s.max=r))}),s}_updateRadius(){const t=this.chart,s=t.chartArea,n=t.options,o=Math.min(s.right-s.left,s.bottom-s.top),r=Math.max(o/2,0),l=(r-Math.max(n.cutoutPercentage?r/100*n.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=r-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(t,s,n,o){const r="reset"===o,a=this.chart,c=a.options.animation,h=this._cachedMeta.rScale,d=h.xCenter,u=h.yCenter,f=h.getIndexAngle(0)-.5*z;let m,p=f;const b=360/this.countVisibleElements();for(m=0;m<s;++m)p+=this._computeAngle(m,o,b);for(m=s;m<s+n;m++){const x=t[m];let _=p,v=p+this._computeAngle(m,o,b),M=a.getDataVisibility(m)?h.getDistanceFromCenterForValue(this.getParsed(m).r):0;p=v,r&&(c.animateScale&&(M=0),c.animateRotate&&(_=v=f));const y={x:d,y:u,innerRadius:0,outerRadius:M,startAngle:_,endAngle:v,options:this.resolveDataElementOptions(m,x.active?"active":o)};this.updateElement(x,m,y,o)}}countVisibleElements(){let s=0;return this._cachedMeta.data.forEach((n,o)=>{!isNaN(this.getParsed(o).r)&&this.chart.getDataVisibility(o)&&s++}),s}_computeAngle(t,s,n){return this.chart.getDataVisibility(t)?nt(this.resolveDataElementOptions(t,s).angle||n):0}})();var Ra=Object.freeze({__proto__:null,BarController:Pa,BubbleController:Ca,DoughnutController:ki,LineController:Aa,PieController:(()=>class e extends ki{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}})(),PolarAreaController:Ks,RadarController:(()=>class e extends Mt{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){const s=this._cachedMeta.vScale,n=this.getParsed(t);return{label:s.getLabels()[t],value:""+s.getLabelForValue(n[s.axis])}}parseObjectData(t,s,n,o){return Ss.bind(this)(t,s,n,o)}update(t){const s=this._cachedMeta,n=s.dataset,o=s.data||[],r=s.iScale.getLabels();if(n.points=o,"resize"!==t){const a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0),this.updateElement(n,void 0,{_loop:!0,_fullLoop:r.length===o.length,options:a},t)}this.updateElements(o,0,o.length,t)}updateElements(t,s,n,o){const r=this._cachedMeta.rScale,a="reset"===o;for(let l=s;l<s+n;l++){const c=t[l],h=this.resolveDataElementOptions(l,c.active?"active":o),d=r.getPointPositionForValue(l,this.getParsed(l).r),u=a?r.xCenter:d.x,f=a?r.yCenter:d.y,p={x:u,y:f,angle:d.angle,skip:isNaN(u)||isNaN(f),options:h};this.updateElement(c,l,p,o)}}})(),ScatterController:(()=>class e extends Mt{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){const s=this._cachedMeta,n=this.chart.data.labels||[],{xScale:o,yScale:r}=s,a=this.getParsed(t),l=o.getLabelForValue(a.x),c=r.getLabelForValue(a.y);return{label:n[t]||"",value:"("+l+", "+c+")"}}update(t){const s=this._cachedMeta,{data:n=[]}=s,o=this.chart._animationsDisabled;let{start:r,count:a}=ls(s,n,o);if(this._drawStart=r,this._drawCount=a,cs(s)&&(r=0,a=n.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:l,_dataset:c}=s;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!c._decimated,l.points=n;const h=this.resolveDatasetElementOptions(t);h.segment=this.options.segment,this.updateElement(l,void 0,{animated:!o,options:h},t)}else this.datasetElementType&&(delete s.dataset,this.datasetElementType=!1);this.updateElements(n,r,a,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,s,n,o){const r="reset"===o,{iScale:a,vScale:l,_stacked:c,_dataset:h}=this._cachedMeta,d=this.resolveDataElementOptions(s,o),u=this.getSharedOptions(d),f=this.includeOptions(o,u),p=a.axis,m=l.axis,{spanGaps:b,segment:x}=this.options,_=Vt(b)?b:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||r||"none"===o;let M=s>0&&this.getParsed(s-1);for(let y=s;y<s+n;++y){const k=t[y],w=this.getParsed(y),S=v?k:{},D=A(w[m]),O=S[p]=a.getPixelForValue(w[p],y),C=S[m]=r||D?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,w,c):w[m],y);S.skip=isNaN(O)||isNaN(C)||D,S.stop=y>0&&Math.abs(w[p]-M[p])>_,x&&(S.parsed=w,S.raw=h.data[y]),f&&(S.options=u||this.resolveDataElementOptions(y,k.active?"active":o)),v||this.updateElement(k,y,S,o),M=w}this.updateSharedOptions(u,o,d)}getMaxOverflow(){const t=this._cachedMeta,s=t.data||[];if(!this.options.showLine){let l=0;for(let c=s.length-1;c>=0;--c)l=Math.max(l,s[c].size(this.resolveDataElementOptions(c))/2);return l>0&&l}const n=t.dataset,o=n.options&&n.options.borderWidth||0;if(!s.length)return o;const r=s[0].size(this.resolveDataElementOptions(0)),a=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(o,r,a)/2}})()});function Lt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}
1class Mi{static override(i){Object.assign(Mi.prototype,i)}options;constructor(i){this.options=i||{}}init(){}formats(){return Lt()}parse(){return Lt()}format(){return Lt()}add(){return Lt()}diff(){return Lt()}startOf(){return Lt()}endOf(){return Lt()}}var Ta__date=Mi;function La(e,i,t,s){const{controller:n,data:o,_sorted:r}=e,a=n._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(a&&i===a.axis&&"r"!==i&&r&&o.length){const c=a._reversePixels?Qo:ft;if(!s){const h=c(o,i,t);if(l){const{vScale:d}=n._cachedMeta,{_parsed:u}=e,f=u.slice(0,h.lo+1).reverse().findIndex(m=>!A(m[d.axis]));h.lo-=Math.max(0,f);const p=u.slice(h.hi).findIndex(m=>!A(m[d.axis]));h.hi+=Math.max(0,p)}return h}if(n._sharedOptions){const h=o[0],d="function"==typeof h.getRange&&h.getRange(i);if(d){const u=c(o,i,t-d),f=c(o,i,t+d);return{lo:u.lo,hi:f.hi}}}}return{lo:0,hi:o.length-1}}function re(e,i,t,s,n){const o=e.getSortedVisibleDatasetMetas(),r=t[i];for(let a=0,l=o.length;a<l;++a){const{index:c,data:h}=o[a],{lo:d,hi:u}=La(o[a],i,r,n);for(let f=d;f<=u;++f){const p=h[f];p.skip||s(p,c,f)}}}function Si(e,i,t,s,n){const o=[];return!n&&!e.isPointInArea(i)||re(e,t,i,function(a,l,c){!n&&!gt(a,e.chartArea,0)||a.inRange(i.x,i.y,s)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function wi(e,i,t,s,n,o){return o||e.isPointInArea(i)?"r"!==t||s?function Ea(e,i,t,s,n,o){let r=[];const a=function Fa(e){const i=-1!==e.indexOf("x"),t=-1!==e.indexOf("y");return function(s,n){const o=i?Math.abs(s.x-n.x):0,r=t?Math.abs(s.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(r,2))}}(t);let l=Number.POSITIVE_INFINITY;return re(e,t,i,function c(h,d,u){const f=h.inRange(i.x,i.y,n);if(s&&!f)return;const p=h.getCenterPoint(n);if(!o&&!e.isPointInArea(p)&&!f)return;const b=a(i,p);b<l?(r=[{element:h,datasetIndex:d,index:u}],l=b):b===l&&r.push({element:h,datasetIndex:d,index:u})}),r}(e,i,t,s,n,o):function Ia(e,i,t,s){let n=[];return re(e,t,i,function o(r,a,l){const{startAngle:c,endAngle:h}=r.getProps(["startAngle","endAngle"],s),{angle:d}=is(r,{x:i.x,y:i.y});Zt(d,c,h)&&n.push({element:r,datasetIndex:a,index:l})}),n}(e,i,t,n):[]}function Js(e,i,t,s,n){const o=[],r="x"===t?"inXRange":"inYRange";let a=!1;return re(e,t,i,(l,c,h)=>{l[r]&&l[r](i[t],n)&&(o.push({element:l,datasetIndex:c,index:h}),a=a||l.inRange(i.x,i.y,n))}),s&&!a?[]:o}var za={evaluateInteractionItems:re,modes:{index(e,i,t,s){const n=Rt(i,e),o=t.axis||"x",r=t.includeInvisible||!1,a=t.intersect?Si(e,n,o,s,r):wi(e,n,o,!1,s,r),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const h=a[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(e,i,t,s){const n=Rt(i,e),o=t.axis||"xy",r=t.includeInvisible||!1;let a=t.intersect?Si(e,n,o,s,r):wi(e,n,o,!1,s,r);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let h=0;h<c.length;++h)a.push({element:c[h],datasetIndex:l,index:h})}return a},point:(e,i,t,s)=>Si(e,Rt(i,e),t.axis||"xy",s,t.includeInvisible||!1),nearest:(e,i,t,s)=>wi(e,Rt(i,e),t.axis||"xy",t.intersect,s,t.includeInvisible||!1),x:(e,i,t,s)=>Js(e,Rt(i,e),"x",t.intersect,s),y:(e,i,t,s)=>Js(e,Rt(i,e),"y",t.intersect,s)}};const qs=["left","top","right","bottom"];function ae(e,i){return e.filter(t=>t.pos===i)}function Qs(e,i){return e.filter(t=>-1===qs.indexOf(t.pos)&&t.box.axis===i)}function le(e,i){return e.sort((t,s)=>{const n=i?s:t,o=i?t:s;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function Zs(e,i,t,s){return Math.max(e[t],i[t])+Math.max(e[s],i[s])}function tn(e,i){e.top=Math.max(e.top,i.top),e.left=Math.max(e.left,i.left),e.bottom=Math.max(e.bottom,i.bottom),e.right=Math.max(e.right,i.right)}function Wa(e,i,t,s){const{pos:n,box:o}=t,r=e.maxPadding;if(!R(n)){t.size&&(e[n]-=t.size);const d=s[t.stack]||{size:0,count:1};d.size=Math.max(d.size,t.horizontal?o.height:o.width),t.size=d.size/d.count,e[n]+=t.size}o.getPadding&&tn(r,o.getPadding());const a=Math.max(0,i.outerWidth-Zs(r,e,"left","right")),l=Math.max(0,i.outerHeight-Zs(r,e,"top","bottom")),c=a!==e.w,h=l!==e.h;return e.w=a,e.h=l,t.horizontal?{same:c,other:h}:{same:h,other:c}}function $a(e,i){const t=i.maxPadding;return function s(n){const o={left:0,top:0,right:0,bottom:0};
1return n.forEach(r=>{o[r]=Math.max(i[r],t[r])}),o}(e?["left","right"]:["top","bottom"])}function ce(e,i,t,s){const n=[];let o,r,a,l,c,h;for(o=0,r=e.length,c=0;o<r;++o){a=e[o],l=a.box,l.update(a.width||i.w,a.height||i.h,$a(a.horizontal,i));const{same:d,other:u}=Wa(i,t,a,s);c|=d&&n.length,h=h||u,l.fullSize||n.push(a)}return c&&ce(n,i,t,s)||h}function Le(e,i,t,s,n){e.top=t,e.left=i,e.right=i+s,e.bottom=t+n,e.width=s,e.height=n}function en(e,i,t,s){const n=t.padding;let{x:o,y:r}=i;for(const a of e){const l=a.box,c=s[a.stack]||{count:1,placed:0,weight:1},h=a.stackWeight/c.weight||1;if(a.horizontal){const d=i.w*h,u=c.size||l.height;qt(c.start)&&(r=c.start),l.fullSize?Le(l,n.left,r,t.outerWidth-n.right-n.left,u):Le(l,i.left+c.placed,r,d,u),c.start=r,c.placed+=d,r=l.bottom}else{const d=i.h*h,u=c.size||l.width;qt(c.start)&&(o=c.start),l.fullSize?Le(l,o,n.top,u,t.outerHeight-n.bottom-n.top):Le(l,o,i.top+c.placed,u,d),c.start=o,c.placed+=d,o=l.right}}i.x=o,i.y=r}var K={addBox(e,i){e.boxes||(e.boxes=[]),i.fullSize=i.fullSize||!1,i.position=i.position||"top",i.weight=i.weight||0,i._layers=i._layers||function(){return[{z:0,draw(t){i.draw(t)}}]},e.boxes.push(i)},removeBox(e,i){const t=e.boxes?e.boxes.indexOf(i):-1;-1!==t&&e.boxes.splice(t,1)},configure(e,i,t){i.fullSize=t.fullSize,i.position=t.position,i.weight=t.weight},update(e,i,t,s){if(!e)return;const n=G(e.options.layout.padding),o=Math.max(i-n.width,0),r=Math.max(t-n.height,0),a=function Va(e){const i=function Ba(e){const i=[];let t,s,n,o,r,a;for(t=0,s=(e||[]).length;t<s;++t)n=e[t],({position:o,options:{stack:r,stackWeight:a=1}}=n),i.push({index:t,box:n,pos:o,horizontal:n.isHorizontal(),weight:n.weight,stack:r&&o+r,stackWeight:a});return i}(e),t=le(i.filter(c=>c.box.fullSize),!0),s=le(ae(i,"left"),!0),n=le(ae(i,"right")),o=le(ae(i,"top"),!0),r=le(ae(i,"bottom")),a=Qs(i,"x"),l=Qs(i,"y");return{fullSize:t,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(r).concat(a),chartArea:ae(i,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(r).concat(a)}}(e.boxes),l=a.vertical,c=a.horizontal;L(e.boxes,m=>{"function"==typeof m.beforeLayout&&m.beforeLayout()});const h=l.reduce((m,b)=>b.box.options&&!1===b.box.options.display?m:m+1,0)||1,d=Object.freeze({outerWidth:i,outerHeight:t,padding:n,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/h,hBoxMaxHeight:r/2}),u=Object.assign({},n);tn(u,G(s));const f=Object.assign({maxPadding:u,w:o,h:r,x:n.left,y:n.top},n),p=function Na(e,i){const t=function ja(e){const i={};for(const t of e){const{stack:s,pos:n,stackWeight:o}=t;if(!s||!qs.includes(n))continue;const r=i[s]||(i[s]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=o}return i}(e),{vBoxMaxWidth:s,hBoxMaxHeight:n}=i;let o,r,a;for(o=0,r=e.length;o<r;++o){a=e[o];const{fullSize:l}=a.box,c=t[a.stack],h=c&&a.stackWeight/c.weight;a.horizontal?(a.width=h?h*s:l&&i.availableWidth,a.height=n):(a.width=s,a.height=h?h*n:l&&i.availableHeight)}return t}(l.concat(c),d);ce(a.fullSize,f,d,p),ce(l,f,d,p),ce(c,f,d,p)&&ce(l,f,d,p),function Ha(e){const i=e.maxPadding;function t(s){const n=Math.max(i[s]-e[s],0);return e[s]+=n,n}e.y+=t("top"),e.x+=t("left"),t("right"),t("bottom")}(f),en(a.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,en(a.rightAndBottom,f,d,p),e.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},L(a.chartArea,m=>{const b=m.box;Object.assign(b,e.chartArea),b.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class sn{acquireContext(i,t){}releaseContext(i){return!1}addEventListener(i,t,s){}removeEventListener(i,t,s){}getDevicePixelRatio(){return 1}getMaximumSize(i,t,s,n){return t=Math.max(0,t||i.width),s=s||i.height,{width:t,height:Math.max(0,n?Math.floor(t/n):s)}}isAttached(i){return!0}updateConfig(i){}}class Ya extends sn{acquireContext(i){return i&&i.getContext&&i.getContext("2d")||null}updateConfig(i){i.options.animation=!1}}const Fe="$chartjs",Ua={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},nn=e=>null===e||""===e,on=!!Yr&&{passive:!0};function Ka(e,i,t){e&&e.canvas&&e.canvas.removeEventListener(i,t,on)}function Ie(e,i){for(const t of e)if(t===i||t.contains(i))return!0}function qa(e,i,t){const s=e.canvas,n=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Ie(a.addedNodes,s),r=r&&!Ie(a.removedNodes,s);r&&t()});return n.observe(document,{childList:!0,subtree:!0}),n}function Qa(e,i,t){const s=e.canvas,n=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Ie(a.removedNodes,s),r=r&&!Ie(a.addedNodes,s);r&&t()});return n.observe(document,{childList:!0,subtree:!0}),n}const he=new Map;let rn=0;function an(){const e=window.devicePixelRatio;e!==rn&&(rn=e,he.forEach((i,t)=>{t.currentDevicePixelRatio!==e&&i()}))}function el(e,i,t){const s=e.canvas,n=s&&bi(s);if(!n)return;const o=as((a,l)=>{const c=n.clientWidth;t(a,l),c<n.clientWidth&&t()},window),r=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,h=l.contentRect.height;0===c&&0===h||o(c,h)});return r.observe(n),function Za(e,i){he.size||window.addEventListener("resize",an),he.set(e,i)}(e,o),r}function Di(e,i,t){t&&t.disconnect(),"resize"===i&&function tl(e){he.delete(e),he.size||window.removeEventListener("resize",an)}(e)}function il(e,i,t){const s=e.canvas,n=as(o=>{null!==e.ctx&&t(function Ja(e,i){const t=Ua[e.type]||e.type,{x:s,y:n}=Rt(e,i);return{type:t,chart:i,native:e,x:void 0!==s?s:null,y:void 0!==n?n:null}}(o,e))},e);return function Ga(e,i,t){e&&e.addEventListener(i,t,on)}(s,i,n),n}class sl extends sn{acquireContext(i,t){const s=i&&i.getContext&&i.getContext("2d");return s&&s.canvas===i?(function Xa(e,i){const t=e.style,s=e.getAttribute("height"),n=e.getAttribute("width");
vendor: 23,302 bytes, line 1
1if(e[Fe]={initial:{height:s,width:n,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",nn(n)){const o=Ps(e,"width");void 0!==o&&(e.width=o)}if(nn(s))if(""===e.style.height)e.height=e.width/(i||2);else{const o=Ps(e,"height");void 0!==o&&(e.height=o)}}(i,t),s):null}releaseContext(i){const t=i.canvas;if(!t[Fe])return!1;const s=t[Fe].initial;["height","width"].forEach(o=>{const r=s[o];A(r)?t.removeAttribute(o):t.setAttribute(o,r)});const n=s.style||{};return Object.keys(n).forEach(o=>{t.style[o]=n[o]}),t.width=t.width,delete t[Fe],!0}addEventListener(i,t,s){this.removeEventListener(i,t),(i.$proxies||(i.$proxies={}))[t]=({attach:qa,detach:Qa,resize:el}[t]||il)(i,t,s)}removeEventListener(i,t){const s=i.$proxies||(i.$proxies={}),n=s[t];n&&(({attach:Di,detach:Di,resize:Di}[t]||Ka)(i,t,n),s[t]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(i,t,s,n){return function $r(e,i,t,s){const n=Ae(e),o=At(n,"margin"),r=Oe(n.maxWidth,e,"clientWidth")||ke,a=Oe(n.maxHeight,e,"clientHeight")||ke,l=function Hr(e,i,t){let s,n;if(void 0===i||void 0===t){const o=e&&bi(e);if(o){const r=o.getBoundingClientRect(),a=Ae(o),l=At(a,"border","width"),c=At(a,"padding");i=r.width-c.width-l.width,t=r.height-c.height-l.height,s=Oe(a.maxWidth,o,"clientWidth"),n=Oe(a.maxHeight,o,"clientHeight")}else i=e.clientWidth,t=e.clientHeight}return{width:i,height:t,maxWidth:s||ke,maxHeight:n||ke}}(e,i,t);let{width:c,height:h}=l;if("content-box"===n.boxSizing){const u=At(n,"border","width"),f=At(n,"padding");c-=f.width+u.width,h-=f.height+u.height}return c=Math.max(0,c-o.width),h=Math.max(0,s?c/s:h-o.height),c=Re(Math.min(c,r,l.maxWidth)),h=Re(Math.min(h,a,l.maxHeight)),c&&!h&&(h=Re(c/2)),(void 0!==i||void 0!==t)&&s&&l.height&&h>l.height&&(h=l.height,c=Re(Math.floor(h*s))),{width:c,height:h}}(i,t,s,n)}isAttached(i){const t=i&&bi(i);return!(!t||!t.isConnected)}}class mt{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(i){const{x:t,y:s}=this.getProps(["x","y"],i);return{x:t,y:s}}hasValue(){return Vt(this.x)&&Vt(this.y)}getProps(i,t){const s=this.$animations;if(!t||!s)return this;const n={};return i.forEach(o=>{n[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),n}}function Ee(e,i,t,s,n){const o=P(s,0),r=Math.min(P(n,e.length),e.length);let l,c,h,a=0;for(t=Math.ceil(t),n&&(l=n-s,t=l/Math.floor(l/t)),h=o;h<0;)a++,h=Math.round(o+a*t);for(c=Math.max(o,0);c<r;c++)c===h&&(i.push(e[c]),a++,h=Math.round(o+a*t))}const ln=(e,i,t)=>"top"===i||"left"===i?e[i]+t:e[i]-t,cn=(e,i)=>Math.min(i||e,e);function hn(e,i){const t=[],s=e.length/i,n=e.length;let o=0;for(;o<n;o+=s)t.push(e[Math.floor(o)]);return t}function ul(e,i,t){const s=e.ticks.length,n=Math.min(i,s-1),o=e._startPixel,r=e._endPixel,a=1e-6;let c,l=e.getPixelForTick(n);if(!(t&&(c=1===s?Math.max(l-o,r-l):0===i?(e.getPixelForTick(1)-l)/2:(l-e.getPixelForTick(n-1))/2,l+=n<i?c:-c,l<o-a||l>r+a)))return l}function de(e){return e.drawTicks?e.tickLength:0}function dn(e,i){if(!e.display)return 0;const t=$(e.font,i),s=G(e.padding);return(E(e.text)?e.text.length:1)*t.lineHeight+s.height}function ml(e,i,t){let s=ri(e);return(t&&"right"!==i||!t&&"right"===i)&&(s=(e=>"left"===e?"right":"right"===e?"left":e)(s)),s}class Ft extends mt{constructor(i){super(),this.id=i.id,this.type=i.type,this.options=void 0,this.ctx=i.ctx,this.chart=i.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(i){this.options=i.setContext(this.getContext()),this.axis=i.axis,this._userMin=this.parse(i.min),this._userMax=this.parse(i.max),this._suggestedMin=this.parse(i.suggestedMin),this._suggestedMax=this.parse(i.suggestedMax)}parse(i,t){return i}getUserBounds(){let{_userMin:i,_userMax:t,_suggestedMin:s,_suggestedMax:n}=this;return i=tt(i,Number.POSITIVE_INFINITY),t=tt(t,Number.NEGATIVE_INFINITY),s=tt(s,Number.POSITIVE_INFINITY),n=tt(n,Number.NEGATIVE_INFINITY),{min:tt(i,s),max:tt(t,n),minDefined:V(i),maxDefined:V(t)}}getMinMax(i){let r,{min:t,max:s,minDefined:n,maxDefined:o}=this.getUserBounds();if(n&&o)return{min:t,max:s};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)r=a[l].controller.getMinMax(this,i),n||(t=Math.min(t,r.min)),o||(s=Math.max(s,r.max));return t=o&&t>s?s:t,s=n&&t>s?t:s,{min:tt(t,tt(s,t)),max:tt(s,tt(t,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const i=this.chart.data;return this.options.labels||(this.isHorizontal()?i.xLabels:i.yLabels)||i.labels||[]}getLabelItems(i=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(i))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){I(this.options.beforeUpdate,[this])}update(i,t,s){const{beginAtZero:n,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=i,this.maxHeight=t,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function kr(e,i,t){const{min:s,max:n}=e,o=Gi(i,(n-s)/2),r=(a,l)=>t&&0===a?0:a+l;return{min:r(s,-Math.abs(o)),max:r(n,o)}}(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?hn(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||"auto"===r.source)&&(this.ticks=function ol(e,i){const t=e.options.ticks,s=function rl(e){const i=e.options.offset,t=e._tickSize();return Math.floor(Math.min(e._length/t+(i?0:1),e._maxLength/t))}(e),n=Math.min(t.maxTicksLimit||s,s),o=t.major.enabled?function ll(e){const i=[];let t,s;for(t=0,s=e.length;t<s;t++)e[t].major&&i.push(t);return i}(i):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>n)return function cl(e,i,t,s){let r,n=0,o=t[0];for(s=Math.ceil(s),r=0;r<e.length;r++)r===o&&(i.push(e[r]),n++,o=t[n*s])}(i,c,o,r/n),c;const h=function al(e,i,t){const s=function hl(e){const i=e.length;let t,s;if(i<2)return!1;for(s=e[0],t=1;t<i;++t)if(e[t]-e[t-1]!==s)return!1;return s}(e),n=i.length/t;if(!s)return Math.max(n,1);const o=function Xo(e){const i=[],t=Math.sqrt(e);let s;for(s=1;s<t;s++)e%s==0&&(i.push(s),i.push(e/s));return t===(0|t)&&i.push(t),i.sort((n,o)=>n-o).pop(),i}(s);for(let r=0,a=o.length-1;r<a;r++){const l=o[r];if(l>n)return l}return Math.max(n,1)}(o,i,n);if(r>0){let d,u;const f=r>1?Math.round((l-a)/(r-1)):null;for(Ee(i,c,h,A(f)?0:a-f,a),d=0,u=r-1;d<u;d++)Ee(i,c,h,o[d],o[d+1]);return Ee(i,c,h,l,A(f)?i.length:l+f),c}return Ee(i,c,h),c}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,s,i=this.options.reverse;this.isHorizontal()?(t=this.left,s=this.right):(t=this.top,s=this.bottom,i=!i),this._startPixel=t,this._endPixel=s,this._reversePixels=i,this._length=s-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){I(this.options.afterUpdate,[this])}beforeSetDimensions(){I(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){I(this.options.afterSetDimensions,[this])}_callHooks(i){this.chart.notifyPlugins(i,this.getContext()),I(this.options[i],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){I(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(i){const t=this.options.ticks;let s,n,o;for(s=0,n=i.length;s<n;s++)o=i[s],o.label=I(t.callback,[o.value,s,i],this)}afterTickToLabelConversion(){I(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){I(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const i=this.options,t=i.ticks,s=cn(this.ticks.length,i.ticks.maxTicksLimit),n=t.minRotation||0,o=t.maxRotation;let a,l,c,r=n;if(!this._isVisible()||!t.display||n>=o||s<=1||!this.isHorizontal())return void(this.labelRotation=n);const h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=Y(this.chart.width-d,0,this.maxWidth);a=i.offset?this.maxWidth/s:f/(s-1),d+6>a&&(a=f/(s-(i.offset?.5:1)),l=this.maxHeight-de(i.grid)-t.padding-dn(i.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),r=si(Math.min(Math.asin(Y((h.highest.height+6)/a,-1,1)),Math.asin(Y(l/c,-1,1))-Math.asin(Y(u/c,-1,1)))),r=Math.max(n,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){I(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){I(this.options.beforeFit,[this])}fit(){const i={width:0,height:0},{chart:t,options:{ticks:s,title:n,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const l=dn(n,t.options.font);if(a?(i.width=this.maxWidth,i.height=de(o)+l):(i.height=this.maxHeight,i.width=de(o)+l),s.display&&this.ticks.length){const{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),f=2*s.padding,p=nt(this.labelRotation),m=Math.cos(p),b=Math.sin(p);a?i.height=Math.min(this.maxHeight,i.height+(s.mirror?0:b*d.width+m*u.height)+f):i.width=Math.min(this.maxWidth,i.width+(s.mirror?0:m*d.width+b*u.height)+f),this._calculatePadding(c,h,b,m)}}this._handleMargins(),a?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=i.height):(this.width=i.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(i,t,s,n){const{ticks:{align:o,padding:r},position:a}=this.options,l=0!==this.labelRotation,c="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,f=0;l?c?(u=n*i.width,f=s*t.height):(u=s*i.height,f=n*t.width):"start"===o?f=t.width:"end"===o?u=i.width:"inner"!==o&&(u=i.width/2,f=t.width/2),this.paddingLeft=Math.max((u-h+r)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-d+r)*this.width/(this.width-d),0)}else{let h=t.height/2,d=i.height/2;"start"===o?(h=0,d=i.height):"end"===o&&(h=t.height,d=0),this.paddingTop=h+r,this.paddingBottom=d+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){I(this.options.afterFit,[this])}isHorizontal(){const{axis:i,position:t}=this.options;return"top"===t||"bottom"===t||"x"===i}isFullSize(){return this.options.fullSize}_convertTicksToLabels(i){let t,s;for(this.beforeTickToLabelConversion(),this.generateTickLabels(i),t=0,s=i.length;t<s;t++)A(i[t].label)&&(i.splice(t,1),s--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let i=this._labelSizes;if(!i){const t=this.options.ticks.sampleSize;let s=this.ticks;t<s.length&&(s=hn(s,t)),this._labelSizes=i=this._computeLabelSizes(s,s.length,this.options.ticks.maxTicksLimit)}return i}_computeLabelSizes(i,t,s){const{ctx:n,_longestTextCache:o}=this,r=[],a=[],l=Math.floor(t/cn(t,s));let d,u,f,p,m,b,x,_,v,M,y,c=0,h=0;for(d=0;d<t;d+=l){if(p=i[d].label,m=this._resolveTickFontOptions(d),n.font=b=m.string,x=o[b]=o[b]||{data:{},gc:[]},_=m.lineHeight,v=M=0,A(p)||E(p)){if(E(p))for(u=0,f=p.length;u<f;++u)y=p[u],!A(y)&&!E(y)&&(v=we(n,x.data,x.gc,v,y),M+=_)}else v=we(n,x.data,x.gc,v,p),M=_;r.push(v),a.push(M),c=Math.max(v,c),h=Math.max(M,h)}!function fl(e,i){L(e,t=>{const s=t.gc,n=s.length/2;let o;if(n>i){for(o=0;o<n;++o)delete t.data[s[o]];s.splice(0,n)}})}(o,t);const k=r.indexOf(c),w=a.indexOf(h),S=D=>({width:r[D]||0,height:a[D]||0});return{first:S(0),last:S(t-1),widest:S(k),highest:S(w),widths:r,heights:a}}getLabelForValue(i){return i}getPixelForValue(i,t){return NaN}getValueForPixel(i){}getPixelForTick(i){const t=this.ticks;return i<0||i>t.length-1?null:this.getPixelForValue(t[i].value)}getPixelForDecimal(i){this._reversePixels&&(i=1-i);const t=this._startPixel+i*this._length;return function qo(e){return Y(e,-32768,32767)}(this._alignToPixels?Pt(this.chart,t,0):t)}getDecimalForPixel(i){const t=(i-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:i,max:t}=this;return i<0&&t<0?t:i>0&&t>0?i:0}getContext(i){const t=this.ticks||[];if(i>=0&&i<t.length){const s=t[i];return s.$context||(s.$context=function pl(e,i,t){return kt(e,{tick:t,index:i,type:"tick"})}(this.getContext(),i,s))}return this.$context||(this.$context=function gl(e,i){return kt(e,{scale:i,type:"scale"})}(this.chart.getContext(),this))}_tickSize(){const i=this.options.ticks,t=nt(this.labelRotation),s=Math.abs(Math.cos(t)),n=Math.abs(Math.sin(t)),o=this._getLabelSizes(),r=i.autoSkipPadding||0,a=o?o.widest.width+r:0,l=o?o.highest.height+r:0;return this.isHorizontal()?l*s>a*n?a/s:l/n:l*n<a*s?l/s:a/n}_isVisible(){const i=this.options.display;return"auto"!==i?!!i:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(i){const t=this.axis,s=this.chart,n=this.options,{grid:o,position:r,border:a}=n,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),u=de(o),f=[],p=a.setContext(this.getContext()),m=p.display?p.width:0,b=m/2,x=function(N){return Pt(s,N,m)};let _,v,M,y,k,w,S,D,O,C,T,U;if("top"===r)_=x(this.bottom),w=this.bottom-u,D=_-b,C=x(i.top)+b,U=i.bottom;else if("bottom"===r)_=x(this.top),C=i.top,U=x(i.bottom)-b,w=_+b,D=this.top+u;else if("left"===r)_=x(this.right),k=this.right-u,S=_-b,O=x(i.left)+b,T=i.right;else if("right"===r)_=x(this.left),O=i.left,T=x(i.right)-b,k=_+b,S=this.left+u;else if("x"===t){if("center"===r)_=x((i.top+i.bottom)/2+.5);else if(R(r)){const N=Object.keys(r)[0];_=x(this.chart.scales[N].getPixelForValue(r[N]))}C=i.top,U=i.bottom,w=_+b,D=w+u}else if("y"===t){if("center"===r)_=x((i.left+i.right)/2);else if(R(r)){const N=Object.keys(r)[0];_=x(this.chart.scales[N].getPixelForValue(r[N]))}k=_-b,S=k-u,O=i.left,T=i.right}const it=P(n.ticks.maxTicksLimit,d),F=Math.max(1,Math.ceil(d/it));for(v=0;v<d;v+=F){const N=this.getContext(v),H=o.setContext(N),ot=a.setContext(N),J=H.lineWidth,Ut=H.color,Ke=ot.dash||[],Xt=ot.dashOffset,pe=H.tickWidth,Et=H.tickColor,me=H.tickBorderDash||[],zt=H.tickBorderDashOffset;M=ul(this,v,l),void 0!==M&&(y=Pt(s,M,J),c?k=S=O=T=y:w=D=C=U=y,f.push({tx1:k,ty1:w,tx2:S,ty2:D,x1:O,y1:C,x2:T,y2:U,width:J,color:Ut,borderDash:Ke,borderDashOffset:Xt,tickWidth:pe,tickColor:Et,tickBorderDash:me,tickBorderDashOffset:zt}))}return this._ticksLength=d,this._borderValue=_,f}_computeLabelItems(i){const t=this.axis,s=this.options,{position:n,ticks:o}=s,r=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=o,u=de(s.grid),f=u+h,p=d?-h:f,m=-nt(this.labelRotation),b=[];let x,_,v,M,y,k,w,S,D,O,C,T,U="middle";if("top"===n)k=this.bottom-p,w=this._getXAxisLabelAlignment();else if("bottom"===n)k=this.top+p,w=this._getXAxisLabelAlignment();else if("left"===n){const F=this._getYAxisLabelAlignment(u);w=F.textAlign,y=F.x}else if("right"===n){const F=this._getYAxisLabelAlignment(u);w=F.textAlign,y=F.x}else if("x"===t){if("center"===n)k=(i.top+i.bottom)/2+f;else if(R(n)){const F=Object.keys(n)[0];k=this.chart.scales[F].getPixelForValue(n[F])+f}w=this._getXAxisLabelAlignment()}else if("y"===t){if("center"===n)y=(i.left+i.right)/2-f;else if(R(n)){const F=Object.keys(n)[0];y=this.chart.scales[F].getPixelForValue(n[F])}w=this._getYAxisLabelAlignment(u).textAlign}"y"===t&&("start"===l?U="top":"end"===l&&(U="bottom"));const it=this._getLabelSizes();for(x=0,_=a.length;x<_;++x){v=a[x],M=v.label;const F=o.setContext(this.getContext(x));S=this.getPixelForTick(x)+o.labelOffset,D=this._resolveTickFontOptions(x),O=D.lineHeight,C=E(M)?M.length:1;const N=C/2,H=F.color,ot=F.textStrokeColor,J=F.textStrokeWidth;let Ke,Ut=w;if(r?(y=S,"inner"===w&&(Ut=x===_-1?this.options.reverse?"left":"right":0===x?this.options.reverse?"right":"left":"center"),T="top"===n?"near"===c||0!==m?-C*O+O/2:"center"===c?-it.highest.height/2-N*O+O:O/2-it.highest.height:"near"===c||0!==m?O/2:"center"===c?it.highest.height/2-N*O:it.highest.height-C*O,d&&(T*=-1),0!==m&&!F.showLabelBackdrop&&(y+=O/2*Math.sin(m))):(k=S,T=(1-C)*O/2),F.showLabelBackdrop){const Xt=G(F.backdropPadding),pe=it.heights[x],Et=it.widths[x];let me=T-Xt.top,zt=0-Xt.left;switch(U){case"middle":me-=pe/2;break;case"bottom":me-=pe}switch(w){case"center":zt-=Et/2;break;case"right":zt-=Et;break;case"inner":x===_-1?zt-=Et:x>0&&(zt-=Et/2)}Ke={left:zt,top:me,width:Et+Xt.width,height:pe+Xt.height,color:F.backdropColor}}b.push({label:M,font:D,textOffset:T,options:{rotation:m,color:H,strokeColor:ot,strokeWidth:J,textAlign:Ut,textBaseline:U,translation:[y,k],backdrop:Ke}})}return b}_getXAxisLabelAlignment(){const{position:i,ticks:t}=this.options;if(-nt(this.labelRotation))return"top"===i?"left":"right";let n="center";return"start"===t.align?n="left":"end"===t.align?n="right":"inner"===t.align&&(n="inner"),n}_getYAxisLabelAlignment(i){const{position:t,ticks:{crossAlign:s,mirror:n,padding:o}}=this.options,a=i+o,l=this._getLabelSizes().widest.width;let c,h;return"left"===t?n?(h=this.right+o,"near"===s?c="left":"center"===s?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-a,"near"===s?c="right":"center"===s?(c="center",h-=l/2):(c="left",h=this.left)):"right"===t?n?(h=this.left+o,"near"===s?c="right":"center"===s?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+a,"near"===s?c="left":"center"===s?(c="center",h+=l/2):(c="right",h=this.right)):c="right",{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const i=this.chart,t=this.options.position;return"left"===t||"right"===t?{top:0,left:this.left,bottom:i.height,right:this.right}:"top"===t||"bottom"===t?{top:this.top,left:0,bottom:this.bottom,right:i.width}:void 0}drawBackground(){const{ctx:i,options:{backgroundColor:t},left:s,top:n,width:o,height:r}=this;t&&(i.save(),i.fillStyle=t,i.fillRect(s,n,o,r),i.restore())}getLineWidthForValue(i){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const n=this.ticks.findIndex(o=>o.value===i);return n>=0?t.setContext(this.getContext(n)).lineWidth:0}drawGrid(i){const t=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(i));let o,r;const a=(l,c,h)=>{!h.width||!h.color||(s.save(),s.lineWidth=h.width,s.strokeStyle=h.color,s.setLineDash(h.borderDash||[]),s.lineDashOffset=h.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(t.display)for(o=0,r=n.length;o<r;++o){const l=n[o];t.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),t.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:i,ctx:t,options:{border:s,grid:n}}=this,o=s.setContext(this.getContext()),r=s.display?o.width:0;if(!r)return;const a=n.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,h,d,u;this.isHorizontal()?(c=Pt(i,this.left,r)-r/2,h=Pt(i,this.right,a)+a/2,d=u=l):(d=Pt(i,this.top,r)-r/2,u=Pt(i,this.bottom,a)+a/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(i){if(!this.options.ticks.display)return;const s=this.ctx,n=this._computeLabelArea();n&&De(s,n);const o=this.getLabelItems(i);for(const r of o)Ct(s,r.label,0,r.textOffset,r.font,r.options);n&&Pe(s)}drawTitle(){const{ctx:i,options:{position:t,title:s,reverse:n}}=this;if(!s.display)return;const o=$(s.font),r=G(s.padding),a=s.align;let l=o.lineHeight/2;"bottom"===t||"center"===t||R(t)?(l+=r.bottom,E(s.text)&&(l+=o.lineHeight*(s.text.length-1))):l+=r.top;const{titleX:c,titleY:h,maxWidth:d,rotation:u}=function bl(e,i,t,s){const{top:n,left:o,bottom:r,right:a,chart:l}=e,{chartArea:c,scales:h}=l;let u,f,p,d=0;const m=r-n,b=a-o;if(e.isHorizontal()){if(f=X(s,o,a),R(t)){const x=Object.keys(t)[0];p=h[x].getPixelForValue(t[x])+m-i}else p="center"===t?(c.bottom+c.top)/2+m-i:ln(e,t,i);u=a-o}else{if(R(t)){const x=Object.keys(t)[0];f=h[x].getPixelForValue(t[x])-b+i}else f="center"===t?(c.left+c.right)/2-b+i:ln(e,t,i);p=X(s,r,n),d="left"===t?-W:W}return{titleX:f,titleY:p,maxWidth:u,rotation:d}}(this,l,t,a);Ct(i,s.text,0,0,o,{color:s.color,maxWidth:d,rotation:u,textAlign:ml(a,t,n),textBaseline:"middle",translation:[c,h]})}draw(i){this._isVisible()&&(this.drawBackground(),this.drawGrid(i),this.drawBorder(),this.drawTitle(),this.drawLabels(i))}_layers(){const i=this.options,t=i.ticks&&i.ticks.z||0,s=P(i.grid&&i.grid.z,-1),n=P(i.border&&i.border.z,0);return this._isVisible()&&this.draw===Ft.prototype.draw?[{z:s,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:t,draw:o=>{this.drawLabels(o)}}]:[{z:t,draw:o=>{this.draw(o)}}]}getMatchingVisibleMetas(i){const t=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[];let o,r;for(o=0,r=t.length;o<r;++o){const a=t[o];a[s]===this.id&&(!i||a.type===i)&&n.push(a)}return n}_resolveTickFontOptions(i){return $(this.options.ticks.setContext(this.getContext(i)).font)}_maxDigits(){const i=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/i}}class ze{constructor(i,t,s){this.type=i,this.scope=t,this.override=s,this.items=Object.create(null)}isForType(i){return Object.prototype.isPrototypeOf.call(this.type.prototype,i.prototype)}register(i){const t=Object.getPrototypeOf(i);let s;(function yl(e){return"id"in e&&"defaults"in e})(t)&&(s=this.register(t));const n=this.items,o=i.id,r=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+i);return o in n||(n[o]=i,function xl(e,i,t){const s=Kt(Object.create(null),[t?j.get(t):{},j.get(i),e.defaults]);j.set(i,s),e.defaultRoutes&&function _l(e,i){Object.keys(i).forEac
vendor: 3,806 bytes, line 1
1h(t=>{const s=t.split("."),n=s.pop(),o=[e].concat(s).join("."),r=i[t].split("."),a=r.pop(),l=r.join(".");j.route(o,n,l,a)})}(i,e.defaultRoutes),e.descriptors&&j.describe(i,e.descriptors)}(i,r,s),this.override&&j.override(i.id,i.overrides)),r}get(i){return this.items[i]}unregister(i){const t=this.items,s=i.id,n=this.scope;s in t&&delete t[s],n&&s in j[n]&&(delete j[n][s],this.override&&delete Dt[s])}}class vl{constructor(){this.controllers=new ze(Mt,"datasets",!0),this.elements=new ze(mt,"elements"),this.plugins=new ze(Object,"plugins"),this.scales=new ze(Ft,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...i){this._each("register",i)}remove(...i){this._each("unregister",i)}addControllers(...i){this._each("register",i,this.controllers)}addElements(...i){this._each("register",i,this.elements)}addPlugins(...i){this._each("register",i,this.plugins)}addScales(...i){this._each("register",i,this.scales)}getController(i){return this._get(i,this.controllers,"controller")}getElement(i){return this._get(i,this.elements,"element")}getPlugin(i){return this._get(i,this.plugins,"plugin")}getScale(i){return this._get(i,this.scales,"scale")}removeControllers(...i){this._each("unregister",i,this.controllers)}removeElements(...i){this._each("unregister",i,this.elements)}removePlugins(...i){this._each("unregister",i,this.plugins)}removeScales(...i){this._each("unregister",i,this.scales)}_each(i,t,s){[...t].forEach(n=>{const o=s||this._getRegistryForType(n);s||o.isForType(n)||o===this.plugins&&n.id?this._exec(i,o,n):L(n,r=>{const a=s||this._getRegistryForType(r);this._exec(i,a,r)})})}_exec(i,t,s){const n=ii(i);I(s["before"+n],[],s),t[i](s),I(s["after"+n],[],s)}_getRegistryForType(i){for(let t=0;t<this._typedRegistries.length;t++){const s=this._typedRegistries[t];if(s.isForType(i))return s}return this.plugins}_get(i,t,s){const n=t.get(i);if(void 0===n)throw new Error('"'+i+'" is not a registered '+s+".");return n}}var at=new vl;class kl{constructor(){this._init=[]}notify(i,t,s,n){"beforeInit"===t&&(this._init=this._createDescriptors(i,!0),this._notify(this._init,i,"install"));const o=n?this._descriptors(i).filter(n):this._descriptors(i),r=this._notify(o,i,t,s);return"afterDestroy"===t&&(this._notify(o,i,"stop"),this._notify(this._init,i,"uninstall")),r}_notify(i,t,s,n){n=n||{};for(const o of i){const r=o.plugin;if(!1===I(r[s],[t,n,o.options],r)&&n.cancelable)return!1}return!0}invalidate(){A(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(i){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(i);return this._notifyStateChanges(i),t}_createDescriptors(i,t){const s=i&&i.config,n=P(s.options&&s.options.plugins,{}),o=function Ml(e){const i={},t=[],s=Object.keys(at.plugins.items);for(let o=0;o<s.length;o++)t.push(at.getPlugin(s[o]));const n=e.plugins||[];for(let o=0;o<n.length;o++){const r=n[o];-1===t.indexOf(r)&&(t.push(r),i[r.id]=!0)}return{plugins:t,localIds:i}}(s);return!1!==n||t?function wl(e,{plugins:i,localIds:t},s,n){const o=[],r=e.getContext();for(const a of i){const l=a.id,c=Sl(s[l],n);null!==c&&o.push({plugin:a,options:Dl(e.config,{plugin:a,local:t[l]},c,r)})}return o}(i,o,n,t):[]}_notifyStateChanges(i){const t=this._oldCache||[],s=this._cache,n=(o,r)=>o.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(n(t,s),i,"stop"),this._notify(n(s,t),i,"start")}}function Sl(e,i){return i||!1!==e?!0===e?{}:e:null}function Dl(e,{plugin:i,local:t},s,n){const o=e.pluginScopeKeys(i),r=e.getOptionScopes(s,o);return t&&i.defaults&&r.push(i.defaults),e.createResolver(r,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Pi(e,i){return((i.datasets||{})[e]||{}).indexAxis||i.indexAxis||(j.datasets[e]||{}).indexAxis||"x"}function un(e){if("x"===e||"y"===e||"r"===e)return e}
1function Ol(e){return"top"===e||"bottom"===e?"x":"left"===e||"right"===e?"y":void 0}function Ci(e,...i){if(un(e))return e;for(const t of i){const s=t.axis||Ol(t.position)||e.length>1&&un(e[0].toLowerCase());if(s)return s}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function fn(e,i,t){if(t[i+"AxisID"]===e)return{axis:i}}function gn(e){const i=e.options||(e.options={});i.plugins=P(i.plugins,{}),i.scales=function Rl(e,i){const t=Dt[e.type]||{scales:{}},s=i.scales||{},n=Pi(e.type,i),o=Object.create(null);return Object.keys(s).forEach(r=>{const a=s[r];if(!R(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const l=Ci(r,a,function Al(e,i){if(i.data&&i.data.datasets){const t=i.data.datasets.filter(s=>s.xAxisID===e||s.yAxisID===e);if(t.length)return fn(e,"x",t[0])||fn(e,"y",t[0])}return{}}(r,e),j.scales[a.type]),c=function Cl(e,i){return e===i?"_index_":"_value_"}(l,n),h=t.scales||{};o[r]=Jt(Object.create(null),[{axis:l},a,h[l],h[c]])}),e.data.datasets.forEach(r=>{const a=r.type||e.type,l=r.indexAxis||Pi(a,i),h=(Dt[a]||{}).scales||{};Object.keys(h).forEach(d=>{const u=function Pl(e,i){let t=e;return"_index_"===e?t=i:"_value_"===e&&(t="x"===i?"y":"x"),t}(d,l),f=r[u+"AxisID"]||u;o[f]=o[f]||Object.create(null),Jt(o[f],[{axis:u},s[f],h[d]])})}),Object.keys(o).forEach(r=>{const a=o[r];Jt(a,[j.scales[a.type],j.scale])}),o}(e,i)}function pn(e){return(e=e||{}).datasets=e.datasets||[],e.labels=e.labels||[],e}const mn=new Map,bn=new Set;function Be(e,i){let t=mn.get(e);return t||(t=i(),mn.set(e,t),bn.add(t)),t}const ue=(e,i,t)=>{const s=_t(i,t);void 0!==s&&e.add(s)};class Ll{constructor(i){this._config=function Tl(e){return(e=e||{}).data=pn(e.data),gn(e),e}(i),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(i){this._config.type=i}get data(){return this._config.data}set data(i){this._config.data=pn(i)}get options(){return this._config.options}set options(i){this._config.options=i}get plugins(){return this._config.plugins}update(){const i=this._config;this.clearCache(),gn(i)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(i){return Be(i,()=>[[`datasets.${i}`,""]])}datasetAnimationScopeKeys(i,t){return Be(`${i}.transition.${t}`,()=>[[`datasets.${i}.transitions.${t}`,`transitions.${t}`],[`datasets.${i}`,""]])}datasetElementScopeKeys(i,t){return Be(`${i}-${t}`,()=>[[`datasets.${i}.elements.${t}`,`datasets.${i}`,`elements.${t}`,""]])}pluginScopeKeys(i){const t=i.id;return Be(`${this.type}-plugin-${t}`,()=>[[`plugins.${t}`,...i.additionalOptionScopes||[]]])}_cachedScopes(i,t){const s=this._scopeCache;let n=s.get(i);return(!n||t)&&(n=new Map,s.set(i,n)),n}getOptionScopes(i,t,s){const{options:n,type:o}=this,r=this._cachedScopes(i,s),a=r.get(t);if(a)return a;const l=new Set;t.forEach(h=>{i&&(l.add(i),h.forEach(d=>ue(l,i,d))),h.forEach(d=>ue(l,n,d)),h.forEach(d=>ue(l,Dt[o]||{},d)),h.forEach(d=>ue(l,j,d)),h.forEach(d=>ue(l,ci,d))});const c=Array.from(l);return 0===c.length&&c.push(Object.create(null)),bn.has(t)&&r.set(t,c),c}chartOptionScopes(){const{options:i,type:t}=this;return[i,Dt[t]||{},j.datasets[t]||{},{type:t},j,ci]}resolveNamedOptions(i,t,s,n=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=xn(this._resolverCache,i,n);let l=r;(function Il(e,i){const{isScriptable:t,isIndexable:s}=xs(e);for(const n of i){const o=t(n),r=s(n),a=(r||o)&&e[n];if(o&&(yt(a)||Fl(a))||r&&E(a))return!0}return!1})(r,t)&&(o.$shared=!1,l=Wt(r,s=yt(s)?s():s,this.createResolver(i,s,a)));for(const c of t)o[c]=l[c];return o}createResolver(i,t,s=[""],n){const{resolver:o}=xn(this._resolverCache,i,s);return R(t)?Wt(o,t,void 0,n):o}}function xn(e,i,t){let s=e.get(i);s||(s=new Map,e.set(i,s));const n=t.join();let o=s.get(n);return o||(o={resolver:fi(i,t),subPrefixes:t.filter(a=>!a.toLowerCase().includes("hover"))},s.set(n,o)),o}const Fl=e=>R(e)&&Object.getOwnPropertyNames(e).some(i=>yt(e[i])),zl=["top","bottom","left","right","chartArea"];function _n(e,i){return"top"===e||"bottom"===e||-1===zl.indexOf(e)&&"x"===i}function yn(e,i){return function(t,s){return t[e]===s[e]?t[i]-s[i]:t[e]-s[e]}}function vn(e){const i=e.chart,t=i.options.animation;i.notifyPlugins("afterRender"),I(t&&t.onComplete,[e],i)}function Bl(e){const i=e.chart,t=i.options.animation;I(t&&t.onProgress,[e],i)}function kn(e){return mi()&&"string"==typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const je={},Mn=e=>{const i=kn(e);return Object.values(je).filter(t=>t.canvas===i).pop()};function jl(e,i,t){const s=Object.keys(e);for(const n of s){const o=+n;if(o>=i){const r=e[n];delete e[n],(t>0||o>i)&&(e[o+t]=r)}}}let Ne=(()=>class e{static defaults=j;static instances=je;static overrides=Dt;static registry=at;static version="4.4.9";static getChart=Mn;static register(...t){at.add(...t),Sn()}static unregister(...t){at.remove(...t),Sn()}constructor(t,s){const n=this.config=new Ll(s),o=kn(t),r=Mn(o);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const a=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||function nl(e){return!mi()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?Ya:sl}(o)),this.platform.updateConfig(n);const l=this.platform.acquireContext(o,a.aspectRatio),c=l&&l.canvas,h=c&&c.height,d=c&&c.width;this.id=Bo(),this.ctx=l,this.canvas=c,this.width=d,this.height=h,this._options=a,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 kl,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function er(e,i){let t;return function(...s){return i?(clearTimeout(t),t=setTimeout(e,i,s)):e.apply(this,s),i}}(u=>this.update(u),a.resizeDelay||0),this._dataChanges=[],je[this.id]=this,l&&c?(pt.listen(this,"complete",vn),pt.listen(this,"progress",Bl),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:s},width:n,height:o,_aspectRatio:r}=this;return A(t)?s&&r?r:o?n/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 at}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ds(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ps(this.canvas,this.ctx),this}stop(){return pt.stop(this),this}resize(t,s){pt.running(this)?this._resizeBeforeDraw={width:t,height:s}:this._resize(t,s)}_resize(t,s){const n=this.options,a=this.platform.getMaximumSize(this.canvas,t,s,n.maintainAspectRatio&&this.aspectRatio),l=n.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Ds(this,l,!0)&&(this.notifyPlugins("resize",{size:a}),I(n.onResize,[this,a],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){L(this.options.scales||{},(n,o)=>{n.id=o})}buildOrUpdateScales(){const t=this.options,s=t.scales,n=this.scales,o=Object.keys(n).reduce((a,l)=>(a[l]=!1,a),{});let r=[];s&&(r=r.concat(Object.keys(s).map(a=>{const l=s[a],c=Ci(a,l),h="r"===c,d="x"===c;return{options:l,dposition:h?"chartArea":d?"bottom":"left",dtype:h?"radialLinear":d?"category":"linear"}}))),L(r,a=>{const l=a.options,c=l.id,h=Ci(c,l),d=P(l.type,a.dtype);(void 0===l.position||_n(l.position,h)!==_n(a.dposition))&&(l.position=a.dposition),o[c]=!0;let u=null;c in n&&n[c].type===d?u=n[c]:(u=new(at.getScale(d))({id:c,type:d,ctx:this.ctx,
1chart:this}),n[u.id]=u),u.init(l,t)}),L(o,(a,l)=>{a||delete n[l]}),L(n,a=>{K.configure(this,a,a.options),K.addBox(this,a)})}_updateMetasets(){const t=this._metasets,s=this.data.datasets.length,n=t.length;if(t.sort((o,r)=>o.index-r.index),n>s){for(let o=s;o<n;++o)this._destroyDatasetMeta(o);t.splice(s,n-s)}this._sortedMetasets=t.slice(0).sort(yn("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:s}}=this;t.length>s.length&&delete this._stacks,t.forEach((n,o)=>{0===s.filter(r=>r===n._dataset).length&&this._destroyDatasetMeta(o)})}buildOrUpdateControllers(){const t=[],s=this.data.datasets;let n,o;for(this._removeUnreferencedMetasets(),n=0,o=s.length;n<o;n++){const r=s[n];let a=this.getDatasetMeta(n);const l=r.type||this.config.type;if(a.type&&a.type!==l&&(this._destroyDatasetMeta(n),a=this.getDatasetMeta(n)),a.type=l,a.indexAxis=r.indexAxis||Pi(l,this.options),a.order=r.order||0,a.index=n,a.label=""+r.label,a.visible=this.isDatasetVisible(n),a.controller)a.controller.updateIndex(n),a.controller.linkScales();else{const c=at.getController(l),{datasetElementType:h,dataElementType:d}=j.datasets[l];Object.assign(c,{dataElementType:at.getElement(d),datasetElementType:h&&at.getElement(h)}),a.controller=new c(this,n),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){L(this.data.datasets,(t,s)=>{this.getDatasetMeta(s).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const s=this.config;s.update();const n=this._options=s.createResolver(s.chartOptionScopes(),this.getContext()),o=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let h=0,d=this.data.datasets.length;h<d;h++){const{controller:u}=this.getDatasetMeta(h),f=!o&&-1===r.indexOf(u);u.buildOrUpdateElements(f),a=Math.max(+u.getMaxOverflow(),a)}a=this._minPadding=n.layout.autoPadding?a:0,this._updateLayout(a),o||L(r,h=>{h.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(yn("z","_idx"));const{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){L(this.scales,t=>{K.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,s=new Set(Object.keys(this._listeners)),n=new Set(t.events);(!qi(s,n)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,s=this._getUniformDataChanges()||[];for(const{method:n,start:o,count:r}of s)jl(t,o,"_removeElements"===n?-r:r)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const s=this.data.datasets.length,n=r=>new Set(t.filter(a=>a[0]===r).map((a,l)=>l+","+a.splice(1).join(","))),o=n(0);for(let r=1;r<s;r++)if(!qi(o,n(r)))return;return Array.from(o).map(r=>r.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;K.update(this,this.width,this.height,t);const s=this.chartArea,n=s.width<=0||s.height<=0;this._layers=[],L(this.boxes,o=>{n&&"chartArea"===o.position||(o.configure&&o.configure(),this._layers.push(...o._layers()))},this),this._layers.forEach((o,r)=>{o._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let s=0,n=this.data.datasets.length;s<n;++s)this.getDatasetMeta(s).controller.configure();for(let s=0,n=this.data.datasets.length;s<n;++s)this._updateDataset(s,yt(t)?t({datasetIndex:s}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,s){const n=this.getDatasetMeta(t),o={meta:n,index:t,mode:s,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",o)&&(n.controller._update(s),o.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",o))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(pt.has(this)?this.attached&&!pt.running(this)&&pt.start(this):(this.draw(),vn({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:n,height:o}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(n,o)}if(this.clear(),this.width<=0||this.height<=0||!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const s=this._layers;for(t=0;t<s.length&&s[t].z<=0;++t)s[t].draw(this.chartArea);for(this._drawDatasets();t<s.length;++t)s[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const s=this._sortedMetasets,n=[];let o,r;for(o=0,r=s.length;o<r;++o){const a=s[o];(!t||a.visible)&&n.push(a)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let s=t.length-1;s>=0;--s)this._drawDataset(t[s]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const s=this.ctx,n={meta:t,index:t.index,cancelable:!0},o=Es(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",n)&&(o&&De(s,o),t.controller.draw(),o&&Pe(s),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return gt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,s,n,o){const r=za.modes[s];return"function"==typeof r?r(this,t,n,o):[]}getDatasetMeta(t){const s=this.data.datasets[t],n=this._metasets;let o=n.filter(r=>r&&r._dataset===s).pop();return o||(o={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:s&&s.order||0,index:t,_dataset:s,_parsed:[],_sorted:!1},n.push(o)),o}getContext(){return this.$context||(this.$context=kt(null,{chart:this,type:"chart"}))}
vendor: 6,215 bytes, line 1
1getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const s=this.data.datasets[t];if(!s)return!1;const n=this.getDatasetMeta(t);return"boolean"==typeof n.hidden?!n.hidden:!s.hidden}setDatasetVisibility(t,s){this.getDatasetMeta(t).hidden=!s}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,s,n){const o=n?"show":"hide",r=this.getDatasetMeta(t),a=r.controller._resolveAnimations(void 0,o);qt(s)?(r.data[s].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),a.update(r,{visible:n}),this.update(l=>l.datasetIndex===t?o:void 0))}hide(t,s){this._updateVisibility(t,s,!1)}show(t,s){this._updateVisibility(t,s,!0)}_destroyDatasetMeta(t){const s=this._metasets[t];s&&s.controller&&s.controller._destroy(),delete this._metasets[t]}_stop(){let t,s;for(this.stop(),pt.remove(this),t=0,s=this.data.datasets.length;t<s;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:s}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ps(t,s),this.platform.releaseContext(s),this.canvas=null,this.ctx=null),delete je[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,s=this.platform,n=(r,a)=>{s.addEventListener(this,r,a),t[r]=a},o=(r,a,l)=>{r.offsetX=a,r.offsetY=l,this._eventHandler(r)};L(this.options.events,r=>n(r,o))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,s=this.platform,n=(c,h)=>{s.addEventListener(this,c,h),t[c]=h},o=(c,h)=>{t[c]&&(s.removeEventListener(this,c,h),delete t[c])},r=(c,h)=>{this.canvas&&this.resize(c,h)};let a;const l=()=>{o("attach",l),this.attached=!0,this.resize(),n("resize",r),n("detach",a)};a=()=>{this.attached=!1,o("resize",r),this._stop(),this._resize(0,0),n("attach",l)},s.isAttached(this.canvas)?l():a()}unbindEvents(){L(this._listeners,(t,s)=>{this.platform.removeEventListener(this,s,t)}),this._listeners={},L(this._responsiveListeners,(t,s)=>{this.platform.removeEventListener(this,s,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,s,n){const o=n?"set":"remove";let r,a,l,c;for("dataset"===s&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+o+"DatasetHoverStyle"]()),l=0,c=t.length;l<c;++l){a=t[l];const h=a&&this.getDatasetMeta(a.datasetIndex).controller;h&&h[o+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const s=this._active||[],n=t.map(({datasetIndex:r,index:a})=>{const l=this.getDatasetMeta(r);if(!l)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:l.data[a],index:a}});!ye(n,s)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,s))}notifyPlugins(t,s,n){return this._plugins.notify(this,t,s,n)}isPluginEnabled(t){return 1===this._plugins._cache.filter(s=>s.plugin.id===t).length}_updateHoverStyles(t,s,n){const o=this.options.hover,r=(c,h)=>c.filter(d=>!h.some(u=>d.datasetIndex===u.datasetIndex&&d.index===u.index)),a=r(s,t),l=n?t:r(t,s);a.length&&this.updateHoverStyle(a,o.mode,!1),l.length&&o.mode&&this.updateHoverStyle(l,o.mode,!0)}_eventHandler(t,s){const n={event:t,replay:s,cancelable:!0,inChartArea:this.isPointInArea(t)},o=a=>(a.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",n,o))return;const r=this._handleEvent(t,s,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,o),(r||n.changed)&&this.render(),this}_handleEvent(t,s,n){const{_active:o=[],options:r}=this,l=this._getActiveElements(t,o,n,s),c=function $o(e){return"mouseup"===e.type||"click"===e.type||"contextmenu"===e.type}(t),h=function Nl(e,i,t,s){return t&&"mouseout"!==e.type?s?i:e:null}(t,this._lastEvent,n,c);n&&(this._lastEvent=null,I(r.onHover,[t,l,this],this),c&&I(r.onClick,[t,l,this],this));const d=!ye(l,o);return(d||s)&&(this._active=l,this._updateHoverStyles(l,o,s)),this._lastEvent=h,d}_getActiveElements(t,s,n,o){if("mouseout"===t.type)return[];if(!n)return s;const r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,o)}})();function Sn(){return L(Ne.instances,e=>e._plugins.invalidate())}function Yt(e,i,t,s){return{x:t+e*Math.cos(i),y:s+e*Math.sin(i)}}function Ve(e,i,t,s,n,o){const{x:r,y:a,startAngle:l,pixelMargin:c,innerRadius:h}=i,d=Math.max(i.outerRadius+s+t-c,0),u=h>0?h+s+t+c:0;let f=0;const p=n-l;if(s){const H=((h>0?h-s:0)+(d>0?d-s:0))/2;f=(p-(0!==H?p*H/(H+s):p))/2}const b=(p-Math.max(.001,p*d-t/z)/d)/2,x=l+b+f,_=n-b-f,{outerStart:v,outerEnd:M,innerStart:y,innerEnd:k}=function Hl(e,i,t,s){const n=function Wl(e){return ui(e,["outerStart","outerEnd","innerStart","innerEnd"])}(e.options.borderRadius),o=(t-i)/2,r=Math.min(o,s*i/2),a=l=>{const c=(t-Math.min(o,l))*s/2;return Y(l,0,Math.min(o,c))};return{outerStart:a(n.outerStart),outerEnd:a(n.outerEnd),innerStart:Y(n.innerStart,0,r),innerEnd:Y(n.innerEnd,0,r)}}(i,u,d,_-x),w=d-v,S=d-M,D=x+v/w,O=_-M/S,C=u+y,T=u+k,U=x+y/C,it=_-k/T;if(e.beginPath(),o){const F=(D+O)/2;if(e.arc(r,a,d,D,F),e.arc(r,a,d,F,O),M>0){const J=Yt(S,O,r,a);e.arc(J.x,J.y,M,O,_+W)}const N=Yt(T,_,r,a);if(e.lineTo(N.x,N.y),k>0){const J=Yt(T,it,r,a);e.arc(J.x,J.y,k,_+W,it+Math.PI)}const H=(_-k/u+(x+y/u))/2;if(e.arc(r,a,u,_-k/u,H,!0),e.arc(r,a,u,H,x+y/u,!0),y>0){const J=Yt(C,U,r,a);e.arc(J.x,J.y,y,U+Math.PI,x-W)}const ot=Yt(w,x,r,a);if(e.lineTo(ot.x,ot.y),v>0){const J=Yt(w,D,r,a);e.arc(J.x,J.y,v,x-W,D)}}else{e.moveTo(r,a);const F=Math.cos(D)*d+r,N=Math.sin(D)*d+a;e.lineTo(F,N);const H=Math.cos(O)*d+r,ot=Math.sin(O)*d+a;e.lineTo(H,ot)}e.closePath()}function wn(e,i,t=i){e.lineCap=P(t.borderCapStyle,i.borderCapStyle),e.setLineDash(P(t.borderDash,i.borderDash)),e.lineDashOffset=P(t.borderDashOffset,i.borderDashOffset),e.lineJoin=P(t.borderJoinStyle,i.borderJoinStyle),e.lineWidth=P(t.borderWidth,i.borderWidth),e.strokeStyle=P(t.borderColor,i.borderColor)}function Xl(e,i,t){e.lineTo(t.x,t.y)}function Dn(e,i,t={}){const s=e.length,{start:n=0,end:o=s-1}=t,{start:r,end:a}
1=i,l=Math.max(n,r),c=Math.min(o,a);return{count:s,start:l,loop:i.loop,ilen:c<l&&!(n<r&&o<r||n>a&&o>a)?s+c-l:c-l}}function Kl(e,i,t,s){const{points:n,options:o}=i,{count:r,start:a,loop:l,ilen:c}=Dn(n,t,s),h=function Gl(e){return e.stepped?fr:e.tension||"monotone"===e.cubicInterpolationMode?gr:Xl}(o);let f,p,m,{move:d=!0,reverse:u}=s||{};for(f=0;f<=c;++f)p=n[(a+(u?c-f:f))%r],!p.skip&&(d?(e.moveTo(p.x,p.y),d=!1):h(e,m,p,u,o.stepped),m=p);return l&&(p=n[(a+(u?c:0))%r],h(e,m,p,u,o.stepped)),!!l}function Jl(e,i,t,s){const n=i.points,{count:o,start:r,ilen:a}=Dn(n,t,s),{move:l=!0,reverse:c}=s||{};let u,f,p,m,b,x,h=0,d=0;const _=M=>(r+(c?a-M:M))%o,v=()=>{m!==b&&(e.lineTo(h,b),e.lineTo(h,m),e.lineTo(h,x))};for(l&&(f=n[_(0)],e.moveTo(f.x,f.y)),u=0;u<=a;++u){if(f=n[_(u)],f.skip)continue;const M=f.x,y=f.y,k=0|M;k===p?(y<m?m=y:y>b&&(b=y),h=(d*h+M)/++d):(v(),e.lineTo(M,y),p=k,d=0,m=b=y),x=y}v()}function Oi(e){const i=e.options;return e._decimated||e._loop||i.tension||"monotone"===i.cubicInterpolationMode||i.stepped||i.borderDash&&i.borderDash.length?Kl:Jl}const tc="function"==typeof Path2D;let We=(()=>class e 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=>"borderDash"!==t&&"fill"!==t};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,s){const n=this.options;!n.tension&&"monotone"!==n.cubicInterpolationMode||n.stepped||this._pointsUpdated||(Br(this._points,n,t,n.spanGaps?this._loop:this._fullLoop,s),this._pointsUpdated=!0)}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function Zr(e,i){const t=e.points,s=e.options.spanGaps,n=t.length;if(!n)return[];const o=!!e._loop,{start:r,end:a}=function qr(e,i,t,s){let n=0,o=i-1;if(t&&!s)for(;n<i&&!e[n].skip;)n++;for(;n<i&&e[n].skip;)n++;for(n%=i,t&&(o+=n);o>n&&e[o%i].skip;)o--;return o%=i,{start:n,end:o}}(t,n,o,s);return function Fs(e,i,t,s){return s&&s.setContext&&t?function ta(e,i,t,s){const n=e._chart.getContext(),o=Is(e.options),{_datasetIndex:r,options:{spanGaps:a}}=e,l=t.length,c=[];let h=o,d=i[0].start,u=d;function f(p,m,b,x){const _=a?-1:1;if(p!==m){for(p+=l;t[p%l].skip;)p-=_;for(;t[m%l].skip;)m+=_;p%l!=m%l&&(c.push({start:p%l,end:m%l,loop:b,style:x}),h=x,d=m%l)}}for(const p of i){d=a?d:p.start;let b,m=t[d%l];for(u=d+1;u<=p.end;u++){const x=t[u%l];b=Is(s.setContext(kt(n,{type:"segment",p0:m,p1:x,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:r}))),ea(b,h)&&f(d,u-1,p.loop,h),m=x,h=b}d<u-1&&f(d,u-1,p.loop,h)}return c}(e,i,t,s):i}(e,!0===s?[{start:r,end:a,loop:o}]:function Qr(e,i,t,s){const n=e.length,o=[];let l,r=i,a=e[i];for(l=i+1;l<=t;++l){const c=e[l%n];c.skip||c.stop?a.skip||(o.push({start:i%n,end:(l-1)%n,loop:s=!1}),i=r=c.stop?l:null):(r=l,a.skip&&(i=l)),a=c}return null!==r&&o.push({start:i%n,end:r%n,loop:s}),o}(t,r,a<r?a+n:a,!!e._fullLoop&&0===r&&a===n-1),t,i)}(this,this.options.segment))}first(){const t=this.segments;return t.length&&this.points[t[0].start]}last(){const t=this.segments,n=t.length;return n&&this.points[t[n-1].end]}interpolate(t,s){const n=this.options,o=t[s],r=this.points,a=Ls(this,{property:s,start:o,end:o});if(!a.length)return;const l=[],c=function ql(e){return e.stepped?Ur:e.tension||"monotone"===e.cubicInterpolationMode?Xr:Tt}(n);let h,d;for(h=0,d=a.length;h<d;++h){const{start:u,end:f}=a[h],p=r[u],m=r[f];if(p===m){l.push(p);continue}const x=c(p,m,Math.abs((o-p[s])/(m[s]-p[s])),n.stepped);x[s]=t[s],l.push(x)}return 1===l.length?l[0]:l}pathSegment(t,s,n){return Oi(this)(t,this,s,n)}path(t,s,n){const o=this.segments,r=Oi(this);let a=this._loop;s=s||0,n=n||this.points.length-s;for(const l of o)a&=r(t,this,l,{start:s,end:s+n-1});return!!a}draw(t,s,n,o){(this.points||[]).length&&(this.options||{}).borderWidth&&(t.save(),function ec(e,i,t,s){tc&&!i.options.segment?function Ql(e,i,t,s){let n=i._path;n||(n=i._path=new Path2D,i.path(n,t,s)&&n.closePath()),wn(e,i.options),e.stroke(n)}(e,i,t,s):function Zl(e,i,t,s){const{segments:n,options:o}=i,r=Oi(i);for(const a of n)wn(e,o,a.style),e.beginPath(),r(e,i,a,{start:t,end:t+s-1})&&e.closePath(),e.stroke()}(e,i,t,s)}
1(t,this,n,o),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}})();function Pn(e,i,t,s){const n=e.options,{[t]:o}=e.getProps([t],s);return Math.abs(i-o)<n.radius+n.hitRadius}let ic=(()=>class e 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,s,n){const o=this.options,{x:r,y:a}=this.getProps(["x","y"],n);return Math.pow(t-r,2)+Math.pow(s-a,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(t,s){return Pn(this,t,"x",s)}inYRange(t,s){return Pn(this,t,"y",s)}getCenterPoint(t){const{x:s,y:n}=this.getProps(["x","y"],t);return{x:s,y:n}}size(t){let s=(t=t||this.options||{}).radius||0;return s=Math.max(s,s&&t.hoverRadius||0),2*(s+(s&&t.borderWidth||0))}draw(t,s){const n=this.options;this.skip||n.radius<.1||!gt(this,s,this.size(n)/2)||(t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.fillStyle=n.backgroundColor,di(t,n,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}})();function Cn(e,i){const{x:t,y:s,base:n,width:o,height:r}=e.getProps(["x","y","base","width","height"],i);let a,l,c,h,d;return e.horizontal?(d=r/2,a=Math.min(t,n),l=Math.max(t,n),c=s-d,h=s+d):(d=o/2,a=t-d,l=t+d,c=Math.min(s,n),h=Math.max(s,n)),{left:a,top:c,right:l,bottom:h}}function St(e,i,t,s){return e?0:Y(i,t,s)}function Ai(e,i,t,s){const n=null===i,o=null===t,a=e&&!(n&&o)&&Cn(e,s);return a&&(n||ut(i,a.left,a.right))&&(o||ut(t,a.top,a.bottom))}function ac(e,i){e.rect(i.x,i.y,i.w,i.h)}function Ri(e,i,t={}){const s=e.x!==t.x?-i:0,n=e.y!==t.y?-i:0;return{x:e.x+s,y:e.y+n,w:e.w+((e.x+e.w!==t.x+t.w?i:0)-s),h:e.h+((e.y+e.h!==t.y+t.h?i:0)-n),radius:e.radius}}var cc=Object.freeze({__proto__:null,ArcElement:class Ul 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:i=>"borderDash"!==i};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(i){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,i&&Object.assign(this,i)}inRange(i,t,s){const n=this.getProps(["x","y"],s),{angle:o,distance:r}=is(n,{x:i,y:t}),{startAngle:a,endAngle:l,innerRadius:c,outerRadius:h,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),u=(this.options.spacing+this.options.borderWidth)/2,f=P(d,l-a),p=Zt(o,a,l)&&a!==l,m=f>=B||p,b=ut(r,c+u,h+u);return m&&b}getCenterPoint(i){const{x:t,y:s,startAngle:n,endAngle:o,innerRadius:r,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],i),{offset:l,spacing:c}=this.options,h=(n+o)/2,d=(r+a+c+l)/2;return{x:t+Math.cos(h)*d,y:s+Math.sin(h)*d}}tooltipPosition(i){return this.getCenterPoint(i)}draw(i){const{options:t,circumference:s}=this,n=(t.offset||0)/4,o=(t.spacing||0)/2,r=t.circular;if(this.pixelMargin="inner"===t.borderAlign?.33:0,this.fullCircles=s>B?Math.floor(s/B):0,0===s||this.innerRadius<0||this.outerRadius<0)return;i.save();const a=(this.startAngle+this.endAngle)/2;i.translate(Math.cos(a)*n,Math.sin(a)*n);const c=n*(1-Math.sin(Math.min(z,s||0)));i.fillStyle=t.backgroundColor,i.strokeStyle=t.borderColor,function $l(e,i,t,s,n){const{fullCircles:o,startAngle:r,circumference:a}=i;let l=i.endAngle;if(o){Ve(e,i,t,s,l,n);for(let c=0;c<o;++c)e.fill();isNaN(a)||(l=r+(a%B||B))}Ve(e,i,t,s,l,n),e.fill()}(i,this,c,o,r),function Yl(e,i,t,s,n){const{fullCircles:o,startAngle:r,circumference:a,options:l}=i,{borderWidth:c,borderJoinStyle:h,borderDash:d,borderDashOffset:u}=l,f="inner"===l.borderAlign;if(!c)return;e.setLineDash(d||[]),e.lineDashOffset=u,f?(e.lineWidth=2*c,e.lineJoin=
1h||"round"):(e.lineWidth=c,e.lineJoin=h||"bevel");let p=i.endAngle;if(o){Ve(e,i,t,s,p,n);for(let m=0;m<o;++m)e.stroke();isNaN(a)||(p=r+(a%B||B))}f&&function Vl(e,i,t){const{startAngle:s,pixelMargin:n,x:o,y:r,outerRadius:a,innerRadius:l}=i;let c=n/a;e.beginPath(),e.arc(o,r,a,s-c,t+c),l>n?(c=n/l,e.arc(o,r,l,t+c,s-c,!0)):e.arc(o,r,n,t+W,s-W),e.closePath(),e.clip()}(e,i,p),o||(Ve(e,i,t,s,p,n),e.stroke())}(i,this,c,o,r),i.restore()}},BarElement:class lc 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(i){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,i&&Object.assign(this,i)}draw(i){const{inflateAmount:t,options:{borderColor:s,backgroundColor:n}}=this,{inner:o,outer:r}=function oc(e){const i=Cn(e),t=i.right-i.left,s=i.bottom-i.top,n=function sc(e,i,t){const n=e.borderSkipped,o=bs(e.options.borderWidth);return{t:St(n.top,o.top,0,t),r:St(n.right,o.right,0,i),b:St(n.bottom,o.bottom,0,t),l:St(n.left,o.left,0,i)}}(e,t/2,s/2),o=function nc(e,i,t){const{enableBorderRadius:s}=e.getProps(["enableBorderRadius"]),n=e.options.borderRadius,o=Ot(n),r=M
1ath.min(i,t),a=e.borderSkipped,l=s||R(n);return{topLeft:St(!l||a.top||a.left,o.topLeft,0,r),topRight:St(!l||a.top||a.right,o.topRight,0,r),bottomLeft:St(!l||a.bottom||a.left,o.bottomLeft,0,r),bottomRight:St(!l||a.bottom||a.right,o.bottomRight,0,r)}}(e,t/2,s/2);return{outer:{x:i.left,y:i.top,w:t,h:s,radius:o},inner:{x:i.left+n.l,y:i.top+n.t,w:t-n.l-n.r,h:s-n.t-n.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,o.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(n.b,n.r))}}}}(this),a=function rc(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}(r.radius)?se:ac;i.save(),(r.w!==o.w||r.h!==o.h)&&(i.beginPath(),a(i,Ri(r,t,o)),i.clip(),a(i,Ri(o,-t,r)),i.fillStyle=s,i.fill("evenodd")),i.beginPath(),a(i,Ri(o,t)),i.fillStyle=n,i.fill(),i.restore()}inRange(i,t,s){return Ai(this,i,t,s)}inXRange(i,t){return Ai(this,i,null,t)}inYRange(i,t){return Ai(this,null,i,t)}getCenterPoint(i){const{x:t,y:s,base:n,horizontal:o}=this.getProps(["x","y","base","horizontal"],i);return{x:o?(t+n)/2:t,y:o?s:(s+n)/2}}getRange(i){return"x"===i?this.width/2:this.height/2}},LineElement:We,PointElement:ic});const Ti=["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)"],On=Ti.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function An(e){return Ti[e%Ti.length]}function Rn(e){return On[e%On.length]}function Tn(e){let i;for(i in e)if(e[i].borderColor||e[i].backgroundColor)return!0;return!1}var mc={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,i,t){if(!t.enabled)return;const{data:{datasets:s},options:n}=e.config,{elements:o}=n,r=Tn(s)||function gc(e){return e&&(e.borderColor||e.backgroundColor)}(n)||o&&Tn(o)||function pc(){return"rgba(0,0,0,0.1)"!==j.borderColor||"rgba(0,0,0,0.1)"!==j.backgroundColor}();if(!t.forceOverride&&r)return;const a=function fc(e){let i=0;return(t,s)=>{const n=e.getDatasetMeta(s).controller;n instanceof ki?i=function dc(e,i){return e.backgroundColor=e.data.map(()=>An(i++)),i}(t,i):n instanceof Ks?i=function uc(e,i){return e.backgroundColor=e.data.map(()=>Rn(i++)),i}(t,i):n&&(i=function hc(e,i){return e.borderColor=An(i),e.backgroundColor=Rn(i),++i}(t,i))}}(e);s.forEach(a)}};function Ln(e){if(e._decimated){const i=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:i})}}function Fn(e){e.data.datasets.forEach(i=>{Ln(i)})}var yc={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,i,t)=>{if(!t.enabled)return void Fn(e);const s=e.width;e.data.datasets.forEach((n,o)=>{const{_data:r,indexAxis:a}=n,l=e.getDatasetMeta(o),c=r||n.data;if("y"===ne([a,e.options.indexAxis])||!l.controller.supportsDecimation)return;const h=e.scales[l.xAxisID];if("linear"!==h.type&&"time"!==h.type||e.options.parsing)return;let p,{start:d,count:u}=function _c(e,i){const t=i.length;let n,s=0;const{iScale:o}=e,{min:r,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(s=Y(ft(i,o.axis,r).lo,0,t-1)),n=c?Y(ft(i,o.axis,a).hi+1,s,t)-s:t-s,{start:s,count:n}}(l,c);if(u<=(t.threshold||4*s))Ln(n);else{switch(A(r)&&(n._data=c,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(m){this._data=m}})),t.algorithm){case"lttb":p=function bc(e,i,t,s,n){const o=n.samples||s;if(o>=t)return e.slice(i,i+t);const r=[],a=(t-2)/(o-2);let l=0;const c=i+t-1;let d,u,f,p,m,h=i;for(r[l++]=e[h],d=0;d<o-2;d++){let _,b=0,x=0;const v=Math.floor((d+1)*a)+1+i,M=Math.min(Math.floor((d+2)*a)+1,t)+i,y=M-v;for(_=v;_<M;_++)b+=e[_].x,x+=e[_].y;b/=y,x/=y;const k=Math.floor(d*a)+1+i,w=Math.min(Math.floor((d+1)*a)+1,t)+i,{x:S,y:D}=e[h];for(f=p=-1,_=k;_<w;_++)p=.5*Math.abs((S-b)*(e[_].y-D)-(S-e[_].x)*(x-D)),p>f&&(f=p,u=e[_],m=_);r[l++]=u,h=m}return r[l++]=e[c],r}(c,d,u,s,t);break;case"min-max":p=function xc(e,i,t,s){let r,a,l,c,h,d,u,f,p,m,n=0,o=0;const b=[],_=e[i].x,M=e[i+t-1].x-_;for(r=i;r<i+t;++r){a=e[r],l=(a.x-_)/M*s,c=a.y;const y=0|l;if(y===h)c<p?(p=c,d=r):c>m&&(m=c,u=r),n=(o*n+a.x)/++o;
1else{const k=r-1;if(!A(d)&&!A(u)){const w=Math.min(d,u),S=Math.max(d,u);w!==f&&w!==k&&b.push({...e[w],x:n}),S!==f&&S!==k&&b.push({...e[S],x:n})}r>0&&k!==f&&b.push(e[k]),b.push(a),h=y,o=0,p=m=c,d=u=f=r}}return b}(c,d,u,s);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`)}n._decimated=p}})},destroy(e){Fn(e)}};function Li(e,i,t,s){if(s)return;let n=i[e],o=t[e];return"angle"===e&&(n=et(n),o=et(o)),{property:e,start:n,end:o}}function Fi(e,i,t){for(;i>e;i--){const s=t[i];if(!isNaN(s.x)&&!isNaN(s.y))break}return i}function In(e,i,t,s){return e&&i?s(e[t],i[t]):e?e[t]:i?i[t]:0}function En(e,i){let t=[],s=!1;return E(e)?(s=!0,t=e):t=function kc(e,i){const{x:t=null,y:s=null}=e||{},n=i.points,o=[];return i.segments.forEach(({start:r,end:a})=>{a=Fi(r,a,n);const l=n[r],c=n[a];null!==s?(o.push({x:l.x,y:s}),o.push({x:c.x,y:s})):null!==t&&(o.push({x:t,y:l.y}),o.push({x:t,y:c.y}))}),o}(e,i),t.length?new We({points:t,options:{tension:0},_loop:s,_fullLoop:s}):null}function zn(e){return e&&!1!==e.fill}function Mc(e,i,t){let n=e[i].fill;const o=[i];let r;if(!t)return n;for(;!1!==n&&-1===o.indexOf(n);){if(!V(n))return n;if(r=e[n],!r)return!1;if(r.visible)return n;o.push(n),n=r.fill}return!1}function Sc(e,i,t){const s=function Cc(e){const i=e.options,t=i.fill;let s=P(t&&t.target,t);return void 0===s&&(s=!!i.backgroundColor),!1!==s&&null!==s&&(!0===s?"origin":s)}(e);if(R(s))return!isNaN(s.value)&&s;let n=parseFloat(s);return V(n)&&Math.floor(n)===n?function wc(e,i,t,s){return("-"===e||"+"===e)&&(t=i+t),!(t===i||t<0||t>=s)&&t}(s[0],i,n,t):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function Rc(e,i,t){const s=[];for(let n=0;n<t.length;n++){const o=t[n],{first:r,last:a,point:l}=Tc(o,i,"x");if(!(!l||r&&a))if(r)s.unshift(l);else if(e.push(l),!a)break}e.push(...s)}function Tc(e,i,t){const s=e.interpolate(i,t);if(!s)return{};const n=s[t],o=e.segments,r=e.points;let a=!1,l=!1;for(let c=0;c<o.length;c++){const h=o[c],d=r[h.start][t],u=r[h.end][t];if(ut(n,d,u)){a=n===d,l=n===u;break}}return{first:a,last:l,point:s}}class Bn{constructor(i){this.x=i.x,this.y=i.y,this.radius=i.radius}pathSegment(i,t,s){const{x:n,y:o,radius:r}=this;return i.arc(n,o,r,(t=t||{start:0,end:B}).end,t.start,!0),!s.bounds}interpolate(i){const{x:t,y:s,radius:n}=this,o=i.angle;return{x:t+Math.cos(o)*n,y:s+Math.sin(o)*n,angle:o}}}function Ii(e,i,t){const s=function Lc(e){const{chart:i,fill:t,line:s}=e;if(V(t))return function Fc(e,i){const t=e.getDatasetMeta(i);return t&&e.isDatasetVisible(i)?t.dataset:null}(i,t);if("stack"===t)return function Oc(e){const{scale:i,index:t,line:s}=e,n=[],o=s.segments,r=s.points,a=function Ac(e,i){const t=[],s=e.getMatchingVisibleMetas("line");for(let n=0;n<s.length;n++){const o=s[n];if(o.index===i)break;o.hidden||t.unshift(o.dataset)}return t}(i,t);a.push(En({x:null,y:i.bottom},s));for(let l=0;l<o.length;l++){const c=o[l];for(let h=c.start;h<=c.end;h++)Rc(n,r[h],a)}return new We({points:n,options:{}})}(e);if("shape"===t)return!0;const n=function Ic(e){return(e.scale||{}).getPointPositionForValue?function zc(e){const{scale:i,fill:t}=e,s=i.options,n=i.getLabels().length,o=s.reverse?i.max:i.min,r=function Pc(e,i,t){let s;return s="start"===e?t:"end"===e?i.options.reverse?i.min:i.max:R(e)?e.value:i.getBaseValue(),s}(t,i,o),a=[];if(s.grid.circular){const l=i.getPointPositionForValue(0,o);return new Bn({x:l.x,y:l.y,radius:i.getDistanceFromCenterForValue(r)})}for(let l=0;l<n;++l)a.push(i.getPointPositionForValue(l,r));return a}(e):function Ec(e){const{scale:i={},fill:t}=e,s=function Dc(e,i){let t=null;return"start"===e?t=i.bottom:"end"===e?t=i.top:R(e)?t=i.getPixelForValue(e.value):i.getBasePixel&&(t=i.getBasePixel()),t}(t,i);if(V(s)){const n=i.isHorizontal();return{x:n?s:null,y:n?null:s}}return null}(e)}(e);return n instanceof Bn?n:En(n,s)}(i),{chart:n,index:o,line:r,scale:a,axis:l}=i,c=r.options,h=c.fill,d=c.backgroundColor,{above:u=d,below:f=d}=h||{},p=n.getDatasetMeta(o),m=Es(n,p);s&&r.points.length&&(De(e,t),function Bc(e,i){const{line:t,target:s,above:n,below:o,area:r,scale:a,clip:l}=i,c=t._loop?"angle":i.axis;e.save(),"x"===c&&o!==n&&(jn(e,s,r.top),Nn(e,{line:t,target:s,color:n,scale:a,property:c,clip:l}
vendor: 4,399 bytes, line 1
1),e.restore(),e.save(),jn(e,s,r.bottom)),Nn(e,{line:t,target:s,color:o,scale:a,property:c,clip:l}),e.restore()}(e,{line:r,target:s,above:u,below:f,area:t,scale:a,axis:l,clip:m}),Pe(e))}function jn(e,i,t){const{segments:s,points:n}=i;let o=!0,r=!1;e.beginPath();for(const a of s){const{start:l,end:c}=a,h=n[l],d=n[Fi(l,c,n)];o?(e.moveTo(h.x,h.y),o=!1):(e.lineTo(h.x,t),e.lineTo(h.x,h.y)),r=!!i.pathSegment(e,a,{move:r}),r?e.closePath():e.lineTo(d.x,t)}e.lineTo(i.first().x,t),e.closePath(),e.clip()}function Nn(e,i){const{line:t,target:s,property:n,color:o,scale:r,clip:a}=i,l=function vc(e,i,t){const s=e.segments,n=e.points,o=i.points,r=[];for(const a of s){let{start:l,end:c}=a;c=Fi(l,c,n);const h=Li(t,n[l],n[c],a.loop);if(!i.segments){r.push({source:a,target:h,start:n[l],end:n[c]});continue}const d=Ls(i,h);for(const u of d){const f=Li(t,o[u.start],o[u.end],u.loop),p=Ts(a,n,f);for(const m of p)r.push({source:m,target:u,start:{[t]:In(h,f,"start",Math.max)},end:{[t]:In(h,f,"end",Math.min)}})}}return r}(t,s,n);for(const{source:c,target:h,start:d,end:u}of l){const{style:{backgroundColor:f=o}={}}=c,p=!0!==s;e.save(),e.fillStyle=f,jc(e,r,a,p&&Li(n,d,u)),e.beginPath();const m=!!t.pathSegment(e,c);let b;if(p){m?e.closePath():Vn(e,s,u,n);const x=!!s.pathSegment(e,h,{move:m,reverse:!0});b=m&&x,b||Vn(e,s,d,n)}e.closePath(),e.fill(b?"evenodd":"nonzero"),e.restore()}}function jc(e,i,t,s){const n=i.chart.chartArea,{property:o,start:r,end:a}=s||{};if("x"===o||"y"===o){let l,c,h,d;"x"===o?(l=r,c=n.top,h=a,d=n.bottom):(l=n.left,c=r,h=n.right,d=a),e.beginPath(),t&&(l=Math.max(l,t.left),h=Math.min(h,t.right),c=Math.max(c,t.top),d=Math.min(d,t.bottom)),e.rect(l,c,h-l,d-c),e.clip()}}function Vn(e,i,t,s){const n=i.interpolate(t,s);n&&e.lineTo(n.x,n.y)}var Nc={id:"filler",afterDatasetsUpdate(e,i,t){const s=(e.data.datasets||[]).length,n=[];let o,r,a,l;for(r=0;r<s;++r)o=e.getDatasetMeta(r),a=o.dataset,l=null,a&&a.options&&a instanceof We&&(l={visible:e.isDatasetVisible(r),index:r,fill:Sc(a,r,s),chart:e,axis:o.controller.options.indexAxis,scale:o.vScale,line:a}),o.$filler=l,n.push(l);for(r=0;r<s;++r)l=n[r],l&&!1!==l.fill&&(l.fill=Mc(n,r,t.propagate))},beforeDraw(e,i,t){const s="beforeDraw"===t.drawTime,n=e.getSortedVisibleDatasetMetas(),o=e.chartArea;for(let r=n.length-1;r>=0;--r){const a=n[r].$filler;a&&(a.line.updateControlPoints(o,a.axis),s&&a.fill&&Ii(e.ctx,a,o))}},beforeDatasetsDraw(e,i,t){if("beforeDatasetsDraw"!==t.drawTime)return;const s=e.getSortedVisibleDatasetMetas();for(let n=s.length-1;n>=0;--n){const o=s[n].$filler;zn(o)&&Ii(e.ctx,o,e.chartArea)}},beforeDatasetDraw(e,i,t){const s=i.meta.$filler;!zn(s)||"beforeDatasetDraw"!==t.drawTime||Ii(e.ctx,s,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Wn=(e,i)=>{let{boxHeight:t=i,boxWidth:s=i}=e;return e.usePointStyle&&(t=Math.min(t,i),s=e.pointStyleWidth||Math.min(s,i)),{boxWidth:s,boxHeight:t,itemHeight:Math.max(i,t)}};class Hn extends mt{constructor(i){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=i.chart,this.options=i.options,this.ctx=i.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(i,t,s){this.maxWidth=i,this.maxHeight=t,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const i=this.options.labels||{};let t=I(i.generateLabels,[this.chart],this)||[];i.filter&&(t=t.filter(s=>i.filter(s,this.chart.data))),i.sort&&(t=t.sort((s,n)=>i.sort(s,n,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:i,ctx:t}=this;if(!i.display)return void(this.width=this.height=0);const s=i.labels,n=$(s.font),o=n.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=Wn(s,o);let c,h;t.font=n.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(r,o,a,l)+10):(h=this.maxHeight,c=this._fitCols(r,n,a,l)+10),this.width=Math.min(c,i.maxWidth||this.maxWidth),this.height=Math.min(h,i.maxHeight||this.maxHeight)}
vendor: 5,818 bytes, line 1
1_fitRows(i,t,s,n){const{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=n+a;let d=i;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-h;return this.legendItems.forEach((p,m)=>{const b=s+t/2+o.measureText(p.text).width;(0===m||c[c.length-1]+b+2*a>r)&&(d+=h,c[c.length-(m>0?0:1)]=0,f+=h,u++),l[m]={left:0,top:f,row:u,width:b,height:n},c[c.length-1]+=b+a}),d}_fitCols(i,t,s,n){const{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=r-i;let d=a,u=0,f=0,p=0,m=0;return this.legendItems.forEach((b,x)=>{const{itemWidth:_,itemHeight:v}=function Wc(e,i,t,s,n){const o=function Hc(e,i,t,s){let n=e.text;return n&&"string"!=typeof n&&(n=n.reduce((o,r)=>o.length>r.length?o:r)),i+t.size/2+s.measureText(n).width}(s,e,i,t),r=function $c(e,i,t){let s=e;return"string"!=typeof i.text&&(s=$n(i,t)),s}(n,s,i.lineHeight);return{itemWidth:o,itemHeight:r}}(s,t,o,b,n);x>0&&f+v+2*a>h&&(d+=u+a,c.push({width:u,height:f}),p+=u+a,m++,u=f=0),l[x]={left:p,top:f,col:m,width:_,height:v},u=Math.max(u,_),f+=v+a}),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const i=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:s,labels:{padding:n},rtl:o}}=this,r=$t(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=X(s,this.left+n,this.right-this.lineWidths[a]);for(const c of t)a!==c.row&&(a=c.row,l=X(s,this.left+n,this.right-this.lineWidths[a])),c.top+=this.top+i+n,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+n}else{let a=0,l=X(s,this.top+i+n,this.bottom-this.columnSizes[a].height);for(const c of t)c.col!==a&&(a=c.col,l=X(s,this.top+i+n,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+n,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const i=this.ctx;De(i,this),this._draw(),Pe(i)}}_draw(){const{options:i,columnSizes:t,lineWidths:s,ctx:n}=this,{align:o,labels:r}=i,a=j.color,l=$t(i.rtl,this.left,this.width),c=$(r.font),{padding:h}=r,d=c.size,u=d/2;let f;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;const{boxWidth:p,boxHeight:m,itemHeight:b}=Wn(r,d),v=this.isHorizontal(),M=this._computeTitleHeight();f=v?{x:X(o,this.left+h,this.right-s[0]),y:this.top+h+M,line:0}:{x:this.left+h,y:X(o,this.top+M+h,this.bottom-t[0].height),line:0},Cs(this.ctx,i.textDirection);const y=b+h;this.legendItems.forEach((k,w)=>{n.strokeStyle=k.fontColor,n.fillStyle=k.fontColor;const S=n.measureText(k.text).width,D=l.textAlign(k.textAlign||(k.textAlign=r.textAlign)),O=p+u+S;let C=f.x,T=f.y;l.setWidth(this.width),v?w>0&&C+O+h>this.right&&(T=f.y+=y,f.line++,C=f.x=X(o,this.left+h,this.right-s[f.line])):w>0&&T+y>this.bottom&&(C=f.x=C+t[f.line].width+h,f.line++,T=f.y=X(o,this.top+M+h,this.bottom-t[f.line].height)),function(k,w,S){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;n.save();const D=P(S.lineWidth,1);if(n.fillStyle=P(S.fillStyle,a),n.lineCap=P(S.lineCap,"butt"),n.lineDashOffset=P(S.lineDashOffset,0),n.lineJoin=P(S.lineJoin,"miter"),n.lineWidth=D,n.strokeStyle=P(S.strokeStyle,a),n.setLineDash(P(S.lineDash,[])),r.usePointStyle){const O={radius:m*Math.SQRT2/2,pointStyle:S.pointStyle,rotation:S.rotation,borderWidth:D},C=l.xPlus(k,p/2);ms(n,O,C,w+u,r.pointStyleWidth&&p)}else{const O=w+Math.max((d-m)/2,0),C=l.leftForLtr(k,p),T=Ot(S.borderRadius);n.beginPath(),Object.values(T).some(U=>0!==U)?se(n,{x:C,y:O,w:p,h:m,radius:T}):n.rect(C,O,p,m),n.fill(),0!==D&&n.stroke()}n.restore()}(l.x(C),T,k),C=((e,i,t,s)=>e===(s?"left":"right")?t:"center"===e?(i+t)/2:i)(D,C+p+u,v?C+O:this.right,i.rtl),function(k,w,S){Ct(n,S.text,k,w+b/2,c,{strikethrough:S.hidden,textAlign:l.textAlign(S.textAlign)})}(l.x(C),T,k),v?f.x+=O+h:f.y+="string"!=typeof k.text?$n(k,c.lineHeight)+h:y}),Os(this.ctx,i.textDirection)}drawTitle(){const i=this.options,t=i.title,s=$(t.font),n=G(t.padding);if(!t.display)return;const o=$t(i.rtl,this.left,this.width),r=this.ctx,a=t.position,c=n.top+s.size/2;let h,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+c,d=X(i.align,d,this.right-u);else{const p=this.columnSizes.reduce((m,b)=>Math.max(m,b.height),0);h=c+X(i.align,this.top,this.bottom-p-i.labels.padding-this._computeTitleHeight())}const f=X(a,d,d+u);r.textAlign=o.textAlign(ri(a)),r.textBaseline="middle",r.strokeStyle=t.color,r.fillStyle=t.color,r.font=s.string,Ct(r,t.text,f,h,s)}_computeTitleHeight(){const i=this.options.title,t=$(i.font),s=G(i.padding);return i.display?t.lineHeight+s.height:0}_getLegendItemAt(i,t){let s,n,o;if(ut(i,this.left,this.right)&&ut(t,this.top,this.bottom))for(o=this.legendHitBoxes,s=0;s<o.length;++s)if(n=o[s],ut(i,n.left,n.left+n.width)&&ut(t,n.top,n.top+n.height))return this.legendItems[s];return null}handleEvent(i){const t=this.options;if(!function Yc(e,i){return!(("mousemove"!==e&&"mouseout"!==e||!i.onHover&&!i.onLeave)&&(!i.onClick||"click"!==e&&"mouseup"!==e))}(i.type,t))return;const s=this._getLegendItemAt(i.x,i.y);if("mousemove"===i.type||"mouseout"===i.type){const n=this._hoveredItem,o=((e,i)=>null!==e&&null!==i&&e.datasetIndex===i.datasetIndex&&e.index===i.index)(n,s);n&&!o&&I(t.onLeave,[i,n,this],this),this._hoveredItem=s,s&&!o&&I(t.onHover,[i,s,this],this)}else s&&I(t.onClick,[i,s,this],this)}}function $n(e,i){return i*(e.text?e.text.length:0)}var Uc={id:"legend",_element:Hn,start(e,i,t){const s=e.legend=new Hn({ctx:e.ctx,options:t,chart:e});K.configure(e,s,t),K.addBox(e,s)},stop(e){K.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,i,t){const s=e.legend;K.configure(e,s,t),s.options=t},afterUpdate(e){const i=e.legend;i.buildLabels(),i.adjustHitBoxes()},afterEvent(e,i){i.replay||e.legend.handleEvent(i.event)}
vendor: 4,415 bytes, line 1
1,defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,i,t){const s=i.datasetIndex,n=t.chart;n.isDatasetVisible(s)?(n.hide(s),i.hidden=!0):(n.show(s),i.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const i=e.data.datasets,{labels:{usePointStyle:t,pointStyle:s,textAlign:n,color:o,useBorderRadius:r,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(t?0:void 0),h=G(c.borderWidth);return{text:i[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:s||c.pointStyle,rotation:c.rotation,textAlign:n||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class Ei extends mt{constructor(i){super(),this.chart=i.chart,this.options=i.options,this.ctx=i.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(i,t){const s=this.options;if(this.left=0,this.top=0,!s.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=i,this.height=this.bottom=t;const n=E(s.text)?s.text.length:1;this._padding=G(s.padding);const o=n*$(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const i=this.options.position;return"top"===i||"bottom"===i}_drawArgs(i){const{top:t,left:s,bottom:n,right:o,options:r}=this,a=r.align;let c,h,d,l=0;return this.isHorizontal()?(h=X(a,s,o),d=t+i,c=o-s):("left"===r.position?(h=s+i,d=X(a,n,t),l=-.5*z):(h=o-i,d=X(a,t,n),l=.5*z),c=n-t),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){const i=this.ctx,t=this.options;if(!t.display)return;const s=$(t.font),o=s.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Ct(i,t.text,0,0,s,{color:t.color,maxWidth:l,rotation:c,textAlign:ri(t.align),textBaseline:"middle",translation:[r,a]})}}var Gc={id:"title",_element:Ei,start(e,i,t){!function Xc(e,i){const t=new Ei({ctx:e.ctx,options:i,chart:e});K.configure(e,t,i),K.addBox(e,t),e.titleBlock=t}(e,t)},stop(e){K.removeBox(e,e.titleBlock),delete e.titleBlock},beforeUpdate(e,i,t){const s=e.titleBlock;K.configure(e,s,t),s.options=t},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const He=new WeakMap;var Kc={id:"subtitle",start(e,i,t){const s=new Ei({ctx:e.ctx,options:t,chart:e});K.configure(e,s,t),K.addBox(e,s),He.set(e,s)},stop(e){K.removeBox(e,He.get(e)),He.delete(e)},beforeUpdate(e,i,t){const s=He.get(e);K.configure(e,s,t),s.options=t},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const fe={average(e){if(!e.length)return!1;let i,t,s=new Set,n=0,o=0;for(i=0,t=e.length;i<t;++i){const a=e[i].element;if(a&&a.hasValue()){const l=a.tooltipPosition();s.add(l.x),n+=l.y,++o}}return 0!==o&&0!==s.size&&{x:[...s].reduce((a,l)=>a+l)/s.size,y:n/o}},nearest(e,i){if(!e.length)return!1;let o,r,a,t=i.x,s=i.y,n=Number.POSITIVE_INFINITY;for(o=0,r=e.length;o<r;++o){const l=e[o].element;if(l&&l.hasValue()){const h=ni(i,l.getCenterPoint());h<n&&(n=h,a=l)}}if(a){const l=a.tooltipPosition();t=l.x,s=l.y}return{x:t,y:s}}};function lt(e,i){return i&&(E(i)?Array.prototype.push.apply(e,i):e.push(i)),e}function bt(e){return("string"==typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function Jc(e,i){const{element:t,datasetIndex:s,index:n}=i,o=e.getDatasetMeta(s).controller,{label:r,value:a}=o.getLabelAndValue(n);return{chart:e,label:r,parsed:o.getParsed(n),raw:e.data.datasets[s].data[n],formattedValue:a,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:t}}function Yn(e,i){const t=e.chart.ctx,{body:s,footer:n,title:o}=e,{boxWidth:r,boxHeight:a}
1=i,l=$(i.bodyFont),c=$(i.titleFont),h=$(i.footerFont),d=o.length,u=n.length,f=s.length,p=G(i.padding);let m=p.height,b=0,x=s.reduce((M,y)=>M+y.before.length+y.lines.length+y.after.length,0);x+=e.beforeBody.length+e.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*i.titleSpacing+i.titleMarginBottom),x&&(m+=f*(i.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(x-f)*l.lineHeight+(x-1)*i.bodySpacing),u&&(m+=i.footerMarginTop+u*h.lineHeight+(u-1)*i.footerSpacing);let _=0;const v=function(M){b=Math.max(b,t.measureText(M).width+_)};return t.save(),t.font=c.string,L(e.title,v),t.font=l.string,L(e.beforeBody.concat(e.afterBody),v),_=i.displayColors?r+2+i.boxPadding:0,L(s,M=>{L(M.before,v),L(M.lines,v),L(M.after,v)}),_=0,t.font=h.string,L(e.footer,v),t.restore(),b+=p.width,{width:b,height:m}}function Zc(e,i,t,s){const{x:n,width:o}=t,{width:r,chartArea:{left:a,right:l}}=e;let c="center";return"center"===s?c=n<=(a+l)/2?"left":"right":n<=o/2?c="left":n>=r-o/2&&(c="right"),function Qc(e,i,t,s){const{x:n,width:o}=s,r=t.caretSize+t.caretPadding;if("left"===e&&n+o+r>i.width||"right"===e&&n-o-r<0)return!0}(c,e,i,t)&&(c="center"),c}function Un(e,i,t){const s=t.yAlign||i.yAlign||function qc(e,i){const{y:t,height:s}=i;return t<s/2?"top":t>e.height-s/2?"bottom":"center"}(e,t);return{xAlign:t.xAlign||i.xAlign||Zc(e,i,t,s),yAlign:s}}function Xn(e,i,t,s){const{caretSize:n,caretPadding:o,cornerRadius:r}=e,{xAlign:a,yAlign:l}=t,c=n+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=Ot(r);let p=function th(e,i){let{x:t,width:s}=e;return"right"===i?t-=s:"center"===i&&(t-=s/2),t}(i,a);const m=function eh(e,i,t){let{y:s,height:n}=e;return"top"===i?s+=t:s-="bottom"===i?n+t:n/2,s}(i,l,c);return"center"===l?"left"===a?p+=c:"right"===a&&(p-=c):"left"===a?p-=Math.max(h,u)+n:"right"===a&&(p+=Math.max(d,f)+n),{x:Y(p,0,s.width-i.width),y:Y(m,0,s.height-i.height)}}function $e(e,i,t){const s=G(t.padding);return"center"===i?e.x+e.width/2:"right"===i?e.x+e.width-s.right:e.x+s.left}function Gn(e){return lt([],bt(e))}function Kn(e,i){const t=i&&i.dataset&&i.dataset.tooltip&&i.dataset.tooltip.callbacks;return t?e.override(t):e}const Jn={beforeTitle:dt,title(e){if(e.length>0){const i=e[0],t=i.chart.data.labels,s=t?t.length:0;if(this&&this.options&&"dataset"===this.options.mode)return i.dataset.label||"";if(i.label)return i.label;if(s>0&&i.dataIndex<s)return t[i.dataIndex]}return""},afterTitle:dt,beforeBody:dt,beforeLabel:dt,label(e){if(this&&this.options&&"dataset"===this.options.mode)return e.label+": "+e.formattedValue||e.formattedValue;let i=e.dataset.label||"";i&&(i+=": ");const t=e.formattedValue;return A(t)||(i+=t),i},labelColor(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.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(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:dt,afterBody:dt,beforeFooter:dt,footer:dt,afterFooter:dt};function Q(e,i,t,s){const n=e[i].call(t,s);return typeof n>"u"?Jn[i].call(t,s):n}let qn=(()=>class e extends mt{static positioners=fe;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(){const t=this._cachedAnimations;if(t)return t;const s=this.chart,n=this.options.setContext(this.getContext()),o=n.enabled&&s.options.animation&&n.animations,r=new Bs(this.chart,o);return o._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=function ih(e,i,t){return kt(e,{tooltip:i,tooltipItems:t,type:"tooltip"})}(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,s){const{callbacks:n}=s,o=Q(n,"beforeTitle",this,t),r=Q(n,"title",this,t),a=Q(n,"afterTitle",this,t);let l=[];return l=lt(l,bt(o)),l=lt(l,bt(r)),l=lt(l,bt(a)),l}getBeforeBody(t,s){return Gn(Q(s.callbacks,"beforeBody",this,t))}getBody(t,s){const{callbacks:n}=s,o=[];return L(t,r=>{const a={before:[],lines:[],after:[]},l=Kn(n,r);lt(a.before,bt(Q(l,"beforeLabel",this,r))),lt(a.lines,Q(l,"label",this,r)),lt(a.after,bt(Q(l,"afterLabel",this,r))),o.push(a)}),o}getAfterBody(t,s){return Gn(Q(s.callbacks,"afterBody",this,t))}getFooter(t,s){const{callbacks:n}=s,o=Q(n,"beforeFooter",this,t),r=Q(n,"footer",this,t),a=Q(n,"afterFooter",this,t);let l=[];return l=lt(l,bt(o)),l=lt(l,bt(r)),l=lt(l,bt(a)),l}_createItems(t){const s=this._active,n=this.chart.data,o=[],r=[],a=[];let c,h,l=[];for(c=0,h=s.length;c<h;++c)l.push(Jc(this.chart,s[c]));return t.filter&&(l=l.filter((d,u,f)=>t.filter(d,u,f,n))),t.itemSort&&(l=l.sort((d,u)=>
vendor: 9,400 bytes, line 1
1t.itemSort(d,u,n))),L(l,d=>{const u=Kn(t.callbacks,d);o.push(Q(u,"labelColor",this,d)),r.push(Q(u,"labelPointStyle",this,d)),a.push(Q(u,"labelTextColor",this,d))}),this.labelColors=o,this.labelPointStyles=r,this.labelTextColors=a,this.dataPoints=l,l}update(t,s){const n=this.options.setContext(this.getContext()),o=this._active;let r,a=[];if(o.length){const l=fe[n.position].call(this,o,this._eventPosition);a=this._createItems(n),this.title=this.getTitle(a,n),this.beforeBody=this.getBeforeBody(a,n),this.body=this.getBody(a,n),this.afterBody=this.getAfterBody(a,n),this.footer=this.getFooter(a,n);const c=this._size=Yn(this,n),h=Object.assign({},l,c),d=Un(this.chart,n,h),u=Xn(n,h,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,r={opacity:1,x:u.x,y:u.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=a,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:s})}drawCaret(t,s,n,o){const r=this.getCaretPosition(t,n,o);s.lineTo(r.x1,r.y1),s.lineTo(r.x2,r.y2),s.lineTo(r.x3,r.y3)}getCaretPosition(t,s,n){const{xAlign:o,yAlign:r}=this,{caretSize:a,cornerRadius:l}=n,{topLeft:c,topRight:h,bottomLeft:d,bottomRight:u}=Ot(l),{x:f,y:p}=t,{width:m,height:b}=s;let x,_,v,M,y,k;return"center"===r?(y=p+b/2,"left"===o?(x=f,_=x-a,M=y+a,k=y-a):(x=f+m,_=x+a,M=y-a,k=y+a),v=x):(_="left"===o?f+Math.max(c,d)+a:"right"===o?f+m-Math.max(h,u)-a:this.caretX,"top"===r?(M=p,y=M-a,x=_-a,v=_+a):(M=p+b,y=M+a,x=_+a,v=_-a),k=M),{x1:x,x2:_,x3:v,y1:M,y2:y,y3:k}}drawTitle(t,s,n){const o=this.title,r=o.length;let a,l,c;if(r){const h=$t(n.rtl,this.x,this.width);for(t.x=$e(this,n.titleAlign,n),s.textAlign=h.textAlign(n.titleAlign),s.textBaseline="middle",a=$(n.titleFont),l=n.titleSpacing,s.fillStyle=n.titleColor,s.font=a.string,c=0;c<r;++c)s.fillText(o[c],h.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+l,c+1===r&&(t.y+=n.titleMarginBottom-l)}}_drawColorBox(t,s,n,o,r){const a=this.labelColors[n],l=this.labelPointStyles[n],{boxHeight:c,boxWidth:h}=r,d=$(r.bodyFont),u=$e(this,"left",r),f=o.x(u),m=s.y+(c<d.lineHeight?(d.lineHeight-c)/2:0);if(r.usePointStyle){const b={radius:Math.min(h,c)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},x=o.leftForLtr(f,h)+h/2,_=m+c/2;t.strokeStyle=r.multiKeyBackground,t.fillStyle=r.multiKeyBackground,di(t,b,x,_),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,di(t,b,x,_)}else{t.lineWidth=R(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const b=o.leftForLtr(f,h),x=o.leftForLtr(o.xPlus(f,1),h-2),_=Ot(a.borderRadius);Object.values(_).some(v=>0!==v)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,se(t,{x:b,y:m,w:h,h:c,radius:_}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),se(t,{x,y:m+1,w:h-2,h:c-2,radius:_}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(b,m,h,c),t.strokeRect(b,m,h,c),t.fillStyle=a.backgroundColor,t.fillRect(x,m+1,h-2,c-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,s,n){const{body:o}=this,{bodySpacing:r,bodyAlign:a,displayColors:l,boxHeight:c,boxWidth:h,boxPadding:d}=n,u=$(n.bodyFont);let f=u.lineHeight,p=0;const m=$t(n.rtl,this.x,this.width),b=function(D){s.fillText(D,m.x(t.x+p),t.y+f/2),t.y+=f+r},x=m.textAlign(a);let _,v,M,y,k,w,S;for(s.textAlign=a,s.textBaseline="middle",s.font=u.string,t.x=$e(this,x,n),s.fillStyle=n.bodyColor,L(this.beforeBody,b),p=l&&"right"!==x?"center"===a?h/2+d:h+2+d:0,y=0,w=o.length;y<w;++y){for(_=o[y],v=this.labelTextColors[y],s.fillStyle=v,L(_.before,b),M=_.lines,l&&M.length&&(this._drawColorBox(s,t,y,m,n),f=Math.max(u.lineHeight,c)),k=0,S=M.length;k<S;++k)b(M[k]),f=u.lineHeight;L(_.after,b)}p=0,f=u.lineHeight,L(this.afterBody,b),t.y-=r}drawFooter(t,s,n){const o=this.footer,r=o.length;let a,l;if(r){const c=$t(n.rtl,this.x,this.width);for(t.x=$e(this,n.footerAlign,n),t.y+=n.footerMarginTop,s.textAlign=c.textAlign(n.footerAlign),s.textBaseline="middle",a=$(n.footerFont),s.fillStyle=n.footerColor,s.font=a.string,l=0;l<r;++l)s.fillText(o[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+n.footerSpacing}}drawBackground(t,s,n,o){const{xAlign:r,yAlign:a}=this,{x:l,y:c}=t,{width:h,height:d}=n,{topLeft:u,topRight:f,bottomLeft:p,bottomRight:m}=Ot(o.cornerRadius);s.fillStyle=o.backgroundColor,s.strokeStyle=o.borderColor,s.lineWidth=o.borderWidth,s.beginPath(),s.moveTo(l+u,c),"top"===a&&this.drawCaret(t,s,n,o),s.lineTo(l+h-f,c),s.quadraticCurveTo(l+h,c,l+h,c+f),"center"===a&&"right"===r&&this.drawCaret(t,s,n,o),s.lineTo(l+h,c+d-m),s.quadraticCurveTo(l+h,c+d,l+h-m,c+d),"bottom"===a&&this.drawCaret(t,s,n,o),s.lineTo(l+p,c+d),s.quadraticCurveTo(l,c+d,l,c+d-p),"center"===a&&"left"===r&&this.drawCaret(t,s,n,o),s.lineTo(l,c+u),s.quadraticCurveTo(l,c,l+u,c),s.closePath(),s.fill(),o.borderWidth>0&&s.stroke()}_updateAnimationTarget(t){const s=this.chart,n=this.$animations,o=n&&n.x,r=n&&n.y;if(o||r){const a=fe[t.position].call(this,this._active,this._eventPosition);if(!a)return;const l=this._size=Yn(this,t),c=Object.assign({},a,this._size),h=Un(s,t,c),d=Xn(t,c,h,s);(o._to!==d.x||r._to!==d.y)&&(this.xAlign=h.xAlign,this.yAlign=h.yAlign,this.width=l.width,this.height=l.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(t){const s=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(s);const o={width:this.width,height:this.height},r={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const a=G(s.padding);s.enabled&&(this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length)&&(t.save(),t.globalAlpha=n,this.drawBackground(r,t,o,s),Cs(t,s.textDirection),r.y+=a.top,this.drawTitle(r,t,s),this.drawBody(r,t,s),this.drawFooter(r,t,s),Os(t,s.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,s){const n=this._active,o=t.map(({datasetIndex:l,index:c})=>{const h=this.chart.getDatasetMeta(l);if(!h)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:h.data[c],index:c}}),r=!ye(n,o),a=this._positionChanged(o,s);(r||a)&&(this._active=o,this._eventPosition=s,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,s,n=!0){if(s&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const o=this.options,r=this._active||[],a=this._getActiveElements(t,r,s,n),l=this._positionChanged(a,t),c=s||!ye(a,r)||l;return c&&(this._active=a,(o.enabled||o.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,s))),c}_getActiveElements(t,s,n,o){const r=this.options;if("mouseout"===t.type)return[];if(!o)return s.filter(l=>this.chart.data.datasets[l.datasetIndex]&&void 0!==this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index));const a=this.chart.getElementsAtEventForMode(t,r.mode,r,n);return r.reverse&&a.reverse(),a}_positionChanged(t,s){const{caretX:n,caretY:o,options:r}=this,a=fe[r.position].call(this,t,s);return!1!==a&&(n!==a.x||o!==a.y)}})();var nh=Object.freeze({__proto__:null,Colors:mc,Decimation:yc,Filler:Nc,Legend:Uc,SubTitle:Kc,Title:Gc,Tooltip:{id:"tooltip",_element:qn,positioners:fe,afterInit(e,i,t){t&&(e.tooltip=new qn({chart:e,options:t}))},beforeUpdate(e,i,t){e.tooltip&&e.tooltip.initialize(t)},reset(e,i,t){e.tooltip&&e.tooltip.initialize(t)},afterDraw(e){const i=e.tooltip;if(i&&i._willRender()){const t={tooltip:i};if(!1===e.notifyPlugins("beforeTooltipDraw",{...t,cancelable:!0}))return;i.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",t)}},afterEvent(e,i){e.tooltip&&e.tooltip.handleEvent(i.event,i.replay,i.inChartArea)&&(i.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:(e,i)=>i.bodyFont.size,boxWidth:(e,i)=>i.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:Jn},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>"filter"!==e&&"itemSort"!==e&&"external"!==e,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]}});function Qn(e){const i=this.getLabels();return e>=0&&e<i.length?i[e]:e}let lh=(()=>class e extends Ft{static id="category";static defaults={ticks:{callback:Qn}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const s=this._addedLabels;if(s.length){const n=this.getLabels();for(const{index:o,label:r}of s)n[o]===r&&n.splice(o,1);this._addedLabels=[]}super.init(t)}parse(t,s){if(A(t))return null;const n=this.getLabels();return((e,i)=>null===e?null:Y(Math.round(e),0,i))(s=isFinite(s)&&n[s]===t?s:function rh(e,i,t,s){const n=e.indexOf(i);return-1===n?((e,i,t,s)=>
vendor: 4,604 bytes, line 1
1("string"==typeof i?(t=e.push(i)-1,s.unshift({index:t,label:i})):isNaN(i)&&(t=null),t))(e,i,t,s):n!==e.lastIndexOf(i)?t:n}(n,t,P(s,t),this._addedLabels),n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:s}=this.getUserBounds();let{min:n,max:o}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(n=0),s||(o=this.getLabels().length-1)),this.min=n,this.max=o}buildTicks(){const t=this.min,s=this.max,n=this.options.offset,o=[];let r=this.getLabels();r=0===t&&s===r.length-1?r:r.slice(t,s+1),this._valueRange=Math.max(r.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let a=t;a<=s;a++)o.push({value:a});return o}getLabelForValue(t){return Qn.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const s=this.ticks;return t<0||t>s.length-1?null:this.getPixelForValue(s[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}})();function Zn(e,i,{horizontal:t,minRotation:s}){const n=nt(s),o=(t?Math.sin(n):Math.cos(n))||.001;return Math.min(i/o,.75*i*(""+e).length)}class Ye extends Ft{constructor(i){super(i),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(i,t){return A(i)||("number"==typeof i||i instanceof Number)&&!isFinite(+i)?null:+i}handleTickRangeOptions(){const{beginAtZero:i}=this.options,{minDefined:t,maxDefined:s}=this.getUserBounds();let{min:n,max:o}=this;const r=l=>n=t?n:l,a=l=>o=s?o:l;if(i){const l=rt(n),c=rt(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(n===o){let l=0===o?1:Math.abs(.05*o);a(o+l),i||r(n-l)}this.min=n,this.max=o}getTickLimit(){const i=this.options.ticks;let n,{maxTicksLimit:t,stepSize:s}=i;return s?(n=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),t=t||11),t&&(n=Math.min(t,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const i=this.options,t=i.ticks;let s=this.getTickLimit();s=Math.max(2,s);const r=function ch(e,i){const t=[],{bounds:n,step:o,min:r,max:a,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=e,f=o||1,p=h-1,{min:m,max:b}=i,x=!A(r),_=!A(a),v=!A(c),M=(b-m)/(d+1);let k,w,S,D,y=Zi((b-m)/p/f)*f;if(y<1e-14&&!x&&!_)return[{value:m},{value:b}];D=Math.ceil(b/y)-Math.floor(m/y),D>p&&(y=Zi(D*y/p/f)*f),A(l)||(k=Math.pow(10,l),y=Math.ceil(y*k)/k),"ticks"===n?(w=Math.floor(m/y)*y,S=Math.ceil(b/y)*y):(w=m,S=b),x&&_&&o&&function Ko(e,i){const t=Math.round(e);return t-i<=e&&t+i>=e}((a-r)/o,y/1e3)?(D=Math.round(Math.min((a-r)/y,h)),y=(a-r)/D,w=r,S=a):v?(w=x?r:w,S=_?a:S,D=c-1,y=(S-w)/D):(D=(S-w)/y,D=Qt(D,Math.round(D),y/1e3)?Math.round(D):Math.ceil(D));const O=Math.max(es(y),es(w));k=Math.pow(10,A(l)?O:l),w=Math.round(w*k)/k,S=Math.round(S*k)/k;let C=0;for(x&&(u&&w!==r?(t.push({value:r}),w<r&&C++,Qt(Math.round((w+C*y)*k)/k,r,Zn(r,M,e))&&C++):w<r&&C++);C<D;++C){const T=Math.round((w+C*y)*k)/k;if(_&&T>a)break;t.push({value:T})}return _&&u&&S!==a?t.length&&Qt(t[t.length-1].value,a,Zn(a,M,e))?t[t.length-1].value=a:t.push({value:a}):(!_||S===a)&&t.push({value:S}),t}({maxTicks:s,bounds:i.bounds,min:i.min,max:i.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:!1!==t.includeBounds},this._range||this);return"ticks"===i.bounds&&ts(r,this,"value"),i.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const i=this.ticks;let t=this.min,s=this.max;if(super.configure(),this.options.offset&&i.length){const n=(s-t)/Math.max(i.length-1,1)/2;t-=n,s+=n}this._startValue=t,this._endValue=s,this._valueRange=s-t}getLabelForValue(i){return ee(i,this.chart.options.locale,this.options.ticks.format)}}const ge=e=>Math.floor(vt(e)),It=(e,i)=>Math.pow(10,ge(e)+i);function to(e){return e/Math.pow(10,ge(e))==1}function eo(e,i,t){const s=Math.pow(10,t),n=Math.floor(e/s);return Math.ceil(i/s)-n}function zi(e){const i=e.ticks;if(i.display&&e.display){const t=G(i.backdropPadding);return P(i.font&&i.font.size,j.font.size)+t.height}return 0}function gh(e,i,t){return t=E(t)?t:[t],{w:ur(e,i.string,t),h:t.length*i.lineHeight}}function io(e,i,t,s,n){return e===s||e===n?{start:i-t/2,end:i+t/2}:e<s||e>n?{start:i-t,end:i}:{start:i,end:i+t}}
1function mh(e,i,t,s,n){const o=Math.abs(Math.sin(t)),r=Math.abs(Math.cos(t));let a=0,l=0;s.start<i.l?(a=(i.l-s.start)/o,e.l=Math.min(e.l,i.l-a)):s.end>i.r&&(a=(s.end-i.r)/o,e.r=Math.max(e.r,i.r+a)),n.start<i.t?(l=(i.t-n.start)/r,e.t=Math.min(e.t,i.t-l)):n.end>i.b&&(l=(n.end-i.b)/r,e.b=Math.max(e.b,i.b+l))}function bh(e,i,t){const s=e.drawingArea,{extra:n,additionalAngle:o,padding:r,size:a}=t,l=e.getPointPosition(i,s+n+r,o),c=Math.round(si(et(l.angle+W))),h=function kh(e,i,t){return 90===t||270===t?e-=i/2:(t>270||t<90)&&(e-=i),e}(l.y,a.h,c),d=function yh(e){return 0===e||180===e?"center":e<180?"left":"right"}(c),u=function vh(e,i,t){return"right"===t?e-=i:"center"===t&&(e-=i/2),e}(l.x,a.w,d);return{visible:!0,x:l.x,y:h,textAlign:d,left:u,top:h,right:u+a.w,bottom:h+a.h}}function xh(e,i){if(!i)return!0;const{left:t,top:s,right:n,bottom:o}=e;return!(gt({x:t,y:s},i)||gt({x:t,y:o},i)||gt({x:n,y:s},i)||gt({x:n,y:o},i))}function Mh(e,i,t){const{left:s,top:n,right:o,bottom:r}=t,{backdropColor:a}=i;if(!A(a)){const l=Ot(i.borderRadius),c=G(i.backdropPadding);e.fillStyle=a;const h=s-c.left,d=n-c.top,u=o-s+c.width,f=r-n+c.height;Object.values(l).some(p=>0!==p)?(e.beginPath(),se(e,{x:h,y:d,w:u,h:f,radius:l}),e.fill()):e.fillRect(h,d,u,f)}}function so(e,i,t,s){const{ctx:n}=e;if(t)n.arc(e.xCenter,e.yCenter,i,0,B);else{let o=e.getPointPosition(0,i);n.moveTo(o.x,o.y);for(let r=1;r<s;r++)o=e.getPointPosition(r,i),n.lineTo(o.x,o.y)}}const Ue={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Z=Object.keys(Ue);function no(e,i){return e-i}function oo(e,i){if(A(i))return null;const t=e._adapter,{parser:s,round:n,isoWeekday:o}=e._parseOpts;let r=i;return"function"==typeof s&&(r=s(r)),V(r)||(r="string"==typeof s?t.parse(r,s):t.parse(r)),null===r?null:(n&&(r="week"!==n||!Vt(o)&&!0!==o?t.startOf(r,n):t.startOf(r,"isoWeek",o)),+r)}function ro(e,i,t,s){const n=Z.length;for(let o=Z.indexOf(e);o<n-1;++o){const r=Ue[Z[o]];if(r.common&&Math.ceil((t-i)/((r.steps?r.steps:Number.MAX_SAFE_INTEGER)*r.size))<=s)return Z[o]}return Z[n-1]}function ao(e,i,t){if(t){if(t.length){const{lo:s,hi:n}=oi(t,i);e[t[s]>=i?t[s]:t[n]]=!0}}else e[i]=!0}function lo(e,i,t){const s=[],n={},o=i.length;let r,a;for(r=0;r<o;++r)a=i[r],n[a]=r,s.push({value:a,major:!1});return 0!==o&&t?function Ah(e,i,t,s){const n=e._adapter,o=+n.startOf(i[0].value,s),r=i[i.length-1].value;let a,l;for(a=o;a<=r;a=+n.add(a,1,s))l=t[a],l>=0&&(i[l].major=!0);return i}(e,s,n,t):s}let Bi=(()=>class e extends Ft{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,s={}){const n=t.time||(t.time={}),o=this._adapter=new Ta__date(t.adapters.date);o.init(s),Jt(n.displayFormats,o.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=s.normalized}parse(t,s){return void 0===t?null:oo(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,s=this._adapter,n=t.time.unit||"day";let{min:o,max:r,minDefined:a,maxDefined:l}=this.getUserBounds();function c(h){!a&&!isNaN(h.min)&&(o=Math.min(o,h.min)),!l&&!isNaN(h.max)&&(r=Math.max(r,h.max))}(!a||!l)&&(c(this._getLabelBounds()),("ticks"!==t.bounds||"labels"!==t.ticks.source)&&c(this.getMinMax(!1))),o=V(o)&&!isNaN(o)?o:+s.startOf(Date.now(),n),r=V(r)&&!isNaN(r)?r:+s.endOf(Date.now(),n)+1,this.min=Math.min(o,r-1),this.max=Math.max(o+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let s=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(s=t[0],n=t[t.length-1]),{min:s,max:n}}
1buildTicks(){const t=this.options,s=t.time,n=t.ticks,o="labels"===n.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&o.length&&(this.min=this._userMin||o[0],this.max=this._userMax||o[o.length-1]);const r=this.min,l=function Zo(e,i,t){let s=0,n=e.length;for(;s<n&&e[s]<i;)s++;for(;n>s&&e[n-1]>t;)n--;return s>0||n<e.length?e.slice(s,n):e}(o,r,this.max);return this._unit=s.unit||(n.autoSkip?ro(s.minUnit,this.min,this.max,this._getLabelCapacity(r)):function Ch(e,i,t,s,n){for(let o=Z.length-1;o>=Z.indexOf(t);o--){const r=Z[o];if(Ue[r].common&&e._adapter.diff(n,s,r)>=i-1)return r}return Z[t?Z.indexOf(t):0]}(this,l.length,s.minUnit,this.min,this.max)),this._majorUnit=n.major.enabled&&"year"!==this._unit?function Oh(e){for(let i=Z.indexOf(e)+1,t=Z.length;i<t;++i)if(Ue[Z[i]].common)return Z[i]}(this._unit):void 0,this.initOffsets(o),t.reverse&&l.reverse(),lo(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let o,r,s=0,n=0;this.options.offset&&t.length&&(o=this.getDecimalForValue(t[0]),s=1===t.length?1-o:(this.getDecimalForValue(t[1])-o)/2,r=this.getDecimalForValue(t[t.length-1]),n=1===t.length?r:(r-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;s=Y(s,0,a),n=Y(n,0,a),this._offsets={start:s,end:n,factor:1/(s+1+n)}}_generate(){const t=this._adapter,s=this.min,n=this.max,o=this.options,r=o.time,a=r.unit||ro(r.minUnit,s,n,this._getLabelCapacity(s)),l=P(o.ticks.stepSize,1),c="week"===a&&r.isoWeekday,h=Vt(c)||!0===c,d={};let f,p,u=s;if(h&&(u=+t.startOf(u,"isoWeek",c)),u=+t.startOf(u,h?"day":a),t.diff(n,s,a)>1e5*l)throw new Error(s+" and "+n+" are too far apart with stepSize of "+l+" "+a);const m="data"===o.ticks.source&&this.getDataTimestamps();for(f=u,p=0;f<n;f=+t.add(f,l,a),p++)ao(d,f,m);return(f===n||"ticks"===o.bounds||1===p)&&ao(d,f,m),Object.keys(d).sort(no).map(b=>+b)}getLabelForValue(t){const n=this.options.time;return this._adapter.format(t,n.tooltipFormat?n.tooltipFormat:n.displayFormats.datetime)}format(t,s){return this._adapter.format(t,s||this.options.time.displayFormats[this._unit])}_tickFormatFunction(t,s,n,o){const r=this.options,a=r.ticks.callback;if(a)return I(a,[t,s,n],this);const l=r.time.displayFormats,c=this._unit,h=this._majorUnit,u=h&&l[h],f=n[s];return this._adapter.format(t,o||(h&&u&&f&&f.major?u:c&&l[c]))}generateTickLabels(t){let s,n,o;for(s=0,n=t.length;s<n;++s)o=t[s],o.label=this._tickFormatFunction(o.value,s,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const s=this._offsets,n=this.getDecimalForValue(t);return this.getPixelForDecimal((s.start+n)*s.factor)}getValueForPixel(t){const s=this._offsets,n=this.getDecimalForPixel(t)/s.factor-s.end;return this.min+n*(this.max-this.min)}_getLabelSize(t){const s=this.options.ticks,n=this.ctx.measureText(t).width,o=nt(this.isHorizontal()?s.maxRotation:s.minRotation),r=Math.cos(o),a=Math.sin(o),l=this._resolveTickFontOptions(0).size;return{w:n*r+l*a,h:n*a+l*r}}_getLabelCapacity(t){const s=this.options.time,n=s.displayFormats,o=n[s.unit]||n.millisecond,r=this._tick
vendor: 7,484 bytes, line 1
1FormatFunction(t,0,lo(this,[t],this._majorUnit),o),a=this._getLabelSize(r),l=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return l>0?l:1}getDataTimestamps(){let s,n,t=this._cache.data||[];if(t.length)return t;const o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(s=0,n=o.length;s<n;++s)t=t.concat(o[s].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let s,n;if(t.length)return t;const o=this.getLabels();for(s=0,n=o.length;s<n;++s)t.push(oo(this,o[s]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return os(t.sort(no))}})();function Xe(e,i,t){let o,r,a,l,s=0,n=e.length-1;t?(i>=e[s].pos&&i<=e[n].pos&&({lo:s,hi:n}=ft(e,"pos",i)),({pos:o,time:a}=e[s]),({pos:r,time:l}=e[n])):(i>=e[s].time&&i<=e[n].time&&({lo:s,hi:n}=ft(e,"time",i)),({time:o,pos:a}=e[s]),({time:r,pos:l}=e[n]));const c=r-o;return c?a+(l-a)*(i-o)/c:a}const Lh=[Ra,cc,nh,Object.freeze({__proto__:null,CategoryScale:lh,LinearScale:class hh extends Ye{static id="linear";static defaults={ticks:{callback:Se.formatters.numeric}};determineDataLimits(){const{min:i,max:t}=this.getMinMax(!0);this.min=V(i)?i:0,this.max=V(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const i=this.isHorizontal(),t=i?this.width:this.height,s=nt(this.options.ticks.minRotation),n=(i?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,o.lineHeight/n))}getPixelForValue(i){return null===i?NaN:this.getPixelForDecimal((i-this._startValue)/this._valueRange)}getValueForPixel(i){return this._startValue+this.getDecimalForPixel(i)*this._valueRange}},LogarithmicScale:class fh extends Ft{static id="logarithmic";static defaults={ticks:{callback:Se.formatters.logarithmic,major:{enabled:!0}}};constructor(i){super(i),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(i,t){const s=Ye.prototype.parse.apply(this,[i,t]);if(0!==s)return V(s)&&s>0?s:null;this._zero=!0}determineDataLimits(){const{min:i,max:t}=this.getMinMax(!0);this.min=V(i)?Math.max(0,i):null,this.max=V(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!V(this._userMin)&&(this.min=i===It(this.min,0)?It(this.min,-1):It(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:i,maxDefined:t}=this.getUserBounds();let s=this.min,n=this.max;const o=a=>s=i?s:a,r=a=>n=t?n:a;s===n&&(s<=0?(o(1),r(10)):(o(It(s,-1)),r(It(n,1)))),s<=0&&o(It(n,-1)),n<=0&&r(It(s,1)),this.min=s,this.max=n}buildTicks(){const i=this.options,s=function uh(e,{min:i,max:t}){i=tt(e.min,i);const s=[],n=ge(i);let o=function dh(e,i){let s=ge(i-e);for(;eo(e,i,s)>10;)s++;for(;eo(e,i,s)<10;)s--;return Math.min(s,ge(e))}(i,t),r=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=n>o?Math.pow(10,n):0,c=Math.round((i-l)*r)/r,h=Math.floor((i-l)/a/10)*a*10;let d=Math.floor((c-h)/Math.pow(10,o)),u=tt(e.min,Math.round((l+h+d*Math.pow(10,o))*r)/r);for(;u<t;)s.push({value:u,major:to(u),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,r=o>=0?1:r),u=Math.round((l+h+d*Math.pow(10,o))*r)/r;const f=tt(e.max,u);return s.push({value:f,major:to(f),significand:d}),s}({min:this._userMin,max:this._userMax},this);return"ticks"===i.bounds&&ts(s,this,"value"),i.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}getLabelForValue(i){return void 0===i?"0":ee(i,this.chart.options.locale,this.options.ticks.format)}configure(){const i=this.min;super.configure(),this._startValue=vt(i),this._valueRange=vt(this.max)-vt(i)}getPixelForValue(i){return(void 0===i||0===i)&&(i=this.min),null===i||isNaN(i)?NaN:this.getPixelForDecimal(i===this.min?0:(vt(i)-this._startValue)/this._valueRange)}getValueForPixel(i){const t=this.getDecimalForPixel(i);return Math.pow(10,this._startValue+t*this._valueRange)}},RadialLinearScale:class Ph extends Ye{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:Se.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:i=>i,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(i){super(i),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const i=this._padding=G(zi(this.options)/2),t=this.width=this.maxWidth-i.width,s=this.height=this.maxHeight-i.height;this.xCenter=Math.floor(this.left+t/2+i.left),this.yCenter=Math.floor(this.top+s/2+i.top),this.drawingArea=Math.floor(Math.min(t,s)/2)}determineDataLimits(){const{min:i,max:t}=this.getMinMax(!1);this.min=V(i)&&!isNaN(i)?i:0,this.max=V(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/zi(this.options))}generateTickLabels(i){Ye.prototype.generateTickLabels.call(this,i),this._pointLabels=this.getLabels().map((t,s)=>{const n=I(this.options.pointLabels.callback,[t,s],this);return n||0===n?n:""}).filter((t,s)=>this.chart.getDataVisibility(s))}fit(){const i=this.options;i.display&&i.pointLabels.display?function ph(e){const i={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},t=Object.assign({},i),s=[],n=[],o=e._pointLabels.length,r=e.options.pointLabels,a=r.centerPointLabels?z/o:0;for(let l=0;l<o;l++){const c=r.setContext(e.getPointLabelContext(l));n[l]=c.padding;const h=e.getPointPosition(l,e.drawingArea+n[l],a),d=$(c.font),u=gh(e.ctx,d,e._pointLabels[l]);s[l]=u;const f=et(e.getIndexAngle(l)+a),p=Math.round(si(f));mh(t,i,f,io(p,h.x,u.w,0,180),io(p,h.y,u.h,90,270))}e.setCenterPoint(i.l-t.l,t.r-i.r,i.t-t.t,t.b-i.b),e._pointLabelItems=function _h(e,i,t){const s=[],n=e._pointLabels.length,o=e.options,{centerPointLabels:r,display:a}=o.pointLabels,l={extra:zi(o)/2,additionalAngle:r?z/n:0};let c;for(let h=0;h<n;h++){l.padding=t[h],l.size=i[h];const d=bh(e,h,l);s.push(d),"auto"===a&&(d.visible=xh(d,c),d.visible&&(c=d))}return s}(e,s,n)}(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(i,t,s,n){this.xCenter+=Math.floor((i-t)/2),this.yCenter+=Math.floor((s-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(i,t,s,n))}getIndexAngle(i){return et(i*(B/(this._pointLabels.length||1))+nt(this.options.startAngle||0))}getDistanceFromCenterForValue(i){if(A(i))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-i)*t:(i-this.min)*t}getValueForDistanceFromCenter(i){if(A(i))return NaN;const t=i/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(i){const t=this._pointLabels||[];if(i>=0&&i<t.length){const s=t[i];return function Dh(e,i,t){return kt(e,{label:t,index:i,type:"pointLabel"})}(this.getContext(),i,s)}}getPointPosition(i,t,s=0){const n=this.getIndexAngle(i)-W+s;return{x:Math.cos(n)*t+this.xCenter,y:Math.sin(n)*t+this.yCenter,angle:n}}getPointPositionForValue(i,t){return this.getPointPosition(i,this.getDistanceFromCenterForValue(t))}getBasePosition(i){return this.getPointPositionForValue(i||0,this.getBaseValue())}
1getPointLabelPosition(i){const{left:t,top:s,right:n,bottom:o}=this._pointLabelItems[i];return{left:t,top:s,right:n,bottom:o}}drawBackground(){const{backgroundColor:i,grid:{circular:t}}=this.options;if(i){const s=this.ctx;s.save(),s.beginPath(),so(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),s.closePath(),s.fillStyle=i,s.fill(),s.restore()}}drawGrid(){const i=this.ctx,t=this.options,{angleLines:s,grid:n,border:o}=t,r=this._pointLabels.length;let a,l,c;if(t.pointLabels.display&&function Sh(e,i){const{ctx:t,options:{pointLabels:s}}=e;for(let n=i-1;n>=0;n--){const o=e._pointLabelItems[n];if(!o.visible)continue;const r=s.setContext(e.getPointLabelContext(n));Mh(t,r,o);const a=$(r.font),{x:l,y:c,textAlign:h}=o;Ct(t,e._pointLabels[n],l,c+a.lineHeight/2,a,{color:r.color,textAlign:h,textBaseline:"middle"})}}(this,r),n.display&&this.ticks.forEach((h,d)=>{if(0!==d||0===d&&this.min<0){l=this.getDistanceFromCenterForValue(h.value);const u=this.getContext(d),f=n.setContext(u),p=o.setContext(u);!function wh(e,i,t,s,n){const o=e.ctx,r=i.circular,{color:a,lineWidth:l}=i;!r&&!s||!a||!l||t<0||(o.save(),o.strokeStyle=a,o.lineWidth=l,o.setLineDash(n.dash||[]),o.lineDashOffset=n.dashOffset,o.beginPath(),so(e,t,r,s),o.closePath(),o.stroke(),o.restore())}(this,f,l,r,p)}}),s.display){for(i.save(),a=r-1;a>=0;a--){const h=s.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:u}=h;!u||!d||(i.lineWidth=u,i.strokeStyle=d,i.setLineDash(h.borderDash),i.lineDashOffset=h.borderDashOffset,l=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),c=this.getPointPosition(a,l),i.beginPath(),i.moveTo(this.xCenter,this.yCenter),i.lineTo(c.x,c.y),i.stroke())}i.restore()}}drawBorder(){}drawLabels(){const i=this.ctx,t=this.options,s=t.ticks;if(!s.display)return;const n=this.getIndexAngle(0);let o,r;i.save(),i.translate(this.xCenter,this.yCenter),i.rotate(n),i.textAlign="center",i.textBaseline="middle",this.ticks.forEach((a,l)=>{if(0===l&&this.min>=0&&!t.reverse)return;const c=s.setContext(this.getContext(l)),h=$(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){i.font=h.string,r=i.measureText(a.label).width,i.fillStyle=c.backdropColor;const d=G(c.backdropPadding);i.fillRect(-r/2-d.left,-o-h.size/2-d.top,r+d.width,h.size+d.height)}Ct(i,a.label,0,-o,h,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),i.restore()}drawTitle(){}},TimeScale:Bi,TimeSeriesScale:class Rh extends Bi{static id="timeseries";static defaults=Bi.defaults;constructor(i){super(i),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const i=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(i);this._minPos=Xe(t,this.min),this._tableRange=Xe(t,this.max)-this._minPos,super.initOffsets(i)}buildLookupTable(i){const{min:t,max:s}=this,n=[],o=[];let r,a,l,c,h;for(r=0,a=i.length;r<a;++r)c=i[r],c>=t&&c<=s&&n.push(c);if(n.length<2)return[{time:t,pos:0},{time:s,pos:1}];for(r=0,a=n.length;r<a;++r)h=n[r+1],l=n[r-1],c=n[r],Math.round((h+l)/2)!==c&&o.push({time:c,pos:r/(a-1)});return o}_generate(){const i=this.min,t=this.max;let s=super.getDataTimestamps();return(!s.includes(i)||!s.length)&&s.splice(0,0,i),(!s.includes(t)||1===s.length)&&s.push(t),s.sort((n,o)=>n-o)}_getTimestampsForTable(){let i=this._cache.all||[];if(i.length)return i;const t=this.getDataTimestamps(),s=this.getLabelTimestamps();return i=t.length&&s.length?this.normalize(t.concat(s)):t.length?t:s,i=this._cache.all=i,i}getDecimalForValue(i){return(Xe(this._table,i)-this._minPos)/this._tableRange}getValueForPixel(i){const t=this._offsets,s=this.getDecimalForPixel(i)/t.factor-t.end;return Xe(this._table,s*this._tableRange+this._minPos,!0)}}})];var Ge=q(4412),ji=q(5312),co=q(2557);let ho=(()=>{class e{constructor(t){this.http=t,this.baseurl=ji.c.apiUrl}getMemberProfile(){return this.http.get(this.baseurl+"/api/v2/member/profile")}getDashboardData(t){return this.http.get(this.baseurl+"/api/v2/dashboard/"+t)}getProductListingTrend(){return this.http.get(this.baseurl+"/api/v2/dashboard/productlistingtrend")}getRecentActivity(){return this.http.get(this.baseurl+"/api/v2/dashboard/recentactivity")}getRenewalInvoice(t,s){return this.http.get(this.baseurl+`/api/Invoice/broughtforward/showinvoice/getbyregistrationid?registrationid=${t}&paymenttarget_year=${s}`)}getRenewalInfo(t,s){return this.http.get(this.baseurl+`/api/Invoice/broughtforward/showinvoice/getbyinvoiceid?registrationid=${t}&paymenttarget_year=${s}`)}static{this.\u0275fac=function(s){return new(s||e)(g.KVO(co.Qq))}}static{this.\u0275prov=g.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),Fh=(()=>{class e{constructor(t){this.http=t,this.dashboardService=(0,g.WQX)(ho),this._backendProf=new Ge.t(null),this.backendProf$=this._backendProf.asObservable(),this._backendDash=new Ge.t(null),this.backendDash$=this._backendDash.asObservable(),this._backendTrend=new Ge.t(null),this.backendTrend$=this._backendTrend.asObservable(),this._backendActivity=new Ge.t(null),this.backendActivity$=this._backendActivity.asObservable()}updateProf(t){this._backendProf.next(t)}updateDash(t){this._backendDash.next(t)}updateTrend(t){this._backendTrend.next(t)}updateActivity(t){this._backendActivity.next(t)}fetchProf(){var t=sessionStorage.getItem("company")||"";""!=t&&(JSON.parse(t),this.dashboardService.getMemberProfile().subscribe({next:n=>{this.updateProf(n.returnedObject)},error:n=>{}}))}fetchDash(){var t=sessionStorage.getItem("company")||"";if(""!=t){var s=JSON.parse(t).registrationid;this.dashboardService.getDashboardData(s).subscribe({next:n=>{this.updateDash(n.returnedObject)},error:n=>{}})}}fetchTrend(){var t=sessionStorage.getItem("company")||"";""!=t&&(JSON.parse(t),this.dashboardService.getProductListingTrend().subscribe({next:n=>{this.updateTrend(n.returnedObject)},error:n=>{}}))}fetchActivity(){var t=sessionStorage.getItem("company")||"";""!=t&&(JSON.parse(t),this.dashboardService.getRecentActivity().subscribe({next:n=>{n.returnedObject.length>0&&this.updateActivity(n.returnedObject)},error:n=>{}}))}static{this.\u0275fac=function(s){return new(s||e)(g.KVO(co.Qq))}}static{this.\u0275prov=g.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Ih=q(8973),uo=q(5207),Eh=q(8559),zh=q(279),Bh=q(5383),fo=q(5779);const jh=(e,i)=>i.gtin;function Nh(e,i){if(1&e&&(g.j41(0,"p",35),g.EFF(1),g.k0s()),2&e){const t=g.XpG();g.R7$(),g.JRh(t.formatDate(null==t.profile||null==t.profile.renew
1alDashboardInfo?null:t.profile.renewalDashboardInfo.nextPaymentDate))}}function Vh(e,i){if(1&e){const t=g.RV6();g.j41(0,"p",59),g.bIt("click",function(){g.eBV(t);const n=g.XpG();return g.Njj(n.previewInvoice())}),g.EFF(1,"Click here to download"),g.k0s()}}function Wh(e,i){if(1&e){const t=g.RV6();g.j41(0,"button",60),g.bIt("click",function(){g.eBV(t);const n=g.XpG();return g.Njj(n.payRenewal())}),g.nrm(1,"i",61),g.EFF(2," Renew Membership "),g.k0s()}}function Hh(e,i){1&e&&(g.j41(0,"td")(1,"span",62),g.EFF(2,"Active"),g.k0s()())}function $h(e,i){1&e&&(g.j41(0,"td")(1,"span",63),g.EFF(2,"Incomplete"),g.k0s()())}function Yh(e,i){if(1&e&&(g.j41(0,"tr")(1,"td"),g.EFF(2),g.k0s(),g.j41(3,"td"),g.EFF(4),g.k0s(),g.j41(5,"td"),g.EFF(6),g.k0s(),g.DNE(7,Hh,3,0,"td")(8,$h,3,0,"td"),g.k0s()),2&e){const t=i.$implicit,s=g.XpG();g.R7$(2),g.JRh(s.formatDate(t.date)),g.R7$(2),g.JRh(t.gtin),g.R7$(2),g.JRh(t.description),g.R7$(),g.vxM(t.isComplete?7:8)}}function Uh(e,i){1&e&&(g.j41(0,"p"),g.EFF(1,"No recent Activity"),g.k0s())}let go=(()=>{class e{constructor(t){this.ref=t,this.productServices=(0,g.WQX)(po.b),this.dashboardDataResolver=(0,g.WQX)(Fh),this.dashboardService=(0,g.WQX)(ho),this.registrationService=(0,g.WQX)(Bh.f),this.messageService=(0,g.WQX)(fo.bg),this.router=(0,g.WQX)(Ih.Ix),this.loading=!1,this.paymentLoading=!1,this.registrationId="",this.companyName="",this.email="",Ne.register(...Lh);let s=sessionStorage.getItem("company")||"",n=""!=s?JSON.parse(s):null;null!=n&&(this.companyName=n.companyname,this.registrationId=n.registrationid,this.email=n.email)}ngOnInit(){const t=sessionStorage.getItem("dashboard");if(t)try{let n=JSON.parse(t);this.dashboardDataResolver.updateDash(n),this.dashboardData=n}catch{this.dashboardDataResolver.backendDash$.subscribe({next:o=>{null==o?this.dashboardDataResolver.fetchDash():this.dashboardData=o,sessionStorage.setItem("dashboard",JSON.stringify(this.dashboardData))},error:o=>{}})}else this.dashboardDataResolver.backendDash$.subscribe({next:n=>{null==n?this.dashboardDataResolver.fetchDash():this.dashboardData=n,sessionStorage.setItem("dashboard",JSON.stringify(this.dashboardData))},error:n=>{}});const s=sessionStorage.getItem("activities");if(s)try{let n=JSON.parse(s);this.dashboardDataResolver.updateActivity(n),this.activities=n}catch{sessionStorage.removeItem("activities"),this.dashboardDataResolver.backendActivity$.subscribe({next:o=>{null==o?this.dashboardDataResolver.fetchActivity():this.activities=o,sessionStorage.setItem("activities",JSON.stringify(this.activities))},error:o=>{}})}else this.dashboardDataResolver.backendActivity$.subscribe({next:n=>{null==n?this.dashboardDataResolver.fetchActivity():this.activities=n,sessionStorage.setItem("activities",JSON.stringify(this.activities))},error:n=>{}})}ngAfterViewInit(){this.fetchProductList(),this.initCharts()}ngOnDestroy(){this.trendSub&&this.trendSub.unsubscribe(),this.profSub&&this.profSub.unsubscribe()}fetchProductList(){this.productServices.getProductbyregId(this.registrationId).subscribe({next:t=>{},error:t=>{}})}initCharts(){const t=sessionStorage.getItem("trend");if(t)try{let n=JSON.parse(t);this.dashboardDataResolver.updateTrend(n),this.trends=n,this.drawBarChart()}catch{sessionStorage.removeItem("trend"),this.dashboardDataResolver.backendTrend$.subscribe({next:o=>{null==o?this.dashboardDataResolver.fetchTrend():this.trends=o,sessionStorage.setItem("trend",JSON.stringify(this.trends))},error:o=>{}})}else this.trendSub=this.dashboardDataResolver.backendTrend$.subscribe({next:n=>{null==n?this.dashboardDataResolver.fetchTrend():this.trends=n,sessionStorage.setItem("trend",JSON.stringify(this.trends)),this.drawBarChart()},error:n=>{}});const s=sessionStorage.getItem("profile");if(s){let n=JSON.parse(s);this.dashboardDataResolver.updateProf(n),this.profile=n,this.ref.detectChanges(),this.drawPieChart()}else this.profSub=this.dashboardDataResolver.backendProf$.subscribe({next:n=>{null==n?this.dashboardDataResolver.fetchProf():(this.profile=n,this.ref.detectChanges()),sessionStorage.setItem("profile",JSON.stringify(this.profile)),this.drawPieChart()},error:n=>{}})}drawBarChart(){this.barcodeUsageChart&&this.barcodeUsageChart.destroy();const t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],s=document.getElementById("barcodeUsageChart");this.barcodeUsageChart=new Ne(s,{type:"line",data:{labels:this.trends?.productTrends.map(n=>t[n.month-1]),datasets:[{label:"Barcodes Issued",data:this.trends?.productTrends.map(n=>n.count),borderColor:"#002c6c",backgroundColor:"rgba(0, 44, 108, 0.1)",tension:.3,fill:!0},{label:"Barcode Images Generated",data:[0,0,0,0,0,0,0],borderColor:"#f26334",backgroundColor:"rgba(242, 99, 52, 0.1)",tension:.3,fill:!0}]},options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"top"},tooltip:{mode:"index",intersect:!1}},scales:{y:{beginAtZero:!0}}}})}drawPieChart(){this.allocationChart&&this.allocationChart.destroy();const t=document.getElementById("allocationChart");let s=this.profile?.gtinDashboardInfo.totalUsed||0,n=this.profile?.gtinDashboardInfo.totalRemaining||0,o=this.profile?.gtinDashboardInfo.totalRequested||0;this.allocationChart=new Ne(t,{type:"doughnut",data:{labels:["Used GTINs","Available GTINs"],datasets:[{data:[Math.ceil(s/o*100),Math.floor(n/o*100)],backgroundColor:["#002c6c","#f26334"],borderWidth:0}]},options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{dis
1play:!1},tooltip:{callbacks:{label:function(r){return`${r.label}: ${r.raw}%`}}}},cutout:"70%"}})}percentShow(t){let s=-1,n=-1;if("image"==t?(s=this.profile?.imageDashboardInfo.totalUsed||0,n=this.profile?.imageDashboardInfo.totalRequested||0):"barcode"==t||"pie-used"==t?(s=this.profile?.gtinDashboardInfo.totalUsed||0,n=this.profile?.gtinDashboardInfo.totalRequested||0):"pie-available"==t?(s=this.profile?.gtinDashboardInfo.totalRemaining||0,n=this.profile?.gtinDashboardInfo.totalRequested||0):"digital"==t&&(s=this.profile?.digitalProfileDashboardInfo.totalUsed||0,n=this.profile?.digitalProfileDashboardInfo.totalRequested||0),0===n)return 0;if(-1!=s&&-1!=n){let o=s/n*100;return o<Math.floor(o)+.5?Math.floor(o):Math.ceil(o)}return 0}formatDate(t){if(null==t)return;const s=new Date(t);let n=s.getDate(),o=s.getMonth()+1;return n=n<10?"0"+n:n,o=o<10?"0"+o:o,`${n}-${o}-${s.getFullYear()}`}formatPrice(t){return null!=t?new Intl.NumberFormat("en-NG",{style:"currency",currency:"NGN"}).format(t):0}previewInvoice(){let t=`${(new Date).getFullYear()+1}/${String((new Date).getMonth()+1).padStart(2,"0")}/${String((new Date).getDate()).padStart(2,"0")}`;this.dashboardService.getRenewalInvoice(this.registrationId,t).subscribe({next:s=>{const n=s.returnedObject.invoicePath.split("/").pop()||"invoice.pdf";fetch(this.getFileURL(s.returnedObject.invoicePath)).then(o=>o.blob()).then(o=>{const r=window.URL.createObjectURL(o),a=document.createElement("a");a.href=r,a.download=n,document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(r)})},error:s=>{}})}payRenewal(){console.log("Initiating payment process for renewal...");let t=`${(new Date).getFullYear()+1}/${String((new Date).getMonth()+1).padStart(2,"0")}/${String((new Date).getDate()).padStart(2,"0")}`;this.dashboardService.getRenewalInfo(this.registrationId,t).subscribe({next:s=>{if(1==s.status){let o=s.returnedObject.invoiceNumber;var n={description:`Renewal for ${s.returnedObject.invoiceDescription}`,amount:Number(s.returnedObject.amount),paymentReference:o,gs1PaymentReference:o,registrationId:this.registrationId,email:this.email,paymentType:zh.d.FlutterWave};this.registrationService.initializePayment(n).subscribe({next:r=>{},error:r=>{}}),FlutterwaveCheckout({public_key:ji.c.flutterKey,tx_ref:o,amount:Number(s.returnedObject.amount),currency:"NGN",customer:{email:this.email},customizations:{title:"Membership Portal",description:`Renewal for ${s.returnedObject.invoiceDescription}`,logo:"https://gs1ng.org/wp-content/uploads/2023/06/gs1-logo.png"},callback:r=>{this.paymentLoading=!1,this.verifyPayment(r.transaction_id)},onclose:()=>{this.paymentLoading=!1,this.messageService.add({severity:"info",summary:"Transaction ended",detail:"Payment window was closed"}),this.router.navigate(["/pages/dashboard"])}})}this.paymentLoading=!1,this.messageService.add({severity:"error",summary:"Error",detail:`Failed to make additional request, ${s.message}`})},error:s=>{this.paymentLoading=!1,this.messageService.add({severity:"error",summary:"Error",detail:`Failed to make additional request, ${s.error.message}`})}})}verifyPayment(t){this.registrationService.verifyPayment(t).subscribe({next:s=>{this.loading=!1,this.messageService.add({severity:"success",summary:"Payment Successful for membership renewal",detail:`Payment reference: ${t}`})},error:s=>{this.loading=!1,this.messageService.add({severity:"error",summary:"Payment Verification Failed",detail:"Please contact support."})}})}getFileURL(t){return t?`${ji.c.apiUrl}/${t}`:""}static{this.\u0275fac=function(s){return new(s||e)(g.rXU(g.gRc))}}static{this.\u0275cmp=g.VBU({type:e,selectors:[["app-dashboard"]],features:[g.Jv_([fo.bg])],decls:168,vars:22,consts:[["progress",""],[1,"container-fluid","gs1-dashboard"],[1,"row","mb-4"],[1,"col-12"],[1,"gs1-title"],[1,"pi","pi-qrcode","me-2",2,"font-size","2rem"],[1,"gs1-subtitle"],[1,"row","mb-4","gtin-dash"],[1,"col-md-3","mb-3"],[1,"card","gs1-card","h-100"],[1,"card-body"],[1,"d-flex","justify-content-between","align-items-start"],[1,"card-title"],[1,"card-text","fs-2","fw-bold"],[1,"text-muted"],[1,"gs1-icon-circle","bg-primary-light"],[1,"pi","pi-tags","text-primary"],[1,"progress","mt-3",2,"height","8px"],["role","progressbar",1,"progress-bar","bg-primary"],[1,"gs1-icon-circle","bg-secondary-light"],[1,"pi","pi-box","text-secondary"],["role","progressbar",1,"progress-bar","bg-secondary"],[1,"pi","pi-image","text-primary"],[1,"pi","pi-qrcode","text-secondary"],[1,"col-lg-8","mb-4"],[1,"pi","pi-chart-bar","me-2"],[1,"chart-container",2,"height","300px"],["id","barcodeUsageChart"],[1,"col-lg-4","mb-4"],[1,"pi","pi-id-card","me-2"],[1,"membership-info"],[1,"d-flex","align-items-center","mb-3"],[1,"gs1-icon-circle-sm","bg-primary-light","me-3"],[1,"pi","pi-calendar","text-primary"],[1,"mb-0"],[1,"text-muted","mb-0"],[1,"gs1-icon-circle-sm","bg-secondary-light","me-3"],[1,"pi","pi-clock","text-secondary"],["class","text-muted mb-0",4,"ngIf"],[1,"pi","pi-wallet","text-primary"],[1,"d-flex","align-items-center"],[1,"pi","pi-money-bill","text-secondary"],["class","text-muted btn mb-0","appTrackAction","Download Invoice",3,"click",4,"ngIf"],[1,"mt-4"],["class","btn btn-primary w-100","appTrackAction","Download Invoice","appTrackAction","Renew Membership Click",3,"click",4,"ngIf"],[1,"row"],[1,"col-lg-6","mb-4"],[1,"pi","pi-list","me-2"],[1,"table-responsive"],[1,"table","table-hover"],[1,"text-end","mt-2"],["routerLink","/pages/keymanagement/myproducts","appTrackAction","Vie
1w All Activity",1,"btn","btn-sm","btn-outline-primary"],[1,"pi","pi-chart-pie","me-2"],["id","allocationChart"],[1,"legend-container","mt-3"],[1,"d-flex","flex-wrap","justify-content-center"],[1,"legend-item","me-4"],[1,"legend-color","bg-secondary"],[1,"legend-color","bg-primary"],["appTrackAction","Download Invoice",1,"text-muted","btn","mb-0",3,"click"],["appTrackAction","Download Invoice","appTrackAction","Renew Membership Click",1,"btn","btn-primary","w-100",3,"click"],[1,"pi","pi-credit-card","me-2"],[1,"badge","bg-success"],[1,"badge","bg-warning","text-dark"]],template:function(s,n){1&s&&(g.j41(0,"section",1)(1,"div",2)(2,"div",3)(3,"h2",4),g.nrm(4,"i",5),g.EFF(5," GS1 Barcode Management Dashboard "),g.k0s(),g.j41(6,"h5",4),g.EFF(7),g.k0s(),g.j41(8,"p",6),g.EFF(9,"Manage your barcode allocations and membership details"),g.k0s()()(),g.j41(10,"div",7)(11,"div",8)(12,"div",9)(13,"div",10)(14,"div",11)(15,"div")(16,"h5",12),g.EFF(17,"Total Gtins"),g.k0s(),g.j41(18,"p",13),g.EFF(19),g.k0s(),g.j41(20,"p",14),g.EFF(21,"Total product barcodes issued"),g.k0s()(),g.j41(22,"div",15),g.nrm(23,"i",16),g.k0s()(),g.j41(24,"div",17),g.nrm(25,"div",18,0),g.k0s(),g.j41(27,"small",14),g.EFF(28),g.k0s()()()(),g.j41(29,"div",8)(30,"div",9)(31,"div",10)(32,"div",11)(33,"div")(34,"h5",12),g.EFF(35,"Gtin(s) Available"),g.k0s(),g.j41(36,"p",13),g.EFF(37),g.k0s(),g.j41(38,"p",14),g.EFF(39,"Unused product barcodes"),g.k0s()(),g.j41(40,"div",19),g.nrm(41,"i",20),g.k0s()(),g.j41(42,"div",17),g.nrm(43,"div",21),g.k0s(),g.j41(44,"small",14),g.EFF(45),g.k0s()()()(),g.j41(46,"div",8)(47,"div",9)(48,"div",10)(49,"div",11)(50,"div")(51,"h5",12),g.EFF(52,"Barcode Images"),g.k0s(),g.j41(53,"p",13),g.EFF(54),g.k0s(),g.j41(55,"p",14),g.EFF(56,"Total available barcode images"),g.k0s()(),g.j41(57,"div",15),g.nrm(58,"i",22),g.k0s()()()()(),g.j41(59,"div",8)(60,"div",9)(61,"div",10)(62,"div",11)(63,"div")(64,"h5",12),g.EFF(65,"Digital Profile"),g.k0s(),g.j41(66,"p",13),g.EFF(67),g.k0s(),g.j41(68,"p",14),g.EFF(69,"QR Codes Generated for profile"),g.k0s()(),g.j41(70,"div",19),g.nrm(71,"i",23),g.k0s()(),g.j41(72,"div",17),g.nrm(73,"div",21),g.k0s(),g.j41(74,"small",14),g.EFF(75),g.k0s()()()()(),g.j41(76,"div",2)(77,"div",24)(78,"div",9)(79,"div",10)(80,"h5",12),g.nrm(81,"i",25),g.EFF(82," Barcode Usage Trend "),g.k0s(),g.j41(83,"div",26),g.nrm(84,"canvas",27),g.k0s()()()(),g.j41(85,"div",28)(86,"div",9)(87,"div",10)(88,"h5",12),g.nrm(89,"i",29),g.EFF(90," Membership Status "),g.k0s(),g.j41(91,"div",30)(92,"div",31)(93,"div",32),g.nrm(94,"i",33),g.k0s(),g.j41(95,"div")(96,"h6",34),g.EFF(97,"Anniversary Date"),g.k0s(),g.j41(98,"p",35),g.EFF(99),g.k0s()()(),g.j41(100,"div",31)(101,"div",36),g.nrm(102,"i",37),g.k0s(),g.j41(103,"div")(104,"h6",34),g.EFF(105,"Next Due Date"),g.k0s(),g.DNE(106,Nh,2,1,"p",38),g.k0s()(),g.j41(107,"div",31)(108,"div",32),g.nrm(109,"i",39),g.k0s(),g.j41(110,"div")(111,"h6",34),g.EFF(112,"Renewal Amount"),g.k0s(),g.j41(113,"p",35),g.EFF(114),g.k0s()()(),g.j41(115,"div",40)(116,"div",36),g.nrm(117,"i",41),g.k0s(),g.j41(118,"div")(119,"h6",34),g.EFF(120,"Download Invoice"),g.k0s(),g.DNE(121,Vh,2,0,"p",42),g.k0s()()(),g.j41(122,"div",43),g.DNE(123,Wh,3,0,"button",44),g.k0s()()()()(),g.j41(124,"div",45)(125,"div",46)(126,"div",9)(127,"div",10)(128,"h5",12),g.nrm(129,"i",47),g.EFF(130," Recent Barcode Activity "),g.k0s(),g.j41(131,"div",48)(132,"table",49)(133,"thead")(134,"tr")(135,"th"),g.EFF(136,"Date"),g.k0s(),g.j41(137,"th"),g.EFF(138,"GTIN"),g.k0s(),g.j41(139,"th"),g.EFF(140,"Product"),g.k0s(),g.j41(141,"th"),g.EFF(142,"Status"),g.k0s()()(),g.j41(143,"tbody"),g.Z7z(144,Yh,9,4,"tr",null,jh,!1,Uh,2,0,"p"),g.k0s()()(),g.j41(147,"div",50)(148,"a",51),g.EFF(149,"View All Activity"),g.k0s()()()()(),g.j41(150,"div",46)(151,"div",9)(152,"div",10)(153,"h5",12),g.nrm(154,"i",52),g.EFF(155," Barcode Allocation "),g.k0s(),g.j41(156,"div",26),g.nrm(157,"canvas",53),g.k0s(),g.j41(158,"div",54)(159,"div",55)(160,"div",56),g.nrm(161,"span",57),g.j41(162,"span"),g.EFF(163),g.k0s()(),g.j41(164,"div",56),g.nrm(165,"span",58),g.j41(166,"span"),g.EFF(167),g.k0s()()()()()()()()()),2&s&&(g.R7$(7),g.SpI("Hello ",n.companyName,", welcome to your dashboard"),g.R7$(12),g.JRh(null==n.profile||null==n.profile.gtinDashboardInfo?null:n.profile.gtinDashboardInfo.totalRequested),g.R7$(6),g.xc7("width",n.percentShow("barcode"),"%"),g.R7$(3),g.SpI("",n.percentShow("barcode"),"% of allocation used"),g.R7$(9),g.JRh(null==n.profile||null==n.profile.gtinDashboardInfo?null:n.profile.gtinDashboardInfo.totalRemaining),g.R7$(6),g.xc7("width",100-n.percentShow("barcode"),"%"),g.R7$(2),g.SpI("",100-n.percentShow("barcode"),"% remaining in allocation"),g.R7$(9),g.JRh(null==n.dashboardData?null:n.dashboardData.remainingImages),g.R7$(13),g.JRh(null==n.profile||null==n.profile.digitalProfileDashboardInfo?null:n.profile.digitalProfileDashboardInfo.totalRequested),g.R7$(6),g.xc7("width",n.percentShow("digital"),"%"),g.R7$(2),g.SpI("",n.percentShow("digital"),"% of QR codes used"),g.R7$(24),g.JRh(n.formatDate(null==n.dashboardData?null:n.dashboardData.issuanceDate)),g.R7$(7),g.Y8G("ngIf",null==n.dashboardData?null:n.dashboardData.issuanceDate),g.R7$(8),g.JRh(n.formatPrice(null==n.dashboardData?null:n.dashboardData.nextRenewalAmount)),g.R7$(7),g.Y8G("ngIf",null==n.dashboardData?null:n.dashboardData.issuanceDate),g.R7$(2),g.Y8G("ngIf",null==n.dashboardData?null:n.dashboardData.issuanceDate),g.R7$(21),g.Dyx(n.activities),g.R7$(19),g.SpI("Available (",n.percentShow("pie-available"),"%)"),g.R7$(4),g.SpI("Used (",n.percentShow("pie-used"),"%)"))},dependencies:[uo.Wk,Je.MD,Je.bT,Eh.B],styles:["[_ngcontent-%COMP%]:root{--gs1-blue: #002c6c;--bs-orange: #f26334;--primary-light: rgba(0, 44, 108, .1);--secondary-light: rgba(242, 99, 52, .1)}.gs1-dashboard[_ngcontent-%COMP%]{padding:20px;background-color:#f8f9fa}.gs1-title[_ngcontent-%COMP%]{color:var(--gs1-blue);font-weight:700;margin-bottom:.5rem}.gs1-subtitle[_ngcontent-%COMP%]{color:#6c757d;margin-bottom:1.5rem}.gs1-card[_ngcontent-%COMP%]{border:none;border-radius:10px;box-shadow:0 4px 20px #002c6c1a;transition:transform .3s ease,box-shadow .3s ease}.gs1-card[_ngcontent-%COMP%]:hover{transform:translateY(-5px);box-shadow:0 8px 25px #002c6c26}.gs1-card[_ngcontent-%COMP%] .card-title[_ngcontent-%COMP%]{color:var(--gs1-blue);font-weight:600}
1.gs1-icon-circle[_ngcontent-%COMP%]{width:60px;height:60px;border-radius:50%;display:flex;align-items:center;justify-content:center}.gs1-icon-circle[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:24px}.gs1-icon-circle-sm[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center}.gs1-icon-circle-sm[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:18px}.bg-primary[_ngcontent-%COMP%]{background-color:var(--gs1-blue)!important}.bg-secondary[_ngcontent-%COMP%]{background-color:var(--bs-orange)!important}.bg-primary-light[_ngcontent-%COMP%]{background-color:var(--primary-light)}.bg-secondary-light[_ngcontent-%COMP%]{background-color:var(--secondary-light)}.text-primary[_ngcontent-%COMP%]{color:var(--gs1-blue)!important}.text-secondary[_ngcontent-%COMP%]{color:var(--bs-orange)!important}.btn-primary[_ngcontent-%COMP%]{background-color:var(--gs1-blue);border-color:var(--gs1-blue)}.btn-primary[_ngcontent-%COMP%]:hover{background-color:#002055;border-color:#002055}.btn-outline-primary[_ngcontent-%COMP%]{color:var(--gs1-blue);border-color:var(--gs1-blue)}.btn-outline-primary[_ngcontent-%COMP%]:hover{background-color:var(--gs1-blue);color:#fff}.legend-color[_ngcontent-%COMP%]{display:inline-block;width:12px;height:12px;border-radius:2px;margin-right:5px}.legend-item[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:5px}.membership-info[_ngcontent-%COMP%]{padding:15px 0}.progress[_ngcontent-%COMP%]{border-radius:10px}"]})}}return e})();const Xh=[{path:"",component:go},{path:"**",redirectTo:"/pages/dashboard"}];let Gh=(()=>{class e{static{this.\u0275fac=function(s){return new(s||e)}}static{this.\u0275mod=g.$C({type:e})}static{this.\u0275inj=g.G2t({imports:[Je.MD,uo.iI.forChild(Xh),go]})}}return e})()}}]);
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.