PageSourceSearch

https://greatcoloradohomes.com/chunk-NW3ROG62.js

js greatcoloradohomes.com collected 2026-10-03 23:36:00 UTC 237,282 bytes, 2 lines download raw bytes

vendor: 10,260 bytes, line 1
1import{c as io,e as no,f as so,g as oo,h as Dt,l as ro,n as ao,o as lo,p as co,q as ho,r as fo,s as uo,u as po}from"./chunk-AWKAOP4Q.js";import{a as eo}from"./chunk-LYLFRCIE.js";import{l as Qs,n as to}from"./chunk-LJVWLVVB.js";import"./chunk-DP76YC53.js";import{x as Js}from"./chunk-SW2PCWOQ.js";import{$b as jt,Bc as Gs,Cc as Zs,Db as Tt,Ga as Ys,Ha as Ot,Ia as At,Jb as $e,Jc as Q,Kc as tt,Lb as Ue,P as Bs,Pa as Sn,Qa as $s,Qb as _t,Sb as Xs,Ta as Us,Tb as qs,U as Vs,Ub as Ks,Vb as C,Wb as P,Xb as pt,a as Mi,b as Si,f as S,fc as J,gc as ft,na as js,o as zs,ob as F,pb as Ye,qa as Ns,qc as O,rc as ot,sc as Ci,ta as He,xa as Ws,za as Hs}from"./chunk-FFQH2GOQ.js";var mo=[2024,2025,2026,2027,2028,2029,2030,2031,2032,2033,2034,2035,2036,2037,2038,2039,2040,2041,2042,2043,2044,2045,2046,2047,2048,2049,2050];function Ke(e){return e+.5|0}var Nt=(e,i,t)=>Math.max(Math.min(e,t),i);function Xe(e){return Nt(Ke(e*2.55),0,255)}function Wt(e){return Nt(Ke(e*255),0,255)}function Et(e){return Nt(Ke(e/2.55)/100,0,1)}function go(e){return Nt(Ke(e*100),0,100)}var mt={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},kn=[..."0123456789ABCDEF"],oc=e=>kn[e&15],rc=e=>kn[(e&240)>>4]+kn[e&15],ki=e=>(e&240)>>4===(e&15),ac=e=>ki(e.r)&&ki(e.g)&&ki(e.b)&&ki(e.a);function lc(e){var i=e.length,t;return e[0]==="#"&&(i===4||i===5?t={r:255&mt[e[1]]*17,g:255&mt[e[2]]*17,b:255&mt[e[3]]*17,a:i===5?mt[e[4]]*17:255}:(i===7||i===9)&&(t={r:mt[e[1]]<<4|mt[e[2]],g:mt[e[3]]<<4|mt[e[4]],b:mt[e[5]]<<4|mt[e[6]],a:i===9?mt[e[7]]<<4|mt[e[8]]:255})),t}var cc=(e,i)=>e<255?i(e):"";function hc(e){var i=ac(e)?oc:rc;return e?"#"+i(e.r)+i(e.g)+i(e.b)+cc(e.a,i):void 0}var dc=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function yo(e,i,t){let n=i*Math.min(t,1-t),s=(o,r=(o+e/30)%12)=>t-n*Math.max(Math.min(r-3,9-r,1),-1);return[s(0),s(8),s(4)]}function fc(e,i,t){let n=(s,o=(s+e/60)%6)=>t-t*i*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function uc(e,i,t){let n=yo(e,1,.5),s;for(i+t>1&&(s=1/(i+t),i*=s,t*=s),s=0;s<3;s++)n[s]*=1-i-t,n[s]+=i;return n}function pc(e,i,t,n,s){return e===s?(i-t)/n+(i<t?6:0):i===s?(t-e)/n+2:(e-i)/n+4}function Pn(e){let t=e.r/255,n=e.g/255,s=e.b/255,o=Math.max(t,n,s),r=Math.min(t,n,s),a=(o+r)/2,l,c,h;return o!==r&&(h=o-r,c=a>.5?h/(2-o-r):h/(o+r),l=pc(t,n,s,h,o),l=l*60+.5),[l|0,c||0,a]}function On(e,i,t,n){return(Array.isArray(i)?e(i[0],i[1],i[2]):e(i,t,n)).map(Wt)}function An(e,i,t){return On(yo,e,i,t)}function mc(e,i,t){return On(uc,e,i,t)}function gc(e,i,t){return On(fc,e,i,t)}function vo(e){return(e%360+360)%360}function xc(e){let i=dc.exec(e),t=255,n;if(!i)return;i[5]!==n&&(t=i[6]?Xe(+i[5]):Wt(+i[5]));let s=vo(+i[2]),o=+i[3]/100,r=+i[4]/100;return i[1]==="hwb"?n=mc(s,o,r):i[1]==="hsv"?n=gc(s,o,r):n=An(s,o,r),{r:n[0],g:n[1],b:n[2],a:t}}function bc(e,i){var t=Pn(e);t[0]=vo(t[0]+i),t=An(t),e.r=t[0],e.g=t[1],e.b=t[2]}function _c(e){if(!e)return;let i=Pn(e),t=i[0],n=go(i[1]),s=go(i[2]);return e.a<255?"hsla(".concat(t,", ").concat(n,"%, ").concat(s,"%, ").concat(Et(e.a),")"):"hsl(".concat(t,", ").concat(n,"%, ").concat(s,"%)")}var xo={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"},bo={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function yc(){let e={},i=Object.keys(bo),t=Object.keys(xo),n,s,o,r,a;for(n=0;n<i.length;n++){for(r=a=i[n],s=0;s<t.length;s++)o=t[s],a=a.replace(o,xo[o]);o=parseInt(bo[r],16),e[a]=[o>>16&255,o>>8&255,o&255]}return e}var Pi;function vc(e){Pi||(Pi=yc(),Pi.transparent=[0,0,0,0]);let i=Pi[e.toLowerCase()];return i&&{r:i[0],g:i[1],b:i[2],a:i.length===4?i[3]:255}}var wc=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Mc(e){let i=wc.exec(e),t=255,n,s,o;if(i){if(i[7]!==n){let r=+i[7];t=i[8]?Xe(r):Nt(r*255,0,255)}return n=+i[1],s=+i[3],o=+i[5],n=255&(i[2]?Xe(n):Nt(n,0,255)),s=255&(i[4]?Xe(s):Nt(s,0,255)),o=255&(i[6]?Xe(o):Nt(o,0,255)),{r:n,g:s,b:o,a:t}}}function Sc(e){return e&&(e.a<255?"rgba(".concat(e.r,", ").concat(e.g,", ").concat(e.b,", ").concat(Et(e.a),")"):"rgb(".concat(e.r,", ").concat(e.g,", ").concat(e.b,")"))}var Cn=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,ge=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Cc(e,i,t){let n=ge(Et(e.r)),s=ge(Et(e.g)),o=ge(Et(e.b));return{r:Wt(Cn(n+t*(ge(Et(i.r))-n))),g:Wt(Cn(s+t*(ge(Et(i.g))-s))),b:Wt(Cn(o+t*(ge(Et(i.b))-o))),a:e.a+t*(i.a-e.a)}}function Oi(e,i,t){if(e){let n=Pn(e);n[i]=Math.max(0,Math.min(n[i]+n[i]*t,i===0?360:1)),n=An(n),e.r=n[0],e.g=n[1],e.b=n[2]}}function wo(e,i){return e&&Object.assign(i||{},e)}function _o(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=Wt(e[3]))):(i=wo(e,{r:0,g:0,b:0,a:1}),i.a=Wt(i.a)),i}function kc(e){return e.charAt(0)==="r"?Mc(e):xc(e)}var qe=class e{constructor(i){if(i instanceof e)return i;let t=typeof i,n;t==="object"?n=_o(i):t==="string"&&(n=lc(i)||vc(i)||kc(i)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var i=wo(this._rgb);return i&&(i.a=Et(i.a)),i}set rgb(i){this._rgb=_o(i)}rgbString(){return this._valid?Sc(this._rgb):void 0}hexString(){return this._valid?hc(this._rgb):void 0}hslString(){return this._valid?_c(this._rgb):void 0}mix(i,t){if(i){let n=this.rgb,s=i.rgb,o,r=t===o?.5:t,a=2*r-1,l=n.a-s.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,n.r=255&c*n.r+o*s.r+.5,n.g=255&c*n.g+o*s.g+.5,n.b=255&c*n.b+o*s.b+.5,n.a=r*n.a+(1-r)*s.a,this.rgb=n}return this}interpolate(i,t){return i&&(this._rgb=Cc(this._rgb,i._rgb,t)),this}clone(){return new e(this.rgb)}alpha(i){return this._rgb.a=Wt(i),this}clearer(i){let t=this._rgb;return t.a*=1-i,this}greyscale(){let i=this._rgb,t=Ke(i.r*.3+i.g*.59+i.b*.11);return i.r=i.g=i.b=t,this}opaquer(i){let t=this._rgb;return t.a*=1+i,this}negate(){let i=this._rgb;return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,this}lighten(i){return Oi(this._rgb,2,i),this}darken(i){return Oi(this._rgb,2,-i),this}saturate(i){return Oi(this._rgb,1,i),this}desaturate(i){return Oi(this._rgb,1,-i),this}rotate(i){return bc(this._rgb,i),this}};function Mt(){}var Io=(()=>{let e=0;return()=>e++})();function R(e){return e===null||typeof e>"u"}function j(e){if(Array.isArray&&Array.isArray(e))return!0;let i=Object.prototype.toString.call(e);return i.slice(0,7)==="[object"&&i.slice(-6)==="Array]"}function I(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function U(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function at(e,i){return U(e)?e:i}function T(e,i){return typeof e>"u"?i:e}var Lo=(e,i)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/i,In=(e,i)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*i:+e;function V(e,i,t){if(e&&typeof e.call=="function")return e.apply(t,i)}function z(e,i,t,n){let s,o,r;if(j(e))if(o=e.length,n)for(s=o-1;s>=0;s--)i.call(t,e[s],s);else for(s=0;s<o;s++)i.call(t,e[s],s);else if(I(e))for(r=Object.keys(e),o=r.length,s=0;s<o;s++)i.call(t,e[r[s]],r[s])}function Je(e,i){let t,n,s,o;if(!e||!i||e.length!==i.length)return!1;for(t=0,n=e.length;t<n;++t)if(s=e[t],o=i[t],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function Ei(e){if(j(e))return e.map(Ei);if(I(e)){let i=Object.create(null),t=Object.keys(e),n=t.length,s=0;for(;s<n;++s)i[t[s]]=Ei(e[t[s]]);return i}return e}function Fo(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function Pc(e,i,t,n){if(!Fo(e))return;let s=i[e],o=t[e];I(s)&&I(o)?be(s,o,n):i[e]=Ei(o)}function be(e,i,t){let n=j(i)?i:[i],s=n.length;if(!I(e))return e;t=t||{};let o=t.merger||Pc,r;for(let a=0;a<s;++a){if(r=n[a],!I(r))continue;let l=Object.keys(r);for(let c=0,h=l.length;c<h;++c)o(l[c],e,r,t)}return e}function ye(e,i){return be(e,i,{merger:Oc})}function Oc(e,i,t){if(!Fo(e))return;let n=i[e],s=t[e];
1I(n)&&I(s)?ye(n,s):Object.prototype.hasOwnProperty.call(i,e)||(i[e]=Ei(s))}var Mo={"":e=>e,x:e=>e.x,y:e=>e.y};function Ac(e){let i=e.split("."),t=[],n="";for(let s of i)n+=s,n.endsWith("\\")?n=n.slice(0,-1)+".":(t.push(n),n="");return t}function Tc(e){let i=Ac(e);return t=>{for(let n of i){if(n==="")break;t=t&&t[n]}return t}}function Ft(e,i){return(Mo[i]||(Mo[i]=Tc(i)))(e)}function Ri(e){return e.charAt(0).toUpperCase()+e.slice(1)}var ve=e=>typeof e<"u",It=e=>typeof e=="function",Ln=(e,i)=>{if(e.size!==i.size)return!1;for(let t of e)if(!i.has(t))return!1;return!0};function Ro(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}var N=Math.PI,W=2*N,Dc=W+N,Ii=Number.POSITIVE_INFINITY,Ec=N/180,X=N/2,se=N/4,So=N*2/3,Lt=Math.log10,yt=Math.sign;function we(e,i,t){return Math.abs(e-i)<t}function Fn(e){let i=Math.round(e);e=we(e,i,e/1e3)?i:e;let t=Math.pow(10,Math.floor(Lt(e))),n=e/t;return(n<=1?1:n<=2?2:n<=5?5:10)*t}function zo(e){let i=[],t=Math.sqrt(e),n;for(n=1;n<t;n++)e%n===0&&(i.push(n),i.push(e/n));return t===(t|0)&&i.push(t),i.sort((s,o)=>s-o).pop(),i}function ae(e){return!isNaN(parseFloat(e))&&isFinite(e)}function Bo(e,i){let t=Math.round(e);return t-i<=e&&t+i>=e}function Rn(e,i,t){let n,s,o;for(n=0,s=e.length;n<s;n++)o=e[n][t],isNaN(o)||(i.min=Math.min(i.min,o),i.max=Math.max(i.max,o))}function gt(e){return e*(N/180)}function zi(e){return e*(180/N)}function zn(e){if(!U(e))return;let i=1,t=0;for(;Math.round(e*i)/i!==e;)i*=10,t++;return t}function Bn(e,i){let t=i.x-e.x,n=i.y-e.y,s=Math.sqrt(t*t+n*n),o=Math.atan2(n,t);return o<-.5*N&&(o+=W),{angle:o,distance:s}}function Li(e,i){return Math.sqrt(Math.pow(i.x-e.x,2)+Math.pow(i.y-e.y,2))}function Ic(e,i){return(e-i+Dc)%W-N}function rt(e){return(e%W+W)%W}function Me(e,i,t,n){let s=rt(e),o=rt(i),r=rt(t),a=rt(o-s),l=rt(r-s),c=rt(s-o),h=rt(s-r);return s===o||s===r||n&&o===r||a>l&&c<h}function G(e,i,t){return Math.max(i,Math.min(t,e))}function Vo(e){return G(e,-32768,32767)}function St(e,i,t,n=1e-6){return e>=Math.min(i,t)-n&&e<=Math.max(i,t)+n}function Bi(e,i,t){t=t||(r=>e[r]<i);let n=e.length-1,s=0,o;for(;n-s>1;)o=s+n>>1,t(o)?s=o:n=o;return{lo:s,hi:n}}var vt=(e,i,t,n)=>Bi(e,t,n?s=>{let o=e[s][i];return o<t||o===t&&e[s+1][i]===t}:s=>e[s][i]<t),jo=(e,i,t)=>Bi(e,t,n=>e[n][i]>=t);function No(e,i,t){let n=0,s=e.length;for(;n<s&&e[n]<i;)n++;for(;s>n&&e[s-1]>t;)s--;return n>0||s<e.length?e.slice(n,s):e}var Wo=["push","pop","shift","splice","unshift"];function Ho(e,i){if(e._chartjs){e._chartjs.listeners.push(i);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[i]}}),Wo.forEach(t=>{let n="_onData"+Ri(t),s=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...o){let r=s.apply(this,o);return e._chartjs.listeners.forEach(a=>{typeof a[n]=="function"&&a[n](...o)}),r}})})}function Vn(e,i){let t=e._chartjs;if(!t)return;let n=t.listeners,s=n.indexOf(i);s!==-1&&n.splice(s,1),!(n.length>0)&&(Wo.forEach(o=>{delete e[o]}),delete e._chartjs)}function jn(e){let i=new Set(e);return i.size===e.length?e:Array.from(i)}var Nn=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function Wn(e,i){let t=[],n=!1;return function(...s){t=s,n||(n=!0,Nn.call(window,()=>{n=!1,e.apply(i,t)}))}}function Yo(e,i){let t;return function(...n){return i?(clearTimeout(t),t=setTimeout(e,i,n)):e.apply(this,n),i}}var Vi=e=>e==="start"?"left":e==="end"?"right":"center",et=(e,i,t)=>e==="start"?i:e==="end"?t:(i+t)/2,$o=(e,i,t,n)=>e===(n?"left":"right")?t:e==="center"?(i+t)/2:i;function Hn(e,i,t){let n=i.length,s=0,o=n;if(e._sorted){let{iScale:r,_parsed:a}=e,l=r.axis,{min:c,max:h,minDefined:d,maxDefined:f}=r.getUserBounds();d&&(s=G(Math.min(vt(a,l,c).lo,t?n:vt(i,l,r.getPixelForValue(c)).lo),0,n-1)),f?o=G(Math.max(vt(a,r.axis,h,!0).hi+1,t?0:vt(i,l,r.getPixelForValue(h),!0).hi+1),s,n)-s:o=n-s}return{start:s,count:o}}function Yn(e){let{xScale:i,yScale:t,_scaleRanges:n}=e,s={xmin:i.min,xmax:i.max,ymin:t.min,ymax:t.max};if(!n)return e._scaleRanges=s,!0;let o=n.xmin!==i.min||n.xmax!==i.max||n.ymin!==t.min||n.ymax!==t.max;return Object.assign(n,s),o}var Ai=e=>e===0||e===1,Co=(e,i,t)=>
vendor: 5,980 bytes, line 1
1-(Math.pow(2,10*(e-=1))*Math.sin((e-i)*W/t)),ko=(e,i,t)=>Math.pow(2,-10*e)*Math.sin((e-i)*W/t)+1,xe={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=>-Math.cos(e*X)+1,easeOutSine:e=>Math.sin(e*X),easeInOutSine:e=>-.5*(Math.cos(N*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Ai(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),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=>Ai(e)?e:Co(e,.075,.3),easeOutElastic:e=>Ai(e)?e:ko(e,.075,.3),easeInOutElastic(e){return Ai(e)?e:e<.5?.5*Co(e*2,.1125,.45):.5+.5*ko(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let i=1.70158;return(e/=.5)<1?.5*(e*e*(((i*=1.525)+1)*e-i)):.5*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)},easeInBounce:e=>1-xe.easeOutBounce(1-e),easeOutBounce(e){return 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?xe.easeInBounce(e*2)*.5:xe.easeOutBounce(e*2-1)*.5+.5};function $n(e){if(e&&typeof e=="object"){let i=e.toString();return i==="[object CanvasPattern]"||i==="[object CanvasGradient]"}return!1}function Un(e){return $n(e)?e:new qe(e)}function Tn(e){return $n(e)?e:new qe(e).saturate(.5).darken(.1).hexString()}var Lc=["x","y","borderWidth","radius","tension"],Fc=["color","borderColor","backgroundColor"];function Rc(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=>i!=="onProgress"&&i!=="onComplete"&&i!=="fn"}),e.set("animations",{colors:{type:"color",properties:Fc},numbers:{type:"number",properties:Lc}}),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=>i|0}}}})}function zc(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var Po=new Map;function Bc(e,i){i=i||{};let t=e+JSON.stringify(i),n=Po.get(t);return n||(n=new Intl.NumberFormat(e,i),Po.set(t,n)),n}function Se(e,i,t){return Bc(i,t).format(e)}var Uo={values(e){return j(e)?e:""+e},numeric(e,i,t){if(e===0)return"0";let n=this.chart.options.locale,s,o=e;if(t.length>1){let c=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),o=Vc(e,t)}let r=Lt(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Se(e,n,l)},logarithmic(e,i,t){if(e===0)return"0";let n=t[i].significand||e/Math.pow(10,Math.floor(Lt(e)));return[1,2,3,5,10,15].includes(n)||i>.8*t.length?Uo.numeric.call(this,e,i,t):""}};function Vc(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}var Qe={formatters:Uo};function jc(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:Qe.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")&&i!=="callback"&&i!=="parser",_indexable:i=>i!=="borderDash"&&i!=="tickBorderDash"&&i!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:i=>i!=="backdropPadding"&&i!=="callback",_indexable:i=>i!=="backdropPadding"})}var Yt=Object.create(null),ji=Object.create(null);function Ge(e,i){if(!i)return e;let t=i.split(".");for(let n=0,s=t.length;n<s;++n){let o=t[n];e=e[o]||(e[o]=Object.create(null))}return e}function Dn(e,i,t){return typeof i=="string"?be(Ge(e,i),t):be(Ge(e,""),i)}var En=class{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=n=>n.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,s)=>Tn(s.backgroundColor),this.hoverBorderColor=(n,s)=>Tn(s.borderColor),this.hoverColor=(n,s)=>Tn(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={}
vendor: 5,045 bytes, line 1
1,this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(i),this.apply(t)}set(i,t){return Dn(this,i,t)}get(i){return Ge(this,i)}describe(i,t){return Dn(ji,i,t)}override(i,t){return Dn(Yt,i,t)}route(i,t,n,s){let o=Ge(this,i),r=Ge(this,n),a="_"+t;Object.defineProperties(o,{[a]:{value:o[t],writable:!0},[t]:{enumerable:!0,get(){let l=this[a],c=r[s];return I(l)?Object.assign({},c,l):T(l,c)},set(l){this[a]=l}}})}apply(i){i.forEach(t=>t(this))}},H=new En({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Rc,zc,jc]);function Nc(e){return!e||R(e.size)||R(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Ze(e,i,t,n,s){let o=i[s];return o||(o=i[s]=e.measureText(s).width,t.push(s)),o>n&&(n=o),n}function Xo(e,i,t,n){n=n||{};let s=n.data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==i&&(s=n.data={},o=n.garbageCollect=[],n.font=i),e.save(),e.font=i;let r=0,a=t.length,l,c,h,d,f;for(l=0;l<a;l++)if(d=t[l],d!=null&&!j(d))r=Ze(e,s,o,r,d);else if(j(d))for(c=0,h=d.length;c<h;c++)f=d[c],f!=null&&!j(f)&&(r=Ze(e,s,o,r,f));e.restore();let u=o.length/2;if(u>t.length){for(l=0;l<u;l++)delete s[o[l]];o.splice(0,u)}return r}function $t(e,i,t){let n=e.currentDevicePixelRatio,s=t!==0?Math.max(t/2,.5):0;return Math.round((i-s)*n)/n+s}function Xn(e,i){!i&&!e||(i=i||e.getContext("2d"),i.save(),i.resetTransform(),i.clearRect(0,0,e.width,e.height),i.restore())}function Ni(e,i,t,n){qn(e,i,t,n,null)}function qn(e,i,t,n,s){let o,r,a,l,c,h,d,f,u=i.pointStyle,p=i.rotation,m=i.radius,g=(p||0)*Ec;if(u&&typeof u=="object"&&(o=u.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){e.save(),e.translate(t,n),e.rotate(g),e.drawImage(u,-u.width/2,-u.height/2,u.width,u.height),e.restore();return}if(!(isNaN(m)||m<=0)){switch(e.beginPath(),u){default:s?e.ellipse(t,n,s/2,m,0,0,W):e.arc(t,n,m,0,W),e.closePath();break;case"triangle":h=s?s/2:m,e.moveTo(t+Math.sin(g)*h,n-Math.cos(g)*m),g+=So,e.lineTo(t+Math.sin(g)*h,n-Math.cos(g)*m),g+=So,e.lineTo(t+Math.sin(g)*h,n-Math.cos(g)*m),e.closePath();break;case"rectRounded":c=m*.516,l=m-c,r=Math.cos(g+se)*l,d=Math.cos(g+se)*(s?s/2-c:l),a=Math.sin(g+se)*l,f=Math.sin(g+se)*(s?s/2-c:l),e.arc(t-d,n-a,c,g-N,g-X),e.arc(t+f,n-r,c,g-X,g),e.arc(t+d,n+a,c,g,g+X),e.arc(t-f,n+r,c,g+X,g+N),e.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*m,h=s?s/2:l,e.rect(t-h,n-l,2*h,2*l);break}g+=se;case"rectRot":d=Math.cos(g)*(s?s/2:m),r=Math.cos(g)*m,a=Math.sin(g)*m,f=Math.sin(g)*(s?s/2:m),e.moveTo(t-d,n-a),e.lineTo(t+f,n-r),e.lineTo(t+d,n+a),e.lineTo(t-f,n+r),e.closePath();break;case"crossRot":g+=se;case"cross":d=Math.cos(g)*(s?s/2:m),r=Math.cos(g)*m,a=Math.sin(g)*m,f=Math.sin(g)*(s?s/2:m),e.moveTo(t-d,n-a),e.lineTo(t+d,n+a),e.moveTo(t+f,n-r),e.lineTo(t-f,n+r);break;case"star":d=Math.cos(g)*(s?s/2:m),r=Math.cos(g)*m,a=Math.sin(g)*m,f=Math.sin(g)*(s?s/2:m),e.moveTo(t-d,n-a),e.lineTo(t+d,n+a),e.moveTo(t+f,n-r),e.lineTo(t-f,n+r),g+=se,d=Math.cos(g)*(s?s/2:m),r=Math.cos(g)*m,a=Math.sin(g)*m,f=Math.sin(g)*(s?s/2:m),e.moveTo(t-d,n-a),e.lineTo(t+d,n+a),e.moveTo(t+f,n-r),e.lineTo(t-f,n+r);break;case"line":r=s?s/2:Math.cos(g)*m,a=Math.sin(g)*m,e.moveTo(t-r,n-a),e.lineTo(t+r,n+a);break;case"dash":e.moveTo(t,n),e.lineTo(t+Math.cos(g)*(s?s/2:m),n+Math.sin(g)*m);break;case!1:e.closePath();break}e.fill(),i.borderWidth>0&&e.stroke()}}function wt(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 ti(e,i){e.save(),e.beginPath(),e.rect(i.left,i.top,i.right-i.left,i.bottom-i.top),e.clip()}function ei(e){e.restore()}function qo(e,i,t,n,s){if(!i)return e.lineTo(t.x,t.y);if(s==="middle"){let o=(i.x+t.x)/2;e.lineTo(o,i.y),e.lineTo(o,t.y)}else s==="after"!=!!n?e.lineTo(i.x,t.y):e.lineTo(t.x,i.y);e.lineTo(t.x,t.y)}function Ko(e,i,t,n){if(!i)return e.lineTo(t.x,t.y);e.bezierCurveTo(n?i.cp1x:i.cp2x,n?i.cp1y:i.cp2y,n?t.cp2x:t.cp1x,n?t.cp2y:t.cp1y,t.x,t.y)}function Wc(e,i){i.translation&&e.translate(i.translation[0],i.translation[1]),R(i.rotation)||e.rotate(i.rotation),i.color&&(e.fillStyle=i.color),i.textAlign&&(e.textAlign=i.textAlign),i.textBaseline&&(e.textBaseline=i.textBaseline)}function Hc(e,i,t,n,s){if(s.strikethrough||s.underline){let o=e.measureText(n),r=i-o.actualBoundingBoxLeft,a=i+o.actualBoundingBoxRight,l=t-o.actualBoundingBoxAscent,c=t+o.actualBoundingBoxDescent,h=s.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=s.decorationWidth||2,e.moveTo(r,h),e.lineTo(a,h),e.stroke()}}function Yc(e,i){let t=e.fillStyle;e.fillStyle=i.color,e.fillRect(i.left,i.top,i.width,i.height),e.fillStyle=t}function Ut(e,i,t,n,s,o={}){let r=j(i)?i:[i],a=o.strokeWidth>0&&o.strokeColor!=="",l,c;for(e.save(),e.font=s.string,Wc(e,o),l=0;l<r.length;++l)c=r[l],o.backdrop&&Yc(e,o.backdrop),a&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),R(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(c,t,n,o.maxWidth)),e.fillText(c,t,n,o.maxWidth),Hc(e,t,n,c,o),n+=Number(s.lineHeight);
vendor: 5,096 bytes, line 1
1e.restore()}function Ce(e,i){let{x:t,y:n,w:s,h:o,radius:r}=i;e.arc(t+r.topLeft,n+r.topLeft,r.topLeft,1.5*N,N,!0),e.lineTo(t,n+o-r.bottomLeft),e.arc(t+r.bottomLeft,n+o-r.bottomLeft,r.bottomLeft,N,X,!0),e.lineTo(t+s-r.bottomRight,n+o),e.arc(t+s-r.bottomRight,n+o-r.bottomRight,r.bottomRight,X,0,!0),e.lineTo(t+s,n+r.topRight),e.arc(t+s-r.topRight,n+r.topRight,r.topRight,0,-X,!0),e.lineTo(t+r.topLeft,n)}var $c=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Uc=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Xc(e,i){let t=(""+e).match($c);if(!t||t[1]==="normal")return i*1.2;switch(e=+t[2],t[3]){case"px":return e;case"%":e/=100;break}return i*e}var qc=e=>+e||0;function Wi(e,i){let t={},n=I(i),s=n?Object.keys(i):i,o=I(e)?n?r=>T(e[r],e[i[r]]):r=>e[r]:()=>e;for(let r of s)t[r]=qc(o(r));return t}function Kn(e){return Wi(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Xt(e){return Wi(e,["topLeft","topRight","bottomLeft","bottomRight"])}function it(e){let i=Kn(e);return i.width=i.left+i.right,i.height=i.top+i.bottom,i}function K(e,i){e=e||{},i=i||H.font;let t=T(e.size,i.size);typeof t=="string"&&(t=parseInt(t,10));let n=T(e.style,i.style);n&&!(""+n).match(Uc)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);let s={family:T(e.family,i.family),lineHeight:Xc(T(e.lineHeight,i.lineHeight),t),size:t,style:n,weight:T(e.weight,i.weight),string:""};return s.string=Nc(s),s}function ke(e,i,t,n){let s=!0,o,r,a;for(o=0,r=e.length;o<r;++o)if(a=e[o],a!==void 0&&(i!==void 0&&typeof a=="function"&&(a=a(i),s=!1),t!==void 0&&j(a)&&(a=a[t%a.length],s=!1),a!==void 0))return n&&!s&&(n.cacheable=!1),a}function Go(e,i,t){let{min:n,max:s}=e,o=In(i,(s-n)/2),r=(a,l)=>t&&a===0?0:a+l;return{min:r(n,-Math.abs(o)),max:r(s,o)}}function Rt(e,i){return Object.assign(Object.create(e),i)}function Hi(e,i=[""],t,n,s=()=>e[0]){let o=t||e;typeof n>"u"&&(n=Qo("_fallback",e));let r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:n,_getTarget:s,override:a=>Hi([a,...e],i,o,n)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return Zo(a,l,()=>ih(l,i,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return Ao(a).includes(l)},ownKeys(a){return Ao(a)},set(a,l,c){let h=a._storage||(a._storage=s());return a[l]=h[l]=c,delete a._keys,!0}})}function re(e,i,t,n){let s={_cacheable:!1,_proxy:e,_context:i,_subProxy:t,_stack:new Set,_descriptors:Gn(e,n),setContext:o=>re(e,o,t,n),override:o=>re(e.override(o),i,t,n)};return new Proxy(s,{deleteProperty(o,r){return delete o[r],delete e[r],!0},get(o,r,a){return Zo(o,r,()=>Gc(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(e,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,r)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,r){return Reflect.has(e,r)},ownKeys(){return Reflect.ownKeys(e)},set(o,r,a){return e[r]=a,delete o[r],!0}})}function Gn(e,i={scriptable:!0,indexable:!0}){let{_scriptable:t=i.scriptable,_indexable:n=i.indexable,_allKeys:s=i.allKeys}=e;return{allKeys:s,scriptable:t,indexable:n,isScriptable:It(t)?t:()=>t,isIndexable:It(n)?n:()=>n}}var Kc=(e,i)=>e?e+Ri(i):i,Zn=(e,i)=>I(i)&&e!=="adapters"&&(Object.getPrototypeOf(i)===null||i.constructor===Object);function Zo(e,i,t){if(Object.prototype.hasOwnProperty.call(e,i)||i==="constructor")return e[i];let n=t();return e[i]=n,n}function Gc(e,i,t){let{_proxy:n,_context:s,_subProxy:o,_descriptors:r}=e,a=n[i];return It(a)&&r.isScriptable(i)&&(a=Zc(i,a,e,t)),j(a)&&a.length&&(a=Jc(i,a,e,r.isIndexable)),Zn(i,a)&&(a=re(a,s,o&&o[i],r)),a}function Zc(e,i,t,n){let{_proxy:s,_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||n);return a.delete(e),Zn(e,l)&&(l=Jn(s._scopes,s,e,l)),l}function Jc(e,i,t,n){let{_proxy:s,_context:o,_subProxy:r,_descriptors:a}=t;if(typeof o.index<"u"&&n(e))return i[o.index%i.length];if(I(i[0])){let l=i,c=s._scopes.filter(h=>h!==l);i=[];for(let h of l){let d=Jn(c,s,e,h);i.push(re(d,o,r&&r[e],a))}}return i}function Jo(e,i,t){return It(e)?e(i,t):e}var Qc=(e,i)=>e===!0?i:typeof e=="string"?Ft(i,e):void 0;function th(e,i,t,n,s){for(let o of i){let r=Qc(t,o);if(r){e.add(r);let a=Jo(r._fallback,t,s);if(typeof a<"u"&&a!==t&&a!==n)return a}else if(r===!1&&typeof n<"u"&&t!==n)return null}return!1}function Jn(e,i,t,n){let s=i._rootScopes,o=Jo(i._fallback,t,n),r=[...e,...s],a=new Set;a.add(n);let l=Oo(a,r,t,o||t,n);return l===null||typeof o<"u"&&o!==t&&(l=Oo(a,r,o,l,n),l===null)?!1:Hi(Array.from(a),[""],s,o,()=>eh(i,t,n))}function Oo(e,i,t,n,s){for(;t;)t=th(e,i,t,n,s);return t}function eh(e,i,t){let n=e._getTarget();i in n||(n[i]={});let s=n[i];return j(s)&&I(t)?t:s||{}}function ih(e,i,t,n){let s;for(let o of i)if(s=Qo(Kc(o,e),t),typeof s<"u")return Zn(e,s)?Jn(t,n,e,s):s}function Qo(e,i){for(let t of i){if(!t)continue;let n=t[e];if(typeof n<"u")return n}}function Ao(e){let i=e._keys;
1return i||(i=e._keys=nh(e._scopes)),i}function nh(e){let i=new Set;for(let t of e)for(let n of Object.keys(t).filter(s=>!s.startsWith("_")))i.add(n);return Array.from(i)}function Qn(e,i,t,n){let{iScale:s}=e,{key:o="r"}=this._parsing,r=new Array(n),a,l,c,h;for(a=0,l=n;a<l;++a)c=a+t,h=i[c],r[a]={r:s.parse(Ft(h,o),c)};return r}var sh=Number.EPSILON||1e-14,_e=(e,i)=>i<e.length&&!e[i].skip&&e[i],tr=e=>e==="x"?"y":"x";function oh(e,i,t,n){let s=e.skip?i:e,o=i,r=t.skip?i:t,a=Li(o,s),l=Li(r,o),c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;let d=n*c,f=n*h;return{previous:{x:o.x-d*(r.x-s.x),y:o.y-d*(r.y-s.y)},next:{x:o.x+f*(r.x-s.x),y:o.y+f*(r.y-s.y)}}}function rh(e,i,t){let n=e.length,s,o,r,a,l,c=_e(e,0);for(let h=0;h<n-1;++h)if(l=c,c=_e(e,h+1),!(!l||!c)){if(we(i[h],0,sh)){t[h]=t[h+1]=0;continue}s=t[h]/i[h],o=t[h+1]/i[h],a=Math.pow(s,2)+Math.pow(o,2),!(a<=9)&&(r=3/Math.sqrt(a),t[h]=s*r*i[h],t[h+1]=o*r*i[h])}}function ah(e,i,t="x"){let n=tr(t),s=e.length,o,r,a,l=_e(e,0);for(let c=0;c<s;++c){if(r=a,a=l,l=_e(e,c+1),!a)continue;let h=a[t],d=a[n];r&&(o=(h-r[t])/3,a["cp1".concat(t)]=h-o,a["cp1".concat(n)]=d-o*i[c]),l&&(o=(l[t]-h)/3,a["cp2".concat(t)]=h+o,a["cp2".concat(n)]=d+o*i[c])}}function lh(e,i="x"){let t=tr(i),n=e.length,s=Array(n).fill(0),o=Array(n),r,a,l,c=_e(e,0);for(r=0;r<n;++r)if(a=l,l=c,c=_e(e,r+1),!!l){if(c){let h=c[i]-l[i];s[r]=h!==0?(c[t]-l[t])/h:0}o[r]=a?c?yt(s[r-1])!==yt(s[r])?0:(s[r-1]+s[r])/2:s[r-1]:s[r]}rh(e,s,o),ah(e,o,i)}function Ti(e,i,t){return Math.max(Math.min(e,t),i)}function ch(e,i){let t,n,s,o,r,a=wt(e[0],i);for(t=0,n=e.length;t<n;++t)r=o,o=a,a=t<n-1&&wt(e[t+1],i),o&&(s=e[t],r&&(s.cp1x=Ti(s.cp1x,i.left,i.right),s.cp1y=Ti(s.cp1y,i.top,i.bottom)),a&&(s.cp2x=Ti(s.cp2x,i.left,i.right),s.cp2y=Ti(s.cp2y,i.top,i.bottom)))}function er(e,i,t,n,s){let o,r,a,l;if(i.spanGaps&&(e=e.filter(c=>!c.skip)),i.cubicInterpolationMode==="monotone")lh(e,s);else{let c=n?e[e.length-1]:e[0];for(o=0,r=e.length;o<r;++o)a=e[o],l=oh(c,a,e[Math.min(o+1,r-(n?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&&ch(e,t)}function Yi(){return typeof window<"u"&&typeof document<"u"}function $i(e){let i=e.parentNode;return i&&i.toString()==="[object ShadowRoot]"&&(i=i.host),i}function Fi(e,i,t){let n;return typeof e=="string"?(n=parseInt(e,10),e.indexOf("%")!==-1&&(n=n/100*i.parentNode[t])):n=e,n}var Ui=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function hh(e,i){return Ui(e).getPropertyValue(i)}var dh=["top","right","bottom","left"];function oe(e,i,t){let n={};t=t?"-"+t:"";for(let s=0;s<4;s++){let o=dh[s];n[o]=parseFloat(e[i+"-"+o+t])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}var fh=(e,i,t)=>(e>0||i>0)&&(!t||!t.shadowRoot);function uh(e,i){let t=e.touches,n=t&&t.length?t[0]:e,{offsetX:s,offsetY:o}=n,r=!1,a,l;if(fh(s,o,e.target))a=s,l=o;else{let c=i.getBoundingClientRect();a=n.clientX-c.left,l=n.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function qt(e,i){if("native"in e)return e;let{canvas:t,currentDevicePixelRatio:n}=i,s=Ui(t),o=s.boxSizing==="border-box",r=oe(s,"padding"),a=oe(s,"border","width"),{x:l,y:c,box:h}=uh(e,t),d=r.left+(h&&a.left),f=r.top+(h&&a.top),{width:u,height:p}=i;return o&&(u-=r.width+a.width,p-=r.height+a.height),{x:Math.round((l-d)/u*t.width/n),y:Math.round((c-f)/p*t.height/n)}}function ph(e,i,t){let n,s;if(i===void 0||t===void 0){let o=e&&$i(e);if(!o)i=e.clientWidth,t=e.clientHeight;else{let r=o.getBoundingClientRect(),a=Ui(o),l=oe(a,"border","width"),c=oe(a,"padding");i=r.width-c.width-l.width,t=r.height-c.height-l.height,n=Fi(a.maxWidth,o,"clientWidth"),s=Fi(a.maxHeight,o,"clientHeight")}}return{width:i,height:t,maxWidth:n||Ii,maxHeight:s||Ii}}var Di=e=>Math.round(e*10)/10;function ir(e,i,t,n){let s=Ui(e),o=oe(s,"margin"),r=Fi(s.maxWidth,e,"clientWidth")||Ii,a=Fi(s.maxHeight,e,"clientHeight")||Ii,l=ph(e,i,t),{width:c,height:h}=l;if(s.boxSizing==="content-box"){let f=oe(s,"border","width"),u=oe(s,"padding");c-=u.width+f.width,h-=u.height+f.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?c/n:h-o.height),c=Di(Math.min(c,r,l.maxWidth)),h=Di(Math.min(h,a,l.maxHeight)),c&&!h&&(h=Di(c/2)),(i!==void 0||t!==void 0)&&n&&l.height&&h>l.height&&(h=l.height,c=Di(Math.floor(h*n))),{width:c,height:h}}function ts(e,i,t){let n=i||1,s=Math.floor(e.height*n),o=Math.floor(e.width*n);e.height=Math.floor(e.height),e.width=Math.floor(e.width);let r=e.canvas;return r.style&&(t||!r.style.height&&!r.style.width)&&(r.style.height="".concat(e.height,"px"),r.style.width="".concat(e.width,"px")),e.currentDevicePixelRatio!==n||r.height!==s||r.width!==o?(e.currentDevicePixelRatio=n,r.height=s,r.width=o,e.ctx.setTransform(n,0,0,n,0,0),!0):!1}var nr=function(){let e=!1;
vendor: 4,277 bytes, line 1
1try{let i={get passive(){return e=!0,!1}};Yi()&&(window.addEventListener("test",null,i),window.removeEventListener("test",null,i))}catch{}return e}();function es(e,i){let t=hh(e,i),n=t&&t.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Ht(e,i,t,n){return{x:e.x+t*(i.x-e.x),y:e.y+t*(i.y-e.y)}}function sr(e,i,t,n){return{x:e.x+t*(i.x-e.x),y:n==="middle"?t<.5?e.y:i.y:n==="after"?t<1?e.y:i.y:t>0?i.y:e.y}}function or(e,i,t,n){let s={x:e.cp2x,y:e.cp2y},o={x:i.cp1x,y:i.cp1y},r=Ht(e,s,t),a=Ht(s,o,t),l=Ht(o,i,t),c=Ht(r,a,t),h=Ht(a,l,t);return Ht(c,h,t)}var mh=function(e,i){return{x(t){return e+e+i-t},setWidth(t){i=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,n){return t-n},leftForLtr(t,n){return t-n}}},gh=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,i){return e+i},leftForLtr(e,i){return e}}};function le(e,i,t){return e?mh(i,t):gh()}function is(e,i){let t,n;(i==="ltr"||i==="rtl")&&(t=e.canvas.style,n=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",i,"important"),e.prevTextDirection=n)}function ns(e,i){i!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",i[0],i[1]))}function rr(e){return e==="angle"?{between:Me,compare:Ic,normalize:rt}:{between:St,compare:(i,t)=>i-t,normalize:i=>i}}function To({start:e,end:i,count:t,loop:n,style:s}){return{start:e%t,end:i%t,loop:n&&(i-e+1)%t===0,style:s}}function xh(e,i,t){let{property:n,start:s,end:o}=t,{between:r,normalize:a}=rr(n),l=i.length,{start:c,end:h,loop:d}=e,f,u;if(d){for(c+=l,h+=l,f=0,u=l;f<u&&r(a(i[c%l][n]),s,o);++f)c--,h--;c%=l,h%=l}return h<c&&(h+=l),{start:c,end:h,loop:d,style:e.style}}function ss(e,i,t){if(!t)return[e];let{property:n,start:s,end:o}=t,r=i.length,{compare:a,between:l,normalize:c}=rr(n),{start:h,end:d,loop:f,style:u}=xh(e,i,t),p=[],m=!1,g=null,x,b,y,w=()=>l(s,y,x)&&a(s,y)!==0,_=()=>a(o,x)===0||l(o,y,x),v=()=>m||w(),k=()=>!m||_();for(let M=h,A=h;M<=d;++M)b=i[M%r],!b.skip&&(x=c(b[n]),x!==y&&(m=l(x,s,o),g===null&&v()&&(g=a(x,s)===0?M:A),g!==null&&k()&&(p.push(To({start:g,end:M,loop:f,count:r,style:u})),g=null),A=M,y=x));return g!==null&&p.push(To({start:g,end:d,loop:f,count:r,style:u})),p}function os(e,i){let t=[],n=e.segments;for(let s=0;s<n.length;s++){let o=ss(n[s],e.points,i);o.length&&t.push(...o)}return t}function bh(e,i,t,n){let s=0,o=i-1;if(t&&!n)for(;s<i&&!e[s].skip;)s++;for(;s<i&&e[s].skip;)s++;for(s%=i,t&&(o+=s);o>s&&e[o%i].skip;)o--;return o%=i,{start:s,end:o}}function _h(e,i,t,n){let s=e.length,o=[],r=i,a=e[i],l;for(l=i+1;l<=t;++l){let c=e[l%s];c.skip||c.stop?a.skip||(n=!1,o.push({start:i%s,end:(l-1)%s,loop:n}),i=r=c.stop?l:null):(r=l,a.skip&&(i=l)),a=c}return r!==null&&o.push({start:i%s,end:r%s,loop:n}),o}function ar(e,i){let t=e.points,n=e.options.spanGaps,s=t.length;if(!s)return[];let o=!!e._loop,{start:r,end:a}=bh(t,s,o,n);if(n===!0)return Do(e,[{start:r,end:a,loop:o}],t,i);let l=a<r?a+s:a,c=!!e._fullLoop&&r===0&&a===s-1;return Do(e,_h(t,r,l,c),t,i)}function Do(e,i,t,n){return!n||!n.setContext||!t?i:yh(e,i,t,n)}function yh(e,i,t,n){let s=e._chart.getContext(),o=Eo(e.options),{_datasetIndex:r,options:{spanGaps:a}}=e,l=t.length,c=[],h=o,d=i[0].start,f=d;function u(p,m,g,x){let b=a?-1:1;if(p!==m){for(p+=l;t[p%l].skip;)p-=b;for(;t[m%l].skip;)m+=b;p%l!==m%l&&(c.push({start:p%l,end:m%l,loop:g,style:x}),h=x,d=m%l)}}for(let p of i){d=a?d:p.start;let m=t[d%l],g;for(f=d+1;f<=p.end;f++){let x=t[f%l];g=Eo(n.setContext(Rt(s,{type:"segment",p0:m,p1:x,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:r}))),vh(g,h)&&u(d,f-1,p.loop,h),m=x,h=g}d<f-1&&u(d,f-1,p.loop,h)}return c}function Eo(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function vh(e,i){if(!i)return!1;let t=[],n=function(s,o){return $n(o)?(t.includes(o)||t.push(o),t.indexOf(o)):o};return JSON.stringify(e,n)!==JSON.stringify(i,n)}var ms=class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(i,t,n,s){let o=t.listeners[s],r=t.duration;o.forEach(a=>a({chart:i,initial:t.initial,numSteps:r,currentStep:Math.min(n-t.start,r)}))}
vendor: 14,149 bytes, line 1
1_refresh(){this._request||(this._running=!0,this._request=Nn.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(i=Date.now()){let t=0;this._charts.forEach((n,s)=>{if(!n.running||!n.items.length)return;let o=n.items,r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(i),a=!0):(o[r]=o[o.length-1],o.pop());a&&(s.draw(),this._notify(s,n,i,"progress")),o.length||(n.running=!1,this._notify(s,n,i,"complete"),n.initial=!1),t+=o.length}),this._lastDate=i,t===0&&(this._running=!1)}_getAnims(i){let t=this._charts,n=t.get(i);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(i,n)),n}listen(i,t,n){this._getAnims(i).listeners[t].push(n)}add(i,t){!t||!t.length||this._getAnims(i).items.push(...t)}has(i){return this._getAnims(i).items.length>0}start(i){let t=this._charts.get(i);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((n,s)=>Math.max(n,s._duration),0),this._refresh())}running(i){if(!this._running)return!1;let t=this._charts.get(i);return!(!t||!t.running||!t.items.length)}stop(i){let t=this._charts.get(i);if(!t||!t.items.length)return;let n=t.items,s=n.length-1;for(;s>=0;--s)n[s].cancel();t.items=[],this._notify(i,t,Date.now(),"complete")}remove(i){return this._charts.delete(i)}},zt=new ms,lr="transparent",wh={boolean(e,i,t){return t>.5?i:e},color(e,i,t){let n=Un(e||lr),s=n.valid&&Un(i||lr);return s&&s.valid?s.mix(n,t).hexString():i},number(e,i,t){return e+(i-e)*t}},gs=class{constructor(i,t,n,s){let o=t[n];s=ke([i.to,s,o,i.from]);let r=ke([i.from,o,s]);this._active=!0,this._fn=i.fn||wh[i.type||typeof r],this._easing=xe[i.easing]||xe.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=n,this._from=r,this._to=s,this._promises=void 0}active(){return this._active}update(i,t,n){if(this._active){this._notify(!1);let s=this._target[this._prop],o=n-this._start,r=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(r,i.duration)),this._total+=o,this._loop=!!i.loop,this._to=ke([i.to,t,s,i.from]),this._from=ke([i.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(i){let t=i-this._start,n=this._duration,s=this._prop,o=this._from,r=this._loop,a=this._to,l;if(this._active=o!==a&&(r||t<n),!this._active){this._target[s]=a,this._notify(!0);return}if(t<0){this._target[s]=o;return}l=t/n%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,a,l)}wait(){let i=this._promises||(this._promises=[]);return new Promise((t,n)=>{i.push({res:t,rej:n})})}_notify(i){let t=i?"res":"rej",n=this._promises||[];for(let s=0;s<n.length;s++)n[s][t]()}},nn=class{constructor(i,t){this._chart=i,this._properties=new Map,this.configure(t)}configure(i){if(!I(i))return;let t=Object.keys(H.animation),n=this._properties;Object.getOwnPropertyNames(i).forEach(s=>{let o=i[s];if(!I(o))return;let r={};for(let a of t)r[a]=o[a];(j(o.properties)&&o.properties||[s]).forEach(a=>{(a===s||!n.has(a))&&n.set(a,r)})})}_animateOptions(i,t){let n=t.options,s=Sh(i,n);if(!s)return[];let o=this._createAnimations(s,n);return n.$shared&&Mh(i.options.$animations,n).then(()=>{i.options=n},()=>{}),o}_createAnimations(i,t){let n=this._properties,s=[],o=i.$animations||(i.$animations={}),r=Object.keys(t),a=Date.now(),l;for(l=r.length-1;l>=0;--l){let c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(i,t));continue}let h=t[c],d=o[c],f=n.get(c);if(d)if(f&&d.active()){d.update(f,h,a);continue}else d.cancel();if(!f||!f.duration){i[c]=h;continue}o[c]=d=new gs(f,i,c,h),s.push(d)}return s}update(i,t){if(this._properties.size===0){Object.assign(i,t);return}let n=this._createAnimations(i,t);if(n.length)return zt.add(this._chart,n),!0}};function Mh(e,i){let t=[],n=Object.keys(i);for(let s=0;s<n.length;s++){let o=e[n[s]];o&&o.active()&&t.push(o.wait())}return Promise.all(t)}function Sh(e,i){if(!i)return;let t=e.options;if(!t){e.options=i;return}return t.$shared&&(e.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t}function cr(e,i){let t=e&&e.options||{},n=t.reverse,s=t.min===void 0?i:0,o=t.max===void 0?i:0;return{start:n?o:s,end:n?s:o}}function Ch(e,i,t){if(t===!1)return!1;let n=cr(e,t),s=cr(i,t);return{top:s.end,right:n.end,bottom:s.start,left:n.start}}function kh(e){let i,t,n,s;return I(e)?(i=e.top,t=e.right,n=e.bottom,s=e.left):i=t=n=s=e,{top:i,right:t,bottom:n,left:s,disabled:e===!1}}function ca(e,i){let t=[],n=e._getSortedDatasetMetas(i),s,o;for(s=0,o=n.length;s<o;++s)t.push(n[s].index);return t}function hr(e,i,t,n={}){let s=e.keys,o=n.mode==="single",r,a,l,c;if(i!==null){for(r=0,a=s.length;r<a;++r){if(l=+s[r],l===t){if(n.all)continue;break}c=e.values[l],U(c)&&(o||i===0||yt(i)===yt(c))&&(i+=c)}return i}}function Ph(e,i){let{iScale:t,vScale:n}=i,s=t.axis==="x"?"x":"y",o=n.axis==="x"?"x":"y",r=Object.keys(e),a=new Array(r.length),l,c,h;for(l=0,c=r.length;l<c;++l)h=r[l],a[l]={[s]:h,[o]:e[h]};return a}function dr(e,i){let t=e&&e.options.stacked;return t||t===void 0&&i.stack!==void 0}function Oh(e,i,t){return"".concat(e.id,".").concat(i.id,".").concat(t.stack||t.type)}function Ah(e){let{min:i,max:t,minDefined:n,maxDefined:s}=e.getUserBounds();return{min:n?i:Number.NEGATIVE_INFINITY,max:s?t:Number.POSITIVE_INFINITY}}function Th(e,i,t){let n=e[i]||(e[i]={});return n[t]||(n[t]={})}function fr(e,i,t,n){for(let s of i.getMatchingVisibleMetas(n).reverse()){let o=e[s.index];if(t&&o>0||!t&&o<0)return s.index}return null}function ur(e,i){let{chart:t,_cachedMeta:n}=e,s=t._stacks||(t._stacks={}),{iScale:o,vScale:r,index:a}=n,l=o.axis,c=r.axis,h=Oh(o,r,n),d=i.length,f;for(let u=0;u<d;++u){let p=i[u],{[l]:m,[c]:g}=p,x=p._stacks||(p._stacks={});f=x[c]=Th(s,h,m),f[a]=g,f._top=fr(f,r,!0,n.type),f._bottom=fr(f,r,!1,n.type);let b=f._visualValues||(f._visualValues={});b[a]=g}}function rs(e,i){let t=e.scales;return Object.keys(t).filter(n=>t[n].axis===i).shift()}function Dh(e,i){return Rt(e,{active:!1,dataset:void 0,datasetIndex:i,index:i,mode:"default",type:"dataset"})}function Eh(e,i,t){return Rt(e,{active:!1,dataIndex:i,parsed:void 0,raw:void 0,element:t,index:i,mode:"default",type:"data"})}function ii(e,i){let t=e.controller.index,n=e.vScale&&e.vScale.axis;if(n){i=i||e._parsed;for(let s of i){let o=s._stacks;if(!o||o[n]===void 0||o[n][t]===void 0)return;delete o[n][t],o[n]._visualValues!==void 0&&o[n]._visualValues[t]!==void 0&&delete o[n]._visualValues[t]}}}var as=e=>e==="reset"||e==="none",pr=(e,i)=>i?e:Object.assign({},e),Ih=(e,i,t)=>e&&!i.hidden&&i._stacked&&{keys:ca(t,!0),values:null},Gt=(()=>{class e{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=dr(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&&ii(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,n=this._cachedMeta,s=this.getDataset(),o=(f,u,p,m)=>f==="x"?u:f==="r"?m:p,r=n.xAxisID=T(s.xAxisID,rs(t,"x")),a=n.yAxisID=T(s.yAxisID,rs(t,"y")),l=n.rAxisID=T(s.rAxisID,rs(t,"r")),c=n.indexAxis,h=n.iAxisID=o(c,r,a,l),d=n.vAxisID=o(c,a,r,l);n.xScale=this.getScaleForId(r),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(h),n.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&Vn(this._data,this),t._stacked&&ii(t)}_dataCheck(){let t=this.getDataset(),n=t.data||(t.data=[]),s=this._data;if(I(n)){let o=this._cachedMeta;this._data=Ph(n,o)}else if(s!==n){if(s){Vn(s,this);let o=this._cachedMeta;ii(o),o._parsed=[]}n&&Object.isExtensible(n)&&Ho(n,this),this._syncList=[],this._data=n}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let n=this._cachedMeta,s=this.getDataset(),o=!1;this._dataCheck();let r=n._stacked;n._stacked=dr(n.vScale,n),n.stack!==s.stack&&(o=!0,ii(n),n.stack=s.stack),this._resyncElements(t),(o||r!==n._stacked)&&ur(this,n._parsed)}configure(){let t=this.chart.config,n=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){let{_cachedMeta:s,_data:o}=this,{iScale:r,_stacked:a}=s,l=r.axis,c=t===0&&n===o.length?!0:s._sorted,h=t>0&&s._parsed[t-1],d,f,u;if(this._parsing===!1)s._parsed=o,s._sorted=!0,u=o;else{j(o[t])?u=this.parseArrayData(s,o,t,n):I(o[t])?u=this.parseObjectData(s,o,t,n):u=this.parsePrimitiveData(s,o,t,n);let p=()=>f[l]===null||h&&f[l]<h[l];for(d=0;d<n;++d)s._parsed[d+t]=f=u[d],c&&(p()&&(c=!1),h=f);s._sorted=c}a&&ur(this,u)}parsePrimitiveData(t,n,s,o){let{iScale:r,vScale:a}=t,l=r.axis,c=a.axis,h=r.getLabels(),d=r===a,f=new Array(o),u,p,m;for(u=0,p=o;u<p;++u)m=u+s,f[u]={[l]:d||r.parse(h[m],m),[c]:a.parse(n[m],m)};return f}parseArrayData(t,n,s,o){let{xScale:r,yScale:a}=t,l=new Array(o),c,h,d,f;for(c=0,h=o;c<h;++c)d=c+s,f=n[d],l[c]={x:r.parse(f[0],d),y:a.parse(f[1],d)};return l}parseObjectData(t,n,s,o){let{xScale:r,yScale:a}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,h=new Array(o),d,f,u,p;for(d=0,f=o;d<f;++d)u=d+s,p=n[u],h[d]={x:r.parse(Ft(p,l),u),y:a.parse(Ft(p,c),u)};return h}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,s){let o=this.chart,r=this._cachedMeta,a=n[t.axis],l={keys:ca(o,!0),values:n._stacks[t.axis]._visualValues};return hr(l,a,r.index,{mode:s})}updateRangeFromParsed(t,n,s,o){let r=s[n.axis],a=r===null?NaN:r,l=o&&s._stacks[n.axis];o&&l&&(o.values=l,a=hr(o,r,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,n){let s=this._cachedMeta,o=s._parsed,r=s._sorted&&t===s.iScale,a=o.length,l=this._getOtherScale(t),c=Ih(n,s,this.chart),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:f}=Ah(l),u,p;function m(){p=o[u];let g=p[l.axis];return!U(p[t.axis])||d>g||f<g}for(u=0;u<a&&!(!m()&&(this.updateRangeFromParsed(h,t,p,c),r));++u);if(r){for(u=a-1;u>=0;--u)if(!m()){this.updateRangeFromParsed(h,t,p,c);break}}return h}getAllParsedValues(t){let n=this._cachedMeta._parsed,s=[],o,r,a;for(o=0,r=n.length;o<r;++o)a=n[o][t.axis],U(a)&&s.push(a);return s}getMaxOverflow(){return!1}getLabelAndValue(t){let n=this._cachedMeta,s=n.iScale,o=n.vScale,r=this.getParsed(t);return{label:s?""+s.getLabelForValue(r[s.axis]):"",value:o?""+o.getLabelForValue(r[o.axis]):""}}_update(t){let n=this._cachedMeta;this.update(t||"default"),n._clip=kh(T(this.options.clip,Ch(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){let t=this._ctx,n=this.chart,s=this._cachedMeta,o=s.data||[],r=n.chartArea,a=[],l=this._drawStart||0,c=this._drawCount||o.length-l,h=this.options.drawActiveElementsOnTop,d;for(s.dataset&&s.dataset.draw(t,r,l,c),d=l;d<l+c;++d){let f=o[d];f.hidden||(f.active&&h?a.push(f):f.draw(t,r))}for(d=0;d<a.length;++d)a[d].draw(t,r)}getStyle(t,n){let s=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(t||0,s)}getContext(t,n,s){let o=this.getDataset(),r;if(t>=0&&t<this._cachedMeta.data.length){let a=this._cachedMeta.data[t];r=a.$context||(a.$context=Eh(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=Dh(this.chart.getContext(),this.index)),r.dataset=o,r.index=r.datasetIndex=this.index;return r.active=!!n,r.mode=s,r}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",s){let o=n==="active",r=this._cachedDataOpts,a=t+"-"+n,l=r[a],c=this.enableOptionSharing&&ve(s);if(l)return pr(l,c);let h=this.chart.config,d=h.datasetElementScopeKeys(this._type,t),f=o?["".concat(t,"Hover"),"hover",t,""]:[t,""],u=h.getOptionScopes(this.getDataset(),d),p=Object.keys(H.elements[t]),m=()=>this.getContext(s,o,n),g=h.resolveNamedOptions(u,p,m,f);return g.$shared&&(g.$shared=c,r[a]=Object.freeze(pr(g,c))),g}_resolveAnimations(t,n,s){let o=this.chart,r=this._cachedDataOpts,a="animation-".concat(n),l=r[a];if(l)return l;let c;if(o.options.animation!==!1){let d=this.chart.config,f=d.datasetAnimationScopeKeys(this._type,n),u=d.getOptionScopes(this.getDataset(),f);c=d.createResolver(u,this.getContext(t,s,n))}let h=new nn(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,n){return!n||as(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){let s=this.resolveDataElementOptions(t,n),o=this._sharedOptions,r=this.getSharedOptions(s),a=this.includeOptions(n,r)||r!==o;return this.updateSharedOptions(r,n,s),{sharedOptions:r,includeOptions:a}}updateElement(t,n,s,o){as(o)?Object.assign(t,s):this._resolveAnimations(n,o).update(t,s)}updateSharedOptions(t,n,s){t&&!as(n)&&this._resolveAnimations(void 0,n).update(t,s)}_setStyle(t,n,s,o){t.active=o;let r=this.getStyle(n,o);
vendor: 5,957 bytes, line 1
1this._resolveAnimations(n,s,o).update(t,{options:!o&&this.getSharedOptions(r)||r})}removeHoverStyle(t,n,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,n,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let n=this._data,s=this._cachedMeta.data;for(let[l,c,h]of this._syncList)this[l](c,h);this._syncList=[];let o=s.length,r=n.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,n,s=!0){let o=this._cachedMeta,r=o.data,a=t+n,l,c=h=>{for(h.length+=n,l=h.length-1;l>=a;l--)h[l]=h[l-n]};for(c(r),l=t;l<a;++l)r[l]=new this.dataElementType;this._parsing&&c(o._parsed),this.parse(t,n),s&&this.updateElements(r,t,n,"reset")}updateElements(t,n,s,o){}_removeElements(t,n){let s=this._cachedMeta;if(this._parsing){let o=s._parsed.splice(t,n);s._stacked&&ii(s,o)}s.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{let[n,s,o]=t;this[n](s,o)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){let t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);let s=arguments.length-2;s&&this._sync(["_insertElements",t,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}return S(e,"defaults",{}),S(e,"datasetElementType",null),S(e,"dataElementType",null),e})();function Lh(e,i){if(!e._cache.$bar){let t=e.getMatchingVisibleMetas(i),n=[];for(let s=0,o=t.length;s<o;s++)n=n.concat(t[s].controller.getAllParsedValues(e));e._cache.$bar=jn(n.sort((s,o)=>s-o))}return e._cache.$bar}function Fh(e){let i=e.iScale,t=Lh(i,e.type),n=i._length,s,o,r,a,l=()=>{r===32767||r===-32768||(ve(a)&&(n=Math.min(n,Math.abs(r-a)||n)),a=r)};for(s=0,o=t.length;s<o;++s)r=i.getPixelForValue(t[s]),l();for(a=void 0,s=0,o=i.ticks.length;s<o;++s)r=i.getPixelForTick(s),l();return n}function Rh(e,i,t,n){let s=t.barThickness,o,r;return R(s)?(o=i.min*t.categoryPercentage,r=t.barPercentage):(o=s*n,r=1),{chunk:o/n,ratio:r,start:i.pixels[e]-o/2}}function zh(e,i,t,n){let s=i.pixels,o=s[e],r=e>0?s[e-1]:null,a=e<s.length-1?s[e+1]:null,l=t.categoryPercentage;r===null&&(r=o-(a===null?i.end-i.start:a-o)),a===null&&(a=o+o-r);let c=o-(o-Math.min(r,a))/2*l;return{chunk:Math.abs(a-r)/2*l/n,ratio:t.barPercentage,start:c}}function Bh(e,i,t,n){let s=t.parse(e[0],n),o=t.parse(e[1],n),r=Math.min(s,o),a=Math.max(s,o),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:s,end:o,min:r,max:a}}function ha(e,i,t,n){return j(e)?Bh(e,i,t,n):i[t.axis]=t.parse(e,n),i}function mr(e,i,t,n){let s=e.iScale,o=e.vScale,r=s.getLabels(),a=s===o,l=[],c,h,d,f;for(c=t,h=t+n;c<h;++c)f=i[c],d={},d[s.axis]=a||s.parse(r[c],c),l.push(ha(f,d,o,c));return l}function ls(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function Vh(e,i,t){return e!==0?yt(e):(i.isHorizontal()?1:-1)*(i.min>=t?1:-1)}function jh(e){let i,t,n,s,o;return e.horizontal?(i=e.base>e.x,t="left",n="right"):(i=e.base<e.y,t="bottom",n="top"),i?(s="end",o="start"):(s="start",o="end"),{start:t,end:n,reverse:i,top:s,bottom:o}}function Nh(e,i,t,n){let s=i.borderSkipped,o={};if(!s){e.borderSkipped=o;return}if(s===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}let{start:r,end:a,reverse:l,top:c,bottom:h}=jh(e);s==="middle"&&t&&(e.enableBorderRadius=!0,(t._top||0)===n?s=c:(t._bottom||0)===n?s=h:(o[gr(h,r,a,l)]=!0,s=c)),o[gr(s,r,a,l)]=!0,e.borderSkipped=o}function gr(e,i,t,n){return n?(e=Wh(e,i,t),e=xr(e,t,i)):e=xr(e,i,t),e}function Wh(e,i,t){return e===i?t:e===t?i:e}function xr(e,i,t){return e==="start"?i:e==="end"?t:e}function Hh(e,{inflateAmount:i},t){e.inflateAmount=i==="auto"?t===1?.33:0:i}var Yh=(()=>{class e extends Gt{parsePrimitiveData(t,n,s,o){return mr(t,n,s,o)}parseArrayData(t,n,s,o){return mr(t,n,s,o)}parseObjectData(t,n,s,o){let{iScale:r,vScale:a}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,h=r.axis==="x"?l:c,d=a.axis==="x"?l:c,f=[],u,p,m,g;for(u=s,p=s+o;u<p;++u)g=n[u],m={},m[r.axis]=r.parse(Ft(g,h),u),f.push(ha(Ft(g,d),m,a,u));return f}updateRangeFromParsed(t,n,s,o){super.updateRangeFromParsed(t,n,s,o);let r=s._custom;r&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,r.min),t.max=Math.max(t.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(t){let n=this._cachedMeta,{iScale:s,vScale:o}=n,r=this.getParsed(t),a=r._custom,l=ls(a)?"["+a.start+", "+a.end+"]":""+o.getLabelForValue(r[o.axis]);return{label:""+s.getLabelForValue(r[s.axis]),value:l}}initialize(){this.enableOptionSharing=!0,super.initialize();let t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){let n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,s,o){let r=o==="reset",{index:a,_cachedMeta:{vScale:l}}=this,c=l.getBasePixel(),h=l.isHorizontal(),d=this._getRuler(),{sharedOptions:f,includeOptions:u}=this._getSharedOptions(n,o);for(let p=n;p<n+s;p++){let m=this.getParsed(p),g=r||R(m[l.axis])?{base:c,head:c}:this._calculateBarValuePixels(p),x=this._calculateBarIndexPixels(p,d),b=(m._stacks||{})[l.axis],y={horizontal:h,base:g.base,enableBorderRadius:!b||ls(m._custom)||a===b._top||a===b._bottom,x:h?g.head:x.center,y:h?x.center:g.head,height:h?x.size:Math.abs(g.size),width:h?Math.abs(g.size):x.size};u&&(y.options=f||this.resolveDataElementOptions(p,t[p].active?"active":o));let w=y.options||t[p].options;Nh(y,w,b,a),Hh(y,w,d.ratio),this.updateElement(t[p],p,y,o)}}_getStacks(t,n){let{iScale:s}=this._cachedMeta,o=s.getMatchingVisibleMetas(this._type).filter(d=>d.controller.options.grouped),r=s.options.stacked,a=[],l=this._cachedMeta.controller.getParsed(n),c=l&&l[s.axis],h=d=>{let f=d._parsed.find(p=>
1p[s.axis]===c),u=f&&f[d.vScale.axis];if(R(u)||isNaN(u))return!0};for(let d of o)if(!(n!==void 0&&h(d))&&((r===!1||a.indexOf(d.stack)===-1||r===void 0&&d.stack===void 0)&&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,n,s){let o=this._getStacks(t,s),r=n!==void 0?o.indexOf(n):-1;return r===-1?o.length-1:r}_getRuler(){let t=this.options,n=this._cachedMeta,s=n.iScale,o=[],r,a;for(r=0,a=n.data.length;r<a;++r)o.push(s.getPixelForValue(this.getParsed(r)[s.axis],r));let l=t.barThickness;return{min:l||Fh(n),pixels:o,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:t.grouped,ratio:l?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){let{_cachedMeta:{vScale:n,_stacked:s,index:o},options:{base:r,minBarLength:a}}=this,l=r||0,c=this.getParsed(t),h=c._custom,d=ls(h),f=c[n.axis],u=0,p=s?this.applyStack(n,c,s):f,m,g;p!==f&&(u=p-f,p=f),d&&(f=h.barStart,p=h.barEnd-h.barStart,f!==0&&yt(f)!==yt(h.barEnd)&&(u=0),u+=f);let x=!R(r)&&!d?r:u,b=n.getPixelForValue(x);if(this.chart.getDataVisibility(t)?m=n.getPixelForValue(u+p):m=b,g=m-b,Math.abs(g)<a){g=Vh(g,n,l)*a,f===l&&(b-=g/2);let y=n.getPixelForDecimal(0),w=n.getPixelForDecimal(1),_=Math.min(y,w),v=Math.max(y,w);b=Math.max(Math.min(b,v),_),m=b+g,s&&!d&&(c._stacks[n.axis]._visualValues[o]=n.getValueForPixel(m)-n.getValueForPixel(b))}if(b===n.getPixelForValue(l)){let y=yt(g)*n.getLineWidthForValue(l)/2;b+=y,g-=y}return{size:g,base:b,head:m,center:m+g/2}}_calculateBarIndexPixels(t,n){let s=n.scale,o=this.options,r=o.skipNull,a=T(o.maxBarThickness,1/0),l,c;if(n.grouped){let h=r?this._getStackCount(t):n.stackCount,d=o.barThickness==="flex"?zh(t,n,o,h):Rh(t,n,o,h),f=this._getStackIndex(this.index,this._cachedMeta.stack,r?t:void 0);l=d.start+d.chunk*f+d.chunk/2,c=Math.min(a,d.chunk*d.ratio)}else l=s.getPixelForValue(this.getParsed(t)[s.axis],t),c=Math.min(a,n.min*n.ratio);return{base:l-c/2,head:l+c/2,center:l,size:c}}draw(){let t=this._cachedMeta,n=t.vScale,s=t.data,o=s.length,r=0;for(;r<o;++r)this.getParsed(r)[n.axis]!==null&&!s[r].hidden&&s[r].draw(this._ctx)}}return S(e,"id","bar"),S(e,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),S(e,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}}),e})(),$h=(()=>{class e extends Gt{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,s,o){let r=super.parsePrimitiveData(t,n,s,o);for(let a=0;a<r.length;a++)r[a]._custom=this.resolveDataElementOptions(a+s).radius;return r}parseArrayData(t,n,s,o){let r=super.parseArrayData(t,n,s,o);for(let a=0;a<r.length;a++){let l=n[s+a];r[a]._custom=T(l[2],this.resolveDataElementOptions(a+s).radius)}return r}parseObjectData(t,n,s,o){let r=super.parseObjectData(t,n,s,o);for(let a=0;a<r.length;a++){let l=n[s+a];r[a]._custom=T(l&&l.r&&+l.r,this.resolveDataElementOptions(a+s).radius)}return r}getMaxOverflow(){let t=this._cachedMeta.data,n=0;for(let s=t.length-1;s>=0;--s)n=Math.max(n,t[s].size(this.resolveDataElementOptions(s))/2);return n>0&&n}getLabelAndValue(t){let n=this._cachedMeta,s=this.chart.data.labels||[],{xScale:o,yScale:r}=n,a=this.getParsed(t),l=o.getLabelForValue(a.x),c=r.getLabelForValue(a.y),h=a._custom;return{label:s[t]||"",value:"("+l+", "+c+(h?", "+h:"")+")"}}update(t){let n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,s,o){let r=o==="reset",{iScale:a,vScale:l}=this._cachedMeta,{sharedOptions:c,includeOptions:h}=this._getSharedOptions(n,o),d=a.axis,f=l.axis;for(let u=n;u<n+s;u++){let p=t[u],m=!r&&this.getParsed(u),g={},x=g[d]=r?a.getPixelForDecimal(.5):a.getPixelForValue(m[d]),b=g[f]=r?l.getBasePixel():l.getPixelForValue(m[f]);g.skip=isNaN(x)||isNaN(b),h&&(g.options=c||this.resolveDataElementOptions(u,p.active?"active":o),r&&(g.options.radius=0)),this.updateElement(p,u,g,o)}}resolveDataElementOptions(t,n){let s=this.getParsed(t),o=super.resolveDataElementOptions(t,n);o.$shared&&(o=Object.assign({},o,{$shared:!1}));let r=o.radius;return n!=="active"&&(o.radius=0),o.radius+=T(s&&s._custom,r),o}}return S(e,"id","bubble"),S(e,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),S(e,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}}),e})();function Uh(e,i,t){let n=1,s=1,o=0,r=0;if(i<W){let a=e,l=a+i,c=Math.cos(a),h=Math.sin(a),d=Math.cos(l),f=Math.sin(l),u=(y,w,_)=>Me(y,a,l,!0)?1:Math.max(w,w*t,_,_*t),p=(y,w,_)=>Me(y,a,l,!0)?-1:Math.min(w,w*t,_,_*t),m=u(0,c,d),g=u(X,h,f),x=p(N,c,d),b=p(N+X,h,f);n=(m-x)/2,s=(g-b)/2,o=-(m+x)/2,r=-(g+b)/2}return{ratioX:n,ratioY:s,offsetX:o,offsetY:r}}var Ts=(()=>{class e extends Gt{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){let s=this.getDataset().data,o=this._cachedMeta;if(this._parsing===!1)o._parsed=s;else{let r=c=>+s[c];if(I(s[t])){let{key:c="value"}=this._parsing;r=h=>+Ft(s[h],c)}let a,l;for(a=t,l=t+n;a<l;++a)o._parsed[a]=r(a)}}_getRotation(){return gt(this.options.rotation-90)}_getCircumference(){return gt(this.options.circumference)}_getRotationExtents(){let t=W,n=-W;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)&&this.chart.getDatasetMeta(s).type===this._type){let o=this.chart.getDatasetMeta(s).controller,r=
1o._getRotation(),a=o._getCircumference();t=Math.min(t,r),n=Math.max(n,r+a)}return{rotation:t,circumference:n-t}}update(t){let n=this.chart,{chartArea:s}=n,o=this._cachedMeta,r=o.data,a=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,l=Math.max((Math.min(s.width,s.height)-a)/2,0),c=Math.min(Lo(this.options.cutout,l),1),h=this._getRingWeight(this.index),{circumference:d,rotation:f}=this._getRotationExtents(),{ratioX:u,ratioY:p,offsetX:m,offsetY:g}=Uh(f,d,c),x=(s.width-a)/u,b=(s.height-a)/p,y=Math.max(Math.min(x,b)/2,0),w=In(this.options.radius,y),_=Math.max(w*c,0),v=(w-_)/this._getVisibleDatasetWeightTotal();this.offsetX=m*w,this.offsetY=g*w,o.total=this.calculateTotal(),this.outerRadius=w-v*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-v*h,0),this.updateElements(r,0,r.length,t)}_circumference(t,n){let s=this.options,o=this._cachedMeta,r=this._getCircumference();return n&&s.animation.animateRotate||!this.chart.getDataVisibility(t)||o._parsed[t]===null||o.data[t].hidden?0:this.calculateCircumference(o._parsed[t]*r/W)}updateElements(t,n,s,o){let r=o==="reset",a=this.chart,l=a.chartArea,h=a.options.animation,d=(l.left+l.right)/2,f=(l.top+l.bottom)/2,u=r&&h.animateScale,p=u?0:this.innerRadius,m=u?0:this.outerRadius,{sharedOptions:g,includeOptions:x}=this._getSharedOptions(n,o),b=this._getRotation(),y;for(y=0;y<n;++y)b+=this._circumference(y,r);for(y=n;y<n+s;++y){let w=this._circumference(y,r),_=t[y],v={x:d+this.offsetX,y:f+this.offsetY,startAngle:b,endAngle:b+w,circumference:w,outerRadius:m,innerRadius:p};x&&(v.options=g||this.resolveDataElementOptions(y,_.active?"active":o)),b+=w,this.updateElement(_,y,v,o)}}calculateTotal(){let t=this._cachedMeta,n=t.data,s=0,o;for(o=0;o<n.length;o++){let r=t._parsed[o];r!==null&&!isNaN(r)&&this.chart.getDataVisibility(o)&&!n[o].hidden&&(s+=Math.abs(r))}return s}calculateCircumference(t){let n=this._cachedMeta.total;return n>0&&!isNaN(t)?W*(Math.abs(t)/n):0}getLabelAndValue(t){let n=this._cachedMeta,s=this.chart,o=s.data.labels||[],r=Se(n._parsed[t],s.options.locale);return{label:o[t]||"",value:r}}getMaxBorderWidth(t){let n=0,s=this.chart,o,r,a,l,c;if(!t){for(o=0,r=s.data.datasets.length;o<r;++o)if(s.isDatasetVisible(o)){a=s.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),c.borderAlign!=="inner"&&(n=Math.max(n,c.borderWidth||0,c.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let s=0,o=t.length;s<o;++s){let r=this.resolveDataElementOptions(s);n=Math.max(n,r.offset||0,r.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let s=0;s<t;++s)this.chart.isDatasetVisible(s)&&(n+=this._getRingWeight(s));return n}_getRingWeight(t){return Math.max(T(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}return S(e,"id","doughnut"),S(e,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),S(e,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),S(e,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let n=t.data;if(n.labels.length&&n.datasets.length){let{labels:{pointStyle:s,color:o}}=t.legend.options;return n.labels.map((r,a)=>{let c=t.getDatasetMeta(0).controller.getStyle(a);return{text:r,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:o,lineWidth:c.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,n,s){s.chart.toggleDataVisibility(n.index),s.chart.update()}}}}),e})(),Xh=(()=>{class e extends Gt{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let n=this._cachedMeta,{dataset:s,data:o=[],_dataset:r}=n,a=this.chart._animationsDisabled,{start:l,count:c}=Hn(n,o,a);this._drawStart=l,this._drawCount=c,Yn(n)&&(l=0,c=o.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!r._decimated,s.points=o;let h=this.resolveDatasetElementOptions(t);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(s,void 0,{animated:!a,options:h},t),this.updateElements(o,l,c,t)}updateElements(t,n,s,o){let r=o==="reset",{iScale:a,vScale:l,_stacked:c,_dataset:h}=this._cachedMeta,{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,o),u=a.axis,p=l.axis,{spanGaps:m,segment:g}
1=this.options,x=ae(m)?m:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||r||o==="none",y=n+s,w=t.length,_=n>0&&this.getParsed(n-1);for(let v=0;v<w;++v){let k=t[v],M=b?k:{};if(v<n||v>=y){M.skip=!0;continue}let A=this.getParsed(v),E=R(A[p]),D=M[u]=a.getPixelForValue(A[u],v),L=M[p]=r||E?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,A,c):A[p],v);M.skip=isNaN(D)||isNaN(L)||E,M.stop=v>0&&Math.abs(A[u]-_[u])>x,g&&(M.parsed=A,M.raw=h.data[v]),f&&(M.options=d||this.resolveDataElementOptions(v,k.active?"active":o)),b||this.updateElement(k,v,M,o),_=A}}getMaxOverflow(){let t=this._cachedMeta,n=t.dataset,s=n.options&&n.options.borderWidth||0,o=t.data||[];if(!o.length)return s;let r=o[0].size(this.resolveDataElementOptions(0)),a=o[o.length-1].size(this.resolveDataElementOptions(o.length-1));return Math.max(s,r,a)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}return S(e,"id","line"),S(e,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),S(e,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}}),e})(),da=(()=>{class e extends Gt{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let n=this._cachedMeta,s=this.chart,o=s.data.labels||[],r=Se(n._parsed[t].r,s.options.locale);return{label:o[t]||"",value:r}}parseObjectData(t,n,s,o){return Qn.bind(this)(t,n,s,o)}update(t){let n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){let t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((s,o)=>{let r=this.getParsed(o).r;!isNaN(r)&&this.chart.getDataVisibility(o)&&(r<n.min&&(n.min=r),r>n.max&&(n.max=r))}),n}_updateRadius(){let t=this.chart,n=t.chartArea,s=t.options,o=Math.min(n.right-n.left,n.bottom-n.top),r=Math.max(o/2,0),a=Math.max(s.cutoutPercentage?r/100*s.cutoutPercentage:1,0),l=(r-a)/t.getVisibleDatasetCount();this.outerRadius=r-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(t,n,s,o){let r=o==="reset",a=this.chart,c=a.options.animation,h=this._cachedMeta.rScale,d=h.xCenter,f=h.yCenter,u=h.getIndexAngle(0)-.5*N,p=u,m,g=360/this.countVisibleElements();for(m=0;m<n;++m)p+=this._computeAngle(m,o,g);for(m=n;m<n+s;m++){let x=t[m],b=p,y=p+this._computeAngle(m,o,g),w=a.getDataVisibility(m)?h.getDistanceFromCenterForValue(this.getParsed(m).r):0;p=y,r&&(c.animateScale&&(w=0),c.animateRotate&&(b=y=u));let _={x:d,y:f,innerRadius:0,outerRadius:w,startAngle:b,endAngle:y,options:this.resolveDataElementOptions(m,x.active?"active":o)};this.updateElement(x,m,_,o)}}countVisibleElements(){let t=this._cachedMeta,n=0;return t.data.forEach((s,o)=>{!isNaN(this.getParsed(o).r)&&this.chart.getDataVisibility(o)&&n++}),n}_computeAngle(t,n,s){return this.chart.getDataVisibility(t)?gt(this.resolveDataElementOptions(t,n).angle||s):0}}return S(e,"id","polarArea"),S(e,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),S(e,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let n=t.data;if(n.labels.length&&n.datasets.length){let{labels:{pointStyle:s,color:o}}=t.legend.options;return n.labels.map((r,a)=>{let c=t.getDatasetMeta(0).controller.getStyle(a);return{text:r,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:o,lineWidth:c.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,n,s){s.chart.toggleDataVisibility(n.index),s.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}}),e})(),qh=(()=>{class e extends Ts{}return S(e,"id","pie"),S(e,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"}),e})(),Kh=(()=>{class e extends Gt{getLabelAndValue(t){let n=this._cachedMeta.vScale,s=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(s[n.axis])}}
1parseObjectData(t,n,s,o){return Qn.bind(this)(t,n,s,o)}update(t){let n=this._cachedMeta,s=n.dataset,o=n.data||[],r=n.iScale.getLabels();if(s.points=o,t!=="resize"){let a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);let l={_loop:!0,_fullLoop:r.length===o.length,options:a};this.updateElement(s,void 0,l,t)}this.updateElements(o,0,o.length,t)}updateElements(t,n,s,o){let r=this._cachedMeta.rScale,a=o==="reset";for(let l=n;l<n+s;l++){let c=t[l],h=this.resolveDataElementOptions(l,c.active?"active":o),d=r.getPointPositionForValue(l,this.getParsed(l).r),f=a?r.xCenter:d.x,u=a?r.yCenter:d.y,p={x:f,y:u,angle:d.angle,skip:isNaN(f)||isNaN(u),options:h};this.updateElement(c,l,p,o)}}}return S(e,"id","radar"),S(e,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),S(e,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}}),e})(),Gh=(()=>{class e extends Gt{getLabelAndValue(t){let n=this._cachedMeta,s=this.chart.data.labels||[],{xScale:o,yScale:r}=n,a=this.getParsed(t),l=o.getLabelForValue(a.x),c=r.getLabelForValue(a.y);return{label:s[t]||"",value:"("+l+", "+c+")"}}update(t){let n=this._cachedMeta,{data:s=[]}=n,o=this.chart._animationsDisabled,{start:r,count:a}=Hn(n,s,o);if(this._drawStart=r,this._drawCount=a,Yn(n)&&(r=0,a=s.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:l,_dataset:c}=n;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!c._decimated,l.points=s;let h=this.resolveDatasetElementOptions(t);h.segment=this.options.segment,this.updateElement(l,void 0,{animated:!o,options:h},t)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(s,r,a,t)}addElements(){let{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,n,s,o){let r=o==="reset",{iScale:a,vScale:l,_stacked:c,_dataset:h}=this._cachedMeta,d=this.resolveDataElementOptions(n,o),f=this.getSharedOptions(d),u=this.includeOptions(o,f),p=a.axis,m=l.axis,{spanGaps:g,segment:x}=this.options,b=ae(g)?g:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||r||o==="none",w=n>0&&this.getParsed(n-1);for(let _=n;_<n+s;++_){let v=t[_],k=this.getParsed(_),M=y?v:{},A=R(k[m]),E=M[p]=a.getPixelForValue(k[p],_),D=M[m]=r||A?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,k,c):k[m],_);M.skip=isNaN(E)||isNaN(D)||A,M.stop=_>0&&Math.abs(k[p]-w[p])>b,x&&(M.parsed=k,M.raw=h.data[_]),u&&(M.options=f||this.resolveDataElementOptions(_,v.active?"active":o)),y||this.updateElement(v,_,M,o),w=k}this.updateSharedOptions(f,o,d)}getMaxOverflow(){let t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let l=0;for(let c=n.length-1;c>=0;--c)l=Math.max(l,n[c].size(this.resolveDataElementOptions(c))/2);return l>0&&l}let s=t.dataset,o=s.options&&s.options.borderWidth||0;if(!n.length)return o;let r=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(o,r,a)/2}}return S(e,"id","scatter"),S(e,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),S(e,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}}),e})(),Zh=Object.freeze({__proto__:null,BarController:Yh,BubbleController:$h,DoughnutController:Ts,LineController:Xh,PieController:qh,PolarAreaController:da,RadarController:Kh,ScatterController:Gh});function ce(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var xs=class e{constructor(i){S(this,"options");this.options=i||{}}static override(i){Object.assign(e.prototype,i)}init(){}formats(){return ce()}parse(){return ce()}format(){return ce()}add(){return ce()}diff(){return ce()}startOf(){return ce()}endOf(){return ce()}},Jh={_date:xs};function Qh(e,i,t,n){let{controller:s,data:o,_sorted:r}=e,a=s._cachedMeta.iScale;if(a&&i===a.axis&&i!=="r"&&r&&o.length){let l=a._reversePixels?jo:vt;if(n){if(s._sharedOptions){let c=o[0],h=typeof c.getRange=="function"&&c.getRange(i);if(h){let d=l(o,i,t-h),f=l(o,i,t+h);return{lo:d.lo,hi:f.hi}}}}else return l(o,i,t)}return{lo:0,hi:o.length-1}}function mi(e,i,t,n,s){let o=e.getSortedVisibleDatasetMetas(),r=t[i];for(let a=0,l=o.length;a<l;++a){let{index:c,data:h}=o[a],{lo:d,hi:f}=Qh(o[a],i,r,s);for(let u=d;u<=f;++u){let p=h[u];p.skip||n(p,c,u)}}}function td(e){let i=e.indexOf("x")!==-1,t=e.indexOf("y")!==-1;return function(n,s){let o=i?Math.abs(n.x-s.x):0,r=t?Math.abs(n.y-s.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(r,2))}}function cs(e,i,t,n,s){let o=[];return!s&&!e.isPointInArea(i)||mi(e,t,i,function(a,l,c){!s&&!wt(a,e.chartArea,0)||a.inRange(i.x,i.y,n)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function ed(e,i,t,n){let s=[];function o(r,a,l){let{startAngle:c,endAngle:h}=r.getProps(["startAngle","endAngle"],n),{angle:d}=Bn(r,{x:i.x,y:i.y});Me(d,c,h)&&s.push({element:r,datasetIndex:a,index:l})}return mi(e,t,i,o),s}function id(e,i,t,n,s,o){let r=[],a=td(t),l=Number.POSITIVE_INFINITY;function c(h,d,f){let u=h.inRange(i.x,i.y,s);if(n&&!u)return;let p=h.getCenterPoint(s);if(!(!!o||e.isPointInArea(p))&&!u)return;let g=a(i,p);g<l?(r=[{element:h,datasetIndex:d,index:f}],l=g):g===l&&r.push({element:h,datasetIndex:d,index:f})}return mi(e,t,i,c),r}function hs(e,i,t,n,s,o){return!o&&!e.isPointInArea(i)?[]:t==="r"&&!n?ed(e,i,t,s):id(e,i,t,n,s,o)}function br(e,i,t,n,s){let o=[],r=t==="x"?"inXRange":"inYRange",a=!1;return mi(e,t,i,(l,c,h)=>{l[r]&&l[r](i[t],s)&&(o.push({element:l,datasetIndex:c,index:h}),a=a||l.inRange(i.x,i.y,s))}),n&&!a?[]:o}var nd={evaluateInteractionItems:mi,modes:{index(e,i,t,n){let s=qt(i,e),o=t.axis||"x",r=t.includeInvisible||!1,a=t.intersect?cs(e,s,o,n,r):hs(e,s,o,!1,n,r),l=[];
vendor: 53,809 bytes, line 1
1return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{let 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,n){let s=qt(i,e),o=t.axis||"xy",r=t.includeInvisible||!1,a=t.intersect?cs(e,s,o,n,r):hs(e,s,o,!1,n,r);if(a.length>0){let 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,n){let s=qt(i,e),o=t.axis||"xy",r=t.includeInvisible||!1;return cs(e,s,o,n,r)},nearest(e,i,t,n){let s=qt(i,e),o=t.axis||"xy",r=t.includeInvisible||!1;return hs(e,s,o,t.intersect,n,r)},x(e,i,t,n){let s=qt(i,e);return br(e,s,"x",t.intersect,n)},y(e,i,t,n){let s=qt(i,e);return br(e,s,"y",t.intersect,n)}}},fa=["left","top","right","bottom"];function ni(e,i){return e.filter(t=>t.pos===i)}function _r(e,i){return e.filter(t=>fa.indexOf(t.pos)===-1&&t.box.axis===i)}function si(e,i){return e.sort((t,n)=>{let s=i?n:t,o=i?t:n;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function sd(e){let i=[],t,n,s,o,r,a;for(t=0,n=(e||[]).length;t<n;++t)s=e[t],{position:o,options:{stack:r,stackWeight:a=1}}=s,i.push({index:t,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:r&&o+r,stackWeight:a});return i}function od(e){let i={};for(let t of e){let{stack:n,pos:s,stackWeight:o}=t;if(!n||!fa.includes(s))continue;let r=i[n]||(i[n]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=o}return i}function rd(e,i){let t=od(e),{vBoxMaxWidth:n,hBoxMaxHeight:s}=i,o,r,a;for(o=0,r=e.length;o<r;++o){a=e[o];let{fullSize:l}=a.box,c=t[a.stack],h=c&&a.stackWeight/c.weight;a.horizontal?(a.width=h?h*n:l&&i.availableWidth,a.height=s):(a.width=n,a.height=h?h*s:l&&i.availableHeight)}return t}function ad(e){let i=sd(e),t=si(i.filter(c=>c.box.fullSize),!0),n=si(ni(i,"left"),!0),s=si(ni(i,"right")),o=si(ni(i,"top"),!0),r=si(ni(i,"bottom")),a=_r(i,"x"),l=_r(i,"y");return{fullSize:t,leftAndTop:n.concat(o),rightAndBottom:s.concat(l).concat(r).concat(a),chartArea:ni(i,"chartArea"),vertical:n.concat(s).concat(l),horizontal:o.concat(r).concat(a)}}function yr(e,i,t,n){return Math.max(e[t],i[t])+Math.max(e[n],i[n])}function ua(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 ld(e,i,t,n){let{pos:s,box:o}=t,r=e.maxPadding;if(!I(s)){t.size&&(e[s]-=t.size);let d=n[t.stack]||{size:0,count:1};d.size=Math.max(d.size,t.horizontal?o.height:o.width),t.size=d.size/d.count,e[s]+=t.size}o.getPadding&&ua(r,o.getPadding());let a=Math.max(0,i.outerWidth-yr(r,e,"left","right")),l=Math.max(0,i.outerHeight-yr(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 cd(e){let i=e.maxPadding;function t(n){let s=Math.max(i[n]-e[n],0);return e[n]+=s,s}e.y+=t("top"),e.x+=t("left"),t("right"),t("bottom")}function hd(e,i){let t=i.maxPadding;function n(s){let o={left:0,top:0,right:0,bottom:0};return s.forEach(r=>{o[r]=Math.max(i[r],t[r])}),o}return n(e?["left","right"]:["top","bottom"])}function ai(e,i,t,n){let s=[],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,hd(a.horizontal,i));let{same:d,other:f}=ld(i,t,a,n);c|=d&&s.length,h=h||f,l.fullSize||s.push(a)}return c&&ai(s,i,t,n)||h}function Xi(e,i,t,n,s){e.top=t,e.left=i,e.right=i+n,e.bottom=t+s,e.width=n,e.height=s}function vr(e,i,t,n){let s=t.padding,{x:o,y:r}=i;for(let a of e){let l=a.box,c=n[a.stack]||{count:1,placed:0,weight:1},h=a.stackWeight/c.weight||1;if(a.horizontal){let d=i.w*h,f=c.size||l.height;ve(c.start)&&(r=c.start),l.fullSize?Xi(l,s.left,r,t.outerWidth-s.right-s.left,f):Xi(l,i.left+c.placed,r,d,f),c.start=r,c.placed+=d,r=l.bottom}else{let d=i.h*h,f=c.size||l.width;ve(c.start)&&(o=c.start),l.fullSize?Xi(l,o,s.top,f,t.outerHeight-s.bottom-s.top):Xi(l,o,i.top+c.placed,f,d),c.start=o,c.placed+=d,o=l.right}}i.x=o,i.y=r}var st={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){let t=e.boxes?e.boxes.indexOf(i):-1;t!==-1&&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,n){if(!e)return;let s=it(e.options.layout.padding),o=Math.max(i-s.width,0),r=Math.max(t-s.height,0),a=ad(e.boxes),l=a.vertical,c=a.horizontal;z(e.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});let h=l.reduce((m,g)=>g.box.options&&g.box.options.display===!1?m:m+1,0)||1,d=Object.freeze({outerWidth:i,outerHeight:t,padding:s,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/h,hBoxMaxHeight:r/2}),f=Object.assign({},s);ua(f,it(n));let u=Object.assign({maxPadding:f,w:o,h:r,x:s.left,y:s.top},s),p=rd(l.concat(c),d);ai(a.fullSize,u,d,p),ai(l,u,d,p),ai(c,u,d,p)&&ai(l,u,d,p),cd(u),vr(a.leftAndTop,u,d,p),u.x+=u.w,u.y+=u.h,vr(a.rightAndBottom,u,d,p),e.chartArea={left:u.left,top:u.top,right:u.left+u.w,bottom:u.top+u.h,height:u.h,width:u.w},z(a.chartArea,m=>{let g=m.box;Object.assign(g,e.chartArea),g.update(u.w,u.h,{left:0,top:0,right:0,bottom:0})})}},sn=class{acquireContext(i,t){}releaseContext(i){return!1}addEventListener(i,t,n){}removeEventListener(i,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(i,t,n,s){return t=Math.max(0,t||i.width),n=n||i.height,{width:t,height:Math.max(0,s?Math.floor(t/s):n)}}isAttached(i){return!0}updateConfig(i){}},bs=class extends sn{acquireContext(i){return i&&i.getContext&&i.getContext("2d")||null}updateConfig(i){i.options.animation=!1}},tn="$chartjs",dd={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},wr=e=>e===null||e==="";function fd(e,i){let t=e.style,n=e.getAttribute("height"),s=e.getAttribute("width");if(e[tn]={initial:{height:n,width:s,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",wr(s)){let o=es(e,"width");o!==void 0&&(e.width=o)}if(wr(n))if(e.style.height==="")e.height=e.width/(i||2);else{let o=es(e,"height");o!==void 0&&(e.height=o)}return e}var pa=nr?{passive:!0}:!1;function ud(e,i,t){e&&e.addEventListener(i,t,pa)}function pd(e,i,t){e&&e.canvas&&e.canvas.removeEventListener(i,t,pa)}function md(e,i){let t=dd[e.type]||e.type,{x:n,y:s}=qt(e,i);return{type:t,chart:i,native:e,x:n!==void 0?n:null,y:s!==void 0?s:null}}function on(e,i){for(let t of e)if(t===i||t.contains(i))return!0}function gd(e,i,t){let n=e.canvas,s=new MutationObserver(o=>{let r=!1;for(let a of o)r=r||on(a.addedNodes,n),r=r&&!on(a.removedNodes,n);r&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function xd(e,i,t){let n=e.canvas,s=new MutationObserver(o=>{let r=!1;for(let a of o)r=r||on(a.removedNodes,n),r=r&&!on(a.addedNodes,n);r&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}var fi=new Map,Mr=0;function ma(){let e=window.devicePixelRatio;e!==Mr&&(Mr=e,fi.forEach((i,t)=>{t.currentDevicePixelRatio!==e&&i()}))}function bd(e,i){fi.size||window.addEventListener("resize",ma),fi.set(e,i)}function _d(e){fi.delete(e),fi.size||window.removeEventListener("resize",ma)}function yd(e,i,t){let n=e.canvas,s=n&&$i(n);if(!s)return;let o=Wn((a,l)=>{let c=s.clientWidth;t(a,l),c<s.clientWidth&&t()},window),r=new ResizeObserver(a=>{let l=a[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return r.observe(s),bd(e,o),r}function ds(e,i,t){t&&t.disconnect(),i==="resize"&&_d(e)}function vd(e,i,t){let n=e.canvas,s=Wn(o=>{e.ctx!==null&&t(md(o,e))},e);return ud(n,i,s),s}var _s=class extends sn{acquireContext(i,t){let n=i&&i.getContext&&i.getContext("2d");return n&&n.canvas===i?(fd(i,t),n):null}releaseContext(i){let t=i.canvas;if(!t[tn])return!1;let n=t[tn].initial;["height","width"].forEach(o=>{let r=n[o];R(r)?t.removeAttribute(o):t.setAttribute(o,r)});let s=n.style||{};return Object.keys(s).forEach(o=>{t.style[o]=s[o]}),t.width=t.width,delete t[tn],!0}addEventListener(i,t,n){this.removeEventListener(i,t);let s=i.$proxies||(i.$proxies={}),r={attach:gd,detach:xd,resize:yd}[t]||vd;s[t]=r(i,t,n)}removeEventListener(i,t){let n=i.$proxies||(i.$proxies={}),s=n[t];if(!s)return;({attach:ds,detach:ds,resize:ds}[t]||pd)(i,t,s),n[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(i,t,n,s){return ir(i,t,n,s)}isAttached(i){let t=i&&$i(i);return!!(t&&t.isConnected)}};function wd(e){return!Yi()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?bs:_s}var ut=class{constructor(){S(this,"x");S(this,"y");S(this,"active",!1);S(this,"options");S(this,"$animations")}tooltipPosition(i){let{x:t,y:n}=this.getProps(["x","y"],i);return{x:t,y:n}}hasValue(){return ae(this.x)&&ae(this.y)}getProps(i,t){let n=this.$animations;if(!t||!n)return this;let s={};return i.forEach(o=>{s[o]=n[o]&&n[o].active()?n[o]._to:this[o]}),s}};S(ut,"defaults",{}),S(ut,"defaultRoutes");function Md(e,i){let t=e.options.ticks,n=Sd(e),s=Math.min(t.maxTicksLimit||n,n),o=t.major.enabled?kd(i):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>s)return Pd(i,c,o,r/s),c;let h=Cd(o,i,s);if(r>0){let d,f,u=r>1?Math.round((l-a)/(r-1)):null;for(qi(i,c,h,R(u)?0:a-u,a),d=0,f=r-1;d<f;d++)qi(i,c,h,o[d],o[d+1]);return qi(i,c,h,l,R(u)?i.length:l+u),c}return qi(i,c,h),c}function Sd(e){let i=e.options.offset,t=e._tickSize(),n=e._length/t+(i?0:1),s=e._maxLength/t;return Math.floor(Math.min(n,s))}function Cd(e,i,t){let n=Od(e),s=i.length/t;if(!n)return Math.max(s,1);let o=zo(n);for(let r=0,a=o.length-1;r<a;r++){let l=o[r];if(l>s)return l}return Math.max(s,1)}function kd(e){let i=[],t,n;for(t=0,n=e.length;t<n;t++)e[t].major&&i.push(t);return i}function Pd(e,i,t,n){let s=0,o=t[0],r;for(n=Math.ceil(n),r=0;r<e.length;r++)r===o&&(i.push(e[r]),s++,o=t[s*n])}function qi(e,i,t,n,s){let o=T(n,0),r=Math.min(T(s,e.length),e.length),a=0,l,c,h;for(t=Math.ceil(t),s&&(l=s-n,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))}function Od(e){let i=e.length,t,n;if(i<2)return!1;for(n=e[0],t=1;t<i;++t)if(e[t]-e[t-1]!==n)return!1;return n}var Ad=e=>e==="left"?"right":e==="right"?"left":e,Sr=(e,i,t)=>i==="top"||i==="left"?e[i]+t:e[i]-t,Cr=(e,i)=>Math.min(i||e,e);function kr(e,i){let t=[],n=e.length/i,s=e.length,o=0;for(;o<s;o+=n)t.push(e[Math.floor(o)]);return t}function Td(e,i,t){let n=e.ticks.length,s=Math.min(i,n-1),o=e._startPixel,r=e._endPixel,a=1e-6,l=e.getPixelForTick(s),c;if(!(t&&(n===1?c=Math.max(l-o,r-l):i===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(s-1))/2,l+=s<i?c:-c,l<o-a||l>r+a)))return l}function Dd(e,i){z(e,t=>{let n=t.gc,s=n.length/2,o;if(s>i){for(o=0;o<s;++o)delete t.data[n[o]];n.splice(0,s)}})}function oi(e){return e.drawTicks?e.tickLength:0}function Pr(e,i){if(!e.display)return 0;let t=K(e.font,i),n=it(e.padding);return(j(e.text)?e.text.length:1)*t.lineHeight+n.height}function Ed(e,i){return Rt(e,{scale:i,type:"scale"})}function Id(e,i,t){return Rt(e,{tick:t,index:i,type:"tick"})}function Ld(e,i,t){let n=Vi(e);return(t&&i!=="right"||!t&&i==="right")&&(n=Ad(n)),n}function Fd(e,i,t,n){let{top:s,left:o,bottom:r,right:a,chart:l}=e,{chartArea:c,scales:h}=l,d=0,f,u,p,m=r-s,g=a-o;if(e.isHorizontal()){if(u=et(n,o,a),I(t)){let x=Object.keys(t)[0],b=t[x];p=h[x].getPixelForValue(b)+m-i}else t==="center"?p=(c.bottom+c.top)/2+m-i:p=Sr(e,t,i);f=a-o}else{if(I(t)){let x=Object.keys(t)[0],b=t[x];u=h[x].getPixelForValue(b)-g+i}else t==="center"?u=(c.left+c.right)/2-g+i:u=Sr(e,t,i);p=et(n,r,s),d=t==="left"?-X:X}return{titleX:u,titleY:p,maxWidth:f,rotation:d}}var ue=class e extends ut{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:n,_suggestedMax:s}=this;return i=at(i,Number.POSITIVE_INFINITY),t=at(t,Number.NEGATIVE_INFINITY),n=at(n,Number.POSITIVE_INFINITY),s=at(s,Number.NEGATIVE_INFINITY),{min:at(i,n),max:at(t,s),minDefined:U(i),maxDefined:U(t)}}getMinMax(i){let{min:t,max:n,minDefined:s,maxDefined:o}=this.getUserBounds(),r;if(s&&o)return{min:t,max:n};let a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)r=a[l].controller.getMinMax(this,i),s||(t=Math.min(t,r.min)),o||(n=Math.max(n,r.max));return t=o&&t>n?n:t,n=s&&t>n?t:n,{min:at(t,at(n,t)),max:at(n,at(t,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let 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(){V(this.options.beforeUpdate,[this])}update(i,t,n){let{beginAtZero:s,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=i,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Go(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=a<this.ticks.length;this._convertTicksToLabels(l?kr(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=Md(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let i=this.options.reverse,t,n;this.isHorizontal()?(t=this.left,n=this.right):(t=this.top,n=this.bottom,i=!i),this._startPixel=t,this._endPixel=n,this._reversePixels=i,this._length=n-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){V(this.options.afterUpdate,[this])}beforeSetDimensions(){V(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){V(this.options.afterSetDimensions,[this])}_callHooks(i){this.chart.notifyPlugins(i,this.getContext()),V(this.options[i],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){V(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(i){let t=this.options.ticks,n,s,o;for(n=0,s=i.length;n<s;n++)o=i[n],o.label=V(t.callback,[o.value,n,i],this)}afterTickToLabelConversion(){V(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){V(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let i=this.options,t=i.ticks,n=Cr(this.ticks.length,i.ticks.maxTicksLimit),s=t.minRotation||0,o=t.maxRotation,r=s,a,l,c;if(!this._isVisible()||!t.display||s>=o||n<=1||!this.isHorizontal()){this.labelRotation=s;return}let h=this._getLabelSizes(),d=h.widest.width,f=h.highest.height,u=G(this.chart.width-d,0,this.maxWidth);a=i.offset?this.maxWidth/n:u/(n-1),d+6>a&&(a=u/(n-(i.offset?.5:1)),l=this.maxHeight-oi(i.grid)-t.padding-Pr(i.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),r=zi(Math.min(Math.asin(G((h.highest.height+6)/a,-1,1)),Math.asin(G(l/c,-1,1))-Math.asin(G(f/c,-1,1)))),r=Math.max(s,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){V(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){V(this.options.beforeFit,[this])}fit(){let i={width:0,height:0},{chart:t,options:{ticks:n,title:s,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){let l=Pr(s,t.options.font);if(a?(i.width=this.maxWidth,i.height=oi(o)+l):(i.height=this.maxHeight,i.width=oi(o)+l),n.display&&this.ticks.length){let{first:c,last:h,widest:d,highest:f}=this._getLabelSizes(),u=n.padding*2,p=gt(this.labelRotation),m=Math.cos(p),g=Math.sin(p);if(a){let x=n.mirror?0:g*d.width+m*f.height;i.height=Math.min(this.maxHeight,i.height+x+u)}else{let x=n.mirror?0:m*d.width+g*f.height;i.width=Math.min(this.maxWidth,i.width+x+u)}this._calculatePadding(c,h,g,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,n,s){let{ticks:{align:o,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){let h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1),f=0,u=0;l?c?(f=s*i.width,u=n*t.height):(f=n*i.height,u=s*t.width):o==="start"?u=t.width:o==="end"?f=i.width:o!=="inner"&&(f=i.width/2,u=t.width/2),this.paddingLeft=Math.max((f-h+r)*this.width/(this.width-h),0),this.paddingRight=Math.max((u-d+r)*this.width/(this.width-d),0)}else{let h=t.height/2,d=i.height/2;o==="start"?(h=0,d=i.height):o==="end"&&(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(){V(this.options.afterFit,[this])}isHorizontal(){let{axis:i,position:t}=this.options;return t==="top"||t==="bottom"||i==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(i){this.beforeTickToLabelConversion(),this.generateTickLabels(i);let t,n;for(t=0,n=i.length;t<n;t++)R(i[t].label)&&(i.splice(t,1),n--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let i=this._labelSizes;if(!i){let t=this.options.ticks.sampleSize,n=this.ticks;t<n.length&&(n=kr(n,t)),this._labelSizes=i=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return i}_computeLabelSizes(i,t,n){let{ctx:s,_longestTextCache:o}=this,r=[],a=[],l=Math.floor(t/Cr(t,n)),c=0,h=0,d,f,u,p,m,g,x,b,y,w,_;for(d=0;d<t;d+=l){if(p=i[d].label,m=this._resolveTickFontOptions(d),s.font=g=m.string,x=o[g]=o[g]||{data:{},gc:[]},b=m.lineHeight,y=w=0,!R(p)&&!j(p))y=Ze(s,x.data,x.gc,y,p),w=b;else if(j(p))for(f=0,u=p.length;f<u;++f)_=p[f],!R(_)&&!j(_)&&(y=Ze(s,x.data,x.gc,y,_),w+=b);r.push(y),a.push(w),c=Math.max(y,c),h=Math.max(w,h)}Dd(o,t);let v=r.indexOf(c),k=a.indexOf(h),M=A=>({width:r[A]||0,height:a[A]||0});return{first:M(0),last:M(t-1),widest:M(v),highest:M(k),widths:r,heights:a}}getLabelForValue(i){return i}getPixelForValue(i,t){return NaN}getValueForPixel(i){}getPixelForTick(i){let t=this.ticks;return i<0||i>t.length-1?null:this.getPixelForValue(t[i].value)}getPixelForDecimal(i){this._reversePixels&&(i=1-i);let t=this._startPixel+i*this._length;return Vo(this._alignToPixels?$t(this.chart,t,0):t)}getDecimalForPixel(i){let t=(i-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:i,max:t}=this;return i<0&&t<0?t:i>0&&t>0?i:0}getContext(i){let t=this.ticks||[];if(i>=0&&i<t.length){let n=t[i];return n.$context||(n.$context=Id(this.getContext(),i,n))}return this.$context||(this.$context=Ed(this.chart.getContext(),this))}_tickSize(){let i=this.options.ticks,t=gt(this.labelRotation),n=Math.abs(Math.cos(t)),s=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*n>a*s?a/n:l/s:l*s<a*n?l/n:a/s}_isVisible(){let i=this.options.display;return i!=="auto"?!!i:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(i){let t=this.axis,n=this.chart,s=this.options,{grid:o,position:r,border:a}=s,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=oi(o),u=[],p=a.setContext(this.getContext()),m=p.display?p.width:0,g=m/2,x=function($){return $t(n,$,m)},b,y,w,_,v,k,M,A,E,D,L,Z;if(r==="top")b=x(this.bottom),k=this.bottom-f,A=b-g,D=x(i.top)+g,Z=i.bottom;else if(r==="bottom")b=x(this.top),D=i.top,Z=x(i.bottom)-g,k=b+g,A=this.top+f;else if(r==="left")b=x(this.right),v=this.right-f,M=b-g,E=x(i.left)+g,L=i.right;else if(r==="right")b=x(this.left),E=i.left,L=x(i.right)-g,v=b+g,M=this.left+f;else if(t==="x"){if(r==="center")b=x((i.top+i.bottom)/2+.5);else if(I(r)){let $=Object.keys(r)[0],q=r[$];b=x(this.chart.scales[$].getPixelForValue(q))}D=i.top,Z=i.bottom,k=b+g,A=k+f}else if(t==="y"){if(r==="center")b=x((i.left+i.right)/2);else if(I(r)){let $=Object.keys(r)[0],q=r[$];b=x(this.chart.scales[$].getPixelForValue(q))}v=b-g,M=v-f,E=i.left,L=i.right}let dt=T(s.ticks.maxTicksLimit,d),B=Math.max(1,Math.ceil(d/dt));for(y=0;y<d;y+=B){let $=this.getContext(y),q=o.setContext($),bt=a.setContext($),nt=q.lineWidth,pe=q.color,wi=bt.dash||[],me=bt.dashOffset,Ne=q.tickWidth,ie=q.tickColor,We=q.tickBorderDash||[],ne=q.tickBorderDashOffset;w=Td(this,y,l),w!==void 0&&(_=$t(n,w,nt),c?v=M=E=L=_:k=A=D=Z=_,u.push({tx1:v,ty1:k,tx2:M,ty2:A,x1:E,y1:D,x2:L,y2:Z,width:nt,color:pe,borderDash:wi,borderDashOffset:me,tickWidth:Ne,tickColor:ie,tickBorderDash:We,tickBorderDashOffset:ne}))}return this._ticksLength=d,this._borderValue=b,u}_computeLabelItems(i){let t=this.axis,n=this.options,{position:s,ticks:o}=n,r=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=o,f=oi(n.grid),u=f+h,p=d?-h:u,m=-gt(this.labelRotation),g=[],x,b,y,w,_,v,k,M,A,E,D,L,Z="middle";if(s==="top")v=this.bottom-p,k=this._getXAxisLabelAlignment();else if(s==="bottom")v=this.top+p,k=this._getXAxisLabelAlignment();else if(s==="left"){let B=this._getYAxisLabelAlignment(f);k=B.textAlign,_=B.x}else if(s==="right"){let B=this._getYAxisLabelAlignment(f);k=B.textAlign,_=B.x}else if(t==="x"){if(s==="center")v=(i.top+i.bottom)/2+u;else if(I(s)){let B=Object.keys(s)[0],$=s[B];v=this.chart.scales[B].getPixelForValue($)+u}k=this._getXAxisLabelAlignment()}else if(t==="y"){if(s==="center")_=(i.left+i.right)/2-u;else if(I(s)){let B=Object.keys(s)[0],$=s[B];_=this.chart.scales[B].getPixelForValue($)}k=this._getYAxisLabelAlignment(f).textAlign}t==="y"&&(l==="start"?Z="top":l==="end"&&(Z="bottom"));let dt=this._getLabelSizes();for(x=0,b=a.length;x<b;++x){y=a[x],w=y.label;let B=o.setContext(this.getContext(x));M=this.getPixelForTick(x)+o.labelOffset,A=this._resolveTickFontOptions(x),E=A.lineHeight,D=j(w)?w.length:1;let $=D/2,q=B.color,bt=B.textStrokeColor,nt=B.textStrokeWidth,pe=k;r?(_=M,k==="inner"&&(x===b-1?pe=this.options.reverse?"left":"right":x===0?pe=this.options.reverse?"right":"left":pe="center"),s==="top"?c==="near"||m!==0?L=-D*E+E/2:c==="center"?L=-dt.highest.height/2-$*E+E:L=-dt.highest.height+E/2:c==="near"||m!==0?L=E/2:c==="center"?L=dt.highest.height/2-$*E:L=dt.highest.height-D*E,d&&(L*=-1),m!==0&&!B.showLabelBackdrop&&(_+=E/2*Math.sin(m))):(v=M,L=(1-D)*E/2);let wi;if(B.showLabelBackdrop){let me=it(B.backdropPadding),Ne=dt.heights[x],ie=dt.widths[x],We=L-me.top,ne=0-me.left;switch(Z){case"middle":We-=Ne/2;break;case"bottom":We-=Ne;break}switch(k){case"center":ne-=ie/2;break;case"right":ne-=ie;break;case"inner":x===b-1?ne-=ie:x>0&&(ne-=ie/2);break}wi={left:ne,top:We,width:ie+me.width,height:Ne+me.height,color:B.backdropColor}}g.push({label:w,font:A,textOffset:L,options:{rotation:m,color:q,strokeColor:bt,strokeWidth:nt,textAlign:pe,textBaseline:Z,translation:[_,v],backdrop:wi}})}return g}_getXAxisLabelAlignment(){let{position:i,ticks:t}=this.options;if(-gt(this.labelRotation))return i==="top"?"left":"right";let s="center";return t.align==="start"?s="left":t.align==="end"?s="right":t.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(i){let{position:t,ticks:{crossAlign:n,mirror:s,padding:o}}=this.options,r=this._getLabelSizes(),a=i+o,l=r.widest.width,c,h;return t==="left"?s?(h=this.right+o,n==="near"?c="left":n==="center"?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-a,n==="near"?c="right":n==="center"?(c="center",h-=l/2):(c="left",h=this.left)):t==="right"?s?(h=this.left+o,n==="near"?c="right":n==="center"?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+a,n==="near"?c="left":n==="center"?(c="center",h+=l/2):(c="right",h=this.right)):c="right",{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;let i=this.chart,t=this.options.position;if(t==="left"||t==="right")return{top:0,left:this.left,bottom:i.height,right:this.right};if(t==="top"||t==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:i.width}}drawBackground(){let{ctx:i,options:{backgroundColor:t},left:n,top:s,width:o,height:r}=this;t&&(i.save(),i.fillStyle=t,i.fillRect(n,s,o,r),i.restore())}getLineWidthForValue(i){let t=this.options.grid;if(!this._isVisible()||!t.display)return 0;let s=this.ticks.findIndex(o=>o.value===i);return s>=0?t.setContext(this.getContext(s)).lineWidth:0}drawGrid(i){let t=this.options.grid,n=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(i)),o,r,a=(l,c,h)=>{!h.width||!h.color||(n.save(),n.lineWidth=h.width,n.strokeStyle=h.color,n.setLineDash(h.borderDash||[]),n.lineDashOffset=h.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(c.x,c.y),n.stroke(),n.restore())};if(t.display)for(o=0,r=s.length;o<r;++o){let l=s[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(){let{chart:i,ctx:t,options:{border:n,grid:s}}=this,o=n.setContext(this.getContext()),r=n.display?o.width:0;if(!r)return;let a=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue,c,h,d,f;this.isHorizontal()?(c=$t(i,this.left,r)-r/2,h=$t(i,this.right,a)+a/2,d=f=l):(d=$t(i,this.top,r)-r/2,f=$t(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,f),t.stroke(),t.restore()}drawLabels(i){if(!this.options.ticks.display)return;let n=this.ctx,s=this._computeLabelArea();s&&ti(n,s);let o=this.getLabelItems(i);for(let r of o){let a=r.options,l=r.font,c=r.label,h=r.textOffset;Ut(n,c,0,h,l,a)}s&&ei(n)}drawTitle(){let{ctx:i,options:{position:t,title:n,reverse:s}}=this;if(!n.display)return;let o=K(n.font),r=it(n.padding),a=n.align,l=o.lineHeight/2;t==="bottom"||t==="center"||I(t)?(l+=r.bottom,j(n.text)&&(l+=o.lineHeight*(n.text.length-1))):l+=r.top;let{titleX:c,titleY:h,maxWidth:d,rotation:f}=Fd(this,l,t,a);Ut(i,n.text,0,0,o,{color:n.color,maxWidth:d,rotation:f,textAlign:Ld(a,t,s),textBaseline:"middle",translation:[c,h]})}draw(i){this._isVisible()&&(this.drawBackground(),this.drawGrid(i),this.drawBorder(),this.drawTitle(),this.drawLabels(i))}_layers(){let i=this.options,t=i.ticks&&i.ticks.z||0,n=T(i.grid&&i.grid.z,-1),s=T(i.border&&i.border.z,0);return!this._isVisible()||this.draw!==e.prototype.draw?[{z:t,draw:o=>{this.draw(o)}}]:[{z:n,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:t,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(i){let t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",s=[],o,r;for(o=0,r=t.length;o<r;++o){let a=t[o];a[n]===this.id&&(!i||a.type===i)&&s.push(a)}return s}_resolveTickFontOptions(i){let t=this.options.ticks.setContext(this.getContext(i));return K(t.font)}_maxDigits(){let i=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/i}},Ae=class{constructor(i,t,n){this.type=i,this.scope=t,this.override=n,this.items=Object.create(null)}isForType(i){return Object.prototype.isPrototypeOf.call(this.type.prototype,i.prototype)}register(i){let t=Object.getPrototypeOf(i),n;Bd(t)&&(n=this.register(t));let s=this.items,o=i.id,r=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+i);return o in s||(s[o]=i,Rd(i,r,n),this.override&&H.override(i.id,i.overrides)),r}get(i){return this.items[i]}unregister(i){let t=this.items,n=i.id,s=this.scope;n in t&&delete t[n],s&&n in H[s]&&(delete H[s][n],this.override&&delete Yt[n])}};function Rd(e,i,t){let n=be(Object.create(null),[t?H.get(t):{},H.get(i),e.defaults]);H.set(i,n),e.defaultRoutes&&zd(i,e.defaultRoutes),e.descriptors&&H.describe(i,e.descriptors)}function zd(e,i){Object.keys(i).forEach(t=>{let n=t.split("."),s=n.pop(),o=[e].concat(n).join("."),r=i[t].split("."),a=r.pop(),l=r.join(".");H.route(o,s,l,a)})}function Bd(e){return"id"in e&&"defaults"in e}var ys=class{constructor(){this.controllers=new Ae(Gt,"datasets",!0),this.elements=new Ae(ut,"elements"),this.plugins=new Ae(Object,"plugins"),this.scales=new Ae(ue,"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,n){[...t].forEach(s=>{let o=n||this._getRegistryForType(s);n||o.isForType(s)||o===this.plugins&&s.id?this._exec(i,o,s):z(s,r=>{let a=n||this._getRegistryForType(r);this._exec(i,a,r)})})}_exec(i,t,n){let s=Ri(i);V(n["before"+s],[],n),t[i](n),V(n["after"+s],[],n)}_getRegistryForType(i){for(let t=0;t<this._typedRegistries.length;t++){let n=this._typedRegistries[t];if(n.isForType(i))return n}return this.plugins}_get(i,t,n){let s=t.get(i);if(s===void 0)throw new Error('"'+i+'" is not a registered '+n+".");return s}},kt=new ys,vs=class{constructor(){this._init=[]}notify(i,t,n,s){t==="beforeInit"&&(this._init=this._createDescriptors(i,!0),this._notify(this._init,i,"install"));let o=s?this._descriptors(i).filter(s):this._descriptors(i),r=this._notify(o,i,t,n);return t==="afterDestroy"&&(this._notify(o,i,"stop"),this._notify(this._init,i,"uninstall")),r}_notify(i,t,n,s){s=s||{};for(let o of i){let r=o.plugin,a=r[n],l=[t,s,o.options];if(V(a,l,r)===!1&&s.cancelable)return!1}return!0}invalidate(){R(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(i){if(this._cache)return this._cache;let t=this._cache=this._createDescriptors(i);return this._notifyStateChanges(i),t}_createDescriptors(i,t){let n=i&&i.config,s=T(n.options&&n.options.plugins,{}),o=Vd(n);return s===!1&&!t?[]:Nd(i,o,s,t)}_notifyStateChanges(i){let t=this._oldCache||[],n=this._cache,s=(o,r)=>o.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(s(t,n),i,"stop"),this._notify(s(n,t),i,"start")}};function Vd(e){let i={},t=[],n=Object.keys(kt.plugins.items);for(let o=0;o<n.length;o++)t.push(kt.getPlugin(n[o]));let s=e.plugins||[];for(let o=0;o<s.length;o++){let r=s[o];t.indexOf(r)===-1&&(t.push(r),i[r.id]=!0)}return{plugins:t,localIds:i}}function jd(e,i){return!i&&e===!1?null:e===!0?{}:e}function Nd(e,{plugins:i,localIds:t},n,s){let o=[],r=e.getContext();for(let a of i){let l=a.id,c=jd(n[l],s);c!==null&&o.push({plugin:a,options:Wd(e.config,{plugin:a,local:t[l]},c,r)})}return o}function Wd(e,{plugin:i,local:t},n,s){let o=e.pluginScopeKeys(i),r=e.getOptionScopes(n,o);return t&&i.defaults&&r.push(i.defaults),e.createResolver(r,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function ws(e,i){let t=H.datasets[e]||{};return((i.datasets||{})[e]||{}).indexAxis||i.indexAxis||t.indexAxis||"x"}function Hd(e,i){let t=e;return e==="_index_"?t=i:e==="_value_"&&(t=i==="x"?"y":"x"),t}function Yd(e,i){return e===i?"_index_":"_value_"}function Or(e){if(e==="x"||e==="y"||e==="r")return e}function $d(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Ms(e,...i){if(Or(e))return e;for(let t of i){let n=t.axis||$d(t.position)||e.length>1&&Or(e[0].toLowerCase());if(n)return n}throw new Error("Cannot determine type of '".concat(e,"' axis. Please provide 'axis' or 'position' option."))}function Ar(e,i,t){if(t[i+"AxisID"]===e)return{axis:i}}function Ud(e,i){if(i.data&&i.data.datasets){let t=i.data.datasets.filter(n=>n.xAxisID===e||n.yAxisID===e);if(t.length)return Ar(e,"x",t[0])||Ar(e,"y",t[0])}return{}}function Xd(e,i){let t=Yt[e.type]||{scales:{}},n=i.scales||{},s=ws(e.type,i),o=Object.create(null);return Object.keys(n).forEach(r=>{let a=n[r];if(!I(a))return console.error("Invalid scale configuration for scale: ".concat(r));if(a._proxy)return console.warn("Ignoring resolver passed as options for scale: ".concat(r));let l=Ms(r,a,Ud(r,e),H.scales[a.type]),c=Yd(l,s),h=t.scales||{};o[r]=ye(Object.create(null),[{axis:l},a,h[l],h[c]])}),e.data.datasets.forEach(r=>{let a=r.type||e.type,l=r.indexAxis||ws(a,i),h=(Yt[a]||{}).scales||{};Object.keys(h).forEach(d=>{let f=Hd(d,l),u=r[f+"AxisID"]||f;o[u]=o[u]||Object.create(null),ye(o[u],[{axis:f},n[u],h[d]])})}),Object.keys(o).forEach(r=>{let a=o[r];ye(a,[H.scales[a.type],H.scale])}),o}function ga(e){let i=e.options||(e.options={});i.plugins=T(i.plugins,{}),i.scales=Xd(e,i)}function xa(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function qd(e){return e=e||{},e.data=xa(e.data),ga(e),e}var Tr=new Map,ba=new Set;function Ki(e,i){let t=Tr.get(e);return t||(t=i(),Tr.set(e,t),ba.add(t)),t}var ri=(e,i,t)=>{let n=Ft(i,t);n!==void 0&&e.add(n)},Ss=class{constructor(i){this._config=qd(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=xa(i)}get options(){return this._config.options}set options(i){this._config.options=i}get plugins(){return this._config.plugins}update(){let i=this._config;this.clearCache(),ga(i)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(i){return Ki(i,()=>[["datasets.".concat(i),""]])}datasetAnimationScopeKeys(i,t){return Ki("".concat(i,".transition.").concat(t),()=>[["datasets.".concat(i,".transitions.").concat(t),"transitions.".concat(t)],["datasets.".concat(i),""]])}datasetElementScopeKeys(i,t){return Ki("".concat(i,"-").concat(t),()=>[["datasets.".concat(i,".elements.").concat(t),"datasets.".concat(i),"elements.".concat(t),""]])}pluginScopeKeys(i){let t=i.id,n=this.type;return Ki("".concat(n,"-plugin-").concat(t),()=>[["plugins.".concat(t),...i.additionalOptionScopes||[]]])}_cachedScopes(i,t){let n=this._scopeCache,s=n.get(i);return(!s||t)&&(s=new Map,n.set(i,s)),s}getOptionScopes(i,t,n){let{options:s,type:o}=this,r=this._cachedScopes(i,n),a=r.get(t);if(a)return a;let l=new Set;t.forEach(h=>{i&&(l.add(i),h.forEach(d=>ri(l,i,d))),h.forEach(d=>ri(l,s,d)),h.forEach(d=>ri(l,Yt[o]||{},d)),h.forEach(d=>ri(l,H,d)),h.forEach(d=>ri(l,ji,d))});let c=Array.from(l);return c.length===0&&c.push(Object.create(null)),ba.has(t)&&r.set(t,c),c}chartOptionScopes(){let{options:i,type:t}=this;return[i,Yt[t]||{},H.datasets[t]||{},{type:t},H,ji]}resolveNamedOptions(i,t,n,s=[""]){let o={$shared:!0},{resolver:r,subPrefixes:a}=Dr(this._resolverCache,i,s),l=r;if(Gd(r,t)){o.$shared=!1,n=It(n)?n():n;let c=this.createResolver(i,n,a);l=re(r,n,c)}for(let c of t)o[c]=l[c];return o}createResolver(i,t,n=[""],s){let{resolver:o}=Dr(this._resolverCache,i,n);return I(t)?re(o,t,void 0,s):o}};function Dr(e,i,t){let n=e.get(i);n||(n=new Map,e.set(i,n));let s=t.join(),o=n.get(s);return o||(o={resolver:Hi(i,t),subPrefixes:t.filter(a=>!a.toLowerCase().includes("hover"))},n.set(s,o)),o}var Kd=e=>I(e)&&Object.getOwnPropertyNames(e).some(i=>It(e[i]));function Gd(e,i){let{isScriptable:t,isIndexable:n}=Gn(e);for(let s of i){let o=t(s),r=n(s),a=(r||o)&&e[s];if(o&&(It(a)||Kd(a))||r&&j(a))return!0}return!1}var Zd="4.4.4",Jd=["top","bottom","left","right","chartArea"];function Er(e,i){return e==="top"||e==="bottom"||Jd.indexOf(e)===-1&&i==="x"}function Ir(e,i){return function(t,n){return t[e]===n[e]?t[i]-n[i]:t[e]-n[e]}}function Lr(e){let i=e.chart,t=i.options.animation;i.notifyPlugins("afterRender"),V(t&&t.onComplete,[e],i)}function Qd(e){let i=e.chart,t=i.options.animation;V(t&&t.onProgress,[e],i)}function _a(e){return Yi()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}var en={},Fr=e=>{let i=_a(e);return Object.values(en).filter(t=>t.canvas===i).pop()};function tf(e,i,t){let n=Object.keys(e);for(let s of n){let o=+s;if(o>=i){let r=e[s];delete e[s],(t>0||o>i)&&(e[o+t]=r)}}}function ef(e,i,t,n){return!t||e.type==="mouseout"?null:n?i:e}function Gi(e,i,t){return e.options.clip?e[t]:i[t]}function nf(e,i){let{xScale:t,yScale:n}=e;return t&&n?{left:Gi(t,i,"left"),right:Gi(t,i,"right"),top:Gi(n,i,"top"),bottom:Gi(n,i,"bottom")}:i}var cn=(()=>{class e{static register(...t){kt.add(...t),Rr()}static unregister(...t){kt.remove(...t),Rr()}constructor(t,n){let s=this.config=new Ss(n),o=_a(t),r=Fr(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.");let a=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||wd(o)),this.platform.updateConfig(s);let l=this.platform.acquireContext(o,a.aspectRatio),c=l&&l.canvas,h=c&&c.height,d=c&&c.width;if(this.id=Io(),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 vs,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Yo(f=>this.update(f),a.resizeDelay||0),this._dataChanges=[],en[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}zt.listen(this,"complete",Lr),zt.listen(this,"progress",Qd),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:n},width:s,height:o,_aspectRatio:r}=this;return R(t)?n&&r?r:o?s/o:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return kt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ts(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Xn(this.canvas,this.ctx),this}stop(){return zt.stop(this),this}resize(t,n){zt.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){let s=this.options,o=this.canvas,r=s.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(o,t,n,r),l=s.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,ts(this,l,!0)&&(this.notifyPlugins("resize",{size:a}),V(s.onResize,[this,a],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){let n=this.options.scales||{};z(n,(s,o)=>{s.id=o})}buildOrUpdateScales(){let t=this.options,n=t.scales,s=this.scales,o=Object.keys(s).reduce((a,l)=>(a[l]=!1,a),{}),r=[];n&&(r=r.concat(Object.keys(n).map(a=>{let l=n[a],c=Ms(a,l),h=c==="r",d=c==="x";return{options:l,dposition:h?"chartArea":d?"bottom":"left",dtype:h?"radialLinear":d?"category":"linear"}}))),z(r,a=>{let l=a.options,c=l.id,h=Ms(c,l),d=T(l.type,a.dtype);(l.position===void 0||Er(l.position,h)!==Er(a.dposition))&&(l.position=a.dposition),o[c]=!0;let f=null;if(c in s&&s[c].type===d)f=s[c];else{let u=kt.getScale(d);f=new u({id:c,type:d,ctx:this.ctx,chart:this}),s[f.id]=f}f.init(l,t)}),z(o,(a,l)=>{a||delete s[l]}),z(s,a=>{st.configure(this,a,a.options),st.addBox(this,a)})}_updateMetasets(){let t=this._metasets,n=this.data.datasets.length,s=t.length;if(t.sort((o,r)=>o.index-r.index),s>n){for(let o=n;o<s;++o)this._destroyDatasetMeta(o);t.splice(n,s-n)}this._sortedMetasets=t.slice(0).sort(Ir("order","index"))}_removeUnreferencedMetasets(){let{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((s,o)=>{n.filter(r=>r===s._dataset).length===0&&this._destroyDatasetMeta(o)})}buildOrUpdateControllers(){let t=[],n=this.data.datasets,s,o;for(this._removeUnreferencedMetasets(),s=0,o=n.length;s<o;s++){let r=n[s],a=this.getDatasetMeta(s),l=r.type||this.config.type;if(a.type&&a.type!==l&&(this._destroyDatasetMeta(s),a=this.getDatasetMeta(s)),a.type=l,a.indexAxis=r.indexAxis||ws(l,this.options),a.order=r.order||0,a.index=s,a.label=""+r.label,a.visible=this.isDatasetVisible(s),a.controller)a.controller.updateIndex(s),a.controller.linkScales();else{let c=kt.getController(l),{datasetElementType:h,dataElementType:d}=H.datasets[l];Object.assign(c,{dataElementType:kt.getElement(d),datasetElementType:h&&kt.getElement(h)}),a.controller=new c(this,s),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){z(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let n=this.config;n.update();let s=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),o=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let h=0,d=this.data.datasets.length;h<d;h++){let{controller:f}=this.getDatasetMeta(h),u=!o&&r.indexOf(f)===-1;f.buildOrUpdateElements(u),a=Math.max(+f.getMaxOverflow(),a)}a=this._minPadding=s.layout.autoPadding?a:0,this._updateLayout(a),o||z(r,h=>{h.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Ir("z","_idx"));let{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){z(this.scales,t=>{st.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,n=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!Ln(n,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(let{method:s,start:o,count:r}of n){let a=s==="_removeElements"?-r:r;tf(t,o,a)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let n=this.data.datasets.length,s=r=>new Set(t.filter(a=>a[0]===r).map((a,l)=>l+","+a.splice(1).join(","))),o=s(0);for(let r=1;r<n;r++)if(!Ln(o,s(r)))return;return Array.from(o).map(r=>r.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;st.update(this,this.width,this.height,t);let n=this.chartArea,s=n.width<=0||n.height<=0;this._layers=[],z(this.boxes,o=>{s&&o.position==="chartArea"||(o.configure&&o.configure(),this._layers.push(...o._layers()))},this),this._layers.forEach((o,r)=>{o._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,s=this.data.datasets.length;n<s;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,s=this.data.datasets.length;n<s;++n)this._updateDataset(n,It(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){let s=this.getDatasetMeta(t),o={meta:s,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",o)!==!1&&(s.controller._update(n),o.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",o))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(zt.has(this)?this.attached&&!zt.running(this)&&zt.start(this):(this.draw(),Lr({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){let{width:s,height:o}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(s,o)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;let n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){let n=this._sortedMetasets,s=[],o,r;for(o=0,r=n.length;o<r;++o){let a=n[o];(!t||a.visible)&&s.push(a)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;let t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let n=this.ctx,s=t._clip,o=!s.disabled,r=nf(t,this.chartArea),a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(o&&ti(n,{left:s.left===!1?0:r.left-s.left,right:s.right===!1?this.width:r.right+s.right,top:s.top===!1?0:r.top-s.top,bottom:s.bottom===!1?this.height:r.bottom+s.bottom}),t.controller.draw(),o&&ei(n),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return wt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,s,o){let r=nd.modes[n];return typeof r=="function"?r(this,t,s,o):[]}getDatasetMeta(t){let n=this.data.datasets[t],s=this._metasets,o=s.filter(r=>r&&r._dataset===n).pop();return o||(o={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},s.push(o)),o}getContext(){return this.$context||(this.$context=Rt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let n=this.data.datasets[t];if(!n)return!1;let s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!n.hidden}setDatasetVisibility(t,n){let s=this.getDatasetMeta(t);s.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,s){let o=s?"show":"hide",r=this.getDatasetMeta(t),a=r.controller._resolveAnimations(void 0,o);ve(n)?(r.data[n].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),a.update(r,{visible:s}),this.update(l=>l.datasetIndex===t?o:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){let n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),zt.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");let{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Xn(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete en[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let t=this._listeners,n=this.platform,s=(r,a)=>{n.addEventListener(this,r,a),t[r]=a},o=(r,a,l)=>{r.offsetX=a,r.offsetY=l,this._eventHandler(r)};z(this.options.events,r=>s(r,o))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,n=this.platform,s=(c,h)=>{n.addEventListener(this,c,h),t[c]=h},o=(c,h)=>{t[c]&&(n.removeEventListener(this,c,h),delete t[c])},r=(c,h)=>{this.canvas&&this.resize(c,h)},a,l=()=>{o("attach",l),this.attached=!0,this.resize(),s("resize",r),s("detach",a)};a=()=>{this.attached=!1,o("resize",r),this._stop(),this._resize(0,0),s("attach",l)},n.isAttached(this.canvas)?l():a()}unbindEvents(){z(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},z(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,s){let o=s?"set":"remove",r,a,l,c;for(n==="dataset"&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+o+"DatasetHoverStyle"]()),l=0,c=t.length;l<c;++l){a=t[l];let h=a&&this.getDatasetMeta(a.datasetIndex).controller;h&&h[o+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){let n=this._active||[],s=t.map(({datasetIndex:r,index:a})=>{let l=this.getDatasetMeta(r);if(!l)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:l.data[a],index:a}});!Je(s,n)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,n))}notifyPlugins(t,n,s){return this._plugins.notify(this,t,n,s)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,s){let o=this.options.hover,r=(c,h)=>c.filter(d=>!h.some(f=>d.datasetIndex===f.datasetIndex&&d.index===f.index)),a=r(n,t),l=s?t:r(t,n);a.length&&this.updateHoverStyle(a,o.mode,!1),l.length&&o.mode&&this.updateHoverStyle(l,o.mode,!0)}_eventHandler(t,n){let s={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},o=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,o)===!1)return;let r=this._handleEvent(t,n,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,o),(r||s.changed)&&this.render(),this}_handleEvent(t,n,s){let{_active:o=[],options:r}=this,a=n,l=this._getActiveElements(t,o,s,a),c=Ro(t),h=ef(t,this._lastEvent,s,c);s&&(this._lastEvent=null,V(r.onHover,[t,l,this],this),c&&V(r.onClick,[t,l,this],this));let d=!Je(l,o);return(d||n)&&(this._active=l,this._updateHoverStyles(l,o,n)),this._lastEvent=h,d}_getActiveElements(t,n,s,o){if(t.type==="mouseout")return[];if(!s)return n;let r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,o)}}return S(e,"defaults",H),S(e,"instances",en),S(e,"overrides",Yt),S(e,"registry",kt),S(e,"version",Zd),S(e,"getChart",Fr),e})();function Rr(){return z(cn.instances,e=>e._plugins.invalidate())}function sf(e,i,t){let{startAngle:n,pixelMargin:s,x:o,y:r,outerRadius:a,innerRadius:l}=i,c=s/a;e.beginPath(),e.arc(o,r,a,n-c,t+c),l>s?(c=s/l,e.arc(o,r,l,t+c,n-c,!0)):e.arc(o,r,s,t+X,n-X),e.closePath(),e.clip()}function of(e){return Wi(e,["outerStart","outerEnd","innerStart","innerEnd"])}function rf(e,i,t,n){let s=of(e.options.borderRadius),o=(t-i)/2,r=Math.min(o,n*i/2),a=l=>{let c=(t-Math.min(o,l))*n/2;return G(l,0,Math.min(o,c))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:G(s.innerStart,0,r),innerEnd:G(s.innerEnd,0,r)}}function Pe(e,i,t,n){return{x:t+e*Math.cos(i),y:n+e*Math.sin(i)}}function rn(e,i,t,n,s,o){let{x:r,y:a,startAngle:l,pixelMargin:c,innerRadius:h}=i,d=Math.max(i.outerRadius+n+t-c,0),f=h>0?h+n+t+c:0,u=0,p=s-l;if(n){let B=h>0?h-n:0,$=d>0?d-n:0,q=(B+$)/2,bt=q!==0?p*q/(q+n):p;u=(p-bt)/2}let m=Math.max(.001,p*d-t/N)/d,g=(p-m)/2,x=l+g+u,b=s-g-u,{outerStart:y,outerEnd:w,innerStart:_,innerEnd:v}=rf(i,f,d,b-x),k=d-y,M=d-w,A=x+y/k,E=b-w/M,D=f+_,L=f+v,Z=x+_/D,dt=b-v/L;if(e.beginPath(),o){let B=(A+E)/2;if(e.arc(r,a,d,A,B),e.arc(r,a,d,B,E),w>0){let nt=Pe(M,E,r,a);e.arc(nt.x,nt.y,w,E,b+X)}let $=Pe(L,b,r,a);if(e.lineTo($.x,$.y),v>0){let nt=Pe(L,dt,r,a);e.arc(nt.x,nt.y,v,b+X,dt+Math.PI)}let q=(b-v/f+(x+_/f))/2;if(e.arc(r,a,f,b-v/f,q,!0),e.arc(r,a,f,q,x+_/f,!0),_>0){let nt=Pe(D,Z,r,a);e.arc(nt.x,nt.y,_,Z+Math.PI,x-X)}let bt=Pe(k,x,r,a);if(e.lineTo(bt.x,bt.y),y>0){let nt=Pe(k,A,r,a);e.arc(nt.x,nt.y,y,x-X,A)}}else{e.moveTo(r,a);let B=Math.cos(A)*d+r,$=Math.sin(A)*d+a;e.lineTo(B,$);let q=Math.cos(E)*d+r,bt=Math.sin(E)*d+a;e.lineTo(q,bt)}e.closePath()}function af(e,i,t,n,s){let{fullCircles:o,startAngle:r,circumference:a}=i,l=i.endAngle;if(o){rn(e,i,t,n,l,s);for(let c=0;c<o;++c)e.fill();
1isNaN(a)||(l=r+(a%W||W))}return rn(e,i,t,n,l,s),e.fill(),l}function lf(e,i,t,n,s){let{fullCircles:o,startAngle:r,circumference:a,options:l}=i,{borderWidth:c,borderJoinStyle:h,borderDash:d,borderDashOffset:f}=l,u=l.borderAlign==="inner";if(!c)return;e.setLineDash(d||[]),e.lineDashOffset=f,u?(e.lineWidth=c*2,e.lineJoin=h||"round"):(e.lineWidth=c,e.lineJoin=h||"bevel");let p=i.endAngle;if(o){rn(e,i,t,n,p,s);for(let m=0;m<o;++m)e.stroke();isNaN(a)||(p=r+(a%W||W))}u&&sf(e,i,p),o||(rn(e,i,t,n,p,s),e.stroke())}var de=class extends ut{constructor(t){super();S(this,"circumference");S(this,"endAngle");S(this,"fullCircles");S(this,"innerRadius");S(this,"outerRadius");S(this,"pixelMargin");S(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,n,s){let o=this.getProps(["x","y"],s),{angle:r,distance:a}=Bn(o,{x:t,y:n}),{startAngle:l,endAngle:c,innerRadius:h,outerRadius:d,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),u=(this.options.spacing+this.options.borderWidth)/2,p=T(f,c-l),m=Me(r,l,c)&&l!==c,g=p>=W||m,x=St(a,h+u,d+u);return g&&x}getCenterPoint(t){let{x:n,y:s,startAngle:o,endAngle:r,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:c,spacing:h}=this.options,d=(o+r)/2,f=(a+l+h+c)/2;return{x:n+Math.cos(d)*f,y:s+Math.sin(d)*f}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){let{options:n,circumference:s}=this,o=(n.offset||0)/4,r=(n.spacing||0)/2,a=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=s>W?Math.floor(s/W):0,s===0||this.innerRadius<0||this.outerRadius<0)return;t.save();let l=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(l)*o,Math.sin(l)*o);let c=1-Math.sin(Math.min(N,s||0)),h=o*c;t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,af(t,this,h,r,a),lf(t,this,h,r,a),t.restore()}};S(de,"id","arc"),S(de,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),S(de,"defaultRoutes",{backgroundColor:"backgroundColor"}),S(de,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"});function ya(e,i,t=i){e.lineCap=T(t.borderCapStyle,i.borderCapStyle),e.setLineDash(T(t.borderDash,i.borderDash)),e.lineDashOffset=T(t.borderDashOffset,i.borderDashOffset),e.lineJoin=T(t.borderJoinStyle,i.borderJoinStyle),e.lineWidth=T(t.borderWidth,i.borderWidth),e.strokeStyle=T(t.borderColor,i.borderColor)}function cf(e,i,t){e.lineTo(t.x,t.y)}function hf(e){return e.stepped?qo:e.tension||e.cubicInterpolationMode==="monotone"?Ko:cf}function va(e,i,t={}){let n=e.length,{start:s=0,end:o=n-1}=t,{start:r,end:a}
1=i,l=Math.max(s,r),c=Math.min(o,a),h=s<r&&o<r||s>a&&o>a;return{count:n,start:l,loop:i.loop,ilen:c<l&&!h?n+c-l:c-l}}function df(e,i,t,n){let{points:s,options:o}=i,{count:r,start:a,loop:l,ilen:c}=va(s,t,n),h=hf(o),{move:d=!0,reverse:f}=n||{},u,p,m;for(u=0;u<=c;++u)p=s[(a+(f?c-u:u))%r],!p.skip&&(d?(e.moveTo(p.x,p.y),d=!1):h(e,m,p,f,o.stepped),m=p);return l&&(p=s[(a+(f?c:0))%r],h(e,m,p,f,o.stepped)),!!l}function ff(e,i,t,n){let s=i.points,{count:o,start:r,ilen:a}=va(s,t,n),{move:l=!0,reverse:c}=n||{},h=0,d=0,f,u,p,m,g,x,b=w=>(r+(c?a-w:w))%o,y=()=>{m!==g&&(e.lineTo(h,g),e.lineTo(h,m),e.lineTo(h,x))};for(l&&(u=s[b(0)],e.moveTo(u.x,u.y)),f=0;f<=a;++f){if(u=s[b(f)],u.skip)continue;let w=u.x,_=u.y,v=w|0;v===p?(_<m?m=_:_>g&&(g=_),h=(d*h+w)/++d):(y(),e.lineTo(w,_),p=v,d=0,m=g=_),x=_}y()}function Cs(e){let i=e.options,t=i.borderDash&&i.borderDash.length;return!e._decimated&&!e._loop&&!i.tension&&i.cubicInterpolationMode!=="monotone"&&!i.stepped&&!t?ff:df}function uf(e){return e.stepped?sr:e.tension||e.cubicInterpolationMode==="monotone"?or:Ht}function pf(e,i,t,n){let s=i._path;s||(s=i._path=new Path2D,i.path(s,t,n)&&s.closePath()),ya(e,i.options),e.stroke(s)}function mf(e,i,t,n){let{segments:s,options:o}=i,r=Cs(i);for(let a of s)ya(e,o,a.style),e.beginPath(),r(e,i,a,{start:t,end:t+n-1})&&e.closePath(),e.stroke()}var gf=typeof Path2D=="function";function xf(e,i,t,n){gf&&!i.options.segment?pf(e,i,t,n):mf(e,i,t,n)}var hn=(()=>{class e extends ut{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){let s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){let o=s.spanGaps?this._loop:this._fullLoop;er(this._points,s,t,o,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=ar(this,this.options.segment))}first(){let t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){let t=this.segments,n=this.points,s=t.length;return s&&n[t[s-1].end]}interpolate(t,n){let s=this.options,o=t[n],r=this.points,a=os(this,{property:n,start:o,end:o});if(!a.length)return;let l=[],c=uf(s),h,d;for(h=0,d=a.length;h<d;++h){let{start:f,end:u}=a[h],p=r[f],m=r[u];if(p===m){l.push(p);continue}let g=Math.abs((o-p[n])/(m[n]-p[n])),x=c(p,m,g,s.stepped);x[n]=t[n],l.push(x)}return l.length===1?l[0]:l}pathSegment(t,n,s){return Cs(this)(t,this,n,s)}path(t,n,s){let o=this.segments,r=Cs(this),a=this._loop;n=n||0,s=s||this.points.length-n;for(let l of o)a&=r(t,this,l,{start:n,end:n+s-1});return!!a}draw(t,n,s,o){let r=this.options||{};(this.points||[]).length&&r.borderWidth&&(t.save(),xf(t,this,s,o),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}return S(e,"id","line"),S(e,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),S(e,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),S(e,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"}),e})();function zr(e,i,t,n){let s=e.options,{[t]:o}=e.getProps([t],n);return Math.abs(i-o)<s.radius+s.hitRadius}var bf=(()=>{class e extends ut{constructor(n){super();S(this,"parsed");S(this,"skip");S(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,s,o){let r=this.options,{x:a,y:l}=this.getProps(["x","y"],o);return Math.pow(n-a,2)+Math.pow(s-l,2)<Math.pow(r.hitRadius+r.radius,2)}inXRange(n,s){return zr(this,n,"x",s)}inYRange(n,s){return zr(this,n,"y",s)}getCenterPoint(n){let{x:s,y:o}=this.getProps(["x","y"],n);return{x:s,y:o}}size(n){n=n||this.options||{};let s=n.radius||0;s=Math.max(s,s&&n.hoverRadius||0);let o=s&&n.borderWidth||0;return(s+o)*2}draw(n,s){let o=this.options;this.skip||o.radius<.1||!wt(this,s,this.size(o)/2)||(n.strokeStyle=o.borderColor,n.lineWidth=o.borderWidth,n.fillStyle=o.backgroundColor,Ni(n,o,this.x,this.y))}getRange(){let n=this.options||{};return n.radius+n.hitRadius}}return S(e,"id","point"),S(e,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),S(e,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),e})();function wa(e,i){let{x:t,y:n,base:s,width:o,height:r}=e.getProps(["x","y","base","width","height"],i),a,l,c,h,d;return e.horizontal?(d=r/2,a=Math.min(t,s),l=Math.max(t,s),c=n-d,h=n+d):(d=o/2,a=t-d,l=t+d,c=Math.min(n,s),h=Math.max(n,s)),{left:a,top:c,right:l,bottom:h}}function Kt(e,i,t,n){return e?0:G(i,t,n)}function _f(e,i,t){let n=e.options.borderWidth,s=e.borderSkipped,o=Kn(n);
1return{t:Kt(s.top,o.top,0,t),r:Kt(s.right,o.right,0,i),b:Kt(s.bottom,o.bottom,0,t),l:Kt(s.left,o.left,0,i)}}function yf(e,i,t){let{enableBorderRadius:n}=e.getProps(["enableBorderRadius"]),s=e.options.borderRadius,o=Xt(s),r=Math.min(i,t),a=e.borderSkipped,l=n||I(s);return{topLeft:Kt(!l||a.top||a.left,o.topLeft,0,r),topRight:Kt(!l||a.top||a.right,o.topRight,0,r),bottomLeft:Kt(!l||a.bottom||a.left,o.bottomLeft,0,r),bottomRight:Kt(!l||a.bottom||a.right,o.bottomRight,0,r)}}function vf(e){let i=wa(e),t=i.right-i.left,n=i.bottom-i.top,s=_f(e,t/2,n/2),o=yf(e,t/2,n/2);return{outer:{x:i.left,y:i.top,w:t,h:n,radius:o},inner:{x:i.left+s.l,y:i.top+s.t,w:t-s.l-s.r,h:n-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function fs(e,i,t,n){let s=i===null,o=t===null,a=e&&!(s&&o)&&wa(e,n);return a&&(s||St(i,a.left,a.right))&&(o||St(t,a.top,a.bottom))}function wf(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Mf(e,i){e.rect(i.x,i.y,i.w,i.h)}function us(e,i,t={}){let n=e.x!==t.x?-i:0,s=e.y!==t.y?-i:0,o=(e.x+e.w!==t.x+t.w?i:0)-n,r=(e.y+e.h!==t.y+t.h?i:0)-s;return{x:e.x+n,y:e.y+s,w:e.w+o,h:e.h+r,radius:e.radius}}var Oe=class extends ut{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){let{inflateAmount:t,options:{borderColor:n,backgroundColor:s}}=this,{inner:o,outer:r}=vf(this),a=wf(r.radius)?Ce:Mf;i.save(),(r.w!==o.w||r.h!==o.h)&&(i.beginPath(),a(i,us(r,t,o)),i.clip(),a(i,us(o,-t,r)),i.fillStyle=n,i.fill("evenodd")),i.beginPath(),a(i,us(o,t)),i.fillStyle=s,i.fill(),i.restore()}inRange(i,t,n){return fs(this,i,t,n)}inXRange(i,t){return fs(this,i,null,t)}inYRange(i,t){return fs(this,null,i,t)}getCenterPoint(i){let{x:t,y:n,base:s,horizontal:o}=this.getProps(["x","y","base","horizontal"],i);return{x:o?(t+s)/2:t,y:o?n:(n+s)/2}}getRange(i){return i==="x"?this.width/2:this.height/2}};S(Oe,"id","bar"),S(Oe,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),S(Oe,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var Sf=Object.freeze({__proto__:null,ArcElement:de,BarElement:Oe,LineElement:hn,PointElement:bf}),ks=["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)"],Br=ks.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function Ma(e){return ks[e%ks.length]}function Sa(e){return Br[e%Br.length]}function Cf(e,i){return e.borderColor=Ma(i),e.backgroundColor=Sa(i),++i}function kf(e,i){return e.backgroundColor=e.data.map(()=>Ma(i++)),i}function Pf(e,i){return e.backgroundColor=e.data.map(()=>Sa(i++)),i}function Of(e){let i=0;return(t,n)=>{let s=e.getDatasetMeta(n).controller;s instanceof Ts?i=kf(t,i):s instanceof da?i=Pf(t,i):s&&(i=Cf(t,i))}}function Vr(e){let i;for(i in e)if(e[i].borderColor||e[i].backgroundColor)return!0;return!1}function Af(e){return e&&(e.borderColor||e.backgroundColor)}var Tf={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,i,t){if(!t.enabled)return;let{data:{datasets:n},options:s}=e.config,{elements:o}=s;if(!t.forceOverride&&(Vr(n)||Af(s)||o&&Vr(o)))return;let r=Of(e);n.forEach(r)}};function Df(e,i,t,n,s){let o=s.samples||n;if(o>=t)return e.slice(i,i+t);let r=[],a=(t-2)/(o-2),l=0,c=i+t-1,h=i,d,f,u,p,m;for(r[l++]=e[h],d=0;d<o-2;d++){let g=0,x=0,b,y=Math.floor((d+1)*a)+1+i,w=Math.min(Math.floor((d+2)*a)+1,t)+i,_=w-y;for(b=y;b<w;b++)g+=e[b].x,x+=e[b].y;g/=_,x/=_;let v=Math.floor(d*a)+1+i,k=Math.min(Math.floor((d+1)*a)+1,t)+i,{x:M,y:A}=e[h];for(u=p=-1,b=v;b<k;b++)p=.5*Math.abs((M-g)*(e[b].y-A)-(M-e[b].x)*(x-A)),p>u&&(u=p,f=e[b],m=b);r[l++]=f,h=m}return r[l++]=e[c],r}function Ef(e,i,t,n){let s=0,o=0,r,a,l,c,h,d,f,u,p,m,g=[],x=i+t-1,b=e[i].x,w=e[x].x-b;for(r=i;r<i+t;++r){a=e[r],l=(a.x-b)/w*n,c=a.y;let _=l|0;if(_===h)c<p?(p=c,d=r):c>m&&(m=c,f=r),s=(o*s+a.x)/++o;else{let v=r-1;if(!R(d)&&!R(f)){let k=Math.min(d,f),M=Math.max(d,f);k!==u&&k!==v&&g.push(Si(Mi({},e[k]),{x:s})),M!==u&&M!==v&&g.push(Si(Mi({},e[M]),{x:s}))}r>0&&v!==u&&g.push(e[v]),g.push(a),h=_,o=0,p=m=c,d=f=u=r}}return g}function Ca(e){if(e._decimated){let i=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:i})}}
1function jr(e){e.data.datasets.forEach(i=>{Ca(i)})}function If(e,i){let t=i.length,n=0,s,{iScale:o}=e,{min:r,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(n=G(vt(i,o.axis,r).lo,0,t-1)),c?s=G(vt(i,o.axis,a).hi+1,n,t)-n:s=t-n,{start:n,count:s}}var Lf={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,i,t)=>{if(!t.enabled){jr(e);return}let n=e.width;e.data.datasets.forEach((s,o)=>{let{_data:r,indexAxis:a}=s,l=e.getDatasetMeta(o),c=r||s.data;if(ke([a,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;let h=e.scales[l.xAxisID];if(h.type!=="linear"&&h.type!=="time"||e.options.parsing)return;let{start:d,count:f}=If(l,c),u=t.threshold||4*n;if(f<=u){Ca(s);return}R(r)&&(s._data=c,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(m){this._data=m}}));let p;switch(t.algorithm){case"lttb":p=Df(c,d,f,n,t);break;case"min-max":p=Ef(c,d,f,n);break;default:throw new Error("Unsupported decimation algorithm '".concat(t.algorithm,"'"))}s._decimated=p})},destroy(e){jr(e)}};function Ff(e,i,t){let n=e.segments,s=e.points,o=i.points,r=[];for(let a of n){let{start:l,end:c}=a;c=Ds(l,c,s);let h=Ps(t,s[l],s[c],a.loop);if(!i.segments){r.push({source:a,target:h,start:s[l],end:s[c]});continue}let d=os(i,h);for(let f of d){let u=Ps(t,o[f.start],o[f.end],f.loop),p=ss(a,s,u);for(let m of p)r.push({source:m,target:f,start:{[t]:Nr(h,u,"start",Math.max)},end:{[t]:Nr(h,u,"end",Math.min)}})}}return r}function Ps(e,i,t,n){if(n)return;let s=i[e],o=t[e];return e==="angle"&&(s=rt(s),o=rt(o)),{property:e,start:s,end:o}}function Rf(e,i){let{x:t=null,y:n=null}=e||{},s=i.points,o=[];return i.segments.forEach(({start:r,end:a})=>{a=Ds(r,a,s);let l=s[r],c=s[a];n!==null?(o.push({x:l.x,y:n}),o.push({x:c.x,y:n})):t!==null&&(o.push({x:t,y:l.y}),o.push({x:t,y:c.y}))}),o}function Ds(e,i,t){for(;i>e;i--){let n=t[i];if(!isNaN(n.x)&&!isNaN(n.y))break}return i}function Nr(e,i,t,n){return e&&i?n(e[t],i[t]):e?e[t]:i?i[t]:0}function ka(e,i){let t=[],n=!1;return j(e)?(n=!0,t=e):t=Rf(e,i),t.length?new hn({points:t,options:{tension:0},_loop:n,_fullLoop:n}):null}function Wr(e){return e&&e.fill!==!1}function zf(e,i,t){let s=e[i].fill,o=[i],r;if(!t)return s;for(;s!==!1&&o.indexOf(s)===-1;){if(!U(s))return s;if(r=e[s],!r)return!1;if(r.visible)return s;o.push(s),s=r.fill}return!1}function Bf(e,i,t){let n=Wf(e);if(I(n))return isNaN(n.value)?!1:n;let s=parseFloat(n);return U(s)&&Math.floor(s)===s?Vf(n[0],i,s,t):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function Vf(e,i,t,n){return(e==="-"||e==="+")&&(t=i+t),t===i||t<0||t>=n?!1:t}function jf(e,i){let t=null;return e==="start"?t=i.bottom:e==="end"?t=i.top:I(e)?t=i.getPixelForValue(e.value):i.getBasePixel&&(t=i.getBasePixel()),t}function Nf(e,i,t){let n;return e==="start"?n=t:e==="end"?n=i.options.reverse?i.min:i.max:I(e)?n=e.value:n=i.getBaseValue(),n}function Wf(e){let i=e.options,t=i.fill,n=T(t&&t.target,t);return n===void 0&&(n=!!i.backgroundColor),n===!1||n===null?!1:n===!0?"origin":n}function Hf(e){let{scale:i,index:t,line:n}=e,s=[],o=n.segments,r=n.points,a=Yf(i,t);a.push(ka({x:null,y:i.bottom},n));for(let l=0;l<o.length;l++){let c=o[l];for(let h=c.start;h<=c.end;h++)$f(s,r[h],a)}return new hn({points:s,options:{}})}function Yf(e,i){let t=[],n=e.getMatchingVisibleMetas("line");for(let s=0;s<n.length;s++){let o=n[s];if(o.index===i)break;o.hidden||t.unshift(o.dataset)}return t}function $f(e,i,t){let n=[];for(let s=0;s<t.length;s++){let o=t[s],{first:r,last:a,point:l}=Uf(o,i,"x");if(!(!l||r&&a)){if(r)n.unshift(l);else if(e.push(l),!a)break}}e.push(...n)}function Uf(e,i,t){let n=e.interpolate(i,t);if(!n)return{};let s=n[t],o=e.segments,r=e.points,a=!1,l=!1;for(let c=0;c<o.length;c++){let h=o[c],d=r[h.start][t],f=r[h.end][t];if(St(s,d,f)){a=s===d,l=s===f;break}}return{first:a,last:l,point:n}}var an=class{constructor(i){this.x=i.x,this.y=i.y,this.radius=i.radius}pathSegment(i,t,n){let{x:s,y:o,radius:r}=this;return t=t||{start:0,end:W},i.arc(s,o,r,t.end,t.start,!0),!n.bounds}interpolate(i){let{x:t,y:n,radius:s}=this,o=i.angle;return{x:t+Math.cos(o)*s,y:n+Math.sin(o)*s,angle:o}}};function Xf(e){let{chart:i,fill:t,line:n}
vendor: 4,856 bytes, line 1
1=e;if(U(t))return qf(i,t);if(t==="stack")return Hf(e);if(t==="shape")return!0;let s=Kf(e);return s instanceof an?s:ka(s,n)}function qf(e,i){let t=e.getDatasetMeta(i);return t&&e.isDatasetVisible(i)?t.dataset:null}function Kf(e){return(e.scale||{}).getPointPositionForValue?Zf(e):Gf(e)}function Gf(e){let{scale:i={},fill:t}=e,n=jf(t,i);if(U(n)){let s=i.isHorizontal();return{x:s?n:null,y:s?null:n}}return null}function Zf(e){let{scale:i,fill:t}=e,n=i.options,s=i.getLabels().length,o=n.reverse?i.max:i.min,r=Nf(t,i,o),a=[];if(n.grid.circular){let l=i.getPointPositionForValue(0,o);return new an({x:l.x,y:l.y,radius:i.getDistanceFromCenterForValue(r)})}for(let l=0;l<s;++l)a.push(i.getPointPositionForValue(l,r));return a}function ps(e,i,t){let n=Xf(i),{line:s,scale:o,axis:r}=i,a=s.options,l=a.fill,c=a.backgroundColor,{above:h=c,below:d=c}=l||{};n&&s.points.length&&(ti(e,t),Jf(e,{line:s,target:n,above:h,below:d,area:t,scale:o,axis:r}),ei(e))}function Jf(e,i){let{line:t,target:n,above:s,below:o,area:r,scale:a}=i,l=t._loop?"angle":i.axis;e.save(),l==="x"&&o!==s&&(Hr(e,n,r.top),Yr(e,{line:t,target:n,color:s,scale:a,property:l}),e.restore(),e.save(),Hr(e,n,r.bottom)),Yr(e,{line:t,target:n,color:o,scale:a,property:l}),e.restore()}function Hr(e,i,t){let{segments:n,points:s}=i,o=!0,r=!1;e.beginPath();for(let a of n){let{start:l,end:c}=a,h=s[l],d=s[Ds(l,c,s)];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 Yr(e,i){let{line:t,target:n,property:s,color:o,scale:r}=i,a=Ff(t,n,s);for(let{source:l,target:c,start:h,end:d}of a){let{style:{backgroundColor:f=o}={}}=l,u=n!==!0;e.save(),e.fillStyle=f,Qf(e,r,u&&Ps(s,h,d)),e.beginPath();let p=!!t.pathSegment(e,l),m;if(u){p?e.closePath():$r(e,n,d,s);let g=!!n.pathSegment(e,c,{move:p,reverse:!0});m=p&&g,m||$r(e,n,h,s)}e.closePath(),e.fill(m?"evenodd":"nonzero"),e.restore()}}function Qf(e,i,t){let{top:n,bottom:s}=i.chart.chartArea,{property:o,start:r,end:a}=t||{};o==="x"&&(e.beginPath(),e.rect(r,n,a-r,s-n),e.clip())}function $r(e,i,t,n){let s=i.interpolate(t,n);s&&e.lineTo(s.x,s.y)}var tu={id:"filler",afterDatasetsUpdate(e,i,t){let n=(e.data.datasets||[]).length,s=[],o,r,a,l;for(r=0;r<n;++r)o=e.getDatasetMeta(r),a=o.dataset,l=null,a&&a.options&&a instanceof hn&&(l={visible:e.isDatasetVisible(r),index:r,fill:Bf(a,r,n),chart:e,axis:o.controller.options.indexAxis,scale:o.vScale,line:a}),o.$filler=l,s.push(l);for(r=0;r<n;++r)l=s[r],!(!l||l.fill===!1)&&(l.fill=zf(s,r,t.propagate))},beforeDraw(e,i,t){let n=t.drawTime==="beforeDraw",s=e.getSortedVisibleDatasetMetas(),o=e.chartArea;for(let r=s.length-1;r>=0;--r){let a=s[r].$filler;a&&(a.line.updateControlPoints(o,a.axis),n&&a.fill&&ps(e.ctx,a,o))}},beforeDatasetsDraw(e,i,t){if(t.drawTime!=="beforeDatasetsDraw")return;let n=e.getSortedVisibleDatasetMetas();for(let s=n.length-1;s>=0;--s){let o=n[s].$filler;Wr(o)&&ps(e.ctx,o,e.chartArea)}},beforeDatasetDraw(e,i,t){let n=i.meta.$filler;!Wr(n)||t.drawTime!=="beforeDatasetDraw"||ps(e.ctx,n,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},Ur=(e,i)=>{let{boxHeight:t=i,boxWidth:n=i}=e;return e.usePointStyle&&(t=Math.min(t,i),n=e.pointStyleWidth||Math.min(n,i)),{boxWidth:n,boxHeight:t,itemHeight:Math.max(i,t)}},eu=(e,i)=>e!==null&&i!==null&&e.datasetIndex===i.datasetIndex&&e.index===i.index,ln=class extends ut{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,n){this.maxWidth=i,this.maxHeight=t,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let i=this.options.labels||{},t=V(i.generateLabels,[this.chart],this)||[];i.filter&&(t=t.filter(n=>i.filter(n,this.chart.data))),i.sort&&(t=t.sort((n,s)=>i.sort(n,s,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){let{options:i,ctx:t}=this;if(!i.display){this.width=this.height=0;return}let n=i.labels,s=K(n.font),o=s.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=Ur(n,o),c,h;t.font=s.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(r,o,a,l)+10):(h=this.maxHeight,c=this._fitCols(r,s,a,l)+10),this.width=Math.min(c,i.maxWidth||this.maxWidth),this.height=Math.min(h,i.maxHeight||this.maxHeight)}
vendor: 6,143 bytes, line 1
1_fitRows(i,t,n,s){let{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=s+a,d=i;o.textAlign="left",o.textBaseline="middle";let f=-1,u=-h;return this.legendItems.forEach((p,m)=>{let g=n+t/2+o.measureText(p.text).width;(m===0||c[c.length-1]+g+2*a>r)&&(d+=h,c[c.length-(m>0?0:1)]=0,u+=h,f++),l[m]={left:0,top:u,row:f,width:g,height:s},c[c.length-1]+=g+a}),d}_fitCols(i,t,n,s){let{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=r-i,d=a,f=0,u=0,p=0,m=0;return this.legendItems.forEach((g,x)=>{let{itemWidth:b,itemHeight:y}=iu(n,t,o,g,s);x>0&&u+y+2*a>h&&(d+=f+a,c.push({width:f,height:u}),p+=f+a,m++,f=u=0),l[x]={left:p,top:u,col:m,width:b,height:y},f=Math.max(f,b),u+=y+a}),d+=f,c.push({width:f,height:u}),d}adjustHitBoxes(){if(!this.options.display)return;let i=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:n,labels:{padding:s},rtl:o}}=this,r=le(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=et(n,this.left+s,this.right-this.lineWidths[a]);for(let c of t)a!==c.row&&(a=c.row,l=et(n,this.left+s,this.right-this.lineWidths[a])),c.top+=this.top+i+s,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+s}else{let a=0,l=et(n,this.top+i+s,this.bottom-this.columnSizes[a].height);for(let c of t)c.col!==a&&(a=c.col,l=et(n,this.top+i+s,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+s,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let i=this.ctx;ti(i,this),this._draw(),ei(i)}}_draw(){let{options:i,columnSizes:t,lineWidths:n,ctx:s}=this,{align:o,labels:r}=i,a=H.color,l=le(i.rtl,this.left,this.width),c=K(r.font),{padding:h}=r,d=c.size,f=d/2,u;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;let{boxWidth:p,boxHeight:m,itemHeight:g}=Ur(r,d),x=function(v,k,M){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;s.save();let A=T(M.lineWidth,1);if(s.fillStyle=T(M.fillStyle,a),s.lineCap=T(M.lineCap,"butt"),s.lineDashOffset=T(M.lineDashOffset,0),s.lineJoin=T(M.lineJoin,"miter"),s.lineWidth=A,s.strokeStyle=T(M.strokeStyle,a),s.setLineDash(T(M.lineDash,[])),r.usePointStyle){let E={radius:m*Math.SQRT2/2,pointStyle:M.pointStyle,rotation:M.rotation,borderWidth:A},D=l.xPlus(v,p/2),L=k+f;qn(s,E,D,L,r.pointStyleWidth&&p)}else{let E=k+Math.max((d-m)/2,0),D=l.leftForLtr(v,p),L=Xt(M.borderRadius);s.beginPath(),Object.values(L).some(Z=>Z!==0)?Ce(s,{x:D,y:E,w:p,h:m,radius:L}):s.rect(D,E,p,m),s.fill(),A!==0&&s.stroke()}s.restore()},b=function(v,k,M){Ut(s,M.text,v,k+g/2,c,{strikethrough:M.hidden,textAlign:l.textAlign(M.textAlign)})},y=this.isHorizontal(),w=this._computeTitleHeight();y?u={x:et(o,this.left+h,this.right-n[0]),y:this.top+h+w,line:0}:u={x:this.left+h,y:et(o,this.top+w+h,this.bottom-t[0].height),line:0},is(this.ctx,i.textDirection);let _=g+h;this.legendItems.forEach((v,k)=>{s.strokeStyle=v.fontColor,s.fillStyle=v.fontColor;let M=s.measureText(v.text).width,A=l.textAlign(v.textAlign||(v.textAlign=r.textAlign)),E=p+f+M,D=u.x,L=u.y;l.setWidth(this.width),y?k>0&&D+E+h>this.right&&(L=u.y+=_,u.line++,D=u.x=et(o,this.left+h,this.right-n[u.line])):k>0&&L+_>this.bottom&&(D=u.x=D+t[u.line].width+h,u.line++,L=u.y=et(o,this.top+w+h,this.bottom-t[u.line].height));let Z=l.x(D);if(x(Z,L,v),D=$o(A,D+p+f,y?D+E:this.right,i.rtl),b(l.x(D),L,v),y)u.x+=E+h;else if(typeof v.text!="string"){let dt=c.lineHeight;u.y+=Pa(v,dt)+h}else u.y+=_}),ns(this.ctx,i.textDirection)}drawTitle(){let i=this.options,t=i.title,n=K(t.font),s=it(t.padding);if(!t.display)return;let o=le(i.rtl,this.left,this.width),r=this.ctx,a=t.position,l=n.size/2,c=s.top+l,h,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),h=this.top+c,d=et(i.align,d,this.right-f);else{let p=this.columnSizes.reduce((m,g)=>Math.max(m,g.height),0);h=c+et(i.align,this.top,this.bottom-p-i.labels.padding-this._computeTitleHeight())}let u=et(a,d,d+f);r.textAlign=o.textAlign(Vi(a)),r.textBaseline="middle",r.strokeStyle=t.color,r.fillStyle=t.color,r.font=n.string,Ut(r,t.text,u,h,n)}_computeTitleHeight(){let i=this.options.title,t=K(i.font),n=it(i.padding);return i.display?t.lineHeight+n.height:0}_getLegendItemAt(i,t){let n,s,o;if(St(i,this.left,this.right)&&St(t,this.top,this.bottom)){for(o=this.legendHitBoxes,n=0;n<o.length;++n)if(s=o[n],St(i,s.left,s.left+s.width)&&St(t,s.top,s.top+s.height))return this.legendItems[n]}return null}handleEvent(i){let t=this.options;if(!ou(i.type,t))return;let n=this._getLegendItemAt(i.x,i.y);if(i.type==="mousemove"||i.type==="mouseout"){let s=this._hoveredItem,o=eu(s,n);s&&!o&&V(t.onLeave,[i,s,this],this),this._hoveredItem=n,n&&!o&&V(t.onHover,[i,n,this],this)}else n&&V(t.onClick,[i,n,this],this)}};function iu(e,i,t,n,s){let o=nu(n,e,i,t),r=su(s,n,i.lineHeight);return{itemWidth:o,itemHeight:r}}function nu(e,i,t,n){let s=e.text;return s&&typeof s!="string"&&(s=s.reduce((o,r)=>o.length>r.length?o:r)),i+t.size/2+n.measureText(s).width}function su(e,i,t){let n=e;return typeof i.text!="string"&&(n=Pa(i,t)),n}function Pa(e,i){let t=e.text?e.text.length:0;return i*t}function ou(e,i){return!!((e==="mousemove"||e==="mouseout")&&(i.onHover||i.onLeave)||i.onClick&&(e==="click"||e==="mouseup"))}var ru={id:"legend",_element:ln,start(e,i,t){let n=e.legend=new ln({ctx:e.ctx,options:t,chart:e});st.configure(e,n,t),st.addBox(e,n)},stop(e){st.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,i,t){let n=e.legend;st.configure(e,n,t),n.options=t},afterUpdate(e){let i=e.legend;i.buildLabels(),i.adjustHitBoxes()},afterEvent(e,i){i.replay||e.legend.handleEvent(i.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,i,t){let n=i.datasetIndex,s=t.chart;s.isDatasetVisible(n)?(s.hide(n),i.hidden=!0):(s.show(n),i.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){let i=e.data.datasets,{labels:{usePointStyle:t,pointStyle:n,textAlign:s,color:o,useBorderRadius:r,borderRadius:a}}=e.legend.options;
vendor: 4,729 bytes, line 1
1return e._getSortedDatasetMetas().map(l=>{let c=l.controller.getStyle(t?0:void 0),h=it(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:n||c.pointStyle,rotation:c.rotation,textAlign:s||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)}}},ui=class extends ut{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){let n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=i,this.height=this.bottom=t;let s=j(n.text)?n.text.length:1;this._padding=it(n.padding);let o=s*K(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){let i=this.options.position;return i==="top"||i==="bottom"}_drawArgs(i){let{top:t,left:n,bottom:s,right:o,options:r}=this,a=r.align,l=0,c,h,d;return this.isHorizontal()?(h=et(a,n,o),d=t+i,c=o-n):(r.position==="left"?(h=n+i,d=et(a,s,t),l=N*-.5):(h=o-i,d=et(a,t,s),l=N*.5),c=s-t),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){let i=this.ctx,t=this.options;if(!t.display)return;let n=K(t.font),o=n.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Ut(i,t.text,0,0,n,{color:t.color,maxWidth:l,rotation:c,textAlign:Vi(t.align),textBaseline:"middle",translation:[r,a]})}};function au(e,i){let t=new ui({ctx:e.ctx,options:i,chart:e});st.configure(e,t,i),st.addBox(e,t),e.titleBlock=t}var lu={id:"title",_element:ui,start(e,i,t){au(e,t)},stop(e){let i=e.titleBlock;st.removeBox(e,i),delete e.titleBlock},beforeUpdate(e,i,t){let n=e.titleBlock;st.configure(e,n,t),n.options=t},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},Zi=new WeakMap,cu={id:"subtitle",start(e,i,t){let n=new ui({ctx:e.ctx,options:t,chart:e});st.configure(e,n,t),st.addBox(e,n),Zi.set(e,n)},stop(e){st.removeBox(e,Zi.get(e)),Zi.delete(e)},beforeUpdate(e,i,t){let n=Zi.get(e);st.configure(e,n,t),n.options=t},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},li={average(e){if(!e.length)return!1;let i,t,n=new Set,s=0,o=0;for(i=0,t=e.length;i<t;++i){let a=e[i].element;if(a&&a.hasValue()){let l=a.tooltipPosition();n.add(l.x),s+=l.y,++o}}return o===0||n.size===0?!1:{x:[...n].reduce((a,l)=>a+l)/n.size,y:s/o}},nearest(e,i){if(!e.length)return!1;let t=i.x,n=i.y,s=Number.POSITIVE_INFINITY,o,r,a;for(o=0,r=e.length;o<r;++o){let l=e[o].element;if(l&&l.hasValue()){let c=l.getCenterPoint(),h=Li(i,c);h<s&&(s=h,a=l)}}if(a){let l=a.tooltipPosition();t=l.x,n=l.y}return{x:t,y:n}}};function Ct(e,i){return i&&(j(i)?Array.prototype.push.apply(e,i):e.push(i)),e}function Bt(e){return(typeof e=="string"||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function hu(e,i){let{element:t,datasetIndex:n,index:s}=i,o=e.getDatasetMeta(n).controller,{label:r,value:a}=o.getLabelAndValue(s);return{chart:e,label:r,parsed:o.getParsed(s),raw:e.data.datasets[n].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:n,element:t}}function Xr(e,i){let t=e.chart.ctx,{body:n,footer:s,title:o}=e,{boxWidth:r,boxHeight:a}=i,l=K(i.bodyFont),c=K(i.titleFont),h=K(i.footerFont),d=o.length,f=s.length,u=n.length,p=it(i.padding),m=p.height,g=0,x=n.reduce((w,_)=>w+_.before.length+_.lines.length+_.after.length,0);if(x+=e.beforeBody.length+e.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*i.titleSpacing+i.titleMarginBottom),x){let w=i.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=u*w+(x-u)*l.lineHeight+(x-1)*i.bodySpacing}f&&(m+=i.footerMarginTop+f*h.lineHeight+(f-1)*i.footerSpacing);let b=0,y=function(w){g=Math.max(g,t.measureText(w).width+b)};return t.save(),t.font=c.string,z(e.title,y),t.font=l.string,z(e.beforeBody.concat(e.afterBody),y),b=i.displayColors?r+2+i.boxPadding:0,z(n,w=>{z(w.before,y),z(w.lines,y),z(w.after,y)}),b=0,t.font=h.string,z(e.footer,y),t.restore(),g+=p.width,{width:g,height:m}}
vendor: 8,656 bytes, line 1
1function du(e,i){let{y:t,height:n}=i;return t<n/2?"top":t>e.height-n/2?"bottom":"center"}function fu(e,i,t,n){let{x:s,width:o}=n,r=t.caretSize+t.caretPadding;if(e==="left"&&s+o+r>i.width||e==="right"&&s-o-r<0)return!0}function uu(e,i,t,n){let{x:s,width:o}=t,{width:r,chartArea:{left:a,right:l}}=e,c="center";return n==="center"?c=s<=(a+l)/2?"left":"right":s<=o/2?c="left":s>=r-o/2&&(c="right"),fu(c,e,i,t)&&(c="center"),c}function qr(e,i,t){let n=t.yAlign||i.yAlign||du(e,t);return{xAlign:t.xAlign||i.xAlign||uu(e,i,t,n),yAlign:n}}function pu(e,i){let{x:t,width:n}=e;return i==="right"?t-=n:i==="center"&&(t-=n/2),t}function mu(e,i,t){let{y:n,height:s}=e;return i==="top"?n+=t:i==="bottom"?n-=s+t:n-=s/2,n}function Kr(e,i,t,n){let{caretSize:s,caretPadding:o,cornerRadius:r}=e,{xAlign:a,yAlign:l}=t,c=s+o,{topLeft:h,topRight:d,bottomLeft:f,bottomRight:u}=Xt(r),p=pu(i,a),m=mu(i,l,c);return l==="center"?a==="left"?p+=c:a==="right"&&(p-=c):a==="left"?p-=Math.max(h,f)+s:a==="right"&&(p+=Math.max(d,u)+s),{x:G(p,0,n.width-i.width),y:G(m,0,n.height-i.height)}}function Ji(e,i,t){let n=it(t.padding);return i==="center"?e.x+e.width/2:i==="right"?e.x+e.width-n.right:e.x+n.left}function Gr(e){return Ct([],Bt(e))}function gu(e,i,t){return Rt(e,{tooltip:i,tooltipItems:t,type:"tooltip"})}function Zr(e,i){let t=i&&i.dataset&&i.dataset.tooltip&&i.dataset.tooltip.callbacks;return t?e.override(t):e}var Oa={beforeTitle:Mt,title(e){if(e.length>0){let i=e[0],t=i.chart.data.labels,n=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return i.dataset.label||"";if(i.label)return i.label;if(n>0&&i.dataIndex<n)return t[i.dataIndex]}return""},afterTitle:Mt,beforeBody:Mt,beforeLabel:Mt,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let i=e.dataset.label||"";i&&(i+=": ");let t=e.formattedValue;return R(t)||(i+=t),i},labelColor(e){let 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){let t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:Mt,afterBody:Mt,beforeFooter:Mt,footer:Mt,afterFooter:Mt};function lt(e,i,t,n){let s=e[i].call(t,n);return typeof s>"u"?Oa[i].call(t,n):s}var Jr=(()=>{class e extends ut{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let t=this._cachedAnimations;if(t)return t;let n=this.chart,s=this.options.setContext(this.getContext()),o=s.enabled&&n.options.animation&&s.animations,r=new nn(this.chart,o);return o._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=gu(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){let{callbacks:s}=n,o=lt(s,"beforeTitle",this,t),r=lt(s,"title",this,t),a=lt(s,"afterTitle",this,t),l=[];return l=Ct(l,Bt(o)),l=Ct(l,Bt(r)),l=Ct(l,Bt(a)),l}getBeforeBody(t,n){return Gr(lt(n.callbacks,"beforeBody",this,t))}getBody(t,n){let{callbacks:s}=n,o=[];return z(t,r=>{let a={before:[],lines:[],after:[]},l=Zr(s,r);Ct(a.before,Bt(lt(l,"beforeLabel",this,r))),Ct(a.lines,lt(l,"label",this,r)),Ct(a.after,Bt(lt(l,"afterLabel",this,r))),o.push(a)}),o}getAfterBody(t,n){return Gr(lt(n.callbacks,"afterBody",this,t))}getFooter(t,n){let{callbacks:s}=n,o=lt(s,"beforeFooter",this,t),r=lt(s,"footer",this,t),a=lt(s,"afterFooter",this,t),l=[];return l=Ct(l,Bt(o)),l=Ct(l,Bt(r)),l=Ct(l,Bt(a)),l}_createItems(t){let n=this._active,s=this.chart.data,o=[],r=[],a=[],l=[],c,h;for(c=0,h=n.length;c<h;++c)l.push(hu(this.chart,n[c]));return t.filter&&(l=l.filter((d,f,u)=>t.filter(d,f,u,s))),t.itemSort&&(l=l.sort((d,f)=>t.itemSort(d,f,s))),z(l,d=>{let f=Zr(t.callbacks,d);o.push(lt(f,"labelColor",this,d)),r.push(lt(f,"labelPointStyle",this,d)),a.push(lt(f,"labelTextColor",this,d))}),this.labelColors=o,this.labelPointStyles=r,this.labelTextColors=a,this.dataPoints=l,l}update(t,n){let s=this.options.setContext(this.getContext()),o=this._active,r,a=[];if(!o.length)this.opacity!==0&&(r={opacity:0});else{let l=li[s.position].call(this,o,this._eventPosition);a=this._createItems(s),this.title=this.getTitle(a,s),this.beforeBody=this.getBeforeBody(a,s),this.body=this.getBody(a,s),this.afterBody=this.getAfterBody(a,s),this.footer=this.getFooter(a,s);let c=this._size=Xr(this,s),h=Object.assign({},l,c),d=qr(this.chart,s,h),f=Kr(s,h,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,r={opacity:1,x:f.x,y:f.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}this._tooltipItems=a,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,s,o){let r=this.getCaretPosition(t,s,o);n.lineTo(r.x1,r.y1),n.lineTo(r.x2,r.y2),n.lineTo(r.x3,r.y3)}getCaretPosition(t,n,s){let{xAlign:o,yAlign:r}=this,{caretSize:a,cornerRadius:l}=s,{topLeft:c,topRight:h,bottomLeft:d,bottomRight:f}=Xt(l),{x:u,y:p}=t,{width:m,height:g}=n,x,b,y,w,_,v;return r==="center"?(_=p+g/2,o==="left"?(x=u,b=x-a,w=_+a,v=_-a):(x=u+m,b=x+a,w=_-a,v=_+a),y=x):(o==="left"?b=u+Math.max(c,d)+a:o==="right"?b=u+m-Math.max(h,f)-a:b=this.caretX,r==="top"?(w=p,_=w-a,x=b-a,y=b+a):(w=p+g,_=w+a,x=b+a,y=b-a),v=w),{x1:x,x2:b,x3:y,y1:w,y2:_,y3:v}}drawTitle(t,n,s){let o=this.title,r=o.length,a,l,c;if(r){let h=le(s.rtl,this.x,this.width);for(t.x=Ji(this,s.titleAlign,s),n.textAlign=h.textAlign(s.titleAlign),n.textBaseline="middle",a=K(s.titleFont),l=s.titleSpacing,n.fillStyle=s.titleColor,n.font=a.string,c=0;c<r;++c)n.fillText(o[c],h.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+l,c+1===r&&(t.y+=s.titleMarginBottom-l)}}_drawColorBox(t,n,s,o,r){let a=this.labelColors[s],l=this.labelPointStyles[s],{boxHeight:c,boxWidth:h}=r,d=K(r.bodyFont),f=Ji(this,"left",r),u=o.x(f),p=c<d.lineHeight?(d.lineHeight-c)/2:0,m=n.y+p;if(r.usePointStyle){let g={radius:Math.min(h,c)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},x=o.leftForLtr(u,h)+h/2,b=m+c/2;t.strokeStyle=r.multiKeyBackground,t.fillStyle=r.multiKeyBackground,Ni(t,g,x,b),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Ni(t,g,x,b)}else{t.lineWidth=I(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;let g=o.leftForLtr(u,h),x=o.leftForLtr(o.xPlus(u,1),h-2),b=Xt(a.borderRadius);Object.values(b).some(y=>y!==0)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,Ce(t,{x:g,y:m,w:h,h:c,radius:b}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),Ce(t,{x,y:m+1,w:h-2,h:c-2,radius:b}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(g,m,h,c),t.strokeRect(g,m,h,c),t.fillStyle=a.backgroundColor,t.fillRect(x,m+1,h-2,c-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,n,s){let{body:o}=this,{bodySpacing:r,bodyAlign:a,displayColors:l,boxHeight:c,boxWidth:h,boxPadding:d}=s,f=K(s.bodyFont),u=f.lineHeight,p=0,m=le(s.rtl,this.x,this.width),g=function(A){n.fillText(A,m.x(t.x+p),t.y+u/2),t.y+=u+r},x=m.textAlign(a),b,y,w,_,v,k,M;for(n.textAlign=a,n.textBaseline="middle",n.font=f.string,t.x=Ji(this,x,s),n.fillStyle=s.bodyColor,z(this.beforeBody,g),p=l&&x!=="right"?a==="center"?h/2+d:h+2+d:0,_=0,k=o.length;_<k;++_){for(b=o[_],y=this.labelTextColors[_],n.fillStyle=y,z(b.before,g),w=b.lines,l&&w.length&&(this._drawColorBox(n,t,_,m,s),u=Math.max(f.lineHeight,c)),v=0,M=w.length;v<M;++v)g(w[v]),u=f.lineHeight;z(b.after,g)}p=0,u=f.lineHeight,z(this.afterBody,g),t.y-=r}drawFooter(t,n,s){let o=this.footer,r=o.length,a,l;if(r){let c=le(s.rtl,this.x,this.width);for(t.x=Ji(this,s.footerAlign,s),t.y+=s.footerMarginTop,n.textAlign=c.textAlign(s.footerAlign),n.textBaseline="middle",a=K(s.footerFont),n.fillStyle=s.footerColor,n.font=a.string,l=0;l<r;++l)n.fillText(o[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+s.footerSpacing}}
vendor: 7,356 bytes, line 1
1drawBackground(t,n,s,o){let{xAlign:r,yAlign:a}=this,{x:l,y:c}=t,{width:h,height:d}=s,{topLeft:f,topRight:u,bottomLeft:p,bottomRight:m}=Xt(o.cornerRadius);n.fillStyle=o.backgroundColor,n.strokeStyle=o.borderColor,n.lineWidth=o.borderWidth,n.beginPath(),n.moveTo(l+f,c),a==="top"&&this.drawCaret(t,n,s,o),n.lineTo(l+h-u,c),n.quadraticCurveTo(l+h,c,l+h,c+u),a==="center"&&r==="right"&&this.drawCaret(t,n,s,o),n.lineTo(l+h,c+d-m),n.quadraticCurveTo(l+h,c+d,l+h-m,c+d),a==="bottom"&&this.drawCaret(t,n,s,o),n.lineTo(l+p,c+d),n.quadraticCurveTo(l,c+d,l,c+d-p),a==="center"&&r==="left"&&this.drawCaret(t,n,s,o),n.lineTo(l,c+f),n.quadraticCurveTo(l,c,l+f,c),n.closePath(),n.fill(),o.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){let n=this.chart,s=this.$animations,o=s&&s.x,r=s&&s.y;if(o||r){let a=li[t.position].call(this,this._active,this._eventPosition);if(!a)return;let l=this._size=Xr(this,t),c=Object.assign({},a,this._size),h=qr(n,t,c),d=Kr(t,c,h,n);(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){let n=this.options.setContext(this.getContext()),s=this.opacity;if(!s)return;this._updateAnimationTarget(n);let o={width:this.width,height:this.height},r={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;let a=it(n.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&l&&(t.save(),t.globalAlpha=s,this.drawBackground(r,t,o,n),is(t,n.textDirection),r.y+=a.top,this.drawTitle(r,t,n),this.drawBody(r,t,n),this.drawFooter(r,t,n),ns(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){let s=this._active,o=t.map(({datasetIndex:l,index:c})=>{let h=this.chart.getDatasetMeta(l);if(!h)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:h.data[c],index:c}}),r=!Je(s,o),a=this._positionChanged(o,n);(r||a)&&(this._active=o,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,s=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let o=this.options,r=this._active||[],a=this._getActiveElements(t,r,n,s),l=this._positionChanged(a,t),c=n||!Je(a,r)||l;return c&&(this._active=a,(o.enabled||o.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),c}_getActiveElements(t,n,s,o){let r=this.options;if(t.type==="mouseout")return[];if(!o)return n.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);let a=this.chart.getElementsAtEventForMode(t,r.mode,r,s);return r.reverse&&a.reverse(),a}_positionChanged(t,n){let{caretX:s,caretY:o,options:r}=this,a=li[r.position].call(this,t,n);return a!==!1&&(s!==a.x||o!==a.y)}}return S(e,"positioners",li),e})(),xu={id:"tooltip",_element:Jr,positioners:li,afterInit(e,i,t){t&&(e.tooltip=new Jr({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){let i=e.tooltip;if(i&&i._willRender()){let t={tooltip:i};if(e.notifyPlugins("beforeTooltipDraw",Si(Mi({},t),{cancelable:!0}))===!1)return;i.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",t)}},afterEvent(e,i){if(e.tooltip){let t=i.replay;e.tooltip.handleEvent(i.event,t,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:Oa},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},bu=Object.freeze({__proto__:null,Colors:Tf,Decimation:Lf,Filler:tu,Legend:ru,SubTitle:cu,Title:lu,Tooltip:xu}),_u=(e,i,t,n)=>(typeof i=="string"?(t=e.push(i)-1,n.unshift({index:t,label:i})):isNaN(i)&&(t=null),t);function yu(e,i,t,n){let s=e.indexOf(i);if(s===-1)return _u(e,i,t,n);let o=e.lastIndexOf(i);return s!==o?t:s}var vu=(e,i)=>e===null?null:G(Math.round(e),0,i);function Qr(e){let i=this.getLabels();return e>=0&&e<i.length?i[e]:e}var wu=(()=>{class e extends ue{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let n=this._addedLabels;if(n.length){let s=this.getLabels();for(let{index:o,label:r}of n)s[o]===r&&s.splice(o,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(R(t))return null;let s=this.getLabels();return n=isFinite(n)&&s[n]===t?n:yu(s,t,T(n,t),this._addedLabels),vu(n,s.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:n}=this.getUserBounds(),{min:s,max:o}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(s=0),n||(o=this.getLabels().length-1)),this.min=s,this.max=o}buildTicks(){let t=this.min,n=this.max,s=this.options.offset,o=[],r=this.getLabels();r=t===0&&n===r.length-1?r:r.slice(t,n+1),this._valueRange=Math.max(r.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let a=t;a<=n;a++)o.push({value:a});return o}getLabelForValue(t){return Qr.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){let n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}return S(e,"id","category"),S(e,"defaults",{ticks:{callback:Qr}}),e})();function Mu(e,i){let t=[],{bounds:s,step:o,min:r,max:a,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:f}=e,u=o||1,p=h-1,{min:m,max:g}=i,x=!R(r),b=!R(a),y=!R(c),w=(g-m)/(d+1),_=Fn((g-m)/p/u)*u,v,k,M,A;if(_<1e-14&&!x&&!b)return[{value:m},{value:g}];A=Math.ceil(g/_)-Math.floor(m/_),A>p&&(_=Fn(A*_/p/u)*u),R(l)||(v=Math.pow(10,l),_=Math.ceil(_*v)/v),s==="ticks"?(k=Math.floor(m/_)*_,M=Math.ceil(g/_)*_):(k=m,M=g),x&&b&&o&&Bo((a-r)/o,_/1e3)?(A=Math.round(Math.min((a-r)/_,h)),_=(a-r)/A,k=r,M=a):y?(k=x?r:k,M=b?a:M,A=c-1,_=(M-k)/A):(A=(M-k)/_,we(A,Math.round(A),_/1e3)?A=Math.round(A):A=Math.ceil(A));let E=Math.max(zn(_),zn(k));v=Math.pow(10,R(l)?E:l),k=Math.round(k*v)/v,M=Math.round(M*v)/v;let D=0;for(x&&(f&&k!==r?(t.push({value:r}),k<r&&D++,we(Math.round((k+D*_)*v)/v,r,ta(r,w,e))&&D++):k<r&&D++);D<A;++D){let L=Math.round((k+D*_)*v)/v;if(b&&L>a)break;t.push({value:L})}return b&&f&&M!==a?t.length&&we(t[t.length-1].value,a,ta(a,w,e))?t[t.length-1].value=a:t.push({value:a}
vendor: 18,114 bytes, line 1
1):(!b||M===a)&&t.push({value:M}),t}function ta(e,i,{horizontal:t,minRotation:n}){let s=gt(n),o=(t?Math.sin(s):Math.cos(s))||.001,r=.75*i*(""+e).length;return Math.min(i/o,r)}var Te=class extends ue{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 R(i)||(typeof i=="number"||i instanceof Number)&&!isFinite(+i)?null:+i}handleTickRangeOptions(){let{beginAtZero:i}=this.options,{minDefined:t,maxDefined:n}=this.getUserBounds(),{min:s,max:o}=this,r=l=>s=t?s:l,a=l=>o=n?o:l;if(i){let l=yt(s),c=yt(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(s===o){let l=o===0?1:Math.abs(o*.05);a(o+l),i||r(s-l)}this.min=s,this.max=o}getTickLimit(){let i=this.options.ticks,{maxTicksLimit:t,stepSize:n}=i,s;return n?(s=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,s>1e3&&(console.warn("scales.".concat(this.id,".ticks.stepSize: ").concat(n," would result generating up to ").concat(s," ticks. Limiting to 1000.")),s=1e3)):(s=this.computeTickLimit(),t=t||11),t&&(s=Math.min(t,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let i=this.options,t=i.ticks,n=this.getTickLimit();n=Math.max(2,n);let s={maxTicks:n,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:t.includeBounds!==!1},o=this._range||this,r=Mu(s,o);return i.bounds==="ticks"&&Rn(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(){let i=this.ticks,t=this.min,n=this.max;if(super.configure(),this.options.offset&&i.length){let s=(n-t)/Math.max(i.length-1,1)/2;t-=s,n+=s}this._startValue=t,this._endValue=n,this._valueRange=n-t}getLabelForValue(i){return Se(i,this.chart.options.locale,this.options.ticks.format)}},ci=class extends Te{determineDataLimits(){let{min:i,max:t}=this.getMinMax(!0);this.min=U(i)?i:0,this.max=U(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){let i=this.isHorizontal(),t=i?this.width:this.height,n=gt(this.options.ticks.minRotation),s=(i?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,o.lineHeight/s))}getPixelForValue(i){return i===null?NaN:this.getPixelForDecimal((i-this._startValue)/this._valueRange)}getValueForPixel(i){return this._startValue+this.getDecimalForPixel(i)*this._valueRange}};S(ci,"id","linear"),S(ci,"defaults",{ticks:{callback:Qe.formatters.numeric}});var pi=e=>Math.floor(Lt(e)),he=(e,i)=>Math.pow(10,pi(e)+i);function ea(e){return e/Math.pow(10,pi(e))===1}function ia(e,i,t){let n=Math.pow(10,t),s=Math.floor(e/n);return Math.ceil(i/n)-s}function Su(e,i){let t=i-e,n=pi(t);for(;ia(e,i,n)>10;)n++;for(;ia(e,i,n)<10;)n--;return Math.min(n,pi(e))}function Cu(e,{min:i,max:t}){i=at(e.min,i);let n=[],s=pi(i),o=Su(i,t),r=o<0?Math.pow(10,Math.abs(o)):1,a=Math.pow(10,o),l=s>o?Math.pow(10,s):0,c=Math.round((i-l)*r)/r,h=Math.floor((i-l)/a/10)*a*10,d=Math.floor((c-h)/Math.pow(10,o)),f=at(e.min,Math.round((l+h+d*Math.pow(10,o))*r)/r);for(;f<t;)n.push({value:f,major:ea(f),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,r=o>=0?1:r),f=Math.round((l+h+d*Math.pow(10,o))*r)/r;let u=at(e.max,f);return n.push({value:u,major:ea(u),significand:d}),n}var hi=class extends ue{constructor(i){super(i),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(i,t){let n=Te.prototype.parse.apply(this,[i,t]);if(n===0){this._zero=!0;return}return U(n)&&n>0?n:null}determineDataLimits(){let{min:i,max:t}=this.getMinMax(!0);this.min=U(i)?Math.max(0,i):null,this.max=U(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!U(this._userMin)&&(this.min=i===he(this.min,0)?he(this.min,-1):he(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:i,maxDefined:t}=this.getUserBounds(),n=this.min,s=this.max,o=a=>n=i?n:a,r=a=>s=t?s:a;n===s&&(n<=0?(o(1),r(10)):(o(he(n,-1)),r(he(s,1)))),n<=0&&o(he(s,-1)),s<=0&&r(he(n,1)),this.min=n,this.max=s}buildTicks(){let i=this.options,t={min:this._userMin,max:this._userMax},n=Cu(t,this);return i.bounds==="ticks"&&Rn(n,this,"value"),i.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(i){return i===void 0?"0":Se(i,this.chart.options.locale,this.options.ticks.format)}configure(){let i=this.min;super.configure(),this._startValue=Lt(i),this._valueRange=Lt(this.max)-Lt(i)}getPixelForValue(i){return(i===void 0||i===0)&&(i=this.min),i===null||isNaN(i)?NaN:this.getPixelForDecimal(i===this.min?0:(Lt(i)-this._startValue)/this._valueRange)}getValueForPixel(i){let t=this.getDecimalForPixel(i);return Math.pow(10,this._startValue+t*this._valueRange)}};S(hi,"id","logarithmic"),S(hi,"defaults",{ticks:{callback:Qe.formatters.logarithmic,major:{enabled:!0}}});function Os(e){let i=e.ticks;if(i.display&&e.display){let t=it(i.backdropPadding);return T(i.font&&i.font.size,H.font.size)+t.height}return 0}function ku(e,i,t){return t=j(t)?t:[t],{w:Xo(e,i.string,t),h:t.length*i.lineHeight}}function na(e,i,t,n,s){return e===n||e===s?{start:i-t/2,end:i+t/2}:e<n||e>s?{start:i-t,end:i}:{start:i,end:i+t}}function Pu(e){let 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),n=[],s=[],o=e._pointLabels.length,r=e.options.pointLabels,a=r.centerPointLabels?N/o:0;for(let l=0;l<o;l++){let c=r.setContext(e.getPointLabelContext(l));s[l]=c.padding;let h=e.getPointPosition(l,e.drawingArea+s[l],a),d=K(c.font),f=ku(e.ctx,d,e._pointLabels[l]);n[l]=f;let u=rt(e.getIndexAngle(l)+a),p=Math.round(zi(u)),m=na(p,h.x,f.w,0,180),g=na(p,h.y,f.h,90,270);Ou(t,i,u,m,g)}e.setCenterPoint(i.l-t.l,t.r-i.r,i.t-t.t,t.b-i.b),e._pointLabelItems=Du(e,n,s)}function Ou(e,i,t,n,s){let o=Math.abs(Math.sin(t)),r=Math.abs(Math.cos(t)),a=0,l=0;n.start<i.l?(a=(i.l-n.start)/o,e.l=Math.min(e.l,i.l-a)):n.end>i.r&&(a=(n.end-i.r)/o,e.r=Math.max(e.r,i.r+a)),s.start<i.t?(l=(i.t-s.start)/r,e.t=Math.min(e.t,i.t-l)):s.end>i.b&&(l=(s.end-i.b)/r,e.b=Math.max(e.b,i.b+l))}function Au(e,i,t){let n=e.drawingArea,{extra:s,additionalAngle:o,padding:r,size:a}=t,l=e.getPointPosition(i,n+s+r,o),c=Math.round(zi(rt(l.angle+X))),h=Lu(l.y,a.h,c),d=Eu(c),f=Iu(l.x,a.w,d);return{visible:!0,x:l.x,y:h,textAlign:d,left:f,top:h,right:f+a.w,bottom:h+a.h}}function Tu(e,i){if(!i)return!0;let{left:t,top:n,right:s,bottom:o}=e;return!(wt({x:t,y:n},i)||wt({x:t,y:o},i)||wt({x:s,y:n},i)||wt({x:s,y:o},i))}function Du(e,i,t){let n=[],s=e._pointLabels.length,o=e.options,{centerPointLabels:r,display:a}=o.pointLabels,l={extra:Os(o)/2,additionalAngle:r?N/s:0},c;for(let h=0;h<s;h++){l.padding=t[h],l.size=i[h];let d=Au(e,h,l);n.push(d),a==="auto"&&(d.visible=Tu(d,c),d.visible&&(c=d))}return n}function Eu(e){return e===0||e===180?"center":e<180?"left":"right"}function Iu(e,i,t){return t==="right"?e-=i:t==="center"&&(e-=i/2),e}function Lu(e,i,t){return t===90||t===270?e-=i/2:(t>270||t<90)&&(e-=i),e}function Fu(e,i,t){let{left:n,top:s,right:o,bottom:r}=t,{backdropColor:a}=i;if(!R(a)){let l=Xt(i.borderRadius),c=it(i.backdropPadding);e.fillStyle=a;let h=n-c.left,d=s-c.top,f=o-n+c.width,u=r-s+c.height;Object.values(l).some(p=>p!==0)?(e.beginPath(),Ce(e,{x:h,y:d,w:f,h:u,radius:l}),e.fill()):e.fillRect(h,d,f,u)}}function Ru(e,i){let{ctx:t,options:{pointLabels:n}}=e;for(let s=i-1;s>=0;s--){let o=e._pointLabelItems[s];if(!o.visible)continue;let r=n.setContext(e.getPointLabelContext(s));Fu(t,r,o);let a=K(r.font),{x:l,y:c,textAlign:h}=o;Ut(t,e._pointLabels[s],l,c+a.lineHeight/2,a,{color:r.color,textAlign:h,textBaseline:"middle"})}}function Aa(e,i,t,n){let{ctx:s}=e;if(t)s.arc(e.xCenter,e.yCenter,i,0,W);else{let o=e.getPointPosition(0,i);s.moveTo(o.x,o.y);for(let r=1;r<n;r++)o=e.getPointPosition(r,i),s.lineTo(o.x,o.y)}}function zu(e,i,t,n,s){let o=e.ctx,r=i.circular,{color:a,lineWidth:l}=i;!r&&!n||!a||!l||t<0||(o.save(),o.strokeStyle=a,o.lineWidth=l,o.setLineDash(s.dash),o.lineDashOffset=s.dashOffset,o.beginPath(),Aa(e,t,r,n),o.closePath(),o.stroke(),o.restore())}function Bu(e,i,t){return Rt(e,{label:t,index:i,type:"pointLabel"})}var fe=class extends Te{constructor(i){super(i),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){let i=this._padding=it(Os(this.options)/2),t=this.width=this.maxWidth-i.width,n=this.height=this.maxHeight-i.height;this.xCenter=Math.floor(this.left+t/2+i.left),this.yCenter=Math.floor(this.top+n/2+i.top),this.drawingArea=Math.floor(Math.min(t,n)/2)}determineDataLimits(){let{min:i,max:t}=this.getMinMax(!1);this.min=U(i)&&!isNaN(i)?i:0,this.max=U(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Os(this.options))}generateTickLabels(i){Te.prototype.generateTickLabels.call(this,i),this._pointLabels=this.getLabels().map((t,n)=>{let s=V(this.options.pointLabels.callback,[t,n],this);return s||s===0?s:""}).filter((t,n)=>this.chart.getDataVisibility(n))}fit(){let i=this.options;i.display&&i.pointLabels.display?Pu(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(i,t,n,s){this.xCenter+=Math.floor((i-t)/2),this.yCenter+=Math.floor((n-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(i,t,n,s))}getIndexAngle(i){let t=W/(this._pointLabels.length||1),n=this.options.startAngle||0;return rt(i*t+gt(n))}getDistanceFromCenterForValue(i){if(R(i))return NaN;let t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-i)*t:(i-this.min)*t}getValueForDistanceFromCenter(i){if(R(i))return NaN;let t=i/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(i){let t=this._pointLabels||[];if(i>=0&&i<t.length){let n=t[i];return Bu(this.getContext(),i,n)}}getPointPosition(i,t,n=0){let s=this.getIndexAngle(i)-X+n;return{x:Math.cos(s)*t+this.xCenter,y:Math.sin(s)*t+this.yCenter,angle:s}}getPointPositionForValue(i,t){return this.getPointPosition(i,this.getDistanceFromCenterForValue(t))}getBasePosition(i){return this.getPointPositionForValue(i||0,this.getBaseValue())}getPointLabelPosition(i){let{left:t,top:n,right:s,bottom:o}=this._pointLabelItems[i];return{left:t,top:n,right:s,bottom:o}}drawBackground(){let{backgroundColor:i,grid:{circular:t}}=this.options;if(i){let n=this.ctx;n.save(),n.beginPath(),Aa(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),n.closePath(),n.fillStyle=i,n.fill(),n.restore()}}drawGrid(){let i=this.ctx,t=this.options,{angleLines:n,grid:s,border:o}=t,r=this._pointLabels.length,a,l,c;if(t.pointLabels.display&&Ru(this,r),s.display&&this.ticks.forEach((h,d)=>{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(h.value);let f=this.getContext(d),u=s.setContext(f),p=o.setContext(f);zu(this,u,l,r,p)}}),n.display){for(i.save(),a=r-1;a>=0;a--){let h=n.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:f}=h;!f||!d||(i.lineWidth=f,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(){let i=this.ctx,t=this.options,n=t.ticks;if(!n.display)return;let s=this.getIndexAngle(0),o,r;i.save(),i.translate(this.xCenter,this.yCenter),i.rotate(s),i.textAlign="center",i.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!t.reverse)return;let c=n.setContext(this.getContext(l)),h=K(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;let d=it(c.backdropPadding);i.fillRect(-r/2-d.left,-o-h.size/2-d.top,r+d.width,h.size+d.height)}Ut(i,a.label,0,-o,h,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),i.restore()}drawTitle(){}};S(fe,"id","radialLinear"),S(fe,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Qe.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(i){return i},padding:5,centerPointLabels:!1}}),S(fe,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),S(fe,"descriptors",{angleLines:{_fallback:"grid"}});var dn={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}},ct=Object.keys(dn);function sa(e,i){return e-i}function oa(e,i){if(R(i))return null;let t=e._adapter,{parser:n,round:s,isoWeekday:o}=e._parseOpts,r=i;return typeof n=="function"&&(r=n(r)),U(r)||(r=typeof n=="string"?t.parse(r,n):t.parse(r)),r===null?null:(s&&(r=s==="week"&&(ae(o)||o===!0)?t.startOf(r,"isoWeek",o):t.startOf(r,s)),+r)}function ra(e,i,t,n){let s=ct.length;for(let o=ct.indexOf(e);o<s-1;++o){let r=dn[ct[o]],a=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((t-i)/(a*r.size))<=n)return ct[o]}return ct[s-1]}function Vu(e,i,t,n,s){for(let o=ct.length-1;o>=ct.indexOf(t);o--){let r=ct[o];if(dn[r].common&&e._adapter.diff(s,n,r)>=i-1)return r}return ct[t?ct.indexOf(t):0]}function ju(e){for(let i=ct.indexOf(e)+1,t=ct.length;i<t;++i)if(dn[ct[i]].common)return ct[i]}function aa(e,i,t){if(!t)e[i]=!0;else if(t.length){let{lo:n,hi:s}=Bi(t,i),o=t[n]>=i?t[n]:t[s];e[o]=!0}}function Nu(e,i,t,n){let s=e._adapter,o=+s.startOf(i[0].value,n),r=i[i.length-1].value,a,l;for(a=o;a<=r;a=+s.add(a,1,n))l=t[a],l>=0&&(i[l].major=!0);return i}function la(e,i,t){let n=[],s={},o=i.length,r,a;for(r=0;r<o;++r)a=i[r],s[a]=r,n.push({value:a,major:!1});return o===0||!t?n:Nu(e,n,s,t)}var As=(()=>{class e extends ue{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){let s=t.time||(t.time={}),o=this._adapter=new Jh._date(t.adapters.date);o.init(n),ye(s.displayFormats,o.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:oa(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,n=this._adapter,s=t.time.unit||"day",{min:o,max: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()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&c(this.getMinMax(!1))),o=U(o)&&!isNaN(o)?o:+n.startOf(Date.now(),s),r=U(r)&&!isNaN(r)?r:+n.endOf(Date.now(),s)+1,this.min=Math.min(o,r-1),this.max=Math.max(o+1,r)}_getLabelBounds(){let t=this.getLabelTimestamps(),n=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],s=t[t.length-1]),{min:n,max:s}}buildTicks(){let t=this.options,n=t.time,s=t.ticks,o=s.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&o.length&&(this.min=this._userMin||o[0],this.max=this._userMax||o[o.length-1]);let r=this.min,a=this.max,l=No(o,r,a);return this._unit=n.unit||(s.autoSkip?ra(n.minUnit,this.min,this.max,this._getLabelCapacity(r)):Vu(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit==="year"?void 0:ju(this._unit),this.initOffsets(o),t.reverse&&l.reverse(),la(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,s=0,o,r;this.options.offset&&t.length&&(o=this.getDecimalForValue(t[0]),t.length===1?n=1-o:n=(this.getDecimalForValue(t[1])-o)/2,r=this.getDecimalForValue(t[t.length-1]),t.length===1?s=r:s=(r-this.getDecimalForValue(t[t.length-2]))/2);let a=t.length<3?.5:.25;n=G(n,0,a),s=G(s,0,a),this._offsets={start:n,end:s,factor:1/(n+1+s)}}_generate(){let t=this._adapter,n=this.min,s=this.max,o=this.options,r=o.time,a=r.unit||ra(r.minUnit,n,s,this._getLabelCapacity(n)),l=T(o.ticks.stepSize,1),c=a==="week"?r.isoWeekday:!1,h=ae(c)||c===!0,d={},f=n,u,p;if(h&&(f=+t.startOf(f,"isoWeek",c)),f=+t.startOf(f,h?"day":a),t.diff(s,n,a)>1e5*l)throw new Error(n+" and "+s+" are too far apart with stepSize of "+l+" "+a);let m=o.ticks.source==="data"&&this.getDataTimestamps();for(u=f,p=0;u<s;u=+t.add(u,l,a),p++)aa(d,u,m);return(u===s||o.bounds==="ticks"||p===1)&&aa(d,u,m),Object.keys(d).sort(sa).map(g=>+g)}getLabelForValue(t){let n=this._adapter,s=this.options.time;return s.tooltipFormat?n.format(t,s.tooltipFormat):n.format(t,s.displayFormats.datetime)}format(t,n){let o=this.options.time.displayFormats,r=this._unit,a=n||o[r];return this._adapter.format(t,a)}_tickFormatFunction(t,n,s,o){let r=this.options,a=r.ticks.callback;if(a)return V(a,[t,n,s],this);let l=r.time.displayFormats,c=this._unit,h=this._majorUnit,d=c&&l[c],f=h&&l[h],u=s[n],p=h&&f&&u&&u.major;return this._adapter.format(t,o||(p?f:d))}generateTickLabels(t){let n,s,o;for(n=0,s=t.length;n<s;++n)o=t[n],o.label=this._tickFormatFunction(o.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){let n=this._offsets,s=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+s)*n.factor)}getValueForPixel(t){let n=this._offsets,s=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+s*(this.max-this.min)}_getLabelSize(t){let n=this.options.ticks,s=this.ctx.measureText(t).width,o=gt(this.isHorizontal()?n.maxRotation:n.minRotation),r=Math.cos(o),a=Math.sin(o),l=this._resolveTickFontOptions(0).size;return{w:s*r+l*a,h:s*a+l*r}}_getLabelCapacity(t){let n=this.options.time,s=n.displayFormats,o=s[n.unit]||s.millisecond,r=this._tick
1FormatFunction(t,0,la(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 t=this._cache.data||[],n,s;if(t.length)return t;let o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(n=0,s=o.length;n<s;++n)t=t.concat(o[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){let t=this._cache.labels||[],n,s;if(t.length)return t;let o=this.getLabels();for(n=0,s=o.length;n<s;++n)t.push(oa(this,o[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return jn(t.sort(sa))}}return S(e,"id","time"),S(e,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}}),e})();function Qi(e,i,t){let n=0,s=e.length-1,o,r,a,l;t?(i>=e[n].pos&&i<=e[s].pos&&({lo:n,hi:s}=vt(e,"pos",i)),{pos:o,time:a}=e[n],{pos:r,time:l}=e[s]):(i>=e[n].time&&i<=e[s].time&&({lo:n,hi:s}=vt(e,"time",i)),{time:o,pos:a}=e[n],{time:r,pos:l}=e[s]);let c=r-o;return c?a+(l-a)*(i-o)/c:a}var di=class extends As{constructor(i){super(i),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let i=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(i);this._minPos=Qi(t,this.min),this._tableRange=Qi(t,this.max)-this._minPos,super.initOffsets(i)}buildLookupTable(i){let{min:t,max:n}=this,s=[],o=[],r,a,l,c,h;for(r=0,a=i.length;r<a;++r)c=i[r],c>=t&&c<=n&&s.push(c);if(s.length<2)return[{time:t,pos:0},{time:n,pos:1}];for(r=0,a=s.length;r<a;++r)h=s[r+1],l=s[r-1],c=s[r],Math.round((h+l)/2)!==c&&o.push({time:c,pos:r/(a-1)});return o}_generate(){let i=this.min,t=this.max,n=super.getDataTimestamps();return(!n.includes(i)||!n.length)&&n.splice(0,0,i),(!n.includes(t)||n.length===1)&&n.push(t),n.sort((s,o)=>s-o)}_getTimestampsForTable(){let i=this._cache.all||[];if(i.length)return i;let t=this.getDataTimestamps(),n=this.getLabelTimestamps();return t.length&&n.length?i=this.normalize(t.concat(n)):i=t.length?t:n,i=this._cache.all=i,i}getDecimalForValue(i){return(Qi(this._table,i)-this._minPos)/this._tableRange}getValueForPixel(i){let t=this._offsets,n=this.getDecimalForPixel(i)/t.factor-t.end;return Qi(this._table,n*this._tableRange+this._minPos,!0)}};S(di,"id","timeseries"),S(di,"defaults",As.defaults);var Wu=Object.freeze({__proto__:null,CategoryScale:wu,LinearScale:ci,LogarithmicScale:hi,RadialLinearScale:fe,TimeScale:As,TimeSeriesScale:di}),Ta=[Zh,Sf,bu,Wu];var Hu=typeof global=="object"&&global&&global.Object===Object&&global,fn=Hu;var Yu=typeof self=="object"&&self&&self.Object===Object&&self,$u=fn||Yu||Function("return this")(),xt=$u;var Uu=xt.Symbol,De=Uu;var Da=Object.prototype,Xu=Da.hasOwnProperty,qu=Da.toString,gi=De?De.toStringTag:void 0;function Ku(e){var i=Xu.call(e,gi),t=e[gi];try{e[gi]=void 0;var n=!0}catch{}var s=qu.call(e);return n&&(i?e[gi]=t:delete e[gi]),s}var Ea=Ku;var Gu=Object.prototype,Zu=Gu.toString;function Ju(e){return Zu.call(e)}var Ia=Ju;var Qu="[object Null]",tp="[object Undefined]",La=De?De.toStringTag:void 0;function ep(e){return e==null?e===void 0?tp:Qu:La&&La in Object(e)?Ea(e):Ia(e)}var Zt=ep;function ip(e){return e!=null&&typeof e=="object"}var Pt=ip;var np=Array.isArray,xi=np;function sp(e){var i=typeof e;return e!=null&&(i=="object"||i=="function")}var ht=sp;function op(e){return e}var un=op;var rp="[object AsyncFunction]",ap="[object Function]",lp="[object GeneratorFunction]",cp="[object Proxy]";function hp(e){if(!ht(e))return!1;var i=Zt(e);return i==ap||i==lp||i==rp||i==cp}var Ee=hp;var dp=xt["__core-js_shared__"],pn=dp;var Fa=function(){var e=/[^.]+$/.exec(pn&&pn.keys&&pn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function fp(e){return!!Fa&&Fa in e}var Ra=fp;var up=Function.prototype,pp=up.toString;function mp(e){if(e!=null){try{return pp.call(e)}catch{}try{return e+""}catch{}}return""}var za=mp;var gp=/[\\^$.*+?()[\]{}|]/g,xp=/^\[object .+?Constructor\]$/,bp=Function.prototype,_p=Object.prototype,yp=bp.toString,vp=_p.hasOwnProperty,wp=RegExp("^"+yp.call(vp).replace(gp,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Mp(e){if(!ht(e)||Ra(e))return!1;var i=Ee(e)?wp:xp;return i.test(za(e))}var Ba=Mp;function Sp(e,i){return e==null?void 0:e[i]}var Va=Sp;function Cp(e,i){var t=Va(e,i);return Ba(t)?t:void 0}var Ie=Cp;var ja=Object.create,kp=function(){function e(){}
vendor: 8,691 bytes, line 1
1return function(i){if(!ht(i))return{};if(ja)return ja(i);e.prototype=i;var t=new e;return e.prototype=void 0,t}}(),Na=kp;function Pp(e,i,t){switch(t.length){case 0:return e.call(i);case 1:return e.call(i,t[0]);case 2:return e.call(i,t[0],t[1]);case 3:return e.call(i,t[0],t[1],t[2])}return e.apply(i,t)}var Wa=Pp;function Op(e,i){var t=-1,n=e.length;for(i||(i=Array(n));++t<n;)i[t]=e[t];return i}var Ha=Op;var Ap=800,Tp=16,Dp=Date.now;function Ep(e){var i=0,t=0;return function(){var n=Dp(),s=Tp-(n-t);if(t=n,s>0){if(++i>=Ap)return arguments[0]}else i=0;return e.apply(void 0,arguments)}}var Ya=Ep;function Ip(e){return function(){return e}}var $a=Ip;var Lp=function(){try{var e=Ie(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Le=Lp;var Fp=Le?function(e,i){return Le(e,"toString",{configurable:!0,enumerable:!1,value:$a(i),writable:!0})}:un,Ua=Fp;var Rp=Ya(Ua),Xa=Rp;var zp=9007199254740991,Bp=/^(?:0|[1-9]\d*)$/;function Vp(e,i){var t=typeof e;return i=i==null?zp:i,!!i&&(t=="number"||t!="symbol"&&Bp.test(e))&&e>-1&&e%1==0&&e<i}var mn=Vp;function jp(e,i,t){i=="__proto__"&&Le?Le(e,i,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[i]=t}var Fe=jp;function Np(e,i){return e===i||e!==e&&i!==i}var Jt=Np;var Wp=Object.prototype,Hp=Wp.hasOwnProperty;function Yp(e,i,t){var n=e[i];(!(Hp.call(e,i)&&Jt(n,t))||t===void 0&&!(i in e))&&Fe(e,i,t)}var qa=Yp;function $p(e,i,t,n){var s=!t;t||(t={});for(var o=-1,r=i.length;++o<r;){var a=i[o],l=n?n(t[a],e[a],a,t,e):void 0;l===void 0&&(l=e[a]),s?Fe(t,a,l):qa(t,a,l)}return t}var Ka=$p;var Ga=Math.max;function Up(e,i,t){return i=Ga(i===void 0?e.length-1:i,0),function(){for(var n=arguments,s=-1,o=Ga(n.length-i,0),r=Array(o);++s<o;)r[s]=n[i+s];s=-1;for(var a=Array(i+1);++s<i;)a[s]=n[s];return a[i]=t(r),Wa(e,this,a)}}var Za=Up;function Xp(e,i){return Xa(Za(e,i,un),e+"")}var Ja=Xp;var qp=9007199254740991;function Kp(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=qp}var gn=Kp;function Gp(e){return e!=null&&gn(e.length)&&!Ee(e)}var Re=Gp;function Zp(e,i,t){if(!ht(t))return!1;var n=typeof i;return(n=="number"?Re(t)&&mn(i,t.length):n=="string"&&i in t)?Jt(t[i],e):!1}var Qa=Zp;function Jp(e){return Ja(function(i,t){var n=-1,s=t.length,o=s>1?t[s-1]:void 0,r=s>2?t[2]:void 0;for(o=e.length>3&&typeof o=="function"?(s--,o):void 0,r&&Qa(t[0],t[1],r)&&(o=s<3?void 0:o,s=1),i=Object(i);++n<s;){var a=t[n];a&&e(i,a,n,o)}return i})}var tl=Jp;var Qp=Object.prototype;function tm(e){var i=e&&e.constructor,t=typeof i=="function"&&i.prototype||Qp;return e===t}var xn=tm;function em(e,i){for(var t=-1,n=Array(e);++t<e;)n[t]=i(t);return n}var el=em;var im="[object Arguments]";function nm(e){return Pt(e)&&Zt(e)==im}var Es=nm;var il=Object.prototype,sm=il.hasOwnProperty,om=il.propertyIsEnumerable,rm=Es(function(){return arguments}())?Es:function(e){return Pt(e)&&sm.call(e,"callee")&&!om.call(e,"callee")},bi=rm;function am(){return!1}var nl=am;var rl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,sl=rl&&typeof module=="object"&&module&&!module.nodeType&&module,lm=sl&&sl.exports===rl,ol=lm?xt.Buffer:void 0,cm=ol?ol.isBuffer:void 0,hm=cm||nl,bn=hm;var dm="[object Arguments]",fm="[object Array]",um="[object Boolean]",pm="[object Date]",mm="[object Error]",gm="[object Function]",xm="[object Map]",bm="[object Number]",_m="[object Object]",ym="[object RegExp]",vm="[object Set]",wm="[object String]",Mm="[object WeakMap]",Sm="[object ArrayBuffer]",Cm="[object DataView]",km="[object Float32Array]",Pm="[object Float64Array]",Om="[object Int8Array]",Am="[object Int16Array]",Tm="[object Int32Array]",Dm="[object Uint8Array]",Em="[object Uint8ClampedArray]",Im="[object Uint16Array]",Lm="[object Uint32Array]",Y={};Y[km]=Y[Pm]=Y[Om]=Y[Am]=Y[Tm]=Y[Dm]=Y[Em]=Y[Im]=Y[Lm]=!0;Y[dm]=Y[fm]=Y[Sm]=Y[um]=Y[Cm]=Y[pm]=Y[mm]=Y[gm]=Y[xm]=Y[bm]=Y[_m]=Y[ym]=Y[vm]=Y[wm]=Y[Mm]=!1;function Fm(e){return Pt(e)&&gn(e.length)&&!!Y[Zt(e)]}var al=Fm;function Rm(e){return function(i){return e(i)}}var ll=Rm;var cl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_i=cl&&typeof module=="object"&&module&&!module.nodeType&&module,zm=_i&&_i.exports===cl,Is=zm&&fn.process,Bm=function(){try{var e=_i&&_i.require&&_i.require("util").types;return e||Is&&Is.binding&&Is.binding("util")}catch{}}(),Ls=Bm;var hl=Ls&&Ls.isTypedArray,Vm=hl?ll(hl):al,_n=Vm;var jm=Object.prototype,Nm=jm.hasOwnProperty;function Wm(e,i){var t=xi(e),n=!t&&bi(e),s=!t&&!n&&bn(e),o=!t&&!n&&!s&&_n(e),r=t||n||s||o,a=r?el(e.length,String):[],l=a.length;for(var c in e)(i||Nm.call(e,c))&&!(r&&(c=="length"||s&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||mn(c,l)))&&a.push(c);return a}var dl=Wm;function Hm(e,i){return function(t){return e(i(t))}}var fl=Hm;function Ym(e){var i=[];if(e!=null)for(var t in Object(e))i.push(t);return i}var ul=Ym;var $m=Object.prototype,Um=$m.hasOwnProperty;function Xm(e){if(!ht(e))return ul(e);var i=xn(e),t=[];for(var n in e)n=="constructor"&&(i||!Um.call(e,n))||t.push(n);return t}var pl=Xm;function qm(e){return Re(e)?dl(e,!0):pl(e)}var yn=qm;var Km=Ie(Object,"create"),Vt=Km;function Gm(){this.__data__=Vt?Vt(null):{},this.size=0}var ml=Gm;function Zm(e){var i=this.has(e)&&delete this.__data__[e];return this.size-=i?1:0,i}var gl=Zm;var Jm="__lodash_hash_undefined__",Qm=Object.prototype,tg=Qm.hasOwnProperty;function eg(e){var i=this.__data__;if(Vt){var t=i[e];return t===Jm?void 0:t}return tg.call(i,e)?i[e]:void 0}var xl=eg;var ig=Object.prototype,ng=ig.hasOwnProperty;function sg(e){var i=this.__data__;return Vt?i[e]!==void 0:ng.call(i,e)}var bl=sg;var og="__lodash_hash_undefined__";function rg(e,i){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=Vt&&i===void 0?og:i,this}var _l=rg;function ze(e){var i=-1,t=e==null?0:e.length;for(this.clear();++i<t;){var n=e[i];this.set(n[0],n[1])}}ze.prototype.clear=ml;ze.prototype.delete=gl;ze.prototype.get=xl;ze.prototype.has=bl;ze.prototype.set=_l;var Fs=ze;function ag(){this.__data__=[],this.size=0}var yl=ag;function lg(e,i){for(var t=e.length;t--;)if(Jt(e[t][0],i))return t;return-1}var Qt=lg;var cg=Array.prototype,hg=cg.splice;function dg(e){var i=this.__data__,t=Qt(i,e);if(t<0)return!1;var n=i.length-1;return t==n?i.pop():hg.call(i,t,1),--this.size,!0}var vl=dg;function fg(e){var i=this.__data__,t=Qt(i,e);return t<0?void 0:i[t][1]}var wl=fg;function ug(e){return Qt(this.__data__,e)>-1}var Ml=ug;function pg(e,i){var t=this.__data__,n=Qt(t,e);return n<0?(++this.size,t.push([e,i])):t[n][1]=i,this}var Sl=pg;function Be(e){var i=-1,t=e==null?0:e.length;for(this.clear();++i<t;){var n=e[i];this.set(n[0],n[1])}}Be.prototype.clear=yl;Be.prototype.delete=vl;Be.prototype.get=wl;Be.prototype.has=Ml;Be.prototype.set=Sl;var te=Be;var mg=Ie(xt,"Map"),vn=mg;function gg(){this.size=0,this.__data__={hash:new Fs,map:new(vn||te),string:new Fs}}var Cl=gg;function xg(e){var i=typeof e;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?e!=="__proto__":e===null}var kl=xg;function bg(e,i){var t=e.__data__;return kl(i)?t[typeof i=="string"?"string":"hash"]:t.map}var ee=bg;function _g(e){var i=ee(this,e).delete(e);return this.size-=i?1:0,i}var Pl=_g;function yg(e){return ee(this,e).get(e)}var Ol=yg;function vg(e){return ee(this,e).has(e)}var Al=vg;function wg(e,i){var t=ee(this,e),n=t.size;return t.set(e,i),this.size+=t.size==n?0:1,this}var Tl=wg;function Ve(e){var i=-1,t=e==null?0:e.length;for(this.clear();++i<t;){var n=e[i];this.set(n[0],n[1])}}Ve.prototype.clear=Cl;Ve.prototype.delete=Pl;Ve.prototype.get=Ol;Ve.prototype.has=Al;Ve.prototype.set=Tl;var Dl=Ve;var Mg=fl(Object.getPrototypeOf,Object),wn=Mg;var Sg="[object Object]",Cg=Function.prototype,kg=Object.prototype,El=Cg.toString,Pg=kg.hasOwnProperty,Og=El.call(Object);function Ag(e){if(!Pt(e)||Zt(e)!=Sg)return!1;var i=wn(e);if(i===null)return!0;var t=Pg.call(i,"constructor")&&i.constructor;return typeof t=="function"&&t instanceof t&&El.call(t)==Og}var Il=Ag;function Tg(){this.__data__=new te,this.size=0}var Ll=Tg;function Dg(e){var i=this.__data__,t=i.delete(e);return this.size=i.size,t}var Fl=Dg;function Eg(e){return this.__data__.get(e)}var Rl=Eg;function Ig(e){return this.__data__.has(e)}var zl=Ig;var Lg=200;function Fg(e,i){var t=this.__data__;if(t instanceof te){var n=t.__data__;if(!vn||n.length<Lg-1)return n.push([e,i]),this.size=++t.size,this;t=this.__data__=new Dl(n)}return t.set(e,i),this.size=t.size,this}var Bl=Fg;function je(e){var i=this.__data__=new te(e);this.size=i.size}je.prototype.clear=Ll;je.prototype.delete=Fl;je.prototype.get=Rl;je.prototype.has=zl;je.prototype.set=Bl;var Vl=je;var Hl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,jl=Hl&&typeof module=="object"&&module&&!module.nodeType&&module,Rg=jl&&jl.exp
1orts===Hl,Nl=Rg?xt.Buffer:void 0,Wl=Nl?Nl.allocUnsafe:void 0;function zg(e,i){if(i)return e.slice();var t=e.length,n=Wl?Wl(t):new e.constructor(t);return e.copy(n),n}var Yl=zg;var Bg=xt.Uint8Array,Rs=Bg;function Vg(e){var i=new e.constructor(e.byteLength);return new Rs(i).set(new Rs(e)),i}var $l=Vg;function jg(e,i){var t=i?$l(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}var Ul=jg;function Ng(e){return typeof e.constructor=="function"&&!xn(e)?Na(wn(e)):{}}var Xl=Ng;function Wg(e){return function(i,t,n){for(var s=-1,o=Object(i),r=n(i),a=r.length;a--;){var l=r[e?a:++s];if(t(o[l],l,o)===!1)break}return i}}var ql=Wg;var Hg=ql(),Kl=Hg;function Yg(e,i,t){(t!==void 0&&!Jt(e[i],t)||t===void 0&&!(i in e))&&Fe(e,i,t)}var yi=Yg;function $g(e){return Pt(e)&&Re(e)}var Gl=$g;function Ug(e,i){if(!(i==="constructor"&&typeof e[i]=="function")&&i!="__proto__")return e[i]}var vi=Ug;function Xg(e){return Ka(e,yn(e))}var Zl=Xg;function qg(e,i,t,n,s,o,r){var a=vi(e,t),l=vi(i,t),c=r.get(l);if(c){yi(e,t,c);return}var h=o?o(a,l,t+"",e,i,r):void 0,d=h===void 0;if(d){var f=xi(l),u=!f&&bn(l),p=!f&&!u&&_n(l);h=l,f||u||p?xi(a)?h=a:Gl(a)?h=Ha(a):u?(d=!1,h=Yl(l,!0)):p?(d=!1,h=Ul(l,!0)):h=[]:Il(l)||bi(l)?(h=a,bi(a)?h=Zl(a):(!ht(a)||Ee(a))&&(h=Xl(l))):d=!1}d&&(r.set(l,h),s(h,l,n,o,r),r.delete(l)),yi(e,t,h)}var Jl=qg;function Ql(e,i,t,n,s){e!==i&&Kl(i,function(o,r){if(s||(s=new Vl),ht(o))Jl(e,i,r,t,Ql,n,s);else{var a=n?n(vi(e,r),o,r+"",e,i,s):void 0;a===void 0&&(a=o),yi(e,r,a)}},yn)}var tc=Ql;var Kg=tl(function(e,i,t){tc(e,i,t)}),Mn=Kg;var ec=new Ns("Configuration for ngCharts");function ic(...e){return{registerables:[...Ta,...e]}}function nc(...e){let i=Mn({},...e);return{provide:ec,useValue:i}}var Zg=(()=>{let i=class i{constructor(){this.colorschemesOptions=new zs(void 0)}setColorschemesOptions(n){this.pColorschemesOptions=n,this.colorschemesOptions.next(n)}getColorschemesOptions(){return this.pColorschemesOptions}};i.\u0275fac=function(s){return new(s||i)},i.\u0275prov=js({token:i,factory:i.\u0275fac,providedIn:"root"});let e=i;return e})(),sc=(()=>{let i=class i{constructor(n,s,o,r){this.zone=s,this.themeService=o,this.type="bar",this.plugins=[],this.chartClick=new Sn,this.chartHover=new Sn,this.subs=[],this.themeOverrides={},r!=null&&r.registerables&&cn.register(...r.registerables),r!=null&&r.defaults&&H.set(r.defaults),this.ctx=n.nativeElement.getContext("2d"),this.subs.push(this.themeService.colorschemesOptions.pipe(Vs()).subscribe(a=>this.themeChanged(a)))}ngOnChanges(n){let s=["type"],o=Object.getOwnPropertyNames(n);if(o.some(r=>s.includes(r))||o.every(r=>n[r].isFirstChange()))this.render();else{let r=this.getChartConfiguration();this.chart&&(Object.assign(this.chart.config.data,r.data),this.chart.config.plugins&&Object.assign(this.chart.config.plugins,r.plugins),this.chart.config.options&&Object.assign(this.chart.config.options,r.options)),this.update()}}ngOnDestroy(){this.chart&&(this.chart.destroy(),this.chart=void 0),this.subs.forEach(n=>n.unsubscribe())}render(){return this.chart&&this.chart.destroy(),this.zone.runOutsideAngular(()=>this.chart=new cn(this.ctx,this.getChartConfiguration()))}update(n){this.chart&&this.zone.runOutsideAngular(()=>{var s;return(s=this.chart)==null?void 0:s.update(n)})}hideDataset(n,s){this.chart&&(this.chart.getDatasetMeta(n).hidden=s,this.update())}isDatasetHidden(n){var s,o;return(o=(s=this.chart)==null?void 0:s.getDatasetMeta(n))==null?void 0:o.hidden}toBase64Image(){var n;return(n=this.chart)==null?void 0:n.toBase64Image()}themeChanged(n){this.themeOverrides=n,this.chart&&(this.chart.config.options&&Object.assign(this.chart.config.options,this.getChartOptions()),this.update())}getChartOptions(){return Mn({onHover:(n,s)=>{var o;!this.chartHover.observed&&!((o=this.chartHover.observers)!=null&&o.length)||this.zone.run(()=>this.chartHover.emit({event:n,active:s}))},onClick:(n,s)=>{var o;!this.chartClick.observed&&!((o=this.chartClick.observers)!=null&&o.length)||this.zone.run(()=>this.chartClick.emit({event:n,active:s}))}},this.themeOverrides,this.options,{plugins:{legend:{display:this.legend}}})}
1getChartConfiguration(){return{type:this.type,data:this.getChartData(),options:this.getChartOptions(),plugins:this.plugins}}getChartData(){return this.data?this.data:{labels:this.labels||[],datasets:this.datasets||[]}}};i.\u0275fac=function(s){return new(s||i)(Ye(Us),Ye($s),Ye(Zg),Ye(ec,8))},i.\u0275dir=Hs({type:i,selectors:[["canvas","baseChart",""]],inputs:{type:"type",legend:"legend",data:"data",options:"options",plugins:"plugins",labels:"labels",datasets:"datasets"},outputs:{chartClick:"chartClick",chartHover:"chartHover"},exportAs:["base-chart"],standalone:!0,features:[Ys]});let e=i;return e})();function Jg(e,i){if(e&1){let t=jt();C(0,"div",11),O(1," Listing price should be between 10000 and 10000000 "),C(2,"button",38),J("click",function(){Ot(t);let s=ft();return At(s.dismissError("listingPrice"))}),O(3," Dismiss "),P()()}}function Qg(e,i){if(e&1){let t=jt();C(0,"div",11),O(1," Down Payment should be less than Home Price. It has been reset to 20% of the Home price "),C(2,"button",38),J("click",function(){Ot(t);let s=ft();return At(s.dismissError("downPayment"))}),O(3," Dismiss "),P()()}}function tx(e,i){if(e&1){let t=jt();C(0,"div",11),O(1," Interest Rate should be between 1 and 12 "),C(2,"button",38),J("click",function(){Ot(t);let s=ft();return At(s.dismissError("annualRate"))}),O(3," Dismiss "),P()()}}function ex(e,i){if(e&1&&(C(0,"option",24),O(1),P()),e&2){let t=i.$implicit;$e("value",t),F(),ot(t)}}function ix(e,i){if(e&1){let t=jt();C(0,"div",11),O(1," Homeowners Insurance should be between 0 and 15000 "),C(2,"button",38),J("click",function(){Ot(t);let s=ft();return At(s.dismissError("homeInsurance"))}),O(3," Dismiss "),P()()}}function nx(e,i){if(e&1){let t=jt();C(0,"div",11),O(1," Property Tax Rate should be between 0 and 5 "),C(2,"button",38),J("click",function(){Ot(t);let s=ft();return At(s.dismissError("propertyTax"))}),O(3," Dismiss "),P()()}}function sx(e,i){if(e&1){let t=jt();C(0,"div",11),O(1," HOA/Condo fees should be between 0 and 13000 "),C(2,"button",38),J("click",function(){Ot(t);let s=ft();return At(s.dismissError("monthlyHoaFee"))}),O(3," Dismiss "),P()()}}function ox(e,i){if(e&1&&(C(0,"div",41)(1,"div",46)(2,"div",47),O(3," Taxes & Other Fees "),C(4,"span",48),O(5),Q(6,"currency"),P()(),C(7,"div",47),O(8," Home Insurance "),C(9,"span",48),O(10),Q(11,"currency"),P()()(),C(12,"div",49)(13,"h5",48),O(14),Q(15,"currency"),P(),C(16,"div",50),pt(17,"canvas",51),P()(),C(18,"div",52),O(19," Mortgage Payment (P&I)"),C(20,"span",48),O(21),Q(22,"currency"),P()()()),e&2){let t=ft(2);F(5),ot(tt(6,7,t.monthlyTax)),F(5),ot(tt(11,9,t.monthlyInsurance)),F(4),Ci(" ",tt(15,11,t.monthlyMortgage+t.monthlyInsurance+t.monthlyTax)," "),F(3),$e("data",t.pieChartData)("type",t.pieChartType)("options",t.pieChartOptions),F(4),ot(tt(22,13,t.monthlyMortgage))}}function rx(e,i){if(e&1&&(C(0,"div",42)(1,"div",53),O(2," Mortgage Payment (P&I) "),C(3,"div"),O(4),Q(5,"currency"),P()(),C(6,"div",54),O(7," Home Insurance "),C(8,"div"),O(9),Q(10,"currency"),P()(),C(11,"div",55),O(12," Homeowners Insurance "),C(13,"div"),O(14),Q(15,"currency"),P()(),C(16,"div",55),O(17," Mortgage Insurance (PMI) "),C(18,"div"),O(19),Q(20,"currency"),P()(),C(21,"div",56),O(22," Taxes & Other Fees "),C(23,"div"),O(24),Q(25,"currency"),P()(),C(26,"div",55),O(27," Property Taxes "),C(28,"div"),O(29),Q(30,"currency"),P()(),C(31,"div",55),O(32," HOA/Condo Fees "),C(33,"div"),O(34),Q(35,"currency"),P()()()),e&2){let t=ft(2);F(4),ot(tt(5,7,t.monthlyMortgage)),F(5),ot(tt(10,9,t.monthlyInsurance)),F(5),ot(tt(15,11,t.homeOwnersInsurance)),F(5),ot(tt(20,13,t.mortgageInsurance)),F(5),ot(tt(25,15,t.monthlyTax)),F(5),ot(tt(30,17,t.propertyTaxes)),F(5),ot(tt(35,19,t.hoaCondoFees))}}function ax(e,i){if(e&1){let t=jt();C(0,"div",36)(1,"h4",39),O(2,"Total Monthly Payment breakdown"),P(),C(3,"div",40),O(4),Q(5,"currency"),P(),Tt(6,ox,23,15,"div",41)(7,rx,36,21,"div",42),C(8,"div",43)(9,"div",44),J("click",function(){Ot(t);let s=ft();
1return At(s.switchDetailView(!1))}),O(10," Overview "),P(),C(11,"div",45),J("click",function(){Ot(t);let s=ft();return At(s.switchDetailView(!0))}),O(12," Details "),P()()()}if(e&2){let t=ft();F(4),Ci(" Based on a ",tt(5,7,t.financePrice)," mortgage "),F(2),_t(t.detailView?-1:6),F(),_t(t.detailView?7:-1),F(2),Ue("btn-active",!t.detailView),F(2),Ue("btn-active",t.detailView)}}function lx(e,i){if(e&1&&(C(0,"div",37)(1,"h4",57),O(2,"Mortgage Over Time"),P(),C(3,"div",40),O(4),Q(5,"currency"),P(),C(6,"div",58)(7,"div",59)(8,"div",60),pt(9,"div",61),O(10," Remaining Mortgage Balance "),P(),C(11,"div"),O(12),Q(13,"currency"),P()(),C(14,"div",59)(15,"div",60),pt(16,"div",62),O(17," Principal Paid "),P(),C(18,"div"),O(19),Q(20,"currency"),P()(),C(21,"div",59)(22,"div",60),pt(23,"div",63),O(24," Interest Paid "),P(),C(25,"div"),O(26),Q(27,"currency"),P()()(),C(28,"div",64),pt(29,"canvas",65),P()()),e&2){let t=ft();F(4),Ci(" Based on a ",tt(5,7,t.financePrice)," mortgage "),F(8),ot(tt(13,9,t.balanceMortgage[0])),F(7),ot(tt(20,11,t.principalPaid[0])),F(7),ot(tt(27,13,t.interestPaid[0])),F(3),$e("data",t.lineChartData)("options",t.lineChartOptions)("type",t.lineChartType)}}var bv=(()=>{let i=class i{constructor(){this.mortgageForm=new oo({listing_price:new Dt(null),down_payment:new Dt(null),interest_rate:new Dt(null),amortization:new Dt(null),search_year:new Dt(null),home_insurance:new Dt(null),property_tax:new Dt(null),monthly_hoa_fee:new Dt(null)}),this.queryParams=null,this.searchYear=mo,this.monthlyMortgage=0,this.monthlyTax=0,this.monthlyInsurance=0,this.monthlyHoa=0,this.financePrice=0,this.homeOwnersInsurance=0,this.mortgageInsurance=0,this.propertyTaxes=0,this.hoaCondoFees=0,this.balanceMortgage=[],this.interestPaid=[],this.principalPaid=[],this.errors={downPayment:!1,listingPrice:!1,annualRate:!1,homeInsurance:!1,monthlyHoaFee:!1,propertyTax:!1},this.pieChartType="pie",this.pieChartOptions={responsive:!0,maintainAspectRatio:!1,layout:{padding:{top:20,right:20,bottom:20,left:20}},plugins:{legend:{position:"bottom",labels:{padding:20,pointStyle:"circle",usePointStyle:!0,font:{size:14}}}}},this.lineChartType="line",this.lineChartOptions={elements:{line:{tension:.5}},plugins:{legend:{display:!0}},scales:{y:{ticks:{callback:n=>Number(n)>=1e3?Number(n)/1e3+"K":n}}}},this.subscriptions={url:null},this.graphView=!1,this.detailView=!1,this.initialLoad=!1,this.pageBuilderService=He(eo),this.activatedRoute=He(Qs),this.fb=He(uo),this.router=He(to)}ngOnInit(){this.subscriptions.url=this.activatedRoute.queryParams.subscribe(n=>{this.queryParams=n,this.initialLoad||(this.initForm(),this.initialLoad=!0)}),this.pageBuilderService.settings={pageLayoutType:"custom-page"},this.subscriptions.mortgageFormValueChangesWithPipe=this.mortgageForm.valueChanges.pipe(Bs(300)).subscribe(n=>{this.validateInputs(n),this.calculateMortgage(),this.setQueryParams()}),this.subscriptions.mortgageFormValueChanges=this.mortgageForm.valueChanges.subscribe(n=>{this.mortgageForm.patchValue(n,{emitEvent:!1})})}setQueryParams(){let n={};n.listing_price=this.mortgageForm.value.listing_price,n.down_payment=this.mortgageForm.value.down_payment,n.interest_rate=this.mortgageForm.value.annual_rate,n.year_term=this.mortgageForm.value.amortization,this.router.navigate(["/mortgage-calculator"],{queryParams:n,queryParamsHandling:"merge",replaceUrl:!0})}initForm(){var s,o,r,a;let n=new Date().getFullYear();this.mortgageForm=this.fb.group({listing_price:[(s=this.queryParams)==null?void 0:s.listing_price],down_payment:[(o=this.queryParams)==null?void 0:o.down_payment],annual_rate:[(r=this.queryParams)==null?void 0:r.interest_rate],amortization:[(a=this.queryParams)==null?void 0:a.year_term],search_year:[n],home_insurance:[1250],property_tax:[1.93],monthly_hoa_fee:[0]}),this.calculateMortgage()}calculateMortgage(){let n=this.mortgageForm.value.annual_rate,s=this.mortgageForm.value.amortization,o=this.mortgageForm.value.listing_price,r=this.mortgageForm.value.down_payment,a=n/1200,l=this.getInterestFactor(s,a),c=Math.floor((o-r)/l),{monthlyTax:h,homeInsurancePrice:d,monthlyPayment:f}=this.calculatePropertyTax(o);this.monthlyMortgage=c,this.monthlyTax=h,this.monthlyInsurance=d,this.financePrice=o-r,this.getAmortization((o-r)/l,s,this.financePrice,a),this.pieChartData={labels:["Mortgage Payment","Taxes & Other Fees","Home Insurance"],datasets:[{data:[c,h,d],backgroundColor:["#519DE9","#06C","#EF9234"],hoverOffset:30,hoverBorderWidth:4,hoverBorderColor:["#8BC1F7","#519DE9","#F4B678"],hoverBorderCapStyle:"round"}]}}getInterestFactor(n,s){let o=1+s,r=0,a=o;for(let l=0;l<n*12;l++)r+=1/a,a*=o;return r}calculatePropertyTax(n){let s=this.mortgageForm.value.property_tax,o=+this.mortgageForm.value.monthly_hoa_fee,r=this.mortgageForm.value.home_insurance,a=this.mortgageForm.value.down_payment,l=a*100/n,c=n-a,h=this.mortgageForm.value.amortization,d=this.mortgageForm.value.annual_rate/100/12,f=this.getInterestFactor(h,d),u=c/f,m=.85*n/100/12,g=Math.round(Math.round(n/12)*s/100)+o;this.propertyTaxes=Math.round(Math.round(n/12)*s/100),this.hoaCondoFees=o;let x=0,b=0;if(l<20){let w=c/1e5*54,_=m-w;x=this.calculatePMI(n,c),b=u+x}let y=Math.round(r/12+x);
1return this.homeOwnersInsurance=y-Math.round(x),this.mortgageInsurance=Math.round(x),{monthlyTax:g,homeInsurancePrice:y,monthlyPayment:u}}calculatePMI(n,s){let o=0,r=s/1e5,a=s/n*100;return n<=4e5?a>80&&a<=95?o=r*52:a>95&&a<=100&&(o=r*70.835):n>4e5&&n<5e5?a>80&&a<=90?o=r*52:a>90&&a<=95?o=r*66.651:a>95&&a<=100&&(o=r*70.835):n>=5e5&&n<=627e3?a>80&&a<=90?n<6e5?a>80&&a<=81?o=r*52:o=r*53:o=r*58:a>90&&a<=95?o=r*66.651:a>95&&(o=r*70.835):n>627e3&&n<=715420?a>80&&a<=90?o=r*58:a>90&&a<95?n<=665e3?o=r*66.651:o=r*83.3:a>=95&&a<=98?n<=65e4?o=r*70.835:o=r*87.5:a>98&&(o=r*87.5):n>715420&&n<=849561&&(a>90&&a<94?n>=73e4?o=r*58:o=r*83.31:o=r*58),o}switchView(n){this.graphView=n}getAmortization(n,s,o,r){this.balanceMortgage=[],this.principalPaid=[],this.interestPaid=[];let a=new Date().getFullYear(),l=s*12,c=0,h=0,d=Array.from({length:l},(m,g)=>g+1),f=0,u=o,p=Array.from({length:s},(m,g)=>a+g);d.forEach(m=>{let g=r*u,x=n-g;u-=x,h+=g;let b=u;f+=x,c++,c%12==0&&(this.balanceMortgage.push(Math.round(b)),this.principalPaid.push(Math.round(f)),this.interestPaid.push(Math.round(h)))}),this.lineChartData={datasets:[{data:this.balanceMortgage,label:"Remaining Mortgage Balance",borderColor:"#FF6935",borderWidth:1},{data:this.principalPaid,label:"Principal Paid",borderColor:"#276749",borderWidth:1},{data:this.interestPaid,label:"Interest Paid",borderColor:"#0061DF",borderWidth:1}],labels:p}}validateInputs(n){if(this.errors={downPayment:!1,listingPrice:!1,annualRate:!1,propertyTax:!1,monthlyHoaFee:!1},n.listing_price<n.down_payment){this.errors.downPayment=!0;let s=n.listing_price*.2;this.mortgageForm.patchValue({down_payment:s},{emitEvent:!1})}n.listing_price<1e4&&(this.errors.listingPrice=!0,this.mortgageForm.patchValue({listing_price:1e4},{emitEvent:!1})),n.listing_price>1e8&&(this.errors.listingPrice=!0,this.mortgageForm.patchValue({listing_price:1e8},{emitEvent:!1})),n.annual_rate>12&&(this.errors.annualRate=!0,this.mortgageForm.patchValue({annual_rate:12},{emitEvent:!1})),n.annual_rate<1&&(this.errors.annualRate=!0,this.mortgageForm.patchValue({annual_rate:1},{emitEvent:!1})),n.property_tax<0&&(this.errors.propertyTax=!0,this.mortgageForm.patchValue({property_tax:1},{emitEvent:!1})),n.property_tax>5&&(this.errors.propertyTax=!0,this.mortgageForm.patchValue({property_tax:5},{emitEvent:!1})),n.monthly_hoa_fee<0&&(this.errors.monthlyHoaFee=!0,this.mortgageForm.patchValue({monthly_hoa_fee:0},{emitEvent:!1})),n.monthly_hoa_fee>13e3&&(this.errors.monthlyHoaFee=!0,this.mortgageForm.patchValue({monthly_hoa_fee:13e3},{emitEvent:!1})),n.home_insurance<0&&(this.errors.homeInsurance=!0,this.mortgageForm.patchValue({home_insurance:0},{emitEvent:!1})),n.home_insurance>15e3&&(this.errors.homeInsurance=!0,this.mortgageForm.patchValue({home_insurance:15e3},{emitEvent:!1}))}dismissError(n){this.errors[n]=!1}
1switchDetailView(n){this.detailView=n}keydown(n){let{key:s}=n,o=["Backspace","Delete","Tab","ArrowRight","ArrowLeft","ArrowDown","ArrowUp"];/^\d$/.test(s)||o.includes(s)||n.preventDefault()}ngOnDestroy(){Object.values(this.subscriptions).forEach(n=>n==null?void 0:n.unsubscribe())}};i.\u0275fac=function(s){return new(s||i)},i.\u0275cmp=Ws({type:i,selectors:[["app-advanced-mortgage-calculator"]],standalone:!0,features:[Gs([nc(ic())]),Zs],decls:80,vars:13,consts:[[1,"row","mt-5","overflow-x-hidden"],[1,"col-11","col-md-10","mx-auto"],[1,"row","my-4","mx-auto"],[1,"col-12","d-lg-none","mb-3"],[1,"col-12","col-lg-3"],[1,"border","rounded","p-4",3,"formGroup"],[1,"fs-16","pb-2"],[1,"fw-semibold"],[1,"d-flex","flex-column","gap-3","my-3"],["formControlName","listing_price",1,"form-control",3,"keydown"],["type","range","formControlName","listing_price","min","10000","max","10000000"],[1,"error-msg"],["formControlName","down_payment",1,"form-control",3,"keydown"],["type","range","formControlName","down_payment","min","0","max","10000000"],["formControlName","annual_rate",1,"form-control",3,"keydown"],["type","range","formControlName","annual_rate","min","1","max","12"],["type","text","formControlName","amortization","placeholder","Loan Term",1,"form-select","form-control-lg","py-2","mt-1","fw-medium"],["value","30"],["value","25"],["value","20"],["value","15"],["value","10"],["value","5"],["type","text","formControlName","search_year",1,"form-select","py-2","mt-1","fw-medium"],[3,"value"],["formControlName","home_insurance",1,"form-control",3,"keydown"],["type","range","formControlName","home_insurance","min","0","max","15000"],["formControlName","property_tax",1,"form-control",3,"keydown"],["type","range","formControlName","property_tax","min","0","max","5"],["formControlName","monthly_hoa_fee",1,"form-control",3,"keydown"],["type","range","formControlName","monthly_hoa_fee","min","0","max","13000"],[1,"col-12","col-lg-9","my-4","my-lg-0"],[1,"d-none","d-lg-block"],[1,"d-flex","flex-column","gap-4","mt-4"],[1,"d-flex","justify-content-between","w-full","p-2"],[1,"w-50","d-flex","justify-content-center","border-bottom","fs-16","fs-lg-18","fw-medium","py-2","cursor-pointer",3,"click"],[1,"d-flex","flex-column","align-items-center"],[1,"w-full","d-flex","flex-column","align-items-center"],[1,"btn-dismiss","rounded",3,"click"],[1,"fw-medium","text-center"],[1,"mb-2"],[1,"d-flex","flex-column","flex-md-row","gap-2","align-items-center","mb-5","mb-md-0"],[1,"d-flex","flex-column","gap-4","detail-container","my-4"],[1,"d-flex"],[1,"d-flex","justify-content-center","align-items-center","p-2","btn-overview","cursor-pointer",3,"click"],[1,"d-flex","justify-content-center","align-items-center","p-2","btn-detail","cursor-pointer",3,"click"],[1,"d-flex","flex-column","gap-3","order-2","order-md-1"],[1,"d-flex","flex-column"],[1,"fw-bold"],[1,"d-flex","flex-column","align-items-center","order-md-2"],[1,"chart-container"],["baseChart","",3,"data","type","options"],[1,"d-flex","flex-column","order-md-3"],[1,"w-full","d-flex","justify-content-between","fw-semibold","fs-14","gap-4","mortgage-text"],[1,"w-full","d-flex","justify-content-between","fw-semibold","fs-14","insurance-text"],[1,"w-full","d-flex","justify-content-between","fs-14"],[1,"w-full","d-flex","justify-content-between","fw-semibold","fs-14","tax-text"],[1,"fw-medium"],[1,"graph-detail","mx-auto","my-4","d-flex","flex-column","gap-2"],[1,"w-full","d-flex","justify-content-between","align-items-center","fw-semibold"],[1,"d-flex","gap-2","justify-content-center","align-items-center"],[1,"balance"],[1,"balance","principal"],[1,"balance","interest"],[1,"graph-container"],["baseChart","",3,"data","options","type"]],template:function(s,o){s&1&&(C(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),O(4,"Mortgage Calculator"),P(),C(5,"div",4)(6,"div",5)(7,"div",6),O(8," Enter your details below to estimate your monthly mortgage payment with taxes, fees and insurance. "),P(),C(9,"h5",7),O(10,"Edit Your Mortgage Details"),P(),C(11,"div",8)(12,"label"),O(13,"Home Price($)"),P(),C(14,"input",9),J("keydown",function(a){return o.keydown(a)}),P(),pt(15,"input",10),Tt(16,Jg,4,0,"div",11),P(),C(17,"div",8)(18,"label"),O(19,"Down Payment($)"),P(),C(20,"input",12),J("keydown",function(a){return o.keydown(a)}),P(),pt(21,"input",13),Tt(22,Qg,4,0,"div",11),P(),C(23,"div",8)(24,"label"),O(25,"Mortgage Interest Rate(%)"),P(),C(26,"input",14),J("keydown",function(a){return o.keydown(a)}),P(),pt(27,"input",15),Tt(28,tx,4,0,"div",11),P(),C(29,"div",8)(30,"label"),O(31,"Loan Type"),P(),C(32,"select",16)(33,"option",17),O(34,"30 Years"),P(),C(35,"option",18),O(36,"25 Years"),P(),C(37,"option",19),O(38,"20 Years"),P(),C(39,"option",20),O(40,"15 Years"),P(),C(41,"option",21),O(42,"10 Years"),P(),C(43,"option",22),O(44,"5 Years"),P()()(),C(45,"div",8)(46,"label"),O(47,"Search Year"),P(),C(48,"select",23),qs(49,ex,2,2,"option",24,Xs),P()(),C(51,"div",8)(52,"label"),O(53,"Annual Homeowners Insurance($)"),P(),C(54,"input",25),J("keydown",function(a){return o.keydown(a)}),P(),pt(55,"input",26),Tt(56,ix,4,0,"div",11),P(),C(57,"div",8)(58,"label"),O(59,"Annual Property Tax(%)"),P(),C(60,"input",27),J("keydown",function(a){return o.keydown(a)}),P(),pt(61,"input",28),Tt(62,nx,4,0,"div",11),P(),C(63,"div",8)(64,"label"),O(65,"Monthly HOA/Condo Fees($)"),P(),C(66,"input",29),J("keydown",function(a){return o.keydown(a)}),P(),pt(67,"input",30),Tt(68,sx,4,0,"div",11),P()()(),C(69,"div",31)(70,"h3",32),O(71,"Mortgage Calculator"),P(),C(
172,"div",33)(73,"div",34)(74,"div",35),J("click",function(){return o.switchView(!1)}),O(75," Monthly Payment Breakdown "),P(),C(76,"div",35),J("click",function(){return o.switchView(!0)}),O(77," Mortgage Over Time "),P()(),Tt(78,ax,13,9,"div",36)(79,lx,30,15,"div",37),P()()()()()),s&2&&(F(6),$e("formGroup",o.mortgageForm),F(10),_t(o.errors.listingPrice?16:-1),F(6),_t(o.errors.downPayment?22:-1),F(6),_t(o.errors.annualRate?28:-1),F(21),Ks(o.searchYear),F(7),_t(o.errors.homeInsurance?56:-1),F(6),_t(o.errors.propertyTax?62:-1),F(6),_t(o.errors.monthlyHoaFee?68:-1),F(6),Ue("tab-active",!o.graphView),F(2),Ue("tab-active",o.graphView),F(2),_t(o.graphView?-1:78),F(),_t(o.graphView?79:-1))},dependencies:[po,ho,fo,io,ro,co,no,so,ao,lo,sc,Js],styles:[".chart-container[_ngcontent-%COMP%]{width:400px;height:400px}.tab-active[_ngcontent-%COMP%]{border-bottom:1px solid #004fb6!important;color:#004fb6}.graph-container[_ngcontent-%COMP%]{width:90%;margin:auto}.balance[_ngcontent-%COMP%]{width:10px;height:10px;border-radius:50%;background-color:#ff6935}.principal[_ngcontent-%COMP%]{background-color:#276749}.interest[_ngcontent-%COMP%]{background-color:#0061df}.graph-detail[_ngcontent-%COMP%]{width:90%}.btn-detail[_ngcontent-%COMP%]{width:100px;border:1px solid #adb5bd;border-left:0px;border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.btn-detail[_ngcontent-%COMP%]:hover, .btn-overview[_ngcontent-%COMP%]:hover{background-color:#004fb63c}.btn-overview[_ngcontent-%COMP%]{width:100px;border:1px solid #adb5bd;border-right:0px;border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.btn-active[_ngcontent-%COMP%]{color:#fff;background-color:#004fb6;border:0}.error-msg[_ngcontent-%COMP%]{color:#dc3545;font-size:12px}.btn-dismiss[_ngcontent-%COMP%]{background-color:#adb5bd;border:0}@media (min-width: 768px){.detail-container[_ngcontent-%COMP%]{width:500px}}.mortgage-text[_ngcontent-%COMP%]{color:#519de9}.tax-text[_ngcontent-%COMP%]{color:#06c}.insurance-text[_ngcontent-%COMP%]{color:#ef9234}\n/*# sourceMappingURL=advanced-mortgage-calculator.component-Q6KF6KTS.css.map */"]});let e=i;return e})();export{bv as AdvancedMortgageCalculatorComponent};
2//# sourceMappingURL=chunk-NW3ROG62.js.map

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.