mower-ng/ui/dist/assets/record.js

29 lines
252 KiB
JavaScript

var Ml=Object.defineProperty;var Ol=(i,t,e)=>t in i?Ml(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var O=(i,t,e)=>Ol(i,typeof t!="symbol"?t+"":t,e);import{B as ko,bn as So,H as zn,c3 as Tl,r as Dl,s as Cl,bc as Il,w as El,t as Vn,n as Al,bW as Mo}from"./_plugin-vue_export-helper.js";import{aq as Pl,w as Rl}from"./main.js";/*!
* @kurkle/color v0.3.2
* https://github.com/kurkle/color#readme
* (c) 2023 Jukka Kurkela
* Released under the MIT License
*/function hi(i){return i+.5|0}const Bt=(i,t,e)=>Math.max(Math.min(i,e),t);function je(i){return Bt(hi(i*2.55),0,255)}function Ut(i){return Bt(hi(i*255),0,255)}function Pt(i){return Bt(hi(i/2.55)/100,0,1)}function Is(i){return Bt(hi(i*100),0,100)}const ft={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},Hn=[..."0123456789ABCDEF"],Ll=i=>Hn[i&15],Fl=i=>Hn[(i&240)>>4]+Hn[i&15],yi=i=>(i&240)>>4===(i&15),Nl=i=>yi(i.r)&&yi(i.g)&&yi(i.b)&&yi(i.a);function Wl(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&ft[i[1]]*17,g:255&ft[i[2]]*17,b:255&ft[i[3]]*17,a:t===5?ft[i[4]]*17:255}:(t===7||t===9)&&(e={r:ft[i[1]]<<4|ft[i[2]],g:ft[i[3]]<<4|ft[i[4]],b:ft[i[5]]<<4|ft[i[6]],a:t===9?ft[i[7]]<<4|ft[i[8]]:255})),e}const zl=(i,t)=>i<255?t(i):"";function Vl(i){var t=Nl(i)?Ll:Fl;return i?"#"+t(i.r)+t(i.g)+t(i.b)+zl(i.a,t):void 0}const Hl=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Oo(i,t,e){const n=t*Math.min(e,1-e),s=(r,o=(r+i/30)%12)=>e-n*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function Bl(i,t,e){const n=(s,r=(s+i/60)%6)=>e-e*t*Math.max(Math.min(r,4-r,1),0);return[n(5),n(3),n(1)]}function $l(i,t,e){const n=Oo(i,1,.5);let s;for(t+e>1&&(s=1/(t+e),t*=s,e*=s),s=0;s<3;s++)n[s]*=1-t-e,n[s]+=t;return n}function jl(i,t,e,n,s){return i===s?(t-e)/n+(t<e?6:0):t===s?(e-i)/n+2:(i-t)/n+4}function rs(i){const e=i.r/255,n=i.g/255,s=i.b/255,r=Math.max(e,n,s),o=Math.min(e,n,s),a=(r+o)/2;let l,c,h;return r!==o&&(h=r-o,c=a>.5?h/(2-r-o):h/(r+o),l=jl(e,n,s,h,r),l=l*60+.5),[l|0,c||0,a]}function os(i,t,e,n){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,n)).map(Ut)}function as(i,t,e){return os(Oo,i,t,e)}function Ul(i,t,e){return os($l,i,t,e)}function Yl(i,t,e){return os(Bl,i,t,e)}function To(i){return(i%360+360)%360}function Zl(i){const t=Hl.exec(i);let e=255,n;if(!t)return;t[5]!==n&&(e=t[6]?je(+t[5]):Ut(+t[5]));const s=To(+t[2]),r=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?n=Ul(s,r,o):t[1]==="hsv"?n=Yl(s,r,o):n=as(s,r,o),{r:n[0],g:n[1],b:n[2],a:e}}function ql(i,t){var e=rs(i);e[0]=To(e[0]+t),e=as(e),i.r=e[0],i.g=e[1],i.b=e[2]}function Xl(i){if(!i)return;const t=rs(i),e=t[0],n=Is(t[1]),s=Is(t[2]);return i.a<255?`hsla(${e}, ${n}%, ${s}%, ${Pt(i.a)})`:`hsl(${e}, ${n}%, ${s}%)`}const Es={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"},As={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 Gl(){const i={},t=Object.keys(As),e=Object.keys(Es);let n,s,r,o,a;for(n=0;n<t.length;n++){for(o=a=t[n],s=0;s<e.length;s++)r=e[s],a=a.replace(r,Es[r]);r=parseInt(As[o],16),i[a]=[r>>16&255,r>>8&255,r&255]}return i}let bi;function Jl(i){bi||(bi=Gl(),bi.transparent=[0,0,0,0]);const t=bi[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Kl=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Ql(i){const t=Kl.exec(i);let e=255,n,s,r;if(t){if(t[7]!==n){const o=+t[7];e=t[8]?je(o):Bt(o*255,0,255)}return n=+t[1],s=+t[3],r=+t[5],n=255&(t[2]?je(n):Bt(n,0,255)),s=255&(t[4]?je(s):Bt(s,0,255)),r=255&(t[6]?je(r):Bt(r,0,255)),{r:n,g:s,b:r,a:e}}}function tc(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${Pt(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}const xn=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,de=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function ec(i,t,e){const n=de(Pt(i.r)),s=de(Pt(i.g)),r=de(Pt(i.b));return{r:Ut(xn(n+e*(de(Pt(t.r))-n))),g:Ut(xn(s+e*(de(Pt(t.g))-s))),b:Ut(xn(r+e*(de(Pt(t.b))-r))),a:i.a+e*(t.a-i.a)}}function xi(i,t,e){if(i){let n=rs(i);n[t]=Math.max(0,Math.min(n[t]+n[t]*e,t===0?360:1)),n=as(n),i.r=n[0],i.g=n[1],i.b=n[2]}}function Do(i,t){return i&&Object.assign(t||{},i)}function Ps(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=Ut(i[3]))):(t=Do(i,{r:0,g:0,b:0,a:1}),t.a=Ut(t.a)),t}function ic(i){return i.charAt(0)==="r"?Ql(i):Zl(i)}class ni{constructor(t){if(t instanceof ni)return t;const e=typeof t;let n;e==="object"?n=Ps(t):e==="string"&&(n=Wl(t)||Jl(t)||ic(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=Do(this._rgb);return t&&(t.a=Pt(t.a)),t}set rgb(t){this._rgb=Ps(t)}rgbString(){return this._valid?tc(this._rgb):void 0}hexString(){return this._valid?Vl(this._rgb):void 0}hslString(){return this._valid?Xl(this._rgb):void 0}mix(t,e){if(t){const n=this.rgb,s=t.rgb;let r;const o=e===r?.5:e,a=2*o-1,l=n.a-s.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;r=1-c,n.r=255&c*n.r+r*s.r+.5,n.g=255&c*n.g+r*s.g+.5,n.b=255&c*n.b+r*s.b+.5,n.a=o*n.a+(1-o)*s.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=ec(this._rgb,t._rgb,e)),this}clone(){return new ni(this.rgb)}alpha(t){return this._rgb.a=Ut(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=hi(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return xi(this._rgb,2,t),this}darken(t){return xi(this._rgb,2,-t),this}saturate(t){return xi(this._rgb,1,t),this}desaturate(t){return xi(this._rgb,1,-t),this}rotate(t){return ql(this._rgb,t),this}}/*!
* Chart.js v4.4.6
* https://www.chartjs.org
* (c) 2024 Chart.js Contributors
* Released under the MIT License
*/function It(){}const nc=(()=>{let i=0;return()=>i++})();function H(i){return i===null||typeof i>"u"}function J(i){if(Array.isArray&&Array.isArray(i))return!0;const t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function R(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function bt(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function Mt(i,t){return bt(i)?i:t}function A(i,t){return typeof i>"u"?t:i}const sc=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/t,Co=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function V(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function N(i,t,e,n){let s,r,o;if(J(i))for(r=i.length,s=0;s<r;s++)t.call(e,i[s],s);else if(R(i))for(o=Object.keys(i),r=o.length,s=0;s<r;s++)t.call(e,i[o[s]],o[s])}function Ji(i,t){let e,n,s,r;if(!i||!t||i.length!==t.length)return!1;for(e=0,n=i.length;e<n;++e)if(s=i[e],r=t[e],s.datasetIndex!==r.datasetIndex||s.index!==r.index)return!1;return!0}function Ki(i){if(J(i))return i.map(Ki);if(R(i)){const t=Object.create(null),e=Object.keys(i),n=e.length;let s=0;for(;s<n;++s)t[e[s]]=Ki(i[e[s]]);return t}return i}function Io(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function rc(i,t,e,n){if(!Io(i))return;const s=t[i],r=e[i];R(s)&&R(r)?Ct(s,r,n):t[i]=Ki(r)}function Ct(i,t,e){const n=J(t)?t:[t],s=n.length;if(!R(i))return i;e=e||{};const r=e.merger||rc;let o;for(let a=0;a<s;++a){if(o=n[a],!R(o))continue;const l=Object.keys(o);for(let c=0,h=l.length;c<h;++c)r(l[c],i,o,e)}return i}function Ge(i,t){return Ct(i,t,{merger:oc})}function oc(i,t,e){if(!Io(i))return;const n=t[i],s=e[i];R(n)&&R(s)?Ge(n,s):Object.prototype.hasOwnProperty.call(t,i)||(t[i]=Ki(s))}const Rs={"":i=>i,x:i=>i.x,y:i=>i.y};function ac(i){const t=i.split("."),e=[];let n="";for(const s of t)n+=s,n.endsWith("\\")?n=n.slice(0,-1)+".":(e.push(n),n="");return e}function lc(i){const t=ac(i);return e=>{for(const n of t){if(n==="")break;e=e&&e[n]}return e}}function Me(i,t){return(Rs[t]||(Rs[t]=lc(t)))(i)}function ls(i){return i.charAt(0).toUpperCase()+i.slice(1)}const Qi=i=>typeof i<"u",Zt=i=>typeof i=="function",Ls=(i,t)=>{if(i.size!==t.size)return!1;for(const e of i)if(!t.has(e))return!1;return!0};function cc(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const U=Math.PI,q=2*U,hc=q+U,tn=Number.POSITIVE_INFINITY,uc=U/180,K=U/2,Gt=U/4,Fs=U*2/3,Bn=Math.log10,Oe=Math.sign;function Je(i,t,e){return Math.abs(i-t)<e}function Ns(i){const t=Math.round(i);i=Je(i,t,i/1e3)?t:i;const e=Math.pow(10,Math.floor(Bn(i))),n=i/e;return(n<=1?1:n<=2?2:n<=5?5:10)*e}function dc(i){const t=[],e=Math.sqrt(i);let n;for(n=1;n<e;n++)i%n===0&&(t.push(n),t.push(i/n));return e===(e|0)&&t.push(e),t.sort((s,r)=>s-r).pop(),t}function si(i){return!isNaN(parseFloat(i))&&isFinite(i)}function fc(i,t){const e=Math.round(i);return e-t<=i&&e+t>=i}function gc(i,t,e){let n,s,r;for(n=0,s=i.length;n<s;n++)r=i[n][e],isNaN(r)||(t.min=Math.min(t.min,r),t.max=Math.max(t.max,r))}function Dt(i){return i*(U/180)}function mc(i){return i*(180/U)}function Ws(i){if(!bt(i))return;let t=1,e=0;for(;Math.round(i*t)/t!==i;)t*=10,e++;return e}function Eo(i,t){const e=t.x-i.x,n=t.y-i.y,s=Math.sqrt(e*e+n*n);let r=Math.atan2(n,e);return r<-.5*U&&(r+=q),{angle:r,distance:s}}function $n(i,t){return Math.sqrt(Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2))}function pc(i,t){return(i-t+hc)%q-U}function zt(i){return(i%q+q)%q}function ri(i,t,e,n){const s=zt(i),r=zt(t),o=zt(e),a=zt(r-s),l=zt(o-s),c=zt(s-r),h=zt(s-o);return s===r||s===o||n&&r===o||a>l&&c<h}function rt(i,t,e){return Math.max(t,Math.min(e,i))}function yc(i){return rt(i,-32768,32767)}function $t(i,t,e,n=1e-6){return i>=Math.min(t,e)-n&&i<=Math.max(t,e)+n}function cs(i,t,e){e=e||(o=>i[o]<t);let n=i.length-1,s=0,r;for(;n-s>1;)r=s+n>>1,e(r)?s=r:n=r;return{lo:s,hi:n}}const ne=(i,t,e,n)=>cs(i,e,n?s=>{const r=i[s][t];return r<e||r===e&&i[s+1][t]===e}:s=>i[s][t]<e),bc=(i,t,e)=>cs(i,e,n=>i[n][t]>=e);function xc(i,t,e){let n=0,s=i.length;for(;n<s&&i[n]<t;)n++;for(;s>n&&i[s-1]>e;)s--;return n>0||s<i.length?i.slice(n,s):i}const Ao=["push","pop","shift","splice","unshift"];function _c(i,t){if(i._chartjs){i._chartjs.listeners.push(t);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Ao.forEach(e=>{const n="_onData"+ls(e),s=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...r){const o=s.apply(this,r);return i._chartjs.listeners.forEach(a=>{typeof a[n]=="function"&&a[n](...r)}),o}})})}function zs(i,t){const e=i._chartjs;if(!e)return;const n=e.listeners,s=n.indexOf(t);s!==-1&&n.splice(s,1),!(n.length>0)&&(Ao.forEach(r=>{delete i[r]}),delete i._chartjs)}function vc(i){const t=new Set(i);return t.size===i.length?i:Array.from(t)}const Po=function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame}();function Ro(i,t){let e=[],n=!1;return function(...s){e=s,n||(n=!0,Po.call(window,()=>{n=!1,i.apply(t,e)}))}}function wc(i,t){let e;return function(...n){return t?(clearTimeout(e),e=setTimeout(i,t,n)):i.apply(this,n),t}}const hs=i=>i==="start"?"left":i==="end"?"right":"center",it=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,kc=(i,t,e,n)=>i===(n?"left":"right")?e:i==="center"?(t+e)/2:t;function Sc(i,t,e){const n=t.length;let s=0,r=n;if(i._sorted){const{iScale:o,_parsed:a}=i,l=o.axis,{min:c,max:h,minDefined:u,maxDefined:d}=o.getUserBounds();u&&(s=rt(Math.min(ne(a,l,c).lo,e?n:ne(t,l,o.getPixelForValue(c)).lo),0,n-1)),d?r=rt(Math.max(ne(a,o.axis,h,!0).hi+1,e?0:ne(t,l,o.getPixelForValue(h),!0).hi+1),s,n)-s:r=n-s}return{start:s,count:r}}function Mc(i){const{xScale:t,yScale:e,_scaleRanges:n}=i,s={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!n)return i._scaleRanges=s,!0;const r=n.xmin!==t.min||n.xmax!==t.max||n.ymin!==e.min||n.ymax!==e.max;return Object.assign(n,s),r}const _i=i=>i===0||i===1,Vs=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*q/e)),Hs=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*q/e)+1,Ke={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*K)+1,easeOutSine:i=>Math.sin(i*K),easeInOutSine:i=>-.5*(Math.cos(U*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>_i(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>_i(i)?i:Vs(i,.075,.3),easeOutElastic:i=>_i(i)?i:Hs(i,.075,.3),easeInOutElastic(i){return _i(i)?i:i<.5?.5*Vs(i*2,.1125,.45):.5+.5*Hs(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-Ke.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?Ke.easeInBounce(i*2)*.5:Ke.easeOutBounce(i*2-1)*.5+.5};function us(i){if(i&&typeof i=="object"){const t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Bs(i){return us(i)?i:new ni(i)}function _n(i){return us(i)?i:new ni(i).saturate(.5).darken(.1).hexString()}const Oc=["x","y","borderWidth","radius","tension"],Tc=["color","borderColor","backgroundColor"];function Dc(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),i.set("animations",{colors:{type:"color",properties:Tc},numbers:{type:"number",properties:Oc}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Cc(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const $s=new Map;function Ic(i,t){t=t||{};const e=i+JSON.stringify(t);let n=$s.get(e);return n||(n=new Intl.NumberFormat(i,t),$s.set(e,n)),n}function un(i,t,e){return Ic(t,e).format(i)}const Lo={values(i){return J(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";const n=this.chart.options.locale;let s,r=i;if(e.length>1){const c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),r=Ec(i,e)}const o=Bn(Math.abs(r)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),un(i,n,l)},logarithmic(i,t,e){if(i===0)return"0";const n=e[t].significand||i/Math.pow(10,Math.floor(Bn(i)));return[1,2,3,5,10,15].includes(n)||t>.8*e.length?Lo.numeric.call(this,i,t,e):""}};function Ec(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var Fo={formatters:Lo};function Ac(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Fo.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const ae=Object.create(null),jn=Object.create(null);function Qe(i,t){if(!t)return i;const e=t.split(".");for(let n=0,s=e.length;n<s;++n){const r=e[n];i=i[r]||(i[r]=Object.create(null))}return i}function vn(i,t,e){return typeof t=="string"?Ct(Qe(i,t),e):Ct(Qe(i,""),t)}class Pc{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=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)=>_n(s.backgroundColor),this.hoverBorderColor=(n,s)=>_n(s.borderColor),this.hoverColor=(n,s)=>_n(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return vn(this,t,e)}get(t){return Qe(this,t)}describe(t,e){return vn(jn,t,e)}override(t,e){return vn(ae,t,e)}route(t,e,n,s){const r=Qe(this,t),o=Qe(this,n),a="_"+e;Object.defineProperties(r,{[a]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[a],c=o[s];return R(l)?Object.assign({},c,l):A(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(e=>e(this))}}var j=new Pc({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Dc,Cc,Ac]);function Rc(i){return!i||H(i.size)||H(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function js(i,t,e,n,s){let r=t[s];return r||(r=t[s]=i.measureText(s).width,e.push(s)),r>n&&(n=r),n}function Jt(i,t,e){const n=i.currentDevicePixelRatio,s=e!==0?Math.max(e/2,.5):0;return Math.round((t-s)*n)/n+s}function Us(i,t){!t&&!i||(t=t||i.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,i.width,i.height),t.restore())}function Un(i,t,e,n){No(i,t,e,n,null)}function No(i,t,e,n,s){let r,o,a,l,c,h,u,d;const f=t.pointStyle,g=t.rotation,m=t.radius;let p=(g||0)*uc;if(f&&typeof f=="object"&&(r=f.toString(),r==="[object HTMLImageElement]"||r==="[object HTMLCanvasElement]")){i.save(),i.translate(e,n),i.rotate(p),i.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),i.restore();return}if(!(isNaN(m)||m<=0)){switch(i.beginPath(),f){default:s?i.ellipse(e,n,s/2,m,0,0,q):i.arc(e,n,m,0,q),i.closePath();break;case"triangle":h=s?s/2:m,i.moveTo(e+Math.sin(p)*h,n-Math.cos(p)*m),p+=Fs,i.lineTo(e+Math.sin(p)*h,n-Math.cos(p)*m),p+=Fs,i.lineTo(e+Math.sin(p)*h,n-Math.cos(p)*m),i.closePath();break;case"rectRounded":c=m*.516,l=m-c,o=Math.cos(p+Gt)*l,u=Math.cos(p+Gt)*(s?s/2-c:l),a=Math.sin(p+Gt)*l,d=Math.sin(p+Gt)*(s?s/2-c:l),i.arc(e-u,n-a,c,p-U,p-K),i.arc(e+d,n-o,c,p-K,p),i.arc(e+u,n+a,c,p,p+K),i.arc(e-d,n+o,c,p+K,p+U),i.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*m,h=s?s/2:l,i.rect(e-h,n-l,2*h,2*l);break}p+=Gt;case"rectRot":u=Math.cos(p)*(s?s/2:m),o=Math.cos(p)*m,a=Math.sin(p)*m,d=Math.sin(p)*(s?s/2:m),i.moveTo(e-u,n-a),i.lineTo(e+d,n-o),i.lineTo(e+u,n+a),i.lineTo(e-d,n+o),i.closePath();break;case"crossRot":p+=Gt;case"cross":u=Math.cos(p)*(s?s/2:m),o=Math.cos(p)*m,a=Math.sin(p)*m,d=Math.sin(p)*(s?s/2:m),i.moveTo(e-u,n-a),i.lineTo(e+u,n+a),i.moveTo(e+d,n-o),i.lineTo(e-d,n+o);break;case"star":u=Math.cos(p)*(s?s/2:m),o=Math.cos(p)*m,a=Math.sin(p)*m,d=Math.sin(p)*(s?s/2:m),i.moveTo(e-u,n-a),i.lineTo(e+u,n+a),i.moveTo(e+d,n-o),i.lineTo(e-d,n+o),p+=Gt,u=Math.cos(p)*(s?s/2:m),o=Math.cos(p)*m,a=Math.sin(p)*m,d=Math.sin(p)*(s?s/2:m),i.moveTo(e-u,n-a),i.lineTo(e+u,n+a),i.moveTo(e+d,n-o),i.lineTo(e-d,n+o);break;case"line":o=s?s/2:Math.cos(p)*m,a=Math.sin(p)*m,i.moveTo(e-o,n-a),i.lineTo(e+o,n+a);break;case"dash":i.moveTo(e,n),i.lineTo(e+Math.cos(p)*(s?s/2:m),n+Math.sin(p)*m);break;case!1:i.closePath();break}i.fill(),t.borderWidth>0&&i.stroke()}}function oi(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.x<t.right+e&&i.y>t.top-e&&i.y<t.bottom+e}function ds(i,t){i.save(),i.beginPath(),i.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),i.clip()}function fs(i){i.restore()}function Lc(i,t,e,n,s){if(!t)return i.lineTo(e.x,e.y);if(s==="middle"){const r=(t.x+e.x)/2;i.lineTo(r,t.y),i.lineTo(r,e.y)}else s==="after"!=!!n?i.lineTo(t.x,e.y):i.lineTo(e.x,t.y);i.lineTo(e.x,e.y)}function Fc(i,t,e,n){if(!t)return i.lineTo(e.x,e.y);i.bezierCurveTo(n?t.cp1x:t.cp2x,n?t.cp1y:t.cp2y,n?e.cp2x:e.cp1x,n?e.cp2y:e.cp1y,e.x,e.y)}function Nc(i,t){t.translation&&i.translate(t.translation[0],t.translation[1]),H(t.rotation)||i.rotate(t.rotation),t.color&&(i.fillStyle=t.color),t.textAlign&&(i.textAlign=t.textAlign),t.textBaseline&&(i.textBaseline=t.textBaseline)}function Wc(i,t,e,n,s){if(s.strikethrough||s.underline){const r=i.measureText(n),o=t-r.actualBoundingBoxLeft,a=t+r.actualBoundingBoxRight,l=e-r.actualBoundingBoxAscent,c=e+r.actualBoundingBoxDescent,h=s.strikethrough?(l+c)/2:c;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=s.decorationWidth||2,i.moveTo(o,h),i.lineTo(a,h),i.stroke()}}function zc(i,t){const e=i.fillStyle;i.fillStyle=t.color,i.fillRect(t.left,t.top,t.width,t.height),i.fillStyle=e}function ai(i,t,e,n,s,r={}){const o=J(t)?t:[t],a=r.strokeWidth>0&&r.strokeColor!=="";let l,c;for(i.save(),i.font=s.string,Nc(i,r),l=0;l<o.length;++l)c=o[l],r.backdrop&&zc(i,r.backdrop),a&&(r.strokeColor&&(i.strokeStyle=r.strokeColor),H(r.strokeWidth)||(i.lineWidth=r.strokeWidth),i.strokeText(c,e,n,r.maxWidth)),i.fillText(c,e,n,r.maxWidth),Wc(i,e,n,c,r),n+=Number(s.lineHeight);i.restore()}function en(i,t){const{x:e,y:n,w:s,h:r,radius:o}=t;i.arc(e+o.topLeft,n+o.topLeft,o.topLeft,1.5*U,U,!0),i.lineTo(e,n+r-o.bottomLeft),i.arc(e+o.bottomLeft,n+r-o.bottomLeft,o.bottomLeft,U,K,!0),i.lineTo(e+s-o.bottomRight,n+r),i.arc(e+s-o.bottomRight,n+r-o.bottomRight,o.bottomRight,K,0,!0),i.lineTo(e+s,n+o.topRight),i.arc(e+s-o.topRight,n+o.topRight,o.topRight,0,-K,!0),i.lineTo(e+o.topLeft,n)}const Vc=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Hc=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Bc(i,t){const e=(""+i).match(Vc);if(!e||e[1]==="normal")return t*1.2;switch(i=+e[2],e[3]){case"px":return i;case"%":i/=100;break}return t*i}const $c=i=>+i||0;function gs(i,t){const e={},n=R(t),s=n?Object.keys(t):t,r=R(i)?n?o=>A(i[o],i[t[o]]):o=>i[o]:()=>i;for(const o of s)e[o]=$c(r(o));return e}function Wo(i){return gs(i,{top:"y",right:"x",bottom:"y",left:"x"})}function ve(i){return gs(i,["topLeft","topRight","bottomLeft","bottomRight"])}function dt(i){const t=Wo(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function tt(i,t){i=i||{},t=t||j.font;let e=A(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let n=A(i.style,t.style);n&&!(""+n).match(Hc)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const s={family:A(i.family,t.family),lineHeight:Bc(A(i.lineHeight,t.lineHeight),e),size:e,style:n,weight:A(i.weight,t.weight),string:""};return s.string=Rc(s),s}function $(i,t,e,n){let s,r,o;for(s=0,r=i.length;s<r;++s)if(o=i[s],o!==void 0&&(t!==void 0&&typeof o=="function"&&(o=o(t)),e!==void 0&&J(o)&&(o=o[e%o.length]),o!==void 0))return o}function jc(i,t,e){const{min:n,max:s}=i,r=Co(t,(s-n)/2),o=(a,l)=>e&&a===0?0:a+l;return{min:o(n,-Math.abs(r)),max:o(s,r)}}function le(i,t){return Object.assign(Object.create(i),t)}function ms(i,t=[""],e,n,s=()=>i[0]){const r=e||i;typeof n>"u"&&(n=Bo("_fallback",i));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:r,_fallback:n,_getTarget:s,override:a=>ms([a,...i],t,r,n)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete i[0][l],!0},get(a,l){return Vo(a,l,()=>Kc(l,t,i,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(a,l){return Zs(a).includes(l)},ownKeys(a){return Zs(a)},set(a,l,c){const h=a._storage||(a._storage=s());return a[l]=h[l]=c,delete a._keys,!0}})}function Te(i,t,e,n){const s={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:zo(i,n),setContext:r=>Te(i,r,e,n),override:r=>Te(i.override(r),t,e,n)};return new Proxy(s,{deleteProperty(r,o){return delete r[o],delete i[o],!0},get(r,o,a){return Vo(r,o,()=>Yc(r,o,a))},getOwnPropertyDescriptor(r,o){return r._descriptors.allKeys?Reflect.has(i,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,o)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(r,o){return Reflect.has(i,o)},ownKeys(){return Reflect.ownKeys(i)},set(r,o,a){return i[o]=a,delete r[o],!0}})}function zo(i,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:n=t.indexable,_allKeys:s=t.allKeys}=i;return{allKeys:s,scriptable:e,indexable:n,isScriptable:Zt(e)?e:()=>e,isIndexable:Zt(n)?n:()=>n}}const Uc=(i,t)=>i?i+ls(t):t,ps=(i,t)=>R(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Vo(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t)||t==="constructor")return i[t];const n=e();return i[t]=n,n}function Yc(i,t,e){const{_proxy:n,_context:s,_subProxy:r,_descriptors:o}=i;let a=n[t];return Zt(a)&&o.isScriptable(t)&&(a=Zc(t,a,i,e)),J(a)&&a.length&&(a=qc(t,a,i,o.isIndexable)),ps(t,a)&&(a=Te(a,s,r&&r[t],o)),a}function Zc(i,t,e,n){const{_proxy:s,_context:r,_subProxy:o,_stack:a}=e;if(a.has(i))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+i);a.add(i);let l=t(r,o||n);return a.delete(i),ps(i,l)&&(l=ys(s._scopes,s,i,l)),l}function qc(i,t,e,n){const{_proxy:s,_context:r,_subProxy:o,_descriptors:a}=e;if(typeof r.index<"u"&&n(i))return t[r.index%t.length];if(R(t[0])){const l=t,c=s._scopes.filter(h=>h!==l);t=[];for(const h of l){const u=ys(c,s,i,h);t.push(Te(u,r,o&&o[i],a))}}return t}function Ho(i,t,e){return Zt(i)?i(t,e):i}const Xc=(i,t)=>i===!0?t:typeof i=="string"?Me(t,i):void 0;function Gc(i,t,e,n,s){for(const r of t){const o=Xc(e,r);if(o){i.add(o);const a=Ho(o._fallback,e,s);if(typeof a<"u"&&a!==e&&a!==n)return a}else if(o===!1&&typeof n<"u"&&e!==n)return null}return!1}function ys(i,t,e,n){const s=t._rootScopes,r=Ho(t._fallback,e,n),o=[...i,...s],a=new Set;a.add(n);let l=Ys(a,o,e,r||e,n);return l===null||typeof r<"u"&&r!==e&&(l=Ys(a,o,r,l,n),l===null)?!1:ms(Array.from(a),[""],s,r,()=>Jc(t,e,n))}function Ys(i,t,e,n,s){for(;e;)e=Gc(i,t,e,n,s);return e}function Jc(i,t,e){const n=i._getTarget();t in n||(n[t]={});const s=n[t];return J(s)&&R(e)?e:s||{}}function Kc(i,t,e,n){let s;for(const r of t)if(s=Bo(Uc(r,i),e),typeof s<"u")return ps(i,s)?ys(e,n,i,s):s}function Bo(i,t){for(const e of t){if(!e)continue;const n=e[i];if(typeof n<"u")return n}}function Zs(i){let t=i._keys;return t||(t=i._keys=Qc(i._scopes)),t}function Qc(i){const t=new Set;for(const e of i)for(const n of Object.keys(e).filter(s=>!s.startsWith("_")))t.add(n);return Array.from(t)}function th(i,t,e,n){const{iScale:s}=i,{key:r="r"}=this._parsing,o=new Array(n);let a,l,c,h;for(a=0,l=n;a<l;++a)c=a+e,h=t[c],o[a]={r:s.parse(Me(h,r),c)};return o}const eh=Number.EPSILON||1e-14,De=(i,t)=>t<i.length&&!i[t].skip&&i[t],$o=i=>i==="x"?"y":"x";function ih(i,t,e,n){const s=i.skip?t:i,r=t,o=e.skip?t:e,a=$n(r,s),l=$n(o,r);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=n*c,d=n*h;return{previous:{x:r.x-u*(o.x-s.x),y:r.y-u*(o.y-s.y)},next:{x:r.x+d*(o.x-s.x),y:r.y+d*(o.y-s.y)}}}function nh(i,t,e){const n=i.length;let s,r,o,a,l,c=De(i,0);for(let h=0;h<n-1;++h)if(l=c,c=De(i,h+1),!(!l||!c)){if(Je(t[h],0,eh)){e[h]=e[h+1]=0;continue}s=e[h]/t[h],r=e[h+1]/t[h],a=Math.pow(s,2)+Math.pow(r,2),!(a<=9)&&(o=3/Math.sqrt(a),e[h]=s*o*t[h],e[h+1]=r*o*t[h])}}function sh(i,t,e="x"){const n=$o(e),s=i.length;let r,o,a,l=De(i,0);for(let c=0;c<s;++c){if(o=a,a=l,l=De(i,c+1),!a)continue;const h=a[e],u=a[n];o&&(r=(h-o[e])/3,a[`cp1${e}`]=h-r,a[`cp1${n}`]=u-r*t[c]),l&&(r=(l[e]-h)/3,a[`cp2${e}`]=h+r,a[`cp2${n}`]=u+r*t[c])}}function rh(i,t="x"){const e=$o(t),n=i.length,s=Array(n).fill(0),r=Array(n);let o,a,l,c=De(i,0);for(o=0;o<n;++o)if(a=l,l=c,c=De(i,o+1),!!l){if(c){const h=c[t]-l[t];s[o]=h!==0?(c[e]-l[e])/h:0}r[o]=a?c?Oe(s[o-1])!==Oe(s[o])?0:(s[o-1]+s[o])/2:s[o-1]:s[o]}nh(i,s,r),sh(i,r,t)}function vi(i,t,e){return Math.max(Math.min(i,e),t)}function oh(i,t){let e,n,s,r,o,a=oi(i[0],t);for(e=0,n=i.length;e<n;++e)o=r,r=a,a=e<n-1&&oi(i[e+1],t),r&&(s=i[e],o&&(s.cp1x=vi(s.cp1x,t.left,t.right),s.cp1y=vi(s.cp1y,t.top,t.bottom)),a&&(s.cp2x=vi(s.cp2x,t.left,t.right),s.cp2y=vi(s.cp2y,t.top,t.bottom)))}function ah(i,t,e,n,s){let r,o,a,l;if(t.spanGaps&&(i=i.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")rh(i,s);else{let c=n?i[i.length-1]:i[0];for(r=0,o=i.length;r<o;++r)a=i[r],l=ih(c,a,i[Math.min(r+1,o-(n?0:1))%o],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}t.capBezierPoints&&oh(i,e)}function bs(){return typeof window<"u"&&typeof document<"u"}function xs(i){let t=i.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function nn(i,t,e){let n;return typeof i=="string"?(n=parseInt(i,10),i.indexOf("%")!==-1&&(n=n/100*t.parentNode[e])):n=i,n}const dn=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function lh(i,t){return dn(i).getPropertyValue(t)}const ch=["top","right","bottom","left"];function re(i,t,e){const n={};e=e?"-"+e:"";for(let s=0;s<4;s++){const r=ch[s];n[r]=parseFloat(i[t+"-"+r+e])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const hh=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function uh(i,t){const e=i.touches,n=e&&e.length?e[0]:i,{offsetX:s,offsetY:r}=n;let o=!1,a,l;if(hh(s,r,i.target))a=s,l=r;else{const c=t.getBoundingClientRect();a=n.clientX-c.left,l=n.clientY-c.top,o=!0}return{x:a,y:l,box:o}}function ee(i,t){if("native"in i)return i;const{canvas:e,currentDevicePixelRatio:n}=t,s=dn(e),r=s.boxSizing==="border-box",o=re(s,"padding"),a=re(s,"border","width"),{x:l,y:c,box:h}=uh(i,e),u=o.left+(h&&a.left),d=o.top+(h&&a.top);let{width:f,height:g}=t;return r&&(f-=o.width+a.width,g-=o.height+a.height),{x:Math.round((l-u)/f*e.width/n),y:Math.round((c-d)/g*e.height/n)}}function dh(i,t,e){let n,s;if(t===void 0||e===void 0){const r=i&&xs(i);if(!r)t=i.clientWidth,e=i.clientHeight;else{const o=r.getBoundingClientRect(),a=dn(r),l=re(a,"border","width"),c=re(a,"padding");t=o.width-c.width-l.width,e=o.height-c.height-l.height,n=nn(a.maxWidth,r,"clientWidth"),s=nn(a.maxHeight,r,"clientHeight")}}return{width:t,height:e,maxWidth:n||tn,maxHeight:s||tn}}const wi=i=>Math.round(i*10)/10;function fh(i,t,e,n){const s=dn(i),r=re(s,"margin"),o=nn(s.maxWidth,i,"clientWidth")||tn,a=nn(s.maxHeight,i,"clientHeight")||tn,l=dh(i,t,e);let{width:c,height:h}=l;if(s.boxSizing==="content-box"){const d=re(s,"border","width"),f=re(s,"padding");c-=f.width+d.width,h-=f.height+d.height}return c=Math.max(0,c-r.width),h=Math.max(0,n?c/n:h-r.height),c=wi(Math.min(c,o,l.maxWidth)),h=wi(Math.min(h,a,l.maxHeight)),c&&!h&&(h=wi(c/2)),(t!==void 0||e!==void 0)&&n&&l.height&&h>l.height&&(h=l.height,c=wi(Math.floor(h*n))),{width:c,height:h}}function qs(i,t,e){const n=t||1,s=Math.floor(i.height*n),r=Math.floor(i.width*n);i.height=Math.floor(i.height),i.width=Math.floor(i.width);const o=i.canvas;return o.style&&(e||!o.style.height&&!o.style.width)&&(o.style.height=`${i.height}px`,o.style.width=`${i.width}px`),i.currentDevicePixelRatio!==n||o.height!==s||o.width!==r?(i.currentDevicePixelRatio=n,o.height=s,o.width=r,i.ctx.setTransform(n,0,0,n,0,0),!0):!1}const gh=function(){let i=!1;try{const t={get passive(){return i=!0,!1}};bs()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return i}();function Xs(i,t){const e=lh(i,t),n=e&&e.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function ie(i,t,e,n){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function mh(i,t,e,n){return{x:i.x+e*(t.x-i.x),y:n==="middle"?e<.5?i.y:t.y:n==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function ph(i,t,e,n){const s={x:i.cp2x,y:i.cp2y},r={x:t.cp1x,y:t.cp1y},o=ie(i,s,e),a=ie(s,r,e),l=ie(r,t,e),c=ie(o,a,e),h=ie(a,l,e);return ie(c,h,e)}const yh=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,n){return e-n},leftForLtr(e,n){return e-n}}},bh=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function we(i,t,e){return i?yh(t,e):bh()}function jo(i,t){let e,n;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,n=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=n)}function Uo(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function Yo(i){return i==="angle"?{between:ri,compare:pc,normalize:zt}:{between:$t,compare:(t,e)=>t-e,normalize:t=>t}}function Gs({start:i,end:t,count:e,loop:n,style:s}){return{start:i%e,end:t%e,loop:n&&(t-i+1)%e===0,style:s}}function xh(i,t,e){const{property:n,start:s,end:r}=e,{between:o,normalize:a}=Yo(n),l=t.length;let{start:c,end:h,loop:u}=i,d,f;if(u){for(c+=l,h+=l,d=0,f=l;d<f&&o(a(t[c%l][n]),s,r);++d)c--,h--;c%=l,h%=l}return h<c&&(h+=l),{start:c,end:h,loop:u,style:i.style}}function _h(i,t,e){if(!e)return[i];const{property:n,start:s,end:r}=e,o=t.length,{compare:a,between:l,normalize:c}=Yo(n),{start:h,end:u,loop:d,style:f}=xh(i,t,e),g=[];let m=!1,p=null,y,b,_;const v=()=>l(s,_,y)&&a(s,_)!==0,x=()=>a(r,y)===0||l(r,_,y),S=()=>m||v(),M=()=>!m||x();for(let k=h,D=h;k<=u;++k)b=t[k%o],!b.skip&&(y=c(b[n]),y!==_&&(m=l(y,s,r),p===null&&S()&&(p=a(y,s)===0?k:D),p!==null&&M()&&(g.push(Gs({start:p,end:k,loop:d,count:o,style:f})),p=null),D=k,_=y));return p!==null&&g.push(Gs({start:p,end:u,loop:d,count:o,style:f})),g}function vh(i,t){const e=[],n=i.segments;for(let s=0;s<n.length;s++){const r=_h(n[s],i.points,t);r.length&&e.push(...r)}return e}function wh(i,t,e,n){let s=0,r=t-1;if(e&&!n)for(;s<t&&!i[s].skip;)s++;for(;s<t&&i[s].skip;)s++;for(s%=t,e&&(r+=s);r>s&&i[r%t].skip;)r--;return r%=t,{start:s,end:r}}function kh(i,t,e,n){const s=i.length,r=[];let o=t,a=i[t],l;for(l=t+1;l<=e;++l){const c=i[l%s];c.skip||c.stop?a.skip||(n=!1,r.push({start:t%s,end:(l-1)%s,loop:n}),t=o=c.stop?l:null):(o=l,a.skip&&(t=l)),a=c}return o!==null&&r.push({start:t%s,end:o%s,loop:n}),r}function Sh(i,t){const e=i.points,n=i.options.spanGaps,s=e.length;if(!s)return[];const r=!!i._loop,{start:o,end:a}=wh(e,s,r,n);if(n===!0)return Js(i,[{start:o,end:a,loop:r}],e,t);const l=a<o?a+s:a,c=!!i._fullLoop&&o===0&&a===s-1;return Js(i,kh(e,o,l,c),e,t)}function Js(i,t,e,n){return!n||!n.setContext||!e?t:Mh(i,t,e,n)}function Mh(i,t,e,n){const s=i._chart.getContext(),r=Ks(i.options),{_datasetIndex:o,options:{spanGaps:a}}=i,l=e.length,c=[];let h=r,u=t[0].start,d=u;function f(g,m,p,y){const b=a?-1:1;if(g!==m){for(g+=l;e[g%l].skip;)g-=b;for(;e[m%l].skip;)m+=b;g%l!==m%l&&(c.push({start:g%l,end:m%l,loop:p,style:y}),h=y,u=m%l)}}for(const g of t){u=a?u:g.start;let m=e[u%l],p;for(d=u+1;d<=g.end;d++){const y=e[d%l];p=Ks(n.setContext(le(s,{type:"segment",p0:m,p1:y,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:o}))),Oh(p,h)&&f(u,d-1,g.loop,h),m=y,h=p}u<d-1&&f(u,d-1,g.loop,h)}return c}function Ks(i){return{backgroundColor:i.backgroundColor,borderCapStyle:i.borderCapStyle,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderJoinStyle:i.borderJoinStyle,borderWidth:i.borderWidth,borderColor:i.borderColor}}function Oh(i,t){if(!t)return!1;const e=[],n=function(s,r){return us(r)?(e.includes(r)||e.push(r),e.indexOf(r)):r};return JSON.stringify(i,n)!==JSON.stringify(t,n)}/*!
* Chart.js v4.4.6
* https://www.chartjs.org
* (c) 2024 Chart.js Contributors
* Released under the MIT License
*/class Th{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,s){const r=e.listeners[s],o=e.duration;r.forEach(a=>a({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(n-e.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Po.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((n,s)=>{if(!n.running||!n.items.length)return;const r=n.items;let o=r.length-1,a=!1,l;for(;o>=0;--o)l=r[o],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(t),a=!0):(r[o]=r[r.length-1],r.pop());a&&(s.draw(),this._notify(s,n,t,"progress")),r.length||(n.running=!1,this._notify(s,n,t,"complete"),n.initial=!1),e+=r.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((n,s)=>Math.max(n,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let s=n.length-1;for(;s>=0;--s)n[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Et=new Th;const Qs="transparent",Dh={boolean(i,t,e){return e>.5?t:i},color(i,t,e){const n=Bs(i||Qs),s=n.valid&&Bs(t||Qs);return s&&s.valid?s.mix(n,e).hexString():t},number(i,t,e){return i+(t-i)*e}};class Ch{constructor(t,e,n,s){const r=e[n];s=$([t.to,s,r,t.from]);const o=$([t.from,r,s]);this._active=!0,this._fn=t.fn||Dh[t.type||typeof o],this._easing=Ke[t.easing]||Ke.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);const s=this._target[this._prop],r=n-this._start,o=this._duration-r;this._start=n,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=$([t.to,e,s,t.from]),this._from=$([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,n=this._duration,s=this._prop,r=this._from,o=this._loop,a=this._to;let l;if(this._active=r!==a&&(o||e<n),!this._active){this._target[s]=a,this._notify(!0);return}if(e<0){this._target[s]=r;return}l=e/n%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(r,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,n)=>{t.push({res:e,rej:n})})}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let s=0;s<n.length;s++)n[s][e]()}}class Zo{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!R(t))return;const e=Object.keys(j.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const r=t[s];if(!R(r))return;const o={};for(const a of e)o[a]=r[a];(J(r.properties)&&r.properties||[s]).forEach(a=>{(a===s||!n.has(a))&&n.set(a,o)})})}_animateOptions(t,e){const n=e.options,s=Eh(t,n);if(!s)return[];const r=this._createAnimations(s,n);return n.$shared&&Ih(t.options.$animations,n).then(()=>{t.options=n},()=>{}),r}_createAnimations(t,e){const n=this._properties,s=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),a=Date.now();let l;for(l=o.length-1;l>=0;--l){const c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(t,e));continue}const h=e[c];let u=r[c];const d=n.get(c);if(u)if(d&&u.active()){u.update(d,h,a);continue}else u.cancel();if(!d||!d.duration){t[c]=h;continue}r[c]=u=new Ch(d,t,c,h),s.push(u)}return s}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const n=this._createAnimations(t,e);if(n.length)return Et.add(this._chart,n),!0}}function Ih(i,t){const e=[],n=Object.keys(t);for(let s=0;s<n.length;s++){const r=i[n[s]];r&&r.active()&&e.push(r.wait())}return Promise.all(e)}function Eh(i,t){if(!t)return;let e=i.options;if(!e){i.options=t;return}return e.$shared&&(i.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function tr(i,t){const e=i&&i.options||{},n=e.reverse,s=e.min===void 0?t:0,r=e.max===void 0?t:0;return{start:n?r:s,end:n?s:r}}function Ah(i,t,e){if(e===!1)return!1;const n=tr(i,e),s=tr(t,e);return{top:s.end,right:n.end,bottom:s.start,left:n.start}}function Ph(i){let t,e,n,s;return R(i)?(t=i.top,e=i.right,n=i.bottom,s=i.left):t=e=n=s=i,{top:t,right:e,bottom:n,left:s,disabled:i===!1}}function qo(i,t){const e=[],n=i._getSortedDatasetMetas(t);let s,r;for(s=0,r=n.length;s<r;++s)e.push(n[s].index);return e}function er(i,t,e,n={}){const s=i.keys,r=n.mode==="single";let o,a,l,c;if(t===null)return;let h=!1;for(o=0,a=s.length;o<a;++o){if(l=+s[o],l===e){if(h=!0,n.all)continue;break}c=i.values[l],bt(c)&&(r||t===0||Oe(t)===Oe(c))&&(t+=c)}return!h&&!n.all?0:t}function Rh(i,t){const{iScale:e,vScale:n}=t,s=e.axis==="x"?"x":"y",r=n.axis==="x"?"x":"y",o=Object.keys(i),a=new Array(o.length);let l,c,h;for(l=0,c=o.length;l<c;++l)h=o[l],a[l]={[s]:h,[r]:i[h]};return a}function wn(i,t){const e=i&&i.options.stacked;return e||e===void 0&&t.stack!==void 0}function Lh(i,t,e){return`${i.id}.${t.id}.${e.stack||e.type}`}function Fh(i){const{min:t,max:e,minDefined:n,maxDefined:s}=i.getUserBounds();return{min:n?t:Number.NEGATIVE_INFINITY,max:s?e:Number.POSITIVE_INFINITY}}function Nh(i,t,e){const n=i[t]||(i[t]={});return n[e]||(n[e]={})}function ir(i,t,e,n){for(const s of t.getMatchingVisibleMetas(n).reverse()){const r=i[s.index];if(e&&r>0||!e&&r<0)return s.index}return null}function nr(i,t){const{chart:e,_cachedMeta:n}=i,s=e._stacks||(e._stacks={}),{iScale:r,vScale:o,index:a}=n,l=r.axis,c=o.axis,h=Lh(r,o,n),u=t.length;let d;for(let f=0;f<u;++f){const g=t[f],{[l]:m,[c]:p}=g,y=g._stacks||(g._stacks={});d=y[c]=Nh(s,h,m),d[a]=p,d._top=ir(d,o,!0,n.type),d._bottom=ir(d,o,!1,n.type);const b=d._visualValues||(d._visualValues={});b[a]=p}}function kn(i,t){const e=i.scales;return Object.keys(e).filter(n=>e[n].axis===t).shift()}function Wh(i,t){return le(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function zh(i,t,e){return le(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Ne(i,t){const e=i.controller.index,n=i.vScale&&i.vScale.axis;if(n){t=t||i._parsed;for(const s of t){const r=s._stacks;if(!r||r[n]===void 0||r[n][e]===void 0)return;delete r[n][e],r[n]._visualValues!==void 0&&r[n]._visualValues[e]!==void 0&&delete r[n]._visualValues[e]}}}const Sn=i=>i==="reset"||i==="none",sr=(i,t)=>t?i:Object.assign({},i),Vh=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:qo(e,!0),values:null};class oe{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=wn(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&&Ne(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,n=this.getDataset(),s=(u,d,f,g)=>u==="x"?d:u==="r"?g:f,r=e.xAxisID=A(n.xAxisID,kn(t,"x")),o=e.yAxisID=A(n.yAxisID,kn(t,"y")),a=e.rAxisID=A(n.rAxisID,kn(t,"r")),l=e.indexAxis,c=e.iAxisID=s(l,r,o,a),h=e.vAxisID=s(l,o,r,a);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&zs(this._data,this),t._stacked&&Ne(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if(R(e)){const s=this._cachedMeta;this._data=Rh(e,s)}else if(n!==e){if(n){zs(n,this);const s=this._cachedMeta;Ne(s),s._parsed=[]}e&&Object.isExtensible(e)&&_c(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,n=this.getDataset();let s=!1;this._dataCheck();const r=e._stacked;e._stacked=wn(e.vScale,e),e.stack!==n.stack&&(s=!0,Ne(e),e.stack=n.stack),this._resyncElements(t),(s||r!==e._stacked)&&(nr(this,e._parsed),e._stacked=wn(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:n,_data:s}=this,{iScale:r,_stacked:o}=n,a=r.axis;let l=t===0&&e===s.length?!0:n._sorted,c=t>0&&n._parsed[t-1],h,u,d;if(this._parsing===!1)n._parsed=s,n._sorted=!0,d=s;else{J(s[t])?d=this.parseArrayData(n,s,t,e):R(s[t])?d=this.parseObjectData(n,s,t,e):d=this.parsePrimitiveData(n,s,t,e);const f=()=>u[a]===null||c&&u[a]<c[a];for(h=0;h<e;++h)n._parsed[h+t]=u=d[h],l&&(f()&&(l=!1),c=u);n._sorted=l}o&&nr(this,d)}parsePrimitiveData(t,e,n,s){const{iScale:r,vScale:o}=t,a=r.axis,l=o.axis,c=r.getLabels(),h=r===o,u=new Array(s);let d,f,g;for(d=0,f=s;d<f;++d)g=d+n,u[d]={[a]:h||r.parse(c[g],g),[l]:o.parse(e[g],g)};return u}parseArrayData(t,e,n,s){const{xScale:r,yScale:o}=t,a=new Array(s);let l,c,h,u;for(l=0,c=s;l<c;++l)h=l+n,u=e[h],a[l]={x:r.parse(u[0],h),y:o.parse(u[1],h)};return a}parseObjectData(t,e,n,s){const{xScale:r,yScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(s);let h,u,d,f;for(h=0,u=s;h<u;++h)d=h+n,f=e[d],c[h]={x:r.parse(Me(f,a),d),y:o.parse(Me(f,l),d)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,n){const s=this.chart,r=this._cachedMeta,o=e[t.axis],a={keys:qo(s,!0),values:e._stacks[t.axis]._visualValues};return er(a,o,r.index,{mode:n})}updateRangeFromParsed(t,e,n,s){const r=n[e.axis];let o=r===null?NaN:r;const a=s&&n._stacks[e.axis];s&&a&&(s.values=a,o=er(s,r,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,e){const n=this._cachedMeta,s=n._parsed,r=n._sorted&&t===n.iScale,o=s.length,a=this._getOtherScale(t),l=Vh(e,n,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:u}=Fh(a);let d,f;function g(){f=s[d];const m=f[a.axis];return!bt(f[t.axis])||h>m||u<m}for(d=0;d<o&&!(!g()&&(this.updateRangeFromParsed(c,t,f,l),r));++d);if(r){for(d=o-1;d>=0;--d)if(!g()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,n=[];let s,r,o;for(s=0,r=e.length;s<r;++s)o=e[s][t.axis],bt(o)&&n.push(o);return n}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,n=e.iScale,s=e.vScale,r=this.getParsed(t);return{label:n?""+n.getLabelForValue(r[n.axis]):"",value:s?""+s.getLabelForValue(r[s.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=Ph(A(this.options.clip,Ah(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,n=this._cachedMeta,s=n.data||[],r=e.chartArea,o=[],a=this._drawStart||0,l=this._drawCount||s.length-a,c=this.options.drawActiveElementsOnTop;let h;for(n.dataset&&n.dataset.draw(t,r,a,l),h=a;h<a+l;++h){const u=s[h];u.hidden||(u.active&&c?o.push(u):u.draw(t,r))}for(h=0;h<o.length;++h)o[h].draw(t,r)}getStyle(t,e){const n=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,e,n){const s=this.getDataset();let r;if(t>=0&&t<this._cachedMeta.data.length){const o=this._cachedMeta.data[t];r=o.$context||(o.$context=zh(this.getContext(),t,o)),r.parsed=this.getParsed(t),r.raw=s.data[t],r.index=r.dataIndex=t}else r=this.$context||(this.$context=Wh(this.chart.getContext(),this.index)),r.dataset=s,r.index=r.datasetIndex=this.index;return r.active=!!e,r.mode=n,r}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",n){const s=e==="active",r=this._cachedDataOpts,o=t+"-"+e,a=r[o],l=this.enableOptionSharing&&Qi(n);if(a)return sr(a,l);const c=this.chart.config,h=c.datasetElementScopeKeys(this._type,t),u=s?[`${t}Hover`,"hover",t,""]:[t,""],d=c.getOptionScopes(this.getDataset(),h),f=Object.keys(j.elements[t]),g=()=>this.getContext(n,s,e),m=c.resolveNamedOptions(d,f,g,u);return m.$shared&&(m.$shared=l,r[o]=Object.freeze(sr(m,l))),m}_resolveAnimations(t,e,n){const s=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,a=r[o];if(a)return a;let l;if(s.options.animation!==!1){const h=this.chart.config,u=h.datasetAnimationScopeKeys(this._type,e),d=h.getOptionScopes(this.getDataset(),u);l=h.createResolver(d,this.getContext(t,n,e))}const c=new Zo(s,l&&l.animations);return l&&l._cacheable&&(r[o]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Sn(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const n=this.resolveDataElementOptions(t,e),s=this._sharedOptions,r=this.getSharedOptions(n),o=this.includeOptions(e,r)||r!==s;return this.updateSharedOptions(r,e,n),{sharedOptions:r,includeOptions:o}}updateElement(t,e,n,s){Sn(s)?Object.assign(t,n):this._resolveAnimations(e,s).update(t,n)}updateSharedOptions(t,e,n){t&&!Sn(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,s){t.active=s;const r=this.getStyle(e,s);this._resolveAnimations(e,n,s).update(t,{options:!s&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,n=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const s=n.length,r=e.length,o=Math.min(r,s);o&&this.parse(0,o),r>s?this._insertElements(s,r-s,t):r<s&&this._removeElements(r,s-r)}_insertElements(t,e,n=!0){const s=this._cachedMeta,r=s.data,o=t+e;let a;const l=c=>{for(c.length+=e,a=c.length-1;a>=o;a--)c[a]=c[a-e]};for(l(r),a=t;a<o;++a)r[a]=new this.dataElementType;this._parsing&&l(s._parsed),this.parse(t,e),n&&this.updateElements(r,t,e,"reset")}updateElements(t,e,n,s){}_removeElements(t,e){const n=this._cachedMeta;if(this._parsing){const s=n._parsed.splice(t,e);n._stacked&&Ne(n,s)}n.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,n,s]=t;this[e](n,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}O(oe,"defaults",{}),O(oe,"datasetElementType",null),O(oe,"dataElementType",null);function Hh(i,t,e){let n=1,s=1,r=0,o=0;if(t<q){const a=i,l=a+t,c=Math.cos(a),h=Math.sin(a),u=Math.cos(l),d=Math.sin(l),f=(_,v,x)=>ri(_,a,l,!0)?1:Math.max(v,v*e,x,x*e),g=(_,v,x)=>ri(_,a,l,!0)?-1:Math.min(v,v*e,x,x*e),m=f(0,c,u),p=f(K,h,d),y=g(U,c,u),b=g(U+K,h,d);n=(m-y)/2,s=(p-b)/2,r=-(m+y)/2,o=-(p+b)/2}return{ratioX:n,ratioY:s,offsetX:r,offsetY:o}}class xe extends oe{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const n=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=n;else{let r=l=>+n[l];if(R(n[t])){const{key:l="value"}=this._parsing;r=c=>+Me(n[c],l)}let o,a;for(o=t,a=t+e;o<a;++o)s._parsed[o]=r(o)}}_getRotation(){return Dt(this.options.rotation-90)}_getCircumference(){return Dt(this.options.circumference)}_getRotationExtents(){let t=q,e=-q;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const s=this.chart.getDatasetMeta(n).controller,r=s._getRotation(),o=s._getCircumference();t=Math.min(t,r),e=Math.max(e,r+o)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:n}=e,s=this._cachedMeta,r=s.data,o=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,a=Math.max((Math.min(n.width,n.height)-o)/2,0),l=Math.min(sc(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:h,rotation:u}=this._getRotationExtents(),{ratioX:d,ratioY:f,offsetX:g,offsetY:m}=Hh(u,h,l),p=(n.width-o)/d,y=(n.height-o)/f,b=Math.max(Math.min(p,y)/2,0),_=Co(this.options.radius,b),v=Math.max(_*l,0),x=(_-v)/this._getVisibleDatasetWeightTotal();this.offsetX=g*_,this.offsetY=m*_,s.total=this.calculateTotal(),this.outerRadius=_-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*c,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){const n=this.options,s=this._cachedMeta,r=this._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||s._parsed[t]===null||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*r/q)}updateElements(t,e,n,s){const r=s==="reset",o=this.chart,a=o.chartArea,c=o.options.animation,h=(a.left+a.right)/2,u=(a.top+a.bottom)/2,d=r&&c.animateScale,f=d?0:this.innerRadius,g=d?0:this.outerRadius,{sharedOptions:m,includeOptions:p}=this._getSharedOptions(e,s);let y=this._getRotation(),b;for(b=0;b<e;++b)y+=this._circumference(b,r);for(b=e;b<e+n;++b){const _=this._circumference(b,r),v=t[b],x={x:h+this.offsetX,y:u+this.offsetY,startAngle:y,endAngle:y+_,circumference:_,outerRadius:g,innerRadius:f};p&&(x.options=m||this.resolveDataElementOptions(b,v.active?"active":s)),y+=_,this.updateElement(v,b,x,s)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let n=0,s;for(s=0;s<e.length;s++){const r=t._parsed[s];r!==null&&!isNaN(r)&&this.chart.getDataVisibility(s)&&!e[s].hidden&&(n+=Math.abs(r))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?q*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,s=n.data.labels||[],r=un(e._parsed[t],n.options.locale);return{label:s[t]||"",value:r}}getMaxBorderWidth(t){let e=0;const n=this.chart;let s,r,o,a,l;if(!t){for(s=0,r=n.data.datasets.length;s<r;++s)if(n.isDatasetVisible(s)){o=n.getDatasetMeta(s),t=o.data,a=o.controller;break}}if(!t)return 0;for(s=0,r=t.length;s<r;++s)l=a.resolveDataElementOptions(s),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let n=0,s=t.length;n<s;++n){const r=this.resolveDataElementOptions(n);e=Math.max(e,r.offset||0,r.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e}_getRingWeight(t){return Math.max(A(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}O(xe,"id","doughnut"),O(xe,"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"}),O(xe,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),O(xe,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n,color:s}}=t.legend.options;return e.labels.map((r,o)=>{const l=t.getDatasetMeta(0).controller.getStyle(o);return{text:r,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}}});class Hi extends oe{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:n,data:s=[],_dataset:r}=e,o=this.chart._animationsDisabled;let{start:a,count:l}=Sc(e,s,o);this._drawStart=a,this._drawCount=l,Mc(e)&&(a=0,l=s.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!r._decimated,n.points=s;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(n,void 0,{animated:!o,options:c},t),this.updateElements(s,a,l,t)}updateElements(t,e,n,s){const r=s==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:u}=this._getSharedOptions(e,s),d=o.axis,f=a.axis,{spanGaps:g,segment:m}=this.options,p=si(g)?g:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||r||s==="none",b=e+n,_=t.length;let v=e>0&&this.getParsed(e-1);for(let x=0;x<_;++x){const S=t[x],M=y?S:{};if(x<e||x>=b){M.skip=!0;continue}const k=this.getParsed(x),D=H(k[f]),I=M[d]=o.getPixelForValue(k[d],x),E=M[f]=r||D?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,k,l):k[f],x);M.skip=isNaN(I)||isNaN(E)||D,M.stop=x>0&&Math.abs(k[d]-v[d])>p,m&&(M.parsed=k,M.raw=c.data[x]),u&&(M.options=h||this.resolveDataElementOptions(x,S.active?"active":s)),y||this.updateElement(S,x,M,s),v=k}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,n=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return n;const r=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(n,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}O(Hi,"id","line"),O(Hi,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),O(Hi,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Bi extends oe{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,s=n.data.labels||[],r=un(e._parsed[t].r,n.options.locale);return{label:s[t]||"",value:r}}parseObjectData(t,e,n,s){return th.bind(this)(t,e,n,s)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((n,s)=>{const r=this.getParsed(s).r;!isNaN(r)&&this.chart.getDataVisibility(s)&&(r<e.min&&(e.min=r),r>e.max&&(e.max=r))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,n=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(s/2,0),o=Math.max(n.cutoutPercentage?r/100*n.cutoutPercentage:1,0),a=(r-o)/t.getVisibleDatasetCount();this.outerRadius=r-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,e,n,s){const r=s==="reset",o=this.chart,l=o.options.animation,c=this._cachedMeta.rScale,h=c.xCenter,u=c.yCenter,d=c.getIndexAngle(0)-.5*U;let f=d,g;const m=360/this.countVisibleElements();for(g=0;g<e;++g)f+=this._computeAngle(g,s,m);for(g=e;g<e+n;g++){const p=t[g];let y=f,b=f+this._computeAngle(g,s,m),_=o.getDataVisibility(g)?c.getDistanceFromCenterForValue(this.getParsed(g).r):0;f=b,r&&(l.animateScale&&(_=0),l.animateRotate&&(y=b=d));const v={x:h,y:u,innerRadius:0,outerRadius:_,startAngle:y,endAngle:b,options:this.resolveDataElementOptions(g,p.active?"active":s)};this.updateElement(p,g,v,s)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((n,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&e++}),e}_computeAngle(t,e,n){return this.chart.getDataVisibility(t)?Dt(this.resolveDataElementOptions(t,e).angle||n):0}}O(Bi,"id","polarArea"),O(Bi,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),O(Bi,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n,color:s}}=t.legend.options;return e.labels.map((r,o)=>{const l=t.getDatasetMeta(0).controller.getStyle(o);return{text:r,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class Yn extends xe{}O(Yn,"id","pie"),O(Yn,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});function Kt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class _s{constructor(t){O(this,"options");this.options=t||{}}static override(t){Object.assign(_s.prototype,t)}init(){}formats(){return Kt()}parse(){return Kt()}format(){return Kt()}add(){return Kt()}diff(){return Kt()}startOf(){return Kt()}endOf(){return Kt()}}var Xo={_date:_s};function Bh(i,t,e,n){const{controller:s,data:r,_sorted:o}=i,a=s._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&o&&r.length){const l=a._reversePixels?bc:ne;if(n){if(s._sharedOptions){const c=r[0],h=typeof c.getRange=="function"&&c.getRange(t);if(h){const u=l(r,t,e-h),d=l(r,t,e+h);return{lo:u.lo,hi:d.hi}}}}else return l(r,t,e)}return{lo:0,hi:r.length-1}}function ui(i,t,e,n,s){const r=i.getSortedVisibleDatasetMetas(),o=e[t];for(let a=0,l=r.length;a<l;++a){const{index:c,data:h}=r[a],{lo:u,hi:d}=Bh(r[a],t,o,s);for(let f=u;f<=d;++f){const g=h[f];g.skip||n(g,c,f)}}}function $h(i){const t=i.indexOf("x")!==-1,e=i.indexOf("y")!==-1;return function(n,s){const r=t?Math.abs(n.x-s.x):0,o=e?Math.abs(n.y-s.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(o,2))}}function Mn(i,t,e,n,s){const r=[];return!s&&!i.isPointInArea(t)||ui(i,e,t,function(a,l,c){!s&&!oi(a,i.chartArea,0)||a.inRange(t.x,t.y,n)&&r.push({element:a,datasetIndex:l,index:c})},!0),r}function jh(i,t,e,n){let s=[];function r(o,a,l){const{startAngle:c,endAngle:h}=o.getProps(["startAngle","endAngle"],n),{angle:u}=Eo(o,{x:t.x,y:t.y});ri(u,c,h)&&s.push({element:o,datasetIndex:a,index:l})}return ui(i,e,t,r),s}function Uh(i,t,e,n,s,r){let o=[];const a=$h(e);let l=Number.POSITIVE_INFINITY;function c(h,u,d){const f=h.inRange(t.x,t.y,s);if(n&&!f)return;const g=h.getCenterPoint(s);if(!(!!r||i.isPointInArea(g))&&!f)return;const p=a(t,g);p<l?(o=[{element:h,datasetIndex:u,index:d}],l=p):p===l&&o.push({element:h,datasetIndex:u,index:d})}return ui(i,e,t,c),o}function On(i,t,e,n,s,r){return!r&&!i.isPointInArea(t)?[]:e==="r"&&!n?jh(i,t,e,s):Uh(i,t,e,n,s,r)}function rr(i,t,e,n,s){const r=[],o=e==="x"?"inXRange":"inYRange";let a=!1;return ui(i,e,t,(l,c,h)=>{l[o]&&l[o](t[e],s)&&(r.push({element:l,datasetIndex:c,index:h}),a=a||l.inRange(t.x,t.y,s))}),n&&!a?[]:r}var Yh={evaluateInteractionItems:ui,modes:{index(i,t,e,n){const s=ee(t,i),r=e.axis||"x",o=e.includeInvisible||!1,a=e.intersect?Mn(i,s,r,n,o):On(i,s,r,!1,n,o),l=[];return a.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{const h=a[0].index,u=c.data[h];u&&!u.skip&&l.push({element:u,datasetIndex:c.index,index:h})}),l):[]},dataset(i,t,e,n){const s=ee(t,i),r=e.axis||"xy",o=e.includeInvisible||!1;let a=e.intersect?Mn(i,s,r,n,o):On(i,s,r,!1,n,o);if(a.length>0){const l=a[0].datasetIndex,c=i.getDatasetMeta(l).data;a=[];for(let h=0;h<c.length;++h)a.push({element:c[h],datasetIndex:l,index:h})}return a},point(i,t,e,n){const s=ee(t,i),r=e.axis||"xy",o=e.includeInvisible||!1;return Mn(i,s,r,n,o)},nearest(i,t,e,n){const s=ee(t,i),r=e.axis||"xy",o=e.includeInvisible||!1;return On(i,s,r,e.intersect,n,o)},x(i,t,e,n){const s=ee(t,i);return rr(i,s,"x",e.intersect,n)},y(i,t,e,n){const s=ee(t,i);return rr(i,s,"y",e.intersect,n)}}};const Go=["left","top","right","bottom"];function We(i,t){return i.filter(e=>e.pos===t)}function or(i,t){return i.filter(e=>Go.indexOf(e.pos)===-1&&e.box.axis===t)}function ze(i,t){return i.sort((e,n)=>{const s=t?n:e,r=t?e:n;return s.weight===r.weight?s.index-r.index:s.weight-r.weight})}function Zh(i){const t=[];let e,n,s,r,o,a;for(e=0,n=(i||[]).length;e<n;++e)s=i[e],{position:r,options:{stack:o,stackWeight:a=1}}=s,t.push({index:e,box:s,pos:r,horizontal:s.isHorizontal(),weight:s.weight,stack:o&&r+o,stackWeight:a});return t}function qh(i){const t={};for(const e of i){const{stack:n,pos:s,stackWeight:r}=e;if(!n||!Go.includes(s))continue;const o=t[n]||(t[n]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=r}return t}function Xh(i,t){const e=qh(i),{vBoxMaxWidth:n,hBoxMaxHeight:s}=t;let r,o,a;for(r=0,o=i.length;r<o;++r){a=i[r];const{fullSize:l}=a.box,c=e[a.stack],h=c&&a.stackWeight/c.weight;a.horizontal?(a.width=h?h*n:l&&t.availableWidth,a.height=s):(a.width=n,a.height=h?h*s:l&&t.availableHeight)}return e}function Gh(i){const t=Zh(i),e=ze(t.filter(c=>c.box.fullSize),!0),n=ze(We(t,"left"),!0),s=ze(We(t,"right")),r=ze(We(t,"top"),!0),o=ze(We(t,"bottom")),a=or(t,"x"),l=or(t,"y");return{fullSize:e,leftAndTop:n.concat(r),rightAndBottom:s.concat(l).concat(o).concat(a),chartArea:We(t,"chartArea"),vertical:n.concat(s).concat(l),horizontal:r.concat(o).concat(a)}}function ar(i,t,e,n){return Math.max(i[e],t[e])+Math.max(i[n],t[n])}function Jo(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function Jh(i,t,e,n){const{pos:s,box:r}=e,o=i.maxPadding;if(!R(s)){e.size&&(i[s]-=e.size);const u=n[e.stack]||{size:0,count:1};u.size=Math.max(u.size,e.horizontal?r.height:r.width),e.size=u.size/u.count,i[s]+=e.size}r.getPadding&&Jo(o,r.getPadding());const a=Math.max(0,t.outerWidth-ar(o,i,"left","right")),l=Math.max(0,t.outerHeight-ar(o,i,"top","bottom")),c=a!==i.w,h=l!==i.h;return i.w=a,i.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function Kh(i){const t=i.maxPadding;function e(n){const s=Math.max(t[n]-i[n],0);return i[n]+=s,s}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function Qh(i,t){const e=t.maxPadding;function n(s){const r={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{r[o]=Math.max(t[o],e[o])}),r}return n(i?["left","right"]:["top","bottom"])}function Ue(i,t,e,n){const s=[];let r,o,a,l,c,h;for(r=0,o=i.length,c=0;r<o;++r){a=i[r],l=a.box,l.update(a.width||t.w,a.height||t.h,Qh(a.horizontal,t));const{same:u,other:d}=Jh(t,e,a,n);c|=u&&s.length,h=h||d,l.fullSize||s.push(a)}return c&&Ue(s,t,e,n)||h}function ki(i,t,e,n,s){i.top=e,i.left=t,i.right=t+n,i.bottom=e+s,i.width=n,i.height=s}function lr(i,t,e,n){const s=e.padding;let{x:r,y:o}=t;for(const a of i){const l=a.box,c=n[a.stack]||{count:1,placed:0,weight:1},h=a.stackWeight/c.weight||1;if(a.horizontal){const u=t.w*h,d=c.size||l.height;Qi(c.start)&&(o=c.start),l.fullSize?ki(l,s.left,o,e.outerWidth-s.right-s.left,d):ki(l,t.left+c.placed,o,u,d),c.start=o,c.placed+=u,o=l.bottom}else{const u=t.h*h,d=c.size||l.width;Qi(c.start)&&(r=c.start),l.fullSize?ki(l,r,s.top,d,e.outerHeight-s.bottom-s.top):ki(l,r,t.top+c.placed,d,u),c.start=r,c.placed+=u,r=l.right}}t.x=r,t.y=o}var mt={addBox(i,t){i.boxes||(i.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},i.boxes.push(t)},removeBox(i,t){const e=i.boxes?i.boxes.indexOf(t):-1;e!==-1&&i.boxes.splice(e,1)},configure(i,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(i,t,e,n){if(!i)return;const s=dt(i.options.layout.padding),r=Math.max(t-s.width,0),o=Math.max(e-s.height,0),a=Gh(i.boxes),l=a.vertical,c=a.horizontal;N(i.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});const h=l.reduce((m,p)=>p.box.options&&p.box.options.display===!1?m:m+1,0)||1,u=Object.freeze({outerWidth:t,outerHeight:e,padding:s,availableWidth:r,availableHeight:o,vBoxMaxWidth:r/2/h,hBoxMaxHeight:o/2}),d=Object.assign({},s);Jo(d,dt(n));const f=Object.assign({maxPadding:d,w:r,h:o,x:s.left,y:s.top},s),g=Xh(l.concat(c),u);Ue(a.fullSize,f,u,g),Ue(l,f,u,g),Ue(c,f,u,g)&&Ue(l,f,u,g),Kh(f),lr(a.leftAndTop,f,u,g),f.x+=f.w,f.y+=f.h,lr(a.rightAndBottom,f,u,g),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},N(a.chartArea,m=>{const p=m.box;Object.assign(p,i.chartArea),p.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class Ko{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,s){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):n)}}isAttached(t){return!0}updateConfig(t){}}class tu extends Ko{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const $i="$chartjs",eu={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},cr=i=>i===null||i==="";function iu(i,t){const e=i.style,n=i.getAttribute("height"),s=i.getAttribute("width");if(i[$i]={initial:{height:n,width:s,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",cr(s)){const r=Xs(i,"width");r!==void 0&&(i.width=r)}if(cr(n))if(i.style.height==="")i.height=i.width/(t||2);else{const r=Xs(i,"height");r!==void 0&&(i.height=r)}return i}const Qo=gh?{passive:!0}:!1;function nu(i,t,e){i&&i.addEventListener(t,e,Qo)}function su(i,t,e){i&&i.canvas&&i.canvas.removeEventListener(t,e,Qo)}function ru(i,t){const e=eu[i.type]||i.type,{x:n,y:s}=ee(i,t);return{type:e,chart:t,native:i,x:n!==void 0?n:null,y:s!==void 0?s:null}}function sn(i,t){for(const e of i)if(e===t||e.contains(t))return!0}function ou(i,t,e){const n=i.canvas,s=new MutationObserver(r=>{let o=!1;for(const a of r)o=o||sn(a.addedNodes,n),o=o&&!sn(a.removedNodes,n);o&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}function au(i,t,e){const n=i.canvas,s=new MutationObserver(r=>{let o=!1;for(const a of r)o=o||sn(a.removedNodes,n),o=o&&!sn(a.addedNodes,n);o&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}const li=new Map;let hr=0;function ta(){const i=window.devicePixelRatio;i!==hr&&(hr=i,li.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function lu(i,t){li.size||window.addEventListener("resize",ta),li.set(i,t)}function cu(i){li.delete(i),li.size||window.removeEventListener("resize",ta)}function hu(i,t,e){const n=i.canvas,s=n&&xs(n);if(!s)return;const r=Ro((a,l)=>{const c=s.clientWidth;e(a,l),c<s.clientWidth&&e()},window),o=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||r(c,h)});return o.observe(s),lu(i,r),o}function Tn(i,t,e){e&&e.disconnect(),t==="resize"&&cu(i)}function uu(i,t,e){const n=i.canvas,s=Ro(r=>{i.ctx!==null&&e(ru(r,i))},i);return nu(n,t,s),s}class du extends Ko{acquireContext(t,e){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(iu(t,e),n):null}releaseContext(t){const e=t.canvas;if(!e[$i])return!1;const n=e[$i].initial;["height","width"].forEach(r=>{const o=n[r];H(o)?e.removeAttribute(r):e.setAttribute(r,o)});const s=n.style||{};return Object.keys(s).forEach(r=>{e.style[r]=s[r]}),e.width=e.width,delete e[$i],!0}addEventListener(t,e,n){this.removeEventListener(t,e);const s=t.$proxies||(t.$proxies={}),o={attach:ou,detach:au,resize:hu}[e]||uu;s[e]=o(t,e,n)}removeEventListener(t,e){const n=t.$proxies||(t.$proxies={}),s=n[e];if(!s)return;({attach:Tn,detach:Tn,resize:Tn}[e]||su)(t,e,s),n[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,s){return fh(t,e,n,s)}isAttached(t){const e=t&&xs(t);return!!(e&&e.isConnected)}}function fu(i){return!bs()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?tu:du}class kt{constructor(){O(this,"x");O(this,"y");O(this,"active",!1);O(this,"options");O(this,"$animations")}tooltipPosition(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return si(this.x)&&si(this.y)}getProps(t,e){const n=this.$animations;if(!e||!n)return this;const s={};return t.forEach(r=>{s[r]=n[r]&&n[r].active()?n[r]._to:this[r]}),s}}O(kt,"defaults",{}),O(kt,"defaultRoutes");function gu(i,t){const e=i.options.ticks,n=mu(i),s=Math.min(e.maxTicksLimit||n,n),r=e.major.enabled?yu(t):[],o=r.length,a=r[0],l=r[o-1],c=[];if(o>s)return bu(t,c,r,o/s),c;const h=pu(r,t,s);if(o>0){let u,d;const f=o>1?Math.round((l-a)/(o-1)):null;for(Si(t,c,h,H(f)?0:a-f,a),u=0,d=o-1;u<d;u++)Si(t,c,h,r[u],r[u+1]);return Si(t,c,h,l,H(f)?t.length:l+f),c}return Si(t,c,h),c}function mu(i){const t=i.options.offset,e=i._tickSize(),n=i._length/e+(t?0:1),s=i._maxLength/e;return Math.floor(Math.min(n,s))}function pu(i,t,e){const n=xu(i),s=t.length/e;if(!n)return Math.max(s,1);const r=dc(n);for(let o=0,a=r.length-1;o<a;o++){const l=r[o];if(l>s)return l}return Math.max(s,1)}function yu(i){const t=[];let e,n;for(e=0,n=i.length;e<n;e++)i[e].major&&t.push(e);return t}function bu(i,t,e,n){let s=0,r=e[0],o;for(n=Math.ceil(n),o=0;o<i.length;o++)o===r&&(t.push(i[o]),s++,r=e[s*n])}function Si(i,t,e,n,s){const r=A(n,0),o=Math.min(A(s,i.length),i.length);let a=0,l,c,h;for(e=Math.ceil(e),s&&(l=s-n,e=l/Math.floor(l/e)),h=r;h<0;)a++,h=Math.round(r+a*e);for(c=Math.max(r,0);c<o;c++)c===h&&(t.push(i[c]),a++,h=Math.round(r+a*e))}function xu(i){const t=i.length;let e,n;if(t<2)return!1;for(n=i[0],e=1;e<t;++e)if(i[e]-i[e-1]!==n)return!1;return n}const _u=i=>i==="left"?"right":i==="right"?"left":i,ur=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e,dr=(i,t)=>Math.min(t||i,i);function fr(i,t){const e=[],n=i.length/t,s=i.length;let r=0;for(;r<s;r+=n)e.push(i[Math.floor(r)]);return e}function vu(i,t,e){const n=i.ticks.length,s=Math.min(t,n-1),r=i._startPixel,o=i._endPixel,a=1e-6;let l=i.getPixelForTick(s),c;if(!(e&&(n===1?c=Math.max(l-r,o-l):t===0?c=(i.getPixelForTick(1)-l)/2:c=(l-i.getPixelForTick(s-1))/2,l+=s<t?c:-c,l<r-a||l>o+a)))return l}function wu(i,t){N(i,e=>{const n=e.gc,s=n.length/2;let r;if(s>t){for(r=0;r<s;++r)delete e.data[n[r]];n.splice(0,s)}})}function Ve(i){return i.drawTicks?i.tickLength:0}function gr(i,t){if(!i.display)return 0;const e=tt(i.font,t),n=dt(i.padding);return(J(i.text)?i.text.length:1)*e.lineHeight+n.height}function ku(i,t){return le(i,{scale:t,type:"scale"})}function Su(i,t,e){return le(i,{tick:e,index:t,type:"tick"})}function Mu(i,t,e){let n=hs(i);return(e&&t!=="right"||!e&&t==="right")&&(n=_u(n)),n}function Ou(i,t,e,n){const{top:s,left:r,bottom:o,right:a,chart:l}=i,{chartArea:c,scales:h}=l;let u=0,d,f,g;const m=o-s,p=a-r;if(i.isHorizontal()){if(f=it(n,r,a),R(e)){const y=Object.keys(e)[0],b=e[y];g=h[y].getPixelForValue(b)+m-t}else e==="center"?g=(c.bottom+c.top)/2+m-t:g=ur(i,e,t);d=a-r}else{if(R(e)){const y=Object.keys(e)[0],b=e[y];f=h[y].getPixelForValue(b)-p+t}else e==="center"?f=(c.left+c.right)/2-p+t:f=ur(i,e,t);g=it(n,o,s),u=e==="left"?-K:K}return{titleX:f,titleY:g,maxWidth:d,rotation:u}}class Ie extends kt{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:n,_suggestedMax:s}=this;return t=Mt(t,Number.POSITIVE_INFINITY),e=Mt(e,Number.NEGATIVE_INFINITY),n=Mt(n,Number.POSITIVE_INFINITY),s=Mt(s,Number.NEGATIVE_INFINITY),{min:Mt(t,n),max:Mt(e,s),minDefined:bt(t),maxDefined:bt(e)}}getMinMax(t){let{min:e,max:n,minDefined:s,maxDefined:r}=this.getUserBounds(),o;if(s&&r)return{min:e,max:n};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)o=a[l].controller.getMinMax(this,t),s||(e=Math.min(e,o.min)),r||(n=Math.max(n,o.max));return e=r&&e>n?n:e,n=s&&e>n?e:n,{min:Mt(e,Mt(n,e)),max:Mt(n,Mt(e,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){V(this.options.beforeUpdate,[this])}update(t,e,n){const{beginAtZero:s,grace:r,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,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=jc(this,r,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?fr(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=gu(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,n;this.isHorizontal()?(e=this.left,n=this.right):(e=this.top,n=this.bottom,t=!t),this._startPixel=e,this._endPixel=n,this._reversePixels=t,this._length=n-e,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(t){this.chart.notifyPlugins(t,this.getContext()),V(this.options[t],[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(t){const e=this.options.ticks;let n,s,r;for(n=0,s=t.length;n<s;n++)r=t[n],r.label=V(e.callback,[r.value,n,t],this)}afterTickToLabelConversion(){V(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){V(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,n=dr(this.ticks.length,t.ticks.maxTicksLimit),s=e.minRotation||0,r=e.maxRotation;let o=s,a,l,c;if(!this._isVisible()||!e.display||s>=r||n<=1||!this.isHorizontal()){this.labelRotation=s;return}const h=this._getLabelSizes(),u=h.widest.width,d=h.highest.height,f=rt(this.chart.width-u,0,this.maxWidth);a=t.offset?this.maxWidth/n:f/(n-1),u+6>a&&(a=f/(n-(t.offset?.5:1)),l=this.maxHeight-Ve(t.grid)-e.padding-gr(t.title,this.chart.options.font),c=Math.sqrt(u*u+d*d),o=mc(Math.min(Math.asin(rt((h.highest.height+6)/a,-1,1)),Math.asin(rt(l/c,-1,1))-Math.asin(rt(d/c,-1,1)))),o=Math.max(s,Math.min(r,o))),this.labelRotation=o}afterCalculateLabelRotation(){V(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){V(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:n,title:s,grid:r}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=gr(s,e.options.font);if(a?(t.width=this.maxWidth,t.height=Ve(r)+l):(t.height=this.maxHeight,t.width=Ve(r)+l),n.display&&this.ticks.length){const{first:c,last:h,widest:u,highest:d}=this._getLabelSizes(),f=n.padding*2,g=Dt(this.labelRotation),m=Math.cos(g),p=Math.sin(g);if(a){const y=n.mirror?0:p*u.width+m*d.height;t.height=Math.min(this.maxHeight,t.height+y+f)}else{const y=n.mirror?0:m*u.width+p*d.height;t.width=Math.min(this.maxWidth,t.width+y+f)}this._calculatePadding(c,h,p,m)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,s){const{ticks:{align:r,padding:o},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,f=0;l?c?(d=s*t.width,f=n*e.height):(d=n*t.height,f=s*e.width):r==="start"?f=e.width:r==="end"?d=t.width:r!=="inner"&&(d=t.width/2,f=e.width/2),this.paddingLeft=Math.max((d-h+o)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-u+o)*this.width/(this.width-u),0)}else{let h=e.height/2,u=t.height/2;r==="start"?(h=0,u=t.height):r==="end"&&(h=e.height,u=0),this.paddingTop=h+o,this.paddingBottom=u+o}}_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(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,n;for(e=0,n=t.length;e<n;e++)H(t[e].label)&&(t.splice(e,1),n--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let n=this.ticks;e<n.length&&(n=fr(n,e)),this._labelSizes=t=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,n){const{ctx:s,_longestTextCache:r}=this,o=[],a=[],l=Math.floor(e/dr(e,n));let c=0,h=0,u,d,f,g,m,p,y,b,_,v,x;for(u=0;u<e;u+=l){if(g=t[u].label,m=this._resolveTickFontOptions(u),s.font=p=m.string,y=r[p]=r[p]||{data:{},gc:[]},b=m.lineHeight,_=v=0,!H(g)&&!J(g))_=js(s,y.data,y.gc,_,g),v=b;else if(J(g))for(d=0,f=g.length;d<f;++d)x=g[d],!H(x)&&!J(x)&&(_=js(s,y.data,y.gc,_,x),v+=b);o.push(_),a.push(v),c=Math.max(_,c),h=Math.max(v,h)}wu(r,e);const S=o.indexOf(c),M=a.indexOf(h),k=D=>({width:o[D]||0,height:a[D]||0});return{first:k(0),last:k(e-1),widest:k(S),highest:k(M),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return yc(this._alignToPixels?Jt(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const n=e[t];return n.$context||(n.$context=Su(this.getContext(),t,n))}return this.$context||(this.$context=ku(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=Dt(this.labelRotation),n=Math.abs(Math.cos(e)),s=Math.abs(Math.sin(e)),r=this._getLabelSizes(),o=t.autoSkipPadding||0,a=r?r.widest.width+o:0,l=r?r.highest.height+o:0;return this.isHorizontal()?l*n>a*s?a/n:l/s:l*s<a*n?l/n:a/s}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,n=this.chart,s=this.options,{grid:r,position:o,border:a}=s,l=r.offset,c=this.isHorizontal(),u=this.ticks.length+(l?1:0),d=Ve(r),f=[],g=a.setContext(this.getContext()),m=g.display?g.width:0,p=m/2,y=function(B){return Jt(n,B,m)};let b,_,v,x,S,M,k,D,I,E,P,Q;if(o==="top")b=y(this.bottom),M=this.bottom-d,D=b-p,E=y(t.top)+p,Q=t.bottom;else if(o==="bottom")b=y(this.top),E=t.top,Q=y(t.bottom)-p,M=b+p,D=this.top+d;else if(o==="left")b=y(this.right),S=this.right-d,k=b-p,I=y(t.left)+p,P=t.right;else if(o==="right")b=y(this.left),I=t.left,P=y(t.right)-p,S=b+p,k=this.left+d;else if(e==="x"){if(o==="center")b=y((t.top+t.bottom)/2+.5);else if(R(o)){const B=Object.keys(o)[0],X=o[B];b=y(this.chart.scales[B].getPixelForValue(X))}E=t.top,Q=t.bottom,M=b+p,D=M+d}else if(e==="y"){if(o==="center")b=y((t.left+t.right)/2);else if(R(o)){const B=Object.keys(o)[0],X=o[B];b=y(this.chart.scales[B].getPixelForValue(X))}S=b-p,k=S-d,I=t.left,P=t.right}const ht=A(s.ticks.maxTicksLimit,u),z=Math.max(1,Math.ceil(u/ht));for(_=0;_<u;_+=z){const B=this.getContext(_),X=r.setContext(B),xt=a.setContext(B),et=X.lineWidth,he=X.color,pi=xt.dash||[],ue=xt.dashOffset,Le=X.tickWidth,qt=X.tickColor,Fe=X.tickBorderDash||[],Xt=X.tickBorderDashOffset;v=vu(this,_,l),v!==void 0&&(x=Jt(n,v,et),c?S=k=I=P=x:M=D=E=Q=x,f.push({tx1:S,ty1:M,tx2:k,ty2:D,x1:I,y1:E,x2:P,y2:Q,width:et,color:he,borderDash:pi,borderDashOffset:ue,tickWidth:Le,tickColor:qt,tickBorderDash:Fe,tickBorderDashOffset:Xt}))}return this._ticksLength=u,this._borderValue=b,f}_computeLabelItems(t){const e=this.axis,n=this.options,{position:s,ticks:r}=n,o=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:h,mirror:u}=r,d=Ve(n.grid),f=d+h,g=u?-h:f,m=-Dt(this.labelRotation),p=[];let y,b,_,v,x,S,M,k,D,I,E,P,Q="middle";if(s==="top")S=this.bottom-g,M=this._getXAxisLabelAlignment();else if(s==="bottom")S=this.top+g,M=this._getXAxisLabelAlignment();else if(s==="left"){const z=this._getYAxisLabelAlignment(d);M=z.textAlign,x=z.x}else if(s==="right"){const z=this._getYAxisLabelAlignment(d);M=z.textAlign,x=z.x}else if(e==="x"){if(s==="center")S=(t.top+t.bottom)/2+f;else if(R(s)){const z=Object.keys(s)[0],B=s[z];S=this.chart.scales[z].getPixelForValue(B)+f}M=this._getXAxisLabelAlignment()}else if(e==="y"){if(s==="center")x=(t.left+t.right)/2-f;else if(R(s)){const z=Object.keys(s)[0],B=s[z];x=this.chart.scales[z].getPixelForValue(B)}M=this._getYAxisLabelAlignment(d).textAlign}e==="y"&&(l==="start"?Q="top":l==="end"&&(Q="bottom"));const ht=this._getLabelSizes();for(y=0,b=a.length;y<b;++y){_=a[y],v=_.label;const z=r.setContext(this.getContext(y));k=this.getPixelForTick(y)+r.labelOffset,D=this._resolveTickFontOptions(y),I=D.lineHeight,E=J(v)?v.length:1;const B=E/2,X=z.color,xt=z.textStrokeColor,et=z.textStrokeWidth;let he=M;o?(x=k,M==="inner"&&(y===b-1?he=this.options.reverse?"left":"right":y===0?he=this.options.reverse?"right":"left":he="center"),s==="top"?c==="near"||m!==0?P=-E*I+I/2:c==="center"?P=-ht.highest.height/2-B*I+I:P=-ht.highest.height+I/2:c==="near"||m!==0?P=I/2:c==="center"?P=ht.highest.height/2-B*I:P=ht.highest.height-E*I,u&&(P*=-1),m!==0&&!z.showLabelBackdrop&&(x+=I/2*Math.sin(m))):(S=k,P=(1-E)*I/2);let pi;if(z.showLabelBackdrop){const ue=dt(z.backdropPadding),Le=ht.heights[y],qt=ht.widths[y];let Fe=P-ue.top,Xt=0-ue.left;switch(Q){case"middle":Fe-=Le/2;break;case"bottom":Fe-=Le;break}switch(M){case"center":Xt-=qt/2;break;case"right":Xt-=qt;break;case"inner":y===b-1?Xt-=qt:y>0&&(Xt-=qt/2);break}pi={left:Xt,top:Fe,width:qt+ue.width,height:Le+ue.height,color:z.backdropColor}}p.push({label:v,font:D,textOffset:P,options:{rotation:m,color:X,strokeColor:xt,strokeWidth:et,textAlign:he,textBaseline:Q,translation:[x,S],backdrop:pi}})}return p}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Dt(this.labelRotation))return t==="top"?"left":"right";let s="center";return e.align==="start"?s="left":e.align==="end"?s="right":e.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:n,mirror:s,padding:r}}=this.options,o=this._getLabelSizes(),a=t+r,l=o.widest.width;let c,h;return e==="left"?s?(h=this.right+r,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)):e==="right"?s?(h=this.left+r,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;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:n,top:s,width:r,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(n,s,r,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const s=this.ticks.findIndex(r=>r.value===t);return s>=0?e.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const e=this.options.grid,n=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const 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(e.display)for(r=0,o=s.length;r<o;++r){const l=s[r];e.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:n,grid:s}}=this,r=n.setContext(this.getContext()),o=n.display?r.width:0;if(!o)return;const a=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,h,u,d;this.isHorizontal()?(c=Jt(t,this.left,o)-o/2,h=Jt(t,this.right,a)+a/2,u=d=l):(u=Jt(t,this.top,o)-o/2,d=Jt(t,this.bottom,a)+a/2,c=h=l),e.save(),e.lineWidth=r.width,e.strokeStyle=r.color,e.beginPath(),e.moveTo(c,u),e.lineTo(h,d),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const n=this.ctx,s=this._computeLabelArea();s&&ds(n,s);const r=this.getLabelItems(t);for(const o of r){const a=o.options,l=o.font,c=o.label,h=o.textOffset;ai(n,c,0,h,l,a)}s&&fs(n)}drawTitle(){const{ctx:t,options:{position:e,title:n,reverse:s}}=this;if(!n.display)return;const r=tt(n.font),o=dt(n.padding),a=n.align;let l=r.lineHeight/2;e==="bottom"||e==="center"||R(e)?(l+=o.bottom,J(n.text)&&(l+=r.lineHeight*(n.text.length-1))):l+=o.top;const{titleX:c,titleY:h,maxWidth:u,rotation:d}=Ou(this,l,e,a);ai(t,n.text,0,0,r,{color:n.color,maxWidth:u,rotation:d,textAlign:Mu(a,e,s),textBaseline:"middle",translation:[c,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,n=A(t.grid&&t.grid.z,-1),s=A(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Ie.prototype.draw?[{z:e,draw:r=>{this.draw(r)}}]:[{z:n,draw:r=>{this.drawBackground(),this.drawGrid(r),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:r=>{this.drawLabels(r)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",s=[];let r,o;for(r=0,o=e.length;r<o;++r){const a=e[r];a[n]===this.id&&(!t||a.type===t)&&s.push(a)}return s}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return tt(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Mi{constructor(t,e,n){this.type=t,this.scope=e,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let n;Cu(e)&&(n=this.register(e));const s=this.items,r=t.id,o=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+t);return r in s||(s[r]=t,Tu(t,o,n),this.override&&j.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,n=t.id,s=this.scope;n in e&&delete e[n],s&&n in j[s]&&(delete j[s][n],this.override&&delete ae[n])}}function Tu(i,t,e){const n=Ct(Object.create(null),[e?j.get(e):{},j.get(t),i.defaults]);j.set(t,n),i.defaultRoutes&&Du(t,i.defaultRoutes),i.descriptors&&j.describe(t,i.descriptors)}function Du(i,t){Object.keys(t).forEach(e=>{const n=e.split("."),s=n.pop(),r=[i].concat(n).join("."),o=t[e].split("."),a=o.pop(),l=o.join(".");j.route(r,s,l,a)})}function Cu(i){return"id"in i&&"defaults"in i}class Iu{constructor(){this.controllers=new Mi(oe,"datasets",!0),this.elements=new Mi(kt,"elements"),this.plugins=new Mi(Object,"plugins"),this.scales=new Mi(Ie,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,n){[...e].forEach(s=>{const r=n||this._getRegistryForType(s);n||r.isForType(s)||r===this.plugins&&s.id?this._exec(t,r,s):N(s,o=>{const a=n||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,e,n){const s=ls(t);V(n["before"+s],[],n),e[t](n),V(n["after"+s],[],n)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const n=this._typedRegistries[e];if(n.isForType(t))return n}return this.plugins}_get(t,e,n){const s=e.get(t);if(s===void 0)throw new Error('"'+t+'" is not a registered '+n+".");return s}}var Tt=new Iu;class Eu{constructor(){this._init=[]}notify(t,e,n,s){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const r=s?this._descriptors(t).filter(s):this._descriptors(t),o=this._notify(r,t,e,n);return e==="afterDestroy"&&(this._notify(r,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,e,n,s){s=s||{};for(const r of t){const o=r.plugin,a=o[n],l=[e,s,r.options];if(V(a,l,o)===!1&&s.cancelable)return!1}return!0}invalidate(){H(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const n=t&&t.config,s=A(n.options&&n.options.plugins,{}),r=Au(n);return s===!1&&!e?[]:Ru(t,r,s,e)}_notifyStateChanges(t){const e=this._oldCache||[],n=this._cache,s=(r,o)=>r.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(s(e,n),t,"stop"),this._notify(s(n,e),t,"start")}}function Au(i){const t={},e=[],n=Object.keys(Tt.plugins.items);for(let r=0;r<n.length;r++)e.push(Tt.getPlugin(n[r]));const s=i.plugins||[];for(let r=0;r<s.length;r++){const o=s[r];e.indexOf(o)===-1&&(e.push(o),t[o.id]=!0)}return{plugins:e,localIds:t}}function Pu(i,t){return!t&&i===!1?null:i===!0?{}:i}function Ru(i,{plugins:t,localIds:e},n,s){const r=[],o=i.getContext();for(const a of t){const l=a.id,c=Pu(n[l],s);c!==null&&r.push({plugin:a,options:Lu(i.config,{plugin:a,local:e[l]},c,o)})}return r}function Lu(i,{plugin:t,local:e},n,s){const r=i.pluginScopeKeys(t),o=i.getOptionScopes(n,r);return e&&t.defaults&&o.push(t.defaults),i.createResolver(o,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Zn(i,t){const e=j.datasets[i]||{};return((t.datasets||{})[i]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function Fu(i,t){let e=i;return i==="_index_"?e=t:i==="_value_"&&(e=t==="x"?"y":"x"),e}function Nu(i,t){return i===t?"_index_":"_value_"}function mr(i){if(i==="x"||i==="y"||i==="r")return i}function Wu(i){if(i==="top"||i==="bottom")return"x";if(i==="left"||i==="right")return"y"}function qn(i,...t){if(mr(i))return i;for(const e of t){const n=e.axis||Wu(e.position)||i.length>1&&mr(i[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function pr(i,t,e){if(e[t+"AxisID"]===i)return{axis:t}}function zu(i,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(n=>n.xAxisID===i||n.yAxisID===i);if(e.length)return pr(i,"x",e[0])||pr(i,"y",e[0])}return{}}function Vu(i,t){const e=ae[i.type]||{scales:{}},n=t.scales||{},s=Zn(i.type,t),r=Object.create(null);return Object.keys(n).forEach(o=>{const a=n[o];if(!R(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=qn(o,a,zu(o,i),j.scales[a.type]),c=Nu(l,s),h=e.scales||{};r[o]=Ge(Object.create(null),[{axis:l},a,h[l],h[c]])}),i.data.datasets.forEach(o=>{const a=o.type||i.type,l=o.indexAxis||Zn(a,t),h=(ae[a]||{}).scales||{};Object.keys(h).forEach(u=>{const d=Fu(u,l),f=o[d+"AxisID"]||d;r[f]=r[f]||Object.create(null),Ge(r[f],[{axis:d},n[f],h[u]])})}),Object.keys(r).forEach(o=>{const a=r[o];Ge(a,[j.scales[a.type],j.scale])}),r}function ea(i){const t=i.options||(i.options={});t.plugins=A(t.plugins,{}),t.scales=Vu(i,t)}function ia(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function Hu(i){return i=i||{},i.data=ia(i.data),ea(i),i}const yr=new Map,na=new Set;function Oi(i,t){let e=yr.get(i);return e||(e=t(),yr.set(i,e),na.add(e)),e}const He=(i,t,e)=>{const n=Me(t,e);n!==void 0&&i.add(n)};class Bu{constructor(t){this._config=Hu(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=ia(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),ea(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Oi(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Oi(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Oi(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,n=this.type;return Oi(`${n}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const n=this._scopeCache;let s=n.get(t);return(!s||e)&&(s=new Map,n.set(t,s)),s}getOptionScopes(t,e,n){const{options:s,type:r}=this,o=this._cachedScopes(t,n),a=o.get(e);if(a)return a;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(u=>He(l,t,u))),h.forEach(u=>He(l,s,u)),h.forEach(u=>He(l,ae[r]||{},u)),h.forEach(u=>He(l,j,u)),h.forEach(u=>He(l,jn,u))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),na.has(e)&&o.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,ae[e]||{},j.datasets[e]||{},{type:e},j,jn]}resolveNamedOptions(t,e,n,s=[""]){const r={$shared:!0},{resolver:o,subPrefixes:a}=br(this._resolverCache,t,s);let l=o;if(ju(o,e)){r.$shared=!1,n=Zt(n)?n():n;const c=this.createResolver(t,n,a);l=Te(o,n,c)}for(const c of e)r[c]=l[c];return r}createResolver(t,e,n=[""],s){const{resolver:r}=br(this._resolverCache,t,n);return R(e)?Te(r,e,void 0,s):r}}function br(i,t,e){let n=i.get(t);n||(n=new Map,i.set(t,n));const s=e.join();let r=n.get(s);return r||(r={resolver:ms(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},n.set(s,r)),r}const $u=i=>R(i)&&Object.getOwnPropertyNames(i).some(t=>Zt(i[t]));function ju(i,t){const{isScriptable:e,isIndexable:n}=zo(i);for(const s of t){const r=e(s),o=n(s),a=(o||r)&&i[s];if(r&&(Zt(a)||$u(a))||o&&J(a))return!0}return!1}var Uu="4.4.6";const Yu=["top","bottom","left","right","chartArea"];function xr(i,t){return i==="top"||i==="bottom"||Yu.indexOf(i)===-1&&t==="x"}function _r(i,t){return function(e,n){return e[i]===n[i]?e[t]-n[t]:e[i]-n[i]}}function vr(i){const t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),V(e&&e.onComplete,[i],t)}function Zu(i){const t=i.chart,e=t.options.animation;V(e&&e.onProgress,[i],t)}function sa(i){return bs()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const ji={},wr=i=>{const t=sa(i);return Object.values(ji).filter(e=>e.canvas===t).pop()};function qu(i,t,e){const n=Object.keys(i);for(const s of n){const r=+s;if(r>=t){const o=i[s];delete i[s],(e>0||r>t)&&(i[r+e]=o)}}}function Xu(i,t,e,n){return!e||i.type==="mouseout"?null:n?t:i}function Ti(i,t,e){return i.options.clip?i[e]:t[e]}function Gu(i,t){const{xScale:e,yScale:n}=i;return e&&n?{left:Ti(e,t,"left"),right:Ti(e,t,"right"),top:Ti(n,t,"top"),bottom:Ti(n,t,"bottom")}:t}var Wt;let vs=(Wt=class{static register(...t){Tt.add(...t),kr()}static unregister(...t){Tt.remove(...t),kr()}constructor(t,e){const n=this.config=new Bu(e),s=sa(t),r=wr(s);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const o=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||fu(s)),this.platform.updateConfig(n);const a=this.platform.acquireContext(s,o.aspectRatio),l=a&&a.canvas,c=l&&l.height,h=l&&l.width;if(this.id=nc(),this.ctx=a,this.canvas=l,this.width=h,this.height=c,this._options=o,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 Eu,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=wc(u=>this.update(u),o.resizeDelay||0),this._dataChanges=[],ji[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Et.listen(this,"complete",vr),Et.listen(this,"progress",Zu),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:s,_aspectRatio:r}=this;return H(t)?e&&r?r:s?n/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Tt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():qs(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Us(this.canvas,this.ctx),this}stop(){return Et.stop(this),this}resize(t,e){Et.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const n=this.options,s=this.canvas,r=n.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,t,e,r),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,qs(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),V(n.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};N(e,(n,s)=>{n.id=s})}buildOrUpdateScales(){const t=this.options,e=t.scales,n=this.scales,s=Object.keys(n).reduce((o,a)=>(o[a]=!1,o),{});let r=[];e&&(r=r.concat(Object.keys(e).map(o=>{const a=e[o],l=qn(o,a),c=l==="r",h=l==="x";return{options:a,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),N(r,o=>{const a=o.options,l=a.id,c=qn(l,a),h=A(a.type,o.dtype);(a.position===void 0||xr(a.position,c)!==xr(o.dposition))&&(a.position=o.dposition),s[l]=!0;let u=null;if(l in n&&n[l].type===h)u=n[l];else{const d=Tt.getScale(h);u=new d({id:l,type:h,ctx:this.ctx,chart:this}),n[u.id]=u}u.init(a,t)}),N(s,(o,a)=>{o||delete n[a]}),N(n,o=>{mt.configure(this,o,o.options),mt.addBox(this,o)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort((s,r)=>s.index-r.index),n>e){for(let s=e;s<n;++s)this._destroyDatasetMeta(s);t.splice(e,n-e)}this._sortedMetasets=t.slice(0).sort(_r("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((n,s)=>{e.filter(r=>r===n._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let n,s;for(this._removeUnreferencedMetasets(),n=0,s=e.length;n<s;n++){const r=e[n];let o=this.getDatasetMeta(n);const a=r.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(n),o=this.getDatasetMeta(n)),o.type=a,o.indexAxis=r.indexAxis||Zn(a,this.options),o.order=r.order||0,o.index=n,o.label=""+r.label,o.visible=this.isDatasetVisible(n),o.controller)o.controller.updateIndex(n),o.controller.linkScales();else{const l=Tt.getController(a),{datasetElementType:c,dataElementType:h}=j.datasets[a];Object.assign(l,{dataElementType:Tt.getElement(h),datasetElementType:c&&Tt.getElement(c)}),o.controller=new l(this,n),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){N(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,h=this.data.datasets.length;c<h;c++){const{controller:u}=this.getDatasetMeta(c),d=!s&&r.indexOf(u)===-1;u.buildOrUpdateElements(d),o=Math.max(+u.getMaxOverflow(),o)}o=this._minPadding=n.layout.autoPadding?o:0,this._updateLayout(o),s||N(r,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(_r("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){N(this.scales,t=>{mt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);(!Ls(e,n)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:n,start:s,count:r}of e){const o=n==="_removeElements"?-r:r;qu(t,s,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,n=r=>new Set(t.filter(o=>o[0]===r).map((o,a)=>a+","+o.splice(1).join(","))),s=n(0);for(let r=1;r<e;r++)if(!Ls(s,n(r)))return;return Array.from(s).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;mt.update(this,this.width,this.height,t);const e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],N(this.boxes,s=>{n&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,r)=>{s._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,n=this.data.datasets.length;e<n;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,n=this.data.datasets.length;e<n;++e)this._updateDataset(e,Zt(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const n=this.getDatasetMeta(t),s={meta:n,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(n.controller._update(e),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Et.has(this)?this.attached&&!Et.running(this)&&Et.start(this):(this.draw(),vr({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:n,height:s}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(n,s)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,n=[];let s,r;for(s=0,r=e.length;s<r;++s){const o=e[s];(!t||o.visible)&&n.push(o)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,n=t._clip,s=!n.disabled,r=Gu(t,this.chartArea),o={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(s&&ds(e,{left:n.left===!1?0:r.left-n.left,right:n.right===!1?this.width:r.right+n.right,top:n.top===!1?0:r.top-n.top,bottom:n.bottom===!1?this.height:r.bottom+n.bottom}),t.controller.draw(),s&&fs(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return oi(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,s){const r=Yh.modes[e];return typeof r=="function"?r(this,t,n,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],n=this._metasets;let s=n.filter(r=>r&&r._dataset===e).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(s)),s}getContext(){return this.$context||(this.$context=le(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const n=this.getDatasetMeta(t);return typeof n.hidden=="boolean"?!n.hidden:!e.hidden}setDatasetVisibility(t,e){const n=this.getDatasetMeta(t);n.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){const s=n?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,s);Qi(e)?(r.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),o.update(r,{visible:n}),this.update(a=>a.datasetIndex===t?s:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Et.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Us(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete ji[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,n=(r,o)=>{e.addEventListener(this,r,o),t[r]=o},s=(r,o,a)=>{r.offsetX=o,r.offsetY=a,this._eventHandler(r)};N(this.options.events,r=>n(r,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,n=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},s=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},r=(l,c)=>{this.canvas&&this.resize(l,c)};let o;const a=()=>{s("attach",a),this.attached=!0,this.resize(),n("resize",r),n("detach",o)};o=()=>{this.attached=!1,s("resize",r),this._stop(),this._resize(0,0),n("attach",a)},e.isAttached(this.canvas)?a():o()}unbindEvents(){N(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},N(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){const s=n?"set":"remove";let r,o,a,l;for(e==="dataset"&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+s+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){o=t[a];const c=o&&this.getDatasetMeta(o.datasetIndex).controller;c&&c[s+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],n=t.map(({datasetIndex:r,index:o})=>{const a=this.getDatasetMeta(r);if(!a)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:a.data[o],index:o}});!Ji(n,e)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,n){const s=this.options.hover,r=(l,c)=>l.filter(h=>!c.some(u=>h.datasetIndex===u.datasetIndex&&h.index===u.index)),o=r(e,t),a=n?t:r(t,e);o.length&&this.updateHoverStyle(o,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,e){const n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",n,s)===!1)return;const r=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,s),(r||n.changed)&&this.render(),this}_handleEvent(t,e,n){const{_active:s=[],options:r}=this,o=e,a=this._getActiveElements(t,s,n,o),l=cc(t),c=Xu(t,this._lastEvent,n,l);n&&(this._lastEvent=null,V(r.onHover,[t,a,this],this),l&&V(r.onClick,[t,a,this],this));const h=!Ji(a,s);return(h||e)&&(this._active=a,this._updateHoverStyles(a,s,e)),this._lastEvent=c,h}_getActiveElements(t,e,n,s){if(t.type==="mouseout")return[];if(!n)return e;const r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,s)}},O(Wt,"defaults",j),O(Wt,"instances",ji),O(Wt,"overrides",ae),O(Wt,"registry",Tt),O(Wt,"version",Uu),O(Wt,"getChart",wr),Wt);function kr(){return N(vs.instances,i=>i._plugins.invalidate())}function Ju(i,t,e){const{startAngle:n,pixelMargin:s,x:r,y:o,outerRadius:a,innerRadius:l}=t;let c=s/a;i.beginPath(),i.arc(r,o,a,n-c,e+c),l>s?(c=s/l,i.arc(r,o,l,e+c,n-c,!0)):i.arc(r,o,s,e+K,n-K),i.closePath(),i.clip()}function Ku(i){return gs(i,["outerStart","outerEnd","innerStart","innerEnd"])}function Qu(i,t,e,n){const s=Ku(i.options.borderRadius),r=(e-t)/2,o=Math.min(r,n*t/2),a=l=>{const c=(e-Math.min(r,l))*n/2;return rt(l,0,Math.min(r,c))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:rt(s.innerStart,0,o),innerEnd:rt(s.innerEnd,0,o)}}function fe(i,t,e,n){return{x:e+i*Math.cos(t),y:n+i*Math.sin(t)}}function rn(i,t,e,n,s,r){const{x:o,y:a,startAngle:l,pixelMargin:c,innerRadius:h}=t,u=Math.max(t.outerRadius+n+e-c,0),d=h>0?h+n+e+c:0;let f=0;const g=s-l;if(n){const z=h>0?h-n:0,B=u>0?u-n:0,X=(z+B)/2,xt=X!==0?g*X/(X+n):g;f=(g-xt)/2}const m=Math.max(.001,g*u-e/U)/u,p=(g-m)/2,y=l+p+f,b=s-p-f,{outerStart:_,outerEnd:v,innerStart:x,innerEnd:S}=Qu(t,d,u,b-y),M=u-_,k=u-v,D=y+_/M,I=b-v/k,E=d+x,P=d+S,Q=y+x/E,ht=b-S/P;if(i.beginPath(),r){const z=(D+I)/2;if(i.arc(o,a,u,D,z),i.arc(o,a,u,z,I),v>0){const et=fe(k,I,o,a);i.arc(et.x,et.y,v,I,b+K)}const B=fe(P,b,o,a);if(i.lineTo(B.x,B.y),S>0){const et=fe(P,ht,o,a);i.arc(et.x,et.y,S,b+K,ht+Math.PI)}const X=(b-S/d+(y+x/d))/2;if(i.arc(o,a,d,b-S/d,X,!0),i.arc(o,a,d,X,y+x/d,!0),x>0){const et=fe(E,Q,o,a);i.arc(et.x,et.y,x,Q+Math.PI,y-K)}const xt=fe(M,y,o,a);if(i.lineTo(xt.x,xt.y),_>0){const et=fe(M,D,o,a);i.arc(et.x,et.y,_,y-K,D)}}else{i.moveTo(o,a);const z=Math.cos(D)*u+o,B=Math.sin(D)*u+a;i.lineTo(z,B);const X=Math.cos(I)*u+o,xt=Math.sin(I)*u+a;i.lineTo(X,xt)}i.closePath()}function td(i,t,e,n,s){const{fullCircles:r,startAngle:o,circumference:a}=t;let l=t.endAngle;if(r){rn(i,t,e,n,l,s);for(let c=0;c<r;++c)i.fill();isNaN(a)||(l=o+(a%q||q))}return rn(i,t,e,n,l,s),i.fill(),l}function ed(i,t,e,n,s){const{fullCircles:r,startAngle:o,circumference:a,options:l}=t,{borderWidth:c,borderJoinStyle:h,borderDash:u,borderDashOffset:d}=l,f=l.borderAlign==="inner";if(!c)return;i.setLineDash(u||[]),i.lineDashOffset=d,f?(i.lineWidth=c*2,i.lineJoin=h||"round"):(i.lineWidth=c,i.lineJoin=h||"bevel");let g=t.endAngle;if(r){rn(i,t,e,n,g,s);for(let m=0;m<r;++m)i.stroke();isNaN(a)||(g=o+(a%q||q))}f&&Ju(i,t,g),r||(rn(i,t,e,n,g,s),i.stroke())}class Ye extends kt{constructor(e){super();O(this,"circumference");O(this,"endAngle");O(this,"fullCircles");O(this,"innerRadius");O(this,"outerRadius");O(this,"pixelMargin");O(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,e&&Object.assign(this,e)}inRange(e,n,s){const r=this.getProps(["x","y"],s),{angle:o,distance:a}=Eo(r,{x:e,y:n}),{startAngle:l,endAngle:c,innerRadius:h,outerRadius:u,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),f=(this.options.spacing+this.options.borderWidth)/2,g=A(d,c-l),m=ri(o,l,c)&&l!==c,p=g>=q||m,y=$t(a,h+f,u+f);return p&&y}getCenterPoint(e){const{x:n,y:s,startAngle:r,endAngle:o,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:c,spacing:h}=this.options,u=(r+o)/2,d=(a+l+h+c)/2;return{x:n+Math.cos(u)*d,y:s+Math.sin(u)*d}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:n,circumference:s}=this,r=(n.offset||0)/4,o=(n.spacing||0)/2,a=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=s>q?Math.floor(s/q):0,s===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*r,Math.sin(l)*r);const c=1-Math.sin(Math.min(U,s||0)),h=r*c;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,td(e,this,h,o,a),ed(e,this,h,o,a),e.restore()}}O(Ye,"id","arc"),O(Ye,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),O(Ye,"defaultRoutes",{backgroundColor:"backgroundColor"}),O(Ye,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function ra(i,t,e=t){i.lineCap=A(e.borderCapStyle,t.borderCapStyle),i.setLineDash(A(e.borderDash,t.borderDash)),i.lineDashOffset=A(e.borderDashOffset,t.borderDashOffset),i.lineJoin=A(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=A(e.borderWidth,t.borderWidth),i.strokeStyle=A(e.borderColor,t.borderColor)}function id(i,t,e){i.lineTo(e.x,e.y)}function nd(i){return i.stepped?Lc:i.tension||i.cubicInterpolationMode==="monotone"?Fc:id}function oa(i,t,e={}){const n=i.length,{start:s=0,end:r=n-1}=e,{start:o,end:a}=t,l=Math.max(s,o),c=Math.min(r,a),h=s<o&&r<o||s>a&&r>a;return{count:n,start:l,loop:t.loop,ilen:c<l&&!h?n+c-l:c-l}}function sd(i,t,e,n){const{points:s,options:r}=t,{count:o,start:a,loop:l,ilen:c}=oa(s,e,n),h=nd(r);let{move:u=!0,reverse:d}=n||{},f,g,m;for(f=0;f<=c;++f)g=s[(a+(d?c-f:f))%o],!g.skip&&(u?(i.moveTo(g.x,g.y),u=!1):h(i,m,g,d,r.stepped),m=g);return l&&(g=s[(a+(d?c:0))%o],h(i,m,g,d,r.stepped)),!!l}function rd(i,t,e,n){const s=t.points,{count:r,start:o,ilen:a}=oa(s,e,n),{move:l=!0,reverse:c}=n||{};let h=0,u=0,d,f,g,m,p,y;const b=v=>(o+(c?a-v:v))%r,_=()=>{m!==p&&(i.lineTo(h,p),i.lineTo(h,m),i.lineTo(h,y))};for(l&&(f=s[b(0)],i.moveTo(f.x,f.y)),d=0;d<=a;++d){if(f=s[b(d)],f.skip)continue;const v=f.x,x=f.y,S=v|0;S===g?(x<m?m=x:x>p&&(p=x),h=(u*h+v)/++u):(_(),i.lineTo(v,x),g=S,u=0,m=p=x),y=x}_()}function Xn(i){const t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?rd:sd}function od(i){return i.stepped?mh:i.tension||i.cubicInterpolationMode==="monotone"?ph:ie}function ad(i,t,e,n){let s=t._path;s||(s=t._path=new Path2D,t.path(s,e,n)&&s.closePath()),ra(i,t.options),i.stroke(s)}function ld(i,t,e,n){const{segments:s,options:r}=t,o=Xn(t);for(const a of s)ra(i,r,a.style),i.beginPath(),o(i,t,a,{start:e,end:e+n-1})&&i.closePath(),i.stroke()}const cd=typeof Path2D=="function";function hd(i,t,e,n){cd&&!t.options.segment?ad(i,t,e,n):ld(i,t,e,n)}class Di extends kt{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,e){const n=this.options;if((n.tension||n.cubicInterpolationMode==="monotone")&&!n.stepped&&!this._pointsUpdated){const s=n.spanGaps?this._loop:this._fullLoop;ah(this._points,n,t,s,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Sh(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,n=t.length;return n&&e[t[n-1].end]}interpolate(t,e){const n=this.options,s=t[e],r=this.points,o=vh(this,{property:e,start:s,end:s});if(!o.length)return;const a=[],l=od(n);let c,h;for(c=0,h=o.length;c<h;++c){const{start:u,end:d}=o[c],f=r[u],g=r[d];if(f===g){a.push(f);continue}const m=Math.abs((s-f[e])/(g[e]-f[e])),p=l(f,g,m,n.stepped);p[e]=t[e],a.push(p)}return a.length===1?a[0]:a}pathSegment(t,e,n){return Xn(this)(t,this,e,n)}path(t,e,n){const s=this.segments,r=Xn(this);let o=this._loop;e=e||0,n=n||this.points.length-e;for(const a of s)o&=r(t,this,a,{start:e,end:e+n-1});return!!o}draw(t,e,n,s){const r=this.options||{};(this.points||[]).length&&r.borderWidth&&(t.save(),hd(t,this,n,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}O(Di,"id","line"),O(Di,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),O(Di,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),O(Di,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Sr(i,t,e,n){const s=i.options,{[e]:r}=i.getProps([e],n);return Math.abs(t-r)<s.radius+s.hitRadius}class Ui extends kt{constructor(e){super();O(this,"parsed");O(this,"skip");O(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,n,s){const r=this.options,{x:o,y:a}=this.getProps(["x","y"],s);return Math.pow(e-o,2)+Math.pow(n-a,2)<Math.pow(r.hitRadius+r.radius,2)}inXRange(e,n){return Sr(this,e,"x",n)}inYRange(e,n){return Sr(this,e,"y",n)}getCenterPoint(e){const{x:n,y:s}=this.getProps(["x","y"],e);return{x:n,y:s}}size(e){e=e||this.options||{};let n=e.radius||0;n=Math.max(n,n&&e.hoverRadius||0);const s=n&&e.borderWidth||0;return(n+s)*2}draw(e,n){const s=this.options;this.skip||s.radius<.1||!oi(this,n,this.size(s)/2)||(e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.fillStyle=s.backgroundColor,Un(e,s,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}O(Ui,"id","point"),O(Ui,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),O(Ui,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function aa(i,t){const{x:e,y:n,base:s,width:r,height:o}=i.getProps(["x","y","base","width","height"],t);let a,l,c,h,u;return i.horizontal?(u=o/2,a=Math.min(e,s),l=Math.max(e,s),c=n-u,h=n+u):(u=r/2,a=e-u,l=e+u,c=Math.min(n,s),h=Math.max(n,s)),{left:a,top:c,right:l,bottom:h}}function jt(i,t,e,n){return i?0:rt(t,e,n)}function ud(i,t,e){const n=i.options.borderWidth,s=i.borderSkipped,r=Wo(n);return{t:jt(s.top,r.top,0,e),r:jt(s.right,r.right,0,t),b:jt(s.bottom,r.bottom,0,e),l:jt(s.left,r.left,0,t)}}function dd(i,t,e){const{enableBorderRadius:n}=i.getProps(["enableBorderRadius"]),s=i.options.borderRadius,r=ve(s),o=Math.min(t,e),a=i.borderSkipped,l=n||R(s);return{topLeft:jt(!l||a.top||a.left,r.topLeft,0,o),topRight:jt(!l||a.top||a.right,r.topRight,0,o),bottomLeft:jt(!l||a.bottom||a.left,r.bottomLeft,0,o),bottomRight:jt(!l||a.bottom||a.right,r.bottomRight,0,o)}}function fd(i){const t=aa(i),e=t.right-t.left,n=t.bottom-t.top,s=ud(i,e/2,n/2),r=dd(i,e/2,n/2);return{outer:{x:t.left,y:t.top,w:e,h:n,radius:r},inner:{x:t.left+s.l,y:t.top+s.t,w:e-s.l-s.r,h:n-s.t-s.b,radius:{topLeft:Math.max(0,r.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,r.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,r.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,r.bottomRight-Math.max(s.b,s.r))}}}}function Dn(i,t,e,n){const s=t===null,r=e===null,a=i&&!(s&&r)&&aa(i,n);return a&&(s||$t(t,a.left,a.right))&&(r||$t(e,a.top,a.bottom))}function gd(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function md(i,t){i.rect(t.x,t.y,t.w,t.h)}function Cn(i,t,e={}){const n=i.x!==e.x?-t:0,s=i.y!==e.y?-t:0,r=(i.x+i.w!==e.x+e.w?t:0)-n,o=(i.y+i.h!==e.y+e.h?t:0)-s;return{x:i.x+n,y:i.y+s,w:i.w+r,h:i.h+o,radius:i.radius}}class Yi extends kt{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:n,backgroundColor:s}}=this,{inner:r,outer:o}=fd(this),a=gd(o.radius)?en:md;t.save(),(o.w!==r.w||o.h!==r.h)&&(t.beginPath(),a(t,Cn(o,e,r)),t.clip(),a(t,Cn(r,-e,o)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),a(t,Cn(r,e)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,e,n){return Dn(this,t,e,n)}inXRange(t,e){return Dn(this,t,null,e)}inYRange(t,e){return Dn(this,null,t,e)}getCenterPoint(t){const{x:e,y:n,base:s,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+s)/2:e,y:r?n:(n+s)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}O(Yi,"id","bar"),O(Yi,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),O(Yi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});const Gn=["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)"],Mr=Gn.map(i=>i.replace("rgb(","rgba(").replace(")",", 0.5)"));function la(i){return Gn[i%Gn.length]}function ca(i){return Mr[i%Mr.length]}function pd(i,t){return i.borderColor=la(t),i.backgroundColor=ca(t),++t}function yd(i,t){return i.backgroundColor=i.data.map(()=>la(t++)),t}function bd(i,t){return i.backgroundColor=i.data.map(()=>ca(t++)),t}function xd(i){let t=0;return(e,n)=>{const s=i.getDatasetMeta(n).controller;s instanceof xe?t=yd(e,t):s instanceof Bi?t=bd(e,t):s&&(t=pd(e,t))}}function Or(i){let t;for(t in i)if(i[t].borderColor||i[t].backgroundColor)return!0;return!1}function _d(i){return i&&(i.borderColor||i.backgroundColor)}function vd(){return j.borderColor!=="rgba(0,0,0,0.1)"||j.backgroundColor!=="rgba(0,0,0,0.1)"}var Sm={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(i,t,e){if(!e.enabled)return;const{data:{datasets:n},options:s}=i.config,{elements:r}=s,o=Or(n)||_d(s)||r&&Or(r)||vd();if(!e.forceOverride&&o)return;const a=xd(i);n.forEach(a)}};const Tr=(i,t)=>{let{boxHeight:e=t,boxWidth:n=t}=i;return i.usePointStyle&&(e=Math.min(e,t),n=i.pointStyleWidth||Math.min(n,t)),{boxWidth:n,boxHeight:e,itemHeight:Math.max(t,e)}},wd=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index;class Dr extends kt{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,n){this.maxWidth=t,this.maxHeight=e,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(){const t=this.options.labels||{};let e=V(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(n=>t.filter(n,this.chart.data))),t.sort&&(e=e.sort((n,s)=>t.sort(n,s,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const n=t.labels,s=tt(n.font),r=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=Tr(n,r);let c,h;e.font=s.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(o,r,a,l)+10):(h=this.maxHeight,c=this._fitCols(o,s,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,n,s){const{ctx:r,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=s+a;let u=t;r.textAlign="left",r.textBaseline="middle";let d=-1,f=-h;return this.legendItems.forEach((g,m)=>{const p=n+e/2+r.measureText(g.text).width;(m===0||c[c.length-1]+p+2*a>o)&&(u+=h,c[c.length-(m>0?0:1)]=0,f+=h,d++),l[m]={left:0,top:f,row:d,width:p,height:s},c[c.length-1]+=p+a}),u}_fitCols(t,e,n,s){const{ctx:r,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=o-t;let u=a,d=0,f=0,g=0,m=0;return this.legendItems.forEach((p,y)=>{const{itemWidth:b,itemHeight:_}=kd(n,e,r,p,s);y>0&&f+_+2*a>h&&(u+=d+a,c.push({width:d,height:f}),g+=d+a,m++,d=f=0),l[y]={left:g,top:f,col:m,width:b,height:_},d=Math.max(d,b),f+=_+a}),u+=d,c.push({width:d,height:f}),u}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:n,labels:{padding:s},rtl:r}}=this,o=we(r,this.left,this.width);if(this.isHorizontal()){let a=0,l=it(n,this.left+s,this.right-this.lineWidths[a]);for(const c of e)a!==c.row&&(a=c.row,l=it(n,this.left+s,this.right-this.lineWidths[a])),c.top+=this.top+t+s,c.left=o.leftForLtr(o.x(l),c.width),l+=c.width+s}else{let a=0,l=it(n,this.top+t+s,this.bottom-this.columnSizes[a].height);for(const c of e)c.col!==a&&(a=c.col,l=it(n,this.top+t+s,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+s,c.left=o.leftForLtr(o.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;ds(t,this),this._draw(),fs(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:n,ctx:s}=this,{align:r,labels:o}=t,a=j.color,l=we(t.rtl,this.left,this.width),c=tt(o.font),{padding:h}=o,u=c.size,d=u/2;let f;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;const{boxWidth:g,boxHeight:m,itemHeight:p}=Tr(o,u),y=function(S,M,k){if(isNaN(g)||g<=0||isNaN(m)||m<0)return;s.save();const D=A(k.lineWidth,1);if(s.fillStyle=A(k.fillStyle,a),s.lineCap=A(k.lineCap,"butt"),s.lineDashOffset=A(k.lineDashOffset,0),s.lineJoin=A(k.lineJoin,"miter"),s.lineWidth=D,s.strokeStyle=A(k.strokeStyle,a),s.setLineDash(A(k.lineDash,[])),o.usePointStyle){const I={radius:m*Math.SQRT2/2,pointStyle:k.pointStyle,rotation:k.rotation,borderWidth:D},E=l.xPlus(S,g/2),P=M+d;No(s,I,E,P,o.pointStyleWidth&&g)}else{const I=M+Math.max((u-m)/2,0),E=l.leftForLtr(S,g),P=ve(k.borderRadius);s.beginPath(),Object.values(P).some(Q=>Q!==0)?en(s,{x:E,y:I,w:g,h:m,radius:P}):s.rect(E,I,g,m),s.fill(),D!==0&&s.stroke()}s.restore()},b=function(S,M,k){ai(s,k.text,S,M+p/2,c,{strikethrough:k.hidden,textAlign:l.textAlign(k.textAlign)})},_=this.isHorizontal(),v=this._computeTitleHeight();_?f={x:it(r,this.left+h,this.right-n[0]),y:this.top+h+v,line:0}:f={x:this.left+h,y:it(r,this.top+v+h,this.bottom-e[0].height),line:0},jo(this.ctx,t.textDirection);const x=p+h;this.legendItems.forEach((S,M)=>{s.strokeStyle=S.fontColor,s.fillStyle=S.fontColor;const k=s.measureText(S.text).width,D=l.textAlign(S.textAlign||(S.textAlign=o.textAlign)),I=g+d+k;let E=f.x,P=f.y;l.setWidth(this.width),_?M>0&&E+I+h>this.right&&(P=f.y+=x,f.line++,E=f.x=it(r,this.left+h,this.right-n[f.line])):M>0&&P+x>this.bottom&&(E=f.x=E+e[f.line].width+h,f.line++,P=f.y=it(r,this.top+v+h,this.bottom-e[f.line].height));const Q=l.x(E);if(y(Q,P,S),E=kc(D,E+g+d,_?E+I:this.right,t.rtl),b(l.x(E),P,S),_)f.x+=I+h;else if(typeof S.text!="string"){const ht=c.lineHeight;f.y+=ha(S,ht)+h}else f.y+=x}),Uo(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,n=tt(e.font),s=dt(e.padding);if(!e.display)return;const r=we(t.rtl,this.left,this.width),o=this.ctx,a=e.position,l=n.size/2,c=s.top+l;let h,u=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),h=this.top+c,u=it(t.align,u,this.right-d);else{const g=this.columnSizes.reduce((m,p)=>Math.max(m,p.height),0);h=c+it(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const f=it(a,u,u+d);o.textAlign=r.textAlign(hs(a)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=n.string,ai(o,e.text,f,h,n)}_computeTitleHeight(){const t=this.options.title,e=tt(t.font),n=dt(t.padding);return t.display?e.lineHeight+n.height:0}_getLegendItemAt(t,e){let n,s,r;if($t(t,this.left,this.right)&&$t(e,this.top,this.bottom)){for(r=this.legendHitBoxes,n=0;n<r.length;++n)if(s=r[n],$t(t,s.left,s.left+s.width)&&$t(e,s.top,s.top+s.height))return this.legendItems[n]}return null}handleEvent(t){const e=this.options;if(!Od(t.type,e))return;const n=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const s=this._hoveredItem,r=wd(s,n);s&&!r&&V(e.onLeave,[t,s,this],this),this._hoveredItem=n,n&&!r&&V(e.onHover,[t,n,this],this)}else n&&V(e.onClick,[t,n,this],this)}}function kd(i,t,e,n,s){const r=Sd(n,i,t,e),o=Md(s,n,t.lineHeight);return{itemWidth:r,itemHeight:o}}function Sd(i,t,e,n){let s=i.text;return s&&typeof s!="string"&&(s=s.reduce((r,o)=>r.length>o.length?r:o)),t+e.size/2+n.measureText(s).width}function Md(i,t,e){let n=i;return typeof t.text!="string"&&(n=ha(t,e)),n}function ha(i,t){const e=i.text?i.text.length:0;return t*e}function Od(i,t){return!!((i==="mousemove"||i==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(i==="click"||i==="mouseup"))}var Mm={id:"legend",_element:Dr,start(i,t,e){const n=i.legend=new Dr({ctx:i.ctx,options:e,chart:i});mt.configure(i,n,e),mt.addBox(i,n)},stop(i){mt.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){const n=i.legend;mt.configure(i,n,e),n.options=e},afterUpdate(i){const t=i.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(i,t){t.replay||i.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,t,e){const n=t.datasetIndex,s=e.chart;s.isDatasetVisible(n)?(s.hide(n),t.hidden=!0):(s.show(n),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){const t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:n,textAlign:s,color:r,useBorderRadius:o,borderRadius:a}}=i.legend.options;return i._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),h=dt(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:r,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:o&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};class ua extends kt{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const 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=t,this.height=this.bottom=e;const s=J(n.text)?n.text.length:1;this._padding=dt(n.padding);const r=s*tt(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:n,bottom:s,right:r,options:o}=this,a=o.align;let l=0,c,h,u;return this.isHorizontal()?(h=it(a,n,r),u=e+t,c=r-n):(o.position==="left"?(h=n+t,u=it(a,s,e),l=U*-.5):(h=r-t,u=it(a,e,s),l=U*.5),c=s-e),{titleX:h,titleY:u,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const n=tt(e.font),r=n.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(r);ai(t,e.text,0,0,n,{color:e.color,maxWidth:l,rotation:c,textAlign:hs(e.align),textBaseline:"middle",translation:[o,a]})}}function Td(i,t){const e=new ua({ctx:i.ctx,options:t,chart:i});mt.configure(i,e,t),mt.addBox(i,e),i.titleBlock=e}var Om={id:"title",_element:ua,start(i,t,e){Td(i,e)},stop(i){const t=i.titleBlock;mt.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){const n=i.titleBlock;mt.configure(i,n,e),n.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ze={average(i){if(!i.length)return!1;let t,e,n=new Set,s=0,r=0;for(t=0,e=i.length;t<e;++t){const a=i[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();n.add(l.x),s+=l.y,++r}}return r===0||n.size===0?!1:{x:[...n].reduce((a,l)=>a+l)/n.size,y:s/r}},nearest(i,t){if(!i.length)return!1;let e=t.x,n=t.y,s=Number.POSITIVE_INFINITY,r,o,a;for(r=0,o=i.length;r<o;++r){const l=i[r].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),h=$n(t,c);h<s&&(s=h,a=l)}}if(a){const l=a.tooltipPosition();e=l.x,n=l.y}return{x:e,y:n}}};function Ot(i,t){return t&&(J(t)?Array.prototype.push.apply(i,t):i.push(t)),i}function At(i){return(typeof i=="string"||i instanceof String)&&i.indexOf(`
`)>-1?i.split(`
`):i}function Dd(i,t){const{element:e,datasetIndex:n,index:s}=t,r=i.getDatasetMeta(n).controller,{label:o,value:a}=r.getLabelAndValue(s);return{chart:i,label:o,parsed:r.getParsed(s),raw:i.data.datasets[n].data[s],formattedValue:a,dataset:r.getDataset(),dataIndex:s,datasetIndex:n,element:e}}function Cr(i,t){const e=i.chart.ctx,{body:n,footer:s,title:r}=i,{boxWidth:o,boxHeight:a}=t,l=tt(t.bodyFont),c=tt(t.titleFont),h=tt(t.footerFont),u=r.length,d=s.length,f=n.length,g=dt(t.padding);let m=g.height,p=0,y=n.reduce((v,x)=>v+x.before.length+x.lines.length+x.after.length,0);if(y+=i.beforeBody.length+i.afterBody.length,u&&(m+=u*c.lineHeight+(u-1)*t.titleSpacing+t.titleMarginBottom),y){const v=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=f*v+(y-f)*l.lineHeight+(y-1)*t.bodySpacing}d&&(m+=t.footerMarginTop+d*h.lineHeight+(d-1)*t.footerSpacing);let b=0;const _=function(v){p=Math.max(p,e.measureText(v).width+b)};return e.save(),e.font=c.string,N(i.title,_),e.font=l.string,N(i.beforeBody.concat(i.afterBody),_),b=t.displayColors?o+2+t.boxPadding:0,N(n,v=>{N(v.before,_),N(v.lines,_),N(v.after,_)}),b=0,e.font=h.string,N(i.footer,_),e.restore(),p+=g.width,{width:p,height:m}}function Cd(i,t){const{y:e,height:n}=t;return e<n/2?"top":e>i.height-n/2?"bottom":"center"}function Id(i,t,e,n){const{x:s,width:r}=n,o=e.caretSize+e.caretPadding;if(i==="left"&&s+r+o>t.width||i==="right"&&s-r-o<0)return!0}function Ed(i,t,e,n){const{x:s,width:r}=e,{width:o,chartArea:{left:a,right:l}}=i;let c="center";return n==="center"?c=s<=(a+l)/2?"left":"right":s<=r/2?c="left":s>=o-r/2&&(c="right"),Id(c,i,t,e)&&(c="center"),c}function Ir(i,t,e){const n=e.yAlign||t.yAlign||Cd(i,e);return{xAlign:e.xAlign||t.xAlign||Ed(i,t,e,n),yAlign:n}}function Ad(i,t){let{x:e,width:n}=i;return t==="right"?e-=n:t==="center"&&(e-=n/2),e}function Pd(i,t,e){let{y:n,height:s}=i;return t==="top"?n+=e:t==="bottom"?n-=s+e:n-=s/2,n}function Er(i,t,e,n){const{caretSize:s,caretPadding:r,cornerRadius:o}=i,{xAlign:a,yAlign:l}=e,c=s+r,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:f}=ve(o);let g=Ad(t,a);const m=Pd(t,l,c);return l==="center"?a==="left"?g+=c:a==="right"&&(g-=c):a==="left"?g-=Math.max(h,d)+s:a==="right"&&(g+=Math.max(u,f)+s),{x:rt(g,0,n.width-t.width),y:rt(m,0,n.height-t.height)}}function Ci(i,t,e){const n=dt(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-n.right:i.x+n.left}function Ar(i){return Ot([],At(i))}function Rd(i,t,e){return le(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function Pr(i,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}const da={beforeTitle:It,title(i){if(i.length>0){const t=i[0],e=t.chart.data.labels,n=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex<n)return e[t.dataIndex]}return""},afterTitle:It,beforeBody:It,beforeLabel:It,label(i){if(this&&this.options&&this.options.mode==="dataset")return i.label+": "+i.formattedValue||i.formattedValue;let t=i.dataset.label||"";t&&(t+=": ");const e=i.formattedValue;return H(e)||(t+=e),t},labelColor(i){const e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(i){const e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:It,afterBody:It,beforeFooter:It,footer:It,afterFooter:It};function at(i,t,e,n){const s=i[t].call(e,n);return typeof s>"u"?da[t].call(e,n):s}class Jn extends kt{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,n=this.options.setContext(this.getContext()),s=n.enabled&&e.options.animation&&n.animations,r=new Zo(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=Rd(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:n}=e,s=at(n,"beforeTitle",this,t),r=at(n,"title",this,t),o=at(n,"afterTitle",this,t);let a=[];return a=Ot(a,At(s)),a=Ot(a,At(r)),a=Ot(a,At(o)),a}getBeforeBody(t,e){return Ar(at(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:n}=e,s=[];return N(t,r=>{const o={before:[],lines:[],after:[]},a=Pr(n,r);Ot(o.before,At(at(a,"beforeLabel",this,r))),Ot(o.lines,at(a,"label",this,r)),Ot(o.after,At(at(a,"afterLabel",this,r))),s.push(o)}),s}getAfterBody(t,e){return Ar(at(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:n}=e,s=at(n,"beforeFooter",this,t),r=at(n,"footer",this,t),o=at(n,"afterFooter",this,t);let a=[];return a=Ot(a,At(s)),a=Ot(a,At(r)),a=Ot(a,At(o)),a}_createItems(t){const e=this._active,n=this.chart.data,s=[],r=[],o=[];let a=[],l,c;for(l=0,c=e.length;l<c;++l)a.push(Dd(this.chart,e[l]));return t.filter&&(a=a.filter((h,u,d)=>t.filter(h,u,d,n))),t.itemSort&&(a=a.sort((h,u)=>t.itemSort(h,u,n))),N(a,h=>{const u=Pr(t.callbacks,h);s.push(at(u,"labelColor",this,h)),r.push(at(u,"labelPointStyle",this,h)),o.push(at(u,"labelTextColor",this,h))}),this.labelColors=s,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=a,a}update(t,e){const n=this.options.setContext(this.getContext()),s=this._active;let r,o=[];if(!s.length)this.opacity!==0&&(r={opacity:0});else{const a=Ze[n.position].call(this,s,this._eventPosition);o=this._createItems(n),this.title=this.getTitle(o,n),this.beforeBody=this.getBeforeBody(o,n),this.body=this.getBody(o,n),this.afterBody=this.getAfterBody(o,n),this.footer=this.getFooter(o,n);const l=this._size=Cr(this,n),c=Object.assign({},a,l),h=Ir(this.chart,n,c),u=Er(n,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,r={opacity:1,x:u.x,y:u.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,s){const r=this.getCaretPosition(t,n,s);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,n){const{xAlign:s,yAlign:r}=this,{caretSize:o,cornerRadius:a}=n,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:u}=ve(a),{x:d,y:f}=t,{width:g,height:m}=e;let p,y,b,_,v,x;return r==="center"?(v=f+m/2,s==="left"?(p=d,y=p-o,_=v+o,x=v-o):(p=d+g,y=p+o,_=v-o,x=v+o),b=p):(s==="left"?y=d+Math.max(l,h)+o:s==="right"?y=d+g-Math.max(c,u)-o:y=this.caretX,r==="top"?(_=f,v=_-o,p=y-o,b=y+o):(_=f+m,v=_+o,p=y+o,b=y-o),x=_),{x1:p,x2:y,x3:b,y1:_,y2:v,y3:x}}drawTitle(t,e,n){const s=this.title,r=s.length;let o,a,l;if(r){const c=we(n.rtl,this.x,this.width);for(t.x=Ci(this,n.titleAlign,n),e.textAlign=c.textAlign(n.titleAlign),e.textBaseline="middle",o=tt(n.titleFont),a=n.titleSpacing,e.fillStyle=n.titleColor,e.font=o.string,l=0;l<r;++l)e.fillText(s[l],c.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+a,l+1===r&&(t.y+=n.titleMarginBottom-a)}}_drawColorBox(t,e,n,s,r){const o=this.labelColors[n],a=this.labelPointStyles[n],{boxHeight:l,boxWidth:c}=r,h=tt(r.bodyFont),u=Ci(this,"left",r),d=s.x(u),f=l<h.lineHeight?(h.lineHeight-l)/2:0,g=e.y+f;if(r.usePointStyle){const m={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},p=s.leftForLtr(d,c)+c/2,y=g+l/2;t.strokeStyle=r.multiKeyBackground,t.fillStyle=r.multiKeyBackground,Un(t,m,p,y),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,Un(t,m,p,y)}else{t.lineWidth=R(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const m=s.leftForLtr(d,c),p=s.leftForLtr(s.xPlus(d,1),c-2),y=ve(o.borderRadius);Object.values(y).some(b=>b!==0)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,en(t,{x:m,y:g,w:c,h:l,radius:y}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),en(t,{x:p,y:g+1,w:c-2,h:l-2,radius:y}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(m,g,c,l),t.strokeRect(m,g,c,l),t.fillStyle=o.backgroundColor,t.fillRect(p,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){const{body:s}=this,{bodySpacing:r,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:h}=n,u=tt(n.bodyFont);let d=u.lineHeight,f=0;const g=we(n.rtl,this.x,this.width),m=function(k){e.fillText(k,g.x(t.x+f),t.y+d/2),t.y+=d+r},p=g.textAlign(o);let y,b,_,v,x,S,M;for(e.textAlign=o,e.textBaseline="middle",e.font=u.string,t.x=Ci(this,p,n),e.fillStyle=n.bodyColor,N(this.beforeBody,m),f=a&&p!=="right"?o==="center"?c/2+h:c+2+h:0,v=0,S=s.length;v<S;++v){for(y=s[v],b=this.labelTextColors[v],e.fillStyle=b,N(y.before,m),_=y.lines,a&&_.length&&(this._drawColorBox(e,t,v,g,n),d=Math.max(u.lineHeight,l)),x=0,M=_.length;x<M;++x)m(_[x]),d=u.lineHeight;N(y.after,m)}f=0,d=u.lineHeight,N(this.afterBody,m),t.y-=r}drawFooter(t,e,n){const s=this.footer,r=s.length;let o,a;if(r){const l=we(n.rtl,this.x,this.width);for(t.x=Ci(this,n.footerAlign,n),t.y+=n.footerMarginTop,e.textAlign=l.textAlign(n.footerAlign),e.textBaseline="middle",o=tt(n.footerFont),e.fillStyle=n.footerColor,e.font=o.string,a=0;a<r;++a)e.fillText(s[a],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+n.footerSpacing}}drawBackground(t,e,n,s){const{xAlign:r,yAlign:o}=this,{x:a,y:l}=t,{width:c,height:h}=n,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:g}=ve(s.cornerRadius);e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.beginPath(),e.moveTo(a+u,l),o==="top"&&this.drawCaret(t,e,n,s),e.lineTo(a+c-d,l),e.quadraticCurveTo(a+c,l,a+c,l+d),o==="center"&&r==="right"&&this.drawCaret(t,e,n,s),e.lineTo(a+c,l+h-g),e.quadraticCurveTo(a+c,l+h,a+c-g,l+h),o==="bottom"&&this.drawCaret(t,e,n,s),e.lineTo(a+f,l+h),e.quadraticCurveTo(a,l+h,a,l+h-f),o==="center"&&r==="left"&&this.drawCaret(t,e,n,s),e.lineTo(a,l+u),e.quadraticCurveTo(a,l,a+u,l),e.closePath(),e.fill(),s.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,n=this.$animations,s=n&&n.x,r=n&&n.y;if(s||r){const o=Ze[t.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=Cr(this,t),l=Object.assign({},o,this._size),c=Ir(e,t,l),h=Er(t,l,c,e);(s._to!==h.x||r._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},r={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const o=dt(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=n,this.drawBackground(r,t,s,e),jo(t,e.textDirection),r.y+=o.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),Uo(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const n=this._active,s=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),r=!Ji(n,s),o=this._positionChanged(s,e);(r||o)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,n=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,r=this._active||[],o=this._getActiveElements(t,r,e,n),a=this._positionChanged(o,t),l=e||!Ji(o,r)||a;return l&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,n,s){const r=this.options;if(t.type==="mouseout")return[];if(!s)return e.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(t,r.mode,r,n);return r.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:n,caretY:s,options:r}=this,o=Ze[r.position].call(this,t,e);return o!==!1&&(n!==o.x||s!==o.y)}}O(Jn,"positioners",Ze);var Tm={id:"tooltip",_element:Jn,positioners:Ze,afterInit(i,t,e){e&&(i.tooltip=new Jn({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){const t=i.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){const e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.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:da},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Ld=(i,t,e,n)=>(typeof t=="string"?(e=i.push(t)-1,n.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function Fd(i,t,e,n){const s=i.indexOf(t);if(s===-1)return Ld(i,t,e,n);const r=i.lastIndexOf(t);return s!==r?e:s}const Nd=(i,t)=>i===null?null:rt(Math.round(i),0,t);function Rr(i){const t=this.getLabels();return i>=0&&i<t.length?t[i]:i}class Lr extends Ie{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const n=this.getLabels();for(const{index:s,label:r}of e)n[s]===r&&n.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(H(t))return null;const n=this.getLabels();return e=isFinite(e)&&n[e]===t?e:Fd(n,t,A(e,t),this._addedLabels),Nd(e,n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:n,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(n=0),e||(s=this.getLabels().length-1)),this.min=n,this.max=s}buildTicks(){const t=this.min,e=this.max,n=this.options.offset,s=[];let r=this.getLabels();r=t===0&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let o=t;o<=e;o++)s.push({value:o});return s}getLabelForValue(t){return Rr.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){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}O(Lr,"id","category"),O(Lr,"defaults",{ticks:{callback:Rr}});function Wd(i,t){const e=[],{bounds:s,step:r,min:o,max:a,precision:l,count:c,maxTicks:h,maxDigits:u,includeBounds:d}=i,f=r||1,g=h-1,{min:m,max:p}=t,y=!H(o),b=!H(a),_=!H(c),v=(p-m)/(u+1);let x=Ns((p-m)/g/f)*f,S,M,k,D;if(x<1e-14&&!y&&!b)return[{value:m},{value:p}];D=Math.ceil(p/x)-Math.floor(m/x),D>g&&(x=Ns(D*x/g/f)*f),H(l)||(S=Math.pow(10,l),x=Math.ceil(x*S)/S),s==="ticks"?(M=Math.floor(m/x)*x,k=Math.ceil(p/x)*x):(M=m,k=p),y&&b&&r&&fc((a-o)/r,x/1e3)?(D=Math.round(Math.min((a-o)/x,h)),x=(a-o)/D,M=o,k=a):_?(M=y?o:M,k=b?a:k,D=c-1,x=(k-M)/D):(D=(k-M)/x,Je(D,Math.round(D),x/1e3)?D=Math.round(D):D=Math.ceil(D));const I=Math.max(Ws(x),Ws(M));S=Math.pow(10,H(l)?I:l),M=Math.round(M*S)/S,k=Math.round(k*S)/S;let E=0;for(y&&(d&&M!==o?(e.push({value:o}),M<o&&E++,Je(Math.round((M+E*x)*S)/S,o,Fr(o,v,i))&&E++):M<o&&E++);E<D;++E){const P=Math.round((M+E*x)*S)/S;if(b&&P>a)break;e.push({value:P})}return b&&d&&k!==a?e.length&&Je(e[e.length-1].value,a,Fr(a,v,i))?e[e.length-1].value=a:e.push({value:a}):(!b||k===a)&&e.push({value:k}),e}function Fr(i,t,{horizontal:e,minRotation:n}){const s=Dt(n),r=(e?Math.sin(s):Math.cos(s))||.001,o=.75*t*(""+i).length;return Math.min(t/r,o)}class zd extends Ie{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return H(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:s,max:r}=this;const o=l=>s=e?s:l,a=l=>r=n?r:l;if(t){const l=Oe(s),c=Oe(r);l<0&&c<0?a(0):l>0&&c>0&&o(0)}if(s===r){let l=r===0?1:Math.abs(r*.05);a(r+l),t||o(s-l)}this.min=s,this.max=r}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:n}=t,s;return n?(s=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),e=e||11),e&&(s=Math.min(e,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const s={maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},r=this._range||this,o=Wd(s,r);return t.bounds==="ticks"&&gc(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const s=(n-e)/Math.max(t.length-1,1)/2;e-=s,n+=s}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return un(t,this.chart.options.locale,this.options.ticks.format)}}class Nr extends zd{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=bt(t)?t:0,this.max=bt(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,n=Dt(this.options.ticks.minRotation),s=(t?Math.sin(n):Math.cos(n))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}O(Nr,"id","linear"),O(Nr,"defaults",{ticks:{callback:Fo.formatters.numeric}});const fn={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(fn);function Wr(i,t){return i-t}function zr(i,t){if(H(t))return null;const e=i._adapter,{parser:n,round:s,isoWeekday:r}=i._parseOpts;let o=t;return typeof n=="function"&&(o=n(o)),bt(o)||(o=typeof n=="string"?e.parse(o,n):e.parse(o)),o===null?null:(s&&(o=s==="week"&&(si(r)||r===!0)?e.startOf(o,"isoWeek",r):e.startOf(o,s)),+o)}function Vr(i,t,e,n){const s=ct.length;for(let r=ct.indexOf(i);r<s-1;++r){const o=fn[ct[r]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((e-t)/(a*o.size))<=n)return ct[r]}return ct[s-1]}function Vd(i,t,e,n,s){for(let r=ct.length-1;r>=ct.indexOf(e);r--){const o=ct[r];if(fn[o].common&&i._adapter.diff(s,n,o)>=t-1)return o}return ct[e?ct.indexOf(e):0]}function Hd(i){for(let t=ct.indexOf(i)+1,e=ct.length;t<e;++t)if(fn[ct[t]].common)return ct[t]}function Hr(i,t,e){if(!e)i[t]=!0;else if(e.length){const{lo:n,hi:s}=cs(e,t),r=e[n]>=t?e[n]:e[s];i[r]=!0}}function Bd(i,t,e,n){const s=i._adapter,r=+s.startOf(t[0].value,n),o=t[t.length-1].value;let a,l;for(a=r;a<=o;a=+s.add(a,1,n))l=e[a],l>=0&&(t[l].major=!0);return t}function Br(i,t,e){const n=[],s={},r=t.length;let o,a;for(o=0;o<r;++o)a=t[o],s[a]=o,n.push({value:a,major:!1});return r===0||!e?n:Bd(i,n,s,e)}class on extends Ie{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,e={}){const n=t.time||(t.time={}),s=this._adapter=new Xo._date(t.adapters.date);s.init(e),Ge(n.displayFormats,s.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:zr(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,n=t.time.unit||"day";let{min:s,max:r,minDefined:o,maxDefined:a}=this.getUserBounds();function l(c){!o&&!isNaN(c.min)&&(s=Math.min(s,c.min)),!a&&!isNaN(c.max)&&(r=Math.max(r,c.max))}(!o||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),s=bt(s)&&!isNaN(s)?s:+e.startOf(Date.now(),n),r=bt(r)&&!isNaN(r)?r:+e.endOf(Date.now(),n)+1,this.min=Math.min(s,r-1),this.max=Math.max(s+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],n=t[t.length-1]),{min:e,max:n}}buildTicks(){const t=this.options,e=t.time,n=t.ticks,s=n.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const r=this.min,o=this.max,a=xc(s,r,o);return this._unit=e.unit||(n.autoSkip?Vr(e.minUnit,this.min,this.max,this._getLabelCapacity(r)):Vd(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:Hd(this._unit),this.initOffsets(s),t.reverse&&a.reverse(),Br(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,n=0,s,r;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?e=1-s:e=(this.getDecimalForValue(t[1])-s)/2,r=this.getDecimalForValue(t[t.length-1]),t.length===1?n=r:n=(r-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;e=rt(e,0,o),n=rt(n,0,o),this._offsets={start:e,end:n,factor:1/(e+1+n)}}_generate(){const t=this._adapter,e=this.min,n=this.max,s=this.options,r=s.time,o=r.unit||Vr(r.minUnit,e,n,this._getLabelCapacity(e)),a=A(s.ticks.stepSize,1),l=o==="week"?r.isoWeekday:!1,c=si(l)||l===!0,h={};let u=e,d,f;if(c&&(u=+t.startOf(u,"isoWeek",l)),u=+t.startOf(u,c?"day":o),t.diff(n,e,o)>1e5*a)throw new Error(e+" and "+n+" are too far apart with stepSize of "+a+" "+o);const g=s.ticks.source==="data"&&this.getDataTimestamps();for(d=u,f=0;d<n;d=+t.add(d,a,o),f++)Hr(h,d,g);return(d===n||s.bounds==="ticks"||f===1)&&Hr(h,d,g),Object.keys(h).sort(Wr).map(m=>+m)}getLabelForValue(t){const e=this._adapter,n=this.options.time;return n.tooltipFormat?e.format(t,n.tooltipFormat):e.format(t,n.displayFormats.datetime)}format(t,e){const s=this.options.time.displayFormats,r=this._unit,o=e||s[r];return this._adapter.format(t,o)}_tickFormatFunction(t,e,n,s){const r=this.options,o=r.ticks.callback;if(o)return V(o,[t,e,n],this);const a=r.time.displayFormats,l=this._unit,c=this._majorUnit,h=l&&a[l],u=c&&a[c],d=n[e],f=c&&u&&d&&d.major;return this._adapter.format(t,s||(f?u:h))}generateTickLabels(t){let e,n,s;for(e=0,n=t.length;e<n;++e)s=t[e],s.label=this._tickFormatFunction(s.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,n=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+n)*e.factor)}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+n*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,n=this.ctx.measureText(t).width,s=Dt(this.isHorizontal()?e.maxRotation:e.minRotation),r=Math.cos(s),o=Math.sin(s),a=this._resolveTickFontOptions(0).size;return{w:n*r+a*o,h:n*o+a*r}}_getLabelCapacity(t){const e=this.options.time,n=e.displayFormats,s=n[e.unit]||n.millisecond,r=this._tickFormatFunction(t,0,Br(this,[t],this._majorUnit),s),o=this._getLabelSize(r),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],e,n;if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(e=0,n=s.length;e<n;++e)t=t.concat(s[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,n;if(t.length)return t;const s=this.getLabels();for(e=0,n=s.length;e<n;++e)t.push(zr(this,s[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return vc(t.sort(Wr))}}O(on,"id","time"),O(on,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Ii(i,t,e){let n=0,s=i.length-1,r,o,a,l;e?(t>=i[n].pos&&t<=i[s].pos&&({lo:n,hi:s}=ne(i,"pos",t)),{pos:r,time:a}=i[n],{pos:o,time:l}=i[s]):(t>=i[n].time&&t<=i[s].time&&({lo:n,hi:s}=ne(i,"time",t)),{time:r,pos:a}=i[n],{time:o,pos:l}=i[s]);const c=o-r;return c?a+(l-a)*(t-r)/c:a}class $r extends on{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Ii(e,this.min),this._tableRange=Ii(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:n}=this,s=[],r=[];let o,a,l,c,h;for(o=0,a=t.length;o<a;++o)c=t[o],c>=e&&c<=n&&s.push(c);if(s.length<2)return[{time:e,pos:0},{time:n,pos:1}];for(o=0,a=s.length;o<a;++o)h=s[o+1],l=s[o-1],c=s[o],Math.round((h+l)/2)!==c&&r.push({time:c,pos:o/(a-1)});return r}_generate(){const t=this.min,e=this.max;let n=super.getDataTimestamps();return(!n.includes(t)||!n.length)&&n.splice(0,0,t),(!n.includes(e)||n.length===1)&&n.push(e),n.sort((s,r)=>s-r)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),n=this.getLabelTimestamps();return e.length&&n.length?t=this.normalize(e.concat(n)):t=e.length?e:n,t=this._cache.all=t,t}getDecimalForValue(t){return(Ii(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return Ii(this._table,n*this._tableRange+this._minPos,!0)}}O($r,"id","timeseries"),O($r,"defaults",on.defaults);const fa={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},$d={ariaLabel:{type:String},ariaDescribedby:{type:String}},jd={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...fa,...$d},Ud=Tl[0]==="2"?(i,t)=>Object.assign(i,{attrs:t}):(i,t)=>Object.assign(i,t);function ge(i){return Mo(i)?Vn(i):i}function Yd(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:i;return Mo(t)?new Proxy(i,{}):i}function Zd(i,t){const e=i.options;e&&t&&Object.assign(e,t)}function ga(i,t){i.labels=t}function ma(i,t,e){const n=[];i.datasets=t.map(s=>{const r=i.datasets.find(o=>o[e]===s[e]);return!r||!s.data||n.includes(r)?{...s}:(n.push(r),Object.assign(r,s),r)})}function qd(i,t){const e={labels:[],datasets:[]};return ga(e,i.labels),ma(e,i.datasets,t),e}const Xd=ko({props:jd,setup(i,t){let{expose:e,slots:n}=t;const s=Dl(null),r=So(null);e({chart:r});const o=()=>{if(!s.value)return;const{type:c,data:h,options:u,plugins:d,datasetIdKey:f}=i,g=qd(h,f),m=Yd(g,h);r.value=new vs(s.value,{type:c,data:m,options:{...u},plugins:d})},a=()=>{const c=Vn(r.value);c&&(i.destroyDelay>0?setTimeout(()=>{c.destroy(),r.value=null},i.destroyDelay):(c.destroy(),r.value=null))},l=c=>{c.update(i.updateMode)};return Cl(o),Il(a),El([()=>i.options,()=>i.data],(c,h)=>{let[u,d]=c,[f,g]=h;const m=Vn(r.value);if(!m)return;let p=!1;if(u){const y=ge(u),b=ge(f);y&&y!==b&&(Zd(m,y),p=!0)}if(d){const y=ge(d.labels),b=ge(g.labels),_=ge(d.datasets),v=ge(g.datasets);y!==b&&(ga(m.config.data,y),p=!0),_&&_!==v&&(ma(m.config.data,_,i.datasetIdKey),p=!0)}p&&Al(()=>{l(m)})},{deep:!0}),()=>zn("canvas",{role:"img",ariaLabel:i.ariaLabel,ariaDescribedby:i.ariaDescribedby,ref:s},[zn("p",{},[n.default?n.default():""])])}});function pa(i,t){return vs.register(t),ko({props:fa,setup(e,n){let{expose:s}=n;const r=So(null),o=a=>{r.value=a==null?void 0:a.chart};return s({chart:r}),()=>zn(Xd,Ud({ref:o},{type:i,...e}))}})}const Dm=pa("line",Hi),Cm=pa("pie",Yn);class ce extends Error{}class Gd extends ce{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class Jd extends ce{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class Kd extends ce{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class _e extends ce{}class ya extends ce{constructor(t){super(`Invalid unit ${t}`)}}class nt extends ce{}class Ft extends ce{constructor(){super("Zone is an abstract class")}}const w="numeric",St="short",ut="long",an={year:w,month:w,day:w},ba={year:w,month:St,day:w},Qd={year:w,month:St,day:w,weekday:St},xa={year:w,month:ut,day:w},_a={year:w,month:ut,day:w,weekday:ut},va={hour:w,minute:w},wa={hour:w,minute:w,second:w},ka={hour:w,minute:w,second:w,timeZoneName:St},Sa={hour:w,minute:w,second:w,timeZoneName:ut},Ma={hour:w,minute:w,hourCycle:"h23"},Oa={hour:w,minute:w,second:w,hourCycle:"h23"},Ta={hour:w,minute:w,second:w,hourCycle:"h23",timeZoneName:St},Da={hour:w,minute:w,second:w,hourCycle:"h23",timeZoneName:ut},Ca={year:w,month:w,day:w,hour:w,minute:w},Ia={year:w,month:w,day:w,hour:w,minute:w,second:w},Ea={year:w,month:St,day:w,hour:w,minute:w},Aa={year:w,month:St,day:w,hour:w,minute:w,second:w},tf={year:w,month:St,day:w,weekday:St,hour:w,minute:w},Pa={year:w,month:ut,day:w,hour:w,minute:w,timeZoneName:St},Ra={year:w,month:ut,day:w,hour:w,minute:w,second:w,timeZoneName:St},La={year:w,month:ut,day:w,weekday:ut,hour:w,minute:w,timeZoneName:ut},Fa={year:w,month:ut,day:w,weekday:ut,hour:w,minute:w,second:w,timeZoneName:ut};class di{get type(){throw new Ft}get name(){throw new Ft}get ianaName(){return this.name}get isUniversal(){throw new Ft}offsetName(t,e){throw new Ft}formatOffset(t,e){throw new Ft}offset(t){throw new Ft}equals(t){throw new Ft}get isValid(){throw new Ft}}let In=null;class gn extends di{static get instance(){return In===null&&(In=new gn),In}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:e,locale:n}){return Ua(t,e,n)}formatOffset(t,e){return ti(this.offset(t),e)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let Zi={};function ef(i){return Zi[i]||(Zi[i]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:i,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),Zi[i]}const nf={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function sf(i,t){const e=i.format(t).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(e),[,s,r,o,a,l,c,h]=n;return[o,s,r,a,l,c,h]}function rf(i,t){const e=i.formatToParts(t),n=[];for(let s=0;s<e.length;s++){const{type:r,value:o}=e[s],a=nf[r];r==="era"?n[a]=o:C(a)||(n[a]=parseInt(o,10))}return n}let Ei={};class Lt extends di{static create(t){return Ei[t]||(Ei[t]=new Lt(t)),Ei[t]}static resetCache(){Ei={},Zi={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=Lt.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:e,locale:n}){return Ua(t,e,n,this.name)}formatOffset(t,e){return ti(this.offset(t),e)}offset(t){const e=new Date(t);if(isNaN(e))return NaN;const n=ef(this.name);let[s,r,o,a,l,c,h]=n.formatToParts?rf(n,e):sf(n,e);a==="BC"&&(s=-Math.abs(s)+1);const d=pn({year:s,month:r,day:o,hour:l===24?0:l,minute:c,second:h,millisecond:0});let f=+e;const g=f%1e3;return f-=g>=0?g:1e3+g,(d-f)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let jr={};function of(i,t={}){const e=JSON.stringify([i,t]);let n=jr[e];return n||(n=new Intl.ListFormat(i,t),jr[e]=n),n}let Kn={};function Qn(i,t={}){const e=JSON.stringify([i,t]);let n=Kn[e];return n||(n=new Intl.DateTimeFormat(i,t),Kn[e]=n),n}let ts={};function af(i,t={}){const e=JSON.stringify([i,t]);let n=ts[e];return n||(n=new Intl.NumberFormat(i,t),ts[e]=n),n}let es={};function lf(i,t={}){const{base:e,...n}=t,s=JSON.stringify([i,n]);let r=es[s];return r||(r=new Intl.RelativeTimeFormat(i,t),es[s]=r),r}let qe=null;function cf(){return qe||(qe=new Intl.DateTimeFormat().resolvedOptions().locale,qe)}let Ur={};function hf(i){let t=Ur[i];if(!t){const e=new Intl.Locale(i);t="getWeekInfo"in e?e.getWeekInfo():e.weekInfo,Ur[i]=t}return t}function uf(i){const t=i.indexOf("-x-");t!==-1&&(i=i.substring(0,t));const e=i.indexOf("-u-");if(e===-1)return[i];{let n,s;try{n=Qn(i).resolvedOptions(),s=i}catch{const l=i.substring(0,e);n=Qn(l).resolvedOptions(),s=l}const{numberingSystem:r,calendar:o}=n;return[s,r,o]}}function df(i,t,e){return(e||t)&&(i.includes("-u-")||(i+="-u"),e&&(i+=`-ca-${e}`),t&&(i+=`-nu-${t}`)),i}function ff(i){const t=[];for(let e=1;e<=12;e++){const n=T.utc(2009,e,1);t.push(i(n))}return t}function gf(i){const t=[];for(let e=1;e<=7;e++){const n=T.utc(2016,11,13+e);t.push(i(n))}return t}function Ai(i,t,e,n){const s=i.listingMode();return s==="error"?null:s==="en"?e(t):n(t)}function mf(i){return i.numberingSystem&&i.numberingSystem!=="latn"?!1:i.numberingSystem==="latn"||!i.locale||i.locale.startsWith("en")||new Intl.DateTimeFormat(i.intl).resolvedOptions().numberingSystem==="latn"}class pf{constructor(t,e,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:s,floor:r,...o}=n;if(!e||Object.keys(o).length>0){const a={useGrouping:!1,...n};n.padTo>0&&(a.minimumIntegerDigits=n.padTo),this.inf=af(t,a)}}format(t){if(this.inf){const e=this.floor?Math.floor(t):t;return this.inf.format(e)}else{const e=this.floor?Math.floor(t):Os(t,3);return G(e,this.padTo)}}}class yf{constructor(t,e,n){this.opts=n,this.originalZone=void 0;let s;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const o=-1*(t.offset/60),a=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;t.offset!==0&&Lt.create(a).valid?(s=a,this.dt=t):(s="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,s=t.zone.name):(s="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const r={...this.opts};r.timeZone=r.timeZone||s,this.dtf=Qn(e,r)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(e=>{if(e.type==="timeZoneName"){const n=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:n}}else return e}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class bf{constructor(t,e,n){this.opts={style:"long",...n},!e&&$a()&&(this.rtf=lf(t,n))}format(t,e){return this.rtf?this.rtf.format(t,e):Hf(e,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,e){return this.rtf?this.rtf.formatToParts(t,e):[]}}const xf={firstDay:1,minimalDays:4,weekend:[6,7]};class W{static fromOpts(t){return W.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,e,n,s,r=!1){const o=t||Z.defaultLocale,a=o||(r?"en-US":cf()),l=e||Z.defaultNumberingSystem,c=n||Z.defaultOutputCalendar,h=is(s)||Z.defaultWeekSettings;return new W(a,l,c,h,o)}static resetCache(){qe=null,Kn={},ts={},es={}}static fromObject({locale:t,numberingSystem:e,outputCalendar:n,weekSettings:s}={}){return W.create(t,e,n,s)}constructor(t,e,n,s,r){const[o,a,l]=uf(t);this.locale=o,this.numberingSystem=e||a||null,this.outputCalendar=n||l||null,this.weekSettings=s,this.intl=df(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=mf(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),e=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&e?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:W.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,is(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,e=!1){return Ai(this,t,qa,()=>{const n=e?{month:t,day:"numeric"}:{month:t},s=e?"format":"standalone";return this.monthsCache[s][t]||(this.monthsCache[s][t]=ff(r=>this.extract(r,n,"month"))),this.monthsCache[s][t]})}weekdays(t,e=!1){return Ai(this,t,Ja,()=>{const n=e?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},s=e?"format":"standalone";return this.weekdaysCache[s][t]||(this.weekdaysCache[s][t]=gf(r=>this.extract(r,n,"weekday"))),this.weekdaysCache[s][t]})}meridiems(){return Ai(this,void 0,()=>Ka,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[T.utc(2016,11,13,9),T.utc(2016,11,13,19)].map(e=>this.extract(e,t,"dayperiod"))}return this.meridiemCache})}eras(t){return Ai(this,t,Qa,()=>{const e={era:t};return this.eraCache[t]||(this.eraCache[t]=[T.utc(-40,1,1),T.utc(2017,1,1)].map(n=>this.extract(n,e,"era"))),this.eraCache[t]})}extract(t,e,n){const s=this.dtFormatter(t,e),r=s.formatToParts(),o=r.find(a=>a.type.toLowerCase()===n);return o?o.value:null}numberFormatter(t={}){return new pf(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,e={}){return new yf(t,this.intl,e)}relFormatter(t={}){return new bf(this.intl,this.isEnglish(),t)}listFormatter(t={}){return of(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:ja()?hf(this.locale):xf}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let En=null;class ot extends di{static get utcInstance(){return En===null&&(En=new ot(0)),En}static instance(t){return t===0?ot.utcInstance:new ot(t)}static parseSpecifier(t){if(t){const e=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new ot(yn(e[1],e[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ti(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ti(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,e){return ti(this.fixed,e)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class _f extends di{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Ht(i,t){if(C(i)||i===null)return t;if(i instanceof di)return i;if(Of(i)){const e=i.toLowerCase();return e==="default"?t:e==="local"||e==="system"?gn.instance:e==="utc"||e==="gmt"?ot.utcInstance:ot.parseSpecifier(e)||Lt.create(i)}else return Yt(i)?ot.instance(i):typeof i=="object"&&"offset"in i&&typeof i.offset=="function"?i:new _f(i)}const ws={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Yr={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},vf=ws.hanidec.replace(/[\[|\]]/g,"").split("");function wf(i){let t=parseInt(i,10);if(isNaN(t)){t="";for(let e=0;e<i.length;e++){const n=i.charCodeAt(e);if(i[e].search(ws.hanidec)!==-1)t+=vf.indexOf(i[e]);else for(const s in Yr){const[r,o]=Yr[s];n>=r&&n<=o&&(t+=n-r)}}return parseInt(t,10)}else return t}let be={};function kf(){be={}}function _t({numberingSystem:i},t=""){const e=i||"latn";return be[e]||(be[e]={}),be[e][t]||(be[e][t]=new RegExp(`${ws[e]}${t}`)),be[e][t]}let Zr=()=>Date.now(),qr="system",Xr=null,Gr=null,Jr=null,Kr=60,Qr,to=null;class Z{static get now(){return Zr}static set now(t){Zr=t}static set defaultZone(t){qr=t}static get defaultZone(){return Ht(qr,gn.instance)}static get defaultLocale(){return Xr}static set defaultLocale(t){Xr=t}static get defaultNumberingSystem(){return Gr}static set defaultNumberingSystem(t){Gr=t}static get defaultOutputCalendar(){return Jr}static set defaultOutputCalendar(t){Jr=t}static get defaultWeekSettings(){return to}static set defaultWeekSettings(t){to=is(t)}static get twoDigitCutoffYear(){return Kr}static set twoDigitCutoffYear(t){Kr=t%100}static get throwOnInvalid(){return Qr}static set throwOnInvalid(t){Qr=t}static resetCaches(){W.resetCache(),Lt.resetCache(),T.resetCache(),kf()}}class wt{constructor(t,e){this.reason=t,this.explanation=e}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Na=[0,31,59,90,120,151,181,212,243,273,304,334],Wa=[0,31,60,91,121,152,182,213,244,274,305,335];function pt(i,t){return new wt("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${i}, which is invalid`)}function ks(i,t,e){const n=new Date(Date.UTC(i,t-1,e));i<100&&i>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);const s=n.getUTCDay();return s===0?7:s}function za(i,t,e){return e+(fi(i)?Wa:Na)[t-1]}function Va(i,t){const e=fi(i)?Wa:Na,n=e.findIndex(r=>r<t),s=t-e[n];return{month:n+1,day:s}}function Ss(i,t){return(i-t+7)%7+1}function ln(i,t=4,e=1){const{year:n,month:s,day:r}=i,o=za(n,s,r),a=Ss(ks(n,s,r),e);let l=Math.floor((o-a+14-t)/7),c;return l<1?(c=n-1,l=ci(c,t,e)):l>ci(n,t,e)?(c=n+1,l=1):c=n,{weekYear:c,weekNumber:l,weekday:a,...bn(i)}}function eo(i,t=4,e=1){const{weekYear:n,weekNumber:s,weekday:r}=i,o=Ss(ks(n,1,t),e),a=ke(n);let l=s*7+r-o-7+t,c;l<1?(c=n-1,l+=ke(c)):l>a?(c=n+1,l-=ke(n)):c=n;const{month:h,day:u}=Va(c,l);return{year:c,month:h,day:u,...bn(i)}}function An(i){const{year:t,month:e,day:n}=i,s=za(t,e,n);return{year:t,ordinal:s,...bn(i)}}function io(i){const{year:t,ordinal:e}=i,{month:n,day:s}=Va(t,e);return{year:t,month:n,day:s,...bn(i)}}function no(i,t){if(!C(i.localWeekday)||!C(i.localWeekNumber)||!C(i.localWeekYear)){if(!C(i.weekday)||!C(i.weekNumber)||!C(i.weekYear))throw new _e("Cannot mix locale-based week fields with ISO-based week fields");return C(i.localWeekday)||(i.weekday=i.localWeekday),C(i.localWeekNumber)||(i.weekNumber=i.localWeekNumber),C(i.localWeekYear)||(i.weekYear=i.localWeekYear),delete i.localWeekday,delete i.localWeekNumber,delete i.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Sf(i,t=4,e=1){const n=mn(i.weekYear),s=yt(i.weekNumber,1,ci(i.weekYear,t,e)),r=yt(i.weekday,1,7);return n?s?r?!1:pt("weekday",i.weekday):pt("week",i.weekNumber):pt("weekYear",i.weekYear)}function Mf(i){const t=mn(i.year),e=yt(i.ordinal,1,ke(i.year));return t?e?!1:pt("ordinal",i.ordinal):pt("year",i.year)}function Ha(i){const t=mn(i.year),e=yt(i.month,1,12),n=yt(i.day,1,cn(i.year,i.month));return t?e?n?!1:pt("day",i.day):pt("month",i.month):pt("year",i.year)}function Ba(i){const{hour:t,minute:e,second:n,millisecond:s}=i,r=yt(t,0,23)||t===24&&e===0&&n===0&&s===0,o=yt(e,0,59),a=yt(n,0,59),l=yt(s,0,999);return r?o?a?l?!1:pt("millisecond",s):pt("second",n):pt("minute",e):pt("hour",t)}function C(i){return typeof i>"u"}function Yt(i){return typeof i=="number"}function mn(i){return typeof i=="number"&&i%1===0}function Of(i){return typeof i=="string"}function Tf(i){return Object.prototype.toString.call(i)==="[object Date]"}function $a(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function ja(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Df(i){return Array.isArray(i)?i:[i]}function so(i,t,e){if(i.length!==0)return i.reduce((n,s)=>{const r=[t(s),s];return n&&e(n[0],r[0])===n[0]?n:r},null)[1]}function Cf(i,t){return t.reduce((e,n)=>(e[n]=i[n],e),{})}function Ce(i,t){return Object.prototype.hasOwnProperty.call(i,t)}function is(i){if(i==null)return null;if(typeof i!="object")throw new nt("Week settings must be an object");if(!yt(i.firstDay,1,7)||!yt(i.minimalDays,1,7)||!Array.isArray(i.weekend)||i.weekend.some(t=>!yt(t,1,7)))throw new nt("Invalid week settings");return{firstDay:i.firstDay,minimalDays:i.minimalDays,weekend:Array.from(i.weekend)}}function yt(i,t,e){return mn(i)&&i>=t&&i<=e}function If(i,t){return i-t*Math.floor(i/t)}function G(i,t=2){const e=i<0;let n;return e?n="-"+(""+-i).padStart(t,"0"):n=(""+i).padStart(t,"0"),n}function Vt(i){if(!(C(i)||i===null||i===""))return parseInt(i,10)}function Qt(i){if(!(C(i)||i===null||i===""))return parseFloat(i)}function Ms(i){if(!(C(i)||i===null||i==="")){const t=parseFloat("0."+i)*1e3;return Math.floor(t)}}function Os(i,t,e=!1){const n=10**t;return(e?Math.trunc:Math.round)(i*n)/n}function fi(i){return i%4===0&&(i%100!==0||i%400===0)}function ke(i){return fi(i)?366:365}function cn(i,t){const e=If(t-1,12)+1,n=i+(t-e)/12;return e===2?fi(n)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][e-1]}function pn(i){let t=Date.UTC(i.year,i.month-1,i.day,i.hour,i.minute,i.second,i.millisecond);return i.year<100&&i.year>=0&&(t=new Date(t),t.setUTCFullYear(i.year,i.month-1,i.day)),+t}function ro(i,t,e){return-Ss(ks(i,1,t),e)+t-1}function ci(i,t=4,e=1){const n=ro(i,t,e),s=ro(i+1,t,e);return(ke(i)-n+s)/7}function ns(i){return i>99?i:i>Z.twoDigitCutoffYear?1900+i:2e3+i}function Ua(i,t,e,n=null){const s=new Date(i),r={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(r.timeZone=n);const o={timeZoneName:t,...r},a=new Intl.DateTimeFormat(e,o).formatToParts(s).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function yn(i,t){let e=parseInt(i,10);Number.isNaN(e)&&(e=0);const n=parseInt(t,10)||0,s=e<0||Object.is(e,-0)?-n:n;return e*60+s}function Ya(i){const t=Number(i);if(typeof i=="boolean"||i===""||Number.isNaN(t))throw new nt(`Invalid unit value ${i}`);return t}function hn(i,t){const e={};for(const n in i)if(Ce(i,n)){const s=i[n];if(s==null)continue;e[t(n)]=Ya(s)}return e}function ti(i,t){const e=Math.trunc(Math.abs(i/60)),n=Math.trunc(Math.abs(i%60)),s=i>=0?"+":"-";switch(t){case"short":return`${s}${G(e,2)}:${G(n,2)}`;case"narrow":return`${s}${e}${n>0?`:${n}`:""}`;case"techie":return`${s}${G(e,2)}${G(n,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function bn(i){return Cf(i,["hour","minute","second","millisecond"])}const Ef=["January","February","March","April","May","June","July","August","September","October","November","December"],Za=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Af=["J","F","M","A","M","J","J","A","S","O","N","D"];function qa(i){switch(i){case"narrow":return[...Af];case"short":return[...Za];case"long":return[...Ef];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Xa=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ga=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Pf=["M","T","W","T","F","S","S"];function Ja(i){switch(i){case"narrow":return[...Pf];case"short":return[...Ga];case"long":return[...Xa];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Ka=["AM","PM"],Rf=["Before Christ","Anno Domini"],Lf=["BC","AD"],Ff=["B","A"];function Qa(i){switch(i){case"narrow":return[...Ff];case"short":return[...Lf];case"long":return[...Rf];default:return null}}function Nf(i){return Ka[i.hour<12?0:1]}function Wf(i,t){return Ja(t)[i.weekday-1]}function zf(i,t){return qa(t)[i.month-1]}function Vf(i,t){return Qa(t)[i.year<0?0:1]}function Hf(i,t,e="always",n=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},r=["hours","minutes","seconds"].indexOf(i)===-1;if(e==="auto"&&r){const u=i==="days";switch(t){case 1:return u?"tomorrow":`next ${s[i][0]}`;case-1:return u?"yesterday":`last ${s[i][0]}`;case 0:return u?"today":`this ${s[i][0]}`}}const o=Object.is(t,-0)||t<0,a=Math.abs(t),l=a===1,c=s[i],h=n?l?c[1]:c[2]||c[1]:l?s[i][0]:i;return o?`${a} ${h} ago`:`in ${a} ${h}`}function oo(i,t){let e="";for(const n of i)n.literal?e+=n.val:e+=t(n.val);return e}const Bf={D:an,DD:ba,DDD:xa,DDDD:_a,t:va,tt:wa,ttt:ka,tttt:Sa,T:Ma,TT:Oa,TTT:Ta,TTTT:Da,f:Ca,ff:Ea,fff:Pa,ffff:La,F:Ia,FF:Aa,FFF:Ra,FFFF:Fa};class st{static create(t,e={}){return new st(t,e)}static parseFormat(t){let e=null,n="",s=!1;const r=[];for(let o=0;o<t.length;o++){const a=t.charAt(o);a==="'"?(n.length>0&&r.push({literal:s||/^\s+$/.test(n),val:n}),e=null,n="",s=!s):s||a===e?n+=a:(n.length>0&&r.push({literal:/^\s+$/.test(n),val:n}),n=a,e=a)}return n.length>0&&r.push({literal:s||/^\s+$/.test(n),val:n}),r}static macroTokenToFormatOpts(t){return Bf[t]}constructor(t,e){this.opts=e,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,e){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...e}).format()}dtFormatter(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e})}formatDateTime(t,e){return this.dtFormatter(t,e).format()}formatDateTimeParts(t,e){return this.dtFormatter(t,e).formatToParts()}formatInterval(t,e){return this.dtFormatter(t.start,e).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,e){return this.dtFormatter(t,e).resolvedOptions()}num(t,e=0){if(this.opts.forceSimple)return G(t,e);const n={...this.opts};return e>0&&(n.padTo=e),this.loc.numberFormatter(n).format(t)}formatDateTimeFromString(t,e){const n=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",r=(f,g)=>this.loc.extract(t,f,g),o=f=>t.isOffsetFixed&&t.offset===0&&f.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,f.format):"",a=()=>n?Nf(t):r({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(f,g)=>n?zf(t,f):r(g?{month:f}:{month:f,day:"numeric"},"month"),c=(f,g)=>n?Wf(t,f):r(g?{weekday:f}:{weekday:f,month:"long",day:"numeric"},"weekday"),h=f=>{const g=st.macroTokenToFormatOpts(f);return g?this.formatWithSystemDefault(t,g):f},u=f=>n?Vf(t,f):r({era:f},"era"),d=f=>{switch(f){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return a();case"d":return s?r({day:"numeric"},"day"):this.num(t.day);case"dd":return s?r({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return s?r({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return s?r({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return s?r({month:"numeric"},"month"):this.num(t.month);case"MM":return s?r({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return s?r({year:"numeric"},"year"):this.num(t.year);case"yy":return s?r({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return s?r({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return s?r({year:"numeric"},"year"):this.num(t.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return h(f)}};return oo(st.parseFormat(e),d)}formatDurationFromString(t,e){const n=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=l=>c=>{const h=n(c);return h?this.num(l.get(h),c.length):c},r=st.parseFormat(e),o=r.reduce((l,{literal:c,val:h})=>c?l:l.concat(h),[]),a=t.shiftTo(...o.map(n).filter(l=>l));return oo(r,s(a))}}const tl=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Ee(...i){const t=i.reduce((e,n)=>e+n.source,"");return RegExp(`^${t}$`)}function Ae(...i){return t=>i.reduce(([e,n,s],r)=>{const[o,a,l]=r(t,s);return[{...e,...o},a||n,l]},[{},null,1]).slice(0,2)}function Pe(i,...t){if(i==null)return[null,null];for(const[e,n]of t){const s=e.exec(i);if(s)return n(s)}return[null,null]}function el(...i){return(t,e)=>{const n={};let s;for(s=0;s<i.length;s++)n[i[s]]=Vt(t[e+s]);return[n,null,e+s]}}const il=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,$f=`(?:${il.source}?(?:\\[(${tl.source})\\])?)?`,Ts=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,nl=RegExp(`${Ts.source}${$f}`),Ds=RegExp(`(?:T${nl.source})?`),jf=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Uf=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Yf=/(\d{4})-?(\d{3})/,Zf=el("weekYear","weekNumber","weekDay"),qf=el("year","ordinal"),Xf=/(\d{4})-(\d\d)-(\d\d)/,sl=RegExp(`${Ts.source} ?(?:${il.source}|(${tl.source}))?`),Gf=RegExp(`(?: ${sl.source})?`);function Se(i,t,e){const n=i[t];return C(n)?e:Vt(n)}function Jf(i,t){return[{year:Se(i,t),month:Se(i,t+1,1),day:Se(i,t+2,1)},null,t+3]}function Re(i,t){return[{hours:Se(i,t,0),minutes:Se(i,t+1,0),seconds:Se(i,t+2,0),milliseconds:Ms(i[t+3])},null,t+4]}function gi(i,t){const e=!i[t]&&!i[t+1],n=yn(i[t+1],i[t+2]),s=e?null:ot.instance(n);return[{},s,t+3]}function mi(i,t){const e=i[t]?Lt.create(i[t]):null;return[{},e,t+1]}const Kf=RegExp(`^T?${Ts.source}$`),Qf=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function tg(i){const[t,e,n,s,r,o,a,l,c]=i,h=t[0]==="-",u=l&&l[0]==="-",d=(f,g=!1)=>f!==void 0&&(g||f&&h)?-f:f;return[{years:d(Qt(e)),months:d(Qt(n)),weeks:d(Qt(s)),days:d(Qt(r)),hours:d(Qt(o)),minutes:d(Qt(a)),seconds:d(Qt(l),l==="-0"),milliseconds:d(Ms(c),u)}]}const eg={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Cs(i,t,e,n,s,r,o){const a={year:t.length===2?ns(Vt(t)):Vt(t),month:Za.indexOf(e)+1,day:Vt(n),hour:Vt(s),minute:Vt(r)};return o&&(a.second=Vt(o)),i&&(a.weekday=i.length>3?Xa.indexOf(i)+1:Ga.indexOf(i)+1),a}const ig=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function ng(i){const[,t,e,n,s,r,o,a,l,c,h,u]=i,d=Cs(t,s,n,e,r,o,a);let f;return l?f=eg[l]:c?f=0:f=yn(h,u),[d,new ot(f)]}function sg(i){return i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const rg=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,og=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,ag=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function ao(i){const[,t,e,n,s,r,o,a]=i;return[Cs(t,s,n,e,r,o,a),ot.utcInstance]}function lg(i){const[,t,e,n,s,r,o,a]=i;return[Cs(t,a,e,n,s,r,o),ot.utcInstance]}const cg=Ee(jf,Ds),hg=Ee(Uf,Ds),ug=Ee(Yf,Ds),dg=Ee(nl),rl=Ae(Jf,Re,gi,mi),fg=Ae(Zf,Re,gi,mi),gg=Ae(qf,Re,gi,mi),mg=Ae(Re,gi,mi);function pg(i){return Pe(i,[cg,rl],[hg,fg],[ug,gg],[dg,mg])}function yg(i){return Pe(sg(i),[ig,ng])}function bg(i){return Pe(i,[rg,ao],[og,ao],[ag,lg])}function xg(i){return Pe(i,[Qf,tg])}const _g=Ae(Re);function vg(i){return Pe(i,[Kf,_g])}const wg=Ee(Xf,Gf),kg=Ee(sl),Sg=Ae(Re,gi,mi);function Mg(i){return Pe(i,[wg,rl],[kg,Sg])}const lo="Invalid Duration",ol={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Og={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...ol},gt=146097/400,me=146097/4800,Tg={years:{quarters:4,months:12,weeks:gt/7,days:gt,hours:gt*24,minutes:gt*24*60,seconds:gt*24*60*60,milliseconds:gt*24*60*60*1e3},quarters:{months:3,weeks:gt/28,days:gt/4,hours:gt*24/4,minutes:gt*24*60/4,seconds:gt*24*60*60/4,milliseconds:gt*24*60*60*1e3/4},months:{weeks:me/7,days:me,hours:me*24,minutes:me*24*60,seconds:me*24*60*60,milliseconds:me*24*60*60*1e3},...ol},se=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Dg=se.slice(0).reverse();function Nt(i,t,e=!1){const n={values:e?t.values:{...i.values,...t.values||{}},loc:i.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||i.conversionAccuracy,matrix:t.matrix||i.matrix};return new L(n)}function al(i,t){let e=t.milliseconds??0;for(const n of Dg.slice(1))t[n]&&(e+=t[n]*i[n].milliseconds);return e}function co(i,t){const e=al(i,t)<0?-1:1;se.reduceRight((n,s)=>{if(C(t[s]))return n;if(n){const r=t[n]*e,o=i[s][n],a=Math.floor(r/o);t[s]+=a*e,t[n]-=a*o*e}return s},null),se.reduce((n,s)=>{if(C(t[s]))return n;if(n){const r=t[n]%1;t[n]-=r,t[s]+=r*i[n][s]}return s},null)}function Cg(i){const t={};for(const[e,n]of Object.entries(i))n!==0&&(t[e]=n);return t}class L{constructor(t){const e=t.conversionAccuracy==="longterm"||!1;let n=e?Tg:Og;t.matrix&&(n=t.matrix),this.values=t.values,this.loc=t.loc||W.create(),this.conversionAccuracy=e?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(t,e){return L.fromObject({milliseconds:t},e)}static fromObject(t,e={}){if(t==null||typeof t!="object")throw new nt(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new L({values:hn(t,L.normalizeUnit),loc:W.fromObject(e),conversionAccuracy:e.conversionAccuracy,matrix:e.matrix})}static fromDurationLike(t){if(Yt(t))return L.fromMillis(t);if(L.isDuration(t))return t;if(typeof t=="object")return L.fromObject(t);throw new nt(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,e){const[n]=xg(t);return n?L.fromObject(n,e):L.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,e){const[n]=vg(t);return n?L.fromObject(n,e):L.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,e=null){if(!t)throw new nt("need to specify a reason the Duration is invalid");const n=t instanceof wt?t:new wt(t,e);if(Z.throwOnInvalid)throw new Kd(n);return new L({invalid:n})}static normalizeUnit(t){const e={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!e)throw new ya(t);return e}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,e={}){const n={...e,floor:e.round!==!1&&e.floor!==!1};return this.isValid?st.create(this.loc,n).formatDurationFromString(this,t):lo}toHuman(t={}){if(!this.isValid)return lo;const e=se.map(n=>{const s=this.values[n];return C(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:n.slice(0,-1)}).format(s)}).filter(n=>n);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(e)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=Os(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const e=this.toMillis();return e<0||e>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},T.fromMillis(e,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?al(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const e=L.fromDurationLike(t),n={};for(const s of se)(Ce(e.values,s)||Ce(this.values,s))&&(n[s]=e.get(s)+this.get(s));return Nt(this,{values:n},!0)}minus(t){if(!this.isValid)return this;const e=L.fromDurationLike(t);return this.plus(e.negate())}mapUnits(t){if(!this.isValid)return this;const e={};for(const n of Object.keys(this.values))e[n]=Ya(t(this.values[n],n));return Nt(this,{values:e},!0)}get(t){return this[L.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const e={...this.values,...hn(t,L.normalizeUnit)};return Nt(this,{values:e})}reconfigure({locale:t,numberingSystem:e,conversionAccuracy:n,matrix:s}={}){const o={loc:this.loc.clone({locale:t,numberingSystem:e}),matrix:s,conversionAccuracy:n};return Nt(this,o)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return co(this.matrix,t),Nt(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=Cg(this.normalize().shiftToAll().toObject());return Nt(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(o=>L.normalizeUnit(o));const e={},n={},s=this.toObject();let r;for(const o of se)if(t.indexOf(o)>=0){r=o;let a=0;for(const c in n)a+=this.matrix[c][o]*n[c],n[c]=0;Yt(s[o])&&(a+=s[o]);const l=Math.trunc(a);e[o]=l,n[o]=(a*1e3-l*1e3)/1e3}else Yt(s[o])&&(n[o]=s[o]);for(const o in n)n[o]!==0&&(e[r]+=o===r?n[o]:n[o]/this.matrix[r][o]);return co(this.matrix,e),Nt(this,{values:e},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const e of Object.keys(this.values))t[e]=this.values[e]===0?0:-this.values[e];return Nt(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function e(n,s){return n===void 0||n===0?s===void 0||s===0:n===s}for(const n of se)if(!e(this.values[n],t.values[n]))return!1;return!0}}const pe="Invalid Interval";function Ig(i,t){return!i||!i.isValid?Y.invalid("missing or invalid start"):!t||!t.isValid?Y.invalid("missing or invalid end"):t<i?Y.invalid("end before start",`The end of an interval must be after its start, but you had start=${i.toISO()} and end=${t.toISO()}`):null}class Y{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,e=null){if(!t)throw new nt("need to specify a reason the Interval is invalid");const n=t instanceof wt?t:new wt(t,e);if(Z.throwOnInvalid)throw new Jd(n);return new Y({invalid:n})}static fromDateTimes(t,e){const n=Be(t),s=Be(e),r=Ig(n,s);return r??new Y({start:n,end:s})}static after(t,e){const n=L.fromDurationLike(e),s=Be(t);return Y.fromDateTimes(s,s.plus(n))}static before(t,e){const n=L.fromDurationLike(e),s=Be(t);return Y.fromDateTimes(s.minus(n),s)}static fromISO(t,e){const[n,s]=(t||"").split("/",2);if(n&&s){let r,o;try{r=T.fromISO(n,e),o=r.isValid}catch{o=!1}let a,l;try{a=T.fromISO(s,e),l=a.isValid}catch{l=!1}if(o&&l)return Y.fromDateTimes(r,a);if(o){const c=L.fromISO(s,e);if(c.isValid)return Y.after(r,c)}else if(l){const c=L.fromISO(n,e);if(c.isValid)return Y.before(a,c)}}return Y.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",e){if(!this.isValid)return NaN;const n=this.start.startOf(t,e);let s;return e!=null&&e.useLocaleWeeks?s=this.end.reconfigure({locale:n.locale}):s=this.end,s=s.startOf(t,e),Math.floor(s.diff(n,t).get(t))+(s.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:e}={}){return this.isValid?Y.fromDateTimes(t||this.s,e||this.e):this}splitAt(...t){if(!this.isValid)return[];const e=t.map(Be).filter(o=>this.contains(o)).sort((o,a)=>o.toMillis()-a.toMillis()),n=[];let{s}=this,r=0;for(;s<this.e;){const o=e[r]||this.e,a=+o>+this.e?this.e:o;n.push(Y.fromDateTimes(s,a)),s=a,r+=1}return n}splitBy(t){const e=L.fromDurationLike(t);if(!this.isValid||!e.isValid||e.as("milliseconds")===0)return[];let{s:n}=this,s=1,r;const o=[];for(;n<this.e;){const a=this.start.plus(e.mapUnits(l=>l*s));r=+a>+this.e?this.e:a,o.push(Y.fromDateTimes(n,r)),n=r,s+=1}return o}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const e=this.s>t.s?this.s:t.s,n=this.e<t.e?this.e:t.e;return e>=n?null:Y.fromDateTimes(e,n)}union(t){if(!this.isValid)return this;const e=this.s<t.s?this.s:t.s,n=this.e>t.e?this.e:t.e;return Y.fromDateTimes(e,n)}static merge(t){const[e,n]=t.sort((s,r)=>s.s-r.s).reduce(([s,r],o)=>r?r.overlaps(o)||r.abutsStart(o)?[s,r.union(o)]:[s.concat([r]),o]:[s,o],[[],null]);return n&&e.push(n),e}static xor(t){let e=null,n=0;const s=[],r=t.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),o=Array.prototype.concat(...r),a=o.sort((l,c)=>l.time-c.time);for(const l of a)n+=l.type==="s"?1:-1,n===1?e=l.time:(e&&+e!=+l.time&&s.push(Y.fromDateTimes(e,l.time)),e=null);return Y.merge(s)}difference(...t){return Y.xor([this].concat(t)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()}${this.e.toISO()})`:pe}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=an,e={}){return this.isValid?st.create(this.s.loc.clone(e),t).formatInterval(this):pe}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:pe}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:pe}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:pe}toFormat(t,{separator:e=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${e}${this.e.toFormat(t)}`:pe}toDuration(t,e){return this.isValid?this.e.diff(this.s,t,e):L.invalid(this.invalidReason)}mapEndpoints(t){return Y.fromDateTimes(t(this.s),t(this.e))}}class Pi{static hasDST(t=Z.defaultZone){const e=T.now().setZone(t).set({month:12});return!t.isUniversal&&e.offset!==e.set({month:6}).offset}static isValidIANAZone(t){return Lt.isValidZone(t)}static normalizeZone(t){return Ht(t,Z.defaultZone)}static getStartOfWeek({locale:t=null,locObj:e=null}={}){return(e||W.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:e=null}={}){return(e||W.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:e=null}={}){return(e||W.create(t)).getWeekendDays().slice()}static months(t="long",{locale:e=null,numberingSystem:n=null,locObj:s=null,outputCalendar:r="gregory"}={}){return(s||W.create(e,n,r)).months(t)}static monthsFormat(t="long",{locale:e=null,numberingSystem:n=null,locObj:s=null,outputCalendar:r="gregory"}={}){return(s||W.create(e,n,r)).months(t,!0)}static weekdays(t="long",{locale:e=null,numberingSystem:n=null,locObj:s=null}={}){return(s||W.create(e,n,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:e=null,numberingSystem:n=null,locObj:s=null}={}){return(s||W.create(e,n,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return W.create(t).meridiems()}static eras(t="short",{locale:e=null}={}){return W.create(e,null,"gregory").eras(t)}static features(){return{relative:$a(),localeWeek:ja()}}}function ho(i,t){const e=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=e(t)-e(i);return Math.floor(L.fromMillis(n).as("days"))}function Eg(i,t,e){const n=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{const h=ho(l,c);return(h-h%7)/7}],["days",ho]],s={},r=i;let o,a;for(const[l,c]of n)e.indexOf(l)>=0&&(o=l,s[l]=c(i,t),a=r.plus(s),a>t?(s[l]--,i=r.plus(s),i>t&&(a=i,s[l]--,i=r.plus(s))):i=a);return[i,s,a,o]}function Ag(i,t,e,n){let[s,r,o,a]=Eg(i,t,e);const l=t-s,c=e.filter(u=>["hours","minutes","seconds","milliseconds"].indexOf(u)>=0);c.length===0&&(o<t&&(o=s.plus({[a]:1})),o!==s&&(r[a]=(r[a]||0)+l/(o-s)));const h=L.fromObject(r,n);return c.length>0?L.fromMillis(l,n).shiftTo(...c).plus(h):h}const Pg="missing Intl.DateTimeFormat.formatToParts support";function F(i,t=e=>e){return{regex:i,deser:([e])=>t(wf(e))}}const Rg=" ",ll=`[ ${Rg}]`,cl=new RegExp(ll,"g");function Lg(i){return i.replace(/\./g,"\\.?").replace(cl,ll)}function uo(i){return i.replace(/\./g,"").replace(cl," ").toLowerCase()}function vt(i,t){return i===null?null:{regex:RegExp(i.map(Lg).join("|")),deser:([e])=>i.findIndex(n=>uo(e)===uo(n))+t}}function fo(i,t){return{regex:i,deser:([,e,n])=>yn(e,n),groups:t}}function Ri(i){return{regex:i,deser:([t])=>t}}function Fg(i){return i.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Ng(i,t){const e=_t(t),n=_t(t,"{2}"),s=_t(t,"{3}"),r=_t(t,"{4}"),o=_t(t,"{6}"),a=_t(t,"{1,2}"),l=_t(t,"{1,3}"),c=_t(t,"{1,6}"),h=_t(t,"{1,9}"),u=_t(t,"{2,4}"),d=_t(t,"{4,6}"),f=p=>({regex:RegExp(Fg(p.val)),deser:([y])=>y,literal:!0}),m=(p=>{if(i.literal)return f(p);switch(p.val){case"G":return vt(t.eras("short"),0);case"GG":return vt(t.eras("long"),0);case"y":return F(c);case"yy":return F(u,ns);case"yyyy":return F(r);case"yyyyy":return F(d);case"yyyyyy":return F(o);case"M":return F(a);case"MM":return F(n);case"MMM":return vt(t.months("short",!0),1);case"MMMM":return vt(t.months("long",!0),1);case"L":return F(a);case"LL":return F(n);case"LLL":return vt(t.months("short",!1),1);case"LLLL":return vt(t.months("long",!1),1);case"d":return F(a);case"dd":return F(n);case"o":return F(l);case"ooo":return F(s);case"HH":return F(n);case"H":return F(a);case"hh":return F(n);case"h":return F(a);case"mm":return F(n);case"m":return F(a);case"q":return F(a);case"qq":return F(n);case"s":return F(a);case"ss":return F(n);case"S":return F(l);case"SSS":return F(s);case"u":return Ri(h);case"uu":return Ri(a);case"uuu":return F(e);case"a":return vt(t.meridiems(),0);case"kkkk":return F(r);case"kk":return F(u,ns);case"W":return F(a);case"WW":return F(n);case"E":case"c":return F(e);case"EEE":return vt(t.weekdays("short",!1),1);case"EEEE":return vt(t.weekdays("long",!1),1);case"ccc":return vt(t.weekdays("short",!0),1);case"cccc":return vt(t.weekdays("long",!0),1);case"Z":case"ZZ":return fo(new RegExp(`([+-]${a.source})(?::(${n.source}))?`),2);case"ZZZ":return fo(new RegExp(`([+-]${a.source})(${n.source})?`),2);case"z":return Ri(/[a-z_+-/]{1,256}?/i);case" ":return Ri(/[^\S\n\r]/);default:return f(p)}})(i)||{invalidReason:Pg};return m.token=i,m}const Wg={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function zg(i,t,e){const{type:n,value:s}=i;if(n==="literal"){const l=/^\s+$/.test(s);return{literal:!l,val:l?" ":s}}const r=t[n];let o=n;n==="hour"&&(t.hour12!=null?o=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?o="hour12":o="hour24":o=e.hour12?"hour12":"hour24");let a=Wg[o];if(typeof a=="object"&&(a=a[r]),a)return{literal:!1,val:a}}function Vg(i){return[`^${i.map(e=>e.regex).reduce((e,n)=>`${e}(${n.source})`,"")}$`,i]}function Hg(i,t,e){const n=i.match(t);if(n){const s={};let r=1;for(const o in e)if(Ce(e,o)){const a=e[o],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(s[a.token.val[0]]=a.deser(n.slice(r,r+l))),r+=l}return[n,s]}else return[n,{}]}function Bg(i){const t=r=>{switch(r){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let e=null,n;return C(i.z)||(e=Lt.create(i.z)),C(i.Z)||(e||(e=new ot(i.Z)),n=i.Z),C(i.q)||(i.M=(i.q-1)*3+1),C(i.h)||(i.h<12&&i.a===1?i.h+=12:i.h===12&&i.a===0&&(i.h=0)),i.G===0&&i.y&&(i.y=-i.y),C(i.u)||(i.S=Ms(i.u)),[Object.keys(i).reduce((r,o)=>{const a=t(o);return a&&(r[a]=i[o]),r},{}),e,n]}let Pn=null;function $g(){return Pn||(Pn=T.fromMillis(1555555555555)),Pn}function jg(i,t){if(i.literal)return i;const e=st.macroTokenToFormatOpts(i.val),n=fl(e,t);return n==null||n.includes(void 0)?i:n}function hl(i,t){return Array.prototype.concat(...i.map(e=>jg(e,t)))}class ul{constructor(t,e){if(this.locale=t,this.format=e,this.tokens=hl(st.parseFormat(e),t),this.units=this.tokens.map(n=>Ng(n,t)),this.disqualifyingUnit=this.units.find(n=>n.invalidReason),!this.disqualifyingUnit){const[n,s]=Vg(this.units);this.regex=RegExp(n,"i"),this.handlers=s}}explainFromTokens(t){if(this.isValid){const[e,n]=Hg(t,this.regex,this.handlers),[s,r,o]=n?Bg(n):[null,null,void 0];if(Ce(n,"a")&&Ce(n,"H"))throw new _e("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:e,matches:n,result:s,zone:r,specificOffset:o}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function dl(i,t,e){return new ul(i,e).explainFromTokens(t)}function Ug(i,t,e){const{result:n,zone:s,specificOffset:r,invalidReason:o}=dl(i,t,e);return[n,s,r,o]}function fl(i,t){if(!i)return null;const n=st.create(t,i).dtFormatter($g()),s=n.formatToParts(),r=n.resolvedOptions();return s.map(o=>zg(o,i,r))}const Rn="Invalid DateTime",go=864e13;function Xe(i){return new wt("unsupported zone",`the zone "${i.name}" is not supported`)}function Ln(i){return i.weekData===null&&(i.weekData=ln(i.c)),i.weekData}function Fn(i){return i.localWeekData===null&&(i.localWeekData=ln(i.c,i.loc.getMinDaysInFirstWeek(),i.loc.getStartOfWeek())),i.localWeekData}function te(i,t){const e={ts:i.ts,zone:i.zone,c:i.c,o:i.o,loc:i.loc,invalid:i.invalid};return new T({...e,...t,old:e})}function gl(i,t,e){let n=i-t*60*1e3;const s=e.offset(n);if(t===s)return[n,t];n-=(s-t)*60*1e3;const r=e.offset(n);return s===r?[n,s]:[i-Math.min(s,r)*60*1e3,Math.max(s,r)]}function Li(i,t){i+=t*60*1e3;const e=new Date(i);return{year:e.getUTCFullYear(),month:e.getUTCMonth()+1,day:e.getUTCDate(),hour:e.getUTCHours(),minute:e.getUTCMinutes(),second:e.getUTCSeconds(),millisecond:e.getUTCMilliseconds()}}function qi(i,t,e){return gl(pn(i),t,e)}function mo(i,t){const e=i.o,n=i.c.year+Math.trunc(t.years),s=i.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,r={...i.c,year:n,month:s,day:Math.min(i.c.day,cn(n,s))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},o=L.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=pn(r);let[l,c]=gl(a,e,i.zone);return o!==0&&(l+=o,c=i.zone.offset(l)),{ts:l,o:c}}function ye(i,t,e,n,s,r){const{setZone:o,zone:a}=e;if(i&&Object.keys(i).length!==0||t){const l=t||a,c=T.fromObject(i,{...e,zone:l,specificOffset:r});return o?c:c.setZone(a)}else return T.invalid(new wt("unparsable",`the input "${s}" can't be parsed as ${n}`))}function Fi(i,t,e=!0){return i.isValid?st.create(W.create("en-US"),{allowZ:e,forceSimple:!0}).formatDateTimeFromString(i,t):null}function Nn(i,t){const e=i.c.year>9999||i.c.year<0;let n="";return e&&i.c.year>=0&&(n+="+"),n+=G(i.c.year,e?6:4),t?(n+="-",n+=G(i.c.month),n+="-",n+=G(i.c.day)):(n+=G(i.c.month),n+=G(i.c.day)),n}function po(i,t,e,n,s,r){let o=G(i.c.hour);return t?(o+=":",o+=G(i.c.minute),(i.c.millisecond!==0||i.c.second!==0||!e)&&(o+=":")):o+=G(i.c.minute),(i.c.millisecond!==0||i.c.second!==0||!e)&&(o+=G(i.c.second),(i.c.millisecond!==0||!n)&&(o+=".",o+=G(i.c.millisecond,3))),s&&(i.isOffsetFixed&&i.offset===0&&!r?o+="Z":i.o<0?(o+="-",o+=G(Math.trunc(-i.o/60)),o+=":",o+=G(Math.trunc(-i.o%60))):(o+="+",o+=G(Math.trunc(i.o/60)),o+=":",o+=G(Math.trunc(i.o%60)))),r&&(o+="["+i.zone.ianaName+"]"),o}const ml={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Yg={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Zg={ordinal:1,hour:0,minute:0,second:0,millisecond:0},pl=["year","month","day","hour","minute","second","millisecond"],qg=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Xg=["year","ordinal","hour","minute","second","millisecond"];function Gg(i){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[i.toLowerCase()];if(!t)throw new ya(i);return t}function yo(i){switch(i.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Gg(i)}}function Jg(i){return Gi[i]||(Xi===void 0&&(Xi=Z.now()),Gi[i]=i.offset(Xi)),Gi[i]}function bo(i,t){const e=Ht(t.zone,Z.defaultZone);if(!e.isValid)return T.invalid(Xe(e));const n=W.fromObject(t);let s,r;if(C(i.year))s=Z.now();else{for(const l of pl)C(i[l])&&(i[l]=ml[l]);const o=Ha(i)||Ba(i);if(o)return T.invalid(o);const a=Jg(e);[s,r]=qi(i,a,e)}return new T({ts:s,zone:e,loc:n,o:r})}function xo(i,t,e){const n=C(e.round)?!0:e.round,s=(o,a)=>(o=Os(o,n||e.calendary?0:2,!0),t.loc.clone(e).relFormatter(e).format(o,a)),r=o=>e.calendary?t.hasSame(i,o)?0:t.startOf(o).diff(i.startOf(o),o).get(o):t.diff(i,o).get(o);if(e.unit)return s(r(e.unit),e.unit);for(const o of e.units){const a=r(o);if(Math.abs(a)>=1)return s(a,o)}return s(i>t?-0:0,e.units[e.units.length-1])}function _o(i){let t={},e;return i.length>0&&typeof i[i.length-1]=="object"?(t=i[i.length-1],e=Array.from(i).slice(0,i.length-1)):e=Array.from(i),[t,e]}let Xi,Gi={};class T{constructor(t){const e=t.zone||Z.defaultZone;let n=t.invalid||(Number.isNaN(t.ts)?new wt("invalid input"):null)||(e.isValid?null:Xe(e));this.ts=C(t.ts)?Z.now():t.ts;let s=null,r=null;if(!n)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(e))[s,r]=[t.old.c,t.old.o];else{const a=Yt(t.o)&&!t.old?t.o:e.offset(this.ts);s=Li(this.ts,a),n=Number.isNaN(s.year)?new wt("invalid input"):null,s=n?null:s,r=n?null:a}this._zone=e,this.loc=t.loc||W.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=s,this.o=r,this.isLuxonDateTime=!0}static now(){return new T({})}static local(){const[t,e]=_o(arguments),[n,s,r,o,a,l,c]=e;return bo({year:n,month:s,day:r,hour:o,minute:a,second:l,millisecond:c},t)}static utc(){const[t,e]=_o(arguments),[n,s,r,o,a,l,c]=e;return t.zone=ot.utcInstance,bo({year:n,month:s,day:r,hour:o,minute:a,second:l,millisecond:c},t)}static fromJSDate(t,e={}){const n=Tf(t)?t.valueOf():NaN;if(Number.isNaN(n))return T.invalid("invalid input");const s=Ht(e.zone,Z.defaultZone);return s.isValid?new T({ts:n,zone:s,loc:W.fromObject(e)}):T.invalid(Xe(s))}static fromMillis(t,e={}){if(Yt(t))return t<-go||t>go?T.invalid("Timestamp out of range"):new T({ts:t,zone:Ht(e.zone,Z.defaultZone),loc:W.fromObject(e)});throw new nt(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,e={}){if(Yt(t))return new T({ts:t*1e3,zone:Ht(e.zone,Z.defaultZone),loc:W.fromObject(e)});throw new nt("fromSeconds requires a numerical input")}static fromObject(t,e={}){t=t||{};const n=Ht(e.zone,Z.defaultZone);if(!n.isValid)return T.invalid(Xe(n));const s=W.fromObject(e),r=hn(t,yo),{minDaysInFirstWeek:o,startOfWeek:a}=no(r,s),l=Z.now(),c=C(e.specificOffset)?n.offset(l):e.specificOffset,h=!C(r.ordinal),u=!C(r.year),d=!C(r.month)||!C(r.day),f=u||d,g=r.weekYear||r.weekNumber;if((f||h)&&g)throw new _e("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&h)throw new _e("Can't mix ordinal dates with month/day");const m=g||r.weekday&&!f;let p,y,b=Li(l,c);m?(p=qg,y=Yg,b=ln(b,o,a)):h?(p=Xg,y=Zg,b=An(b)):(p=pl,y=ml);let _=!1;for(const I of p){const E=r[I];C(E)?_?r[I]=y[I]:r[I]=b[I]:_=!0}const v=m?Sf(r,o,a):h?Mf(r):Ha(r),x=v||Ba(r);if(x)return T.invalid(x);const S=m?eo(r,o,a):h?io(r):r,[M,k]=qi(S,c,n),D=new T({ts:M,zone:n,o:k,loc:s});return r.weekday&&f&&t.weekday!==D.weekday?T.invalid("mismatched weekday",`you can't specify both a weekday of ${r.weekday} and a date of ${D.toISO()}`):D.isValid?D:T.invalid(D.invalid)}static fromISO(t,e={}){const[n,s]=pg(t);return ye(n,s,e,"ISO 8601",t)}static fromRFC2822(t,e={}){const[n,s]=yg(t);return ye(n,s,e,"RFC 2822",t)}static fromHTTP(t,e={}){const[n,s]=bg(t);return ye(n,s,e,"HTTP",e)}static fromFormat(t,e,n={}){if(C(t)||C(e))throw new nt("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:r=null}=n,o=W.fromOpts({locale:s,numberingSystem:r,defaultToEN:!0}),[a,l,c,h]=Ug(o,t,e);return h?T.invalid(h):ye(a,l,n,`format ${e}`,t,c)}static fromString(t,e,n={}){return T.fromFormat(t,e,n)}static fromSQL(t,e={}){const[n,s]=Mg(t);return ye(n,s,e,"SQL",t)}static invalid(t,e=null){if(!t)throw new nt("need to specify a reason the DateTime is invalid");const n=t instanceof wt?t:new wt(t,e);if(Z.throwOnInvalid)throw new Gd(n);return new T({invalid:n})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,e={}){const n=fl(t,W.fromObject(e));return n?n.map(s=>s?s.val:null).join(""):null}static expandFormat(t,e={}){return hl(st.parseFormat(t),W.fromObject(e)).map(s=>s.val).join("")}static resetCache(){Xi=void 0,Gi={}}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Ln(this).weekYear:NaN}get weekNumber(){return this.isValid?Ln(this).weekNumber:NaN}get weekday(){return this.isValid?Ln(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Fn(this).weekday:NaN}get localWeekNumber(){return this.isValid?Fn(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Fn(this).weekYear:NaN}get ordinal(){return this.isValid?An(this.c).ordinal:NaN}get monthShort(){return this.isValid?Pi.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Pi.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Pi.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Pi.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,e=6e4,n=pn(this.c),s=this.zone.offset(n-t),r=this.zone.offset(n+t),o=this.zone.offset(n-s*e),a=this.zone.offset(n-r*e);if(o===a)return[this];const l=n-o*e,c=n-a*e,h=Li(l,o),u=Li(c,a);return h.hour===u.hour&&h.minute===u.minute&&h.second===u.second&&h.millisecond===u.millisecond?[te(this,{ts:l}),te(this,{ts:c})]:[this]}get isInLeapYear(){return fi(this.year)}get daysInMonth(){return cn(this.year,this.month)}get daysInYear(){return this.isValid?ke(this.year):NaN}get weeksInWeekYear(){return this.isValid?ci(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?ci(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:e,numberingSystem:n,calendar:s}=st.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:e,numberingSystem:n,outputCalendar:s}}toUTC(t=0,e={}){return this.setZone(ot.instance(t),e)}toLocal(){return this.setZone(Z.defaultZone)}setZone(t,{keepLocalTime:e=!1,keepCalendarTime:n=!1}={}){if(t=Ht(t,Z.defaultZone),t.equals(this.zone))return this;if(t.isValid){let s=this.ts;if(e||n){const r=t.offset(this.ts),o=this.toObject();[s]=qi(o,r,t)}return te(this,{ts:s,zone:t})}else return T.invalid(Xe(t))}reconfigure({locale:t,numberingSystem:e,outputCalendar:n}={}){const s=this.loc.clone({locale:t,numberingSystem:e,outputCalendar:n});return te(this,{loc:s})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const e=hn(t,yo),{minDaysInFirstWeek:n,startOfWeek:s}=no(e,this.loc),r=!C(e.weekYear)||!C(e.weekNumber)||!C(e.weekday),o=!C(e.ordinal),a=!C(e.year),l=!C(e.month)||!C(e.day),c=a||l,h=e.weekYear||e.weekNumber;if((c||o)&&h)throw new _e("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&o)throw new _e("Can't mix ordinal dates with month/day");let u;r?u=eo({...ln(this.c,n,s),...e},n,s):C(e.ordinal)?(u={...this.toObject(),...e},C(e.day)&&(u.day=Math.min(cn(u.year,u.month),u.day))):u=io({...An(this.c),...e});const[d,f]=qi(u,this.o,this.zone);return te(this,{ts:d,o:f})}plus(t){if(!this.isValid)return this;const e=L.fromDurationLike(t);return te(this,mo(this,e))}minus(t){if(!this.isValid)return this;const e=L.fromDurationLike(t).negate();return te(this,mo(this,e))}startOf(t,{useLocaleWeeks:e=!1}={}){if(!this.isValid)return this;const n={},s=L.normalizeUnit(t);switch(s){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break}if(s==="weeks")if(e){const r=this.loc.getStartOfWeek(),{weekday:o}=this;o<r&&(n.weekNumber=this.weekNumber-1),n.weekday=r}else n.weekday=1;if(s==="quarters"){const r=Math.ceil(this.month/3);n.month=(r-1)*3+1}return this.set(n)}endOf(t,e){return this.isValid?this.plus({[t]:1}).startOf(t,e).minus(1):this}toFormat(t,e={}){return this.isValid?st.create(this.loc.redefaultToEN(e)).formatDateTimeFromString(this,t):Rn}toLocaleString(t=an,e={}){return this.isValid?st.create(this.loc.clone(e),t).formatDateTime(this):Rn}toLocaleParts(t={}){return this.isValid?st.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:e=!1,suppressMilliseconds:n=!1,includeOffset:s=!0,extendedZone:r=!1}={}){if(!this.isValid)return null;const o=t==="extended";let a=Nn(this,o);return a+="T",a+=po(this,o,e,n,s,r),a}toISODate({format:t="extended"}={}){return this.isValid?Nn(this,t==="extended"):null}toISOWeekDate(){return Fi(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:e=!1,includeOffset:n=!0,includePrefix:s=!1,extendedZone:r=!1,format:o="extended"}={}){return this.isValid?(s?"T":"")+po(this,o==="extended",e,t,n,r):null}toRFC2822(){return Fi(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Fi(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Nn(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:e=!1,includeOffsetSpace:n=!0}={}){let s="HH:mm:ss.SSS";return(e||t)&&(n&&(s+=" "),e?s+="z":t&&(s+="ZZ")),Fi(this,s,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():Rn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const e={...this.c};return t.includeConfig&&(e.outputCalendar=this.outputCalendar,e.numberingSystem=this.loc.numberingSystem,e.locale=this.loc.locale),e}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,e="milliseconds",n={}){if(!this.isValid||!t.isValid)return L.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...n},r=Df(e).map(L.normalizeUnit),o=t.valueOf()>this.valueOf(),a=o?this:t,l=o?t:this,c=Ag(a,l,r,s);return o?c.negate():c}diffNow(t="milliseconds",e={}){return this.diff(T.now(),t,e)}until(t){return this.isValid?Y.fromDateTimes(this,t):this}hasSame(t,e,n){if(!this.isValid)return!1;const s=t.valueOf(),r=this.setZone(t.zone,{keepLocalTime:!0});return r.startOf(e,n)<=s&&s<=r.endOf(e,n)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const e=t.base||T.fromObject({},{zone:this.zone}),n=t.padding?this<e?-t.padding:t.padding:0;let s=["years","months","days","hours","minutes","seconds"],r=t.unit;return Array.isArray(t.unit)&&(s=t.unit,r=void 0),xo(e,this.plus(n),{...t,numeric:"always",units:s,unit:r})}toRelativeCalendar(t={}){return this.isValid?xo(t.base||T.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(T.isDateTime))throw new nt("min requires all arguments be DateTimes");return so(t,e=>e.valueOf(),Math.min)}static max(...t){if(!t.every(T.isDateTime))throw new nt("max requires all arguments be DateTimes");return so(t,e=>e.valueOf(),Math.max)}static fromFormatExplain(t,e,n={}){const{locale:s=null,numberingSystem:r=null}=n,o=W.fromOpts({locale:s,numberingSystem:r,defaultToEN:!0});return dl(o,t,e)}static fromStringExplain(t,e,n={}){return T.fromFormatExplain(t,e,n)}static buildFormatParser(t,e={}){const{locale:n=null,numberingSystem:s=null}=e,r=W.fromOpts({locale:n,numberingSystem:s,defaultToEN:!0});return new ul(r,t)}static fromFormatParser(t,e,n={}){if(C(t)||C(e))throw new nt("fromFormatParser requires an input string and a format parser");const{locale:s=null,numberingSystem:r=null}=n,o=W.fromOpts({locale:s,numberingSystem:r,defaultToEN:!0});if(!o.equals(e.locale))throw new nt(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${e.locale}`);const{result:a,zone:l,specificOffset:c,invalidReason:h}=e.explainFromTokens(t);return h?T.invalid(h):ye(a,l,n,`format ${e.format}`,t,c)}static get DATE_SHORT(){return an}static get DATE_MED(){return ba}static get DATE_MED_WITH_WEEKDAY(){return Qd}static get DATE_FULL(){return xa}static get DATE_HUGE(){return _a}static get TIME_SIMPLE(){return va}static get TIME_WITH_SECONDS(){return wa}static get TIME_WITH_SHORT_OFFSET(){return ka}static get TIME_WITH_LONG_OFFSET(){return Sa}static get TIME_24_SIMPLE(){return Ma}static get TIME_24_WITH_SECONDS(){return Oa}static get TIME_24_WITH_SHORT_OFFSET(){return Ta}static get TIME_24_WITH_LONG_OFFSET(){return Da}static get DATETIME_SHORT(){return Ca}static get DATETIME_SHORT_WITH_SECONDS(){return Ia}static get DATETIME_MED(){return Ea}static get DATETIME_MED_WITH_SECONDS(){return Aa}static get DATETIME_MED_WITH_WEEKDAY(){return tf}static get DATETIME_FULL(){return Pa}static get DATETIME_FULL_WITH_SECONDS(){return Ra}static get DATETIME_HUGE(){return La}static get DATETIME_HUGE_WITH_SECONDS(){return Fa}}function Be(i){if(T.isDateTime(i))return i;if(i&&i.valueOf&&Yt(i.valueOf()))return T.fromJSDate(i);if(i&&typeof i=="object")return T.fromObject(i);throw new nt(`Unknown datetime argument: ${i}, of type ${typeof i}`)}/*!
* chartjs-adapter-luxon v1.3.1
* https://www.chartjs.org
* (c) 2023 chartjs-adapter-luxon Contributors
* Released under the MIT license
*/const Kg={datetime:T.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:T.TIME_WITH_SECONDS,minute:T.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};Xo._date.override({_id:"luxon",_create:function(i){return T.fromMillis(i,this.options)},init(i){this.options.locale||(this.options.locale=i.locale)},formats:function(){return Kg},parse:function(i,t){const e=this.options,n=typeof i;return i===null||n==="undefined"?null:(n==="number"?i=this._create(i):n==="string"?typeof t=="string"?i=T.fromFormat(i,t,e):i=T.fromISO(i,e):i instanceof Date?i=T.fromJSDate(i,e):n==="object"&&!(i instanceof T)&&(i=T.fromObject(i,e)),i.isValid?i.valueOf():null)},format:function(i,t){const e=this._create(i);return typeof t=="string"?e.toFormat(t):e.toLocaleString(t)},add:function(i,t,e){const n={};return n[e]=t,this._create(i).plus(n).valueOf()},diff:function(i,t,e){return this._create(i).diff(this._create(t)).as(e).valueOf()},startOf:function(i,t,e){if(t==="isoWeek"){e=Math.trunc(Math.min(Math.max(0,e),6));const n=this._create(i);return n.minus({days:(n.weekday-e+7)%7}).startOf("day").valueOf()}return t?this._create(i).startOf(t).valueOf():i},endOf:function(i,t){return this._create(i).endOf(t).valueOf()}});/*!
* chartjs-plugin-datalabels v2.2.0
* https://chartjs-plugin-datalabels.netlify.app
* (c) 2017-2022 chartjs-plugin-datalabels contributors
* Released under the MIT license
*/var vo=function(){if(typeof window<"u"){if(window.devicePixelRatio)return window.devicePixelRatio;var i=window.screen;if(i)return(i.deviceXDPI||1)/(i.logicalXDPI||1)}return 1}(),ei={toTextLines:function(i){var t=[],e;for(i=[].concat(i);i.length;)e=i.pop(),typeof e=="string"?t.unshift.apply(t,e.split(`
`)):Array.isArray(e)?i.push.apply(i,e):H(i)||t.unshift(""+e);return t},textSize:function(i,t,e){var n=[].concat(t),s=n.length,r=i.font,o=0,a;for(i.font=e.string,a=0;a<s;++a)o=Math.max(i.measureText(n[a]).width,o);return i.font=r,{height:s*e.lineHeight,width:o}},bound:function(i,t,e){return Math.max(i,Math.min(t,e))},arrayDiff:function(i,t){var e=i.slice(),n=[],s,r,o,a;for(s=0,o=t.length;s<o;++s)a=t[s],r=e.indexOf(a),r===-1?n.push([a,1]):e.splice(r,1);for(s=0,o=e.length;s<o;++s)n.push([e[s],-1]);return n},rasterize:function(i){return Math.round(i*vo)/vo}};function Wn(i,t){var e=t.x,n=t.y;if(e===null)return{x:0,y:-1};if(n===null)return{x:1,y:0};var s=i.x-e,r=i.y-n,o=Math.sqrt(s*s+r*r);return{x:o?s/o:0,y:o?r/o:-1}}function Qg(i,t,e,n,s){switch(s){case"center":e=n=0;break;case"bottom":e=0,n=1;break;case"right":e=1,n=0;break;case"left":e=-1,n=0;break;case"top":e=0,n=-1;break;case"start":e=-e,n=-n;break;case"end":break;default:s*=Math.PI/180,e=Math.cos(s),n=Math.sin(s);break}return{x:i,y:t,vx:e,vy:n}}var tm=0,yl=1,bl=2,xl=4,_l=8;function Ni(i,t,e){var n=tm;return i<e.left?n|=yl:i>e.right&&(n|=bl),t<e.top?n|=_l:t>e.bottom&&(n|=xl),n}function em(i,t){for(var e=i.x0,n=i.y0,s=i.x1,r=i.y1,o=Ni(e,n,t),a=Ni(s,r,t),l,c,h;!(!(o|a)||o&a);)l=o||a,l&_l?(c=e+(s-e)*(t.top-n)/(r-n),h=t.top):l&xl?(c=e+(s-e)*(t.bottom-n)/(r-n),h=t.bottom):l&bl?(h=n+(r-n)*(t.right-e)/(s-e),c=t.right):l&yl&&(h=n+(r-n)*(t.left-e)/(s-e),c=t.left),l===o?(e=c,n=h,o=Ni(e,n,t)):(s=c,r=h,a=Ni(s,r,t));return{x0:e,x1:s,y0:n,y1:r}}function Wi(i,t){var e=t.anchor,n=i,s,r;return t.clamp&&(n=em(n,t.area)),e==="start"?(s=n.x0,r=n.y0):e==="end"?(s=n.x1,r=n.y1):(s=(n.x0+n.x1)/2,r=(n.y0+n.y1)/2),Qg(s,r,i.vx,i.vy,t.align)}var zi={arc:function(i,t){var e=(i.startAngle+i.endAngle)/2,n=Math.cos(e),s=Math.sin(e),r=i.innerRadius,o=i.outerRadius;return Wi({x0:i.x+n*r,y0:i.y+s*r,x1:i.x+n*o,y1:i.y+s*o,vx:n,vy:s},t)},point:function(i,t){var e=Wn(i,t.origin),n=e.x*i.options.radius,s=e.y*i.options.radius;return Wi({x0:i.x-n,y0:i.y-s,x1:i.x+n,y1:i.y+s,vx:e.x,vy:e.y},t)},bar:function(i,t){var e=Wn(i,t.origin),n=i.x,s=i.y,r=0,o=0;return i.horizontal?(n=Math.min(i.x,i.base),r=Math.abs(i.base-i.x)):(s=Math.min(i.y,i.base),o=Math.abs(i.base-i.y)),Wi({x0:n,y0:s+o,x1:n+r,y1:s,vx:e.x,vy:e.y},t)},fallback:function(i,t){var e=Wn(i,t.origin);return Wi({x0:i.x,y0:i.y,x1:i.x+(i.width||0),y1:i.y+(i.height||0),vx:e.x,vy:e.y},t)}},Rt=ei.rasterize;function im(i){var t=i.borderWidth||0,e=i.padding,n=i.size.height,s=i.size.width,r=-s/2,o=-n/2;return{frame:{x:r-e.left-t,y:o-e.top-t,w:s+e.width+t*2,h:n+e.height+t*2},text:{x:r,y:o,w:s,h:n}}}function nm(i,t){var e=t.chart.getDatasetMeta(t.datasetIndex).vScale;if(!e)return null;if(e.xCenter!==void 0&&e.yCenter!==void 0)return{x:e.xCenter,y:e.yCenter};var n=e.getBasePixel();return i.horizontal?{x:n,y:null}:{x:null,y:n}}function sm(i){return i instanceof Ye?zi.arc:i instanceof Ui?zi.point:i instanceof Yi?zi.bar:zi.fallback}function rm(i,t,e,n,s,r){var o=Math.PI/2;if(r){var a=Math.min(r,s/2,n/2),l=t+a,c=e+a,h=t+n-a,u=e+s-a;i.moveTo(t,c),l<h&&c<u?(i.arc(l,c,a,-Math.PI,-o),i.arc(h,c,a,-o,0),i.arc(h,u,a,0,o),i.arc(l,u,a,o,Math.PI)):l<h?(i.moveTo(l,e),i.arc(h,c,a,-o,o),i.arc(l,c,a,o,Math.PI+o)):c<u?(i.arc(l,c,a,-Math.PI,0),i.arc(l,u,a,0,Math.PI)):i.arc(l,c,a,-Math.PI,Math.PI),i.closePath(),i.moveTo(t,e)}else i.rect(t,e,n,s)}function om(i,t,e){var n=e.backgroundColor,s=e.borderColor,r=e.borderWidth;!n&&(!s||!r)||(i.beginPath(),rm(i,Rt(t.x)+r/2,Rt(t.y)+r/2,Rt(t.w)-r,Rt(t.h)-r,e.borderRadius),i.closePath(),n&&(i.fillStyle=n,i.fill()),s&&r&&(i.strokeStyle=s,i.lineWidth=r,i.lineJoin="miter",i.stroke()))}function am(i,t,e){var n=e.lineHeight,s=i.w,r=i.x,o=i.y+n/2;return t==="center"?r+=s/2:(t==="end"||t==="right")&&(r+=s),{h:n,w:s,x:r,y:o}}function lm(i,t,e){var n=i.shadowBlur,s=e.stroked,r=Rt(e.x),o=Rt(e.y),a=Rt(e.w);s&&i.strokeText(t,r,o,a),e.filled&&(n&&s&&(i.shadowBlur=0),i.fillText(t,r,o,a),n&&s&&(i.shadowBlur=n))}function cm(i,t,e,n){var s=n.textAlign,r=n.color,o=!!r,a=n.font,l=t.length,c=n.textStrokeColor,h=n.textStrokeWidth,u=c&&h,d;if(!(!l||!o&&!u))for(e=am(e,s,a),i.font=a.string,i.textAlign=s,i.textBaseline="middle",i.shadowBlur=n.textShadowBlur,i.shadowColor=n.textShadowColor,o&&(i.fillStyle=r),u&&(i.lineJoin="round",i.lineWidth=h,i.strokeStyle=c),d=0,l=t.length;d<l;++d)lm(i,t[d],{stroked:u,filled:o,w:e.w,x:e.x,y:e.y+e.h*d})}var vl=function(i,t,e,n){var s=this;s._config=i,s._index=n,s._model=null,s._rects=null,s._ctx=t,s._el=e};Ct(vl.prototype,{_modelize:function(i,t,e,n){var s=this,r=s._index,o=tt($([e.font,{}],n,r)),a=$([e.color,j.color],n,r);return{align:$([e.align,"center"],n,r),anchor:$([e.anchor,"center"],n,r),area:n.chart.chartArea,backgroundColor:$([e.backgroundColor,null],n,r),borderColor:$([e.borderColor,null],n,r),borderRadius:$([e.borderRadius,0],n,r),borderWidth:$([e.borderWidth,0],n,r),clamp:$([e.clamp,!1],n,r),clip:$([e.clip,!1],n,r),color:a,display:i,font:o,lines:t,offset:$([e.offset,4],n,r),opacity:$([e.opacity,1],n,r),origin:nm(s._el,n),padding:dt($([e.padding,4],n,r)),positioner:sm(s._el),rotation:$([e.rotation,0],n,r)*(Math.PI/180),size:ei.textSize(s._ctx,t,o),textAlign:$([e.textAlign,"start"],n,r),textShadowBlur:$([e.textShadowBlur,0],n,r),textShadowColor:$([e.textShadowColor,a],n,r),textStrokeColor:$([e.textStrokeColor,a],n,r),textStrokeWidth:$([e.textStrokeWidth,0],n,r)}},update:function(i){var t=this,e=null,n=null,s=t._index,r=t._config,o,a,l,c=$([r.display,!0],i,s);c&&(o=i.dataset.data[s],a=A(V(r.formatter,[o,i]),o),l=H(a)?[]:ei.toTextLines(a),l.length&&(e=t._modelize(c,l,r,i),n=im(e))),t._model=e,t._rects=n},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(i,t){var e=this,n=i.ctx,s=e._model,r=e._rects,o;this.visible()&&(n.save(),s.clip&&(o=s.area,n.beginPath(),n.rect(o.left,o.top,o.right-o.left,o.bottom-o.top),n.clip()),n.globalAlpha=ei.bound(0,s.opacity,1),n.translate(Rt(t.x),Rt(t.y)),n.rotate(s.rotation),om(n,r.frame,s),cm(n,s.lines,r.text,s),n.restore())}});var hm=Number.MIN_SAFE_INTEGER||-9007199254740991,um=Number.MAX_SAFE_INTEGER||9007199254740991;function $e(i,t,e){var n=Math.cos(e),s=Math.sin(e),r=t.x,o=t.y;return{x:r+n*(i.x-r)-s*(i.y-o),y:o+s*(i.x-r)+n*(i.y-o)}}function wo(i,t){var e=um,n=hm,s=t.origin,r,o,a,l,c;for(r=0;r<i.length;++r)o=i[r],a=o.x-s.x,l=o.y-s.y,c=t.vx*a+t.vy*l,e=Math.min(e,c),n=Math.max(n,c);return{min:e,max:n}}function Vi(i,t){var e=t.x-i.x,n=t.y-i.y,s=Math.sqrt(e*e+n*n);return{vx:(t.x-i.x)/s,vy:(t.y-i.y)/s,origin:i,ln:s}}var wl=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};Ct(wl.prototype,{center:function(){var i=this._rect;return{x:i.x+i.w/2,y:i.y+i.h/2}},update:function(i,t,e){this._rotation=e,this._rect={x:t.x+i.x,y:t.y+i.y,w:t.w,h:t.h}},contains:function(i){var t=this,e=1,n=t._rect;return i=$e(i,t.center(),-t._rotation),!(i.x<n.x-e||i.y<n.y-e||i.x>n.x+n.w+e*2||i.y>n.y+n.h+e*2)},intersects:function(i){var t=this._points(),e=i._points(),n=[Vi(t[0],t[1]),Vi(t[0],t[3])],s,r,o;for(this._rotation!==i._rotation&&n.push(Vi(e[0],e[1]),Vi(e[0],e[3])),s=0;s<n.length;++s)if(r=wo(t,n[s]),o=wo(e,n[s]),r.max<o.min||o.max<r.min)return!1;return!0},_points:function(){var i=this,t=i._rect,e=i._rotation,n=i.center();return[$e({x:t.x,y:t.y},n,e),$e({x:t.x+t.w,y:t.y},n,e),$e({x:t.x+t.w,y:t.y+t.h},n,e),$e({x:t.x,y:t.y+t.h},n,e)]}});function kl(i,t,e){var n=t.positioner(i,t),s=n.vx,r=n.vy;if(!s&&!r)return{x:n.x,y:n.y};var o=e.w,a=e.h,l=t.rotation,c=Math.abs(o/2*Math.cos(l))+Math.abs(a/2*Math.sin(l)),h=Math.abs(o/2*Math.sin(l))+Math.abs(a/2*Math.cos(l)),u=1/Math.max(Math.abs(s),Math.abs(r));return c*=s*u,h*=r*u,c+=t.offset*s,h+=t.offset*r,{x:n.x+c,y:n.y+h}}function dm(i,t){var e,n,s,r;for(e=i.length-1;e>=0;--e)for(s=i[e].$layout,n=e-1;n>=0&&s._visible;--n)r=i[n].$layout,r._visible&&s._box.intersects(r._box)&&t(s,r);return i}function fm(i){var t,e,n,s,r,o,a;for(t=0,e=i.length;t<e;++t)n=i[t],s=n.$layout,s._visible&&(a=new Proxy(n._el,{get:(l,c)=>l.getProps([c],!0)[c]}),r=n.geometry(),o=kl(a,n.model(),r),s._box.update(o,r,n.rotation()));return dm(i,function(l,c){var h=l._hidable,u=c._hidable;h&&u||u?c._visible=!1:h&&(l._visible=!1)})}var ii={prepare:function(i){var t=[],e,n,s,r,o;for(e=0,s=i.length;e<s;++e)for(n=0,r=i[e].length;n<r;++n)o=i[e][n],t.push(o),o.$layout={_box:new wl,_hidable:!1,_visible:!0,_set:e,_idx:o._index};return t.sort(function(a,l){var c=a.$layout,h=l.$layout;return c._idx===h._idx?h._set-c._set:h._idx-c._idx}),this.update(t),t},update:function(i){var t=!1,e,n,s,r,o;for(e=0,n=i.length;e<n;++e)s=i[e],r=s.model(),o=s.$layout,o._hidable=r&&r.display==="auto",o._visible=s.visible(),t|=o._hidable;t&&fm(i)},lookup:function(i,t){var e,n;for(e=i.length-1;e>=0;--e)if(n=i[e].$layout,n&&n._visible&&n._box.contains(t))return i[e];return null},draw:function(i,t){var e,n,s,r,o,a;for(e=0,n=t.length;e<n;++e)s=t[e],r=s.$layout,r._visible&&(o=s.geometry(),a=kl(s._el,s.model(),o),r._box.update(a,o,s.rotation()),s.draw(i,a))}},gm=function(i){if(H(i))return null;var t=i,e,n,s;if(R(i))if(!H(i.label))t=i.label;else if(!H(i.r))t=i.r;else for(t="",e=Object.keys(i),s=0,n=e.length;s<n;++s)t+=(s!==0?", ":"")+e[s]+": "+i[e[s]];return""+t},mm={align:"center",anchor:"center",backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,clamp:!1,clip:!1,color:void 0,display:!0,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},formatter:gm,labels:void 0,listeners:{},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,textShadowBlur:0,textShadowColor:void 0},lt="$datalabels",Sl="$default";function pm(i,t){var e=i.datalabels,n={},s=[],r,o;return e===!1?null:(e===!0&&(e={}),t=Ct({},[t,e]),r=t.labels||{},o=Object.keys(r),delete t.labels,o.length?o.forEach(function(a){r[a]&&s.push(Ct({},[t,r[a],{_key:a}]))}):s.push(t),n=s.reduce(function(a,l){return N(l.listeners||{},function(c,h){a[h]=a[h]||{},a[h][l._key||Sl]=c}),delete l.listeners,a},{}),{labels:s,listeners:n})}function ss(i,t,e,n){if(t){var s=e.$context,r=e.$groups,o;t[r._set]&&(o=t[r._set][r._key],o&&V(o,[s,n])===!0&&(i[lt]._dirty=!0,e.update(s)))}}function ym(i,t,e,n,s){var r,o;!e&&!n||(e?n?e!==n&&(o=r=!0):o=!0:r=!0,o&&ss(i,t.leave,e,s),r&&ss(i,t.enter,n,s))}function bm(i,t){var e=i[lt],n=e._listeners,s,r;if(!(!n.enter&&!n.leave)){if(t.type==="mousemove")r=ii.lookup(e._labels,t);else if(t.type!=="mouseout")return;s=e._hovered,e._hovered=r,ym(i,n,s,r,t)}}function xm(i,t){var e=i[lt],n=e._listeners.click,s=n&&ii.lookup(e._labels,t);s&&ss(i,n,s,t)}var Im={id:"datalabels",defaults:mm,beforeInit:function(i){i[lt]={_actives:[]}},beforeUpdate:function(i){var t=i[lt];t._listened=!1,t._listeners={},t._datasets=[],t._labels=[]},afterDatasetUpdate:function(i,t,e){var n=t.index,s=i[lt],r=s._datasets[n]=[],o=i.isDatasetVisible(n),a=i.data.datasets[n],l=pm(a,e),c=t.meta.data||[],h=i.ctx,u,d,f,g,m,p,y,b;for(h.save(),u=0,f=c.length;u<f;++u)if(y=c[u],y[lt]=[],o&&y&&i.getDataVisibility(u)&&!y.skip)for(d=0,g=l.labels.length;d<g;++d)m=l.labels[d],p=m._key,b=new vl(m,h,y,u),b.$groups={_set:n,_key:p||Sl},b.$context={active:!1,chart:i,dataIndex:u,dataset:a,datasetIndex:n},b.update(b.$context),y[lt].push(b),r.push(b);h.restore(),Ct(s._listeners,l.listeners,{merger:function(_,v,x){v[_]=v[_]||{},v[_][t.index]=x[_],s._listened=!0}})},afterUpdate:function(i){i[lt]._labels=ii.prepare(i[lt]._datasets)},afterDatasetsDraw:function(i){ii.draw(i,i[lt]._labels)},beforeEvent:function(i,t){if(i[lt]._listened){var e=t.event;switch(e.type){case"mousemove":case"mouseout":bm(i,e);break;case"click":xm(i,e);break}}},afterEvent:function(i){var t=i[lt],e=t._actives,n=t._actives=i.getActiveElements(),s=ei.arrayDiff(e,n),r,o,a,l,c,h,u;for(r=0,o=s.length;r<o;++r)if(c=s[r],c[1])for(u=c[0].element[lt]||[],a=0,l=u.length;a<l;++a)h=u[a],h.$context.active=c[1]===1,h.update(h.$context);(t._dirty||s.length)&&(ii.update(t._labels),i.render()),delete t._dirty}};const Em=Pl("record",()=>{async function i(){return(await Rl.get("/record/getMoodRatios")).data}return{getMoodRatios:i}});export{Ye as A,vs as C,Nr as L,Ui as P,on as T,Lr as a,$r as b,Di as c,Tm as d,Mm as e,Sm as f,Im as g,Dm as h,Cm as i,Om as p,Em as u};