@kong-ui-public/analytics-chart 4.2.20 → 4.2.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vitals-chart.es.js +2209 -2178
- package/dist/vitals-chart.umd.js +13 -13
- package/package.json +4 -4
package/dist/vitals-chart.umd.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
(function(at,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("vue"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/i18n"],h):(at=typeof globalThis<"u"?globalThis:at||self,h(at["kong-ui-publicvitals-chart"]={},at.Vue,at["kong-ui-public-i18n"]))})(this,function(at,h,kn){"use strict";var
|
|
1
|
+
(function(at,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("vue"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/i18n"],h):(at=typeof globalThis<"u"?globalThis:at||self,h(at["kong-ui-publicvitals-chart"]={},at.Vue,at["kong-ui-public-i18n"]))})(this,function(at,h,kn){"use strict";var kk=Object.defineProperty;var Ok=(at,h,kn)=>h in at?kk(at,h,{enumerable:!0,configurable:!0,writable:!0,value:kn}):at[h]=kn;var H=(at,h,kn)=>Ok(at,typeof h!="symbol"?h+"":h,kn);var Sn,cp;const Tp={noDataAvailableTitle:"No data in the current time frame",noDataAvailableDescription:"Once there is traffic, it will display here",limitedResultsShown:"Not all data is shown in the below report. Reports are currently limited to a maximum of {maxReturned} entities.",entityNoName:"no-name",debug:"debug",total:"Total",chartUnits:{ms:"ms",bytes:"Byte{plural}",count:"request{plural}","count/minute":"rpm",requests:"request{plural}","token count":"token{plural}"},csvExport:{noDataRange:"No data in selected range",noDataRetry:"Please adjust the time period and try again",timeRangeSelected:"selected",defaultFilename:"Chart Export",exportPreview:"Export Preview",exportButton:"Export",exportTimeRange:"Time range",exportDescription:"Exports a CSV of the data represented in the chart.",previewRows:"Previewing {rowsMax} of {rowsTotal} row{plural}",downloadButton:"Export",cancelButton:"Cancel",UtcOffset:"UTC Offset",Timestamp:"Timestamp"},legend:{datapointValueDisplay:"{value} {unit}"},chartLabels:{request_count:"Request Count",requests_per_minute:"Requests per Minute",response_latency_p99:"Response Latency (p99)",response_latency_p95:"Response Latency (p95)",response_latency_p50:"Response Latency (p50)",kong_latency_p99:"Kong Latency (p99)",kong_latency_p95:"Kong Latency (p95)",kong_latency_p50:"Kong Latency (p50)",upstream_latency_p99:"Upstream Latency (p99)",upstream_latency_p95:"Upstream Latency (p95)",upstream_latency_p50:"Upstream Latency (p50)",response_size_p99:"Response Size (p99)",response_size_p95:"Response Size (p95)",response_size_p50:"Response Size (p50)",request_size_p99:"Request Size (p99)",request_size_p95:"Request Size (p95)",request_size_p50:"Request Size (p50)",control_plane:"Control Plane",api_product:"API Product",api_product_version:"API Product Version",runtime_group:"Runtime Group",gateway_service:"Gateway Service",route:"Route",application:"Application",status_code:"Status Code",status_code_grouped:"Status Code (grouped)",time:"Time",Service:"Service",ServiceVersion:"Service Version",Route:"Route",Application:"Application",RuntimeGroup:"Runtime Group",GatewayService:"Gateway Service",StatusCode:"Status Code",CodeClass:"Status Code (grouped)",Time:"Time",API_PRODUCT:"API Product",API_PRODUCT_VERSION:"API Product Version",RUNTIME_GROUP:"Runtime Group",GATEWAY_SERVICE:"Gateway Service",ROUTE:"Route",APPLICATION:"Application",STATUS_CODE:"Status Code",STATUS_CODE_GROUPED:"Status Code (grouped)",TIME:"Time",ORGANIZATION:"Organization",TotalRequests:"Request Count",RequestsPerMinute:"Requests per Minute",LatencyP99:"Response Latency (p99)",LatencyP95:"Response Latency (p95)",LatencyP50:"Response Latency (p50)",LatencyAverage:"Response Latency (avg)",UpstreamLatencyP99:"Upstream Latency (p99)",UpstreamLatencyP95:"Upstream Latency (p95)",UpstreamLatencyP50:"Upstream Latency (p50)",UpstreamLatencyAverage:"Upstream Latency (avg)",KongLatencyP99:"Kong Latency (p99)",KongLatencyP95:"Kong Latency (p95)",KongLatencyP50:"Kong Latency (p50)",KongLatencyAverage:"Kong Latency (avg)",ResponseSizeP99:"Response Size (p99)",ResponseSizeP95:"Response Size (p95)",ResponseSizeP50:"Response Size (p50)",RequestSizeP99:"Request Size (p99)",RequestSizeP95:"Request Size (p95)",RequestSizeP50:"Request Size (p50)",SuccessfulRequests:"Successful requests",SUCCESS:"Successful requests",FailedRequests:"Failed requests",FAILURE:"Failed requests","5XX":"5xx","4XX":"4xx","3XX":"3xx","2XX":"2xx","1XX":"1xx",REQUEST_COUNT:"Request Count",REQUEST_PER_MINUTE:"Requests per Minute",RESPONSE_LATENCY_P99:"Response Latency",RESPONSE_LATENCY_P95:"Response Latency",RESPONSE_LATENCY_P50:"Response Latency",RESPONSE_SIZE_P99:"Response Size (p99)",RESPONSE_SIZE_P95:"Response Size (p95)",RESPONSE_SIZE_P50:"Response Size (p50)",REQUEST_SIZE_P99:"Request Size (p99)",REQUEST_SIZE_P95:"Request Size (p95)",REQUEST_SIZE_P50:"Request Size (p50)",CONTROL_PLANE:"Control Plane",____OTHER____:"Others",ai_request_count:"Request Count",total_tokens:"Token Count",prompt_tokens:"Prompt Token Count",completion_tokens:"Completion Token Count",cost:"LLM Costs"},metricAxisTitles:{request_count:"Request Count",requests_per_minute:"Requests per Minute",response_latency_p99:"Response Latency (p99) in {unit}",response_latency_p95:"Response Latency (p95) in {unit}",response_latency_p50:"Response Latency (p50) in {unit}",upstream_latency_p99:"Upstream Latency (p99) in {unit}",upstream_latency_p95:"Upstream Latency (p95) in {unit}",upstream_latency_p50:"Upstream Latency (p50) in {unit}",kong_latency_p99:"Kong Latency (p99) in {unit}",kong_latency_p95:"Kong Latency (p95) in {unit}",kong_latency_p50:"Kong Latency (p50) in {unit}",response_size_p99:"Response Size (p99) in {unit}",response_size_p95:"Response Size (p95) in {unit}",response_size_p50:"Response Size (p50) in {unit}",request_size_p99:"Request Size (p99) in {unit}",request_size_p95:"Request Size (p95) in {unit}",request_size_p50:"Request Size (p50) in {unit}",REQUEST_COUNT:"Request Count",REQUEST_PER_MINUTE:"Requests per Minute",RESPONSE_LATENCY_P99:"Response Latency (p99) in {unit}",RESPONSE_LATENCY_P95:"Response Latency (p95) in {unit}",RESPONSE_LATENCY_P50:"Response Latency (p50) in {unit}",RESPONSE_SIZE_P99:"Response Size (p99) in {unit}",RESPONSE_SIZE_P95:"Response Size (p95) in {unit}",RESPONSE_SIZE_P50:"Response Size (p50) in {unit}",REQUEST_SIZE_P99:"Request Size (p99) in {unit}",REQUEST_SIZE_P95:"Request Size (p95) in {unit}",REQUEST_SIZE_P50:"Request Size (p50) in {unit}",TotalRequests:"Request Count",RequestsPerMinute:"Requests per Minute",LatencyP99:"Response Latency (p99) in {unit}",LatencyP95:"Response Latency (p95) in {unit}",LatencyP50:"Response Latency (p50) in {unit}",LatencyAverage:"Response Latency (avg) in {unit}",UpstreamLatencyP99:"Upstream Latency (p99) in {unit}",UpstreamLatencyP95:"Upstream Latency (p95) in {unit}",UpstreamLatencyP50:"Upstream Latency (p50) in {unit}",UpstreamLatencyAverage:"Upstream Latency (avg) in {unit}",KongLatencyP99:"Kong Latency (p99) in {unit}",KongLatencyP95:"Kong Latency (p95) in {unit}",KongLatencyP50:"Kong Latency (p50) in {unit}",KongLatencyAverage:"Kong Latency (avg) in {unit}",ResponseSizeP99:"Response Size (p99) in {unit}",ResponseSizeP95:"Response Size (p95) in {unit}",ResponseSizeP50:"Response Size (p50) in {unit}",RequestSizeP99:"Request Size (p99) in {unit}",RequestSizeP95:"Request Size (p95) in {unit}",RequestSizeP50:"Request Size (p50) in {unit}"},granularityAxisTitles:{minutely:"@timestamp per minute",hourly:"@timestamp per hour",daily:"@timestamp per day",weekly:"@timestamp per week"},topNTable:{nameLabel:"Name",defaultEmptyStateTitle:"No data to display",defaultErrorStateTitle:"Something went wrong",errors:{meta:"Error: response must contain 'meta'",display:"Error: 'display' response incorrectly formatted (must have at least one key)",metricNames:"Error: 'metricNames' response incorrectly formatted (must have at least one entry)"}}};function Sp(){const n=kn.createI18n("en-us",Tp);return{i18n:n,i18nT:kn.i18nTComponent(n)}}/*!
|
|
2
2
|
* @kurkle/color v0.3.2
|
|
3
3
|
* https://github.com/kurkle/color#readme
|
|
4
4
|
* (c) 2023 Jukka Kurkela
|
|
5
5
|
* Released under the MIT License
|
|
6
|
-
*/function
|
|
6
|
+
*/function xr(n){return n+.5|0}const sn=(n,t,e)=>Math.max(Math.min(n,e),t);function _r(n){return sn(xr(n*2.55),0,255)}function on(n){return sn(xr(n*255),0,255)}function He(n){return sn(xr(n/2.55)/100,0,1)}function ac(n){return sn(xr(n*100),0,100)}const we={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},Aa=[..."0123456789ABCDEF"],Cp=n=>Aa[n&15],Mp=n=>Aa[(n&240)>>4]+Aa[n&15],hi=n=>(n&240)>>4===(n&15),Dp=n=>hi(n.r)&&hi(n.g)&&hi(n.b)&&hi(n.a);function kp(n){var t=n.length,e;return n[0]==="#"&&(t===4||t===5?e={r:255&we[n[1]]*17,g:255&we[n[2]]*17,b:255&we[n[3]]*17,a:t===5?we[n[4]]*17:255}:(t===7||t===9)&&(e={r:we[n[1]]<<4|we[n[2]],g:we[n[3]]<<4|we[n[4]],b:we[n[5]]<<4|we[n[6]],a:t===9?we[n[7]]<<4|we[n[8]]:255})),e}const Op=(n,t)=>n<255?t(n):"";function Pp(n){var t=Dp(n)?Cp:Mp;return n?"#"+t(n.r)+t(n.g)+t(n.b)+Op(n.a,t):void 0}const Ep=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function sc(n,t,e){const r=t*Math.min(e,1-e),i=(a,s=(a+n/30)%12)=>e-r*Math.max(Math.min(s-3,9-s,1),-1);return[i(0),i(8),i(4)]}function Rp(n,t,e){const r=(i,a=(i+n/60)%6)=>e-e*t*Math.max(Math.min(a,4-a,1),0);return[r(5),r(3),r(1)]}function Ap(n,t,e){const r=sc(n,1,.5);let i;for(t+e>1&&(i=1/(t+e),t*=i,e*=i),i=0;i<3;i++)r[i]*=1-t-e,r[i]+=t;return r}function Lp(n,t,e,r,i){return n===i?(t-e)/r+(t<e?6:0):t===i?(e-n)/r+2:(n-t)/r+4}function La(n){const e=n.r/255,r=n.g/255,i=n.b/255,a=Math.max(e,r,i),s=Math.min(e,r,i),o=(a+s)/2;let l,c,u;return a!==s&&(u=a-s,c=o>.5?u/(2-a-s):u/(a+s),l=Lp(e,r,i,u,a),l=l*60+.5),[l|0,c||0,o]}function Ia(n,t,e,r){return(Array.isArray(t)?n(t[0],t[1],t[2]):n(t,e,r)).map(on)}function Na(n,t,e){return Ia(sc,n,t,e)}function Ip(n,t,e){return Ia(Ap,n,t,e)}function Np(n,t,e){return Ia(Rp,n,t,e)}function oc(n){return(n%360+360)%360}function Fp(n){const t=Ep.exec(n);let e=255,r;if(!t)return;t[5]!==r&&(e=t[6]?_r(+t[5]):on(+t[5]));const i=oc(+t[2]),a=+t[3]/100,s=+t[4]/100;return t[1]==="hwb"?r=Ip(i,a,s):t[1]==="hsv"?r=Np(i,a,s):r=Na(i,a,s),{r:r[0],g:r[1],b:r[2],a:e}}function Up(n,t){var e=La(n);e[0]=oc(e[0]+t),e=Na(e),n.r=e[0],n.g=e[1],n.b=e[2]}function Bp(n){if(!n)return;const t=La(n),e=t[0],r=ac(t[1]),i=ac(t[2]);return n.a<255?`hsla(${e}, ${r}%, ${i}%, ${He(n.a)})`:`hsl(${e}, ${r}%, ${i}%)`}const lc={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"},cc={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 Wp(){const n={},t=Object.keys(cc),e=Object.keys(lc);let r,i,a,s,o;for(r=0;r<t.length;r++){for(s=o=t[r],i=0;i<e.length;i++)a=e[i],o=o.replace(a,lc[a]);a=parseInt(cc[s],16),n[o]=[a>>16&255,a>>8&255,a&255]}return n}let pi;function zp(n){pi||(pi=Wp(),pi.transparent=[0,0,0,0]);const t=pi[n.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Yp=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Hp(n){const t=Yp.exec(n);let e=255,r,i,a;if(t){if(t[7]!==r){const s=+t[7];e=t[8]?_r(s):sn(s*255,0,255)}return r=+t[1],i=+t[3],a=+t[5],r=255&(t[2]?_r(r):sn(r,0,255)),i=255&(t[4]?_r(i):sn(i,0,255)),a=255&(t[6]?_r(a):sn(a,0,255)),{r,g:i,b:a,a:e}}}function $p(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${He(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const Fa=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,Zn=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function jp(n,t,e){const r=Zn(He(n.r)),i=Zn(He(n.g)),a=Zn(He(n.b));return{r:on(Fa(r+e*(Zn(He(t.r))-r))),g:on(Fa(i+e*(Zn(He(t.g))-i))),b:on(Fa(a+e*(Zn(He(t.b))-a))),a:n.a+e*(t.a-n.a)}}function gi(n,t,e){if(n){let r=La(n);r[t]=Math.max(0,Math.min(r[t]+r[t]*e,t===0?360:1)),r=Na(r),n.r=r[0],n.g=r[1],n.b=r[2]}}function uc(n,t){return n&&Object.assign(t||{},n)}function dc(n){var t={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(t={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(t.a=on(n[3]))):(t=uc(n,{r:0,g:0,b:0,a:1}),t.a=on(t.a)),t}function Vp(n){return n.charAt(0)==="r"?Hp(n):Fp(n)}class wr{constructor(t){if(t instanceof wr)return t;const e=typeof t;let r;e==="object"?r=dc(t):e==="string"&&(r=kp(t)||zp(t)||Vp(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=uc(this._rgb);return t&&(t.a=He(t.a)),t}set rgb(t){this._rgb=dc(t)}rgbString(){return this._valid?$p(this._rgb):void 0}hexString(){return this._valid?Pp(this._rgb):void 0}hslString(){return this._valid?Bp(this._rgb):void 0}mix(t,e){if(t){const r=this.rgb,i=t.rgb;let a;const s=e===a?.5:e,o=2*s-1,l=r.a-i.a,c=((o*l===-1?o:(o+l)/(1+o*l))+1)/2;a=1-c,r.r=255&c*r.r+a*i.r+.5,r.g=255&c*r.g+a*i.g+.5,r.b=255&c*r.b+a*i.b+.5,r.a=s*r.a+(1-s)*i.a,this.rgb=r}return this}interpolate(t,e){return t&&(this._rgb=jp(this._rgb,t._rgb,e)),this}clone(){return new wr(this.rgb)}alpha(t){return this._rgb.a=on(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=xr(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 gi(this._rgb,2,t),this}darken(t){return gi(this._rgb,2,-t),this}saturate(t){return gi(this._rgb,1,t),this}desaturate(t){return gi(this._rgb,1,-t),this}rotate(t){return Up(this._rgb,t),this}}/*!
|
|
7
7
|
* Chart.js v4.4.3
|
|
8
8
|
* https://www.chartjs.org
|
|
9
9
|
* (c) 2024 Chart.js Contributors
|
|
10
10
|
* Released under the MIT License
|
|
11
|
-
*/function $e(){}const jp=(()=>{let n=0;return()=>n++})();function st(n){return n===null||typeof n>"u"}function mt(n){if(Array.isArray&&Array.isArray(n))return!0;const t=Object.prototype.toString.call(n);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function lt(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}function It(n){return(typeof n=="number"||n instanceof Number)&&isFinite(+n)}function be(n,t){return It(n)?n:t}function it(n,t){return typeof n>"u"?t:n}const Vp=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:+n/t,dc=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*t:+n;function Tt(n,t,e){if(n&&typeof n.call=="function")return n.apply(e,t)}function St(n,t,e,i){let r,a,s;if(mt(n))if(a=n.length,i)for(r=a-1;r>=0;r--)t.call(e,n[r],r);else for(r=0;r<a;r++)t.call(e,n[r],r);else if(lt(n))for(s=Object.keys(n),a=s.length,r=0;r<a;r++)t.call(e,n[s[r]],s[r])}function mr(n,t){let e,i,r,a;if(!n||!t||n.length!==t.length)return!1;for(e=0,i=n.length;e<i;++e)if(r=n[e],a=t[e],r.datasetIndex!==a.datasetIndex||r.index!==a.index)return!1;return!0}function yr(n){if(mt(n))return n.map(yr);if(lt(n)){const t=Object.create(null),e=Object.keys(n),i=e.length;let r=0;for(;r<i;++r)t[e[r]]=yr(n[e[r]]);return t}return n}function fc(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function qp(n,t,e,i){if(!fc(n))return;const r=t[n],a=e[n];lt(r)&<(a)?Ti(r,a,i):t[n]=yr(a)}function Ti(n,t,e){const i=mt(t)?t:[t],r=i.length;if(!lt(n))return n;e=e||{};const a=e.merger||qp;let s;for(let o=0;o<r;++o){if(s=i[o],!lt(s))continue;const l=Object.keys(s);for(let c=0,u=l.length;c<u;++c)a(l[c],n,s,e)}return n}function Si(n,t){return Ti(n,t,{merger:Xp})}function Xp(n,t,e){if(!fc(n))return;const i=t[n],r=e[n];lt(i)&<(r)?Si(i,r):Object.prototype.hasOwnProperty.call(t,n)||(t[n]=yr(r))}const hc={"":n=>n,x:n=>n.x,y:n=>n.y};function Gp(n){const t=n.split("."),e=[];let i="";for(const r of t)i+=r,i.endsWith("\\")?i=i.slice(0,-1)+".":(e.push(i),i="");return e}function Kp(n){const t=Gp(n);return e=>{for(const i of t){if(i==="")break;e=e&&e[i]}return e}}function ln(n,t){return(hc[t]||(hc[t]=Kp(t)))(n)}function Ua(n){return n.charAt(0).toUpperCase()+n.slice(1)}const de=n=>typeof n<"u",fe=n=>typeof n=="function",pc=(n,t)=>{if(n.size!==t.size)return!1;for(const e of n)if(!t.has(e))return!1;return!0};function Qp(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const dt=Math.PI,kt=2*dt,Zp=kt+dt,vr=Number.POSITIVE_INFINITY,Ba=dt/180,Et=dt/2,Te=dt/4,br=dt*2/3,cn=Math.log10,Le=Math.sign;function Ci(n,t,e){return Math.abs(n-t)<e}function gc(n){const t=Math.round(n);n=Ci(n,t,n/1e3)?t:n;const e=Math.pow(10,Math.floor(cn(n))),i=n/e;return(i<=1?1:i<=2?2:i<=5?5:10)*e}function Jp(n){const t=[],e=Math.sqrt(n);let i;for(i=1;i<e;i++)n%i===0&&(t.push(i),t.push(n/i));return e===(e|0)&&t.push(e),t.sort((r,a)=>r-a).pop(),t}function un(n){return!isNaN(parseFloat(n))&&isFinite(n)}function tg(n,t){const e=Math.round(n);return e-t<=n&&e+t>=n}function mc(n,t,e){let i,r,a;for(i=0,r=n.length;i<r;i++)a=n[i][e],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function Xt(n){return n*(dt/180)}function xr(n){return n*(180/dt)}function yc(n){if(!It(n))return;let t=1,e=0;for(;Math.round(n*t)/t!==n;)t*=10,e++;return e}function vc(n,t){const e=t.x-n.x,i=t.y-n.y,r=Math.sqrt(e*e+i*i);let a=Math.atan2(i,e);return a<-.5*dt&&(a+=kt),{angle:a,distance:r}}function Jn(n,t){return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))}function eg(n,t){return(n-t+Zp)%kt-dt}function xe(n){return(n%kt+kt)%kt}function Mi(n,t,e,i){const r=xe(n),a=xe(t),s=xe(e),o=xe(a-r),l=xe(s-r),c=xe(r-a),u=xe(r-s);return r===a||r===s||i&&a===s||o>l&&c<u}function Qt(n,t,e){return Math.max(t,Math.min(e,n))}function ng(n){return Qt(n,-32768,32767)}function je(n,t,e,i=1e-6){return n>=Math.min(t,e)-i&&n<=Math.max(t,e)+i}function Wa(n,t,e){e=e||(s=>n[s]<t);let i=n.length-1,r=0,a;for(;i-r>1;)a=r+i>>1,e(a)?r=a:i=a;return{lo:r,hi:i}}const Ve=(n,t,e,i)=>Wa(n,e,i?r=>{const a=n[r][t];return a<e||a===e&&n[r+1][t]===e}:r=>n[r][t]<e),ig=(n,t,e)=>Wa(n,e,i=>n[i][t]>=e);function rg(n,t,e){let i=0,r=n.length;for(;i<r&&n[i]<t;)i++;for(;r>i&&n[r-1]>e;)r--;return i>0||r<n.length?n.slice(i,r):n}const bc=["push","pop","shift","splice","unshift"];function ag(n,t){if(n._chartjs){n._chartjs.listeners.push(t);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),bc.forEach(e=>{const i="_onData"+Ua(e),r=n[e];Object.defineProperty(n,e,{configurable:!0,enumerable:!1,value(...a){const s=r.apply(this,a);return n._chartjs.listeners.forEach(o=>{typeof o[i]=="function"&&o[i](...a)}),s}})})}function xc(n,t){const e=n._chartjs;if(!e)return;const i=e.listeners,r=i.indexOf(t);r!==-1&&i.splice(r,1),!(i.length>0)&&(bc.forEach(a=>{delete n[a]}),delete n._chartjs)}function _c(n){const t=new Set(n);return t.size===n.length?n:Array.from(t)}const wc=function(){return typeof window>"u"?function(n){return n()}:window.requestAnimationFrame}();function Tc(n,t){let e=[],i=!1;return function(...r){e=r,i||(i=!0,wc.call(window,()=>{i=!1,n.apply(t,e)}))}}function sg(n,t){let e;return function(...i){return t?(clearTimeout(e),e=setTimeout(n,t,i)):n.apply(this,i),t}}const za=n=>n==="start"?"left":n==="end"?"right":"center",ie=(n,t,e)=>n==="start"?t:n==="end"?e:(t+e)/2,og=(n,t,e,i)=>n===(i?"left":"right")?e:n==="center"?(t+e)/2:t;function Sc(n,t,e){const i=t.length;let r=0,a=i;if(n._sorted){const{iScale:s,_parsed:o}=n,l=s.axis,{min:c,max:u,minDefined:d,maxDefined:f}=s.getUserBounds();d&&(r=Qt(Math.min(Ve(o,l,c).lo,e?i:Ve(t,l,s.getPixelForValue(c)).lo),0,i-1)),f?a=Qt(Math.max(Ve(o,s.axis,u,!0).hi+1,e?0:Ve(t,l,s.getPixelForValue(u),!0).hi+1),r,i)-r:a=i-r}return{start:r,count:a}}function Cc(n){const{xScale:t,yScale:e,_scaleRanges:i}=n,r={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!i)return n._scaleRanges=r,!0;const a=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==e.min||i.ymax!==e.max;return Object.assign(i,r),a}const _r=n=>n===0||n===1,Mc=(n,t,e)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-t)*kt/e)),Dc=(n,t,e)=>Math.pow(2,-10*n)*Math.sin((n-t)*kt/e)+1,Di={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*Et)+1,easeOutSine:n=>Math.sin(n*Et),easeInOutSine:n=>-.5*(Math.cos(dt*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>_r(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>_r(n)?n:Mc(n,.075,.3),easeOutElastic:n=>_r(n)?n:Dc(n,.075,.3),easeInOutElastic(n){return _r(n)?n:n<.5?.5*Mc(n*2,.1125,.45):.5+.5*Dc(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let t=1.70158;return(n/=.5)<1?.5*(n*n*(((t*=1.525)+1)*n-t)):.5*((n-=2)*n*(((t*=1.525)+1)*n+t)+2)},easeInBounce:n=>1-Di.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?Di.easeInBounce(n*2)*.5:Di.easeOutBounce(n*2-1)*.5+.5};function Ya(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function kc(n){return Ya(n)?n:new wi(n)}function Ha(n){return Ya(n)?n:new wi(n).saturate(.5).darken(.1).hexString()}const lg=["x","y","borderWidth","radius","tension"],cg=["color","borderColor","backgroundColor"];function ug(n){n.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),n.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),n.set("animations",{colors:{type:"color",properties:cg},numbers:{type:"number",properties:lg}}),n.describe("animations",{_fallback:"animation"}),n.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function dg(n){n.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Oc=new Map;function fg(n,t){t=t||{};const e=n+JSON.stringify(t);let i=Oc.get(e);return i||(i=new Intl.NumberFormat(n,t),Oc.set(e,i)),i}function ki(n,t,e){return fg(t,e).format(n)}const Pc={values(n){return mt(n)?n:""+n},numeric(n,t,e){if(n===0)return"0";const i=this.chart.options.locale;let r,a=n;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)&&(r="scientific"),a=hg(n,e)}const s=cn(Math.abs(a)),o=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(l,this.options.ticks.format),ki(n,i,l)},logarithmic(n,t,e){if(n===0)return"0";const i=e[t].significand||n/Math.pow(10,Math.floor(cn(n)));return[1,2,3,5,10,15].includes(i)||t>.8*e.length?Pc.numeric.call(this,n,t,e):""}};function hg(n,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&n!==Math.floor(n)&&(e=n-Math.floor(n)),e}var wr={formatters:Pc};function pg(n){n.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(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:wr.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),n.route("scale.ticks","color","","color"),n.route("scale.grid","color","","borderColor"),n.route("scale.border","color","","borderColor"),n.route("scale.title","color","","color"),n.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),n.describe("scales",{_fallback:"scale"}),n.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const On=Object.create(null),$a=Object.create(null);function Oi(n,t){if(!t)return n;const e=t.split(".");for(let i=0,r=e.length;i<r;++i){const a=e[i];n=n[a]||(n[a]=Object.create(null))}return n}function ja(n,t,e){return typeof t=="string"?Ti(Oi(n,t),e):Ti(Oi(n,""),t)}class gg{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=i=>i.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,r)=>Ha(r.backgroundColor),this.hoverBorderColor=(i,r)=>Ha(r.borderColor),this.hoverColor=(i,r)=>Ha(r.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 ja(this,t,e)}get(t){return Oi(this,t)}describe(t,e){return ja($a,t,e)}override(t,e){return ja(On,t,e)}route(t,e,i,r){const a=Oi(this,t),s=Oi(this,i),o="_"+e;Object.defineProperties(a,{[o]:{value:a[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[o],c=s[r];return lt(l)?Object.assign({},c,l):it(l,c)},set(l){this[o]=l}}})}apply(t){t.forEach(e=>e(this))}}var Ut=new gg({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[ug,dg,pg]);function mg(n){return!n||st(n.size)||st(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function Tr(n,t,e,i,r){let a=t[r];return a||(a=t[r]=n.measureText(r).width,e.push(r)),a>i&&(i=a),i}function yg(n,t,e,i){i=i||{};let r=i.data=i.data||{},a=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(r=i.data={},a=i.garbageCollect=[],i.font=t),n.save(),n.font=t;let s=0;const o=e.length;let l,c,u,d,f;for(l=0;l<o;l++)if(d=e[l],d!=null&&!mt(d))s=Tr(n,r,a,s,d);else if(mt(d))for(c=0,u=d.length;c<u;c++)f=d[c],f!=null&&!mt(f)&&(s=Tr(n,r,a,s,f));n.restore();const p=a.length/2;if(p>e.length){for(l=0;l<p;l++)delete r[a[l]];a.splice(0,p)}return s}function Pn(n,t,e){const i=n.currentDevicePixelRatio,r=e!==0?Math.max(e/2,.5):0;return Math.round((t-r)*i)/i+r}function Ec(n,t){!t&&!n||(t=t||n.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,n.width,n.height),t.restore())}function Va(n,t,e,i){Rc(n,t,e,i,null)}function Rc(n,t,e,i,r){let a,s,o,l,c,u,d,f;const p=t.pointStyle,y=t.rotation,x=t.radius;let g=(y||0)*Ba;if(p&&typeof p=="object"&&(a=p.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){n.save(),n.translate(e,i),n.rotate(g),n.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),n.restore();return}if(!(isNaN(x)||x<=0)){switch(n.beginPath(),p){default:r?n.ellipse(e,i,r/2,x,0,0,kt):n.arc(e,i,x,0,kt),n.closePath();break;case"triangle":u=r?r/2:x,n.moveTo(e+Math.sin(g)*u,i-Math.cos(g)*x),g+=br,n.lineTo(e+Math.sin(g)*u,i-Math.cos(g)*x),g+=br,n.lineTo(e+Math.sin(g)*u,i-Math.cos(g)*x),n.closePath();break;case"rectRounded":c=x*.516,l=x-c,s=Math.cos(g+Te)*l,d=Math.cos(g+Te)*(r?r/2-c:l),o=Math.sin(g+Te)*l,f=Math.sin(g+Te)*(r?r/2-c:l),n.arc(e-d,i-o,c,g-dt,g-Et),n.arc(e+f,i-s,c,g-Et,g),n.arc(e+d,i+o,c,g,g+Et),n.arc(e-f,i+s,c,g+Et,g+dt),n.closePath();break;case"rect":if(!y){l=Math.SQRT1_2*x,u=r?r/2:l,n.rect(e-u,i-l,2*u,2*l);break}g+=Te;case"rectRot":d=Math.cos(g)*(r?r/2:x),s=Math.cos(g)*x,o=Math.sin(g)*x,f=Math.sin(g)*(r?r/2:x),n.moveTo(e-d,i-o),n.lineTo(e+f,i-s),n.lineTo(e+d,i+o),n.lineTo(e-f,i+s),n.closePath();break;case"crossRot":g+=Te;case"cross":d=Math.cos(g)*(r?r/2:x),s=Math.cos(g)*x,o=Math.sin(g)*x,f=Math.sin(g)*(r?r/2:x),n.moveTo(e-d,i-o),n.lineTo(e+d,i+o),n.moveTo(e+f,i-s),n.lineTo(e-f,i+s);break;case"star":d=Math.cos(g)*(r?r/2:x),s=Math.cos(g)*x,o=Math.sin(g)*x,f=Math.sin(g)*(r?r/2:x),n.moveTo(e-d,i-o),n.lineTo(e+d,i+o),n.moveTo(e+f,i-s),n.lineTo(e-f,i+s),g+=Te,d=Math.cos(g)*(r?r/2:x),s=Math.cos(g)*x,o=Math.sin(g)*x,f=Math.sin(g)*(r?r/2:x),n.moveTo(e-d,i-o),n.lineTo(e+d,i+o),n.moveTo(e+f,i-s),n.lineTo(e-f,i+s);break;case"line":s=r?r/2:Math.cos(g)*x,o=Math.sin(g)*x,n.moveTo(e-s,i-o),n.lineTo(e+s,i+o);break;case"dash":n.moveTo(e,i),n.lineTo(e+Math.cos(g)*(r?r/2:x),i+Math.sin(g)*x);break;case!1:n.closePath();break}n.fill(),t.borderWidth>0&&n.stroke()}}function qe(n,t,e){return e=e||.5,!t||n&&n.x>t.left-e&&n.x<t.right+e&&n.y>t.top-e&&n.y<t.bottom+e}function Pi(n,t){n.save(),n.beginPath(),n.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),n.clip()}function Ei(n){n.restore()}function vg(n,t,e,i,r){if(!t)return n.lineTo(e.x,e.y);if(r==="middle"){const a=(t.x+e.x)/2;n.lineTo(a,t.y),n.lineTo(a,e.y)}else r==="after"!=!!i?n.lineTo(t.x,e.y):n.lineTo(e.x,t.y);n.lineTo(e.x,e.y)}function bg(n,t,e,i){if(!t)return n.lineTo(e.x,e.y);n.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?e.cp2x:e.cp1x,i?e.cp2y:e.cp1y,e.x,e.y)}function xg(n,t){t.translation&&n.translate(t.translation[0],t.translation[1]),st(t.rotation)||n.rotate(t.rotation),t.color&&(n.fillStyle=t.color),t.textAlign&&(n.textAlign=t.textAlign),t.textBaseline&&(n.textBaseline=t.textBaseline)}function _g(n,t,e,i,r){if(r.strikethrough||r.underline){const a=n.measureText(i),s=t-a.actualBoundingBoxLeft,o=t+a.actualBoundingBoxRight,l=e-a.actualBoundingBoxAscent,c=e+a.actualBoundingBoxDescent,u=r.strikethrough?(l+c)/2:c;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=r.decorationWidth||2,n.moveTo(s,u),n.lineTo(o,u),n.stroke()}}function wg(n,t){const e=n.fillStyle;n.fillStyle=t.color,n.fillRect(t.left,t.top,t.width,t.height),n.fillStyle=e}function En(n,t,e,i,r,a={}){const s=mt(t)?t:[t],o=a.strokeWidth>0&&a.strokeColor!=="";let l,c;for(n.save(),n.font=r.string,xg(n,a),l=0;l<s.length;++l)c=s[l],a.backdrop&&wg(n,a.backdrop),o&&(a.strokeColor&&(n.strokeStyle=a.strokeColor),st(a.strokeWidth)||(n.lineWidth=a.strokeWidth),n.strokeText(c,e,i,a.maxWidth)),n.fillText(c,e,i,a.maxWidth),_g(n,e,i,c,a),i+=Number(r.lineHeight);n.restore()}function ti(n,t){const{x:e,y:i,w:r,h:a,radius:s}=t;n.arc(e+s.topLeft,i+s.topLeft,s.topLeft,1.5*dt,dt,!0),n.lineTo(e,i+a-s.bottomLeft),n.arc(e+s.bottomLeft,i+a-s.bottomLeft,s.bottomLeft,dt,Et,!0),n.lineTo(e+r-s.bottomRight,i+a),n.arc(e+r-s.bottomRight,i+a-s.bottomRight,s.bottomRight,Et,0,!0),n.lineTo(e+r,i+s.topRight),n.arc(e+r-s.topRight,i+s.topRight,s.topRight,0,-Et,!0),n.lineTo(e+s.topLeft,i)}const Tg=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Sg=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Cg(n,t){const e=(""+n).match(Tg);if(!e||e[1]==="normal")return t*1.2;switch(n=+e[2],e[3]){case"px":return n;case"%":n/=100;break}return t*n}const Mg=n=>+n||0;function qa(n,t){const e={},i=lt(t),r=i?Object.keys(t):t,a=lt(n)?i?s=>it(n[s],n[t[s]]):s=>n[s]:()=>n;for(const s of r)e[s]=Mg(a(s));return e}function Ac(n){return qa(n,{top:"y",right:"x",bottom:"y",left:"x"})}function dn(n){return qa(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Gt(n){const t=Ac(n);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Rt(n,t){n=n||{},t=t||Ut.font;let e=it(n.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let i=it(n.style,t.style);i&&!(""+i).match(Sg)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const r={family:it(n.family,t.family),lineHeight:Cg(it(n.lineHeight,t.lineHeight),e),size:e,style:i,weight:it(n.weight,t.weight),string:""};return r.string=mg(r),r}function Ri(n,t,e,i){let r=!0,a,s,o;for(a=0,s=n.length;a<s;++a)if(o=n[a],o!==void 0&&(t!==void 0&&typeof o=="function"&&(o=o(t),r=!1),e!==void 0&&mt(o)&&(o=o[e%o.length],r=!1),o!==void 0))return i&&!r&&(i.cacheable=!1),o}function Dg(n,t,e){const{min:i,max:r}=n,a=dc(t,(r-i)/2),s=(o,l)=>e&&o===0?0:o+l;return{min:s(i,-Math.abs(a)),max:s(r,a)}}function fn(n,t){return Object.assign(Object.create(n),t)}function Xa(n,t=[""],e,i,r=()=>n[0]){const a=e||n;typeof i>"u"&&(i=Uc("_fallback",n));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:a,_fallback:i,_getTarget:r,override:o=>Xa([o,...n],t,a,i)};return new Proxy(s,{deleteProperty(o,l){return delete o[l],delete o._keys,delete n[0][l],!0},get(o,l){return Ic(o,l,()=>Ig(l,t,n,o))},getOwnPropertyDescriptor(o,l){return Reflect.getOwnPropertyDescriptor(o._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(o,l){return Bc(o).includes(l)},ownKeys(o){return Bc(o)},set(o,l,c){const u=o._storage||(o._storage=r());return o[l]=u[l]=c,delete o._keys,!0}})}function ei(n,t,e,i){const r={_cacheable:!1,_proxy:n,_context:t,_subProxy:e,_stack:new Set,_descriptors:Lc(n,i),setContext:a=>ei(n,a,e,i),override:a=>ei(n.override(a),t,e,i)};return new Proxy(r,{deleteProperty(a,s){return delete a[s],delete n[s],!0},get(a,s,o){return Ic(a,s,()=>Og(a,s,o))},getOwnPropertyDescriptor(a,s){return a._descriptors.allKeys?Reflect.has(n,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,s)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(a,s){return Reflect.has(n,s)},ownKeys(){return Reflect.ownKeys(n)},set(a,s,o){return n[s]=o,delete a[s],!0}})}function Lc(n,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:i=t.indexable,_allKeys:r=t.allKeys}=n;return{allKeys:r,scriptable:e,indexable:i,isScriptable:fe(e)?e:()=>e,isIndexable:fe(i)?i:()=>i}}const kg=(n,t)=>n?n+Ua(t):t,Ga=(n,t)=>lt(t)&&n!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Ic(n,t,e){if(Object.prototype.hasOwnProperty.call(n,t)||t==="constructor")return n[t];const i=e();return n[t]=i,i}function Og(n,t,e){const{_proxy:i,_context:r,_subProxy:a,_descriptors:s}=n;let o=i[t];return fe(o)&&s.isScriptable(t)&&(o=Pg(t,o,n,e)),mt(o)&&o.length&&(o=Eg(t,o,n,s.isIndexable)),Ga(t,o)&&(o=ei(o,r,a&&a[t],s)),o}function Pg(n,t,e,i){const{_proxy:r,_context:a,_subProxy:s,_stack:o}=e;if(o.has(n))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+n);o.add(n);let l=t(a,s||i);return o.delete(n),Ga(n,l)&&(l=Ka(r._scopes,r,n,l)),l}function Eg(n,t,e,i){const{_proxy:r,_context:a,_subProxy:s,_descriptors:o}=e;if(typeof a.index<"u"&&i(n))return t[a.index%t.length];if(lt(t[0])){const l=t,c=r._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=Ka(c,r,n,u);t.push(ei(d,a,s&&s[n],o))}}return t}function Nc(n,t,e){return fe(n)?n(t,e):n}const Rg=(n,t)=>n===!0?t:typeof n=="string"?ln(t,n):void 0;function Ag(n,t,e,i,r){for(const a of t){const s=Rg(e,a);if(s){n.add(s);const o=Nc(s._fallback,e,r);if(typeof o<"u"&&o!==e&&o!==i)return o}else if(s===!1&&typeof i<"u"&&e!==i)return null}return!1}function Ka(n,t,e,i){const r=t._rootScopes,a=Nc(t._fallback,e,i),s=[...n,...r],o=new Set;o.add(i);let l=Fc(o,s,e,a||e,i);return l===null||typeof a<"u"&&a!==e&&(l=Fc(o,s,a,l,i),l===null)?!1:Xa(Array.from(o),[""],r,a,()=>Lg(t,e,i))}function Fc(n,t,e,i,r){for(;e;)e=Ag(n,t,e,i,r);return e}function Lg(n,t,e){const i=n._getTarget();t in i||(i[t]={});const r=i[t];return mt(r)&<(e)?e:r||{}}function Ig(n,t,e,i){let r;for(const a of t)if(r=Uc(kg(a,n),e),typeof r<"u")return Ga(n,r)?Ka(e,i,n,r):r}function Uc(n,t){for(const e of t){if(!e)continue;const i=e[n];if(typeof i<"u")return i}}function Bc(n){let t=n._keys;return t||(t=n._keys=Ng(n._scopes)),t}function Ng(n){const t=new Set;for(const e of n)for(const i of Object.keys(e).filter(r=>!r.startsWith("_")))t.add(i);return Array.from(t)}function Wc(n,t,e,i){const{iScale:r}=n,{key:a="r"}=this._parsing,s=new Array(i);let o,l,c,u;for(o=0,l=i;o<l;++o)c=o+e,u=t[c],s[o]={r:r.parse(ln(u,a),c)};return s}const Fg=Number.EPSILON||1e-14,ni=(n,t)=>t<n.length&&!n[t].skip&&n[t],zc=n=>n==="x"?"y":"x";function Ug(n,t,e,i){const r=n.skip?t:n,a=t,s=e.skip?t:e,o=Jn(a,r),l=Jn(s,a);let c=o/(o+l),u=l/(o+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=i*c,f=i*u;return{previous:{x:a.x-d*(s.x-r.x),y:a.y-d*(s.y-r.y)},next:{x:a.x+f*(s.x-r.x),y:a.y+f*(s.y-r.y)}}}function Bg(n,t,e){const i=n.length;let r,a,s,o,l,c=ni(n,0);for(let u=0;u<i-1;++u)if(l=c,c=ni(n,u+1),!(!l||!c)){if(Ci(t[u],0,Fg)){e[u]=e[u+1]=0;continue}r=e[u]/t[u],a=e[u+1]/t[u],o=Math.pow(r,2)+Math.pow(a,2),!(o<=9)&&(s=3/Math.sqrt(o),e[u]=r*s*t[u],e[u+1]=a*s*t[u])}}function Wg(n,t,e="x"){const i=zc(e),r=n.length;let a,s,o,l=ni(n,0);for(let c=0;c<r;++c){if(s=o,o=l,l=ni(n,c+1),!o)continue;const u=o[e],d=o[i];s&&(a=(u-s[e])/3,o[`cp1${e}`]=u-a,o[`cp1${i}`]=d-a*t[c]),l&&(a=(l[e]-u)/3,o[`cp2${e}`]=u+a,o[`cp2${i}`]=d+a*t[c])}}function zg(n,t="x"){const e=zc(t),i=n.length,r=Array(i).fill(0),a=Array(i);let s,o,l,c=ni(n,0);for(s=0;s<i;++s)if(o=l,l=c,c=ni(n,s+1),!!l){if(c){const u=c[t]-l[t];r[s]=u!==0?(c[e]-l[e])/u:0}a[s]=o?c?Le(r[s-1])!==Le(r[s])?0:(r[s-1]+r[s])/2:r[s-1]:r[s]}Bg(n,r,a),Wg(n,a,t)}function Sr(n,t,e){return Math.max(Math.min(n,e),t)}function Yg(n,t){let e,i,r,a,s,o=qe(n[0],t);for(e=0,i=n.length;e<i;++e)s=a,a=o,o=e<i-1&&qe(n[e+1],t),a&&(r=n[e],s&&(r.cp1x=Sr(r.cp1x,t.left,t.right),r.cp1y=Sr(r.cp1y,t.top,t.bottom)),o&&(r.cp2x=Sr(r.cp2x,t.left,t.right),r.cp2y=Sr(r.cp2y,t.top,t.bottom)))}function Hg(n,t,e,i,r){let a,s,o,l;if(t.spanGaps&&(n=n.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")zg(n,r);else{let c=i?n[n.length-1]:n[0];for(a=0,s=n.length;a<s;++a)o=n[a],l=Ug(c,o,n[Math.min(a+1,s-(i?0:1))%s],t.tension),o.cp1x=l.previous.x,o.cp1y=l.previous.y,o.cp2x=l.next.x,o.cp2y=l.next.y,c=o}t.capBezierPoints&&Yg(n,e)}function Qa(){return typeof window<"u"&&typeof document<"u"}function Za(n){let t=n.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Cr(n,t,e){let i;return typeof n=="string"?(i=parseInt(n,10),n.indexOf("%")!==-1&&(i=i/100*t.parentNode[e])):i=n,i}const Mr=n=>n.ownerDocument.defaultView.getComputedStyle(n,null);function $g(n,t){return Mr(n).getPropertyValue(t)}const jg=["top","right","bottom","left"];function Rn(n,t,e){const i={};e=e?"-"+e:"";for(let r=0;r<4;r++){const a=jg[r];i[a]=parseFloat(n[t+"-"+a+e])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const Vg=(n,t,e)=>(n>0||t>0)&&(!e||!e.shadowRoot);function qg(n,t){const e=n.touches,i=e&&e.length?e[0]:n,{offsetX:r,offsetY:a}=i;let s=!1,o,l;if(Vg(r,a,n.target))o=r,l=a;else{const c=t.getBoundingClientRect();o=i.clientX-c.left,l=i.clientY-c.top,s=!0}return{x:o,y:l,box:s}}function hn(n,t){if("native"in n)return n;const{canvas:e,currentDevicePixelRatio:i}=t,r=Mr(e),a=r.boxSizing==="border-box",s=Rn(r,"padding"),o=Rn(r,"border","width"),{x:l,y:c,box:u}=qg(n,e),d=s.left+(u&&o.left),f=s.top+(u&&o.top);let{width:p,height:y}=t;return a&&(p-=s.width+o.width,y-=s.height+o.height),{x:Math.round((l-d)/p*e.width/i),y:Math.round((c-f)/y*e.height/i)}}function Xg(n,t,e){let i,r;if(t===void 0||e===void 0){const a=n&&Za(n);if(!a)t=n.clientWidth,e=n.clientHeight;else{const s=a.getBoundingClientRect(),o=Mr(a),l=Rn(o,"border","width"),c=Rn(o,"padding");t=s.width-c.width-l.width,e=s.height-c.height-l.height,i=Cr(o.maxWidth,a,"clientWidth"),r=Cr(o.maxHeight,a,"clientHeight")}}return{width:t,height:e,maxWidth:i||vr,maxHeight:r||vr}}const Dr=n=>Math.round(n*10)/10;function Gg(n,t,e,i){const r=Mr(n),a=Rn(r,"margin"),s=Cr(r.maxWidth,n,"clientWidth")||vr,o=Cr(r.maxHeight,n,"clientHeight")||vr,l=Xg(n,t,e);let{width:c,height:u}=l;if(r.boxSizing==="content-box"){const f=Rn(r,"border","width"),p=Rn(r,"padding");c-=p.width+f.width,u-=p.height+f.height}return c=Math.max(0,c-a.width),u=Math.max(0,i?c/i:u-a.height),c=Dr(Math.min(c,s,l.maxWidth)),u=Dr(Math.min(u,o,l.maxHeight)),c&&!u&&(u=Dr(c/2)),(t!==void 0||e!==void 0)&&i&&l.height&&u>l.height&&(u=l.height,c=Dr(Math.floor(u*i))),{width:c,height:u}}function Yc(n,t,e){const i=t||1,r=Math.floor(n.height*i),a=Math.floor(n.width*i);n.height=Math.floor(n.height),n.width=Math.floor(n.width);const s=n.canvas;return s.style&&(e||!s.style.height&&!s.style.width)&&(s.style.height=`${n.height}px`,s.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||s.height!==r||s.width!==a?(n.currentDevicePixelRatio=i,s.height=r,s.width=a,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}const Kg=function(){let n=!1;try{const t={get passive(){return n=!0,!1}};Qa()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return n}();function Hc(n,t){const e=$g(n,t),i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function An(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}}function Qg(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:i==="middle"?e<.5?n.y:t.y:i==="after"?e<1?n.y:t.y:e>0?t.y:n.y}}function Zg(n,t,e,i){const r={x:n.cp2x,y:n.cp2y},a={x:t.cp1x,y:t.cp1y},s=An(n,r,e),o=An(r,a,e),l=An(a,t,e),c=An(s,o,e),u=An(o,l,e);return An(c,u,e)}const Jg=function(n,t){return{x(e){return n+n+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,i){return e-i},leftForLtr(e,i){return e-i}}},tm=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,t){return n+t},leftForLtr(n,t){return n}}};function ii(n,t,e){return n?Jg(t,e):tm()}function $c(n,t){let e,i;(t==="ltr"||t==="rtl")&&(e=n.canvas.style,i=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),n.prevTextDirection=i)}function jc(n,t){t!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",t[0],t[1]))}function Vc(n){return n==="angle"?{between:Mi,compare:eg,normalize:xe}:{between:je,compare:(t,e)=>t-e,normalize:t=>t}}function qc({start:n,end:t,count:e,loop:i,style:r}){return{start:n%e,end:t%e,loop:i&&(t-n+1)%e===0,style:r}}function em(n,t,e){const{property:i,start:r,end:a}=e,{between:s,normalize:o}=Vc(i),l=t.length;let{start:c,end:u,loop:d}=n,f,p;if(d){for(c+=l,u+=l,f=0,p=l;f<p&&s(o(t[c%l][i]),r,a);++f)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:n.style}}function Xc(n,t,e){if(!e)return[n];const{property:i,start:r,end:a}=e,s=t.length,{compare:o,between:l,normalize:c}=Vc(i),{start:u,end:d,loop:f,style:p}=em(n,t,e),y=[];let x=!1,g=null,m,v,b;const w=()=>l(r,b,m)&&o(r,b)!==0,T=()=>o(a,m)===0||l(a,b,m),M=()=>x||w(),k=()=>!x||T();for(let S=u,C=u;S<=d;++S)v=t[S%s],!v.skip&&(m=c(v[i]),m!==b&&(x=l(m,r,a),g===null&&M()&&(g=o(m,r)===0?S:C),g!==null&&k()&&(y.push(qc({start:g,end:S,loop:f,count:s,style:p})),g=null),C=S,b=m));return g!==null&&y.push(qc({start:g,end:d,loop:f,count:s,style:p})),y}function Gc(n,t){const e=[],i=n.segments;for(let r=0;r<i.length;r++){const a=Xc(i[r],n.points,t);a.length&&e.push(...a)}return e}function nm(n,t,e,i){let r=0,a=t-1;if(e&&!i)for(;r<t&&!n[r].skip;)r++;for(;r<t&&n[r].skip;)r++;for(r%=t,e&&(a+=r);a>r&&n[a%t].skip;)a--;return a%=t,{start:r,end:a}}function im(n,t,e,i){const r=n.length,a=[];let s=t,o=n[t],l;for(l=t+1;l<=e;++l){const c=n[l%r];c.skip||c.stop?o.skip||(i=!1,a.push({start:t%r,end:(l-1)%r,loop:i}),t=s=c.stop?l:null):(s=l,o.skip&&(t=l)),o=c}return s!==null&&a.push({start:t%r,end:s%r,loop:i}),a}function rm(n,t){const e=n.points,i=n.options.spanGaps,r=e.length;if(!r)return[];const a=!!n._loop,{start:s,end:o}=nm(e,r,a,i);if(i===!0)return Kc(n,[{start:s,end:o,loop:a}],e,t);const l=o<s?o+r:o,c=!!n._fullLoop&&s===0&&o===r-1;return Kc(n,im(e,s,l,c),e,t)}function Kc(n,t,e,i){return!i||!i.setContext||!e?t:am(n,t,e,i)}function am(n,t,e,i){const r=n._chart.getContext(),a=Qc(n.options),{_datasetIndex:s,options:{spanGaps:o}}=n,l=e.length,c=[];let u=a,d=t[0].start,f=d;function p(y,x,g,m){const v=o?-1:1;if(y!==x){for(y+=l;e[y%l].skip;)y-=v;for(;e[x%l].skip;)x+=v;y%l!==x%l&&(c.push({start:y%l,end:x%l,loop:g,style:m}),u=m,d=x%l)}}for(const y of t){d=o?d:y.start;let x=e[d%l],g;for(f=d+1;f<=y.end;f++){const m=e[f%l];g=Qc(i.setContext(fn(r,{type:"segment",p0:x,p1:m,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:s}))),sm(g,u)&&p(d,f-1,y.loop,u),x=m,u=g}d<f-1&&p(d,f-1,y.loop,u)}return c}function Qc(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function sm(n,t){if(!t)return!1;const e=[],i=function(r,a){return Ya(a)?(e.includes(a)||e.push(a),e.indexOf(a)):a};return JSON.stringify(n,i)!==JSON.stringify(t,i)}/*!
|
|
11
|
+
*/function $e(){}const qp=(()=>{let n=0;return()=>n++})();function st(n){return n===null||typeof n>"u"}function mt(n){if(Array.isArray&&Array.isArray(n))return!0;const t=Object.prototype.toString.call(n);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function lt(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}function It(n){return(typeof n=="number"||n instanceof Number)&&isFinite(+n)}function be(n,t){return It(n)?n:t}function rt(n,t){return typeof n>"u"?t:n}const Xp=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:+n/t,fc=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*t:+n;function Tt(n,t,e){if(n&&typeof n.call=="function")return n.apply(e,t)}function St(n,t,e,r){let i,a,s;if(mt(n))if(a=n.length,r)for(i=a-1;i>=0;i--)t.call(e,n[i],i);else for(i=0;i<a;i++)t.call(e,n[i],i);else if(lt(n))for(s=Object.keys(n),a=s.length,i=0;i<a;i++)t.call(e,n[s[i]],s[i])}function mi(n,t){let e,r,i,a;if(!n||!t||n.length!==t.length)return!1;for(e=0,r=n.length;e<r;++e)if(i=n[e],a=t[e],i.datasetIndex!==a.datasetIndex||i.index!==a.index)return!1;return!0}function yi(n){if(mt(n))return n.map(yi);if(lt(n)){const t=Object.create(null),e=Object.keys(n),r=e.length;let i=0;for(;i<r;++i)t[e[i]]=yi(n[e[i]]);return t}return n}function hc(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function Gp(n,t,e,r){if(!hc(n))return;const i=t[n],a=e[n];lt(i)&<(a)?Tr(i,a,r):t[n]=yi(a)}function Tr(n,t,e){const r=mt(t)?t:[t],i=r.length;if(!lt(n))return n;e=e||{};const a=e.merger||Gp;let s;for(let o=0;o<i;++o){if(s=r[o],!lt(s))continue;const l=Object.keys(s);for(let c=0,u=l.length;c<u;++c)a(l[c],n,s,e)}return n}function Sr(n,t){return Tr(n,t,{merger:Kp})}function Kp(n,t,e){if(!hc(n))return;const r=t[n],i=e[n];lt(r)&<(i)?Sr(r,i):Object.prototype.hasOwnProperty.call(t,n)||(t[n]=yi(i))}const pc={"":n=>n,x:n=>n.x,y:n=>n.y};function Qp(n){const t=n.split("."),e=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(e.push(r),r="");return e}function Zp(n){const t=Qp(n);return e=>{for(const r of t){if(r==="")break;e=e&&e[r]}return e}}function ln(n,t){return(pc[t]||(pc[t]=Zp(t)))(n)}function Ua(n){return n.charAt(0).toUpperCase()+n.slice(1)}const de=n=>typeof n<"u",fe=n=>typeof n=="function",gc=(n,t)=>{if(n.size!==t.size)return!1;for(const e of n)if(!t.has(e))return!1;return!0};function Jp(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const dt=Math.PI,kt=2*dt,tg=kt+dt,vi=Number.POSITIVE_INFINITY,Ba=dt/180,Et=dt/2,Te=dt/4,bi=dt*2/3,cn=Math.log10,Le=Math.sign;function Cr(n,t,e){return Math.abs(n-t)<e}function mc(n){const t=Math.round(n);n=Cr(n,t,n/1e3)?t:n;const e=Math.pow(10,Math.floor(cn(n))),r=n/e;return(r<=1?1:r<=2?2:r<=5?5:10)*e}function eg(n){const t=[],e=Math.sqrt(n);let r;for(r=1;r<e;r++)n%r===0&&(t.push(r),t.push(n/r));return e===(e|0)&&t.push(e),t.sort((i,a)=>i-a).pop(),t}function un(n){return!isNaN(parseFloat(n))&&isFinite(n)}function ng(n,t){const e=Math.round(n);return e-t<=n&&e+t>=n}function yc(n,t,e){let r,i,a;for(r=0,i=n.length;r<i;r++)a=n[r][e],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function Xt(n){return n*(dt/180)}function xi(n){return n*(180/dt)}function vc(n){if(!It(n))return;let t=1,e=0;for(;Math.round(n*t)/t!==n;)t*=10,e++;return e}function bc(n,t){const e=t.x-n.x,r=t.y-n.y,i=Math.sqrt(e*e+r*r);let a=Math.atan2(r,e);return a<-.5*dt&&(a+=kt),{angle:a,distance:i}}function Jn(n,t){return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))}function rg(n,t){return(n-t+tg)%kt-dt}function xe(n){return(n%kt+kt)%kt}function Mr(n,t,e,r){const i=xe(n),a=xe(t),s=xe(e),o=xe(a-i),l=xe(s-i),c=xe(i-a),u=xe(i-s);return i===a||i===s||r&&a===s||o>l&&c<u}function Qt(n,t,e){return Math.max(t,Math.min(e,n))}function ig(n){return Qt(n,-32768,32767)}function je(n,t,e,r=1e-6){return n>=Math.min(t,e)-r&&n<=Math.max(t,e)+r}function Wa(n,t,e){e=e||(s=>n[s]<t);let r=n.length-1,i=0,a;for(;r-i>1;)a=i+r>>1,e(a)?i=a:r=a;return{lo:i,hi:r}}const Ve=(n,t,e,r)=>Wa(n,e,r?i=>{const a=n[i][t];return a<e||a===e&&n[i+1][t]===e}:i=>n[i][t]<e),ag=(n,t,e)=>Wa(n,e,r=>n[r][t]>=e);function sg(n,t,e){let r=0,i=n.length;for(;r<i&&n[r]<t;)r++;for(;i>r&&n[i-1]>e;)i--;return r>0||i<n.length?n.slice(r,i):n}const xc=["push","pop","shift","splice","unshift"];function og(n,t){if(n._chartjs){n._chartjs.listeners.push(t);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),xc.forEach(e=>{const r="_onData"+Ua(e),i=n[e];Object.defineProperty(n,e,{configurable:!0,enumerable:!1,value(...a){const s=i.apply(this,a);return n._chartjs.listeners.forEach(o=>{typeof o[r]=="function"&&o[r](...a)}),s}})})}function _c(n,t){const e=n._chartjs;if(!e)return;const r=e.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(xc.forEach(a=>{delete n[a]}),delete n._chartjs)}function wc(n){const t=new Set(n);return t.size===n.length?n:Array.from(t)}const Tc=function(){return typeof window>"u"?function(n){return n()}:window.requestAnimationFrame}();function Sc(n,t){let e=[],r=!1;return function(...i){e=i,r||(r=!0,Tc.call(window,()=>{r=!1,n.apply(t,e)}))}}function lg(n,t){let e;return function(...r){return t?(clearTimeout(e),e=setTimeout(n,t,r)):n.apply(this,r),t}}const za=n=>n==="start"?"left":n==="end"?"right":"center",re=(n,t,e)=>n==="start"?t:n==="end"?e:(t+e)/2,cg=(n,t,e,r)=>n===(r?"left":"right")?e:n==="center"?(t+e)/2:t;function Cc(n,t,e){const r=t.length;let i=0,a=r;if(n._sorted){const{iScale:s,_parsed:o}=n,l=s.axis,{min:c,max:u,minDefined:d,maxDefined:f}=s.getUserBounds();d&&(i=Qt(Math.min(Ve(o,l,c).lo,e?r:Ve(t,l,s.getPixelForValue(c)).lo),0,r-1)),f?a=Qt(Math.max(Ve(o,s.axis,u,!0).hi+1,e?0:Ve(t,l,s.getPixelForValue(u),!0).hi+1),i,r)-i:a=r-i}return{start:i,count:a}}function Mc(n){const{xScale:t,yScale:e,_scaleRanges:r}=n,i={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!r)return n._scaleRanges=i,!0;const a=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==e.min||r.ymax!==e.max;return Object.assign(r,i),a}const _i=n=>n===0||n===1,Dc=(n,t,e)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-t)*kt/e)),kc=(n,t,e)=>Math.pow(2,-10*n)*Math.sin((n-t)*kt/e)+1,Dr={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*Et)+1,easeOutSine:n=>Math.sin(n*Et),easeInOutSine:n=>-.5*(Math.cos(dt*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>_i(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>_i(n)?n:Dc(n,.075,.3),easeOutElastic:n=>_i(n)?n:kc(n,.075,.3),easeInOutElastic(n){return _i(n)?n:n<.5?.5*Dc(n*2,.1125,.45):.5+.5*kc(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let t=1.70158;return(n/=.5)<1?.5*(n*n*(((t*=1.525)+1)*n-t)):.5*((n-=2)*n*(((t*=1.525)+1)*n+t)+2)},easeInBounce:n=>1-Dr.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?Dr.easeInBounce(n*2)*.5:Dr.easeOutBounce(n*2-1)*.5+.5};function Ya(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Oc(n){return Ya(n)?n:new wr(n)}function Ha(n){return Ya(n)?n:new wr(n).saturate(.5).darken(.1).hexString()}const ug=["x","y","borderWidth","radius","tension"],dg=["color","borderColor","backgroundColor"];function fg(n){n.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),n.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),n.set("animations",{colors:{type:"color",properties:dg},numbers:{type:"number",properties:ug}}),n.describe("animations",{_fallback:"animation"}),n.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function hg(n){n.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Pc=new Map;function pg(n,t){t=t||{};const e=n+JSON.stringify(t);let r=Pc.get(e);return r||(r=new Intl.NumberFormat(n,t),Pc.set(e,r)),r}function kr(n,t,e){return pg(t,e).format(n)}const Ec={values(n){return mt(n)?n:""+n},numeric(n,t,e){if(n===0)return"0";const r=this.chart.options.locale;let i,a=n;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)&&(i="scientific"),a=gg(n,e)}const s=cn(Math.abs(a)),o=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:i,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(l,this.options.ticks.format),kr(n,r,l)},logarithmic(n,t,e){if(n===0)return"0";const r=e[t].significand||n/Math.pow(10,Math.floor(cn(n)));return[1,2,3,5,10,15].includes(r)||t>.8*e.length?Ec.numeric.call(this,n,t,e):""}};function gg(n,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&n!==Math.floor(n)&&(e=n-Math.floor(n)),e}var wi={formatters:Ec};function mg(n){n.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(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:wi.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),n.route("scale.ticks","color","","color"),n.route("scale.grid","color","","borderColor"),n.route("scale.border","color","","borderColor"),n.route("scale.title","color","","color"),n.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),n.describe("scales",{_fallback:"scale"}),n.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const On=Object.create(null),$a=Object.create(null);function Or(n,t){if(!t)return n;const e=t.split(".");for(let r=0,i=e.length;r<i;++r){const a=e[r];n=n[a]||(n[a]=Object.create(null))}return n}function ja(n,t,e){return typeof t=="string"?Tr(Or(n,t),e):Tr(Or(n,""),t)}class yg{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=r=>r.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=(r,i)=>Ha(i.backgroundColor),this.hoverBorderColor=(r,i)=>Ha(i.borderColor),this.hoverColor=(r,i)=>Ha(i.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 ja(this,t,e)}get(t){return Or(this,t)}describe(t,e){return ja($a,t,e)}override(t,e){return ja(On,t,e)}route(t,e,r,i){const a=Or(this,t),s=Or(this,r),o="_"+e;Object.defineProperties(a,{[o]:{value:a[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[o],c=s[i];return lt(l)?Object.assign({},c,l):rt(l,c)},set(l){this[o]=l}}})}apply(t){t.forEach(e=>e(this))}}var Ut=new yg({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[fg,hg,mg]);function vg(n){return!n||st(n.size)||st(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function Ti(n,t,e,r,i){let a=t[i];return a||(a=t[i]=n.measureText(i).width,e.push(i)),a>r&&(r=a),r}function bg(n,t,e,r){r=r||{};let i=r.data=r.data||{},a=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},a=r.garbageCollect=[],r.font=t),n.save(),n.font=t;let s=0;const o=e.length;let l,c,u,d,f;for(l=0;l<o;l++)if(d=e[l],d!=null&&!mt(d))s=Ti(n,i,a,s,d);else if(mt(d))for(c=0,u=d.length;c<u;c++)f=d[c],f!=null&&!mt(f)&&(s=Ti(n,i,a,s,f));n.restore();const p=a.length/2;if(p>e.length){for(l=0;l<p;l++)delete i[a[l]];a.splice(0,p)}return s}function Pn(n,t,e){const r=n.currentDevicePixelRatio,i=e!==0?Math.max(e/2,.5):0;return Math.round((t-i)*r)/r+i}function Rc(n,t){!t&&!n||(t=t||n.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,n.width,n.height),t.restore())}function Va(n,t,e,r){Ac(n,t,e,r,null)}function Ac(n,t,e,r,i){let a,s,o,l,c,u,d,f;const p=t.pointStyle,y=t.rotation,x=t.radius;let g=(y||0)*Ba;if(p&&typeof p=="object"&&(a=p.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){n.save(),n.translate(e,r),n.rotate(g),n.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),n.restore();return}if(!(isNaN(x)||x<=0)){switch(n.beginPath(),p){default:i?n.ellipse(e,r,i/2,x,0,0,kt):n.arc(e,r,x,0,kt),n.closePath();break;case"triangle":u=i?i/2:x,n.moveTo(e+Math.sin(g)*u,r-Math.cos(g)*x),g+=bi,n.lineTo(e+Math.sin(g)*u,r-Math.cos(g)*x),g+=bi,n.lineTo(e+Math.sin(g)*u,r-Math.cos(g)*x),n.closePath();break;case"rectRounded":c=x*.516,l=x-c,s=Math.cos(g+Te)*l,d=Math.cos(g+Te)*(i?i/2-c:l),o=Math.sin(g+Te)*l,f=Math.sin(g+Te)*(i?i/2-c:l),n.arc(e-d,r-o,c,g-dt,g-Et),n.arc(e+f,r-s,c,g-Et,g),n.arc(e+d,r+o,c,g,g+Et),n.arc(e-f,r+s,c,g+Et,g+dt),n.closePath();break;case"rect":if(!y){l=Math.SQRT1_2*x,u=i?i/2:l,n.rect(e-u,r-l,2*u,2*l);break}g+=Te;case"rectRot":d=Math.cos(g)*(i?i/2:x),s=Math.cos(g)*x,o=Math.sin(g)*x,f=Math.sin(g)*(i?i/2:x),n.moveTo(e-d,r-o),n.lineTo(e+f,r-s),n.lineTo(e+d,r+o),n.lineTo(e-f,r+s),n.closePath();break;case"crossRot":g+=Te;case"cross":d=Math.cos(g)*(i?i/2:x),s=Math.cos(g)*x,o=Math.sin(g)*x,f=Math.sin(g)*(i?i/2:x),n.moveTo(e-d,r-o),n.lineTo(e+d,r+o),n.moveTo(e+f,r-s),n.lineTo(e-f,r+s);break;case"star":d=Math.cos(g)*(i?i/2:x),s=Math.cos(g)*x,o=Math.sin(g)*x,f=Math.sin(g)*(i?i/2:x),n.moveTo(e-d,r-o),n.lineTo(e+d,r+o),n.moveTo(e+f,r-s),n.lineTo(e-f,r+s),g+=Te,d=Math.cos(g)*(i?i/2:x),s=Math.cos(g)*x,o=Math.sin(g)*x,f=Math.sin(g)*(i?i/2:x),n.moveTo(e-d,r-o),n.lineTo(e+d,r+o),n.moveTo(e+f,r-s),n.lineTo(e-f,r+s);break;case"line":s=i?i/2:Math.cos(g)*x,o=Math.sin(g)*x,n.moveTo(e-s,r-o),n.lineTo(e+s,r+o);break;case"dash":n.moveTo(e,r),n.lineTo(e+Math.cos(g)*(i?i/2:x),r+Math.sin(g)*x);break;case!1:n.closePath();break}n.fill(),t.borderWidth>0&&n.stroke()}}function qe(n,t,e){return e=e||.5,!t||n&&n.x>t.left-e&&n.x<t.right+e&&n.y>t.top-e&&n.y<t.bottom+e}function Pr(n,t){n.save(),n.beginPath(),n.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),n.clip()}function Er(n){n.restore()}function xg(n,t,e,r,i){if(!t)return n.lineTo(e.x,e.y);if(i==="middle"){const a=(t.x+e.x)/2;n.lineTo(a,t.y),n.lineTo(a,e.y)}else i==="after"!=!!r?n.lineTo(t.x,e.y):n.lineTo(e.x,t.y);n.lineTo(e.x,e.y)}function _g(n,t,e,r){if(!t)return n.lineTo(e.x,e.y);n.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?e.cp2x:e.cp1x,r?e.cp2y:e.cp1y,e.x,e.y)}function wg(n,t){t.translation&&n.translate(t.translation[0],t.translation[1]),st(t.rotation)||n.rotate(t.rotation),t.color&&(n.fillStyle=t.color),t.textAlign&&(n.textAlign=t.textAlign),t.textBaseline&&(n.textBaseline=t.textBaseline)}function Tg(n,t,e,r,i){if(i.strikethrough||i.underline){const a=n.measureText(r),s=t-a.actualBoundingBoxLeft,o=t+a.actualBoundingBoxRight,l=e-a.actualBoundingBoxAscent,c=e+a.actualBoundingBoxDescent,u=i.strikethrough?(l+c)/2:c;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=i.decorationWidth||2,n.moveTo(s,u),n.lineTo(o,u),n.stroke()}}function Sg(n,t){const e=n.fillStyle;n.fillStyle=t.color,n.fillRect(t.left,t.top,t.width,t.height),n.fillStyle=e}function En(n,t,e,r,i,a={}){const s=mt(t)?t:[t],o=a.strokeWidth>0&&a.strokeColor!=="";let l,c;for(n.save(),n.font=i.string,wg(n,a),l=0;l<s.length;++l)c=s[l],a.backdrop&&Sg(n,a.backdrop),o&&(a.strokeColor&&(n.strokeStyle=a.strokeColor),st(a.strokeWidth)||(n.lineWidth=a.strokeWidth),n.strokeText(c,e,r,a.maxWidth)),n.fillText(c,e,r,a.maxWidth),Tg(n,e,r,c,a),r+=Number(i.lineHeight);n.restore()}function tr(n,t){const{x:e,y:r,w:i,h:a,radius:s}=t;n.arc(e+s.topLeft,r+s.topLeft,s.topLeft,1.5*dt,dt,!0),n.lineTo(e,r+a-s.bottomLeft),n.arc(e+s.bottomLeft,r+a-s.bottomLeft,s.bottomLeft,dt,Et,!0),n.lineTo(e+i-s.bottomRight,r+a),n.arc(e+i-s.bottomRight,r+a-s.bottomRight,s.bottomRight,Et,0,!0),n.lineTo(e+i,r+s.topRight),n.arc(e+i-s.topRight,r+s.topRight,s.topRight,0,-Et,!0),n.lineTo(e+s.topLeft,r)}const Cg=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Mg=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Dg(n,t){const e=(""+n).match(Cg);if(!e||e[1]==="normal")return t*1.2;switch(n=+e[2],e[3]){case"px":return n;case"%":n/=100;break}return t*n}const kg=n=>+n||0;function qa(n,t){const e={},r=lt(t),i=r?Object.keys(t):t,a=lt(n)?r?s=>rt(n[s],n[t[s]]):s=>n[s]:()=>n;for(const s of i)e[s]=kg(a(s));return e}function Lc(n){return qa(n,{top:"y",right:"x",bottom:"y",left:"x"})}function dn(n){return qa(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Gt(n){const t=Lc(n);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Rt(n,t){n=n||{},t=t||Ut.font;let e=rt(n.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let r=rt(n.style,t.style);r&&!(""+r).match(Mg)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:rt(n.family,t.family),lineHeight:Dg(rt(n.lineHeight,t.lineHeight),e),size:e,style:r,weight:rt(n.weight,t.weight),string:""};return i.string=vg(i),i}function Rr(n,t,e,r){let i=!0,a,s,o;for(a=0,s=n.length;a<s;++a)if(o=n[a],o!==void 0&&(t!==void 0&&typeof o=="function"&&(o=o(t),i=!1),e!==void 0&&mt(o)&&(o=o[e%o.length],i=!1),o!==void 0))return r&&!i&&(r.cacheable=!1),o}function Og(n,t,e){const{min:r,max:i}=n,a=fc(t,(i-r)/2),s=(o,l)=>e&&o===0?0:o+l;return{min:s(r,-Math.abs(a)),max:s(i,a)}}function fn(n,t){return Object.assign(Object.create(n),t)}function Xa(n,t=[""],e,r,i=()=>n[0]){const a=e||n;typeof r>"u"&&(r=Bc("_fallback",n));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:a,_fallback:r,_getTarget:i,override:o=>Xa([o,...n],t,a,r)};return new Proxy(s,{deleteProperty(o,l){return delete o[l],delete o._keys,delete n[0][l],!0},get(o,l){return Nc(o,l,()=>Fg(l,t,n,o))},getOwnPropertyDescriptor(o,l){return Reflect.getOwnPropertyDescriptor(o._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(o,l){return Wc(o).includes(l)},ownKeys(o){return Wc(o)},set(o,l,c){const u=o._storage||(o._storage=i());return o[l]=u[l]=c,delete o._keys,!0}})}function er(n,t,e,r){const i={_cacheable:!1,_proxy:n,_context:t,_subProxy:e,_stack:new Set,_descriptors:Ic(n,r),setContext:a=>er(n,a,e,r),override:a=>er(n.override(a),t,e,r)};return new Proxy(i,{deleteProperty(a,s){return delete a[s],delete n[s],!0},get(a,s,o){return Nc(a,s,()=>Eg(a,s,o))},getOwnPropertyDescriptor(a,s){return a._descriptors.allKeys?Reflect.has(n,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,s)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(a,s){return Reflect.has(n,s)},ownKeys(){return Reflect.ownKeys(n)},set(a,s,o){return n[s]=o,delete a[s],!0}})}function Ic(n,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=n;return{allKeys:i,scriptable:e,indexable:r,isScriptable:fe(e)?e:()=>e,isIndexable:fe(r)?r:()=>r}}const Pg=(n,t)=>n?n+Ua(t):t,Ga=(n,t)=>lt(t)&&n!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Nc(n,t,e){if(Object.prototype.hasOwnProperty.call(n,t)||t==="constructor")return n[t];const r=e();return n[t]=r,r}function Eg(n,t,e){const{_proxy:r,_context:i,_subProxy:a,_descriptors:s}=n;let o=r[t];return fe(o)&&s.isScriptable(t)&&(o=Rg(t,o,n,e)),mt(o)&&o.length&&(o=Ag(t,o,n,s.isIndexable)),Ga(t,o)&&(o=er(o,i,a&&a[t],s)),o}function Rg(n,t,e,r){const{_proxy:i,_context:a,_subProxy:s,_stack:o}=e;if(o.has(n))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+n);o.add(n);let l=t(a,s||r);return o.delete(n),Ga(n,l)&&(l=Ka(i._scopes,i,n,l)),l}function Ag(n,t,e,r){const{_proxy:i,_context:a,_subProxy:s,_descriptors:o}=e;if(typeof a.index<"u"&&r(n))return t[a.index%t.length];if(lt(t[0])){const l=t,c=i._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=Ka(c,i,n,u);t.push(er(d,a,s&&s[n],o))}}return t}function Fc(n,t,e){return fe(n)?n(t,e):n}const Lg=(n,t)=>n===!0?t:typeof n=="string"?ln(t,n):void 0;function Ig(n,t,e,r,i){for(const a of t){const s=Lg(e,a);if(s){n.add(s);const o=Fc(s._fallback,e,i);if(typeof o<"u"&&o!==e&&o!==r)return o}else if(s===!1&&typeof r<"u"&&e!==r)return null}return!1}function Ka(n,t,e,r){const i=t._rootScopes,a=Fc(t._fallback,e,r),s=[...n,...i],o=new Set;o.add(r);let l=Uc(o,s,e,a||e,r);return l===null||typeof a<"u"&&a!==e&&(l=Uc(o,s,a,l,r),l===null)?!1:Xa(Array.from(o),[""],i,a,()=>Ng(t,e,r))}function Uc(n,t,e,r,i){for(;e;)e=Ig(n,t,e,r,i);return e}function Ng(n,t,e){const r=n._getTarget();t in r||(r[t]={});const i=r[t];return mt(i)&<(e)?e:i||{}}function Fg(n,t,e,r){let i;for(const a of t)if(i=Bc(Pg(a,n),e),typeof i<"u")return Ga(n,i)?Ka(e,r,n,i):i}function Bc(n,t){for(const e of t){if(!e)continue;const r=e[n];if(typeof r<"u")return r}}function Wc(n){let t=n._keys;return t||(t=n._keys=Ug(n._scopes)),t}function Ug(n){const t=new Set;for(const e of n)for(const r of Object.keys(e).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}function zc(n,t,e,r){const{iScale:i}=n,{key:a="r"}=this._parsing,s=new Array(r);let o,l,c,u;for(o=0,l=r;o<l;++o)c=o+e,u=t[c],s[o]={r:i.parse(ln(u,a),c)};return s}const Bg=Number.EPSILON||1e-14,nr=(n,t)=>t<n.length&&!n[t].skip&&n[t],Yc=n=>n==="x"?"y":"x";function Wg(n,t,e,r){const i=n.skip?t:n,a=t,s=e.skip?t:e,o=Jn(a,i),l=Jn(s,a);let c=o/(o+l),u=l/(o+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=r*c,f=r*u;return{previous:{x:a.x-d*(s.x-i.x),y:a.y-d*(s.y-i.y)},next:{x:a.x+f*(s.x-i.x),y:a.y+f*(s.y-i.y)}}}function zg(n,t,e){const r=n.length;let i,a,s,o,l,c=nr(n,0);for(let u=0;u<r-1;++u)if(l=c,c=nr(n,u+1),!(!l||!c)){if(Cr(t[u],0,Bg)){e[u]=e[u+1]=0;continue}i=e[u]/t[u],a=e[u+1]/t[u],o=Math.pow(i,2)+Math.pow(a,2),!(o<=9)&&(s=3/Math.sqrt(o),e[u]=i*s*t[u],e[u+1]=a*s*t[u])}}function Yg(n,t,e="x"){const r=Yc(e),i=n.length;let a,s,o,l=nr(n,0);for(let c=0;c<i;++c){if(s=o,o=l,l=nr(n,c+1),!o)continue;const u=o[e],d=o[r];s&&(a=(u-s[e])/3,o[`cp1${e}`]=u-a,o[`cp1${r}`]=d-a*t[c]),l&&(a=(l[e]-u)/3,o[`cp2${e}`]=u+a,o[`cp2${r}`]=d+a*t[c])}}function Hg(n,t="x"){const e=Yc(t),r=n.length,i=Array(r).fill(0),a=Array(r);let s,o,l,c=nr(n,0);for(s=0;s<r;++s)if(o=l,l=c,c=nr(n,s+1),!!l){if(c){const u=c[t]-l[t];i[s]=u!==0?(c[e]-l[e])/u:0}a[s]=o?c?Le(i[s-1])!==Le(i[s])?0:(i[s-1]+i[s])/2:i[s-1]:i[s]}zg(n,i,a),Yg(n,a,t)}function Si(n,t,e){return Math.max(Math.min(n,e),t)}function $g(n,t){let e,r,i,a,s,o=qe(n[0],t);for(e=0,r=n.length;e<r;++e)s=a,a=o,o=e<r-1&&qe(n[e+1],t),a&&(i=n[e],s&&(i.cp1x=Si(i.cp1x,t.left,t.right),i.cp1y=Si(i.cp1y,t.top,t.bottom)),o&&(i.cp2x=Si(i.cp2x,t.left,t.right),i.cp2y=Si(i.cp2y,t.top,t.bottom)))}function jg(n,t,e,r,i){let a,s,o,l;if(t.spanGaps&&(n=n.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")Hg(n,i);else{let c=r?n[n.length-1]:n[0];for(a=0,s=n.length;a<s;++a)o=n[a],l=Wg(c,o,n[Math.min(a+1,s-(r?0:1))%s],t.tension),o.cp1x=l.previous.x,o.cp1y=l.previous.y,o.cp2x=l.next.x,o.cp2y=l.next.y,c=o}t.capBezierPoints&&$g(n,e)}function Qa(){return typeof window<"u"&&typeof document<"u"}function Za(n){let t=n.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Ci(n,t,e){let r;return typeof n=="string"?(r=parseInt(n,10),n.indexOf("%")!==-1&&(r=r/100*t.parentNode[e])):r=n,r}const Mi=n=>n.ownerDocument.defaultView.getComputedStyle(n,null);function Vg(n,t){return Mi(n).getPropertyValue(t)}const qg=["top","right","bottom","left"];function Rn(n,t,e){const r={};e=e?"-"+e:"";for(let i=0;i<4;i++){const a=qg[i];r[a]=parseFloat(n[t+"-"+a+e])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const Xg=(n,t,e)=>(n>0||t>0)&&(!e||!e.shadowRoot);function Gg(n,t){const e=n.touches,r=e&&e.length?e[0]:n,{offsetX:i,offsetY:a}=r;let s=!1,o,l;if(Xg(i,a,n.target))o=i,l=a;else{const c=t.getBoundingClientRect();o=r.clientX-c.left,l=r.clientY-c.top,s=!0}return{x:o,y:l,box:s}}function hn(n,t){if("native"in n)return n;const{canvas:e,currentDevicePixelRatio:r}=t,i=Mi(e),a=i.boxSizing==="border-box",s=Rn(i,"padding"),o=Rn(i,"border","width"),{x:l,y:c,box:u}=Gg(n,e),d=s.left+(u&&o.left),f=s.top+(u&&o.top);let{width:p,height:y}=t;return a&&(p-=s.width+o.width,y-=s.height+o.height),{x:Math.round((l-d)/p*e.width/r),y:Math.round((c-f)/y*e.height/r)}}function Kg(n,t,e){let r,i;if(t===void 0||e===void 0){const a=n&&Za(n);if(!a)t=n.clientWidth,e=n.clientHeight;else{const s=a.getBoundingClientRect(),o=Mi(a),l=Rn(o,"border","width"),c=Rn(o,"padding");t=s.width-c.width-l.width,e=s.height-c.height-l.height,r=Ci(o.maxWidth,a,"clientWidth"),i=Ci(o.maxHeight,a,"clientHeight")}}return{width:t,height:e,maxWidth:r||vi,maxHeight:i||vi}}const Di=n=>Math.round(n*10)/10;function Qg(n,t,e,r){const i=Mi(n),a=Rn(i,"margin"),s=Ci(i.maxWidth,n,"clientWidth")||vi,o=Ci(i.maxHeight,n,"clientHeight")||vi,l=Kg(n,t,e);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const f=Rn(i,"border","width"),p=Rn(i,"padding");c-=p.width+f.width,u-=p.height+f.height}return c=Math.max(0,c-a.width),u=Math.max(0,r?c/r:u-a.height),c=Di(Math.min(c,s,l.maxWidth)),u=Di(Math.min(u,o,l.maxHeight)),c&&!u&&(u=Di(c/2)),(t!==void 0||e!==void 0)&&r&&l.height&&u>l.height&&(u=l.height,c=Di(Math.floor(u*r))),{width:c,height:u}}function Hc(n,t,e){const r=t||1,i=Math.floor(n.height*r),a=Math.floor(n.width*r);n.height=Math.floor(n.height),n.width=Math.floor(n.width);const s=n.canvas;return s.style&&(e||!s.style.height&&!s.style.width)&&(s.style.height=`${n.height}px`,s.style.width=`${n.width}px`),n.currentDevicePixelRatio!==r||s.height!==i||s.width!==a?(n.currentDevicePixelRatio=r,s.height=i,s.width=a,n.ctx.setTransform(r,0,0,r,0,0),!0):!1}const Zg=function(){let n=!1;try{const t={get passive(){return n=!0,!1}};Qa()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return n}();function $c(n,t){const e=Vg(n,t),r=e&&e.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function An(n,t,e,r){return{x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}}function Jg(n,t,e,r){return{x:n.x+e*(t.x-n.x),y:r==="middle"?e<.5?n.y:t.y:r==="after"?e<1?n.y:t.y:e>0?t.y:n.y}}function tm(n,t,e,r){const i={x:n.cp2x,y:n.cp2y},a={x:t.cp1x,y:t.cp1y},s=An(n,i,e),o=An(i,a,e),l=An(a,t,e),c=An(s,o,e),u=An(o,l,e);return An(c,u,e)}const em=function(n,t){return{x(e){return n+n+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,r){return e-r},leftForLtr(e,r){return e-r}}},nm=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,t){return n+t},leftForLtr(n,t){return n}}};function rr(n,t,e){return n?em(t,e):nm()}function jc(n,t){let e,r;(t==="ltr"||t==="rtl")&&(e=n.canvas.style,r=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),n.prevTextDirection=r)}function Vc(n,t){t!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",t[0],t[1]))}function qc(n){return n==="angle"?{between:Mr,compare:rg,normalize:xe}:{between:je,compare:(t,e)=>t-e,normalize:t=>t}}function Xc({start:n,end:t,count:e,loop:r,style:i}){return{start:n%e,end:t%e,loop:r&&(t-n+1)%e===0,style:i}}function rm(n,t,e){const{property:r,start:i,end:a}=e,{between:s,normalize:o}=qc(r),l=t.length;let{start:c,end:u,loop:d}=n,f,p;if(d){for(c+=l,u+=l,f=0,p=l;f<p&&s(o(t[c%l][r]),i,a);++f)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:n.style}}function Gc(n,t,e){if(!e)return[n];const{property:r,start:i,end:a}=e,s=t.length,{compare:o,between:l,normalize:c}=qc(r),{start:u,end:d,loop:f,style:p}=rm(n,t,e),y=[];let x=!1,g=null,m,v,b;const w=()=>l(i,b,m)&&o(i,b)!==0,T=()=>o(a,m)===0||l(a,b,m),M=()=>x||w(),k=()=>!x||T();for(let S=u,C=u;S<=d;++S)v=t[S%s],!v.skip&&(m=c(v[r]),m!==b&&(x=l(m,i,a),g===null&&M()&&(g=o(m,i)===0?S:C),g!==null&&k()&&(y.push(Xc({start:g,end:S,loop:f,count:s,style:p})),g=null),C=S,b=m));return g!==null&&y.push(Xc({start:g,end:d,loop:f,count:s,style:p})),y}function Kc(n,t){const e=[],r=n.segments;for(let i=0;i<r.length;i++){const a=Gc(r[i],n.points,t);a.length&&e.push(...a)}return e}function im(n,t,e,r){let i=0,a=t-1;if(e&&!r)for(;i<t&&!n[i].skip;)i++;for(;i<t&&n[i].skip;)i++;for(i%=t,e&&(a+=i);a>i&&n[a%t].skip;)a--;return a%=t,{start:i,end:a}}function am(n,t,e,r){const i=n.length,a=[];let s=t,o=n[t],l;for(l=t+1;l<=e;++l){const c=n[l%i];c.skip||c.stop?o.skip||(r=!1,a.push({start:t%i,end:(l-1)%i,loop:r}),t=s=c.stop?l:null):(s=l,o.skip&&(t=l)),o=c}return s!==null&&a.push({start:t%i,end:s%i,loop:r}),a}function sm(n,t){const e=n.points,r=n.options.spanGaps,i=e.length;if(!i)return[];const a=!!n._loop,{start:s,end:o}=im(e,i,a,r);if(r===!0)return Qc(n,[{start:s,end:o,loop:a}],e,t);const l=o<s?o+i:o,c=!!n._fullLoop&&s===0&&o===i-1;return Qc(n,am(e,s,l,c),e,t)}function Qc(n,t,e,r){return!r||!r.setContext||!e?t:om(n,t,e,r)}function om(n,t,e,r){const i=n._chart.getContext(),a=Zc(n.options),{_datasetIndex:s,options:{spanGaps:o}}=n,l=e.length,c=[];let u=a,d=t[0].start,f=d;function p(y,x,g,m){const v=o?-1:1;if(y!==x){for(y+=l;e[y%l].skip;)y-=v;for(;e[x%l].skip;)x+=v;y%l!==x%l&&(c.push({start:y%l,end:x%l,loop:g,style:m}),u=m,d=x%l)}}for(const y of t){d=o?d:y.start;let x=e[d%l],g;for(f=d+1;f<=y.end;f++){const m=e[f%l];g=Zc(r.setContext(fn(i,{type:"segment",p0:x,p1:m,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:s}))),lm(g,u)&&p(d,f-1,y.loop,u),x=m,u=g}d<f-1&&p(d,f-1,y.loop,u)}return c}function Zc(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function lm(n,t){if(!t)return!1;const e=[],r=function(i,a){return Ya(a)?(e.includes(a)||e.push(a),e.indexOf(a)):a};return JSON.stringify(n,r)!==JSON.stringify(t,r)}/*!
|
|
12
12
|
* Chart.js v4.4.3
|
|
13
13
|
* https://www.chartjs.org
|
|
14
14
|
* (c) 2024 Chart.js Contributors
|
|
15
15
|
* Released under the MIT License
|
|
16
|
-
*/class om{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,r){const a=e.listeners[r],s=e.duration;a.forEach(o=>o({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(i-e.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=wc.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,r)=>{if(!i.running||!i.items.length)return;const a=i.items;let s=a.length-1,o=!1,l;for(;s>=0;--s)l=a[s],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(t),o=!0):(a[s]=a[a.length-1],a.pop());o&&(r.draw(),this._notify(r,i,t,"progress")),a.length||(i.running=!1,this._notify(r,i,t,"complete"),i.initial=!1),e+=a.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}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((i,r)=>Math.max(i,r._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 i=e.items;let r=i.length-1;for(;r>=0;--r)i[r].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Xe=new om;const Zc="transparent",lm={boolean(n,t,e){return e>.5?t:n},color(n,t,e){const i=kc(n||Zc),r=i.valid&&kc(t||Zc);return r&&r.valid?r.mix(i,e).hexString():t},number(n,t,e){return n+(t-n)*e}};class cm{constructor(t,e,i,r){const a=e[i];r=Ri([t.to,r,a,t.from]);const s=Ri([t.from,a,r]);this._active=!0,this._fn=t.fn||lm[t.type||typeof s],this._easing=Di[t.easing]||Di.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=i,this._from=s,this._to=r,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const r=this._target[this._prop],a=i-this._start,s=this._duration-a;this._start=i,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=Ri([t.to,e,r,t.from]),this._from=Ri([t.from,r,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,r=this._prop,a=this._from,s=this._loop,o=this._to;let l;if(this._active=a!==o&&(s||e<i),!this._active){this._target[r]=o,this._notify(!0);return}if(e<0){this._target[r]=a;return}l=e/i%2,l=s&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[r]=this._fn(a,o,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let r=0;r<i.length;r++)i[r][e]()}}class Ja{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!lt(t))return;const e=Object.keys(Ut.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(r=>{const a=t[r];if(!lt(a))return;const s={};for(const o of e)s[o]=a[o];(mt(a.properties)&&a.properties||[r]).forEach(o=>{(o===r||!i.has(o))&&i.set(o,s)})})}_animateOptions(t,e){const i=e.options,r=dm(t,i);if(!r)return[];const a=this._createAnimations(r,i);return i.$shared&&um(t.options.$animations,i).then(()=>{t.options=i},()=>{}),a}_createAnimations(t,e){const i=this._properties,r=[],a=t.$animations||(t.$animations={}),s=Object.keys(e),o=Date.now();let l;for(l=s.length-1;l>=0;--l){const c=s[l];if(c.charAt(0)==="$")continue;if(c==="options"){r.push(...this._animateOptions(t,e));continue}const u=e[c];let d=a[c];const f=i.get(c);if(d)if(f&&d.active()){d.update(f,u,o);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}a[c]=d=new cm(f,t,c,u),r.push(d)}return r}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const i=this._createAnimations(t,e);if(i.length)return Xe.add(this._chart,i),!0}}function um(n,t){const e=[],i=Object.keys(t);for(let r=0;r<i.length;r++){const a=n[i[r]];a&&a.active()&&e.push(a.wait())}return Promise.all(e)}function dm(n,t){if(!t)return;let e=n.options;if(!e){n.options=t;return}return e.$shared&&(n.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function Jc(n,t){const e=n&&n.options||{},i=e.reverse,r=e.min===void 0?t:0,a=e.max===void 0?t:0;return{start:i?a:r,end:i?r:a}}function fm(n,t,e){if(e===!1)return!1;const i=Jc(n,e),r=Jc(t,e);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}function hm(n){let t,e,i,r;return lt(n)?(t=n.top,e=n.right,i=n.bottom,r=n.left):t=e=i=r=n,{top:t,right:e,bottom:i,left:r,disabled:n===!1}}function tu(n,t){const e=[],i=n._getSortedDatasetMetas(t);let r,a;for(r=0,a=i.length;r<a;++r)e.push(i[r].index);return e}function eu(n,t,e,i={}){const r=n.keys,a=i.mode==="single";let s,o,l,c;if(t!==null){for(s=0,o=r.length;s<o;++s){if(l=+r[s],l===e){if(i.all)continue;break}c=n.values[l],It(c)&&(a||t===0||Le(t)===Le(c))&&(t+=c)}return t}}function pm(n,t){const{iScale:e,vScale:i}=t,r=e.axis==="x"?"x":"y",a=i.axis==="x"?"x":"y",s=Object.keys(n),o=new Array(s.length);let l,c,u;for(l=0,c=s.length;l<c;++l)u=s[l],o[l]={[r]:u,[a]:n[u]};return o}function nu(n,t){const e=n&&n.options.stacked;return e||e===void 0&&t.stack!==void 0}function gm(n,t,e){return`${n.id}.${t.id}.${e.stack||e.type}`}function mm(n){const{min:t,max:e,minDefined:i,maxDefined:r}=n.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:r?e:Number.POSITIVE_INFINITY}}function ym(n,t,e){const i=n[t]||(n[t]={});return i[e]||(i[e]={})}function iu(n,t,e,i){for(const r of t.getMatchingVisibleMetas(i).reverse()){const a=n[r.index];if(e&&a>0||!e&&a<0)return r.index}return null}function ru(n,t){const{chart:e,_cachedMeta:i}=n,r=e._stacks||(e._stacks={}),{iScale:a,vScale:s,index:o}=i,l=a.axis,c=s.axis,u=gm(a,s,i),d=t.length;let f;for(let p=0;p<d;++p){const y=t[p],{[l]:x,[c]:g}=y,m=y._stacks||(y._stacks={});f=m[c]=ym(r,u,x),f[o]=g,f._top=iu(f,s,!0,i.type),f._bottom=iu(f,s,!1,i.type);const v=f._visualValues||(f._visualValues={});v[o]=g}}function ts(n,t){const e=n.scales;return Object.keys(e).filter(i=>e[i].axis===t).shift()}function vm(n,t){return fn(n,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function bm(n,t,e){return fn(n,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Ai(n,t){const e=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){t=t||n._parsed;for(const r of t){const a=r._stacks;if(!a||a[i]===void 0||a[i][e]===void 0)return;delete a[i][e],a[i]._visualValues!==void 0&&a[i]._visualValues[e]!==void 0&&delete a[i]._visualValues[e]}}}const es=n=>n==="reset"||n==="none",au=(n,t)=>t?n:Object.assign({},n),xm=(n,t,e)=>n&&!t.hidden&&t._stacked&&{keys:tu(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=nu(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&&Ai(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),r=(d,f,p,y)=>d==="x"?f:d==="r"?y:p,a=e.xAxisID=it(i.xAxisID,ts(t,"x")),s=e.yAxisID=it(i.yAxisID,ts(t,"y")),o=e.rAxisID=it(i.rAxisID,ts(t,"r")),l=e.indexAxis,c=e.iAxisID=r(l,a,s,o),u=e.vAxisID=r(l,s,a,o);e.xScale=this.getScaleForId(a),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(o),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(u)}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&&xc(this._data,this),t._stacked&&Ai(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(lt(e)){const r=this._cachedMeta;this._data=pm(e,r)}else if(i!==e){if(i){xc(i,this);const r=this._cachedMeta;Ai(r),r._parsed=[]}e&&Object.isExtensible(e)&&ag(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,i=this.getDataset();let r=!1;this._dataCheck();const a=e._stacked;e._stacked=nu(e.vScale,e),e.stack!==i.stack&&(r=!0,Ai(e),e.stack=i.stack),this._resyncElements(t),(r||a!==e._stacked)&&ru(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:r}=this,{iScale:a,_stacked:s}=i,o=a.axis;let l=t===0&&e===r.length?!0:i._sorted,c=t>0&&i._parsed[t-1],u,d,f;if(this._parsing===!1)i._parsed=r,i._sorted=!0,f=r;else{mt(r[t])?f=this.parseArrayData(i,r,t,e):lt(r[t])?f=this.parseObjectData(i,r,t,e):f=this.parsePrimitiveData(i,r,t,e);const p=()=>d[o]===null||c&&d[o]<c[o];for(u=0;u<e;++u)i._parsed[u+t]=d=f[u],l&&(p()&&(l=!1),c=d);i._sorted=l}s&&ru(this,f)}parsePrimitiveData(t,e,i,r){const{iScale:a,vScale:s}=t,o=a.axis,l=s.axis,c=a.getLabels(),u=a===s,d=new Array(r);let f,p,y;for(f=0,p=r;f<p;++f)y=f+i,d[f]={[o]:u||a.parse(c[y],y),[l]:s.parse(e[y],y)};return d}parseArrayData(t,e,i,r){const{xScale:a,yScale:s}=t,o=new Array(r);let l,c,u,d;for(l=0,c=r;l<c;++l)u=l+i,d=e[u],o[l]={x:a.parse(d[0],u),y:s.parse(d[1],u)};return o}parseObjectData(t,e,i,r){const{xScale:a,yScale:s}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,c=new Array(r);let u,d,f,p;for(u=0,d=r;u<d;++u)f=u+i,p=e[f],c[u]={x:a.parse(ln(p,o),f),y:s.parse(ln(p,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const r=this.chart,a=this._cachedMeta,s=e[t.axis],o={keys:tu(r,!0),values:e._stacks[t.axis]._visualValues};return eu(o,s,a.index,{mode:i})}updateRangeFromParsed(t,e,i,r){const a=i[e.axis];let s=a===null?NaN:a;const o=r&&i._stacks[e.axis];r&&o&&(r.values=o,s=eu(r,a,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){const i=this._cachedMeta,r=i._parsed,a=i._sorted&&t===i.iScale,s=r.length,o=this._getOtherScale(t),l=xm(e,i,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=mm(o);let f,p;function y(){p=r[f];const x=p[o.axis];return!It(p[t.axis])||u>x||d<x}for(f=0;f<s&&!(!y()&&(this.updateRangeFromParsed(c,t,p,l),a));++f);if(a){for(f=s-1;f>=0;--f)if(!y()){this.updateRangeFromParsed(c,t,p,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let r,a,s;for(r=0,a=e.length;r<a;++r)s=e[r][t.axis],It(s)&&i.push(s);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,r=e.vScale,a=this.getParsed(t);return{label:i?""+i.getLabelForValue(a[i.axis]):"",value:r?""+r.getLabelForValue(a[r.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=hm(it(this.options.clip,fm(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,r=i.data||[],a=e.chartArea,s=[],o=this._drawStart||0,l=this._drawCount||r.length-o,c=this.options.drawActiveElementsOnTop;let u;for(i.dataset&&i.dataset.draw(t,a,o,l),u=o;u<o+l;++u){const d=r[u];d.hidden||(d.active&&c?s.push(d):d.draw(t,a))}for(u=0;u<s.length;++u)s[u].draw(t,a)}getStyle(t,e){const i=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const r=this.getDataset();let a;if(t>=0&&t<this._cachedMeta.data.length){const s=this._cachedMeta.data[t];a=s.$context||(s.$context=bm(this.getContext(),t,s)),a.parsed=this.getParsed(t),a.raw=r.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=vm(this.chart.getContext(),this.index)),a.dataset=r,a.index=a.datasetIndex=this.index;return a.active=!!e,a.mode=i,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const r=e==="active",a=this._cachedDataOpts,s=t+"-"+e,o=a[s],l=this.enableOptionSharing&&de(i);if(o)return au(o,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=r?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),p=Object.keys(Ut.elements[t]),y=()=>this.getContext(i,r,e),x=c.resolveNamedOptions(f,p,y,d);return x.$shared&&(x.$shared=l,a[s]=Object.freeze(au(x,l))),x}_resolveAnimations(t,e,i){const r=this.chart,a=this._cachedDataOpts,s=`animation-${e}`,o=a[s];if(o)return o;let l;if(r.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,e),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(t,i,e))}const c=new Ja(r,l&&l.animations);return l&&l._cacheable&&(a[s]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||es(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),r=this._sharedOptions,a=this.getSharedOptions(i),s=this.includeOptions(e,a)||a!==r;return this.updateSharedOptions(a,e,i),{sharedOptions:a,includeOptions:s}}updateElement(t,e,i,r){es(r)?Object.assign(t,i):this._resolveAnimations(e,r).update(t,i)}updateSharedOptions(t,e,i){t&&!es(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,r){t.active=r;const a=this.getStyle(e,r);this._resolveAnimations(e,i,r).update(t,{options:!r&&this.getSharedOptions(a)||a})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"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,i=this._cachedMeta.data;for(const[o,l,c]of this._syncList)this[o](l,c);this._syncList=[];const r=i.length,a=e.length,s=Math.min(a,r);s&&this.parse(0,s),a>r?this._insertElements(r,a-r,t):a<r&&this._removeElements(a,r-a)}_insertElements(t,e,i=!0){const r=this._cachedMeta,a=r.data,s=t+e;let o;const l=c=>{for(c.length+=e,o=c.length-1;o>=s;o--)c[o]=c[o-e]};for(l(a),o=t;o<s;++o)a[o]=new this.dataElementType;this._parsing&&l(r._parsed),this.parse(t,e),i&&this.updateElements(a,t,e,"reset")}updateElements(t,e,i,r){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const r=i._parsed.splice(t,e);i._stacked&&Ai(i,r)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,r]=t;this[e](i,r)}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 i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}H(Oe,"defaults",{}),H(Oe,"datasetElementType",null),H(Oe,"dataElementType",null);function _m(n,t){if(!n._cache.$bar){const e=n.getMatchingVisibleMetas(t);let i=[];for(let r=0,a=e.length;r<a;r++)i=i.concat(e[r].controller.getAllParsedValues(n));n._cache.$bar=_c(i.sort((r,a)=>r-a))}return n._cache.$bar}function wm(n){const t=n.iScale,e=_m(t,n.type);let i=t._length,r,a,s,o;const l=()=>{s===32767||s===-32768||(de(o)&&(i=Math.min(i,Math.abs(s-o)||i)),o=s)};for(r=0,a=e.length;r<a;++r)s=t.getPixelForValue(e[r]),l();for(o=void 0,r=0,a=t.ticks.length;r<a;++r)s=t.getPixelForTick(r),l();return i}function Tm(n,t,e,i){const r=e.barThickness;let a,s;return st(r)?(a=t.min*e.categoryPercentage,s=e.barPercentage):(a=r*i,s=1),{chunk:a/i,ratio:s,start:t.pixels[n]-a/2}}function Sm(n,t,e,i){const r=t.pixels,a=r[n];let s=n>0?r[n-1]:null,o=n<r.length-1?r[n+1]:null;const l=e.categoryPercentage;s===null&&(s=a-(o===null?t.end-t.start:o-a)),o===null&&(o=a+a-s);const c=a-(a-Math.min(s,o))/2*l;return{chunk:Math.abs(o-s)/2*l/i,ratio:e.barPercentage,start:c}}function Cm(n,t,e,i){const r=e.parse(n[0],i),a=e.parse(n[1],i),s=Math.min(r,a),o=Math.max(r,a);let l=s,c=o;Math.abs(s)>Math.abs(o)&&(l=o,c=s),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:r,end:a,min:s,max:o}}function su(n,t,e,i){return mt(n)?Cm(n,t,e,i):t[e.axis]=e.parse(n,i),t}function ou(n,t,e,i){const r=n.iScale,a=n.vScale,s=r.getLabels(),o=r===a,l=[];let c,u,d,f;for(c=e,u=e+i;c<u;++c)f=t[c],d={},d[r.axis]=o||r.parse(s[c],c),l.push(su(f,d,a,c));return l}function ns(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function Mm(n,t,e){return n!==0?Le(n):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function Dm(n){let t,e,i,r,a;return n.horizontal?(t=n.base>n.x,e="left",i="right"):(t=n.base<n.y,e="bottom",i="top"),t?(r="end",a="start"):(r="start",a="end"),{start:e,end:i,reverse:t,top:r,bottom:a}}function km(n,t,e,i){let r=t.borderSkipped;const a={};if(!r){n.borderSkipped=a;return}if(r===!0){n.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:o,reverse:l,top:c,bottom:u}=Dm(n);r==="middle"&&e&&(n.enableBorderRadius=!0,(e._top||0)===i?r=c:(e._bottom||0)===i?r=u:(a[lu(u,s,o,l)]=!0,r=c)),a[lu(r,s,o,l)]=!0,n.borderSkipped=a}function lu(n,t,e,i){return i?(n=Om(n,t,e),n=cu(n,e,t)):n=cu(n,t,e),n}function Om(n,t,e){return n===t?e:n===e?t:n}function cu(n,t,e){return n==="start"?t:n==="end"?e:n}function Pm(n,{inflateAmount:t},e){n.inflateAmount=t==="auto"?e===1?.33:0:t}class Li extends Oe{parsePrimitiveData(t,e,i,r){return ou(t,e,i,r)}parseArrayData(t,e,i,r){return ou(t,e,i,r)}parseObjectData(t,e,i,r){const{iScale:a,vScale:s}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,c=a.axis==="x"?o:l,u=s.axis==="x"?o:l,d=[];let f,p,y,x;for(f=i,p=i+r;f<p;++f)x=e[f],y={},y[a.axis]=a.parse(ln(x,c),f),d.push(su(ln(x,u),y,s,f));return d}updateRangeFromParsed(t,e,i,r){super.updateRangeFromParsed(t,e,i,r);const a=i._custom;a&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:r}=e,a=this.getParsed(t),s=a._custom,o=ns(s)?"["+s.start+", "+s.end+"]":""+r.getLabelForValue(a[r.axis]);return{label:""+i.getLabelForValue(a[i.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,r){const a=r==="reset",{index:s,_cachedMeta:{vScale:o}}=this,l=o.getBasePixel(),c=o.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(e,r);for(let p=e;p<e+i;p++){const y=this.getParsed(p),x=a||st(y[o.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),g=this._calculateBarIndexPixels(p,u),m=(y._stacks||{})[o.axis],v={horizontal:c,base:x.base,enableBorderRadius:!m||ns(y._custom)||s===m._top||s===m._bottom,x:c?x.head:g.center,y:c?g.center:x.head,height:c?g.size:Math.abs(x.size),width:c?Math.abs(x.size):g.size};f&&(v.options=d||this.resolveDataElementOptions(p,t[p].active?"active":r));const b=v.options||t[p].options;km(v,b,m,s),Pm(v,b,u.ratio),this.updateElement(t[p],p,v,r)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,r=i.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),a=i.options.stacked,s=[],o=l=>{const c=l.controller.getParsed(e),u=c&&c[l.vScale.axis];if(st(u)||isNaN(u))return!0};for(const l of r)if(!(e!==void 0&&o(l))&&((a===!1||s.indexOf(l.stack)===-1||a===void 0&&l.stack===void 0)&&s.push(l.stack),l.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const r=this._getStacks(t,i),a=e!==void 0?r.indexOf(e):-1;return a===-1?r.length-1:a}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,r=[];let a,s;for(a=0,s=e.data.length;a<s;++a)r.push(i.getPixelForValue(this.getParsed(a)[i.axis],a));const o=t.barThickness;return{min:o||wm(e),pixels:r,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:o?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:r},options:{base:a,minBarLength:s}}=this,o=a||0,l=this.getParsed(t),c=l._custom,u=ns(c);let d=l[e.axis],f=0,p=i?this.applyStack(e,l,i):d,y,x;p!==d&&(f=p-d,p=d),u&&(d=c.barStart,p=c.barEnd-c.barStart,d!==0&&Le(d)!==Le(c.barEnd)&&(f=0),f+=d);const g=!st(a)&&!u?a:f;let m=e.getPixelForValue(g);if(this.chart.getDataVisibility(t)?y=e.getPixelForValue(f+p):y=m,x=y-m,Math.abs(x)<s){x=Mm(x,e,o)*s,d===o&&(m-=x/2);const v=e.getPixelForDecimal(0),b=e.getPixelForDecimal(1),w=Math.min(v,b),T=Math.max(v,b);m=Math.max(Math.min(m,T),w),y=m+x,i&&!u&&(l._stacks[e.axis]._visualValues[r]=e.getValueForPixel(y)-e.getValueForPixel(m))}if(m===e.getPixelForValue(o)){const v=Le(x)*e.getLineWidthForValue(o)/2;m+=v,x-=v}return{size:x,base:m,head:y,center:y+x/2}}_calculateBarIndexPixels(t,e){const i=e.scale,r=this.options,a=r.skipNull,s=it(r.maxBarThickness,1/0);let o,l;if(e.grouped){const c=a?this._getStackCount(t):e.stackCount,u=r.barThickness==="flex"?Sm(t,e,r,c):Tm(t,e,r,c),d=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0);o=u.start+u.chunk*d+u.chunk/2,l=Math.min(s,u.chunk*u.ratio)}else o=i.getPixelForValue(this.getParsed(t)[i.axis],t),l=Math.min(s,e.min*e.ratio);return{base:o-l/2,head:o+l/2,center:o,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,r=i.length;let a=0;for(;a<r;++a)this.getParsed(a)[e.axis]!==null&&!i[a].hidden&&i[a].draw(this._ctx)}}H(Li,"id","bar"),H(Li,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),H(Li,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class kr extends Oe{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,r){const a=super.parsePrimitiveData(t,e,i,r);for(let s=0;s<a.length;s++)a[s]._custom=this.resolveDataElementOptions(s+i).radius;return a}parseArrayData(t,e,i,r){const a=super.parseArrayData(t,e,i,r);for(let s=0;s<a.length;s++){const o=e[i+s];a[s]._custom=it(o[2],this.resolveDataElementOptions(s+i).radius)}return a}parseObjectData(t,e,i,r){const a=super.parseObjectData(t,e,i,r);for(let s=0;s<a.length;s++){const o=e[i+s];a[s]._custom=it(o&&o.r&&+o.r,this.resolveDataElementOptions(s+i).radius)}return a}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:r,yScale:a}=e,s=this.getParsed(t),o=r.getLabelForValue(s.x),l=a.getLabelForValue(s.y),c=s._custom;return{label:i[t]||"",value:"("+o+", "+l+(c?", "+c:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,r){const a=r==="reset",{iScale:s,vScale:o}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(e,r),u=s.axis,d=o.axis;for(let f=e;f<e+i;f++){const p=t[f],y=!a&&this.getParsed(f),x={},g=x[u]=a?s.getPixelForDecimal(.5):s.getPixelForValue(y[u]),m=x[d]=a?o.getBasePixel():o.getPixelForValue(y[d]);x.skip=isNaN(g)||isNaN(m),c&&(x.options=l||this.resolveDataElementOptions(f,p.active?"active":r),a&&(x.options.radius=0)),this.updateElement(p,f,x,r)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let r=super.resolveDataElementOptions(t,e);r.$shared&&(r=Object.assign({},r,{$shared:!1}));const a=r.radius;return e!=="active"&&(r.radius=0),r.radius+=it(i&&i._custom,a),r}}H(kr,"id","bubble"),H(kr,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),H(kr,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function Em(n,t,e){let i=1,r=1,a=0,s=0;if(t<kt){const o=n,l=o+t,c=Math.cos(o),u=Math.sin(o),d=Math.cos(l),f=Math.sin(l),p=(b,w,T)=>Mi(b,o,l,!0)?1:Math.max(w,w*e,T,T*e),y=(b,w,T)=>Mi(b,o,l,!0)?-1:Math.min(w,w*e,T,T*e),x=p(0,c,d),g=p(Et,u,f),m=y(dt,c,d),v=y(dt+Et,u,f);i=(x-m)/2,r=(g-v)/2,a=-(x+m)/2,s=-(g+v)/2}return{ratioX:i,ratioY:r,offsetX:a,offsetY:s}}class pn 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 i=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=i;else{let a=l=>+i[l];if(lt(i[t])){const{key:l="value"}=this._parsing;a=c=>+ln(i[c],l)}let s,o;for(s=t,o=t+e;s<o;++s)r._parsed[s]=a(s)}}_getRotation(){return Xt(this.options.rotation-90)}_getCircumference(){return Xt(this.options.circumference)}_getRotationExtents(){let t=kt,e=-kt;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const r=this.chart.getDatasetMeta(i).controller,a=r._getRotation(),s=r._getCircumference();t=Math.min(t,a),e=Math.max(e,a+s)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,r=this._cachedMeta,a=r.data,s=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,o=Math.max((Math.min(i.width,i.height)-s)/2,0),l=Math.min(Vp(this.options.cutout,o),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:y,offsetY:x}=Em(d,u,l),g=(i.width-s)/f,m=(i.height-s)/p,v=Math.max(Math.min(g,m)/2,0),b=dc(this.options.radius,v),w=Math.max(b*l,0),T=(b-w)/this._getVisibleDatasetWeightTotal();this.offsetX=y*b,this.offsetY=x*b,r.total=this.calculateTotal(),this.outerRadius=b-T*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-T*c,0),this.updateElements(a,0,a.length,t)}_circumference(t,e){const i=this.options,r=this._cachedMeta,a=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||r._parsed[t]===null||r.data[t].hidden?0:this.calculateCircumference(r._parsed[t]*a/kt)}updateElements(t,e,i,r){const a=r==="reset",s=this.chart,o=s.chartArea,c=s.options.animation,u=(o.left+o.right)/2,d=(o.top+o.bottom)/2,f=a&&c.animateScale,p=f?0:this.innerRadius,y=f?0:this.outerRadius,{sharedOptions:x,includeOptions:g}=this._getSharedOptions(e,r);let m=this._getRotation(),v;for(v=0;v<e;++v)m+=this._circumference(v,a);for(v=e;v<e+i;++v){const b=this._circumference(v,a),w=t[v],T={x:u+this.offsetX,y:d+this.offsetY,startAngle:m,endAngle:m+b,circumference:b,outerRadius:y,innerRadius:p};g&&(T.options=x||this.resolveDataElementOptions(v,w.active?"active":r)),m+=b,this.updateElement(w,v,T,r)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i=0,r;for(r=0;r<e.length;r++){const a=t._parsed[r];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(r)&&!e[r].hidden&&(i+=Math.abs(a))}return i}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?kt*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,r=i.data.labels||[],a=ki(e._parsed[t],i.options.locale);return{label:r[t]||"",value:a}}getMaxBorderWidth(t){let e=0;const i=this.chart;let r,a,s,o,l;if(!t){for(r=0,a=i.data.datasets.length;r<a;++r)if(i.isDatasetVisible(r)){s=i.getDatasetMeta(r),t=s.data,o=s.controller;break}}if(!t)return 0;for(r=0,a=t.length;r<a;++r)l=o.resolveDataElementOptions(r),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,r=t.length;i<r;++i){const a=this.resolveDataElementOptions(i);e=Math.max(e,a.offset||0,a.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(it(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}H(pn,"id","doughnut"),H(pn,"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"}),H(pn,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),H(pn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:r}}=t.legend.options;return e.labels.map((a,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:r,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}});class Ii extends Oe{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:r=[],_dataset:a}=e,s=this.chart._animationsDisabled;let{start:o,count:l}=Sc(e,r,s);this._drawStart=o,this._drawCount=l,Cc(e)&&(o=0,l=r.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!a._decimated,i.points=r;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(i,void 0,{animated:!s,options:c},t),this.updateElements(r,o,l,t)}updateElements(t,e,i,r){const a=r==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(e,r),f=s.axis,p=o.axis,{spanGaps:y,segment:x}=this.options,g=un(y)?y:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||a||r==="none",v=e+i,b=t.length;let w=e>0&&this.getParsed(e-1);for(let T=0;T<b;++T){const M=t[T],k=m?M:{};if(T<e||T>=v){k.skip=!0;continue}const S=this.getParsed(T),C=st(S[p]),O=k[f]=s.getPixelForValue(S[f],T),P=k[p]=a||C?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,S,l):S[p],T);k.skip=isNaN(O)||isNaN(P)||C,k.stop=T>0&&Math.abs(S[f]-w[f])>g,x&&(k.parsed=S,k.raw=c.data[T]),d&&(k.options=u||this.resolveDataElementOptions(T,M.active?"active":r)),m||this.updateElement(M,T,k,r),w=S}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,r=t.data||[];if(!r.length)return i;const a=r[0].size(this.resolveDataElementOptions(0)),s=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(i,a,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}H(Ii,"id","line"),H(Ii,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),H(Ii,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Ni extends Oe{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,r=i.data.labels||[],a=ki(e._parsed[t].r,i.options.locale);return{label:r[t]||"",value:a}}parseObjectData(t,e,i,r){return Wc.bind(this)(t,e,i,r)}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((i,r)=>{const a=this.getParsed(r).r;!isNaN(a)&&this.chart.getDataVisibility(r)&&(a<e.min&&(e.min=a),a>e.max&&(e.max=a))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,r=Math.min(e.right-e.left,e.bottom-e.top),a=Math.max(r/2,0),s=Math.max(i.cutoutPercentage?a/100*i.cutoutPercentage:1,0),o=(a-s)/t.getVisibleDatasetCount();this.outerRadius=a-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,r){const a=r==="reset",s=this.chart,l=s.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,f=c.getIndexAngle(0)-.5*dt;let p=f,y;const x=360/this.countVisibleElements();for(y=0;y<e;++y)p+=this._computeAngle(y,r,x);for(y=e;y<e+i;y++){const g=t[y];let m=p,v=p+this._computeAngle(y,r,x),b=s.getDataVisibility(y)?c.getDistanceFromCenterForValue(this.getParsed(y).r):0;p=v,a&&(l.animateScale&&(b=0),l.animateRotate&&(m=v=f));const w={x:u,y:d,innerRadius:0,outerRadius:b,startAngle:m,endAngle:v,options:this.resolveDataElementOptions(y,g.active?"active":r)};this.updateElement(g,y,w,r)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((i,r)=>{!isNaN(this.getParsed(r).r)&&this.chart.getDataVisibility(r)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Xt(this.resolveDataElementOptions(t,e).angle||i):0}}H(Ni,"id","polarArea"),H(Ni,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),H(Ni,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:r}}=t.legend.options;return e.labels.map((a,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:r,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class is extends pn{}H(is,"id","pie"),H(is,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Or extends Oe{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,r){return Wc.bind(this)(t,e,i,r)}update(t){const e=this._cachedMeta,i=e.dataset,r=e.data||[],a=e.iScale.getLabels();if(i.points=r,t!=="resize"){const s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);const o={_loop:!0,_fullLoop:a.length===r.length,options:s};this.updateElement(i,void 0,o,t)}this.updateElements(r,0,r.length,t)}updateElements(t,e,i,r){const a=this._cachedMeta.rScale,s=r==="reset";for(let o=e;o<e+i;o++){const l=t[o],c=this.resolveDataElementOptions(o,l.active?"active":r),u=a.getPointPositionForValue(o,this.getParsed(o).r),d=s?a.xCenter:u.x,f=s?a.yCenter:u.y,p={x:d,y:f,angle:u.angle,skip:isNaN(d)||isNaN(f),options:c};this.updateElement(l,o,p,r)}}}H(Or,"id","radar"),H(Or,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),H(Or,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Pr extends Oe{getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:r,yScale:a}=e,s=this.getParsed(t),o=r.getLabelForValue(s.x),l=a.getLabelForValue(s.y);return{label:i[t]||"",value:"("+o+", "+l+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,r=this.chart._animationsDisabled;let{start:a,count:s}=Sc(e,i,r);if(this._drawStart=a,this._drawCount=s,Cc(e)&&(a=0,s=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:o,_dataset:l}=e;o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!l._decimated,o.points=i;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(o,void 0,{animated:!r,options:c},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,a,s,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,r){const a=r==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(e,r),d=this.getSharedOptions(u),f=this.includeOptions(r,d),p=s.axis,y=o.axis,{spanGaps:x,segment:g}=this.options,m=un(x)?x:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||a||r==="none";let b=e>0&&this.getParsed(e-1);for(let w=e;w<e+i;++w){const T=t[w],M=this.getParsed(w),k=v?T:{},S=st(M[y]),C=k[p]=s.getPixelForValue(M[p],w),O=k[y]=a||S?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,M,l):M[y],w);k.skip=isNaN(C)||isNaN(O)||S,k.stop=w>0&&Math.abs(M[p]-b[p])>m,g&&(k.parsed=M,k.raw=c.data[w]),f&&(k.options=d||this.resolveDataElementOptions(w,T.active?"active":r)),v||this.updateElement(T,w,k,r),b=M}this.updateSharedOptions(d,r,u)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let o=0;for(let l=e.length-1;l>=0;--l)o=Math.max(o,e[l].size(this.resolveDataElementOptions(l))/2);return o>0&&o}const i=t.dataset,r=i.options&&i.options.borderWidth||0;if(!e.length)return r;const a=e[0].size(this.resolveDataElementOptions(0)),s=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(r,a,s)/2}}H(Pr,"id","scatter"),H(Pr,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),H(Pr,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Rm=Object.freeze({__proto__:null,BarController:Li,BubbleController:kr,DoughnutController:pn,LineController:Ii,PieController:is,PolarAreaController:Ni,RadarController:Or,ScatterController:Pr});function Ln(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class rs{constructor(t){H(this,"options");this.options=t||{}}static override(t){Object.assign(rs.prototype,t)}init(){}formats(){return Ln()}parse(){return Ln()}format(){return Ln()}add(){return Ln()}diff(){return Ln()}startOf(){return Ln()}endOf(){return Ln()}}var uu={_date:rs};function Am(n,t,e,i){const{controller:r,data:a,_sorted:s}=n,o=r._cachedMeta.iScale;if(o&&t===o.axis&&t!=="r"&&s&&a.length){const l=o._reversePixels?ig:Ve;if(i){if(r._sharedOptions){const c=a[0],u=typeof c.getRange=="function"&&c.getRange(t);if(u){const d=l(a,t,e-u),f=l(a,t,e+u);return{lo:d.lo,hi:f.hi}}}}else return l(a,t,e)}return{lo:0,hi:a.length-1}}function Fi(n,t,e,i,r){const a=n.getSortedVisibleDatasetMetas(),s=e[t];for(let o=0,l=a.length;o<l;++o){const{index:c,data:u}=a[o],{lo:d,hi:f}=Am(a[o],t,s,r);for(let p=d;p<=f;++p){const y=u[p];y.skip||i(y,c,p)}}}function Lm(n){const t=n.indexOf("x")!==-1,e=n.indexOf("y")!==-1;return function(i,r){const a=t?Math.abs(i.x-r.x):0,s=e?Math.abs(i.y-r.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(s,2))}}function as(n,t,e,i,r){const a=[];return!r&&!n.isPointInArea(t)||Fi(n,e,t,function(o,l,c){!r&&!qe(o,n.chartArea,0)||o.inRange(t.x,t.y,i)&&a.push({element:o,datasetIndex:l,index:c})},!0),a}function Im(n,t,e,i){let r=[];function a(s,o,l){const{startAngle:c,endAngle:u}=s.getProps(["startAngle","endAngle"],i),{angle:d}=vc(s,{x:t.x,y:t.y});Mi(d,c,u)&&r.push({element:s,datasetIndex:o,index:l})}return Fi(n,e,t,a),r}function Nm(n,t,e,i,r,a){let s=[];const o=Lm(e);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const p=u.inRange(t.x,t.y,r);if(i&&!p)return;const y=u.getCenterPoint(r);if(!(!!a||n.isPointInArea(y))&&!p)return;const g=o(t,y);g<l?(s=[{element:u,datasetIndex:d,index:f}],l=g):g===l&&s.push({element:u,datasetIndex:d,index:f})}return Fi(n,e,t,c),s}function ss(n,t,e,i,r,a){return!a&&!n.isPointInArea(t)?[]:e==="r"&&!i?Im(n,t,e,r):Nm(n,t,e,i,r,a)}function du(n,t,e,i,r){const a=[],s=e==="x"?"inXRange":"inYRange";let o=!1;return Fi(n,e,t,(l,c,u)=>{l[s](t[e],r)&&(a.push({element:l,datasetIndex:c,index:u}),o=o||l.inRange(t.x,t.y,r))}),i&&!o?[]:a}var os={evaluateInteractionItems:Fi,modes:{index(n,t,e,i){const r=hn(t,n),a=e.axis||"x",s=e.includeInvisible||!1,o=e.intersect?as(n,r,a,i,s):ss(n,r,a,!1,i,s),l=[];return o.length?(n.getSortedVisibleDatasetMetas().forEach(c=>{const u=o[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(n,t,e,i){const r=hn(t,n),a=e.axis||"xy",s=e.includeInvisible||!1;let o=e.intersect?as(n,r,a,i,s):ss(n,r,a,!1,i,s);if(o.length>0){const l=o[0].datasetIndex,c=n.getDatasetMeta(l).data;o=[];for(let u=0;u<c.length;++u)o.push({element:c[u],datasetIndex:l,index:u})}return o},point(n,t,e,i){const r=hn(t,n),a=e.axis||"xy",s=e.includeInvisible||!1;return as(n,r,a,i,s)},nearest(n,t,e,i){const r=hn(t,n),a=e.axis||"xy",s=e.includeInvisible||!1;return ss(n,r,a,e.intersect,i,s)},x(n,t,e,i){const r=hn(t,n);return du(n,r,"x",e.intersect,i)},y(n,t,e,i){const r=hn(t,n);return du(n,r,"y",e.intersect,i)}}};const fu=["left","top","right","bottom"];function Ui(n,t){return n.filter(e=>e.pos===t)}function hu(n,t){return n.filter(e=>fu.indexOf(e.pos)===-1&&e.box.axis===t)}function Bi(n,t){return n.sort((e,i)=>{const r=t?i:e,a=t?e:i;return r.weight===a.weight?r.index-a.index:r.weight-a.weight})}function Fm(n){const t=[];let e,i,r,a,s,o;for(e=0,i=(n||[]).length;e<i;++e)r=n[e],{position:a,options:{stack:s,stackWeight:o=1}}=r,t.push({index:e,box:r,pos:a,horizontal:r.isHorizontal(),weight:r.weight,stack:s&&a+s,stackWeight:o});return t}function Um(n){const t={};for(const e of n){const{stack:i,pos:r,stackWeight:a}=e;if(!i||!fu.includes(r))continue;const s=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=a}return t}function Bm(n,t){const e=Um(n),{vBoxMaxWidth:i,hBoxMaxHeight:r}=t;let a,s,o;for(a=0,s=n.length;a<s;++a){o=n[a];const{fullSize:l}=o.box,c=e[o.stack],u=c&&o.stackWeight/c.weight;o.horizontal?(o.width=u?u*i:l&&t.availableWidth,o.height=r):(o.width=i,o.height=u?u*r:l&&t.availableHeight)}return e}function Wm(n){const t=Fm(n),e=Bi(t.filter(c=>c.box.fullSize),!0),i=Bi(Ui(t,"left"),!0),r=Bi(Ui(t,"right")),a=Bi(Ui(t,"top"),!0),s=Bi(Ui(t,"bottom")),o=hu(t,"x"),l=hu(t,"y");return{fullSize:e,leftAndTop:i.concat(a),rightAndBottom:r.concat(l).concat(s).concat(o),chartArea:Ui(t,"chartArea"),vertical:i.concat(r).concat(l),horizontal:a.concat(s).concat(o)}}function pu(n,t,e,i){return Math.max(n[e],t[e])+Math.max(n[i],t[i])}function gu(n,t){n.top=Math.max(n.top,t.top),n.left=Math.max(n.left,t.left),n.bottom=Math.max(n.bottom,t.bottom),n.right=Math.max(n.right,t.right)}function zm(n,t,e,i){const{pos:r,box:a}=e,s=n.maxPadding;if(!lt(r)){e.size&&(n[r]-=e.size);const d=i[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?a.height:a.width),e.size=d.size/d.count,n[r]+=e.size}a.getPadding&&gu(s,a.getPadding());const o=Math.max(0,t.outerWidth-pu(s,n,"left","right")),l=Math.max(0,t.outerHeight-pu(s,n,"top","bottom")),c=o!==n.w,u=l!==n.h;return n.w=o,n.h=l,e.horizontal?{same:c,other:u}:{same:u,other:c}}function Ym(n){const t=n.maxPadding;function e(i){const r=Math.max(t[i]-n[i],0);return n[i]+=r,r}n.y+=e("top"),n.x+=e("left"),e("right"),e("bottom")}function Hm(n,t){const e=t.maxPadding;function i(r){const a={left:0,top:0,right:0,bottom:0};return r.forEach(s=>{a[s]=Math.max(t[s],e[s])}),a}return i(n?["left","right"]:["top","bottom"])}function Wi(n,t,e,i){const r=[];let a,s,o,l,c,u;for(a=0,s=n.length,c=0;a<s;++a){o=n[a],l=o.box,l.update(o.width||t.w,o.height||t.h,Hm(o.horizontal,t));const{same:d,other:f}=zm(t,e,o,i);c|=d&&r.length,u=u||f,l.fullSize||r.push(o)}return c&&Wi(r,t,e,i)||u}function Er(n,t,e,i,r){n.top=e,n.left=t,n.right=t+i,n.bottom=e+r,n.width=i,n.height=r}function mu(n,t,e,i){const r=e.padding;let{x:a,y:s}=t;for(const o of n){const l=o.box,c=i[o.stack]||{count:1,placed:0,weight:1},u=o.stackWeight/c.weight||1;if(o.horizontal){const d=t.w*u,f=c.size||l.height;de(c.start)&&(s=c.start),l.fullSize?Er(l,r.left,s,e.outerWidth-r.right-r.left,f):Er(l,t.left+c.placed,s,d,f),c.start=s,c.placed+=d,s=l.bottom}else{const d=t.h*u,f=c.size||l.width;de(c.start)&&(a=c.start),l.fullSize?Er(l,a,r.top,f,e.outerHeight-r.bottom-r.top):Er(l,a,t.top+c.placed,f,d),c.start=a,c.placed+=d,a=l.right}}t.x=a,t.y=s}var re={addBox(n,t){n.boxes||(n.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)}}]},n.boxes.push(t)},removeBox(n,t){const e=n.boxes?n.boxes.indexOf(t):-1;e!==-1&&n.boxes.splice(e,1)},configure(n,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(n,t,e,i){if(!n)return;const r=Gt(n.options.layout.padding),a=Math.max(t-r.width,0),s=Math.max(e-r.height,0),o=Wm(n.boxes),l=o.vertical,c=o.horizontal;St(n.boxes,x=>{typeof x.beforeLayout=="function"&&x.beforeLayout()});const u=l.reduce((x,g)=>g.box.options&&g.box.options.display===!1?x:x+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:r,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/u,hBoxMaxHeight:s/2}),f=Object.assign({},r);gu(f,Gt(i));const p=Object.assign({maxPadding:f,w:a,h:s,x:r.left,y:r.top},r),y=Bm(l.concat(c),d);Wi(o.fullSize,p,d,y),Wi(l,p,d,y),Wi(c,p,d,y)&&Wi(l,p,d,y),Ym(p),mu(o.leftAndTop,p,d,y),p.x+=p.w,p.y+=p.h,mu(o.rightAndBottom,p,d,y),n.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},St(o.chartArea,x=>{const g=x.box;Object.assign(g,n.chartArea),g.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class yu{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,r){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,r?Math.floor(e/r):i)}}isAttached(t){return!0}updateConfig(t){}}class $m extends yu{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Rr="$chartjs",jm={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},vu=n=>n===null||n==="";function Vm(n,t){const e=n.style,i=n.getAttribute("height"),r=n.getAttribute("width");if(n[Rr]={initial:{height:i,width:r,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",vu(r)){const a=Hc(n,"width");a!==void 0&&(n.width=a)}if(vu(i))if(n.style.height==="")n.height=n.width/(t||2);else{const a=Hc(n,"height");a!==void 0&&(n.height=a)}return n}const bu=Kg?{passive:!0}:!1;function qm(n,t,e){n&&n.addEventListener(t,e,bu)}function Xm(n,t,e){n&&n.canvas&&n.canvas.removeEventListener(t,e,bu)}function Gm(n,t){const e=jm[n.type]||n.type,{x:i,y:r}=hn(n,t);return{type:e,chart:t,native:n,x:i!==void 0?i:null,y:r!==void 0?r:null}}function Ar(n,t){for(const e of n)if(e===t||e.contains(t))return!0}function Km(n,t,e){const i=n.canvas,r=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||Ar(o.addedNodes,i),s=s&&!Ar(o.removedNodes,i);s&&e()});return r.observe(document,{childList:!0,subtree:!0}),r}function Qm(n,t,e){const i=n.canvas,r=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||Ar(o.removedNodes,i),s=s&&!Ar(o.addedNodes,i);s&&e()});return r.observe(document,{childList:!0,subtree:!0}),r}const zi=new Map;let xu=0;function _u(){const n=window.devicePixelRatio;n!==xu&&(xu=n,zi.forEach((t,e)=>{e.currentDevicePixelRatio!==n&&t()}))}function Zm(n,t){zi.size||window.addEventListener("resize",_u),zi.set(n,t)}function Jm(n){zi.delete(n),zi.size||window.removeEventListener("resize",_u)}function t0(n,t,e){const i=n.canvas,r=i&&Za(i);if(!r)return;const a=Tc((o,l)=>{const c=r.clientWidth;e(o,l),c<r.clientWidth&&e()},window),s=new ResizeObserver(o=>{const l=o[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||a(c,u)});return s.observe(r),Zm(n,a),s}function ls(n,t,e){e&&e.disconnect(),t==="resize"&&Jm(n)}function e0(n,t,e){const i=n.canvas,r=Tc(a=>{n.ctx!==null&&e(Gm(a,n))},n);return qm(i,t,r),r}class n0 extends yu{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(Vm(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[Rr])return!1;const i=e[Rr].initial;["height","width"].forEach(a=>{const s=i[a];st(s)?e.removeAttribute(a):e.setAttribute(a,s)});const r=i.style||{};return Object.keys(r).forEach(a=>{e.style[a]=r[a]}),e.width=e.width,delete e[Rr],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const r=t.$proxies||(t.$proxies={}),s={attach:Km,detach:Qm,resize:t0}[e]||e0;r[e]=s(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),r=i[e];if(!r)return;({attach:ls,detach:ls,resize:ls}[e]||Xm)(t,e,r),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,r){return Gg(t,e,i,r)}isAttached(t){const e=t&&Za(t);return!!(e&&e.isConnected)}}function i0(n){return!Qa()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?$m:n0}class te{constructor(){H(this,"x");H(this,"y");H(this,"active",!1);H(this,"options");H(this,"$animations")}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return un(this.x)&&un(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const r={};return t.forEach(a=>{r[a]=i[a]&&i[a].active()?i[a]._to:this[a]}),r}}H(te,"defaults",{}),H(te,"defaultRoutes");function r0(n,t){const e=n.options.ticks,i=a0(n),r=Math.min(e.maxTicksLimit||i,i),a=e.major.enabled?o0(t):[],s=a.length,o=a[0],l=a[s-1],c=[];if(s>r)return l0(t,c,a,s/r),c;const u=s0(a,t,r);if(s>0){let d,f;const p=s>1?Math.round((l-o)/(s-1)):null;for(Lr(t,c,u,st(p)?0:o-p,o),d=0,f=s-1;d<f;d++)Lr(t,c,u,a[d],a[d+1]);return Lr(t,c,u,l,st(p)?t.length:l+p),c}return Lr(t,c,u),c}function a0(n){const t=n.options.offset,e=n._tickSize(),i=n._length/e+(t?0:1),r=n._maxLength/e;return Math.floor(Math.min(i,r))}function s0(n,t,e){const i=c0(n),r=t.length/e;if(!i)return Math.max(r,1);const a=Jp(i);for(let s=0,o=a.length-1;s<o;s++){const l=a[s];if(l>r)return l}return Math.max(r,1)}function o0(n){const t=[];let e,i;for(e=0,i=n.length;e<i;e++)n[e].major&&t.push(e);return t}function l0(n,t,e,i){let r=0,a=e[0],s;for(i=Math.ceil(i),s=0;s<n.length;s++)s===a&&(t.push(n[s]),r++,a=e[r*i])}function Lr(n,t,e,i,r){const a=it(i,0),s=Math.min(it(r,n.length),n.length);let o=0,l,c,u;for(e=Math.ceil(e),r&&(l=r-i,e=l/Math.floor(l/e)),u=a;u<0;)o++,u=Math.round(a+o*e);for(c=Math.max(a,0);c<s;c++)c===u&&(t.push(n[c]),o++,u=Math.round(a+o*e))}function c0(n){const t=n.length;let e,i;if(t<2)return!1;for(i=n[0],e=1;e<t;++e)if(n[e]-n[e-1]!==i)return!1;return i}const u0=n=>n==="left"?"right":n==="right"?"left":n,wu=(n,t,e)=>t==="top"||t==="left"?n[t]+e:n[t]-e,Tu=(n,t)=>Math.min(t||n,n);function Su(n,t){const e=[],i=n.length/t,r=n.length;let a=0;for(;a<r;a+=i)e.push(n[Math.floor(a)]);return e}function d0(n,t,e){const i=n.ticks.length,r=Math.min(t,i-1),a=n._startPixel,s=n._endPixel,o=1e-6;let l=n.getPixelForTick(r),c;if(!(e&&(i===1?c=Math.max(l-a,s-l):t===0?c=(n.getPixelForTick(1)-l)/2:c=(l-n.getPixelForTick(r-1))/2,l+=r<t?c:-c,l<a-o||l>s+o)))return l}function f0(n,t){St(n,e=>{const i=e.gc,r=i.length/2;let a;if(r>t){for(a=0;a<r;++a)delete e.data[i[a]];i.splice(0,r)}})}function Yi(n){return n.drawTicks?n.tickLength:0}function Cu(n,t){if(!n.display)return 0;const e=Rt(n.font,t),i=Gt(n.padding);return(mt(n.text)?n.text.length:1)*e.lineHeight+i.height}function h0(n,t){return fn(n,{scale:t,type:"scale"})}function p0(n,t,e){return fn(n,{tick:e,index:t,type:"tick"})}function g0(n,t,e){let i=za(n);return(e&&t!=="right"||!e&&t==="right")&&(i=u0(i)),i}function m0(n,t,e,i){const{top:r,left:a,bottom:s,right:o,chart:l}=n,{chartArea:c,scales:u}=l;let d=0,f,p,y;const x=s-r,g=o-a;if(n.isHorizontal()){if(p=ie(i,a,o),lt(e)){const m=Object.keys(e)[0],v=e[m];y=u[m].getPixelForValue(v)+x-t}else e==="center"?y=(c.bottom+c.top)/2+x-t:y=wu(n,e,t);f=o-a}else{if(lt(e)){const m=Object.keys(e)[0],v=e[m];p=u[m].getPixelForValue(v)-g+t}else e==="center"?p=(c.left+c.right)/2-g+t:p=wu(n,e,t);y=ie(i,s,r),d=e==="left"?-Et:Et}return{titleX:p,titleY:y,maxWidth:f,rotation:d}}class In extends te{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:i,_suggestedMax:r}=this;return t=be(t,Number.POSITIVE_INFINITY),e=be(e,Number.NEGATIVE_INFINITY),i=be(i,Number.POSITIVE_INFINITY),r=be(r,Number.NEGATIVE_INFINITY),{min:be(t,i),max:be(e,r),minDefined:It(t),maxDefined:It(e)}}getMinMax(t){let{min:e,max:i,minDefined:r,maxDefined:a}=this.getUserBounds(),s;if(r&&a)return{min:e,max:i};const o=this.getMatchingVisibleMetas();for(let l=0,c=o.length;l<c;++l)s=o[l].controller.getMinMax(this,t),r||(e=Math.min(e,s.min)),a||(i=Math.max(i,s.max));return e=a&&e>i?i:e,i=r&&e>i?e:i,{min:be(e,be(i,e)),max:be(i,be(e,i))}}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(){Tt(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:r,grace:a,ticks:s}=this.options,o=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Dg(this,a,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=o<this.ticks.length;this._convertTicksToLabels(l?Su(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=r0(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,i;this.isHorizontal()?(e=this.left,i=this.right):(e=this.top,i=this.bottom,t=!t),this._startPixel=e,this._endPixel=i,this._reversePixels=t,this._length=i-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Tt(this.options.afterUpdate,[this])}beforeSetDimensions(){Tt(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(){Tt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Tt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Tt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,r,a;for(i=0,r=t.length;i<r;i++)a=t[i],a.label=Tt(e.callback,[a.value,i,t],this)}afterTickToLabelConversion(){Tt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Tt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=Tu(this.ticks.length,t.ticks.maxTicksLimit),r=e.minRotation||0,a=e.maxRotation;let s=r,o,l,c;if(!this._isVisible()||!e.display||r>=a||i<=1||!this.isHorizontal()){this.labelRotation=r;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,p=Qt(this.chart.width-d,0,this.maxWidth);o=t.offset?this.maxWidth/i:p/(i-1),d+6>o&&(o=p/(i-(t.offset?.5:1)),l=this.maxHeight-Yi(t.grid)-e.padding-Cu(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),s=xr(Math.min(Math.asin(Qt((u.highest.height+6)/o,-1,1)),Math.asin(Qt(l/c,-1,1))-Math.asin(Qt(f/c,-1,1)))),s=Math.max(r,Math.min(a,s))),this.labelRotation=s}afterCalculateLabelRotation(){Tt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Tt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:r,grid:a}}=this,s=this._isVisible(),o=this.isHorizontal();if(s){const l=Cu(r,e.options.font);if(o?(t.width=this.maxWidth,t.height=Yi(a)+l):(t.height=this.maxHeight,t.width=Yi(a)+l),i.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),p=i.padding*2,y=Xt(this.labelRotation),x=Math.cos(y),g=Math.sin(y);if(o){const m=i.mirror?0:g*d.width+x*f.height;t.height=Math.min(this.maxHeight,t.height+m+p)}else{const m=i.mirror?0:x*d.width+g*f.height;t.width=Math.min(this.maxWidth,t.width+m+p)}this._calculatePadding(c,u,g,x)}}this._handleMargins(),o?(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,i,r){const{ticks:{align:a,padding:s},position:o}=this.options,l=this.labelRotation!==0,c=o!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,p=0;l?c?(f=r*t.width,p=i*e.height):(f=i*t.height,p=r*e.width):a==="start"?p=e.width:a==="end"?f=t.width:a!=="inner"&&(f=t.width/2,p=e.width/2),this.paddingLeft=Math.max((f-u+s)*this.width/(this.width-u),0),this.paddingRight=Math.max((p-d+s)*this.width/(this.width-d),0)}else{let u=e.height/2,d=t.height/2;a==="start"?(u=0,d=t.height):a==="end"&&(u=e.height,d=0),this.paddingTop=u+s,this.paddingBottom=d+s}}_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(){Tt(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,i;for(e=0,i=t.length;e<i;e++)st(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=Su(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:r,_longestTextCache:a}=this,s=[],o=[],l=Math.floor(e/Tu(e,i));let c=0,u=0,d,f,p,y,x,g,m,v,b,w,T;for(d=0;d<e;d+=l){if(y=t[d].label,x=this._resolveTickFontOptions(d),r.font=g=x.string,m=a[g]=a[g]||{data:{},gc:[]},v=x.lineHeight,b=w=0,!st(y)&&!mt(y))b=Tr(r,m.data,m.gc,b,y),w=v;else if(mt(y))for(f=0,p=y.length;f<p;++f)T=y[f],!st(T)&&!mt(T)&&(b=Tr(r,m.data,m.gc,b,T),w+=v);s.push(b),o.push(w),c=Math.max(b,c),u=Math.max(w,u)}f0(a,e);const M=s.indexOf(c),k=o.indexOf(u),S=C=>({width:s[C]||0,height:o[C]||0});return{first:S(0),last:S(e-1),widest:S(M),highest:S(k),widths:s,heights:o}}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 ng(this._alignToPixels?Pn(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 i=e[t];return i.$context||(i.$context=p0(this.getContext(),t,i))}return this.$context||(this.$context=h0(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=Xt(this.labelRotation),i=Math.abs(Math.cos(e)),r=Math.abs(Math.sin(e)),a=this._getLabelSizes(),s=t.autoSkipPadding||0,o=a?a.widest.width+s:0,l=a?a.highest.height+s:0;return this.isHorizontal()?l*i>o*r?o/i:l/r:l*r<o*i?l/i:o/r}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,r=this.options,{grid:a,position:s,border:o}=r,l=a.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=Yi(a),p=[],y=o.setContext(this.getContext()),x=y.display?y.width:0,g=x/2,m=function(Y){return Pn(i,Y,x)};let v,b,w,T,M,k,S,C,O,P,E,F;if(s==="top")v=m(this.bottom),k=this.bottom-f,C=v-g,P=m(t.top)+g,F=t.bottom;else if(s==="bottom")v=m(this.top),P=t.top,F=m(t.bottom)-g,k=v+g,C=this.top+f;else if(s==="left")v=m(this.right),M=this.right-f,S=v-g,O=m(t.left)+g,E=t.right;else if(s==="right")v=m(this.left),O=t.left,E=m(t.right)-g,M=v+g,S=this.left+f;else if(e==="x"){if(s==="center")v=m((t.top+t.bottom)/2+.5);else if(lt(s)){const Y=Object.keys(s)[0],I=s[Y];v=m(this.chart.scales[Y].getPixelForValue(I))}P=t.top,F=t.bottom,k=v+g,C=k+f}else if(e==="y"){if(s==="center")v=m((t.left+t.right)/2);else if(lt(s)){const Y=Object.keys(s)[0],I=s[Y];v=m(this.chart.scales[Y].getPixelForValue(I))}M=v-g,S=M-f,O=t.left,E=t.right}const q=it(r.ticks.maxTicksLimit,d),$=Math.max(1,Math.ceil(d/q));for(b=0;b<d;b+=$){const Y=this.getContext(b),I=a.setContext(Y),rt=o.setContext(Y),B=I.lineWidth,yt=I.color,ut=rt.dash||[],z=rt.dashOffset,L=I.tickWidth,U=I.tickColor,j=I.tickBorderDash||[],Z=I.tickBorderDashOffset;w=d0(this,b,l),w!==void 0&&(T=Pn(i,w,B),c?M=S=O=E=T:k=C=P=F=T,p.push({tx1:M,ty1:k,tx2:S,ty2:C,x1:O,y1:P,x2:E,y2:F,width:B,color:yt,borderDash:ut,borderDashOffset:z,tickWidth:L,tickColor:U,tickBorderDash:j,tickBorderDashOffset:Z}))}return this._ticksLength=d,this._borderValue=v,p}_computeLabelItems(t){const e=this.axis,i=this.options,{position:r,ticks:a}=i,s=this.isHorizontal(),o=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=a,f=Yi(i.grid),p=f+u,y=d?-u:p,x=-Xt(this.labelRotation),g=[];let m,v,b,w,T,M,k,S,C,O,P,E,F="middle";if(r==="top")M=this.bottom-y,k=this._getXAxisLabelAlignment();else if(r==="bottom")M=this.top+y,k=this._getXAxisLabelAlignment();else if(r==="left"){const $=this._getYAxisLabelAlignment(f);k=$.textAlign,T=$.x}else if(r==="right"){const $=this._getYAxisLabelAlignment(f);k=$.textAlign,T=$.x}else if(e==="x"){if(r==="center")M=(t.top+t.bottom)/2+p;else if(lt(r)){const $=Object.keys(r)[0],Y=r[$];M=this.chart.scales[$].getPixelForValue(Y)+p}k=this._getXAxisLabelAlignment()}else if(e==="y"){if(r==="center")T=(t.left+t.right)/2-p;else if(lt(r)){const $=Object.keys(r)[0],Y=r[$];T=this.chart.scales[$].getPixelForValue(Y)}k=this._getYAxisLabelAlignment(f).textAlign}e==="y"&&(l==="start"?F="top":l==="end"&&(F="bottom"));const q=this._getLabelSizes();for(m=0,v=o.length;m<v;++m){b=o[m],w=b.label;const $=a.setContext(this.getContext(m));S=this.getPixelForTick(m)+a.labelOffset,C=this._resolveTickFontOptions(m),O=C.lineHeight,P=mt(w)?w.length:1;const Y=P/2,I=$.color,rt=$.textStrokeColor,B=$.textStrokeWidth;let yt=k;s?(T=S,k==="inner"&&(m===v-1?yt=this.options.reverse?"left":"right":m===0?yt=this.options.reverse?"right":"left":yt="center"),r==="top"?c==="near"||x!==0?E=-P*O+O/2:c==="center"?E=-q.highest.height/2-Y*O+O:E=-q.highest.height+O/2:c==="near"||x!==0?E=O/2:c==="center"?E=q.highest.height/2-Y*O:E=q.highest.height-P*O,d&&(E*=-1),x!==0&&!$.showLabelBackdrop&&(T+=O/2*Math.sin(x))):(M=S,E=(1-P)*O/2);let ut;if($.showLabelBackdrop){const z=Gt($.backdropPadding),L=q.heights[m],U=q.widths[m];let j=E-z.top,Z=0-z.left;switch(F){case"middle":j-=L/2;break;case"bottom":j-=L;break}switch(k){case"center":Z-=U/2;break;case"right":Z-=U;break;case"inner":m===v-1?Z-=U:m>0&&(Z-=U/2);break}ut={left:Z,top:j,width:U+z.width,height:L+z.height,color:$.backdropColor}}g.push({label:w,font:C,textOffset:E,options:{rotation:x,color:I,strokeColor:rt,strokeWidth:B,textAlign:yt,textBaseline:F,translation:[T,M],backdrop:ut}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Xt(this.labelRotation))return t==="top"?"left":"right";let r="center";return e.align==="start"?r="left":e.align==="end"?r="right":e.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:r,padding:a}}=this.options,s=this._getLabelSizes(),o=t+a,l=s.widest.width;let c,u;return e==="left"?r?(u=this.right+a,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-o,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u=this.left)):e==="right"?r?(u=this.left+a,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+o,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_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:i,top:r,width:a,height:s}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,r,a,s),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const r=this.ticks.findIndex(a=>a.value===t);return r>=0?e.setContext(this.getContext(r)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,s;const o=(l,c,u)=>{!u.width||!u.color||(i.save(),i.lineWidth=u.width,i.strokeStyle=u.color,i.setLineDash(u.borderDash||[]),i.lineDashOffset=u.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(c.x,c.y),i.stroke(),i.restore())};if(e.display)for(a=0,s=r.length;a<s;++a){const l=r[a];e.drawOnChartArea&&o({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&o({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:i,grid:r}}=this,a=i.setContext(this.getContext()),s=i.display?a.width:0;if(!s)return;const o=r.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,f;this.isHorizontal()?(c=Pn(t,this.left,s)-s/2,u=Pn(t,this.right,o)+o/2,d=f=l):(d=Pn(t,this.top,s)-s/2,f=Pn(t,this.bottom,o)+o/2,c=u=l),e.save(),e.lineWidth=a.width,e.strokeStyle=a.color,e.beginPath(),e.moveTo(c,d),e.lineTo(u,f),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,r=this._computeLabelArea();r&&Pi(i,r);const a=this.getLabelItems(t);for(const s of a){const o=s.options,l=s.font,c=s.label,u=s.textOffset;En(i,c,0,u,l,o)}r&&Ei(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:r}}=this;if(!i.display)return;const a=Rt(i.font),s=Gt(i.padding),o=i.align;let l=a.lineHeight/2;e==="bottom"||e==="center"||lt(e)?(l+=s.bottom,mt(i.text)&&(l+=a.lineHeight*(i.text.length-1))):l+=s.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=m0(this,l,e,o);En(t,i.text,0,0,a,{color:i.color,maxWidth:d,rotation:f,textAlign:g0(o,e,r),textBaseline:"middle",translation:[c,u]})}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,i=it(t.grid&&t.grid.z,-1),r=it(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==In.prototype.draw?[{z:e,draw:a=>{this.draw(a)}}]:[{z:i,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:e,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",r=[];let a,s;for(a=0,s=e.length;a<s;++a){const o=e[a];o[i]===this.id&&(!t||o.type===t)&&r.push(o)}return r}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return Rt(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Ir{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,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 i;b0(e)&&(i=this.register(e));const r=this.items,a=t.id,s=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+t);return a in r||(r[a]=t,y0(t,s,i),this.override&&Ut.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,r=this.scope;i in e&&delete e[i],r&&i in Ut[r]&&(delete Ut[r][i],this.override&&delete On[i])}}function y0(n,t,e){const i=Ti(Object.create(null),[e?Ut.get(e):{},Ut.get(t),n.defaults]);Ut.set(t,i),n.defaultRoutes&&v0(t,n.defaultRoutes),n.descriptors&&Ut.describe(t,n.descriptors)}function v0(n,t){Object.keys(t).forEach(e=>{const i=e.split("."),r=i.pop(),a=[n].concat(i).join("."),s=t[e].split("."),o=s.pop(),l=s.join(".");Ut.route(a,r,l,o)})}function b0(n){return"id"in n&&"defaults"in n}class x0{constructor(){this.controllers=new Ir(Oe,"datasets",!0),this.elements=new Ir(te,"elements"),this.plugins=new Ir(Object,"plugins"),this.scales=new Ir(In,"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,i){[...e].forEach(r=>{const a=i||this._getRegistryForType(r);i||a.isForType(r)||a===this.plugins&&r.id?this._exec(t,a,r):St(r,s=>{const o=i||this._getRegistryForType(s);this._exec(t,o,s)})})}_exec(t,e,i){const r=Ua(t);Tt(i["before"+r],[],i),e[t](i),Tt(i["after"+r],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const r=e.get(t);if(r===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return r}}var Ie=new x0;class _0{constructor(){this._init=[]}notify(t,e,i,r){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const a=r?this._descriptors(t).filter(r):this._descriptors(t),s=this._notify(a,t,e,i);return e==="afterDestroy"&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,e,i,r){r=r||{};for(const a of t){const s=a.plugin,o=s[i],l=[e,r,a.options];if(Tt(o,l,s)===!1&&r.cancelable)return!1}return!0}invalidate(){st(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 i=t&&t.config,r=it(i.options&&i.options.plugins,{}),a=w0(i);return r===!1&&!e?[]:S0(t,a,r,e)}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,r=(a,s)=>a.filter(o=>!s.some(l=>o.plugin.id===l.plugin.id));this._notify(r(e,i),t,"stop"),this._notify(r(i,e),t,"start")}}function w0(n){const t={},e=[],i=Object.keys(Ie.plugins.items);for(let a=0;a<i.length;a++)e.push(Ie.getPlugin(i[a]));const r=n.plugins||[];for(let a=0;a<r.length;a++){const s=r[a];e.indexOf(s)===-1&&(e.push(s),t[s.id]=!0)}return{plugins:e,localIds:t}}function T0(n,t){return!t&&n===!1?null:n===!0?{}:n}function S0(n,{plugins:t,localIds:e},i,r){const a=[],s=n.getContext();for(const o of t){const l=o.id,c=T0(i[l],r);c!==null&&a.push({plugin:o,options:C0(n.config,{plugin:o,local:e[l]},c,s)})}return a}function C0(n,{plugin:t,local:e},i,r){const a=n.pluginScopeKeys(t),s=n.getOptionScopes(i,a);return e&&t.defaults&&s.push(t.defaults),n.createResolver(s,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function cs(n,t){const e=Ut.datasets[n]||{};return((t.datasets||{})[n]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function M0(n,t){let e=n;return n==="_index_"?e=t:n==="_value_"&&(e=t==="x"?"y":"x"),e}function D0(n,t){return n===t?"_index_":"_value_"}function Mu(n){if(n==="x"||n==="y"||n==="r")return n}function k0(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function us(n,...t){if(Mu(n))return n;for(const e of t){const i=e.axis||k0(e.position)||n.length>1&&Mu(n[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${n}' axis. Please provide 'axis' or 'position' option.`)}function Du(n,t,e){if(e[t+"AxisID"]===n)return{axis:t}}function O0(n,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(i=>i.xAxisID===n||i.yAxisID===n);if(e.length)return Du(n,"x",e[0])||Du(n,"y",e[0])}return{}}function P0(n,t){const e=On[n.type]||{scales:{}},i=t.scales||{},r=cs(n.type,t),a=Object.create(null);return Object.keys(i).forEach(s=>{const o=i[s];if(!lt(o))return console.error(`Invalid scale configuration for scale: ${s}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const l=us(s,o,O0(s,n),Ut.scales[o.type]),c=D0(l,r),u=e.scales||{};a[s]=Si(Object.create(null),[{axis:l},o,u[l],u[c]])}),n.data.datasets.forEach(s=>{const o=s.type||n.type,l=s.indexAxis||cs(o,t),u=(On[o]||{}).scales||{};Object.keys(u).forEach(d=>{const f=M0(d,l),p=s[f+"AxisID"]||f;a[p]=a[p]||Object.create(null),Si(a[p],[{axis:f},i[p],u[d]])})}),Object.keys(a).forEach(s=>{const o=a[s];Si(o,[Ut.scales[o.type],Ut.scale])}),a}function ku(n){const t=n.options||(n.options={});t.plugins=it(t.plugins,{}),t.scales=P0(n,t)}function Ou(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function E0(n){return n=n||{},n.data=Ou(n.data),ku(n),n}const Pu=new Map,Eu=new Set;function Nr(n,t){let e=Pu.get(n);return e||(e=t(),Pu.set(n,e),Eu.add(e)),e}const Hi=(n,t,e)=>{const i=ln(t,e);i!==void 0&&n.add(i)};class R0{constructor(t){this._config=E0(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=Ou(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(),ku(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Nr(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Nr(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Nr(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,i=this.type;return Nr(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let r=i.get(t);return(!r||e)&&(r=new Map,i.set(t,r)),r}getOptionScopes(t,e,i){const{options:r,type:a}=this,s=this._cachedScopes(t,i),o=s.get(e);if(o)return o;const l=new Set;e.forEach(u=>{t&&(l.add(t),u.forEach(d=>Hi(l,t,d))),u.forEach(d=>Hi(l,r,d)),u.forEach(d=>Hi(l,On[a]||{},d)),u.forEach(d=>Hi(l,Ut,d)),u.forEach(d=>Hi(l,$a,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Eu.has(e)&&s.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,On[e]||{},Ut.datasets[e]||{},{type:e},Ut,$a]}resolveNamedOptions(t,e,i,r=[""]){const a={$shared:!0},{resolver:s,subPrefixes:o}=Ru(this._resolverCache,t,r);let l=s;if(L0(s,e)){a.$shared=!1,i=fe(i)?i():i;const c=this.createResolver(t,i,o);l=ei(s,i,c)}for(const c of e)a[c]=l[c];return a}createResolver(t,e,i=[""],r){const{resolver:a}=Ru(this._resolverCache,t,i);return lt(e)?ei(a,e,void 0,r):a}}function Ru(n,t,e){let i=n.get(t);i||(i=new Map,n.set(t,i));const r=e.join();let a=i.get(r);return a||(a={resolver:Xa(t,e),subPrefixes:e.filter(o=>!o.toLowerCase().includes("hover"))},i.set(r,a)),a}const A0=n=>lt(n)&&Object.getOwnPropertyNames(n).some(t=>fe(n[t]));function L0(n,t){const{isScriptable:e,isIndexable:i}=Lc(n);for(const r of t){const a=e(r),s=i(r),o=(s||a)&&n[r];if(a&&(fe(o)||A0(o))||s&&mt(o))return!0}return!1}var I0="4.4.3";const N0=["top","bottom","left","right","chartArea"];function Au(n,t){return n==="top"||n==="bottom"||N0.indexOf(n)===-1&&t==="x"}function Lu(n,t){return function(e,i){return e[n]===i[n]?e[t]-i[t]:e[n]-i[n]}}function Iu(n){const t=n.chart,e=t.options.animation;t.notifyPlugins("afterRender"),Tt(e&&e.onComplete,[n],t)}function F0(n){const t=n.chart,e=t.options.animation;Tt(e&&e.onProgress,[n],t)}function Nu(n){return Qa()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Fr={},Fu=n=>{const t=Nu(n);return Object.values(Fr).filter(e=>e.canvas===t).pop()};function U0(n,t,e){const i=Object.keys(n);for(const r of i){const a=+r;if(a>=t){const s=n[r];delete n[r],(e>0||a>t)&&(n[a+e]=s)}}}function B0(n,t,e,i){return!e||n.type==="mouseout"?null:i?t:n}function Ur(n,t,e){return n.options.clip?n[e]:t[e]}function W0(n,t){const{xScale:e,yScale:i}=n;return e&&i?{left:Ur(e,t,"left"),right:Ur(e,t,"right"),top:Ur(i,t,"top"),bottom:Ur(i,t,"bottom")}:t}let Se=(Sn=class{static register(...t){Ie.add(...t),Uu()}static unregister(...t){Ie.remove(...t),Uu()}constructor(t,e){const i=this.config=new R0(e),r=Nu(t),a=Fu(r);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const s=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||i0(r)),this.platform.updateConfig(i);const o=this.platform.acquireContext(r,s.aspectRatio),l=o&&o.canvas,c=l&&l.height,u=l&&l.width;if(this.id=jp(),this.ctx=o,this.canvas=l,this.width=u,this.height=c,this._options=s,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 _0,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=sg(d=>this.update(d),s.resizeDelay||0),this._dataChanges=[],Fr[this.id]=this,!o||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Xe.listen(this,"complete",Iu),Xe.listen(this,"progress",F0),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:r,_aspectRatio:a}=this;return st(t)?e&&a?a:r?i/r: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 Ie}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Yc(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ec(this.canvas,this.ctx),this}stop(){return Xe.stop(this),this}resize(t,e){Xe.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,r=this.canvas,a=i.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(r,t,e,a),o=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Yc(this,o,!0)&&(this.notifyPlugins("resize",{size:s}),Tt(i.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};St(e,(i,r)=>{i.id=r})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,r=Object.keys(i).reduce((s,o)=>(s[o]=!1,s),{});let a=[];e&&(a=a.concat(Object.keys(e).map(s=>{const o=e[s],l=us(s,o),c=l==="r",u=l==="x";return{options:o,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),St(a,s=>{const o=s.options,l=o.id,c=us(l,o),u=it(o.type,s.dtype);(o.position===void 0||Au(o.position,c)!==Au(s.dposition))&&(o.position=s.dposition),r[l]=!0;let d=null;if(l in i&&i[l].type===u)d=i[l];else{const f=Ie.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(o,t)}),St(r,(s,o)=>{s||delete i[o]}),St(i,s=>{re.configure(this,s,s.options),re.addBox(this,s)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((r,a)=>r.index-a.index),i>e){for(let r=e;r<i;++r)this._destroyDatasetMeta(r);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(Lu("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((i,r)=>{e.filter(a=>a===i._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,r;for(this._removeUnreferencedMetasets(),i=0,r=e.length;i<r;i++){const a=e[i];let s=this.getDatasetMeta(i);const o=a.type||this.config.type;if(s.type&&s.type!==o&&(this._destroyDatasetMeta(i),s=this.getDatasetMeta(i)),s.type=o,s.indexAxis=a.indexAxis||cs(o,this.options),s.order=a.order||0,s.index=i,s.label=""+a.label,s.visible=this.isDatasetVisible(i),s.controller)s.controller.updateIndex(i),s.controller.linkScales();else{const l=Ie.getController(o),{datasetElementType:c,dataElementType:u}=Ut.datasets[o];Object.assign(l,{dataElementType:Ie.getElement(u),datasetElementType:c&&Ie.getElement(c)}),s.controller=new l(this,i),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){St(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 i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),f=!r&&a.indexOf(d)===-1;d.buildOrUpdateElements(f),s=Math.max(+d.getMaxOverflow(),s)}s=this._minPadding=i.layout.autoPadding?s:0,this._updateLayout(s),r||St(a,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Lu("z","_idx"));const{_active:o,_lastEvent:l}=this;l?this._eventHandler(l,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){St(this.scales,t=>{re.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!pc(e,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:r,count:a}of e){const s=i==="_removeElements"?-a:a;U0(t,r,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=a=>new Set(t.filter(s=>s[0]===a).map((s,o)=>o+","+s.splice(1).join(","))),r=i(0);for(let a=1;a<e;a++)if(!pc(r,i(a)))return;return Array.from(r).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;re.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],St(this.boxes,r=>{i&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,a)=>{r._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,i=this.data.datasets.length;e<i;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,fe(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),r={meta:i,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(i.controller._update(e),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Xe.has(this)?this.attached&&!Xe.running(this)&&Xe.start(this):(this.draw(),Iu({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:i,height:r}=this._resizeBeforeDraw;this._resize(i,r),this._resizeBeforeDraw=null}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,i=[];let r,a;for(r=0,a=e.length;r<a;++r){const s=e[r];(!t||s.visible)&&i.push(s)}return i}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,i=t._clip,r=!i.disabled,a=W0(t,this.chartArea),s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(r&&Pi(e,{left:i.left===!1?0:a.left-i.left,right:i.right===!1?this.width:a.right+i.right,top:i.top===!1?0:a.top-i.top,bottom:i.bottom===!1?this.height:a.bottom+i.bottom}),t.controller.draw(),r&&Ei(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return qe(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,r){const a=os.modes[e];return typeof a=="function"?a(this,t,i,r):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let r=i.filter(a=>a&&a._dataset===e).pop();return r||(r={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},i.push(r)),r}getContext(){return this.$context||(this.$context=fn(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!e.hidden}setDatasetVisibility(t,e){const i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const r=i?"show":"hide",a=this.getDatasetMeta(t),s=a.controller._resolveAnimations(void 0,r);de(e)?(a.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),s.update(a,{visible:i}),this.update(o=>o.datasetIndex===t?r: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(),Xe.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(),Ec(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Fr[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,i=(a,s)=>{e.addEventListener(this,a,s),t[a]=s},r=(a,s,o)=>{a.offsetX=s,a.offsetY=o,this._eventHandler(a)};St(this.options.events,a=>i(a,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},r=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},a=(l,c)=>{this.canvas&&this.resize(l,c)};let s;const o=()=>{r("attach",o),this.attached=!0,this.resize(),i("resize",a),i("detach",s)};s=()=>{this.attached=!1,r("resize",a),this._stop(),this._resize(0,0),i("attach",o)},e.isAttached(this.canvas)?o():s()}unbindEvents(){St(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},St(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const r=i?"set":"remove";let a,s,o,l;for(e==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+r+"DatasetHoverStyle"]()),o=0,l=t.length;o<l;++o){s=t[o];const c=s&&this.getDatasetMeta(s.datasetIndex).controller;c&&c[r+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map(({datasetIndex:a,index:s})=>{const o=this.getDatasetMeta(a);if(!o)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:o.data[s],index:s}});!mr(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,i){const r=this.options.hover,a=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),s=a(e,t),o=i?t:a(t,e);s.length&&this.updateHoverStyle(s,r.mode,!1),o.length&&r.mode&&this.updateHoverStyle(o,r.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},r=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,r)===!1)return;const a=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,r),(a||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:r=[],options:a}=this,s=e,o=this._getActiveElements(t,r,i,s),l=Qp(t),c=B0(t,this._lastEvent,i,l);i&&(this._lastEvent=null,Tt(a.onHover,[t,o,this],this),l&&Tt(a.onClick,[t,o,this],this));const u=!mr(o,r);return(u||e)&&(this._active=o,this._updateHoverStyles(o,r,e)),this._lastEvent=c,u}_getActiveElements(t,e,i,r){if(t.type==="mouseout")return[];if(!i)return e;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,r)}},H(Sn,"defaults",Ut),H(Sn,"instances",Fr),H(Sn,"overrides",On),H(Sn,"registry",Ie),H(Sn,"version",I0),H(Sn,"getChart",Fu),Sn);function Uu(){return St(Se.instances,n=>n._plugins.invalidate())}function z0(n,t,e){const{startAngle:i,pixelMargin:r,x:a,y:s,outerRadius:o,innerRadius:l}=t;let c=r/o;n.beginPath(),n.arc(a,s,o,i-c,e+c),l>r?(c=r/l,n.arc(a,s,l,e+c,i-c,!0)):n.arc(a,s,r,e+Et,i-Et),n.closePath(),n.clip()}function Y0(n){return qa(n,["outerStart","outerEnd","innerStart","innerEnd"])}function H0(n,t,e,i){const r=Y0(n.options.borderRadius),a=(e-t)/2,s=Math.min(a,i*t/2),o=l=>{const c=(e-Math.min(a,l))*i/2;return Qt(l,0,Math.min(a,c))};return{outerStart:o(r.outerStart),outerEnd:o(r.outerEnd),innerStart:Qt(r.innerStart,0,s),innerEnd:Qt(r.innerEnd,0,s)}}function ri(n,t,e,i){return{x:e+n*Math.cos(t),y:i+n*Math.sin(t)}}function Br(n,t,e,i,r,a){const{x:s,y:o,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+i+e-c,0),f=u>0?u+i+e+c:0;let p=0;const y=r-l;if(i){const $=u>0?u-i:0,Y=d>0?d-i:0,I=($+Y)/2,rt=I!==0?y*I/(I+i):y;p=(y-rt)/2}const x=Math.max(.001,y*d-e/dt)/d,g=(y-x)/2,m=l+g+p,v=r-g-p,{outerStart:b,outerEnd:w,innerStart:T,innerEnd:M}=H0(t,f,d,v-m),k=d-b,S=d-w,C=m+b/k,O=v-w/S,P=f+T,E=f+M,F=m+T/P,q=v-M/E;if(n.beginPath(),a){const $=(C+O)/2;if(n.arc(s,o,d,C,$),n.arc(s,o,d,$,O),w>0){const B=ri(S,O,s,o);n.arc(B.x,B.y,w,O,v+Et)}const Y=ri(E,v,s,o);if(n.lineTo(Y.x,Y.y),M>0){const B=ri(E,q,s,o);n.arc(B.x,B.y,M,v+Et,q+Math.PI)}const I=(v-M/f+(m+T/f))/2;if(n.arc(s,o,f,v-M/f,I,!0),n.arc(s,o,f,I,m+T/f,!0),T>0){const B=ri(P,F,s,o);n.arc(B.x,B.y,T,F+Math.PI,m-Et)}const rt=ri(k,m,s,o);if(n.lineTo(rt.x,rt.y),b>0){const B=ri(k,C,s,o);n.arc(B.x,B.y,b,m-Et,C)}}else{n.moveTo(s,o);const $=Math.cos(C)*d+s,Y=Math.sin(C)*d+o;n.lineTo($,Y);const I=Math.cos(O)*d+s,rt=Math.sin(O)*d+o;n.lineTo(I,rt)}n.closePath()}function $0(n,t,e,i,r){const{fullCircles:a,startAngle:s,circumference:o}=t;let l=t.endAngle;if(a){Br(n,t,e,i,l,r);for(let c=0;c<a;++c)n.fill();isNaN(o)||(l=s+(o%kt||kt))}return Br(n,t,e,i,l,r),n.fill(),l}function j0(n,t,e,i,r){const{fullCircles:a,startAngle:s,circumference:o,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:f}=l,p=l.borderAlign==="inner";if(!c)return;n.setLineDash(d||[]),n.lineDashOffset=f,p?(n.lineWidth=c*2,n.lineJoin=u||"round"):(n.lineWidth=c,n.lineJoin=u||"bevel");let y=t.endAngle;if(a){Br(n,t,e,i,y,r);for(let x=0;x<a;++x)n.stroke();isNaN(o)||(y=s+(o%kt||kt))}p&&z0(n,t,y),a||(Br(n,t,e,i,y,r),n.stroke())}class $i extends te{constructor(e){super();H(this,"circumference");H(this,"endAngle");H(this,"fullCircles");H(this,"innerRadius");H(this,"outerRadius");H(this,"pixelMargin");H(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,i,r){const a=this.getProps(["x","y"],r),{angle:s,distance:o}=vc(a,{x:e,y:i}),{startAngle:l,endAngle:c,innerRadius:u,outerRadius:d,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),p=(this.options.spacing+this.options.borderWidth)/2,x=it(f,c-l)>=kt||Mi(s,l,c),g=je(o,u+p,d+p);return x&&g}getCenterPoint(e){const{x:i,y:r,startAngle:a,endAngle:s,innerRadius:o,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:c,spacing:u}=this.options,d=(a+s)/2,f=(o+l+u+c)/2;return{x:i+Math.cos(d)*f,y:r+Math.sin(d)*f}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:i,circumference:r}=this,a=(i.offset||0)/4,s=(i.spacing||0)/2,o=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=r>kt?Math.floor(r/kt):0,r===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*a,Math.sin(l)*a);const c=1-Math.sin(Math.min(dt,r||0)),u=a*c;e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,$0(e,this,u,s,o),j0(e,this,u,s,o),e.restore()}}H($i,"id","arc"),H($i,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),H($i,"defaultRoutes",{backgroundColor:"backgroundColor"}),H($i,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function Bu(n,t,e=t){n.lineCap=it(e.borderCapStyle,t.borderCapStyle),n.setLineDash(it(e.borderDash,t.borderDash)),n.lineDashOffset=it(e.borderDashOffset,t.borderDashOffset),n.lineJoin=it(e.borderJoinStyle,t.borderJoinStyle),n.lineWidth=it(e.borderWidth,t.borderWidth),n.strokeStyle=it(e.borderColor,t.borderColor)}function V0(n,t,e){n.lineTo(e.x,e.y)}function q0(n){return n.stepped?vg:n.tension||n.cubicInterpolationMode==="monotone"?bg:V0}function Wu(n,t,e={}){const i=n.length,{start:r=0,end:a=i-1}=e,{start:s,end:o}=t,l=Math.max(r,s),c=Math.min(a,o),u=r<s&&a<s||r>o&&a>o;return{count:i,start:l,loop:t.loop,ilen:c<l&&!u?i+c-l:c-l}}function X0(n,t,e,i){const{points:r,options:a}=t,{count:s,start:o,loop:l,ilen:c}=Wu(r,e,i),u=q0(a);let{move:d=!0,reverse:f}=i||{},p,y,x;for(p=0;p<=c;++p)y=r[(o+(f?c-p:p))%s],!y.skip&&(d?(n.moveTo(y.x,y.y),d=!1):u(n,x,y,f,a.stepped),x=y);return l&&(y=r[(o+(f?c:0))%s],u(n,x,y,f,a.stepped)),!!l}function G0(n,t,e,i){const r=t.points,{count:a,start:s,ilen:o}=Wu(r,e,i),{move:l=!0,reverse:c}=i||{};let u=0,d=0,f,p,y,x,g,m;const v=w=>(s+(c?o-w:w))%a,b=()=>{x!==g&&(n.lineTo(u,g),n.lineTo(u,x),n.lineTo(u,m))};for(l&&(p=r[v(0)],n.moveTo(p.x,p.y)),f=0;f<=o;++f){if(p=r[v(f)],p.skip)continue;const w=p.x,T=p.y,M=w|0;M===y?(T<x?x=T:T>g&&(g=T),u=(d*u+w)/++d):(b(),n.lineTo(w,T),y=M,d=0,x=g=T),m=T}b()}function ds(n){const t=n.options,e=t.borderDash&&t.borderDash.length;return!n._decimated&&!n._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?G0:X0}function K0(n){return n.stepped?Qg:n.tension||n.cubicInterpolationMode==="monotone"?Zg:An}function Q0(n,t,e,i){let r=t._path;r||(r=t._path=new Path2D,t.path(r,e,i)&&r.closePath()),Bu(n,t.options),n.stroke(r)}function Z0(n,t,e,i){const{segments:r,options:a}=t,s=ds(t);for(const o of r)Bu(n,a,o.style),n.beginPath(),s(n,t,o,{start:e,end:e+i-1})&&n.closePath(),n.stroke()}const J0=typeof Path2D=="function";function ty(n,t,e,i){J0&&!t.options.segment?Q0(n,t,e,i):Z0(n,t,e,i)}class gn extends te{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 i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const r=i.spanGaps?this._loop:this._fullLoop;Hg(this._points,i,t,r,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=rm(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,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,r=t[e],a=this.points,s=Gc(this,{property:e,start:r,end:r});if(!s.length)return;const o=[],l=K0(i);let c,u;for(c=0,u=s.length;c<u;++c){const{start:d,end:f}=s[c],p=a[d],y=a[f];if(p===y){o.push(p);continue}const x=Math.abs((r-p[e])/(y[e]-p[e])),g=l(p,y,x,i.stepped);g[e]=t[e],o.push(g)}return o.length===1?o[0]:o}pathSegment(t,e,i){return ds(this)(t,this,e,i)}path(t,e,i){const r=this.segments,a=ds(this);let s=this._loop;e=e||0,i=i||this.points.length-e;for(const o of r)s&=a(t,this,o,{start:e,end:e+i-1});return!!s}draw(t,e,i,r){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),ty(t,this,i,r),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}H(gn,"id","line"),H(gn,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),H(gn,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),H(gn,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function zu(n,t,e,i){const r=n.options,{[e]:a}=n.getProps([e],i);return Math.abs(t-a)<r.radius+r.hitRadius}class Wr extends te{constructor(e){super();H(this,"parsed");H(this,"skip");H(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,i,r){const a=this.options,{x:s,y:o}=this.getProps(["x","y"],r);return Math.pow(e-s,2)+Math.pow(i-o,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(e,i){return zu(this,e,"x",i)}inYRange(e,i){return zu(this,e,"y",i)}getCenterPoint(e){const{x:i,y:r}=this.getProps(["x","y"],e);return{x:i,y:r}}size(e){e=e||this.options||{};let i=e.radius||0;i=Math.max(i,i&&e.hoverRadius||0);const r=i&&e.borderWidth||0;return(i+r)*2}draw(e,i){const r=this.options;this.skip||r.radius<.1||!qe(this,i,this.size(r)/2)||(e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.fillStyle=r.backgroundColor,Va(e,r,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}H(Wr,"id","point"),H(Wr,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),H(Wr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Yu(n,t){const{x:e,y:i,base:r,width:a,height:s}=n.getProps(["x","y","base","width","height"],t);let o,l,c,u,d;return n.horizontal?(d=s/2,o=Math.min(e,r),l=Math.max(e,r),c=i-d,u=i+d):(d=a/2,o=e-d,l=e+d,c=Math.min(i,r),u=Math.max(i,r)),{left:o,top:c,right:l,bottom:u}}function mn(n,t,e,i){return n?0:Qt(t,e,i)}function ey(n,t,e){const i=n.options.borderWidth,r=n.borderSkipped,a=Ac(i);return{t:mn(r.top,a.top,0,e),r:mn(r.right,a.right,0,t),b:mn(r.bottom,a.bottom,0,e),l:mn(r.left,a.left,0,t)}}function ny(n,t,e){const{enableBorderRadius:i}=n.getProps(["enableBorderRadius"]),r=n.options.borderRadius,a=dn(r),s=Math.min(t,e),o=n.borderSkipped,l=i||lt(r);return{topLeft:mn(!l||o.top||o.left,a.topLeft,0,s),topRight:mn(!l||o.top||o.right,a.topRight,0,s),bottomLeft:mn(!l||o.bottom||o.left,a.bottomLeft,0,s),bottomRight:mn(!l||o.bottom||o.right,a.bottomRight,0,s)}}function iy(n){const t=Yu(n),e=t.right-t.left,i=t.bottom-t.top,r=ey(n,e/2,i/2),a=ny(n,e/2,i/2);return{outer:{x:t.left,y:t.top,w:e,h:i,radius:a},inner:{x:t.left+r.l,y:t.top+r.t,w:e-r.l-r.r,h:i-r.t-r.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,a.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(r.b,r.r))}}}}function fs(n,t,e,i){const r=t===null,a=e===null,o=n&&!(r&&a)&&Yu(n,i);return o&&(r||je(t,o.left,o.right))&&(a||je(e,o.top,o.bottom))}function ry(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function ay(n,t){n.rect(t.x,t.y,t.w,t.h)}function hs(n,t,e={}){const i=n.x!==e.x?-t:0,r=n.y!==e.y?-t:0,a=(n.x+n.w!==e.x+e.w?t:0)-i,s=(n.y+n.h!==e.y+e.h?t:0)-r;return{x:n.x+i,y:n.y+r,w:n.w+a,h:n.h+s,radius:n.radius}}class zr extends te{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:i,backgroundColor:r}}=this,{inner:a,outer:s}=iy(this),o=ry(s.radius)?ti:ay;t.save(),(s.w!==a.w||s.h!==a.h)&&(t.beginPath(),o(t,hs(s,e,a)),t.clip(),o(t,hs(a,-e,s)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),o(t,hs(a,e)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,e,i){return fs(this,t,e,i)}inXRange(t,e){return fs(this,t,null,e)}inYRange(t,e){return fs(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:r,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(e+r)/2:e,y:a?i:(i+r)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}H(zr,"id","bar"),H(zr,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),H(zr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var sy=Object.freeze({__proto__:null,ArcElement:$i,BarElement:zr,LineElement:gn,PointElement:Wr});const ps=["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)"],Hu=ps.map(n=>n.replace("rgb(","rgba(").replace(")",", 0.5)"));function $u(n){return ps[n%ps.length]}function ju(n){return Hu[n%Hu.length]}function oy(n,t){return n.borderColor=$u(t),n.backgroundColor=ju(t),++t}function ly(n,t){return n.backgroundColor=n.data.map(()=>$u(t++)),t}function cy(n,t){return n.backgroundColor=n.data.map(()=>ju(t++)),t}function uy(n){let t=0;return(e,i)=>{const r=n.getDatasetMeta(i).controller;r instanceof pn?t=ly(e,t):r instanceof Ni?t=cy(e,t):r&&(t=oy(e,t))}}function Vu(n){let t;for(t in n)if(n[t].borderColor||n[t].backgroundColor)return!0;return!1}function dy(n){return n&&(n.borderColor||n.backgroundColor)}var fy={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(n,t,e){if(!e.enabled)return;const{data:{datasets:i},options:r}=n.config,{elements:a}=r;if(!e.forceOverride&&(Vu(i)||dy(r)||a&&Vu(a)))return;const s=uy(n);i.forEach(s)}};function hy(n,t,e,i,r){const a=r.samples||i;if(a>=e)return n.slice(t,t+e);const s=[],o=(e-2)/(a-2);let l=0;const c=t+e-1;let u=t,d,f,p,y,x;for(s[l++]=n[u],d=0;d<a-2;d++){let g=0,m=0,v;const b=Math.floor((d+1)*o)+1+t,w=Math.min(Math.floor((d+2)*o)+1,e)+t,T=w-b;for(v=b;v<w;v++)g+=n[v].x,m+=n[v].y;g/=T,m/=T;const M=Math.floor(d*o)+1+t,k=Math.min(Math.floor((d+1)*o)+1,e)+t,{x:S,y:C}=n[u];for(p=y=-1,v=M;v<k;v++)y=.5*Math.abs((S-g)*(n[v].y-C)-(S-n[v].x)*(m-C)),y>p&&(p=y,f=n[v],x=v);s[l++]=f,u=x}return s[l++]=n[c],s}function py(n,t,e,i){let r=0,a=0,s,o,l,c,u,d,f,p,y,x;const g=[],m=t+e-1,v=n[t].x,w=n[m].x-v;for(s=t;s<t+e;++s){o=n[s],l=(o.x-v)/w*i,c=o.y;const T=l|0;if(T===u)c<y?(y=c,d=s):c>x&&(x=c,f=s),r=(a*r+o.x)/++a;else{const M=s-1;if(!st(d)&&!st(f)){const k=Math.min(d,f),S=Math.max(d,f);k!==p&&k!==M&&g.push({...n[k],x:r}),S!==p&&S!==M&&g.push({...n[S],x:r})}s>0&&M!==p&&g.push(n[M]),g.push(o),u=T,a=0,y=x=c,d=f=p=s}}return g}function qu(n){if(n._decimated){const t=n._data;delete n._decimated,delete n._data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Xu(n){n.data.datasets.forEach(t=>{qu(t)})}function gy(n,t){const e=t.length;let i=0,r;const{iScale:a}=n,{min:s,max:o,minDefined:l,maxDefined:c}=a.getUserBounds();return l&&(i=Qt(Ve(t,a.axis,s).lo,0,e-1)),c?r=Qt(Ve(t,a.axis,o).hi+1,i,e)-i:r=e-i,{start:i,count:r}}var my={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(n,t,e)=>{if(!e.enabled){Xu(n);return}const i=n.width;n.data.datasets.forEach((r,a)=>{const{_data:s,indexAxis:o}=r,l=n.getDatasetMeta(a),c=s||r.data;if(Ri([o,n.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=n.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||n.options.parsing)return;let{start:d,count:f}=gy(l,c);const p=e.threshold||4*i;if(f<=p){qu(r);return}st(s)&&(r._data=c,delete r.data,Object.defineProperty(r,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(x){this._data=x}}));let y;switch(e.algorithm){case"lttb":y=hy(c,d,f,i,e);break;case"min-max":y=py(c,d,f,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}r._decimated=y})},destroy(n){Xu(n)}};function yy(n,t,e){const i=n.segments,r=n.points,a=t.points,s=[];for(const o of i){let{start:l,end:c}=o;c=ms(l,c,r);const u=gs(e,r[l],r[c],o.loop);if(!t.segments){s.push({source:o,target:u,start:r[l],end:r[c]});continue}const d=Gc(t,u);for(const f of d){const p=gs(e,a[f.start],a[f.end],f.loop),y=Xc(o,r,p);for(const x of y)s.push({source:x,target:f,start:{[e]:Gu(u,p,"start",Math.max)},end:{[e]:Gu(u,p,"end",Math.min)}})}}return s}function gs(n,t,e,i){if(i)return;let r=t[n],a=e[n];return n==="angle"&&(r=xe(r),a=xe(a)),{property:n,start:r,end:a}}function vy(n,t){const{x:e=null,y:i=null}=n||{},r=t.points,a=[];return t.segments.forEach(({start:s,end:o})=>{o=ms(s,o,r);const l=r[s],c=r[o];i!==null?(a.push({x:l.x,y:i}),a.push({x:c.x,y:i})):e!==null&&(a.push({x:e,y:l.y}),a.push({x:e,y:c.y}))}),a}function ms(n,t,e){for(;t>n;t--){const i=e[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function Gu(n,t,e,i){return n&&t?i(n[e],t[e]):n?n[e]:t?t[e]:0}function Ku(n,t){let e=[],i=!1;return mt(n)?(i=!0,e=n):e=vy(n,t),e.length?new gn({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function Qu(n){return n&&n.fill!==!1}function by(n,t,e){let r=n[t].fill;const a=[t];let s;if(!e)return r;for(;r!==!1&&a.indexOf(r)===-1;){if(!It(r))return r;if(s=n[r],!s)return!1;if(s.visible)return r;a.push(r),r=s.fill}return!1}function xy(n,t,e){const i=Sy(n);if(lt(i))return isNaN(i.value)?!1:i;let r=parseFloat(i);return It(r)&&Math.floor(r)===r?_y(i[0],t,r,e):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function _y(n,t,e,i){return(n==="-"||n==="+")&&(e=t+e),e===t||e<0||e>=i?!1:e}function wy(n,t){let e=null;return n==="start"?e=t.bottom:n==="end"?e=t.top:lt(n)?e=t.getPixelForValue(n.value):t.getBasePixel&&(e=t.getBasePixel()),e}function Ty(n,t,e){let i;return n==="start"?i=e:n==="end"?i=t.options.reverse?t.min:t.max:lt(n)?i=n.value:i=t.getBaseValue(),i}function Sy(n){const t=n.options,e=t.fill;let i=it(e&&e.target,e);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function Cy(n){const{scale:t,index:e,line:i}=n,r=[],a=i.segments,s=i.points,o=My(t,e);o.push(Ku({x:null,y:t.bottom},i));for(let l=0;l<a.length;l++){const c=a[l];for(let u=c.start;u<=c.end;u++)Dy(r,s[u],o)}return new gn({points:r,options:{}})}function My(n,t){const e=[],i=n.getMatchingVisibleMetas("line");for(let r=0;r<i.length;r++){const a=i[r];if(a.index===t)break;a.hidden||e.unshift(a.dataset)}return e}function Dy(n,t,e){const i=[];for(let r=0;r<e.length;r++){const a=e[r],{first:s,last:o,point:l}=ky(a,t,"x");if(!(!l||s&&o)){if(s)i.unshift(l);else if(n.push(l),!o)break}}n.push(...i)}function ky(n,t,e){const i=n.interpolate(t,e);if(!i)return{};const r=i[e],a=n.segments,s=n.points;let o=!1,l=!1;for(let c=0;c<a.length;c++){const u=a[c],d=s[u.start][e],f=s[u.end][e];if(je(r,d,f)){o=r===d,l=r===f;break}}return{first:o,last:l,point:i}}class Zu{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:r,y:a,radius:s}=this;return e=e||{start:0,end:kt},t.arc(r,a,s,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:r}=this,a=t.angle;return{x:e+Math.cos(a)*r,y:i+Math.sin(a)*r,angle:a}}}function Oy(n){const{chart:t,fill:e,line:i}=n;if(It(e))return Py(t,e);if(e==="stack")return Cy(n);if(e==="shape")return!0;const r=Ey(n);return r instanceof Zu?r:Ku(r,i)}function Py(n,t){const e=n.getDatasetMeta(t);return e&&n.isDatasetVisible(t)?e.dataset:null}function Ey(n){return(n.scale||{}).getPointPositionForValue?Ay(n):Ry(n)}function Ry(n){const{scale:t={},fill:e}=n,i=wy(e,t);if(It(i)){const r=t.isHorizontal();return{x:r?i:null,y:r?null:i}}return null}function Ay(n){const{scale:t,fill:e}=n,i=t.options,r=t.getLabels().length,a=i.reverse?t.max:t.min,s=Ty(e,t,a),o=[];if(i.grid.circular){const l=t.getPointPositionForValue(0,a);return new Zu({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(s)})}for(let l=0;l<r;++l)o.push(t.getPointPositionForValue(l,s));return o}function ys(n,t,e){const i=Oy(t),{line:r,scale:a,axis:s}=t,o=r.options,l=o.fill,c=o.backgroundColor,{above:u=c,below:d=c}=l||{};i&&r.points.length&&(Pi(n,e),Ly(n,{line:r,target:i,above:u,below:d,area:e,scale:a,axis:s}),Ei(n))}function Ly(n,t){const{line:e,target:i,above:r,below:a,area:s,scale:o}=t,l=e._loop?"angle":t.axis;n.save(),l==="x"&&a!==r&&(Ju(n,i,s.top),td(n,{line:e,target:i,color:r,scale:o,property:l}),n.restore(),n.save(),Ju(n,i,s.bottom)),td(n,{line:e,target:i,color:a,scale:o,property:l}),n.restore()}function Ju(n,t,e){const{segments:i,points:r}=t;let a=!0,s=!1;n.beginPath();for(const o of i){const{start:l,end:c}=o,u=r[l],d=r[ms(l,c,r)];a?(n.moveTo(u.x,u.y),a=!1):(n.lineTo(u.x,e),n.lineTo(u.x,u.y)),s=!!t.pathSegment(n,o,{move:s}),s?n.closePath():n.lineTo(d.x,e)}n.lineTo(t.first().x,e),n.closePath(),n.clip()}function td(n,t){const{line:e,target:i,property:r,color:a,scale:s}=t,o=yy(e,i,r);for(const{source:l,target:c,start:u,end:d}of o){const{style:{backgroundColor:f=a}={}}=l,p=i!==!0;n.save(),n.fillStyle=f,Iy(n,s,p&&gs(r,u,d)),n.beginPath();const y=!!e.pathSegment(n,l);let x;if(p){y?n.closePath():ed(n,i,d,r);const g=!!i.pathSegment(n,c,{move:y,reverse:!0});x=y&&g,x||ed(n,i,u,r)}n.closePath(),n.fill(x?"evenodd":"nonzero"),n.restore()}}function Iy(n,t,e){const{top:i,bottom:r}=t.chart.chartArea,{property:a,start:s,end:o}=e||{};a==="x"&&(n.beginPath(),n.rect(s,i,o-s,r-i),n.clip())}function ed(n,t,e,i){const r=t.interpolate(e,i);r&&n.lineTo(r.x,r.y)}var Ny={id:"filler",afterDatasetsUpdate(n,t,e){const i=(n.data.datasets||[]).length,r=[];let a,s,o,l;for(s=0;s<i;++s)a=n.getDatasetMeta(s),o=a.dataset,l=null,o&&o.options&&o instanceof gn&&(l={visible:n.isDatasetVisible(s),index:s,fill:xy(o,s,i),chart:n,axis:a.controller.options.indexAxis,scale:a.vScale,line:o}),a.$filler=l,r.push(l);for(s=0;s<i;++s)l=r[s],!(!l||l.fill===!1)&&(l.fill=by(r,s,e.propagate))},beforeDraw(n,t,e){const i=e.drawTime==="beforeDraw",r=n.getSortedVisibleDatasetMetas(),a=n.chartArea;for(let s=r.length-1;s>=0;--s){const o=r[s].$filler;o&&(o.line.updateControlPoints(a,o.axis),i&&o.fill&&ys(n.ctx,o,a))}},beforeDatasetsDraw(n,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const i=n.getSortedVisibleDatasetMetas();for(let r=i.length-1;r>=0;--r){const a=i[r].$filler;Qu(a)&&ys(n.ctx,a,n.chartArea)}},beforeDatasetDraw(n,t,e){const i=t.meta.$filler;!Qu(i)||e.drawTime!=="beforeDatasetDraw"||ys(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const nd=(n,t)=>{let{boxHeight:e=t,boxWidth:i=t}=n;return n.usePointStyle&&(e=Math.min(e,t),i=n.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:e,itemHeight:Math.max(t,e)}},Fy=(n,t)=>n!==null&&t!==null&&n.datasetIndex===t.datasetIndex&&n.index===t.index;class id extends te{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,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=Tt(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(i=>t.filter(i,this.chart.data))),t.sort&&(e=e.sort((i,r)=>t.sort(i,r,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 i=t.labels,r=Rt(i.font),a=r.size,s=this._computeTitleHeight(),{boxWidth:o,itemHeight:l}=nd(i,a);let c,u;e.font=r.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(s,a,o,l)+10):(u=this.maxHeight,c=this._fitCols(s,r,o,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,r){const{ctx:a,maxWidth:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=r+o;let d=t;a.textAlign="left",a.textBaseline="middle";let f=-1,p=-u;return this.legendItems.forEach((y,x)=>{const g=i+e/2+a.measureText(y.text).width;(x===0||c[c.length-1]+g+2*o>s)&&(d+=u,c[c.length-(x>0?0:1)]=0,p+=u,f++),l[x]={left:0,top:p,row:f,width:g,height:r},c[c.length-1]+=g+o}),d}_fitCols(t,e,i,r){const{ctx:a,maxHeight:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=s-t;let d=o,f=0,p=0,y=0,x=0;return this.legendItems.forEach((g,m)=>{const{itemWidth:v,itemHeight:b}=Uy(i,e,a,g,r);m>0&&p+b+2*o>u&&(d+=f+o,c.push({width:f,height:p}),y+=f+o,x++,f=p=0),l[m]={left:y,top:p,col:x,width:v,height:b},f=Math.max(f,v),p+=b+o}),d+=f,c.push({width:f,height:p}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:r},rtl:a}}=this,s=ii(a,this.left,this.width);if(this.isHorizontal()){let o=0,l=ie(i,this.left+r,this.right-this.lineWidths[o]);for(const c of e)o!==c.row&&(o=c.row,l=ie(i,this.left+r,this.right-this.lineWidths[o])),c.top+=this.top+t+r,c.left=s.leftForLtr(s.x(l),c.width),l+=c.width+r}else{let o=0,l=ie(i,this.top+t+r,this.bottom-this.columnSizes[o].height);for(const c of e)c.col!==o&&(o=c.col,l=ie(i,this.top+t+r,this.bottom-this.columnSizes[o].height)),c.top=l,c.left+=this.left+r,c.left=s.leftForLtr(s.x(c.left),c.width),l+=c.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Pi(t,this),this._draw(),Ei(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:r}=this,{align:a,labels:s}=t,o=Ut.color,l=ii(t.rtl,this.left,this.width),c=Rt(s.font),{padding:u}=s,d=c.size,f=d/2;let p;this.drawTitle(),r.textAlign=l.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=c.string;const{boxWidth:y,boxHeight:x,itemHeight:g}=nd(s,d),m=function(M,k,S){if(isNaN(y)||y<=0||isNaN(x)||x<0)return;r.save();const C=it(S.lineWidth,1);if(r.fillStyle=it(S.fillStyle,o),r.lineCap=it(S.lineCap,"butt"),r.lineDashOffset=it(S.lineDashOffset,0),r.lineJoin=it(S.lineJoin,"miter"),r.lineWidth=C,r.strokeStyle=it(S.strokeStyle,o),r.setLineDash(it(S.lineDash,[])),s.usePointStyle){const O={radius:x*Math.SQRT2/2,pointStyle:S.pointStyle,rotation:S.rotation,borderWidth:C},P=l.xPlus(M,y/2),E=k+f;Rc(r,O,P,E,s.pointStyleWidth&&y)}else{const O=k+Math.max((d-x)/2,0),P=l.leftForLtr(M,y),E=dn(S.borderRadius);r.beginPath(),Object.values(E).some(F=>F!==0)?ti(r,{x:P,y:O,w:y,h:x,radius:E}):r.rect(P,O,y,x),r.fill(),C!==0&&r.stroke()}r.restore()},v=function(M,k,S){En(r,S.text,M,k+g/2,c,{strikethrough:S.hidden,textAlign:l.textAlign(S.textAlign)})},b=this.isHorizontal(),w=this._computeTitleHeight();b?p={x:ie(a,this.left+u,this.right-i[0]),y:this.top+u+w,line:0}:p={x:this.left+u,y:ie(a,this.top+w+u,this.bottom-e[0].height),line:0},$c(this.ctx,t.textDirection);const T=g+u;this.legendItems.forEach((M,k)=>{r.strokeStyle=M.fontColor,r.fillStyle=M.fontColor;const S=r.measureText(M.text).width,C=l.textAlign(M.textAlign||(M.textAlign=s.textAlign)),O=y+f+S;let P=p.x,E=p.y;l.setWidth(this.width),b?k>0&&P+O+u>this.right&&(E=p.y+=T,p.line++,P=p.x=ie(a,this.left+u,this.right-i[p.line])):k>0&&E+T>this.bottom&&(P=p.x=P+e[p.line].width+u,p.line++,E=p.y=ie(a,this.top+w+u,this.bottom-e[p.line].height));const F=l.x(P);if(m(F,E,M),P=og(C,P+y+f,b?P+O:this.right,t.rtl),v(l.x(P),E,M),b)p.x+=O+u;else if(typeof M.text!="string"){const q=c.lineHeight;p.y+=rd(M,q)+u}else p.y+=T}),jc(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=Rt(e.font),r=Gt(e.padding);if(!e.display)return;const a=ii(t.rtl,this.left,this.width),s=this.ctx,o=e.position,l=i.size/2,c=r.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=ie(t.align,d,this.right-f);else{const y=this.columnSizes.reduce((x,g)=>Math.max(x,g.height),0);u=c+ie(t.align,this.top,this.bottom-y-t.labels.padding-this._computeTitleHeight())}const p=ie(o,d,d+f);s.textAlign=a.textAlign(za(o)),s.textBaseline="middle",s.strokeStyle=e.color,s.fillStyle=e.color,s.font=i.string,En(s,e.text,p,u,i)}_computeTitleHeight(){const t=this.options.title,e=Rt(t.font),i=Gt(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,r,a;if(je(t,this.left,this.right)&&je(e,this.top,this.bottom)){for(a=this.legendHitBoxes,i=0;i<a.length;++i)if(r=a[i],je(t,r.left,r.left+r.width)&&je(e,r.top,r.top+r.height))return this.legendItems[i]}return null}handleEvent(t){const e=this.options;if(!zy(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const r=this._hoveredItem,a=Fy(r,i);r&&!a&&Tt(e.onLeave,[t,r,this],this),this._hoveredItem=i,i&&!a&&Tt(e.onHover,[t,i,this],this)}else i&&Tt(e.onClick,[t,i,this],this)}}function Uy(n,t,e,i,r){const a=By(i,n,t,e),s=Wy(r,i,t.lineHeight);return{itemWidth:a,itemHeight:s}}function By(n,t,e,i){let r=n.text;return r&&typeof r!="string"&&(r=r.reduce((a,s)=>a.length>s.length?a:s)),t+e.size/2+i.measureText(r).width}function Wy(n,t,e){let i=n;return typeof t.text!="string"&&(i=rd(t,e)),i}function rd(n,t){const e=n.text?n.text.length:0;return t*e}function zy(n,t){return!!((n==="mousemove"||n==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(n==="click"||n==="mouseup"))}var Yy={id:"legend",_element:id,start(n,t,e){const i=n.legend=new id({ctx:n.ctx,options:e,chart:n});re.configure(n,i,e),re.addBox(n,i)},stop(n){re.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,t,e){const i=n.legend;re.configure(n,i,e),i.options=e},afterUpdate(n){const t=n.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(n,t){t.replay||n.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(n,t,e){const i=t.datasetIndex,r=e.chart;r.isDatasetVisible(i)?(r.hide(i),t.hidden=!0):(r.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:n=>n.chart.options.color,boxWidth:40,padding:10,generateLabels(n){const t=n.data.datasets,{labels:{usePointStyle:e,pointStyle:i,textAlign:r,color:a,useBorderRadius:s,borderRadius:o}}=n.legend.options;return n._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),u=Gt(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:a,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:i||c.pointStyle,rotation:c.rotation,textAlign:r||c.textAlign,borderRadius:s&&(o||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:n=>n.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:n=>!n.startsWith("on"),labels:{_scriptable:n=>!["generateLabels","filter","sort"].includes(n)}}};class vs extends te{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 i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const r=mt(i.text)?i.text.length:1;this._padding=Gt(i.padding);const a=r*Rt(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:i,bottom:r,right:a,options:s}=this,o=s.align;let l=0,c,u,d;return this.isHorizontal()?(u=ie(o,i,a),d=e+t,c=a-i):(s.position==="left"?(u=i+t,d=ie(o,r,e),l=dt*-.5):(u=a-t,d=ie(o,e,r),l=dt*.5),c=r-e),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=Rt(e.font),a=i.lineHeight/2+this._padding.top,{titleX:s,titleY:o,maxWidth:l,rotation:c}=this._drawArgs(a);En(t,e.text,0,0,i,{color:e.color,maxWidth:l,rotation:c,textAlign:za(e.align),textBaseline:"middle",translation:[s,o]})}}function Hy(n,t){const e=new vs({ctx:n.ctx,options:t,chart:n});re.configure(n,e,t),re.addBox(n,e),n.titleBlock=e}var $y={id:"title",_element:vs,start(n,t,e){Hy(n,e)},stop(n){const t=n.titleBlock;re.removeBox(n,t),delete n.titleBlock},beforeUpdate(n,t,e){const i=n.titleBlock;re.configure(n,i,e),i.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 Yr=new WeakMap;var jy={id:"subtitle",start(n,t,e){const i=new vs({ctx:n.ctx,options:e,chart:n});re.configure(n,i,e),re.addBox(n,i),Yr.set(n,i)},stop(n){re.removeBox(n,Yr.get(n)),Yr.delete(n)},beforeUpdate(n,t,e){const i=Yr.get(n);re.configure(n,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ji={average(n){if(!n.length)return!1;let t,e,i=new Set,r=0,a=0;for(t=0,e=n.length;t<e;++t){const o=n[t].element;if(o&&o.hasValue()){const l=o.tooltipPosition();i.add(l.x),r+=l.y,++a}}return{x:[...i].reduce((o,l)=>o+l)/i.size,y:r/a}},nearest(n,t){if(!n.length)return!1;let e=t.x,i=t.y,r=Number.POSITIVE_INFINITY,a,s,o;for(a=0,s=n.length;a<s;++a){const l=n[a].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=Jn(t,c);u<r&&(r=u,o=l)}}if(o){const l=o.tooltipPosition();e=l.x,i=l.y}return{x:e,y:i}}};function Ne(n,t){return t&&(mt(t)?Array.prototype.push.apply(n,t):n.push(t)),n}function Ge(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(`
|
|
16
|
+
*/class cm{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,r,i){const a=e.listeners[i],s=e.duration;a.forEach(o=>o({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(r-e.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=Tc.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const a=r.items;let s=a.length-1,o=!1,l;for(;s>=0;--s)l=a[s],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),o=!0):(a[s]=a[a.length-1],a.pop());o&&(i.draw(),this._notify(i,r,t,"progress")),a.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),e+=a.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let r=e.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,r)),r}listen(t,e,r){this._getAnims(t).listeners[e].push(r)}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((r,i)=>Math.max(r,i._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 r=e.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Xe=new cm;const Jc="transparent",um={boolean(n,t,e){return e>.5?t:n},color(n,t,e){const r=Oc(n||Jc),i=r.valid&&Oc(t||Jc);return i&&i.valid?i.mix(r,e).hexString():t},number(n,t,e){return n+(t-n)*e}};class dm{constructor(t,e,r,i){const a=e[r];i=Rr([t.to,i,a,t.from]);const s=Rr([t.from,a,i]);this._active=!0,this._fn=t.fn||um[t.type||typeof s],this._easing=Dr[t.easing]||Dr.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=r,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(t,e,r){if(this._active){this._notify(!1);const i=this._target[this._prop],a=r-this._start,s=this._duration-a;this._start=r,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=Rr([t.to,e,i,t.from]),this._from=Rr([t.from,i,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,r=this._duration,i=this._prop,a=this._from,s=this._loop,o=this._to;let l;if(this._active=a!==o&&(s||e<r),!this._active){this._target[i]=o,this._notify(!0);return}if(e<0){this._target[i]=a;return}l=e/r%2,l=s&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(a,o,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,r)=>{t.push({res:e,rej:r})})}_notify(t){const e=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][e]()}}class Ja{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!lt(t))return;const e=Object.keys(Ut.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const a=t[i];if(!lt(a))return;const s={};for(const o of e)s[o]=a[o];(mt(a.properties)&&a.properties||[i]).forEach(o=>{(o===i||!r.has(o))&&r.set(o,s)})})}_animateOptions(t,e){const r=e.options,i=hm(t,r);if(!i)return[];const a=this._createAnimations(i,r);return r.$shared&&fm(t.options.$animations,r).then(()=>{t.options=r},()=>{}),a}_createAnimations(t,e){const r=this._properties,i=[],a=t.$animations||(t.$animations={}),s=Object.keys(e),o=Date.now();let l;for(l=s.length-1;l>=0;--l){const c=s[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,e));continue}const u=e[c];let d=a[c];const f=r.get(c);if(d)if(f&&d.active()){d.update(f,u,o);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}a[c]=d=new dm(f,t,c,u),i.push(d)}return i}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const r=this._createAnimations(t,e);if(r.length)return Xe.add(this._chart,r),!0}}function fm(n,t){const e=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const a=n[r[i]];a&&a.active()&&e.push(a.wait())}return Promise.all(e)}function hm(n,t){if(!t)return;let e=n.options;if(!e){n.options=t;return}return e.$shared&&(n.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function tu(n,t){const e=n&&n.options||{},r=e.reverse,i=e.min===void 0?t:0,a=e.max===void 0?t:0;return{start:r?a:i,end:r?i:a}}function pm(n,t,e){if(e===!1)return!1;const r=tu(n,e),i=tu(t,e);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function gm(n){let t,e,r,i;return lt(n)?(t=n.top,e=n.right,r=n.bottom,i=n.left):t=e=r=i=n,{top:t,right:e,bottom:r,left:i,disabled:n===!1}}function eu(n,t){const e=[],r=n._getSortedDatasetMetas(t);let i,a;for(i=0,a=r.length;i<a;++i)e.push(r[i].index);return e}function nu(n,t,e,r={}){const i=n.keys,a=r.mode==="single";let s,o,l,c;if(t!==null){for(s=0,o=i.length;s<o;++s){if(l=+i[s],l===e){if(r.all)continue;break}c=n.values[l],It(c)&&(a||t===0||Le(t)===Le(c))&&(t+=c)}return t}}function mm(n,t){const{iScale:e,vScale:r}=t,i=e.axis==="x"?"x":"y",a=r.axis==="x"?"x":"y",s=Object.keys(n),o=new Array(s.length);let l,c,u;for(l=0,c=s.length;l<c;++l)u=s[l],o[l]={[i]:u,[a]:n[u]};return o}function ru(n,t){const e=n&&n.options.stacked;return e||e===void 0&&t.stack!==void 0}function ym(n,t,e){return`${n.id}.${t.id}.${e.stack||e.type}`}function vm(n){const{min:t,max:e,minDefined:r,maxDefined:i}=n.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?e:Number.POSITIVE_INFINITY}}function bm(n,t,e){const r=n[t]||(n[t]={});return r[e]||(r[e]={})}function iu(n,t,e,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const a=n[i.index];if(e&&a>0||!e&&a<0)return i.index}return null}function au(n,t){const{chart:e,_cachedMeta:r}=n,i=e._stacks||(e._stacks={}),{iScale:a,vScale:s,index:o}=r,l=a.axis,c=s.axis,u=ym(a,s,r),d=t.length;let f;for(let p=0;p<d;++p){const y=t[p],{[l]:x,[c]:g}=y,m=y._stacks||(y._stacks={});f=m[c]=bm(i,u,x),f[o]=g,f._top=iu(f,s,!0,r.type),f._bottom=iu(f,s,!1,r.type);const v=f._visualValues||(f._visualValues={});v[o]=g}}function ts(n,t){const e=n.scales;return Object.keys(e).filter(r=>e[r].axis===t).shift()}function xm(n,t){return fn(n,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function _m(n,t,e){return fn(n,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Ar(n,t){const e=n.controller.index,r=n.vScale&&n.vScale.axis;if(r){t=t||n._parsed;for(const i of t){const a=i._stacks;if(!a||a[r]===void 0||a[r][e]===void 0)return;delete a[r][e],a[r]._visualValues!==void 0&&a[r]._visualValues[e]!==void 0&&delete a[r]._visualValues[e]}}}const es=n=>n==="reset"||n==="none",su=(n,t)=>t?n:Object.assign({},n),wm=(n,t,e)=>n&&!t.hidden&&t._stacked&&{keys:eu(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=ru(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&&Ar(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,r=this.getDataset(),i=(d,f,p,y)=>d==="x"?f:d==="r"?y:p,a=e.xAxisID=rt(r.xAxisID,ts(t,"x")),s=e.yAxisID=rt(r.yAxisID,ts(t,"y")),o=e.rAxisID=rt(r.rAxisID,ts(t,"r")),l=e.indexAxis,c=e.iAxisID=i(l,a,s,o),u=e.vAxisID=i(l,s,a,o);e.xScale=this.getScaleForId(a),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(o),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(u)}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&&_c(this._data,this),t._stacked&&Ar(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),r=this._data;if(lt(e)){const i=this._cachedMeta;this._data=mm(e,i)}else if(r!==e){if(r){_c(r,this);const i=this._cachedMeta;Ar(i),i._parsed=[]}e&&Object.isExtensible(e)&&og(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,r=this.getDataset();let i=!1;this._dataCheck();const a=e._stacked;e._stacked=ru(e.vScale,e),e.stack!==r.stack&&(i=!0,Ar(e),e.stack=r.stack),this._resyncElements(t),(i||a!==e._stacked)&&au(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:r,_data:i}=this,{iScale:a,_stacked:s}=r,o=a.axis;let l=t===0&&e===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],u,d,f;if(this._parsing===!1)r._parsed=i,r._sorted=!0,f=i;else{mt(i[t])?f=this.parseArrayData(r,i,t,e):lt(i[t])?f=this.parseObjectData(r,i,t,e):f=this.parsePrimitiveData(r,i,t,e);const p=()=>d[o]===null||c&&d[o]<c[o];for(u=0;u<e;++u)r._parsed[u+t]=d=f[u],l&&(p()&&(l=!1),c=d);r._sorted=l}s&&au(this,f)}parsePrimitiveData(t,e,r,i){const{iScale:a,vScale:s}=t,o=a.axis,l=s.axis,c=a.getLabels(),u=a===s,d=new Array(i);let f,p,y;for(f=0,p=i;f<p;++f)y=f+r,d[f]={[o]:u||a.parse(c[y],y),[l]:s.parse(e[y],y)};return d}parseArrayData(t,e,r,i){const{xScale:a,yScale:s}=t,o=new Array(i);let l,c,u,d;for(l=0,c=i;l<c;++l)u=l+r,d=e[u],o[l]={x:a.parse(d[0],u),y:s.parse(d[1],u)};return o}parseObjectData(t,e,r,i){const{xScale:a,yScale:s}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let u,d,f,p;for(u=0,d=i;u<d;++u)f=u+r,p=e[f],c[u]={x:a.parse(ln(p,o),f),y:s.parse(ln(p,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,r){const i=this.chart,a=this._cachedMeta,s=e[t.axis],o={keys:eu(i,!0),values:e._stacks[t.axis]._visualValues};return nu(o,s,a.index,{mode:r})}updateRangeFromParsed(t,e,r,i){const a=r[e.axis];let s=a===null?NaN:a;const o=i&&r._stacks[e.axis];i&&o&&(i.values=o,s=nu(i,a,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){const r=this._cachedMeta,i=r._parsed,a=r._sorted&&t===r.iScale,s=i.length,o=this._getOtherScale(t),l=wm(e,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=vm(o);let f,p;function y(){p=i[f];const x=p[o.axis];return!It(p[t.axis])||u>x||d<x}for(f=0;f<s&&!(!y()&&(this.updateRangeFromParsed(c,t,p,l),a));++f);if(a){for(f=s-1;f>=0;--f)if(!y()){this.updateRangeFromParsed(c,t,p,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,r=[];let i,a,s;for(i=0,a=e.length;i<a;++i)s=e[i][t.axis],It(s)&&r.push(s);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,r=e.iScale,i=e.vScale,a=this.getParsed(t);return{label:r?""+r.getLabelForValue(a[r.axis]):"",value:i?""+i.getLabelForValue(a[i.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=gm(rt(this.options.clip,pm(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,r=this._cachedMeta,i=r.data||[],a=e.chartArea,s=[],o=this._drawStart||0,l=this._drawCount||i.length-o,c=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(t,a,o,l),u=o;u<o+l;++u){const d=i[u];d.hidden||(d.active&&c?s.push(d):d.draw(t,a))}for(u=0;u<s.length;++u)s[u].draw(t,a)}getStyle(t,e){const r=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,e,r){const i=this.getDataset();let a;if(t>=0&&t<this._cachedMeta.data.length){const s=this._cachedMeta.data[t];a=s.$context||(s.$context=_m(this.getContext(),t,s)),a.parsed=this.getParsed(t),a.raw=i.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=xm(this.chart.getContext(),this.index)),a.dataset=i,a.index=a.datasetIndex=this.index;return a.active=!!e,a.mode=r,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",r){const i=e==="active",a=this._cachedDataOpts,s=t+"-"+e,o=a[s],l=this.enableOptionSharing&&de(r);if(o)return su(o,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=i?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),p=Object.keys(Ut.elements[t]),y=()=>this.getContext(r,i,e),x=c.resolveNamedOptions(f,p,y,d);return x.$shared&&(x.$shared=l,a[s]=Object.freeze(su(x,l))),x}_resolveAnimations(t,e,r){const i=this.chart,a=this._cachedDataOpts,s=`animation-${e}`,o=a[s];if(o)return o;let l;if(i.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,e),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(t,r,e))}const c=new Ja(i,l&&l.animations);return l&&l._cacheable&&(a[s]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||es(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const r=this.resolveDataElementOptions(t,e),i=this._sharedOptions,a=this.getSharedOptions(r),s=this.includeOptions(e,a)||a!==i;return this.updateSharedOptions(a,e,r),{sharedOptions:a,includeOptions:s}}updateElement(t,e,r,i){es(i)?Object.assign(t,r):this._resolveAnimations(e,i).update(t,r)}updateSharedOptions(t,e,r){t&&!es(e)&&this._resolveAnimations(void 0,e).update(t,r)}_setStyle(t,e,r,i){t.active=i;const a=this.getStyle(e,i);this._resolveAnimations(e,r,i).update(t,{options:!i&&this.getSharedOptions(a)||a})}removeHoverStyle(t,e,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,e,r){this._setStyle(t,r,"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,r=this._cachedMeta.data;for(const[o,l,c]of this._syncList)this[o](l,c);this._syncList=[];const i=r.length,a=e.length,s=Math.min(a,i);s&&this.parse(0,s),a>i?this._insertElements(i,a-i,t):a<i&&this._removeElements(a,i-a)}_insertElements(t,e,r=!0){const i=this._cachedMeta,a=i.data,s=t+e;let o;const l=c=>{for(c.length+=e,o=c.length-1;o>=s;o--)c[o]=c[o-e]};for(l(a),o=t;o<s;++o)a[o]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,e),r&&this.updateElements(a,t,e,"reset")}updateElements(t,e,r,i){}_removeElements(t,e){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,e);r._stacked&&Ar(r,i)}r.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,r,i]=t;this[e](r,i)}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 r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}H(Oe,"defaults",{}),H(Oe,"datasetElementType",null),H(Oe,"dataElementType",null);function Tm(n,t){if(!n._cache.$bar){const e=n.getMatchingVisibleMetas(t);let r=[];for(let i=0,a=e.length;i<a;i++)r=r.concat(e[i].controller.getAllParsedValues(n));n._cache.$bar=wc(r.sort((i,a)=>i-a))}return n._cache.$bar}function Sm(n){const t=n.iScale,e=Tm(t,n.type);let r=t._length,i,a,s,o;const l=()=>{s===32767||s===-32768||(de(o)&&(r=Math.min(r,Math.abs(s-o)||r)),o=s)};for(i=0,a=e.length;i<a;++i)s=t.getPixelForValue(e[i]),l();for(o=void 0,i=0,a=t.ticks.length;i<a;++i)s=t.getPixelForTick(i),l();return r}function Cm(n,t,e,r){const i=e.barThickness;let a,s;return st(i)?(a=t.min*e.categoryPercentage,s=e.barPercentage):(a=i*r,s=1),{chunk:a/r,ratio:s,start:t.pixels[n]-a/2}}function Mm(n,t,e,r){const i=t.pixels,a=i[n];let s=n>0?i[n-1]:null,o=n<i.length-1?i[n+1]:null;const l=e.categoryPercentage;s===null&&(s=a-(o===null?t.end-t.start:o-a)),o===null&&(o=a+a-s);const c=a-(a-Math.min(s,o))/2*l;return{chunk:Math.abs(o-s)/2*l/r,ratio:e.barPercentage,start:c}}function Dm(n,t,e,r){const i=e.parse(n[0],r),a=e.parse(n[1],r),s=Math.min(i,a),o=Math.max(i,a);let l=s,c=o;Math.abs(s)>Math.abs(o)&&(l=o,c=s),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:a,min:s,max:o}}function ou(n,t,e,r){return mt(n)?Dm(n,t,e,r):t[e.axis]=e.parse(n,r),t}function lu(n,t,e,r){const i=n.iScale,a=n.vScale,s=i.getLabels(),o=i===a,l=[];let c,u,d,f;for(c=e,u=e+r;c<u;++c)f=t[c],d={},d[i.axis]=o||i.parse(s[c],c),l.push(ou(f,d,a,c));return l}function ns(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function km(n,t,e){return n!==0?Le(n):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function Om(n){let t,e,r,i,a;return n.horizontal?(t=n.base>n.x,e="left",r="right"):(t=n.base<n.y,e="bottom",r="top"),t?(i="end",a="start"):(i="start",a="end"),{start:e,end:r,reverse:t,top:i,bottom:a}}function Pm(n,t,e,r){let i=t.borderSkipped;const a={};if(!i){n.borderSkipped=a;return}if(i===!0){n.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:o,reverse:l,top:c,bottom:u}=Om(n);i==="middle"&&e&&(n.enableBorderRadius=!0,(e._top||0)===r?i=c:(e._bottom||0)===r?i=u:(a[cu(u,s,o,l)]=!0,i=c)),a[cu(i,s,o,l)]=!0,n.borderSkipped=a}function cu(n,t,e,r){return r?(n=Em(n,t,e),n=uu(n,e,t)):n=uu(n,t,e),n}function Em(n,t,e){return n===t?e:n===e?t:n}function uu(n,t,e){return n==="start"?t:n==="end"?e:n}function Rm(n,{inflateAmount:t},e){n.inflateAmount=t==="auto"?e===1?.33:0:t}class Lr extends Oe{parsePrimitiveData(t,e,r,i){return lu(t,e,r,i)}parseArrayData(t,e,r,i){return lu(t,e,r,i)}parseObjectData(t,e,r,i){const{iScale:a,vScale:s}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,c=a.axis==="x"?o:l,u=s.axis==="x"?o:l,d=[];let f,p,y,x;for(f=r,p=r+i;f<p;++f)x=e[f],y={},y[a.axis]=a.parse(ln(x,c),f),d.push(ou(ln(x,u),y,s,f));return d}updateRangeFromParsed(t,e,r,i){super.updateRangeFromParsed(t,e,r,i);const a=r._custom;a&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:r,vScale:i}=e,a=this.getParsed(t),s=a._custom,o=ns(s)?"["+s.start+", "+s.end+"]":""+i.getLabelForValue(a[i.axis]);return{label:""+r.getLabelForValue(a[r.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,r,i){const a=i==="reset",{index:s,_cachedMeta:{vScale:o}}=this,l=o.getBasePixel(),c=o.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(e,i);for(let p=e;p<e+r;p++){const y=this.getParsed(p),x=a||st(y[o.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),g=this._calculateBarIndexPixels(p,u),m=(y._stacks||{})[o.axis],v={horizontal:c,base:x.base,enableBorderRadius:!m||ns(y._custom)||s===m._top||s===m._bottom,x:c?x.head:g.center,y:c?g.center:x.head,height:c?g.size:Math.abs(x.size),width:c?Math.abs(x.size):g.size};f&&(v.options=d||this.resolveDataElementOptions(p,t[p].active?"active":i));const b=v.options||t[p].options;Pm(v,b,m,s),Rm(v,b,u.ratio),this.updateElement(t[p],p,v,i)}}_getStacks(t,e){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),a=r.options.stacked,s=[],o=l=>{const c=l.controller.getParsed(e),u=c&&c[l.vScale.axis];if(st(u)||isNaN(u))return!0};for(const l of i)if(!(e!==void 0&&o(l))&&((a===!1||s.indexOf(l.stack)===-1||a===void 0&&l.stack===void 0)&&s.push(l.stack),l.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,r){const i=this._getStacks(t,r),a=e!==void 0?i.indexOf(e):-1;return a===-1?i.length-1:a}_getRuler(){const t=this.options,e=this._cachedMeta,r=e.iScale,i=[];let a,s;for(a=0,s=e.data.length;a<s;++a)i.push(r.getPixelForValue(this.getParsed(a)[r.axis],a));const o=t.barThickness;return{min:o||Sm(e),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:o?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:r,index:i},options:{base:a,minBarLength:s}}=this,o=a||0,l=this.getParsed(t),c=l._custom,u=ns(c);let d=l[e.axis],f=0,p=r?this.applyStack(e,l,r):d,y,x;p!==d&&(f=p-d,p=d),u&&(d=c.barStart,p=c.barEnd-c.barStart,d!==0&&Le(d)!==Le(c.barEnd)&&(f=0),f+=d);const g=!st(a)&&!u?a:f;let m=e.getPixelForValue(g);if(this.chart.getDataVisibility(t)?y=e.getPixelForValue(f+p):y=m,x=y-m,Math.abs(x)<s){x=km(x,e,o)*s,d===o&&(m-=x/2);const v=e.getPixelForDecimal(0),b=e.getPixelForDecimal(1),w=Math.min(v,b),T=Math.max(v,b);m=Math.max(Math.min(m,T),w),y=m+x,r&&!u&&(l._stacks[e.axis]._visualValues[i]=e.getValueForPixel(y)-e.getValueForPixel(m))}if(m===e.getPixelForValue(o)){const v=Le(x)*e.getLineWidthForValue(o)/2;m+=v,x-=v}return{size:x,base:m,head:y,center:y+x/2}}_calculateBarIndexPixels(t,e){const r=e.scale,i=this.options,a=i.skipNull,s=rt(i.maxBarThickness,1/0);let o,l;if(e.grouped){const c=a?this._getStackCount(t):e.stackCount,u=i.barThickness==="flex"?Mm(t,e,i,c):Cm(t,e,i,c),d=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0);o=u.start+u.chunk*d+u.chunk/2,l=Math.min(s,u.chunk*u.ratio)}else o=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(s,e.min*e.ratio);return{base:o-l/2,head:o+l/2,center:o,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,r=t.data,i=r.length;let a=0;for(;a<i;++a)this.getParsed(a)[e.axis]!==null&&!r[a].hidden&&r[a].draw(this._ctx)}}H(Lr,"id","bar"),H(Lr,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),H(Lr,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class ki extends Oe{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,r,i){const a=super.parsePrimitiveData(t,e,r,i);for(let s=0;s<a.length;s++)a[s]._custom=this.resolveDataElementOptions(s+r).radius;return a}parseArrayData(t,e,r,i){const a=super.parseArrayData(t,e,r,i);for(let s=0;s<a.length;s++){const o=e[r+s];a[s]._custom=rt(o[2],this.resolveDataElementOptions(s+r).radius)}return a}parseObjectData(t,e,r,i){const a=super.parseObjectData(t,e,r,i);for(let s=0;s<a.length;s++){const o=e[r+s];a[s]._custom=rt(o&&o.r&&+o.r,this.resolveDataElementOptions(s+r).radius)}return a}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let r=t.length-1;r>=0;--r)e=Math.max(e,t[r].size(this.resolveDataElementOptions(r))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:a}=e,s=this.getParsed(t),o=i.getLabelForValue(s.x),l=a.getLabelForValue(s.y),c=s._custom;return{label:r[t]||"",value:"("+o+", "+l+(c?", "+c:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,r,i){const a=i==="reset",{iScale:s,vScale:o}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(e,i),u=s.axis,d=o.axis;for(let f=e;f<e+r;f++){const p=t[f],y=!a&&this.getParsed(f),x={},g=x[u]=a?s.getPixelForDecimal(.5):s.getPixelForValue(y[u]),m=x[d]=a?o.getBasePixel():o.getPixelForValue(y[d]);x.skip=isNaN(g)||isNaN(m),c&&(x.options=l||this.resolveDataElementOptions(f,p.active?"active":i),a&&(x.options.radius=0)),this.updateElement(p,f,x,i)}}resolveDataElementOptions(t,e){const r=this.getParsed(t);let i=super.resolveDataElementOptions(t,e);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const a=i.radius;return e!=="active"&&(i.radius=0),i.radius+=rt(r&&r._custom,a),i}}H(ki,"id","bubble"),H(ki,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),H(ki,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function Am(n,t,e){let r=1,i=1,a=0,s=0;if(t<kt){const o=n,l=o+t,c=Math.cos(o),u=Math.sin(o),d=Math.cos(l),f=Math.sin(l),p=(b,w,T)=>Mr(b,o,l,!0)?1:Math.max(w,w*e,T,T*e),y=(b,w,T)=>Mr(b,o,l,!0)?-1:Math.min(w,w*e,T,T*e),x=p(0,c,d),g=p(Et,u,f),m=y(dt,c,d),v=y(dt+Et,u,f);r=(x-m)/2,i=(g-v)/2,a=-(x+m)/2,s=-(g+v)/2}return{ratioX:r,ratioY:i,offsetX:a,offsetY:s}}class pn 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 r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let a=l=>+r[l];if(lt(r[t])){const{key:l="value"}=this._parsing;a=c=>+ln(r[c],l)}let s,o;for(s=t,o=t+e;s<o;++s)i._parsed[s]=a(s)}}_getRotation(){return Xt(this.options.rotation-90)}_getCircumference(){return Xt(this.options.circumference)}_getRotationExtents(){let t=kt,e=-kt;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const i=this.chart.getDatasetMeta(r).controller,a=i._getRotation(),s=i._getCircumference();t=Math.min(t,a),e=Math.max(e,a+s)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:r}=e,i=this._cachedMeta,a=i.data,s=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,o=Math.max((Math.min(r.width,r.height)-s)/2,0),l=Math.min(Xp(this.options.cutout,o),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:y,offsetY:x}=Am(d,u,l),g=(r.width-s)/f,m=(r.height-s)/p,v=Math.max(Math.min(g,m)/2,0),b=fc(this.options.radius,v),w=Math.max(b*l,0),T=(b-w)/this._getVisibleDatasetWeightTotal();this.offsetX=y*b,this.offsetY=x*b,i.total=this.calculateTotal(),this.outerRadius=b-T*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-T*c,0),this.updateElements(a,0,a.length,t)}_circumference(t,e){const r=this.options,i=this._cachedMeta,a=this._getCircumference();return e&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*a/kt)}updateElements(t,e,r,i){const a=i==="reset",s=this.chart,o=s.chartArea,c=s.options.animation,u=(o.left+o.right)/2,d=(o.top+o.bottom)/2,f=a&&c.animateScale,p=f?0:this.innerRadius,y=f?0:this.outerRadius,{sharedOptions:x,includeOptions:g}=this._getSharedOptions(e,i);let m=this._getRotation(),v;for(v=0;v<e;++v)m+=this._circumference(v,a);for(v=e;v<e+r;++v){const b=this._circumference(v,a),w=t[v],T={x:u+this.offsetX,y:d+this.offsetY,startAngle:m,endAngle:m+b,circumference:b,outerRadius:y,innerRadius:p};g&&(T.options=x||this.resolveDataElementOptions(v,w.active?"active":i)),m+=b,this.updateElement(w,v,T,i)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let r=0,i;for(i=0;i<e.length;i++){const a=t._parsed[i];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(i)&&!e[i].hidden&&(r+=Math.abs(a))}return r}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?kt*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,r=this.chart,i=r.data.labels||[],a=kr(e._parsed[t],r.options.locale);return{label:i[t]||"",value:a}}getMaxBorderWidth(t){let e=0;const r=this.chart;let i,a,s,o,l;if(!t){for(i=0,a=r.data.datasets.length;i<a;++i)if(r.isDatasetVisible(i)){s=r.getDatasetMeta(i),t=s.data,o=s.controller;break}}if(!t)return 0;for(i=0,a=t.length;i<a;++i)l=o.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let r=0,i=t.length;r<i;++r){const a=this.resolveDataElementOptions(r);e=Math.max(e,a.offset||0,a.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(e+=this._getRingWeight(r));return e}_getRingWeight(t){return Math.max(rt(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}H(pn,"id","doughnut"),H(pn,"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"}),H(pn,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),H(pn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return e.labels.map((a,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,r){r.chart.toggleDataVisibility(e.index),r.chart.update()}}}});class Ir extends Oe{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:r,data:i=[],_dataset:a}=e,s=this.chart._animationsDisabled;let{start:o,count:l}=Cc(e,i,s);this._drawStart=o,this._drawCount=l,Mc(e)&&(o=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!a._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:c},t),this.updateElements(i,o,l,t)}updateElements(t,e,r,i){const a=i==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(e,i),f=s.axis,p=o.axis,{spanGaps:y,segment:x}=this.options,g=un(y)?y:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||a||i==="none",v=e+r,b=t.length;let w=e>0&&this.getParsed(e-1);for(let T=0;T<b;++T){const M=t[T],k=m?M:{};if(T<e||T>=v){k.skip=!0;continue}const S=this.getParsed(T),C=st(S[p]),O=k[f]=s.getPixelForValue(S[f],T),P=k[p]=a||C?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,S,l):S[p],T);k.skip=isNaN(O)||isNaN(P)||C,k.stop=T>0&&Math.abs(S[f]-w[f])>g,x&&(k.parsed=S,k.raw=c.data[T]),d&&(k.options=u||this.resolveDataElementOptions(T,M.active?"active":i)),m||this.updateElement(M,T,k,i),w=S}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,r=e.options&&e.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const a=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,a,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}H(Ir,"id","line"),H(Ir,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),H(Ir,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Nr extends Oe{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,r=this.chart,i=r.data.labels||[],a=kr(e._parsed[t].r,r.options.locale);return{label:i[t]||"",value:a}}parseObjectData(t,e,r,i){return zc.bind(this)(t,e,r,i)}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((r,i)=>{const a=this.getParsed(i).r;!isNaN(a)&&this.chart.getDataVisibility(i)&&(a<e.min&&(e.min=a),a>e.max&&(e.max=a))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,r=t.options,i=Math.min(e.right-e.left,e.bottom-e.top),a=Math.max(i/2,0),s=Math.max(r.cutoutPercentage?a/100*r.cutoutPercentage:1,0),o=(a-s)/t.getVisibleDatasetCount();this.outerRadius=a-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,r,i){const a=i==="reset",s=this.chart,l=s.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,f=c.getIndexAngle(0)-.5*dt;let p=f,y;const x=360/this.countVisibleElements();for(y=0;y<e;++y)p+=this._computeAngle(y,i,x);for(y=e;y<e+r;y++){const g=t[y];let m=p,v=p+this._computeAngle(y,i,x),b=s.getDataVisibility(y)?c.getDistanceFromCenterForValue(this.getParsed(y).r):0;p=v,a&&(l.animateScale&&(b=0),l.animateRotate&&(m=v=f));const w={x:u,y:d,innerRadius:0,outerRadius:b,startAngle:m,endAngle:v,options:this.resolveDataElementOptions(y,g.active?"active":i)};this.updateElement(g,y,w,i)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((r,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++}),e}_computeAngle(t,e,r){return this.chart.getDataVisibility(t)?Xt(this.resolveDataElementOptions(t,e).angle||r):0}}H(Nr,"id","polarArea"),H(Nr,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),H(Nr,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return e.labels.map((a,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,r){r.chart.toggleDataVisibility(e.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class rs extends pn{}H(rs,"id","pie"),H(rs,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Oi extends Oe{getLabelAndValue(t){const e=this._cachedMeta.vScale,r=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(r[e.axis])}}parseObjectData(t,e,r,i){return zc.bind(this)(t,e,r,i)}update(t){const e=this._cachedMeta,r=e.dataset,i=e.data||[],a=e.iScale.getLabels();if(r.points=i,t!=="resize"){const s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);const o={_loop:!0,_fullLoop:a.length===i.length,options:s};this.updateElement(r,void 0,o,t)}this.updateElements(i,0,i.length,t)}updateElements(t,e,r,i){const a=this._cachedMeta.rScale,s=i==="reset";for(let o=e;o<e+r;o++){const l=t[o],c=this.resolveDataElementOptions(o,l.active?"active":i),u=a.getPointPositionForValue(o,this.getParsed(o).r),d=s?a.xCenter:u.x,f=s?a.yCenter:u.y,p={x:d,y:f,angle:u.angle,skip:isNaN(d)||isNaN(f),options:c};this.updateElement(l,o,p,i)}}}H(Oi,"id","radar"),H(Oi,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),H(Oi,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Pi extends Oe{getLabelAndValue(t){const e=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:a}=e,s=this.getParsed(t),o=i.getLabelForValue(s.x),l=a.getLabelForValue(s.y);return{label:r[t]||"",value:"("+o+", "+l+")"}}update(t){const e=this._cachedMeta,{data:r=[]}=e,i=this.chart._animationsDisabled;let{start:a,count:s}=Cc(e,r,i);if(this._drawStart=a,this._drawCount=s,Mc(e)&&(a=0,s=r.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:o,_dataset:l}=e;o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!l._decimated,o.points=r;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(o,void 0,{animated:!i,options:c},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(r,a,s,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,r,i){const a=i==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(e,i),d=this.getSharedOptions(u),f=this.includeOptions(i,d),p=s.axis,y=o.axis,{spanGaps:x,segment:g}=this.options,m=un(x)?x:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||a||i==="none";let b=e>0&&this.getParsed(e-1);for(let w=e;w<e+r;++w){const T=t[w],M=this.getParsed(w),k=v?T:{},S=st(M[y]),C=k[p]=s.getPixelForValue(M[p],w),O=k[y]=a||S?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,M,l):M[y],w);k.skip=isNaN(C)||isNaN(O)||S,k.stop=w>0&&Math.abs(M[p]-b[p])>m,g&&(k.parsed=M,k.raw=c.data[w]),f&&(k.options=d||this.resolveDataElementOptions(w,T.active?"active":i)),v||this.updateElement(T,w,k,i),b=M}this.updateSharedOptions(d,i,u)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let o=0;for(let l=e.length-1;l>=0;--l)o=Math.max(o,e[l].size(this.resolveDataElementOptions(l))/2);return o>0&&o}const r=t.dataset,i=r.options&&r.options.borderWidth||0;if(!e.length)return i;const a=e[0].size(this.resolveDataElementOptions(0)),s=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(i,a,s)/2}}H(Pi,"id","scatter"),H(Pi,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),H(Pi,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Lm=Object.freeze({__proto__:null,BarController:Lr,BubbleController:ki,DoughnutController:pn,LineController:Ir,PieController:rs,PolarAreaController:Nr,RadarController:Oi,ScatterController:Pi});function Ln(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class is{constructor(t){H(this,"options");this.options=t||{}}static override(t){Object.assign(is.prototype,t)}init(){}formats(){return Ln()}parse(){return Ln()}format(){return Ln()}add(){return Ln()}diff(){return Ln()}startOf(){return Ln()}endOf(){return Ln()}}var du={_date:is};function Im(n,t,e,r){const{controller:i,data:a,_sorted:s}=n,o=i._cachedMeta.iScale;if(o&&t===o.axis&&t!=="r"&&s&&a.length){const l=o._reversePixels?ag:Ve;if(r){if(i._sharedOptions){const c=a[0],u=typeof c.getRange=="function"&&c.getRange(t);if(u){const d=l(a,t,e-u),f=l(a,t,e+u);return{lo:d.lo,hi:f.hi}}}}else return l(a,t,e)}return{lo:0,hi:a.length-1}}function Fr(n,t,e,r,i){const a=n.getSortedVisibleDatasetMetas(),s=e[t];for(let o=0,l=a.length;o<l;++o){const{index:c,data:u}=a[o],{lo:d,hi:f}=Im(a[o],t,s,i);for(let p=d;p<=f;++p){const y=u[p];y.skip||r(y,c,p)}}}function Nm(n){const t=n.indexOf("x")!==-1,e=n.indexOf("y")!==-1;return function(r,i){const a=t?Math.abs(r.x-i.x):0,s=e?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(s,2))}}function as(n,t,e,r,i){const a=[];return!i&&!n.isPointInArea(t)||Fr(n,e,t,function(o,l,c){!i&&!qe(o,n.chartArea,0)||o.inRange(t.x,t.y,r)&&a.push({element:o,datasetIndex:l,index:c})},!0),a}function Fm(n,t,e,r){let i=[];function a(s,o,l){const{startAngle:c,endAngle:u}=s.getProps(["startAngle","endAngle"],r),{angle:d}=bc(s,{x:t.x,y:t.y});Mr(d,c,u)&&i.push({element:s,datasetIndex:o,index:l})}return Fr(n,e,t,a),i}function Um(n,t,e,r,i,a){let s=[];const o=Nm(e);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const p=u.inRange(t.x,t.y,i);if(r&&!p)return;const y=u.getCenterPoint(i);if(!(!!a||n.isPointInArea(y))&&!p)return;const g=o(t,y);g<l?(s=[{element:u,datasetIndex:d,index:f}],l=g):g===l&&s.push({element:u,datasetIndex:d,index:f})}return Fr(n,e,t,c),s}function ss(n,t,e,r,i,a){return!a&&!n.isPointInArea(t)?[]:e==="r"&&!r?Fm(n,t,e,i):Um(n,t,e,r,i,a)}function fu(n,t,e,r,i){const a=[],s=e==="x"?"inXRange":"inYRange";let o=!1;return Fr(n,e,t,(l,c,u)=>{l[s](t[e],i)&&(a.push({element:l,datasetIndex:c,index:u}),o=o||l.inRange(t.x,t.y,i))}),r&&!o?[]:a}var os={evaluateInteractionItems:Fr,modes:{index(n,t,e,r){const i=hn(t,n),a=e.axis||"x",s=e.includeInvisible||!1,o=e.intersect?as(n,i,a,r,s):ss(n,i,a,!1,r,s),l=[];return o.length?(n.getSortedVisibleDatasetMetas().forEach(c=>{const u=o[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(n,t,e,r){const i=hn(t,n),a=e.axis||"xy",s=e.includeInvisible||!1;let o=e.intersect?as(n,i,a,r,s):ss(n,i,a,!1,r,s);if(o.length>0){const l=o[0].datasetIndex,c=n.getDatasetMeta(l).data;o=[];for(let u=0;u<c.length;++u)o.push({element:c[u],datasetIndex:l,index:u})}return o},point(n,t,e,r){const i=hn(t,n),a=e.axis||"xy",s=e.includeInvisible||!1;return as(n,i,a,r,s)},nearest(n,t,e,r){const i=hn(t,n),a=e.axis||"xy",s=e.includeInvisible||!1;return ss(n,i,a,e.intersect,r,s)},x(n,t,e,r){const i=hn(t,n);return fu(n,i,"x",e.intersect,r)},y(n,t,e,r){const i=hn(t,n);return fu(n,i,"y",e.intersect,r)}}};const hu=["left","top","right","bottom"];function Ur(n,t){return n.filter(e=>e.pos===t)}function pu(n,t){return n.filter(e=>hu.indexOf(e.pos)===-1&&e.box.axis===t)}function Br(n,t){return n.sort((e,r)=>{const i=t?r:e,a=t?e:r;return i.weight===a.weight?i.index-a.index:i.weight-a.weight})}function Bm(n){const t=[];let e,r,i,a,s,o;for(e=0,r=(n||[]).length;e<r;++e)i=n[e],{position:a,options:{stack:s,stackWeight:o=1}}=i,t.push({index:e,box:i,pos:a,horizontal:i.isHorizontal(),weight:i.weight,stack:s&&a+s,stackWeight:o});return t}function Wm(n){const t={};for(const e of n){const{stack:r,pos:i,stackWeight:a}=e;if(!r||!hu.includes(i))continue;const s=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=a}return t}function zm(n,t){const e=Wm(n),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let a,s,o;for(a=0,s=n.length;a<s;++a){o=n[a];const{fullSize:l}=o.box,c=e[o.stack],u=c&&o.stackWeight/c.weight;o.horizontal?(o.width=u?u*r:l&&t.availableWidth,o.height=i):(o.width=r,o.height=u?u*i:l&&t.availableHeight)}return e}function Ym(n){const t=Bm(n),e=Br(t.filter(c=>c.box.fullSize),!0),r=Br(Ur(t,"left"),!0),i=Br(Ur(t,"right")),a=Br(Ur(t,"top"),!0),s=Br(Ur(t,"bottom")),o=pu(t,"x"),l=pu(t,"y");return{fullSize:e,leftAndTop:r.concat(a),rightAndBottom:i.concat(l).concat(s).concat(o),chartArea:Ur(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:a.concat(s).concat(o)}}function gu(n,t,e,r){return Math.max(n[e],t[e])+Math.max(n[r],t[r])}function mu(n,t){n.top=Math.max(n.top,t.top),n.left=Math.max(n.left,t.left),n.bottom=Math.max(n.bottom,t.bottom),n.right=Math.max(n.right,t.right)}function Hm(n,t,e,r){const{pos:i,box:a}=e,s=n.maxPadding;if(!lt(i)){e.size&&(n[i]-=e.size);const d=r[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?a.height:a.width),e.size=d.size/d.count,n[i]+=e.size}a.getPadding&&mu(s,a.getPadding());const o=Math.max(0,t.outerWidth-gu(s,n,"left","right")),l=Math.max(0,t.outerHeight-gu(s,n,"top","bottom")),c=o!==n.w,u=l!==n.h;return n.w=o,n.h=l,e.horizontal?{same:c,other:u}:{same:u,other:c}}function $m(n){const t=n.maxPadding;function e(r){const i=Math.max(t[r]-n[r],0);return n[r]+=i,i}n.y+=e("top"),n.x+=e("left"),e("right"),e("bottom")}function jm(n,t){const e=t.maxPadding;function r(i){const a={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{a[s]=Math.max(t[s],e[s])}),a}return r(n?["left","right"]:["top","bottom"])}function Wr(n,t,e,r){const i=[];let a,s,o,l,c,u;for(a=0,s=n.length,c=0;a<s;++a){o=n[a],l=o.box,l.update(o.width||t.w,o.height||t.h,jm(o.horizontal,t));const{same:d,other:f}=Hm(t,e,o,r);c|=d&&i.length,u=u||f,l.fullSize||i.push(o)}return c&&Wr(i,t,e,r)||u}function Ei(n,t,e,r,i){n.top=e,n.left=t,n.right=t+r,n.bottom=e+i,n.width=r,n.height=i}function yu(n,t,e,r){const i=e.padding;let{x:a,y:s}=t;for(const o of n){const l=o.box,c=r[o.stack]||{count:1,placed:0,weight:1},u=o.stackWeight/c.weight||1;if(o.horizontal){const d=t.w*u,f=c.size||l.height;de(c.start)&&(s=c.start),l.fullSize?Ei(l,i.left,s,e.outerWidth-i.right-i.left,f):Ei(l,t.left+c.placed,s,d,f),c.start=s,c.placed+=d,s=l.bottom}else{const d=t.h*u,f=c.size||l.width;de(c.start)&&(a=c.start),l.fullSize?Ei(l,a,i.top,f,e.outerHeight-i.bottom-i.top):Ei(l,a,t.top+c.placed,f,d),c.start=a,c.placed+=d,a=l.right}}t.x=a,t.y=s}var ie={addBox(n,t){n.boxes||(n.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)}}]},n.boxes.push(t)},removeBox(n,t){const e=n.boxes?n.boxes.indexOf(t):-1;e!==-1&&n.boxes.splice(e,1)},configure(n,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(n,t,e,r){if(!n)return;const i=Gt(n.options.layout.padding),a=Math.max(t-i.width,0),s=Math.max(e-i.height,0),o=Ym(n.boxes),l=o.vertical,c=o.horizontal;St(n.boxes,x=>{typeof x.beforeLayout=="function"&&x.beforeLayout()});const u=l.reduce((x,g)=>g.box.options&&g.box.options.display===!1?x:x+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:i,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/u,hBoxMaxHeight:s/2}),f=Object.assign({},i);mu(f,Gt(r));const p=Object.assign({maxPadding:f,w:a,h:s,x:i.left,y:i.top},i),y=zm(l.concat(c),d);Wr(o.fullSize,p,d,y),Wr(l,p,d,y),Wr(c,p,d,y)&&Wr(l,p,d,y),$m(p),yu(o.leftAndTop,p,d,y),p.x+=p.w,p.y+=p.h,yu(o.rightAndBottom,p,d,y),n.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},St(o.chartArea,x=>{const g=x.box;Object.assign(g,n.chartArea),g.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class vu{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,r){}removeEventListener(t,e,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,r,i){return e=Math.max(0,e||t.width),r=r||t.height,{width:e,height:Math.max(0,i?Math.floor(e/i):r)}}isAttached(t){return!0}updateConfig(t){}}class Vm extends vu{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Ri="$chartjs",qm={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},bu=n=>n===null||n==="";function Xm(n,t){const e=n.style,r=n.getAttribute("height"),i=n.getAttribute("width");if(n[Ri]={initial:{height:r,width:i,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",bu(i)){const a=$c(n,"width");a!==void 0&&(n.width=a)}if(bu(r))if(n.style.height==="")n.height=n.width/(t||2);else{const a=$c(n,"height");a!==void 0&&(n.height=a)}return n}const xu=Zg?{passive:!0}:!1;function Gm(n,t,e){n&&n.addEventListener(t,e,xu)}function Km(n,t,e){n&&n.canvas&&n.canvas.removeEventListener(t,e,xu)}function Qm(n,t){const e=qm[n.type]||n.type,{x:r,y:i}=hn(n,t);return{type:e,chart:t,native:n,x:r!==void 0?r:null,y:i!==void 0?i:null}}function Ai(n,t){for(const e of n)if(e===t||e.contains(t))return!0}function Zm(n,t,e){const r=n.canvas,i=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||Ai(o.addedNodes,r),s=s&&!Ai(o.removedNodes,r);s&&e()});return i.observe(document,{childList:!0,subtree:!0}),i}function Jm(n,t,e){const r=n.canvas,i=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||Ai(o.removedNodes,r),s=s&&!Ai(o.addedNodes,r);s&&e()});return i.observe(document,{childList:!0,subtree:!0}),i}const zr=new Map;let _u=0;function wu(){const n=window.devicePixelRatio;n!==_u&&(_u=n,zr.forEach((t,e)=>{e.currentDevicePixelRatio!==n&&t()}))}function t0(n,t){zr.size||window.addEventListener("resize",wu),zr.set(n,t)}function e0(n){zr.delete(n),zr.size||window.removeEventListener("resize",wu)}function n0(n,t,e){const r=n.canvas,i=r&&Za(r);if(!i)return;const a=Sc((o,l)=>{const c=i.clientWidth;e(o,l),c<i.clientWidth&&e()},window),s=new ResizeObserver(o=>{const l=o[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||a(c,u)});return s.observe(i),t0(n,a),s}function ls(n,t,e){e&&e.disconnect(),t==="resize"&&e0(n)}function r0(n,t,e){const r=n.canvas,i=Sc(a=>{n.ctx!==null&&e(Qm(a,n))},n);return Gm(r,t,i),i}class i0 extends vu{acquireContext(t,e){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(Xm(t,e),r):null}releaseContext(t){const e=t.canvas;if(!e[Ri])return!1;const r=e[Ri].initial;["height","width"].forEach(a=>{const s=r[a];st(s)?e.removeAttribute(a):e.setAttribute(a,s)});const i=r.style||{};return Object.keys(i).forEach(a=>{e.style[a]=i[a]}),e.width=e.width,delete e[Ri],!0}addEventListener(t,e,r){this.removeEventListener(t,e);const i=t.$proxies||(t.$proxies={}),s={attach:Zm,detach:Jm,resize:n0}[e]||r0;i[e]=s(t,e,r)}removeEventListener(t,e){const r=t.$proxies||(t.$proxies={}),i=r[e];if(!i)return;({attach:ls,detach:ls,resize:ls}[e]||Km)(t,e,i),r[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,r,i){return Qg(t,e,r,i)}isAttached(t){const e=t&&Za(t);return!!(e&&e.isConnected)}}function a0(n){return!Qa()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?Vm:i0}class te{constructor(){H(this,"x");H(this,"y");H(this,"active",!1);H(this,"options");H(this,"$animations")}tooltipPosition(t){const{x:e,y:r}=this.getProps(["x","y"],t);return{x:e,y:r}}hasValue(){return un(this.x)&&un(this.y)}getProps(t,e){const r=this.$animations;if(!e||!r)return this;const i={};return t.forEach(a=>{i[a]=r[a]&&r[a].active()?r[a]._to:this[a]}),i}}H(te,"defaults",{}),H(te,"defaultRoutes");function s0(n,t){const e=n.options.ticks,r=o0(n),i=Math.min(e.maxTicksLimit||r,r),a=e.major.enabled?c0(t):[],s=a.length,o=a[0],l=a[s-1],c=[];if(s>i)return u0(t,c,a,s/i),c;const u=l0(a,t,i);if(s>0){let d,f;const p=s>1?Math.round((l-o)/(s-1)):null;for(Li(t,c,u,st(p)?0:o-p,o),d=0,f=s-1;d<f;d++)Li(t,c,u,a[d],a[d+1]);return Li(t,c,u,l,st(p)?t.length:l+p),c}return Li(t,c,u),c}function o0(n){const t=n.options.offset,e=n._tickSize(),r=n._length/e+(t?0:1),i=n._maxLength/e;return Math.floor(Math.min(r,i))}function l0(n,t,e){const r=d0(n),i=t.length/e;if(!r)return Math.max(i,1);const a=eg(r);for(let s=0,o=a.length-1;s<o;s++){const l=a[s];if(l>i)return l}return Math.max(i,1)}function c0(n){const t=[];let e,r;for(e=0,r=n.length;e<r;e++)n[e].major&&t.push(e);return t}function u0(n,t,e,r){let i=0,a=e[0],s;for(r=Math.ceil(r),s=0;s<n.length;s++)s===a&&(t.push(n[s]),i++,a=e[i*r])}function Li(n,t,e,r,i){const a=rt(r,0),s=Math.min(rt(i,n.length),n.length);let o=0,l,c,u;for(e=Math.ceil(e),i&&(l=i-r,e=l/Math.floor(l/e)),u=a;u<0;)o++,u=Math.round(a+o*e);for(c=Math.max(a,0);c<s;c++)c===u&&(t.push(n[c]),o++,u=Math.round(a+o*e))}function d0(n){const t=n.length;let e,r;if(t<2)return!1;for(r=n[0],e=1;e<t;++e)if(n[e]-n[e-1]!==r)return!1;return r}const f0=n=>n==="left"?"right":n==="right"?"left":n,Tu=(n,t,e)=>t==="top"||t==="left"?n[t]+e:n[t]-e,Su=(n,t)=>Math.min(t||n,n);function Cu(n,t){const e=[],r=n.length/t,i=n.length;let a=0;for(;a<i;a+=r)e.push(n[Math.floor(a)]);return e}function h0(n,t,e){const r=n.ticks.length,i=Math.min(t,r-1),a=n._startPixel,s=n._endPixel,o=1e-6;let l=n.getPixelForTick(i),c;if(!(e&&(r===1?c=Math.max(l-a,s-l):t===0?c=(n.getPixelForTick(1)-l)/2:c=(l-n.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<a-o||l>s+o)))return l}function p0(n,t){St(n,e=>{const r=e.gc,i=r.length/2;let a;if(i>t){for(a=0;a<i;++a)delete e.data[r[a]];r.splice(0,i)}})}function Yr(n){return n.drawTicks?n.tickLength:0}function Mu(n,t){if(!n.display)return 0;const e=Rt(n.font,t),r=Gt(n.padding);return(mt(n.text)?n.text.length:1)*e.lineHeight+r.height}function g0(n,t){return fn(n,{scale:t,type:"scale"})}function m0(n,t,e){return fn(n,{tick:e,index:t,type:"tick"})}function y0(n,t,e){let r=za(n);return(e&&t!=="right"||!e&&t==="right")&&(r=f0(r)),r}function v0(n,t,e,r){const{top:i,left:a,bottom:s,right:o,chart:l}=n,{chartArea:c,scales:u}=l;let d=0,f,p,y;const x=s-i,g=o-a;if(n.isHorizontal()){if(p=re(r,a,o),lt(e)){const m=Object.keys(e)[0],v=e[m];y=u[m].getPixelForValue(v)+x-t}else e==="center"?y=(c.bottom+c.top)/2+x-t:y=Tu(n,e,t);f=o-a}else{if(lt(e)){const m=Object.keys(e)[0],v=e[m];p=u[m].getPixelForValue(v)-g+t}else e==="center"?p=(c.left+c.right)/2-g+t:p=Tu(n,e,t);y=re(r,s,i),d=e==="left"?-Et:Et}return{titleX:p,titleY:y,maxWidth:f,rotation:d}}class In extends te{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:r,_suggestedMax:i}=this;return t=be(t,Number.POSITIVE_INFINITY),e=be(e,Number.NEGATIVE_INFINITY),r=be(r,Number.POSITIVE_INFINITY),i=be(i,Number.NEGATIVE_INFINITY),{min:be(t,r),max:be(e,i),minDefined:It(t),maxDefined:It(e)}}getMinMax(t){let{min:e,max:r,minDefined:i,maxDefined:a}=this.getUserBounds(),s;if(i&&a)return{min:e,max:r};const o=this.getMatchingVisibleMetas();for(let l=0,c=o.length;l<c;++l)s=o[l].controller.getMinMax(this,t),i||(e=Math.min(e,s.min)),a||(r=Math.max(r,s.max));return e=a&&e>r?r:e,r=i&&e>r?e:r,{min:be(e,be(r,e)),max:be(r,be(e,r))}}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(){Tt(this.options.beforeUpdate,[this])}update(t,e,r){const{beginAtZero:i,grace:a,ticks:s}=this.options,o=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Og(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=o<this.ticks.length;this._convertTicksToLabels(l?Cu(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=s0(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,r;this.isHorizontal()?(e=this.left,r=this.right):(e=this.top,r=this.bottom,t=!t),this._startPixel=e,this._endPixel=r,this._reversePixels=t,this._length=r-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Tt(this.options.afterUpdate,[this])}beforeSetDimensions(){Tt(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(){Tt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Tt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Tt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let r,i,a;for(r=0,i=t.length;r<i;r++)a=t[r],a.label=Tt(e.callback,[a.value,r,t],this)}afterTickToLabelConversion(){Tt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Tt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,r=Su(this.ticks.length,t.ticks.maxTicksLimit),i=e.minRotation||0,a=e.maxRotation;let s=i,o,l,c;if(!this._isVisible()||!e.display||i>=a||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,p=Qt(this.chart.width-d,0,this.maxWidth);o=t.offset?this.maxWidth/r:p/(r-1),d+6>o&&(o=p/(r-(t.offset?.5:1)),l=this.maxHeight-Yr(t.grid)-e.padding-Mu(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),s=xi(Math.min(Math.asin(Qt((u.highest.height+6)/o,-1,1)),Math.asin(Qt(l/c,-1,1))-Math.asin(Qt(f/c,-1,1)))),s=Math.max(i,Math.min(a,s))),this.labelRotation=s}afterCalculateLabelRotation(){Tt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Tt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:r,title:i,grid:a}}=this,s=this._isVisible(),o=this.isHorizontal();if(s){const l=Mu(i,e.options.font);if(o?(t.width=this.maxWidth,t.height=Yr(a)+l):(t.height=this.maxHeight,t.width=Yr(a)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),p=r.padding*2,y=Xt(this.labelRotation),x=Math.cos(y),g=Math.sin(y);if(o){const m=r.mirror?0:g*d.width+x*f.height;t.height=Math.min(this.maxHeight,t.height+m+p)}else{const m=r.mirror?0:x*d.width+g*f.height;t.width=Math.min(this.maxWidth,t.width+m+p)}this._calculatePadding(c,u,g,x)}}this._handleMargins(),o?(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,r,i){const{ticks:{align:a,padding:s},position:o}=this.options,l=this.labelRotation!==0,c=o!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,p=0;l?c?(f=i*t.width,p=r*e.height):(f=r*t.height,p=i*e.width):a==="start"?p=e.width:a==="end"?f=t.width:a!=="inner"&&(f=t.width/2,p=e.width/2),this.paddingLeft=Math.max((f-u+s)*this.width/(this.width-u),0),this.paddingRight=Math.max((p-d+s)*this.width/(this.width-d),0)}else{let u=e.height/2,d=t.height/2;a==="start"?(u=0,d=t.height):a==="end"&&(u=e.height,d=0),this.paddingTop=u+s,this.paddingBottom=d+s}}_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(){Tt(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,r;for(e=0,r=t.length;e<r;e++)st(t[e].label)&&(t.splice(e,1),r--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let r=this.ticks;e<r.length&&(r=Cu(r,e)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,r){const{ctx:i,_longestTextCache:a}=this,s=[],o=[],l=Math.floor(e/Su(e,r));let c=0,u=0,d,f,p,y,x,g,m,v,b,w,T;for(d=0;d<e;d+=l){if(y=t[d].label,x=this._resolveTickFontOptions(d),i.font=g=x.string,m=a[g]=a[g]||{data:{},gc:[]},v=x.lineHeight,b=w=0,!st(y)&&!mt(y))b=Ti(i,m.data,m.gc,b,y),w=v;else if(mt(y))for(f=0,p=y.length;f<p;++f)T=y[f],!st(T)&&!mt(T)&&(b=Ti(i,m.data,m.gc,b,T),w+=v);s.push(b),o.push(w),c=Math.max(b,c),u=Math.max(w,u)}p0(a,e);const M=s.indexOf(c),k=o.indexOf(u),S=C=>({width:s[C]||0,height:o[C]||0});return{first:S(0),last:S(e-1),widest:S(M),highest:S(k),widths:s,heights:o}}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 ig(this._alignToPixels?Pn(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 r=e[t];return r.$context||(r.$context=m0(this.getContext(),t,r))}return this.$context||(this.$context=g0(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=Xt(this.labelRotation),r=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),a=this._getLabelSizes(),s=t.autoSkipPadding||0,o=a?a.widest.width+s:0,l=a?a.highest.height+s:0;return this.isHorizontal()?l*r>o*i?o/r:l/i:l*i<o*r?l/r:o/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,r=this.chart,i=this.options,{grid:a,position:s,border:o}=i,l=a.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=Yr(a),p=[],y=o.setContext(this.getContext()),x=y.display?y.width:0,g=x/2,m=function(Y){return Pn(r,Y,x)};let v,b,w,T,M,k,S,C,O,P,E,F;if(s==="top")v=m(this.bottom),k=this.bottom-f,C=v-g,P=m(t.top)+g,F=t.bottom;else if(s==="bottom")v=m(this.top),P=t.top,F=m(t.bottom)-g,k=v+g,C=this.top+f;else if(s==="left")v=m(this.right),M=this.right-f,S=v-g,O=m(t.left)+g,E=t.right;else if(s==="right")v=m(this.left),O=t.left,E=m(t.right)-g,M=v+g,S=this.left+f;else if(e==="x"){if(s==="center")v=m((t.top+t.bottom)/2+.5);else if(lt(s)){const Y=Object.keys(s)[0],I=s[Y];v=m(this.chart.scales[Y].getPixelForValue(I))}P=t.top,F=t.bottom,k=v+g,C=k+f}else if(e==="y"){if(s==="center")v=m((t.left+t.right)/2);else if(lt(s)){const Y=Object.keys(s)[0],I=s[Y];v=m(this.chart.scales[Y].getPixelForValue(I))}M=v-g,S=M-f,O=t.left,E=t.right}const q=rt(i.ticks.maxTicksLimit,d),$=Math.max(1,Math.ceil(d/q));for(b=0;b<d;b+=$){const Y=this.getContext(b),I=a.setContext(Y),it=o.setContext(Y),B=I.lineWidth,yt=I.color,ut=it.dash||[],z=it.dashOffset,L=I.tickWidth,U=I.tickColor,j=I.tickBorderDash||[],Z=I.tickBorderDashOffset;w=h0(this,b,l),w!==void 0&&(T=Pn(r,w,B),c?M=S=O=E=T:k=C=P=F=T,p.push({tx1:M,ty1:k,tx2:S,ty2:C,x1:O,y1:P,x2:E,y2:F,width:B,color:yt,borderDash:ut,borderDashOffset:z,tickWidth:L,tickColor:U,tickBorderDash:j,tickBorderDashOffset:Z}))}return this._ticksLength=d,this._borderValue=v,p}_computeLabelItems(t){const e=this.axis,r=this.options,{position:i,ticks:a}=r,s=this.isHorizontal(),o=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=a,f=Yr(r.grid),p=f+u,y=d?-u:p,x=-Xt(this.labelRotation),g=[];let m,v,b,w,T,M,k,S,C,O,P,E,F="middle";if(i==="top")M=this.bottom-y,k=this._getXAxisLabelAlignment();else if(i==="bottom")M=this.top+y,k=this._getXAxisLabelAlignment();else if(i==="left"){const $=this._getYAxisLabelAlignment(f);k=$.textAlign,T=$.x}else if(i==="right"){const $=this._getYAxisLabelAlignment(f);k=$.textAlign,T=$.x}else if(e==="x"){if(i==="center")M=(t.top+t.bottom)/2+p;else if(lt(i)){const $=Object.keys(i)[0],Y=i[$];M=this.chart.scales[$].getPixelForValue(Y)+p}k=this._getXAxisLabelAlignment()}else if(e==="y"){if(i==="center")T=(t.left+t.right)/2-p;else if(lt(i)){const $=Object.keys(i)[0],Y=i[$];T=this.chart.scales[$].getPixelForValue(Y)}k=this._getYAxisLabelAlignment(f).textAlign}e==="y"&&(l==="start"?F="top":l==="end"&&(F="bottom"));const q=this._getLabelSizes();for(m=0,v=o.length;m<v;++m){b=o[m],w=b.label;const $=a.setContext(this.getContext(m));S=this.getPixelForTick(m)+a.labelOffset,C=this._resolveTickFontOptions(m),O=C.lineHeight,P=mt(w)?w.length:1;const Y=P/2,I=$.color,it=$.textStrokeColor,B=$.textStrokeWidth;let yt=k;s?(T=S,k==="inner"&&(m===v-1?yt=this.options.reverse?"left":"right":m===0?yt=this.options.reverse?"right":"left":yt="center"),i==="top"?c==="near"||x!==0?E=-P*O+O/2:c==="center"?E=-q.highest.height/2-Y*O+O:E=-q.highest.height+O/2:c==="near"||x!==0?E=O/2:c==="center"?E=q.highest.height/2-Y*O:E=q.highest.height-P*O,d&&(E*=-1),x!==0&&!$.showLabelBackdrop&&(T+=O/2*Math.sin(x))):(M=S,E=(1-P)*O/2);let ut;if($.showLabelBackdrop){const z=Gt($.backdropPadding),L=q.heights[m],U=q.widths[m];let j=E-z.top,Z=0-z.left;switch(F){case"middle":j-=L/2;break;case"bottom":j-=L;break}switch(k){case"center":Z-=U/2;break;case"right":Z-=U;break;case"inner":m===v-1?Z-=U:m>0&&(Z-=U/2);break}ut={left:Z,top:j,width:U+z.width,height:L+z.height,color:$.backdropColor}}g.push({label:w,font:C,textOffset:E,options:{rotation:x,color:I,strokeColor:it,strokeWidth:B,textAlign:yt,textBaseline:F,translation:[T,M],backdrop:ut}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Xt(this.labelRotation))return t==="top"?"left":"right";let i="center";return e.align==="start"?i="left":e.align==="end"?i="right":e.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:r,mirror:i,padding:a}}=this.options,s=this._getLabelSizes(),o=t+a,l=s.widest.width;let c,u;return e==="left"?i?(u=this.right+a,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-o,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u=this.left)):e==="right"?i?(u=this.left+a,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+o,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_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:r,top:i,width:a,height:s}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(r,i,a,s),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex(a=>a.value===t);return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const e=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,s;const o=(l,c,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(e.display)for(a=0,s=i.length;a<s;++a){const l=i[a];e.drawOnChartArea&&o({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&o({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:r,grid:i}}=this,a=r.setContext(this.getContext()),s=r.display?a.width:0;if(!s)return;const o=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,f;this.isHorizontal()?(c=Pn(t,this.left,s)-s/2,u=Pn(t,this.right,o)+o/2,d=f=l):(d=Pn(t,this.top,s)-s/2,f=Pn(t,this.bottom,o)+o/2,c=u=l),e.save(),e.lineWidth=a.width,e.strokeStyle=a.color,e.beginPath(),e.moveTo(c,d),e.lineTo(u,f),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&Pr(r,i);const a=this.getLabelItems(t);for(const s of a){const o=s.options,l=s.font,c=s.label,u=s.textOffset;En(r,c,0,u,l,o)}i&&Er(r)}drawTitle(){const{ctx:t,options:{position:e,title:r,reverse:i}}=this;if(!r.display)return;const a=Rt(r.font),s=Gt(r.padding),o=r.align;let l=a.lineHeight/2;e==="bottom"||e==="center"||lt(e)?(l+=s.bottom,mt(r.text)&&(l+=a.lineHeight*(r.text.length-1))):l+=s.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=v0(this,l,e,o);En(t,r.text,0,0,a,{color:r.color,maxWidth:d,rotation:f,textAlign:y0(o,e,i),textBaseline:"middle",translation:[c,u]})}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,r=rt(t.grid&&t.grid.z,-1),i=rt(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==In.prototype.draw?[{z:e,draw:a=>{this.draw(a)}}]:[{z:r,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:e,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let a,s;for(a=0,s=e.length;a<s;++a){const o=e[a];o[r]===this.id&&(!t||o.type===t)&&i.push(o)}return i}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return Rt(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Ii{constructor(t,e,r){this.type=t,this.scope=e,this.override=r,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 r;_0(e)&&(r=this.register(e));const i=this.items,a=t.id,s=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+t);return a in i||(i[a]=t,b0(t,s,r),this.override&&Ut.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const e=this.items,r=t.id,i=this.scope;r in e&&delete e[r],i&&r in Ut[i]&&(delete Ut[i][r],this.override&&delete On[r])}}function b0(n,t,e){const r=Tr(Object.create(null),[e?Ut.get(e):{},Ut.get(t),n.defaults]);Ut.set(t,r),n.defaultRoutes&&x0(t,n.defaultRoutes),n.descriptors&&Ut.describe(t,n.descriptors)}function x0(n,t){Object.keys(t).forEach(e=>{const r=e.split("."),i=r.pop(),a=[n].concat(r).join("."),s=t[e].split("."),o=s.pop(),l=s.join(".");Ut.route(a,i,l,o)})}function _0(n){return"id"in n&&"defaults"in n}class w0{constructor(){this.controllers=new Ii(Oe,"datasets",!0),this.elements=new Ii(te,"elements"),this.plugins=new Ii(Object,"plugins"),this.scales=new Ii(In,"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,r){[...e].forEach(i=>{const a=r||this._getRegistryForType(i);r||a.isForType(i)||a===this.plugins&&i.id?this._exec(t,a,i):St(i,s=>{const o=r||this._getRegistryForType(s);this._exec(t,o,s)})})}_exec(t,e,r){const i=Ua(t);Tt(r["before"+i],[],r),e[t](r),Tt(r["after"+i],[],r)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const r=this._typedRegistries[e];if(r.isForType(t))return r}return this.plugins}_get(t,e,r){const i=e.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var Ie=new w0;class T0{constructor(){this._init=[]}notify(t,e,r,i){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const a=i?this._descriptors(t).filter(i):this._descriptors(t),s=this._notify(a,t,e,r);return e==="afterDestroy"&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,e,r,i){i=i||{};for(const a of t){const s=a.plugin,o=s[r],l=[e,i,a.options];if(Tt(o,l,s)===!1&&i.cancelable)return!1}return!0}invalidate(){st(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 r=t&&t.config,i=rt(r.options&&r.options.plugins,{}),a=S0(r);return i===!1&&!e?[]:M0(t,a,i,e)}_notifyStateChanges(t){const e=this._oldCache||[],r=this._cache,i=(a,s)=>a.filter(o=>!s.some(l=>o.plugin.id===l.plugin.id));this._notify(i(e,r),t,"stop"),this._notify(i(r,e),t,"start")}}function S0(n){const t={},e=[],r=Object.keys(Ie.plugins.items);for(let a=0;a<r.length;a++)e.push(Ie.getPlugin(r[a]));const i=n.plugins||[];for(let a=0;a<i.length;a++){const s=i[a];e.indexOf(s)===-1&&(e.push(s),t[s.id]=!0)}return{plugins:e,localIds:t}}function C0(n,t){return!t&&n===!1?null:n===!0?{}:n}function M0(n,{plugins:t,localIds:e},r,i){const a=[],s=n.getContext();for(const o of t){const l=o.id,c=C0(r[l],i);c!==null&&a.push({plugin:o,options:D0(n.config,{plugin:o,local:e[l]},c,s)})}return a}function D0(n,{plugin:t,local:e},r,i){const a=n.pluginScopeKeys(t),s=n.getOptionScopes(r,a);return e&&t.defaults&&s.push(t.defaults),n.createResolver(s,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function cs(n,t){const e=Ut.datasets[n]||{};return((t.datasets||{})[n]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function k0(n,t){let e=n;return n==="_index_"?e=t:n==="_value_"&&(e=t==="x"?"y":"x"),e}function O0(n,t){return n===t?"_index_":"_value_"}function Du(n){if(n==="x"||n==="y"||n==="r")return n}function P0(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function us(n,...t){if(Du(n))return n;for(const e of t){const r=e.axis||P0(e.position)||n.length>1&&Du(n[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${n}' axis. Please provide 'axis' or 'position' option.`)}function ku(n,t,e){if(e[t+"AxisID"]===n)return{axis:t}}function E0(n,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(r=>r.xAxisID===n||r.yAxisID===n);if(e.length)return ku(n,"x",e[0])||ku(n,"y",e[0])}return{}}function R0(n,t){const e=On[n.type]||{scales:{}},r=t.scales||{},i=cs(n.type,t),a=Object.create(null);return Object.keys(r).forEach(s=>{const o=r[s];if(!lt(o))return console.error(`Invalid scale configuration for scale: ${s}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const l=us(s,o,E0(s,n),Ut.scales[o.type]),c=O0(l,i),u=e.scales||{};a[s]=Sr(Object.create(null),[{axis:l},o,u[l],u[c]])}),n.data.datasets.forEach(s=>{const o=s.type||n.type,l=s.indexAxis||cs(o,t),u=(On[o]||{}).scales||{};Object.keys(u).forEach(d=>{const f=k0(d,l),p=s[f+"AxisID"]||f;a[p]=a[p]||Object.create(null),Sr(a[p],[{axis:f},r[p],u[d]])})}),Object.keys(a).forEach(s=>{const o=a[s];Sr(o,[Ut.scales[o.type],Ut.scale])}),a}function Ou(n){const t=n.options||(n.options={});t.plugins=rt(t.plugins,{}),t.scales=R0(n,t)}function Pu(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function A0(n){return n=n||{},n.data=Pu(n.data),Ou(n),n}const Eu=new Map,Ru=new Set;function Ni(n,t){let e=Eu.get(n);return e||(e=t(),Eu.set(n,e),Ru.add(e)),e}const Hr=(n,t,e)=>{const r=ln(t,e);r!==void 0&&n.add(r)};class L0{constructor(t){this._config=A0(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=Pu(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(),Ou(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ni(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Ni(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Ni(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,r=this.type;return Ni(`${r}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const r=this._scopeCache;let i=r.get(t);return(!i||e)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,e,r){const{options:i,type:a}=this,s=this._cachedScopes(t,r),o=s.get(e);if(o)return o;const l=new Set;e.forEach(u=>{t&&(l.add(t),u.forEach(d=>Hr(l,t,d))),u.forEach(d=>Hr(l,i,d)),u.forEach(d=>Hr(l,On[a]||{},d)),u.forEach(d=>Hr(l,Ut,d)),u.forEach(d=>Hr(l,$a,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Ru.has(e)&&s.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,On[e]||{},Ut.datasets[e]||{},{type:e},Ut,$a]}resolveNamedOptions(t,e,r,i=[""]){const a={$shared:!0},{resolver:s,subPrefixes:o}=Au(this._resolverCache,t,i);let l=s;if(N0(s,e)){a.$shared=!1,r=fe(r)?r():r;const c=this.createResolver(t,r,o);l=er(s,r,c)}for(const c of e)a[c]=l[c];return a}createResolver(t,e,r=[""],i){const{resolver:a}=Au(this._resolverCache,t,r);return lt(e)?er(a,e,void 0,i):a}}function Au(n,t,e){let r=n.get(t);r||(r=new Map,n.set(t,r));const i=e.join();let a=r.get(i);return a||(a={resolver:Xa(t,e),subPrefixes:e.filter(o=>!o.toLowerCase().includes("hover"))},r.set(i,a)),a}const I0=n=>lt(n)&&Object.getOwnPropertyNames(n).some(t=>fe(n[t]));function N0(n,t){const{isScriptable:e,isIndexable:r}=Ic(n);for(const i of t){const a=e(i),s=r(i),o=(s||a)&&n[i];if(a&&(fe(o)||I0(o))||s&&mt(o))return!0}return!1}var F0="4.4.3";const U0=["top","bottom","left","right","chartArea"];function Lu(n,t){return n==="top"||n==="bottom"||U0.indexOf(n)===-1&&t==="x"}function Iu(n,t){return function(e,r){return e[n]===r[n]?e[t]-r[t]:e[n]-r[n]}}function Nu(n){const t=n.chart,e=t.options.animation;t.notifyPlugins("afterRender"),Tt(e&&e.onComplete,[n],t)}function B0(n){const t=n.chart,e=t.options.animation;Tt(e&&e.onProgress,[n],t)}function Fu(n){return Qa()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Fi={},Uu=n=>{const t=Fu(n);return Object.values(Fi).filter(e=>e.canvas===t).pop()};function W0(n,t,e){const r=Object.keys(n);for(const i of r){const a=+i;if(a>=t){const s=n[i];delete n[i],(e>0||a>t)&&(n[a+e]=s)}}}function z0(n,t,e,r){return!e||n.type==="mouseout"?null:r?t:n}function Ui(n,t,e){return n.options.clip?n[e]:t[e]}function Y0(n,t){const{xScale:e,yScale:r}=n;return e&&r?{left:Ui(e,t,"left"),right:Ui(e,t,"right"),top:Ui(r,t,"top"),bottom:Ui(r,t,"bottom")}:t}let Se=(Sn=class{static register(...t){Ie.add(...t),Bu()}static unregister(...t){Ie.remove(...t),Bu()}constructor(t,e){const r=this.config=new L0(e),i=Fu(t),a=Uu(i);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const s=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||a0(i)),this.platform.updateConfig(r);const o=this.platform.acquireContext(i,s.aspectRatio),l=o&&o.canvas,c=l&&l.height,u=l&&l.width;if(this.id=qp(),this.ctx=o,this.canvas=l,this.width=u,this.height=c,this._options=s,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 T0,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=lg(d=>this.update(d),s.resizeDelay||0),this._dataChanges=[],Fi[this.id]=this,!o||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Xe.listen(this,"complete",Nu),Xe.listen(this,"progress",B0),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:r,height:i,_aspectRatio:a}=this;return st(t)?e&&a?a:i?r/i: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 Ie}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Hc(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Rc(this.canvas,this.ctx),this}stop(){return Xe.stop(this),this}resize(t,e){Xe.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const r=this.options,i=this.canvas,a=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,t,e,a),o=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Hc(this,o,!0)&&(this.notifyPlugins("resize",{size:s}),Tt(r.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};St(e,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,e=t.scales,r=this.scales,i=Object.keys(r).reduce((s,o)=>(s[o]=!1,s),{});let a=[];e&&(a=a.concat(Object.keys(e).map(s=>{const o=e[s],l=us(s,o),c=l==="r",u=l==="x";return{options:o,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),St(a,s=>{const o=s.options,l=o.id,c=us(l,o),u=rt(o.type,s.dtype);(o.position===void 0||Lu(o.position,c)!==Lu(s.dposition))&&(o.position=s.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===u)d=r[l];else{const f=Ie.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(o,t)}),St(i,(s,o)=>{s||delete r[o]}),St(r,s=>{ie.configure(this,s,s.options),ie.addBox(this,s)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,r=t.length;if(t.sort((i,a)=>i.index-a.index),r>e){for(let i=e;i<r;++i)this._destroyDatasetMeta(i);t.splice(e,r-e)}this._sortedMetasets=t.slice(0).sort(Iu("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((r,i)=>{e.filter(a=>a===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=e.length;r<i;r++){const a=e[r];let s=this.getDatasetMeta(r);const o=a.type||this.config.type;if(s.type&&s.type!==o&&(this._destroyDatasetMeta(r),s=this.getDatasetMeta(r)),s.type=o,s.indexAxis=a.indexAxis||cs(o,this.options),s.order=a.order||0,s.index=r,s.label=""+a.label,s.visible=this.isDatasetVisible(r),s.controller)s.controller.updateIndex(r),s.controller.linkScales();else{const l=Ie.getController(o),{datasetElementType:c,dataElementType:u}=Ut.datasets[o];Object.assign(l,{dataElementType:Ie.getElement(u),datasetElementType:c&&Ie.getElement(c)}),s.controller=new l(this,r),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){St(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 r=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),f=!i&&a.indexOf(d)===-1;d.buildOrUpdateElements(f),s=Math.max(+d.getMaxOverflow(),s)}s=this._minPadding=r.layout.autoPadding?s:0,this._updateLayout(s),i||St(a,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Iu("z","_idx"));const{_active:o,_lastEvent:l}=this;l?this._eventHandler(l,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){St(this.scales,t=>{ie.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!gc(e,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:a}of e){const s=r==="_removeElements"?-a:a;W0(t,i,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,r=a=>new Set(t.filter(s=>s[0]===a).map((s,o)=>o+","+s.splice(1).join(","))),i=r(0);for(let a=1;a<e;a++)if(!gc(i,r(a)))return;return Array.from(i).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ie.update(this,this.width,this.height,t);const e=this.chartArea,r=e.width<=0||e.height<=0;this._layers=[],St(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,a)=>{i._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,r=this.data.datasets.length;e<r;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,r=this.data.datasets.length;e<r;++e)this._updateDataset(e,fe(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(e),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Xe.has(this)?this.attached&&!Xe.running(this)&&Xe.start(this):(this.draw(),Nu({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resize(r,i),this._resizeBeforeDraw=null}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,r=[];let i,a;for(i=0,a=e.length;i<a;++i){const s=e[i];(!t||s.visible)&&r.push(s)}return r}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,r=t._clip,i=!r.disabled,a=Y0(t,this.chartArea),s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&Pr(e,{left:r.left===!1?0:a.left-r.left,right:r.right===!1?this.width:a.right+r.right,top:r.top===!1?0:a.top-r.top,bottom:r.bottom===!1?this.height:a.bottom+r.bottom}),t.controller.draw(),i&&Er(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return qe(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,r,i){const a=os.modes[e];return typeof a=="function"?a(this,t,r,i):[]}getDatasetMeta(t){const e=this.data.datasets[t],r=this._metasets;let i=r.filter(a=>a&&a._dataset===e).pop();return i||(i={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},r.push(i)),i}getContext(){return this.$context||(this.$context=fn(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!e.hidden}setDatasetVisibility(t,e){const r=this.getDatasetMeta(t);r.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,r){const i=r?"show":"hide",a=this.getDatasetMeta(t),s=a.controller._resolveAnimations(void 0,i);de(e)?(a.data[e].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),s.update(a,{visible:r}),this.update(o=>o.datasetIndex===t?i: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(),Xe.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(),Rc(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Fi[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,r=(a,s)=>{e.addEventListener(this,a,s),t[a]=s},i=(a,s,o)=>{a.offsetX=s,a.offsetY=o,this._eventHandler(a)};St(this.options.events,a=>r(a,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,r=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},a=(l,c)=>{this.canvas&&this.resize(l,c)};let s;const o=()=>{i("attach",o),this.attached=!0,this.resize(),r("resize",a),r("detach",s)};s=()=>{this.attached=!1,i("resize",a),this._stop(),this._resize(0,0),r("attach",o)},e.isAttached(this.canvas)?o():s()}unbindEvents(){St(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},St(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,r){const i=r?"set":"remove";let a,s,o,l;for(e==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+i+"DatasetHoverStyle"]()),o=0,l=t.length;o<l;++o){s=t[o];const c=s&&this.getDatasetMeta(s.datasetIndex).controller;c&&c[i+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],r=t.map(({datasetIndex:a,index:s})=>{const o=this.getDatasetMeta(a);if(!o)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:o.data[s],index:s}});!mi(r,e)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,e))}notifyPlugins(t,e,r){return this._plugins.notify(this,t,e,r)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,r){const i=this.options.hover,a=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),s=a(e,t),o=r?t:a(t,e);s.length&&this.updateHoverStyle(s,i.mode,!1),o.length&&i.mode&&this.updateHoverStyle(o,i.mode,!0)}_eventHandler(t,e){const r={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},i=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const a=this._handleEvent(t,e,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(a||r.changed)&&this.render(),this}_handleEvent(t,e,r){const{_active:i=[],options:a}=this,s=e,o=this._getActiveElements(t,i,r,s),l=Jp(t),c=z0(t,this._lastEvent,r,l);r&&(this._lastEvent=null,Tt(a.onHover,[t,o,this],this),l&&Tt(a.onClick,[t,o,this],this));const u=!mi(o,i);return(u||e)&&(this._active=o,this._updateHoverStyles(o,i,e)),this._lastEvent=c,u}_getActiveElements(t,e,r,i){if(t.type==="mouseout")return[];if(!r)return e;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,i)}},H(Sn,"defaults",Ut),H(Sn,"instances",Fi),H(Sn,"overrides",On),H(Sn,"registry",Ie),H(Sn,"version",F0),H(Sn,"getChart",Uu),Sn);function Bu(){return St(Se.instances,n=>n._plugins.invalidate())}function H0(n,t,e){const{startAngle:r,pixelMargin:i,x:a,y:s,outerRadius:o,innerRadius:l}=t;let c=i/o;n.beginPath(),n.arc(a,s,o,r-c,e+c),l>i?(c=i/l,n.arc(a,s,l,e+c,r-c,!0)):n.arc(a,s,i,e+Et,r-Et),n.closePath(),n.clip()}function $0(n){return qa(n,["outerStart","outerEnd","innerStart","innerEnd"])}function j0(n,t,e,r){const i=$0(n.options.borderRadius),a=(e-t)/2,s=Math.min(a,r*t/2),o=l=>{const c=(e-Math.min(a,l))*r/2;return Qt(l,0,Math.min(a,c))};return{outerStart:o(i.outerStart),outerEnd:o(i.outerEnd),innerStart:Qt(i.innerStart,0,s),innerEnd:Qt(i.innerEnd,0,s)}}function ir(n,t,e,r){return{x:e+n*Math.cos(t),y:r+n*Math.sin(t)}}function Bi(n,t,e,r,i,a){const{x:s,y:o,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+r+e-c,0),f=u>0?u+r+e+c:0;let p=0;const y=i-l;if(r){const $=u>0?u-r:0,Y=d>0?d-r:0,I=($+Y)/2,it=I!==0?y*I/(I+r):y;p=(y-it)/2}const x=Math.max(.001,y*d-e/dt)/d,g=(y-x)/2,m=l+g+p,v=i-g-p,{outerStart:b,outerEnd:w,innerStart:T,innerEnd:M}=j0(t,f,d,v-m),k=d-b,S=d-w,C=m+b/k,O=v-w/S,P=f+T,E=f+M,F=m+T/P,q=v-M/E;if(n.beginPath(),a){const $=(C+O)/2;if(n.arc(s,o,d,C,$),n.arc(s,o,d,$,O),w>0){const B=ir(S,O,s,o);n.arc(B.x,B.y,w,O,v+Et)}const Y=ir(E,v,s,o);if(n.lineTo(Y.x,Y.y),M>0){const B=ir(E,q,s,o);n.arc(B.x,B.y,M,v+Et,q+Math.PI)}const I=(v-M/f+(m+T/f))/2;if(n.arc(s,o,f,v-M/f,I,!0),n.arc(s,o,f,I,m+T/f,!0),T>0){const B=ir(P,F,s,o);n.arc(B.x,B.y,T,F+Math.PI,m-Et)}const it=ir(k,m,s,o);if(n.lineTo(it.x,it.y),b>0){const B=ir(k,C,s,o);n.arc(B.x,B.y,b,m-Et,C)}}else{n.moveTo(s,o);const $=Math.cos(C)*d+s,Y=Math.sin(C)*d+o;n.lineTo($,Y);const I=Math.cos(O)*d+s,it=Math.sin(O)*d+o;n.lineTo(I,it)}n.closePath()}function V0(n,t,e,r,i){const{fullCircles:a,startAngle:s,circumference:o}=t;let l=t.endAngle;if(a){Bi(n,t,e,r,l,i);for(let c=0;c<a;++c)n.fill();isNaN(o)||(l=s+(o%kt||kt))}return Bi(n,t,e,r,l,i),n.fill(),l}function q0(n,t,e,r,i){const{fullCircles:a,startAngle:s,circumference:o,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:f}=l,p=l.borderAlign==="inner";if(!c)return;n.setLineDash(d||[]),n.lineDashOffset=f,p?(n.lineWidth=c*2,n.lineJoin=u||"round"):(n.lineWidth=c,n.lineJoin=u||"bevel");let y=t.endAngle;if(a){Bi(n,t,e,r,y,i);for(let x=0;x<a;++x)n.stroke();isNaN(o)||(y=s+(o%kt||kt))}p&&H0(n,t,y),a||(Bi(n,t,e,r,y,i),n.stroke())}class $r extends te{constructor(e){super();H(this,"circumference");H(this,"endAngle");H(this,"fullCircles");H(this,"innerRadius");H(this,"outerRadius");H(this,"pixelMargin");H(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,r,i){const a=this.getProps(["x","y"],i),{angle:s,distance:o}=bc(a,{x:e,y:r}),{startAngle:l,endAngle:c,innerRadius:u,outerRadius:d,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),p=(this.options.spacing+this.options.borderWidth)/2,x=rt(f,c-l)>=kt||Mr(s,l,c),g=je(o,u+p,d+p);return x&&g}getCenterPoint(e){const{x:r,y:i,startAngle:a,endAngle:s,innerRadius:o,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:c,spacing:u}=this.options,d=(a+s)/2,f=(o+l+u+c)/2;return{x:r+Math.cos(d)*f,y:i+Math.sin(d)*f}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:r,circumference:i}=this,a=(r.offset||0)/4,s=(r.spacing||0)/2,o=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=i>kt?Math.floor(i/kt):0,i===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*a,Math.sin(l)*a);const c=1-Math.sin(Math.min(dt,i||0)),u=a*c;e.fillStyle=r.backgroundColor,e.strokeStyle=r.borderColor,V0(e,this,u,s,o),q0(e,this,u,s,o),e.restore()}}H($r,"id","arc"),H($r,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),H($r,"defaultRoutes",{backgroundColor:"backgroundColor"}),H($r,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function Wu(n,t,e=t){n.lineCap=rt(e.borderCapStyle,t.borderCapStyle),n.setLineDash(rt(e.borderDash,t.borderDash)),n.lineDashOffset=rt(e.borderDashOffset,t.borderDashOffset),n.lineJoin=rt(e.borderJoinStyle,t.borderJoinStyle),n.lineWidth=rt(e.borderWidth,t.borderWidth),n.strokeStyle=rt(e.borderColor,t.borderColor)}function X0(n,t,e){n.lineTo(e.x,e.y)}function G0(n){return n.stepped?xg:n.tension||n.cubicInterpolationMode==="monotone"?_g:X0}function zu(n,t,e={}){const r=n.length,{start:i=0,end:a=r-1}=e,{start:s,end:o}=t,l=Math.max(i,s),c=Math.min(a,o),u=i<s&&a<s||i>o&&a>o;return{count:r,start:l,loop:t.loop,ilen:c<l&&!u?r+c-l:c-l}}function K0(n,t,e,r){const{points:i,options:a}=t,{count:s,start:o,loop:l,ilen:c}=zu(i,e,r),u=G0(a);let{move:d=!0,reverse:f}=r||{},p,y,x;for(p=0;p<=c;++p)y=i[(o+(f?c-p:p))%s],!y.skip&&(d?(n.moveTo(y.x,y.y),d=!1):u(n,x,y,f,a.stepped),x=y);return l&&(y=i[(o+(f?c:0))%s],u(n,x,y,f,a.stepped)),!!l}function Q0(n,t,e,r){const i=t.points,{count:a,start:s,ilen:o}=zu(i,e,r),{move:l=!0,reverse:c}=r||{};let u=0,d=0,f,p,y,x,g,m;const v=w=>(s+(c?o-w:w))%a,b=()=>{x!==g&&(n.lineTo(u,g),n.lineTo(u,x),n.lineTo(u,m))};for(l&&(p=i[v(0)],n.moveTo(p.x,p.y)),f=0;f<=o;++f){if(p=i[v(f)],p.skip)continue;const w=p.x,T=p.y,M=w|0;M===y?(T<x?x=T:T>g&&(g=T),u=(d*u+w)/++d):(b(),n.lineTo(w,T),y=M,d=0,x=g=T),m=T}b()}function ds(n){const t=n.options,e=t.borderDash&&t.borderDash.length;return!n._decimated&&!n._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?Q0:K0}function Z0(n){return n.stepped?Jg:n.tension||n.cubicInterpolationMode==="monotone"?tm:An}function J0(n,t,e,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,e,r)&&i.closePath()),Wu(n,t.options),n.stroke(i)}function ty(n,t,e,r){const{segments:i,options:a}=t,s=ds(t);for(const o of i)Wu(n,a,o.style),n.beginPath(),s(n,t,o,{start:e,end:e+r-1})&&n.closePath(),n.stroke()}const ey=typeof Path2D=="function";function ny(n,t,e,r){ey&&!t.options.segment?J0(n,t,e,r):ty(n,t,e,r)}class gn extends te{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 r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;jg(this._points,r,t,i,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=sm(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,r=t.length;return r&&e[t[r-1].end]}interpolate(t,e){const r=this.options,i=t[e],a=this.points,s=Kc(this,{property:e,start:i,end:i});if(!s.length)return;const o=[],l=Z0(r);let c,u;for(c=0,u=s.length;c<u;++c){const{start:d,end:f}=s[c],p=a[d],y=a[f];if(p===y){o.push(p);continue}const x=Math.abs((i-p[e])/(y[e]-p[e])),g=l(p,y,x,r.stepped);g[e]=t[e],o.push(g)}return o.length===1?o[0]:o}pathSegment(t,e,r){return ds(this)(t,this,e,r)}path(t,e,r){const i=this.segments,a=ds(this);let s=this._loop;e=e||0,r=r||this.points.length-e;for(const o of i)s&=a(t,this,o,{start:e,end:e+r-1});return!!s}draw(t,e,r,i){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),ny(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}H(gn,"id","line"),H(gn,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),H(gn,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),H(gn,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Yu(n,t,e,r){const i=n.options,{[e]:a}=n.getProps([e],r);return Math.abs(t-a)<i.radius+i.hitRadius}class Wi extends te{constructor(e){super();H(this,"parsed");H(this,"skip");H(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,r,i){const a=this.options,{x:s,y:o}=this.getProps(["x","y"],i);return Math.pow(e-s,2)+Math.pow(r-o,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(e,r){return Yu(this,e,"x",r)}inYRange(e,r){return Yu(this,e,"y",r)}getCenterPoint(e){const{x:r,y:i}=this.getProps(["x","y"],e);return{x:r,y:i}}size(e){e=e||this.options||{};let r=e.radius||0;r=Math.max(r,r&&e.hoverRadius||0);const i=r&&e.borderWidth||0;return(r+i)*2}draw(e,r){const i=this.options;this.skip||i.radius<.1||!qe(this,r,this.size(i)/2)||(e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth,e.fillStyle=i.backgroundColor,Va(e,i,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}H(Wi,"id","point"),H(Wi,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),H(Wi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Hu(n,t){const{x:e,y:r,base:i,width:a,height:s}=n.getProps(["x","y","base","width","height"],t);let o,l,c,u,d;return n.horizontal?(d=s/2,o=Math.min(e,i),l=Math.max(e,i),c=r-d,u=r+d):(d=a/2,o=e-d,l=e+d,c=Math.min(r,i),u=Math.max(r,i)),{left:o,top:c,right:l,bottom:u}}function mn(n,t,e,r){return n?0:Qt(t,e,r)}function ry(n,t,e){const r=n.options.borderWidth,i=n.borderSkipped,a=Lc(r);return{t:mn(i.top,a.top,0,e),r:mn(i.right,a.right,0,t),b:mn(i.bottom,a.bottom,0,e),l:mn(i.left,a.left,0,t)}}function iy(n,t,e){const{enableBorderRadius:r}=n.getProps(["enableBorderRadius"]),i=n.options.borderRadius,a=dn(i),s=Math.min(t,e),o=n.borderSkipped,l=r||lt(i);return{topLeft:mn(!l||o.top||o.left,a.topLeft,0,s),topRight:mn(!l||o.top||o.right,a.topRight,0,s),bottomLeft:mn(!l||o.bottom||o.left,a.bottomLeft,0,s),bottomRight:mn(!l||o.bottom||o.right,a.bottomRight,0,s)}}function ay(n){const t=Hu(n),e=t.right-t.left,r=t.bottom-t.top,i=ry(n,e/2,r/2),a=iy(n,e/2,r/2);return{outer:{x:t.left,y:t.top,w:e,h:r,radius:a},inner:{x:t.left+i.l,y:t.top+i.t,w:e-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,a.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(i.b,i.r))}}}}function fs(n,t,e,r){const i=t===null,a=e===null,o=n&&!(i&&a)&&Hu(n,r);return o&&(i||je(t,o.left,o.right))&&(a||je(e,o.top,o.bottom))}function sy(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function oy(n,t){n.rect(t.x,t.y,t.w,t.h)}function hs(n,t,e={}){const r=n.x!==e.x?-t:0,i=n.y!==e.y?-t:0,a=(n.x+n.w!==e.x+e.w?t:0)-r,s=(n.y+n.h!==e.y+e.h?t:0)-i;return{x:n.x+r,y:n.y+i,w:n.w+a,h:n.h+s,radius:n.radius}}class zi extends te{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:r,backgroundColor:i}}=this,{inner:a,outer:s}=ay(this),o=sy(s.radius)?tr:oy;t.save(),(s.w!==a.w||s.h!==a.h)&&(t.beginPath(),o(t,hs(s,e,a)),t.clip(),o(t,hs(a,-e,s)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),o(t,hs(a,e)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,e,r){return fs(this,t,e,r)}inXRange(t,e){return fs(this,t,null,e)}inYRange(t,e){return fs(this,null,t,e)}getCenterPoint(t){const{x:e,y:r,base:i,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(e+i)/2:e,y:a?r:(r+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}H(zi,"id","bar"),H(zi,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),H(zi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var ly=Object.freeze({__proto__:null,ArcElement:$r,BarElement:zi,LineElement:gn,PointElement:Wi});const ps=["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)"],$u=ps.map(n=>n.replace("rgb(","rgba(").replace(")",", 0.5)"));function ju(n){return ps[n%ps.length]}function Vu(n){return $u[n%$u.length]}function cy(n,t){return n.borderColor=ju(t),n.backgroundColor=Vu(t),++t}function uy(n,t){return n.backgroundColor=n.data.map(()=>ju(t++)),t}function dy(n,t){return n.backgroundColor=n.data.map(()=>Vu(t++)),t}function fy(n){let t=0;return(e,r)=>{const i=n.getDatasetMeta(r).controller;i instanceof pn?t=uy(e,t):i instanceof Nr?t=dy(e,t):i&&(t=cy(e,t))}}function qu(n){let t;for(t in n)if(n[t].borderColor||n[t].backgroundColor)return!0;return!1}function hy(n){return n&&(n.borderColor||n.backgroundColor)}var py={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(n,t,e){if(!e.enabled)return;const{data:{datasets:r},options:i}=n.config,{elements:a}=i;if(!e.forceOverride&&(qu(r)||hy(i)||a&&qu(a)))return;const s=fy(n);r.forEach(s)}};function gy(n,t,e,r,i){const a=i.samples||r;if(a>=e)return n.slice(t,t+e);const s=[],o=(e-2)/(a-2);let l=0;const c=t+e-1;let u=t,d,f,p,y,x;for(s[l++]=n[u],d=0;d<a-2;d++){let g=0,m=0,v;const b=Math.floor((d+1)*o)+1+t,w=Math.min(Math.floor((d+2)*o)+1,e)+t,T=w-b;for(v=b;v<w;v++)g+=n[v].x,m+=n[v].y;g/=T,m/=T;const M=Math.floor(d*o)+1+t,k=Math.min(Math.floor((d+1)*o)+1,e)+t,{x:S,y:C}=n[u];for(p=y=-1,v=M;v<k;v++)y=.5*Math.abs((S-g)*(n[v].y-C)-(S-n[v].x)*(m-C)),y>p&&(p=y,f=n[v],x=v);s[l++]=f,u=x}return s[l++]=n[c],s}function my(n,t,e,r){let i=0,a=0,s,o,l,c,u,d,f,p,y,x;const g=[],m=t+e-1,v=n[t].x,w=n[m].x-v;for(s=t;s<t+e;++s){o=n[s],l=(o.x-v)/w*r,c=o.y;const T=l|0;if(T===u)c<y?(y=c,d=s):c>x&&(x=c,f=s),i=(a*i+o.x)/++a;else{const M=s-1;if(!st(d)&&!st(f)){const k=Math.min(d,f),S=Math.max(d,f);k!==p&&k!==M&&g.push({...n[k],x:i}),S!==p&&S!==M&&g.push({...n[S],x:i})}s>0&&M!==p&&g.push(n[M]),g.push(o),u=T,a=0,y=x=c,d=f=p=s}}return g}function Xu(n){if(n._decimated){const t=n._data;delete n._decimated,delete n._data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Gu(n){n.data.datasets.forEach(t=>{Xu(t)})}function yy(n,t){const e=t.length;let r=0,i;const{iScale:a}=n,{min:s,max:o,minDefined:l,maxDefined:c}=a.getUserBounds();return l&&(r=Qt(Ve(t,a.axis,s).lo,0,e-1)),c?i=Qt(Ve(t,a.axis,o).hi+1,r,e)-r:i=e-r,{start:r,count:i}}var vy={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(n,t,e)=>{if(!e.enabled){Gu(n);return}const r=n.width;n.data.datasets.forEach((i,a)=>{const{_data:s,indexAxis:o}=i,l=n.getDatasetMeta(a),c=s||i.data;if(Rr([o,n.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=n.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||n.options.parsing)return;let{start:d,count:f}=yy(l,c);const p=e.threshold||4*r;if(f<=p){Xu(i);return}st(s)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(x){this._data=x}}));let y;switch(e.algorithm){case"lttb":y=gy(c,d,f,r,e);break;case"min-max":y=my(c,d,f,r);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}i._decimated=y})},destroy(n){Gu(n)}};function by(n,t,e){const r=n.segments,i=n.points,a=t.points,s=[];for(const o of r){let{start:l,end:c}=o;c=ms(l,c,i);const u=gs(e,i[l],i[c],o.loop);if(!t.segments){s.push({source:o,target:u,start:i[l],end:i[c]});continue}const d=Kc(t,u);for(const f of d){const p=gs(e,a[f.start],a[f.end],f.loop),y=Gc(o,i,p);for(const x of y)s.push({source:x,target:f,start:{[e]:Ku(u,p,"start",Math.max)},end:{[e]:Ku(u,p,"end",Math.min)}})}}return s}function gs(n,t,e,r){if(r)return;let i=t[n],a=e[n];return n==="angle"&&(i=xe(i),a=xe(a)),{property:n,start:i,end:a}}function xy(n,t){const{x:e=null,y:r=null}=n||{},i=t.points,a=[];return t.segments.forEach(({start:s,end:o})=>{o=ms(s,o,i);const l=i[s],c=i[o];r!==null?(a.push({x:l.x,y:r}),a.push({x:c.x,y:r})):e!==null&&(a.push({x:e,y:l.y}),a.push({x:e,y:c.y}))}),a}function ms(n,t,e){for(;t>n;t--){const r=e[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function Ku(n,t,e,r){return n&&t?r(n[e],t[e]):n?n[e]:t?t[e]:0}function Qu(n,t){let e=[],r=!1;return mt(n)?(r=!0,e=n):e=xy(n,t),e.length?new gn({points:e,options:{tension:0},_loop:r,_fullLoop:r}):null}function Zu(n){return n&&n.fill!==!1}function _y(n,t,e){let i=n[t].fill;const a=[t];let s;if(!e)return i;for(;i!==!1&&a.indexOf(i)===-1;){if(!It(i))return i;if(s=n[i],!s)return!1;if(s.visible)return i;a.push(i),i=s.fill}return!1}function wy(n,t,e){const r=My(n);if(lt(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return It(i)&&Math.floor(i)===i?Ty(r[0],t,i,e):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function Ty(n,t,e,r){return(n==="-"||n==="+")&&(e=t+e),e===t||e<0||e>=r?!1:e}function Sy(n,t){let e=null;return n==="start"?e=t.bottom:n==="end"?e=t.top:lt(n)?e=t.getPixelForValue(n.value):t.getBasePixel&&(e=t.getBasePixel()),e}function Cy(n,t,e){let r;return n==="start"?r=e:n==="end"?r=t.options.reverse?t.min:t.max:lt(n)?r=n.value:r=t.getBaseValue(),r}function My(n){const t=n.options,e=t.fill;let r=rt(e&&e.target,e);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function Dy(n){const{scale:t,index:e,line:r}=n,i=[],a=r.segments,s=r.points,o=ky(t,e);o.push(Qu({x:null,y:t.bottom},r));for(let l=0;l<a.length;l++){const c=a[l];for(let u=c.start;u<=c.end;u++)Oy(i,s[u],o)}return new gn({points:i,options:{}})}function ky(n,t){const e=[],r=n.getMatchingVisibleMetas("line");for(let i=0;i<r.length;i++){const a=r[i];if(a.index===t)break;a.hidden||e.unshift(a.dataset)}return e}function Oy(n,t,e){const r=[];for(let i=0;i<e.length;i++){const a=e[i],{first:s,last:o,point:l}=Py(a,t,"x");if(!(!l||s&&o)){if(s)r.unshift(l);else if(n.push(l),!o)break}}n.push(...r)}function Py(n,t,e){const r=n.interpolate(t,e);if(!r)return{};const i=r[e],a=n.segments,s=n.points;let o=!1,l=!1;for(let c=0;c<a.length;c++){const u=a[c],d=s[u.start][e],f=s[u.end][e];if(je(i,d,f)){o=i===d,l=i===f;break}}return{first:o,last:l,point:r}}class Ju{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,r){const{x:i,y:a,radius:s}=this;return e=e||{start:0,end:kt},t.arc(i,a,s,e.end,e.start,!0),!r.bounds}interpolate(t){const{x:e,y:r,radius:i}=this,a=t.angle;return{x:e+Math.cos(a)*i,y:r+Math.sin(a)*i,angle:a}}}function Ey(n){const{chart:t,fill:e,line:r}=n;if(It(e))return Ry(t,e);if(e==="stack")return Dy(n);if(e==="shape")return!0;const i=Ay(n);return i instanceof Ju?i:Qu(i,r)}function Ry(n,t){const e=n.getDatasetMeta(t);return e&&n.isDatasetVisible(t)?e.dataset:null}function Ay(n){return(n.scale||{}).getPointPositionForValue?Iy(n):Ly(n)}function Ly(n){const{scale:t={},fill:e}=n,r=Sy(e,t);if(It(r)){const i=t.isHorizontal();return{x:i?r:null,y:i?null:r}}return null}function Iy(n){const{scale:t,fill:e}=n,r=t.options,i=t.getLabels().length,a=r.reverse?t.max:t.min,s=Cy(e,t,a),o=[];if(r.grid.circular){const l=t.getPointPositionForValue(0,a);return new Ju({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(s)})}for(let l=0;l<i;++l)o.push(t.getPointPositionForValue(l,s));return o}function ys(n,t,e){const r=Ey(t),{line:i,scale:a,axis:s}=t,o=i.options,l=o.fill,c=o.backgroundColor,{above:u=c,below:d=c}=l||{};r&&i.points.length&&(Pr(n,e),Ny(n,{line:i,target:r,above:u,below:d,area:e,scale:a,axis:s}),Er(n))}function Ny(n,t){const{line:e,target:r,above:i,below:a,area:s,scale:o}=t,l=e._loop?"angle":t.axis;n.save(),l==="x"&&a!==i&&(td(n,r,s.top),ed(n,{line:e,target:r,color:i,scale:o,property:l}),n.restore(),n.save(),td(n,r,s.bottom)),ed(n,{line:e,target:r,color:a,scale:o,property:l}),n.restore()}function td(n,t,e){const{segments:r,points:i}=t;let a=!0,s=!1;n.beginPath();for(const o of r){const{start:l,end:c}=o,u=i[l],d=i[ms(l,c,i)];a?(n.moveTo(u.x,u.y),a=!1):(n.lineTo(u.x,e),n.lineTo(u.x,u.y)),s=!!t.pathSegment(n,o,{move:s}),s?n.closePath():n.lineTo(d.x,e)}n.lineTo(t.first().x,e),n.closePath(),n.clip()}function ed(n,t){const{line:e,target:r,property:i,color:a,scale:s}=t,o=by(e,r,i);for(const{source:l,target:c,start:u,end:d}of o){const{style:{backgroundColor:f=a}={}}=l,p=r!==!0;n.save(),n.fillStyle=f,Fy(n,s,p&&gs(i,u,d)),n.beginPath();const y=!!e.pathSegment(n,l);let x;if(p){y?n.closePath():nd(n,r,d,i);const g=!!r.pathSegment(n,c,{move:y,reverse:!0});x=y&&g,x||nd(n,r,u,i)}n.closePath(),n.fill(x?"evenodd":"nonzero"),n.restore()}}function Fy(n,t,e){const{top:r,bottom:i}=t.chart.chartArea,{property:a,start:s,end:o}=e||{};a==="x"&&(n.beginPath(),n.rect(s,r,o-s,i-r),n.clip())}function nd(n,t,e,r){const i=t.interpolate(e,r);i&&n.lineTo(i.x,i.y)}var Uy={id:"filler",afterDatasetsUpdate(n,t,e){const r=(n.data.datasets||[]).length,i=[];let a,s,o,l;for(s=0;s<r;++s)a=n.getDatasetMeta(s),o=a.dataset,l=null,o&&o.options&&o instanceof gn&&(l={visible:n.isDatasetVisible(s),index:s,fill:wy(o,s,r),chart:n,axis:a.controller.options.indexAxis,scale:a.vScale,line:o}),a.$filler=l,i.push(l);for(s=0;s<r;++s)l=i[s],!(!l||l.fill===!1)&&(l.fill=_y(i,s,e.propagate))},beforeDraw(n,t,e){const r=e.drawTime==="beforeDraw",i=n.getSortedVisibleDatasetMetas(),a=n.chartArea;for(let s=i.length-1;s>=0;--s){const o=i[s].$filler;o&&(o.line.updateControlPoints(a,o.axis),r&&o.fill&&ys(n.ctx,o,a))}},beforeDatasetsDraw(n,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const r=n.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const a=r[i].$filler;Zu(a)&&ys(n.ctx,a,n.chartArea)}},beforeDatasetDraw(n,t,e){const r=t.meta.$filler;!Zu(r)||e.drawTime!=="beforeDatasetDraw"||ys(n.ctx,r,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const rd=(n,t)=>{let{boxHeight:e=t,boxWidth:r=t}=n;return n.usePointStyle&&(e=Math.min(e,t),r=n.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:e,itemHeight:Math.max(t,e)}},By=(n,t)=>n!==null&&t!==null&&n.datasetIndex===t.datasetIndex&&n.index===t.index;class id extends te{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,r){this.maxWidth=t,this.maxHeight=e,this._margins=r,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=Tt(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(r=>t.filter(r,this.chart.data))),t.sort&&(e=e.sort((r,i)=>t.sort(r,i,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 r=t.labels,i=Rt(r.font),a=i.size,s=this._computeTitleHeight(),{boxWidth:o,itemHeight:l}=rd(r,a);let c,u;e.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(s,a,o,l)+10):(u=this.maxHeight,c=this._fitCols(s,i,o,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,e,r,i){const{ctx:a,maxWidth:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+o;let d=t;a.textAlign="left",a.textBaseline="middle";let f=-1,p=-u;return this.legendItems.forEach((y,x)=>{const g=r+e/2+a.measureText(y.text).width;(x===0||c[c.length-1]+g+2*o>s)&&(d+=u,c[c.length-(x>0?0:1)]=0,p+=u,f++),l[x]={left:0,top:p,row:f,width:g,height:i},c[c.length-1]+=g+o}),d}_fitCols(t,e,r,i){const{ctx:a,maxHeight:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=s-t;let d=o,f=0,p=0,y=0,x=0;return this.legendItems.forEach((g,m)=>{const{itemWidth:v,itemHeight:b}=Wy(r,e,a,g,i);m>0&&p+b+2*o>u&&(d+=f+o,c.push({width:f,height:p}),y+=f+o,x++,f=p=0),l[m]={left:y,top:p,col:x,width:v,height:b},f=Math.max(f,v),p+=b+o}),d+=f,c.push({width:f,height:p}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:r,labels:{padding:i},rtl:a}}=this,s=rr(a,this.left,this.width);if(this.isHorizontal()){let o=0,l=re(r,this.left+i,this.right-this.lineWidths[o]);for(const c of e)o!==c.row&&(o=c.row,l=re(r,this.left+i,this.right-this.lineWidths[o])),c.top+=this.top+t+i,c.left=s.leftForLtr(s.x(l),c.width),l+=c.width+i}else{let o=0,l=re(r,this.top+t+i,this.bottom-this.columnSizes[o].height);for(const c of e)c.col!==o&&(o=c.col,l=re(r,this.top+t+i,this.bottom-this.columnSizes[o].height)),c.top=l,c.left+=this.left+i,c.left=s.leftForLtr(s.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Pr(t,this),this._draw(),Er(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:r,ctx:i}=this,{align:a,labels:s}=t,o=Ut.color,l=rr(t.rtl,this.left,this.width),c=Rt(s.font),{padding:u}=s,d=c.size,f=d/2;let p;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:y,boxHeight:x,itemHeight:g}=rd(s,d),m=function(M,k,S){if(isNaN(y)||y<=0||isNaN(x)||x<0)return;i.save();const C=rt(S.lineWidth,1);if(i.fillStyle=rt(S.fillStyle,o),i.lineCap=rt(S.lineCap,"butt"),i.lineDashOffset=rt(S.lineDashOffset,0),i.lineJoin=rt(S.lineJoin,"miter"),i.lineWidth=C,i.strokeStyle=rt(S.strokeStyle,o),i.setLineDash(rt(S.lineDash,[])),s.usePointStyle){const O={radius:x*Math.SQRT2/2,pointStyle:S.pointStyle,rotation:S.rotation,borderWidth:C},P=l.xPlus(M,y/2),E=k+f;Ac(i,O,P,E,s.pointStyleWidth&&y)}else{const O=k+Math.max((d-x)/2,0),P=l.leftForLtr(M,y),E=dn(S.borderRadius);i.beginPath(),Object.values(E).some(F=>F!==0)?tr(i,{x:P,y:O,w:y,h:x,radius:E}):i.rect(P,O,y,x),i.fill(),C!==0&&i.stroke()}i.restore()},v=function(M,k,S){En(i,S.text,M,k+g/2,c,{strikethrough:S.hidden,textAlign:l.textAlign(S.textAlign)})},b=this.isHorizontal(),w=this._computeTitleHeight();b?p={x:re(a,this.left+u,this.right-r[0]),y:this.top+u+w,line:0}:p={x:this.left+u,y:re(a,this.top+w+u,this.bottom-e[0].height),line:0},jc(this.ctx,t.textDirection);const T=g+u;this.legendItems.forEach((M,k)=>{i.strokeStyle=M.fontColor,i.fillStyle=M.fontColor;const S=i.measureText(M.text).width,C=l.textAlign(M.textAlign||(M.textAlign=s.textAlign)),O=y+f+S;let P=p.x,E=p.y;l.setWidth(this.width),b?k>0&&P+O+u>this.right&&(E=p.y+=T,p.line++,P=p.x=re(a,this.left+u,this.right-r[p.line])):k>0&&E+T>this.bottom&&(P=p.x=P+e[p.line].width+u,p.line++,E=p.y=re(a,this.top+w+u,this.bottom-e[p.line].height));const F=l.x(P);if(m(F,E,M),P=cg(C,P+y+f,b?P+O:this.right,t.rtl),v(l.x(P),E,M),b)p.x+=O+u;else if(typeof M.text!="string"){const q=c.lineHeight;p.y+=ad(M,q)+u}else p.y+=T}),Vc(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,r=Rt(e.font),i=Gt(e.padding);if(!e.display)return;const a=rr(t.rtl,this.left,this.width),s=this.ctx,o=e.position,l=r.size/2,c=i.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=re(t.align,d,this.right-f);else{const y=this.columnSizes.reduce((x,g)=>Math.max(x,g.height),0);u=c+re(t.align,this.top,this.bottom-y-t.labels.padding-this._computeTitleHeight())}const p=re(o,d,d+f);s.textAlign=a.textAlign(za(o)),s.textBaseline="middle",s.strokeStyle=e.color,s.fillStyle=e.color,s.font=r.string,En(s,e.text,p,u,r)}_computeTitleHeight(){const t=this.options.title,e=Rt(t.font),r=Gt(t.padding);return t.display?e.lineHeight+r.height:0}_getLegendItemAt(t,e){let r,i,a;if(je(t,this.left,this.right)&&je(e,this.top,this.bottom)){for(a=this.legendHitBoxes,r=0;r<a.length;++r)if(i=a[r],je(t,i.left,i.left+i.width)&&je(e,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const e=this.options;if(!Hy(t.type,e))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,a=By(i,r);i&&!a&&Tt(e.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!a&&Tt(e.onHover,[t,r,this],this)}else r&&Tt(e.onClick,[t,r,this],this)}}function Wy(n,t,e,r,i){const a=zy(r,n,t,e),s=Yy(i,r,t.lineHeight);return{itemWidth:a,itemHeight:s}}function zy(n,t,e,r){let i=n.text;return i&&typeof i!="string"&&(i=i.reduce((a,s)=>a.length>s.length?a:s)),t+e.size/2+r.measureText(i).width}function Yy(n,t,e){let r=n;return typeof t.text!="string"&&(r=ad(t,e)),r}function ad(n,t){const e=n.text?n.text.length:0;return t*e}function Hy(n,t){return!!((n==="mousemove"||n==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(n==="click"||n==="mouseup"))}var $y={id:"legend",_element:id,start(n,t,e){const r=n.legend=new id({ctx:n.ctx,options:e,chart:n});ie.configure(n,r,e),ie.addBox(n,r)},stop(n){ie.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,t,e){const r=n.legend;ie.configure(n,r,e),r.options=e},afterUpdate(n){const t=n.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(n,t){t.replay||n.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(n,t,e){const r=t.datasetIndex,i=e.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:n=>n.chart.options.color,boxWidth:40,padding:10,generateLabels(n){const t=n.data.datasets,{labels:{usePointStyle:e,pointStyle:r,textAlign:i,color:a,useBorderRadius:s,borderRadius:o}}=n.legend.options;return n._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),u=Gt(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:a,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:s&&(o||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:n=>n.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:n=>!n.startsWith("on"),labels:{_scriptable:n=>!["generateLabels","filter","sort"].includes(n)}}};class vs extends te{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 r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const i=mt(r.text)?r.text.length:1;this._padding=Gt(r.padding);const a=i*Rt(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:r,bottom:i,right:a,options:s}=this,o=s.align;let l=0,c,u,d;return this.isHorizontal()?(u=re(o,r,a),d=e+t,c=a-r):(s.position==="left"?(u=r+t,d=re(o,i,e),l=dt*-.5):(u=a-t,d=re(o,e,i),l=dt*.5),c=i-e),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const r=Rt(e.font),a=r.lineHeight/2+this._padding.top,{titleX:s,titleY:o,maxWidth:l,rotation:c}=this._drawArgs(a);En(t,e.text,0,0,r,{color:e.color,maxWidth:l,rotation:c,textAlign:za(e.align),textBaseline:"middle",translation:[s,o]})}}function jy(n,t){const e=new vs({ctx:n.ctx,options:t,chart:n});ie.configure(n,e,t),ie.addBox(n,e),n.titleBlock=e}var Vy={id:"title",_element:vs,start(n,t,e){jy(n,e)},stop(n){const t=n.titleBlock;ie.removeBox(n,t),delete n.titleBlock},beforeUpdate(n,t,e){const r=n.titleBlock;ie.configure(n,r,e),r.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 Yi=new WeakMap;var qy={id:"subtitle",start(n,t,e){const r=new vs({ctx:n.ctx,options:e,chart:n});ie.configure(n,r,e),ie.addBox(n,r),Yi.set(n,r)},stop(n){ie.removeBox(n,Yi.get(n)),Yi.delete(n)},beforeUpdate(n,t,e){const r=Yi.get(n);ie.configure(n,r,e),r.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const jr={average(n){if(!n.length)return!1;let t,e,r=new Set,i=0,a=0;for(t=0,e=n.length;t<e;++t){const o=n[t].element;if(o&&o.hasValue()){const l=o.tooltipPosition();r.add(l.x),i+=l.y,++a}}return{x:[...r].reduce((o,l)=>o+l)/r.size,y:i/a}},nearest(n,t){if(!n.length)return!1;let e=t.x,r=t.y,i=Number.POSITIVE_INFINITY,a,s,o;for(a=0,s=n.length;a<s;++a){const l=n[a].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=Jn(t,c);u<i&&(i=u,o=l)}}if(o){const l=o.tooltipPosition();e=l.x,r=l.y}return{x:e,y:r}}};function Ne(n,t){return t&&(mt(t)?Array.prototype.push.apply(n,t):n.push(t)),n}function Ge(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(`
|
|
17
17
|
`)>-1?n.split(`
|
|
18
|
-
`):n}function Vy(n,t){const{element:e,datasetIndex:i,index:r}=t,a=n.getDatasetMeta(i).controller,{label:s,value:o}=a.getLabelAndValue(r);return{chart:n,label:s,parsed:a.getParsed(r),raw:n.data.datasets[i].data[r],formattedValue:o,dataset:a.getDataset(),dataIndex:r,datasetIndex:i,element:e}}function ad(n,t){const e=n.chart.ctx,{body:i,footer:r,title:a}=n,{boxWidth:s,boxHeight:o}=t,l=Rt(t.bodyFont),c=Rt(t.titleFont),u=Rt(t.footerFont),d=a.length,f=r.length,p=i.length,y=Gt(t.padding);let x=y.height,g=0,m=i.reduce((w,T)=>w+T.before.length+T.lines.length+T.after.length,0);if(m+=n.beforeBody.length+n.afterBody.length,d&&(x+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),m){const w=t.displayColors?Math.max(o,l.lineHeight):l.lineHeight;x+=p*w+(m-p)*l.lineHeight+(m-1)*t.bodySpacing}f&&(x+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let v=0;const b=function(w){g=Math.max(g,e.measureText(w).width+v)};return e.save(),e.font=c.string,St(n.title,b),e.font=l.string,St(n.beforeBody.concat(n.afterBody),b),v=t.displayColors?s+2+t.boxPadding:0,St(i,w=>{St(w.before,b),St(w.lines,b),St(w.after,b)}),v=0,e.font=u.string,St(n.footer,b),e.restore(),g+=y.width,{width:g,height:x}}function qy(n,t){const{y:e,height:i}=t;return e<i/2?"top":e>n.height-i/2?"bottom":"center"}function Xy(n,t,e,i){const{x:r,width:a}=i,s=e.caretSize+e.caretPadding;if(n==="left"&&r+a+s>t.width||n==="right"&&r-a-s<0)return!0}function Gy(n,t,e,i){const{x:r,width:a}=e,{width:s,chartArea:{left:o,right:l}}=n;let c="center";return i==="center"?c=r<=(o+l)/2?"left":"right":r<=a/2?c="left":r>=s-a/2&&(c="right"),Xy(c,n,t,e)&&(c="center"),c}function sd(n,t,e){const i=e.yAlign||t.yAlign||qy(n,e);return{xAlign:e.xAlign||t.xAlign||Gy(n,t,e,i),yAlign:i}}function Ky(n,t){let{x:e,width:i}=n;return t==="right"?e-=i:t==="center"&&(e-=i/2),e}function Qy(n,t,e){let{y:i,height:r}=n;return t==="top"?i+=e:t==="bottom"?i-=r+e:i-=r/2,i}function od(n,t,e,i){const{caretSize:r,caretPadding:a,cornerRadius:s}=n,{xAlign:o,yAlign:l}=e,c=r+a,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=dn(s);let y=Ky(t,o);const x=Qy(t,l,c);return l==="center"?o==="left"?y+=c:o==="right"&&(y-=c):o==="left"?y-=Math.max(u,f)+r:o==="right"&&(y+=Math.max(d,p)+r),{x:Qt(y,0,i.width-t.width),y:Qt(x,0,i.height-t.height)}}function Hr(n,t,e){const i=Gt(e.padding);return t==="center"?n.x+n.width/2:t==="right"?n.x+n.width-i.right:n.x+i.left}function ld(n){return Ne([],Ge(n))}function Zy(n,t,e){return fn(n,{tooltip:t,tooltipItems:e,type:"tooltip"})}function cd(n,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?n.override(e):n}const ud={beforeTitle:$e,title(n){if(n.length>0){const t=n[0],e=t.chart.data.labels,i=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return e[t.dataIndex]}return""},afterTitle:$e,beforeBody:$e,beforeLabel:$e,label(n){if(this&&this.options&&this.options.mode==="dataset")return n.label+": "+n.formattedValue||n.formattedValue;let t=n.dataset.label||"";t&&(t+=": ");const e=n.formattedValue;return st(e)||(t+=e),t},labelColor(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.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(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:$e,afterBody:$e,beforeFooter:$e,footer:$e,afterFooter:$e};function he(n,t,e,i){const r=n[t].call(e,i);return typeof r>"u"?ud[t].call(e,i):r}class bs extends te{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,i=this.options.setContext(this.getContext()),r=i.enabled&&e.options.animation&&i.animations,a=new Ja(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=Zy(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:i}=e,r=he(i,"beforeTitle",this,t),a=he(i,"title",this,t),s=he(i,"afterTitle",this,t);let o=[];return o=Ne(o,Ge(r)),o=Ne(o,Ge(a)),o=Ne(o,Ge(s)),o}getBeforeBody(t,e){return ld(he(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,r=[];return St(t,a=>{const s={before:[],lines:[],after:[]},o=cd(i,a);Ne(s.before,Ge(he(o,"beforeLabel",this,a))),Ne(s.lines,he(o,"label",this,a)),Ne(s.after,Ge(he(o,"afterLabel",this,a))),r.push(s)}),r}getAfterBody(t,e){return ld(he(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,r=he(i,"beforeFooter",this,t),a=he(i,"footer",this,t),s=he(i,"afterFooter",this,t);let o=[];return o=Ne(o,Ge(r)),o=Ne(o,Ge(a)),o=Ne(o,Ge(s)),o}_createItems(t){const e=this._active,i=this.chart.data,r=[],a=[],s=[];let o=[],l,c;for(l=0,c=e.length;l<c;++l)o.push(Vy(this.chart,e[l]));return t.filter&&(o=o.filter((u,d,f)=>t.filter(u,d,f,i))),t.itemSort&&(o=o.sort((u,d)=>t.itemSort(u,d,i))),St(o,u=>{const d=cd(t.callbacks,u);r.push(he(d,"labelColor",this,u)),a.push(he(d,"labelPointStyle",this,u)),s.push(he(d,"labelTextColor",this,u))}),this.labelColors=r,this.labelPointStyles=a,this.labelTextColors=s,this.dataPoints=o,o}update(t,e){const i=this.options.setContext(this.getContext()),r=this._active;let a,s=[];if(!r.length)this.opacity!==0&&(a={opacity:0});else{const o=ji[i.position].call(this,r,this._eventPosition);s=this._createItems(i),this.title=this.getTitle(s,i),this.beforeBody=this.getBeforeBody(s,i),this.body=this.getBody(s,i),this.afterBody=this.getAfterBody(s,i),this.footer=this.getFooter(s,i);const l=this._size=ad(this,i),c=Object.assign({},o,l),u=sd(this.chart,i,c),d=od(i,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,a={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:o.x,caretY:o.y}}this._tooltipItems=s,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,r){const a=this.getCaretPosition(t,i,r);e.lineTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.lineTo(a.x3,a.y3)}getCaretPosition(t,e,i){const{xAlign:r,yAlign:a}=this,{caretSize:s,cornerRadius:o}=i,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=dn(o),{x:f,y:p}=t,{width:y,height:x}=e;let g,m,v,b,w,T;return a==="center"?(w=p+x/2,r==="left"?(g=f,m=g-s,b=w+s,T=w-s):(g=f+y,m=g+s,b=w-s,T=w+s),v=g):(r==="left"?m=f+Math.max(l,u)+s:r==="right"?m=f+y-Math.max(c,d)-s:m=this.caretX,a==="top"?(b=p,w=b-s,g=m-s,v=m+s):(b=p+x,w=b+s,g=m+s,v=m-s),T=b),{x1:g,x2:m,x3:v,y1:b,y2:w,y3:T}}drawTitle(t,e,i){const r=this.title,a=r.length;let s,o,l;if(a){const c=ii(i.rtl,this.x,this.width);for(t.x=Hr(this,i.titleAlign,i),e.textAlign=c.textAlign(i.titleAlign),e.textBaseline="middle",s=Rt(i.titleFont),o=i.titleSpacing,e.fillStyle=i.titleColor,e.font=s.string,l=0;l<a;++l)e.fillText(r[l],c.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+o,l+1===a&&(t.y+=i.titleMarginBottom-o)}}_drawColorBox(t,e,i,r,a){const s=this.labelColors[i],o=this.labelPointStyles[i],{boxHeight:l,boxWidth:c}=a,u=Rt(a.bodyFont),d=Hr(this,"left",a),f=r.x(d),p=l<u.lineHeight?(u.lineHeight-l)/2:0,y=e.y+p;if(a.usePointStyle){const x={radius:Math.min(c,l)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},g=r.leftForLtr(f,c)+c/2,m=y+l/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,Va(t,x,g,m),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,Va(t,x,g,m)}else{t.lineWidth=lt(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const x=r.leftForLtr(f,c),g=r.leftForLtr(r.xPlus(f,1),c-2),m=dn(s.borderRadius);Object.values(m).some(v=>v!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,ti(t,{x,y,w:c,h:l,radius:m}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),ti(t,{x:g,y:y+1,w:c-2,h:l-2,radius:m}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(x,y,c,l),t.strokeRect(x,y,c,l),t.fillStyle=s.backgroundColor,t.fillRect(g,y+1,c-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:r}=this,{bodySpacing:a,bodyAlign:s,displayColors:o,boxHeight:l,boxWidth:c,boxPadding:u}=i,d=Rt(i.bodyFont);let f=d.lineHeight,p=0;const y=ii(i.rtl,this.x,this.width),x=function(S){e.fillText(S,y.x(t.x+p),t.y+f/2),t.y+=f+a},g=y.textAlign(s);let m,v,b,w,T,M,k;for(e.textAlign=s,e.textBaseline="middle",e.font=d.string,t.x=Hr(this,g,i),e.fillStyle=i.bodyColor,St(this.beforeBody,x),p=o&&g!=="right"?s==="center"?c/2+u:c+2+u:0,w=0,M=r.length;w<M;++w){for(m=r[w],v=this.labelTextColors[w],e.fillStyle=v,St(m.before,x),b=m.lines,o&&b.length&&(this._drawColorBox(e,t,w,y,i),f=Math.max(d.lineHeight,l)),T=0,k=b.length;T<k;++T)x(b[T]),f=d.lineHeight;St(m.after,x)}p=0,f=d.lineHeight,St(this.afterBody,x),t.y-=a}drawFooter(t,e,i){const r=this.footer,a=r.length;let s,o;if(a){const l=ii(i.rtl,this.x,this.width);for(t.x=Hr(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=l.textAlign(i.footerAlign),e.textBaseline="middle",s=Rt(i.footerFont),e.fillStyle=i.footerColor,e.font=s.string,o=0;o<a;++o)e.fillText(r[o],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+i.footerSpacing}}drawBackground(t,e,i,r){const{xAlign:a,yAlign:s}=this,{x:o,y:l}=t,{width:c,height:u}=i,{topLeft:d,topRight:f,bottomLeft:p,bottomRight:y}=dn(r.cornerRadius);e.fillStyle=r.backgroundColor,e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.beginPath(),e.moveTo(o+d,l),s==="top"&&this.drawCaret(t,e,i,r),e.lineTo(o+c-f,l),e.quadraticCurveTo(o+c,l,o+c,l+f),s==="center"&&a==="right"&&this.drawCaret(t,e,i,r),e.lineTo(o+c,l+u-y),e.quadraticCurveTo(o+c,l+u,o+c-y,l+u),s==="bottom"&&this.drawCaret(t,e,i,r),e.lineTo(o+p,l+u),e.quadraticCurveTo(o,l+u,o,l+u-p),s==="center"&&a==="left"&&this.drawCaret(t,e,i,r),e.lineTo(o,l+d),e.quadraticCurveTo(o,l,o+d,l),e.closePath(),e.fill(),r.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,r=i&&i.x,a=i&&i.y;if(r||a){const s=ji[t.position].call(this,this._active,this._eventPosition);if(!s)return;const o=this._size=ad(this,t),l=Object.assign({},s,this._size),c=sd(e,t,l),u=od(t,l,c,e);(r._to!==u.x||a._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=o.width,this.height=o.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const r={width:this.width,height:this.height},a={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const s=Gt(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=i,this.drawBackground(a,t,r,e),$c(t,e.textDirection),a.y+=s.top,this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),jc(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,r=t.map(({datasetIndex:o,index:l})=>{const c=this.chart.getDatasetMeta(o);if(!c)throw new Error("Cannot find a dataset at index "+o);return{datasetIndex:o,element:c.data[l],index:l}}),a=!mr(i,r),s=this._positionChanged(r,e);(a||s)&&(this._active=r,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,a=this._active||[],s=this._getActiveElements(t,a,e,i),o=this._positionChanged(s,t),l=e||!mr(s,a)||o;return l&&(this._active=s,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,i,r){const a=this.options;if(t.type==="mouseout")return[];if(!r)return e.filter(o=>this.chart.data.datasets[o.datasetIndex]&&this.chart.getDatasetMeta(o.datasetIndex).controller.getParsed(o.index)!==void 0);const s=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&s.reverse(),s}_positionChanged(t,e){const{caretX:i,caretY:r,options:a}=this,s=ji[a.position].call(this,t,e);return s!==!1&&(i!==s.x||r!==s.y)}}H(bs,"positioners",ji);var $r={id:"tooltip",_element:bs,positioners:ji,afterInit(n,t,e){e&&(n.tooltip=new bs({chart:n,options:e}))},beforeUpdate(n,t,e){n.tooltip&&n.tooltip.initialize(e)},reset(n,t,e){n.tooltip&&n.tooltip.initialize(e)},afterDraw(n){const t=n.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(n.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",e)}},afterEvent(n,t){if(n.tooltip){const e=t.replay;n.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:(n,t)=>t.bodyFont.size,boxWidth:(n,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:ud},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:n=>n!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Jy=Object.freeze({__proto__:null,Colors:fy,Decimation:my,Filler:Ny,Legend:Yy,SubTitle:jy,Title:$y,Tooltip:$r});const tv=(n,t,e,i)=>(typeof t=="string"?(e=n.push(t)-1,i.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function ev(n,t,e,i){const r=n.indexOf(t);if(r===-1)return tv(n,t,e,i);const a=n.lastIndexOf(t);return r!==a?e:r}const nv=(n,t)=>n===null?null:Qt(Math.round(n),0,t);function dd(n){const t=this.getLabels();return n>=0&&n<t.length?t[n]:n}class xs extends In{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const i=this.getLabels();for(const{index:r,label:a}of e)i[r]===a&&i.splice(r,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(st(t))return null;const i=this.getLabels();return e=isFinite(e)&&i[e]===t?e:ev(i,t,it(e,t),this._addedLabels),nv(e,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),e||(r=this.getLabels().length-1)),this.min=i,this.max=r}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,r=[];let a=this.getLabels();a=t===0&&e===a.length-1?a:a.slice(t,e+1),this._valueRange=Math.max(a.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let s=t;s<=e;s++)r.push({value:s});return r}getLabelForValue(t){return dd.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}}H(xs,"id","category"),H(xs,"defaults",{ticks:{callback:dd}});function iv(n,t){const e=[],{bounds:r,step:a,min:s,max:o,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=n,p=a||1,y=u-1,{min:x,max:g}=t,m=!st(s),v=!st(o),b=!st(c),w=(g-x)/(d+1);let T=gc((g-x)/y/p)*p,M,k,S,C;if(T<1e-14&&!m&&!v)return[{value:x},{value:g}];C=Math.ceil(g/T)-Math.floor(x/T),C>y&&(T=gc(C*T/y/p)*p),st(l)||(M=Math.pow(10,l),T=Math.ceil(T*M)/M),r==="ticks"?(k=Math.floor(x/T)*T,S=Math.ceil(g/T)*T):(k=x,S=g),m&&v&&a&&tg((o-s)/a,T/1e3)?(C=Math.round(Math.min((o-s)/T,u)),T=(o-s)/C,k=s,S=o):b?(k=m?s:k,S=v?o:S,C=c-1,T=(S-k)/C):(C=(S-k)/T,Ci(C,Math.round(C),T/1e3)?C=Math.round(C):C=Math.ceil(C));const O=Math.max(yc(T),yc(k));M=Math.pow(10,st(l)?O:l),k=Math.round(k*M)/M,S=Math.round(S*M)/M;let P=0;for(m&&(f&&k!==s?(e.push({value:s}),k<s&&P++,Ci(Math.round((k+P*T)*M)/M,s,fd(s,w,n))&&P++):k<s&&P++);P<C;++P){const E=Math.round((k+P*T)*M)/M;if(v&&E>o)break;e.push({value:E})}return v&&f&&S!==o?e.length&&Ci(e[e.length-1].value,o,fd(o,w,n))?e[e.length-1].value=o:e.push({value:o}):(!v||S===o)&&e.push({value:S}),e}function fd(n,t,{horizontal:e,minRotation:i}){const r=Xt(i),a=(e?Math.sin(r):Math.cos(r))||.001,s=.75*t*(""+n).length;return Math.min(t/a,s)}class jr extends In{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 st(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:r,max:a}=this;const s=l=>r=e?r:l,o=l=>a=i?a:l;if(t){const l=Le(r),c=Le(a);l<0&&c<0?o(0):l>0&&c>0&&s(0)}if(r===a){let l=a===0?1:Math.abs(a*.05);o(a+l),t||s(r-l)}this.min=r,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:i}=t,r;return i?(r=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),e=e||11),e&&(r=Math.min(e,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const r={maxTicks:i,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},a=this._range||this,s=iv(r,a);return t.bounds==="ticks"&&mc(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const r=(i-e)/Math.max(t.length-1,1)/2;e-=r,i+=r}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return ki(t,this.chart.options.locale,this.options.ticks.format)}}class _s extends jr{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=It(t)?t:0,this.max=It(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=Xt(this.options.ticks.minRotation),r=(t?Math.sin(i):Math.cos(i))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,a.lineHeight/r))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}H(_s,"id","linear"),H(_s,"defaults",{ticks:{callback:wr.formatters.numeric}});const Vi=n=>Math.floor(cn(n)),Nn=(n,t)=>Math.pow(10,Vi(n)+t);function hd(n){return n/Math.pow(10,Vi(n))===1}function pd(n,t,e){const i=Math.pow(10,e),r=Math.floor(n/i);return Math.ceil(t/i)-r}function rv(n,t){const e=t-n;let i=Vi(e);for(;pd(n,t,i)>10;)i++;for(;pd(n,t,i)<10;)i--;return Math.min(i,Vi(n))}function av(n,{min:t,max:e}){t=be(n.min,t);const i=[],r=Vi(t);let a=rv(t,e),s=a<0?Math.pow(10,Math.abs(a)):1;const o=Math.pow(10,a),l=r>a?Math.pow(10,r):0,c=Math.round((t-l)*s)/s,u=Math.floor((t-l)/o/10)*o*10;let d=Math.floor((c-u)/Math.pow(10,a)),f=be(n.min,Math.round((l+u+d*Math.pow(10,a))*s)/s);for(;f<e;)i.push({value:f,major:hd(f),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(a++,d=2,s=a>=0?1:s),f=Math.round((l+u+d*Math.pow(10,a))*s)/s;const p=be(n.max,f);return i.push({value:p,major:hd(p),significand:d}),i}class ws extends In{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=jr.prototype.parse.apply(this,[t,e]);if(i===0){this._zero=!0;return}return It(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=It(t)?Math.max(0,t):null,this.max=It(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!It(this._userMin)&&(this.min=t===Nn(this.min,0)?Nn(this.min,-1):Nn(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,r=this.max;const a=o=>i=t?i:o,s=o=>r=e?r:o;i===r&&(i<=0?(a(1),s(10)):(a(Nn(i,-1)),s(Nn(r,1)))),i<=0&&a(Nn(r,-1)),r<=0&&s(Nn(i,1)),this.min=i,this.max=r}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},i=av(e,this);return t.bounds==="ticks"&&mc(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":ki(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=cn(t),this._valueRange=cn(this.max)-cn(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(cn(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}H(ws,"id","logarithmic"),H(ws,"defaults",{ticks:{callback:wr.formatters.logarithmic,major:{enabled:!0}}});function Ts(n){const t=n.ticks;if(t.display&&n.display){const e=Gt(t.backdropPadding);return it(t.font&&t.font.size,Ut.font.size)+e.height}return 0}function sv(n,t,e){return e=mt(e)?e:[e],{w:yg(n,t.string,e),h:e.length*t.lineHeight}}function gd(n,t,e,i,r){return n===i||n===r?{start:t-e/2,end:t+e/2}:n<i||n>r?{start:t-e,end:t}:{start:t,end:t+e}}function ov(n){const t={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},e=Object.assign({},t),i=[],r=[],a=n._pointLabels.length,s=n.options.pointLabels,o=s.centerPointLabels?dt/a:0;for(let l=0;l<a;l++){const c=s.setContext(n.getPointLabelContext(l));r[l]=c.padding;const u=n.getPointPosition(l,n.drawingArea+r[l],o),d=Rt(c.font),f=sv(n.ctx,d,n._pointLabels[l]);i[l]=f;const p=xe(n.getIndexAngle(l)+o),y=Math.round(xr(p)),x=gd(y,u.x,f.w,0,180),g=gd(y,u.y,f.h,90,270);lv(e,t,p,x,g)}n.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),n._pointLabelItems=dv(n,i,r)}function lv(n,t,e,i,r){const a=Math.abs(Math.sin(e)),s=Math.abs(Math.cos(e));let o=0,l=0;i.start<t.l?(o=(t.l-i.start)/a,n.l=Math.min(n.l,t.l-o)):i.end>t.r&&(o=(i.end-t.r)/a,n.r=Math.max(n.r,t.r+o)),r.start<t.t?(l=(t.t-r.start)/s,n.t=Math.min(n.t,t.t-l)):r.end>t.b&&(l=(r.end-t.b)/s,n.b=Math.max(n.b,t.b+l))}function cv(n,t,e){const i=n.drawingArea,{extra:r,additionalAngle:a,padding:s,size:o}=e,l=n.getPointPosition(t,i+r+s,a),c=Math.round(xr(xe(l.angle+Et))),u=pv(l.y,o.h,c),d=fv(c),f=hv(l.x,o.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:f,top:u,right:f+o.w,bottom:u+o.h}}function uv(n,t){if(!t)return!0;const{left:e,top:i,right:r,bottom:a}=n;return!(qe({x:e,y:i},t)||qe({x:e,y:a},t)||qe({x:r,y:i},t)||qe({x:r,y:a},t))}function dv(n,t,e){const i=[],r=n._pointLabels.length,a=n.options,{centerPointLabels:s,display:o}=a.pointLabels,l={extra:Ts(a)/2,additionalAngle:s?dt/r:0};let c;for(let u=0;u<r;u++){l.padding=e[u],l.size=t[u];const d=cv(n,u,l);i.push(d),o==="auto"&&(d.visible=uv(d,c),d.visible&&(c=d))}return i}function fv(n){return n===0||n===180?"center":n<180?"left":"right"}function hv(n,t,e){return e==="right"?n-=t:e==="center"&&(n-=t/2),n}function pv(n,t,e){return e===90||e===270?n-=t/2:(e>270||e<90)&&(n-=t),n}function gv(n,t,e){const{left:i,top:r,right:a,bottom:s}=e,{backdropColor:o}=t;if(!st(o)){const l=dn(t.borderRadius),c=Gt(t.backdropPadding);n.fillStyle=o;const u=i-c.left,d=r-c.top,f=a-i+c.width,p=s-r+c.height;Object.values(l).some(y=>y!==0)?(n.beginPath(),ti(n,{x:u,y:d,w:f,h:p,radius:l}),n.fill()):n.fillRect(u,d,f,p)}}function mv(n,t){const{ctx:e,options:{pointLabels:i}}=n;for(let r=t-1;r>=0;r--){const a=n._pointLabelItems[r];if(!a.visible)continue;const s=i.setContext(n.getPointLabelContext(r));gv(e,s,a);const o=Rt(s.font),{x:l,y:c,textAlign:u}=a;En(e,n._pointLabels[r],l,c+o.lineHeight/2,o,{color:s.color,textAlign:u,textBaseline:"middle"})}}function md(n,t,e,i){const{ctx:r}=n;if(e)r.arc(n.xCenter,n.yCenter,t,0,kt);else{let a=n.getPointPosition(0,t);r.moveTo(a.x,a.y);for(let s=1;s<i;s++)a=n.getPointPosition(s,t),r.lineTo(a.x,a.y)}}function yv(n,t,e,i,r){const a=n.ctx,s=t.circular,{color:o,lineWidth:l}=t;!s&&!i||!o||!l||e<0||(a.save(),a.strokeStyle=o,a.lineWidth=l,a.setLineDash(r.dash),a.lineDashOffset=r.dashOffset,a.beginPath(),md(n,e,s,i),a.closePath(),a.stroke(),a.restore())}function vv(n,t,e){return fn(n,{label:e,index:t,type:"pointLabel"})}class qi extends jr{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Gt(Ts(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=It(t)&&!isNaN(t)?t:0,this.max=It(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ts(this.options))}generateTickLabels(t){jr.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,i)=>{const r=Tt(this.options.pointLabels.callback,[e,i],this);return r||r===0?r:""}).filter((e,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?ov(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,r){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,r))}getIndexAngle(t){const e=kt/(this._pointLabels.length||1),i=this.options.startAngle||0;return xe(t*e+Xt(i))}getDistanceFromCenterForValue(t){if(st(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(st(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return vv(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const r=this.getIndexAngle(t)-Et+i;return{x:Math.cos(r)*e+this.xCenter,y:Math.sin(r)*e+this.yCenter,angle:r}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:r,bottom:a}=this._pointLabelItems[t];return{left:e,top:i,right:r,bottom:a}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),md(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:r,border:a}=e,s=this._pointLabels.length;let o,l,c;if(e.pointLabels.display&&mv(this,s),r.display&&this.ticks.forEach((u,d)=>{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const f=this.getContext(d),p=r.setContext(f),y=a.setContext(f);yv(this,p,l,s,y)}}),i.display){for(t.save(),o=s-1;o>=0;o--){const u=i.setContext(this.getPointLabelContext(o)),{color:d,lineWidth:f}=u;!f||!d||(t.lineWidth=f,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),c=this.getPointPosition(o,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const r=this.getIndexAngle(0);let a,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(r),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((o,l)=>{if(l===0&&this.min>=0&&!e.reverse)return;const c=i.setContext(this.getContext(l)),u=Rt(c.font);if(a=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,s=t.measureText(o.label).width,t.fillStyle=c.backdropColor;const d=Gt(c.backdropPadding);t.fillRect(-s/2-d.left,-a-u.size/2-d.top,s+d.width,u.size+d.height)}En(t,o.label,0,-a,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}H(qi,"id","radialLinear"),H(qi,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:wr.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),H(qi,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),H(qi,"descriptors",{angleLines:{_fallback:"grid"}});const Vr={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}},pe=Object.keys(Vr);function yd(n,t){return n-t}function vd(n,t){if(st(t))return null;const e=n._adapter,{parser:i,round:r,isoWeekday:a}=n._parseOpts;let s=t;return typeof i=="function"&&(s=i(s)),It(s)||(s=typeof i=="string"?e.parse(s,i):e.parse(s)),s===null?null:(r&&(s=r==="week"&&(un(a)||a===!0)?e.startOf(s,"isoWeek",a):e.startOf(s,r)),+s)}function bd(n,t,e,i){const r=pe.length;for(let a=pe.indexOf(n);a<r-1;++a){const s=Vr[pe[a]],o=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((e-t)/(o*s.size))<=i)return pe[a]}return pe[r-1]}function bv(n,t,e,i,r){for(let a=pe.length-1;a>=pe.indexOf(e);a--){const s=pe[a];if(Vr[s].common&&n._adapter.diff(r,i,s)>=t-1)return s}return pe[e?pe.indexOf(e):0]}function xv(n){for(let t=pe.indexOf(n)+1,e=pe.length;t<e;++t)if(Vr[pe[t]].common)return pe[t]}function xd(n,t,e){if(!e)n[t]=!0;else if(e.length){const{lo:i,hi:r}=Wa(e,t),a=e[i]>=t?e[i]:e[r];n[a]=!0}}function _v(n,t,e,i){const r=n._adapter,a=+r.startOf(t[0].value,i),s=t[t.length-1].value;let o,l;for(o=a;o<=s;o=+r.add(o,1,i))l=e[o],l>=0&&(t[l].major=!0);return t}function _d(n,t,e){const i=[],r={},a=t.length;let s,o;for(s=0;s<a;++s)o=t[s],r[o]=s,i.push({value:o,major:!1});return a===0||!e?i:_v(n,i,r,e)}class Xi extends In{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 i=t.time||(t.time={}),r=this._adapter=new uu._date(t.adapters.date);r.init(e),Si(i.displayFormats,r.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:vd(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:r,max:a,minDefined:s,maxDefined:o}=this.getUserBounds();function l(c){!s&&!isNaN(c.min)&&(r=Math.min(r,c.min)),!o&&!isNaN(c.max)&&(a=Math.max(a,c.max))}(!s||!o)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),r=It(r)&&!isNaN(r)?r:+e.startOf(Date.now(),i),a=It(a)&&!isNaN(a)?a:+e.endOf(Date.now(),i)+1,this.min=Math.min(r,a-1),this.max=Math.max(r+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,r=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const a=this.min,s=this.max,o=rg(r,a,s);return this._unit=e.unit||(i.autoSkip?bd(e.minUnit,this.min,this.max,this._getLabelCapacity(a)):bv(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:xv(this._unit),this.initOffsets(r),t.reverse&&o.reverse(),_d(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,i=0,r,a;this.options.offset&&t.length&&(r=this.getDecimalForValue(t[0]),t.length===1?e=1-r:e=(this.getDecimalForValue(t[1])-r)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?i=a:i=(a-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;e=Qt(e,0,s),i=Qt(i,0,s),this._offsets={start:e,end:i,factor:1/(e+1+i)}}_generate(){const t=this._adapter,e=this.min,i=this.max,r=this.options,a=r.time,s=a.unit||bd(a.minUnit,e,i,this._getLabelCapacity(e)),o=it(r.ticks.stepSize,1),l=s==="week"?a.isoWeekday:!1,c=un(l)||l===!0,u={};let d=e,f,p;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":s),t.diff(i,e,s)>1e5*o)throw new Error(e+" and "+i+" are too far apart with stepSize of "+o+" "+s);const y=r.ticks.source==="data"&&this.getDataTimestamps();for(f=d,p=0;f<i;f=+t.add(f,o,s),p++)xd(u,f,y);return(f===i||r.bounds==="ticks"||p===1)&&xd(u,f,y),Object.keys(u).sort(yd).map(x=>+x)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const r=this.options.time.displayFormats,a=this._unit,s=e||r[a];return this._adapter.format(t,s)}_tickFormatFunction(t,e,i,r){const a=this.options,s=a.ticks.callback;if(s)return Tt(s,[t,e,i],this);const o=a.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&o[l],d=c&&o[c],f=i[e],p=c&&d&&f&&f.major;return this._adapter.format(t,r||(p?d:u))}generateTickLabels(t){let e,i,r;for(e=0,i=t.length;e<i;++e)r=t[e],r.label=this._tickFormatFunction(r.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,r=Xt(this.isHorizontal()?e.maxRotation:e.minRotation),a=Math.cos(r),s=Math.sin(r),o=this._resolveTickFontOptions(0).size;return{w:i*a+o*s,h:i*s+o*a}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,r=i[e.unit]||i.millisecond,a=this._tickFormatFunction(t,0,_d(this,[t],this._majorUnit),r),s=this._getLabelSize(a),o=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return o>0?o:1}getDataTimestamps(){let t=this._cache.data||[],e,i;if(t.length)return t;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(e=0,i=r.length;e<i;++e)t=t.concat(r[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const r=this.getLabels();for(e=0,i=r.length;e<i;++e)t.push(vd(this,r[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return _c(t.sort(yd))}}H(Xi,"id","time"),H(Xi,"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 qr(n,t,e){let i=0,r=n.length-1,a,s,o,l;e?(t>=n[i].pos&&t<=n[r].pos&&({lo:i,hi:r}=Ve(n,"pos",t)),{pos:a,time:o}=n[i],{pos:s,time:l}=n[r]):(t>=n[i].time&&t<=n[r].time&&({lo:i,hi:r}=Ve(n,"time",t)),{time:a,pos:o}=n[i],{time:s,pos:l}=n[r]);const c=s-a;return c?o+(l-o)*(t-a)/c:o}class Ss extends Xi{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=qr(e,this.min),this._tableRange=qr(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,r=[],a=[];let s,o,l,c,u;for(s=0,o=t.length;s<o;++s)c=t[s],c>=e&&c<=i&&r.push(c);if(r.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(s=0,o=r.length;s<o;++s)u=r[s+1],l=r[s-1],c=r[s],Math.round((u+l)/2)!==c&&a.push({time:c,pos:s/(o-1)});return a}_generate(){const t=this.min,e=this.max;let i=super.getDataTimestamps();return(!i.includes(t)||!i.length)&&i.splice(0,0,t),(!i.includes(e)||i.length===1)&&i.push(e),i.sort((r,a)=>r-a)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return e.length&&i.length?t=this.normalize(e.concat(i)):t=e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(qr(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return qr(this._table,i*this._tableRange+this._minPos,!0)}}H(Ss,"id","timeseries"),H(Ss,"defaults",Xi.defaults);var wv=Object.freeze({__proto__:null,CategoryScale:xs,LinearScale:_s,LogarithmicScale:ws,RadialLinearScale:qi,TimeScale:Xi,TimeSeriesScale:Ss});const Tv=[Rm,sy,Jy,wv],Sv=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Cv=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Mv=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Dv=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],wd=(n,t,e)=>{let i=n;return typeof t=="string"||Array.isArray(t)?i=n.toLocaleString(t,e):(t===!0||e!==void 0)&&(i=n.toLocaleString(void 0,e)),i};function Cs(n,t){if(!Number.isFinite(n))throw new TypeError(`Expected a finite number, got ${typeof n}: ${n}`);t={bits:!1,binary:!1,space:!0,...t};const e=t.bits?t.binary?Dv:Mv:t.binary?Cv:Sv,i=t.space?" ":"";if(t.signed&&n===0)return` 0${i}${e[0]}`;const r=n<0,a=r?"-":t.signed?"+":"";r&&(n=-n);let s;if(t.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:t.maximumFractionDigits,...s}),n<1){const u=wd(n,t.locale,s);return a+u+i+e[0]}const o=Math.min(Math.floor(t.binary?Math.log(n)/Math.log(1024):Math.log10(n)/3),e.length-1);n/=(t.binary?1024:1e3)**o,s||(n=n.toPrecision(3));const l=wd(Number(n),t.locale,s),c=e[o];return a+l+i+c}function Ke(n){"@babel/helpers - typeof";return Ke=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ke(n)}function At(n){if(n===null||n===!0||n===!1)return NaN;var t=Number(n);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function J(n,t){if(t.length<n)throw new TypeError(n+" argument"+(n>1?"s":"")+" required, but only "+t.length+" present")}function nt(n){J(1,arguments);var t=Object.prototype.toString.call(n);return n instanceof Date||Ke(n)==="object"&&t==="[object Date]"?new Date(n.getTime()):typeof n=="number"||t==="[object Number]"?new Date(n):((typeof n=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Td(n,t){J(2,arguments);var e=nt(n),i=At(t);return isNaN(i)?new Date(NaN):(i&&e.setDate(e.getDate()+i),e)}function Ms(n,t){J(2,arguments);var e=nt(n),i=At(t);if(isNaN(i))return new Date(NaN);if(!i)return e;var r=e.getDate(),a=new Date(e.getTime());a.setMonth(e.getMonth()+i+1,0);var s=a.getDate();return r>=s?a:(e.setFullYear(a.getFullYear(),a.getMonth(),r),e)}function Gi(n,t){J(2,arguments);var e=nt(n).getTime(),i=At(t);return new Date(e+i)}var kv=36e5;function Ov(n,t){J(2,arguments);var e=At(t);return Gi(n,e*kv)}var Pv={};function yn(){return Pv}function Sd(n,t){var e,i,r,a,s,o,l,c;J(1,arguments);var u=yn(),d=At((e=(i=(r=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&e!==void 0?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=nt(n),p=f.getDay(),y=(p<d?7:0)+p-d;return f.setDate(f.getDate()-y),f.setHours(0,0,0,0),f}function Xr(n){var t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),n.getTime()-t.getTime()}function Ds(n){J(1,arguments);var t=nt(n);return t.setHours(0,0,0,0),t}var Ev=864e5;function Rv(n,t){J(2,arguments);var e=Ds(n),i=Ds(t),r=e.getTime()-Xr(e),a=i.getTime()-Xr(i);return Math.round((r-a)/Ev)}var Av=6e4;function Lv(n,t){J(2,arguments);var e=At(t);return Gi(n,e*Av)}function Iv(n,t){J(2,arguments);var e=At(t),i=e*3;return Ms(n,i)}function Nv(n,t){J(2,arguments);var e=At(t);return Gi(n,e*1e3)}function Fv(n,t){J(2,arguments);var e=At(t),i=e*7;return Td(n,i)}function Uv(n,t){J(2,arguments);var e=At(t);return Ms(n,e*12)}function Ki(n,t){J(2,arguments);var e=nt(n),i=nt(t),r=e.getTime()-i.getTime();return r<0?-1:r>0?1:r}var Gr=6e4,Qi=36e5,Bv=1e3;function Wv(n){return J(1,arguments),n instanceof Date||Ke(n)==="object"&&Object.prototype.toString.call(n)==="[object Date]"}function ks(n){if(J(1,arguments),!Wv(n)&&typeof n!="number")return!1;var t=nt(n);return!isNaN(Number(t))}function zv(n,t){J(2,arguments);var e=nt(n),i=nt(t),r=e.getFullYear()-i.getFullYear(),a=e.getMonth()-i.getMonth();return r*12+a}function Yv(n,t){J(2,arguments);var e=nt(n),i=nt(t);return e.getFullYear()-i.getFullYear()}function Cd(n,t){var e=n.getFullYear()-t.getFullYear()||n.getMonth()-t.getMonth()||n.getDate()-t.getDate()||n.getHours()-t.getHours()||n.getMinutes()-t.getMinutes()||n.getSeconds()-t.getSeconds()||n.getMilliseconds()-t.getMilliseconds();return e<0?-1:e>0?1:e}function Md(n,t){J(2,arguments);var e=nt(n),i=nt(t),r=Cd(e,i),a=Math.abs(Rv(e,i));e.setDate(e.getDate()-r*a);var s=+(Cd(e,i)===-r),o=r*(a-s);return o===0?0:o}function Kr(n,t){return J(2,arguments),nt(n).getTime()-nt(t).getTime()}var Dd={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},Hv="trunc";function Zi(n){return n?Dd[n]:Dd[Hv]}function $v(n,t,e){J(2,arguments);var i=Kr(n,t)/Qi;return Zi(e==null?void 0:e.roundingMethod)(i)}function jv(n,t,e){J(2,arguments);var i=Kr(n,t)/Gr;return Zi(e==null?void 0:e.roundingMethod)(i)}function kd(n){J(1,arguments);var t=nt(n);return t.setHours(23,59,59,999),t}function Od(n){J(1,arguments);var t=nt(n),e=t.getMonth();return t.setFullYear(t.getFullYear(),e+1,0),t.setHours(23,59,59,999),t}function Vv(n){J(1,arguments);var t=nt(n);return kd(t).getTime()===Od(t).getTime()}function Pd(n,t){J(2,arguments);var e=nt(n),i=nt(t),r=Ki(e,i),a=Math.abs(zv(e,i)),s;if(a<1)s=0;else{e.getMonth()===1&&e.getDate()>27&&e.setDate(30),e.setMonth(e.getMonth()-r*a);var o=Ki(e,i)===-r;Vv(nt(n))&&a===1&&Ki(n,i)===1&&(o=!1),s=r*(a-Number(o))}return s===0?0:s}function qv(n,t,e){J(2,arguments);var i=Pd(n,t)/3;return Zi(e==null?void 0:e.roundingMethod)(i)}function Xv(n,t,e){J(2,arguments);var i=Kr(n,t)/1e3;return Zi(e==null?void 0:e.roundingMethod)(i)}function Gv(n,t,e){J(2,arguments);var i=Md(n,t)/7;return Zi(e==null?void 0:e.roundingMethod)(i)}function Kv(n,t){J(2,arguments);var e=nt(n),i=nt(t),r=Ki(e,i),a=Math.abs(Yv(e,i));e.setFullYear(1584),i.setFullYear(1584);var s=Ki(e,i)===-r,o=r*(a-Number(s));return o===0?0:o}function Qv(n){J(1,arguments);var t=nt(n);return t.setSeconds(0,0),t}function Zv(n){J(1,arguments);var t=nt(n),e=t.getMonth(),i=e-e%3;return t.setMonth(i,1),t.setHours(0,0,0,0),t}function Jv(n){J(1,arguments);var t=nt(n);return t.setDate(1),t.setHours(0,0,0,0),t}function tb(n){J(1,arguments);var t=nt(n),e=t.getFullYear();return t.setFullYear(e+1,0,0),t.setHours(23,59,59,999),t}function eb(n){J(1,arguments);var t=nt(n),e=new Date(0);return e.setFullYear(t.getFullYear(),0,1),e.setHours(0,0,0,0),e}function nb(n){J(1,arguments);var t=nt(n);return t.setMinutes(59,59,999),t}function ib(n,t){var e,i,r,a,s,o,l,c;J(1,arguments);var u=yn(),d=At((e=(i=(r=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&e!==void 0?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=nt(n),p=f.getDay(),y=(p<d?-7:0)+6-(p-d);return f.setDate(f.getDate()+y),f.setHours(23,59,59,999),f}function rb(n){J(1,arguments);var t=nt(n);return t.setSeconds(59,999),t}function ab(n){J(1,arguments);var t=nt(n),e=t.getMonth(),i=e-e%3+3;return t.setMonth(i,0),t.setHours(23,59,59,999),t}function sb(n){J(1,arguments);var t=nt(n);return t.setMilliseconds(999),t}function Ed(n,t){J(2,arguments);var e=At(t);return Gi(n,-e)}var ob=864e5;function lb(n){J(1,arguments);var t=nt(n),e=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=t.getTime(),r=e-i;return Math.floor(r/ob)+1}function ai(n){J(1,arguments);var t=1,e=nt(n),i=e.getUTCDay(),r=(i<t?7:0)+i-t;return e.setUTCDate(e.getUTCDate()-r),e.setUTCHours(0,0,0,0),e}function Rd(n){J(1,arguments);var t=nt(n),e=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(e+1,0,4),i.setUTCHours(0,0,0,0);var r=ai(i),a=new Date(0);a.setUTCFullYear(e,0,4),a.setUTCHours(0,0,0,0);var s=ai(a);return t.getTime()>=r.getTime()?e+1:t.getTime()>=s.getTime()?e:e-1}function cb(n){J(1,arguments);var t=Rd(n),e=new Date(0);e.setUTCFullYear(t,0,4),e.setUTCHours(0,0,0,0);var i=ai(e);return i}var ub=6048e5;function Ad(n){J(1,arguments);var t=nt(n),e=ai(t).getTime()-cb(t).getTime();return Math.round(e/ub)+1}function Fn(n,t){var e,i,r,a,s,o,l,c;J(1,arguments);var u=yn(),d=At((e=(i=(r=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&e!==void 0?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=nt(n),p=f.getUTCDay(),y=(p<d?7:0)+p-d;return f.setUTCDate(f.getUTCDate()-y),f.setUTCHours(0,0,0,0),f}function Os(n,t){var e,i,r,a,s,o,l,c;J(1,arguments);var u=nt(n),d=u.getUTCFullYear(),f=yn(),p=At((e=(i=(r=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&r!==void 0?r:f.firstWeekContainsDate)!==null&&i!==void 0?i:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&e!==void 0?e:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(d+1,0,p),y.setUTCHours(0,0,0,0);var x=Fn(y,t),g=new Date(0);g.setUTCFullYear(d,0,p),g.setUTCHours(0,0,0,0);var m=Fn(g,t);return u.getTime()>=x.getTime()?d+1:u.getTime()>=m.getTime()?d:d-1}function db(n,t){var e,i,r,a,s,o,l,c;J(1,arguments);var u=yn(),d=At((e=(i=(r=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&r!==void 0?r:u.firstWeekContainsDate)!==null&&i!==void 0?i:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&e!==void 0?e:1),f=Os(n,t),p=new Date(0);p.setUTCFullYear(f,0,d),p.setUTCHours(0,0,0,0);var y=Fn(p,t);return y}var fb=6048e5;function Ld(n,t){J(1,arguments);var e=nt(n),i=Fn(e,t).getTime()-db(e,t).getTime();return Math.round(i/fb)+1}function Ct(n,t){for(var e=n<0?"-":"",i=Math.abs(n).toString();i.length<t;)i="0"+i;return e+i}var hb={y:function(t,e){var i=t.getUTCFullYear(),r=i>0?i:1-i;return Ct(e==="yy"?r%100:r,e.length)},M:function(t,e){var i=t.getUTCMonth();return e==="M"?String(i+1):Ct(i+1,2)},d:function(t,e){return Ct(t.getUTCDate(),e.length)},a:function(t,e){var i=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];case"aaaa":default:return i==="am"?"a.m.":"p.m."}},h:function(t,e){return Ct(t.getUTCHours()%12||12,e.length)},H:function(t,e){return Ct(t.getUTCHours(),e.length)},m:function(t,e){return Ct(t.getUTCMinutes(),e.length)},s:function(t,e){return Ct(t.getUTCSeconds(),e.length)},S:function(t,e){var i=e.length,r=t.getUTCMilliseconds(),a=Math.floor(r*Math.pow(10,i-3));return Ct(a,e.length)}};const vn=hb;var si={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},pb={G:function(t,e,i){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(r,{width:"abbreviated"});case"GGGGG":return i.era(r,{width:"narrow"});case"GGGG":default:return i.era(r,{width:"wide"})}},y:function(t,e,i){if(e==="yo"){var r=t.getUTCFullYear(),a=r>0?r:1-r;return i.ordinalNumber(a,{unit:"year"})}return vn.y(t,e)},Y:function(t,e,i,r){var a=Os(t,r),s=a>0?a:1-a;if(e==="YY"){var o=s%100;return Ct(o,2)}return e==="Yo"?i.ordinalNumber(s,{unit:"year"}):Ct(s,e.length)},R:function(t,e){var i=Rd(t);return Ct(i,e.length)},u:function(t,e){var i=t.getUTCFullYear();return Ct(i,e.length)},Q:function(t,e,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return Ct(r,2);case"Qo":return i.ordinalNumber(r,{unit:"quarter"});case"QQQ":return i.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return Ct(r,2);case"qo":return i.ordinalNumber(r,{unit:"quarter"});case"qqq":return i.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,i){var r=t.getUTCMonth();switch(e){case"M":case"MM":return vn.M(t,e);case"Mo":return i.ordinalNumber(r+1,{unit:"month"});case"MMM":return i.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,i){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return Ct(r+1,2);case"Lo":return i.ordinalNumber(r+1,{unit:"month"});case"LLL":return i.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,i,r){var a=Ld(t,r);return e==="wo"?i.ordinalNumber(a,{unit:"week"}):Ct(a,e.length)},I:function(t,e,i){var r=Ad(t);return e==="Io"?i.ordinalNumber(r,{unit:"week"}):Ct(r,e.length)},d:function(t,e,i){return e==="do"?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):vn.d(t,e)},D:function(t,e,i){var r=lb(t);return e==="Do"?i.ordinalNumber(r,{unit:"dayOfYear"}):Ct(r,e.length)},E:function(t,e,i){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(r,{width:"short",context:"formatting"});case"EEEE":default:return i.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,i,r){var a=t.getUTCDay(),s=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Ct(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(a,{width:"short",context:"formatting"});case"eeee":default:return i.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,i,r){var a=t.getUTCDay(),s=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Ct(s,e.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(a,{width:"narrow",context:"standalone"});case"cccccc":return i.day(a,{width:"short",context:"standalone"});case"cccc":default:return i.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,i){var r=t.getUTCDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return Ct(a,e.length);case"io":return i.ordinalNumber(a,{unit:"day"});case"iii":return i.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(r,{width:"short",context:"formatting"});case"iiii":default:return i.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,i){var r=t.getUTCHours(),a=r/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,i){var r=t.getUTCHours(),a;switch(r===12?a=si.noon:r===0?a=si.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,i){var r=t.getUTCHours(),a;switch(r>=17?a=si.evening:r>=12?a=si.afternoon:r>=4?a=si.morning:a=si.night,e){case"B":case"BB":case"BBB":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,i){if(e==="ho"){var r=t.getUTCHours()%12;return r===0&&(r=12),i.ordinalNumber(r,{unit:"hour"})}return vn.h(t,e)},H:function(t,e,i){return e==="Ho"?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):vn.H(t,e)},K:function(t,e,i){var r=t.getUTCHours()%12;return e==="Ko"?i.ordinalNumber(r,{unit:"hour"}):Ct(r,e.length)},k:function(t,e,i){var r=t.getUTCHours();return r===0&&(r=24),e==="ko"?i.ordinalNumber(r,{unit:"hour"}):Ct(r,e.length)},m:function(t,e,i){return e==="mo"?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):vn.m(t,e)},s:function(t,e,i){return e==="so"?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):vn.s(t,e)},S:function(t,e){return vn.S(t,e)},X:function(t,e,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();if(s===0)return"Z";switch(e){case"X":return Nd(s);case"XXXX":case"XX":return Un(s);case"XXXXX":case"XXX":default:return Un(s,":")}},x:function(t,e,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();switch(e){case"x":return Nd(s);case"xxxx":case"xx":return Un(s);case"xxxxx":case"xxx":default:return Un(s,":")}},O:function(t,e,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Id(s,":");case"OOOO":default:return"GMT"+Un(s,":")}},z:function(t,e,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Id(s,":");case"zzzz":default:return"GMT"+Un(s,":")}},t:function(t,e,i,r){var a=r._originalDate||t,s=Math.floor(a.getTime()/1e3);return Ct(s,e.length)},T:function(t,e,i,r){var a=r._originalDate||t,s=a.getTime();return Ct(s,e.length)}};function Id(n,t){var e=n>0?"-":"+",i=Math.abs(n),r=Math.floor(i/60),a=i%60;if(a===0)return e+String(r);var s=t||"";return e+String(r)+s+Ct(a,2)}function Nd(n,t){if(n%60===0){var e=n>0?"-":"+";return e+Ct(Math.abs(n)/60,2)}return Un(n,t)}function Un(n,t){var e=t||"",i=n>0?"-":"+",r=Math.abs(n),a=Ct(Math.floor(r/60),2),s=Ct(r%60,2);return i+a+e+s}var Fd=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},Ud=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},gb=function(t,e){var i=t.match(/(P+)(p+)?/)||[],r=i[1],a=i[2];if(!a)return Fd(t,e);var s;switch(r){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",Fd(r,e)).replace("{{time}}",Ud(a,e))},Ps={p:Ud,P:gb},mb=["D","DD"],yb=["YY","YYYY"];function Bd(n){return mb.indexOf(n)!==-1}function Wd(n){return yb.indexOf(n)!==-1}function Qr(n,t,e){if(n==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var vb={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},bb=function(t,e,i){var r,a=vb[t];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),i!=null&&i.addSuffix?i.comparison&&i.comparison>0?"in "+r:r+" ago":r};const xb=bb;function Es(n){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.width?String(t.width):n.defaultWidth,i=n.formats[e]||n.formats[n.defaultWidth];return i}}var _b={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},wb={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Tb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Sb={date:Es({formats:_b,defaultWidth:"full"}),time:Es({formats:wb,defaultWidth:"full"}),dateTime:Es({formats:Tb,defaultWidth:"full"})};const Cb=Sb;var Mb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Db=function(t,e,i,r){return Mb[t]};const kb=Db;function Ji(n){return function(t,e){var i=e!=null&&e.context?String(e.context):"standalone",r;if(i==="formatting"&&n.formattingValues){var a=n.defaultFormattingWidth||n.defaultWidth,s=e!=null&&e.width?String(e.width):a;r=n.formattingValues[s]||n.formattingValues[a]}else{var o=n.defaultWidth,l=e!=null&&e.width?String(e.width):n.defaultWidth;r=n.values[l]||n.values[o]}var c=n.argumentCallback?n.argumentCallback(t):t;return r[c]}}var Ob={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Pb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Eb={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Rb={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Ab={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Lb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Ib=function(t,e){var i=Number(t),r=i%100;if(r>20||r<10)switch(r%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},Nb={ordinalNumber:Ib,era:Ji({values:Ob,defaultWidth:"wide"}),quarter:Ji({values:Pb,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Ji({values:Eb,defaultWidth:"wide"}),day:Ji({values:Rb,defaultWidth:"wide"}),dayPeriod:Ji({values:Ab,defaultWidth:"wide",formattingValues:Lb,defaultFormattingWidth:"wide"})};const Fb=Nb;function tr(n){return function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=e.width,r=i&&n.matchPatterns[i]||n.matchPatterns[n.defaultMatchWidth],a=t.match(r);if(!a)return null;var s=a[0],o=i&&n.parsePatterns[i]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(o)?Bb(o,function(d){return d.test(s)}):Ub(o,function(d){return d.test(s)}),c;c=n.valueCallback?n.valueCallback(l):l,c=e.valueCallback?e.valueCallback(c):c;var u=t.slice(s.length);return{value:c,rest:u}}}function Ub(n,t){for(var e in n)if(n.hasOwnProperty(e)&&t(n[e]))return e}function Bb(n,t){for(var e=0;e<n.length;e++)if(t(n[e]))return e}function Wb(n){return function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.match(n.matchPattern);if(!i)return null;var r=i[0],a=t.match(n.parsePattern);if(!a)return null;var s=n.valueCallback?n.valueCallback(a[0]):a[0];s=e.valueCallback?e.valueCallback(s):s;var o=t.slice(r.length);return{value:s,rest:o}}}var zb=/^(\d+)(th|st|nd|rd)?/i,Yb=/\d+/i,Hb={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},$b={any:[/^b/i,/^(a|c)/i]},jb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Vb={any:[/1/i,/2/i,/3/i,/4/i]},qb={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Xb={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Gb={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Kb={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Qb={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Zb={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Jb={ordinalNumber:Wb({matchPattern:zb,parsePattern:Yb,valueCallback:function(t){return parseInt(t,10)}}),era:tr({matchPatterns:Hb,defaultMatchWidth:"wide",parsePatterns:$b,defaultParseWidth:"any"}),quarter:tr({matchPatterns:jb,defaultMatchWidth:"wide",parsePatterns:Vb,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:tr({matchPatterns:qb,defaultMatchWidth:"wide",parsePatterns:Xb,defaultParseWidth:"any"}),day:tr({matchPatterns:Gb,defaultMatchWidth:"wide",parsePatterns:Kb,defaultParseWidth:"any"}),dayPeriod:tr({matchPatterns:Qb,defaultMatchWidth:"any",parsePatterns:Zb,defaultParseWidth:"any"})},tx={code:"en-US",formatDistance:xb,formatLong:Cb,formatRelative:kb,localize:Fb,match:Jb,options:{weekStartsOn:0,firstWeekContainsDate:1}};const zd=tx;var ex=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,nx=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ix=/^'([^]*?)'?$/,rx=/''/g,ax=/[a-zA-Z]/;function sx(n,t,e){var i,r,a,s,o,l,c,u,d,f,p,y,x,g,m,v,b,w;J(2,arguments);var T=String(t),M=yn(),k=(i=(r=e==null?void 0:e.locale)!==null&&r!==void 0?r:M.locale)!==null&&i!==void 0?i:zd,S=At((a=(s=(o=(l=e==null?void 0:e.firstWeekContainsDate)!==null&&l!==void 0?l:e==null||(c=e.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&o!==void 0?o:M.firstWeekContainsDate)!==null&&s!==void 0?s:(d=M.locale)===null||d===void 0||(f=d.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var C=At((p=(y=(x=(g=e==null?void 0:e.weekStartsOn)!==null&&g!==void 0?g:e==null||(m=e.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&x!==void 0?x:M.weekStartsOn)!==null&&y!==void 0?y:(b=M.locale)===null||b===void 0||(w=b.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&p!==void 0?p:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw new RangeError("locale must contain localize property");if(!k.formatLong)throw new RangeError("locale must contain formatLong property");var O=nt(n);if(!ks(O))throw new RangeError("Invalid time value");var P=Xr(O),E=Ed(O,P),F={firstWeekContainsDate:S,weekStartsOn:C,locale:k,_originalDate:O},q=T.match(nx).map(function($){var Y=$[0];if(Y==="p"||Y==="P"){var I=Ps[Y];return I($,k.formatLong)}return $}).join("").match(ex).map(function($){if($==="''")return"'";var Y=$[0];if(Y==="'")return ox($);var I=pb[Y];if(I)return!(e!=null&&e.useAdditionalWeekYearTokens)&&Wd($)&&Qr($,t,String(n)),!(e!=null&&e.useAdditionalDayOfYearTokens)&&Bd($)&&Qr($,t,String(n)),I(E,$,k.localize,F);if(Y.match(ax))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Y+"`");return $}).join("");return q}function ox(n){var t=n.match(ix);return t?t[1].replace(rx,"'"):n}function lx(n,t){if(n==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}function Yd(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,i=new Array(t);e<t;e++)i[e]=n[e];return i}function cx(n,t){if(n){if(typeof n=="string")return Yd(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Yd(n,t)}}function Hd(n,t){var e=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!e){if(Array.isArray(n)||(e=cx(n))||t&&n&&typeof n.length=="number"){e&&(n=e);var i=0,r=function(){};return{s:r,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(c){throw c},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
19
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,s=!1,o;return{s:function(){e=e.call(n)},n:function(){var c=e.next();return a=c.done,c},e:function(c){s=!0,o=c},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(s)throw o}}}}function G(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Rs(n,t){return Rs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},Rs(n,t)}function pt(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&Rs(n,t)}function Zr(n){return Zr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zr(n)}function ux(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function dx(n,t){if(t&&(Ke(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return G(n)}function gt(n){var t=ux();return function(){var i=Zr(n),r;if(t){var a=Zr(this).constructor;r=Reflect.construct(i,arguments,a)}else r=i.apply(this,arguments);return dx(this,r)}}function ft(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function fx(n,t){if(Ke(n)!=="object"||n===null)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var i=e.call(n,t||"default");if(Ke(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(n)}function $d(n){var t=fx(n,"string");return Ke(t)==="symbol"?t:String(t)}function jd(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,$d(i.key),i)}}function ht(n,t,e){return t&&jd(n.prototype,t),e&&jd(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n}function V(n,t,e){return t=$d(t),t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var hx=10,Vd=function(){function n(){ft(this,n),V(this,"priority",void 0),V(this,"subPriority",0)}return ht(n,[{key:"validate",value:function(e,i){return!0}}]),n}(),px=function(n){pt(e,n);var t=gt(e);function e(i,r,a,s,o){var l;return ft(this,e),l=t.call(this),l.value=i,l.validateValue=r,l.setValue=a,l.priority=s,o&&(l.subPriority=o),l}return ht(e,[{key:"validate",value:function(r,a){return this.validateValue(r,this.value,a)}},{key:"set",value:function(r,a,s){return this.setValue(r,a,this.value,s)}}]),e}(Vd),gx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",hx),V(G(i),"subPriority",-1),i}return ht(e,[{key:"set",value:function(r,a){if(a.timestampIsSet)return r;var s=new Date(0);return s.setFullYear(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()),s.setHours(r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()),s}}]),e}(Vd),xt=function(){function n(){ft(this,n),V(this,"incompatibleTokens",void 0),V(this,"priority",void 0),V(this,"subPriority",void 0)}return ht(n,[{key:"run",value:function(e,i,r,a){var s=this.parse(e,i,r,a);return s?{setter:new px(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}},{key:"validate",value:function(e,i,r){return!0}}]),n}(),mx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",140),V(G(i),"incompatibleTokens",["R","u","t","T"]),i}return ht(e,[{key:"parse",value:function(r,a,s){switch(a){case"G":case"GG":case"GGG":return s.era(r,{width:"abbreviated"})||s.era(r,{width:"narrow"});case"GGGGG":return s.era(r,{width:"narrow"});case"GGGG":default:return s.era(r,{width:"wide"})||s.era(r,{width:"abbreviated"})||s.era(r,{width:"narrow"})}}},{key:"set",value:function(r,a,s){return a.era=s,r.setUTCFullYear(s,0,1),r.setUTCHours(0,0,0,0),r}}]),e}(xt),Vt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Fe={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function qt(n,t){return n&&{value:t(n.value),rest:n.rest}}function Bt(n,t){var e=t.match(n);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function Ue(n,t){var e=t.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:t.slice(1)};var i=e[1]==="+"?1:-1,r=e[2]?parseInt(e[2],10):0,a=e[3]?parseInt(e[3],10):0,s=e[5]?parseInt(e[5],10):0;return{value:i*(r*Qi+a*Gr+s*Bv),rest:t.slice(e[0].length)}}function qd(n){return Bt(Vt.anyDigitsSigned,n)}function jt(n,t){switch(n){case 1:return Bt(Vt.singleDigit,t);case 2:return Bt(Vt.twoDigits,t);case 3:return Bt(Vt.threeDigits,t);case 4:return Bt(Vt.fourDigits,t);default:return Bt(new RegExp("^\\d{1,"+n+"}"),t)}}function Jr(n,t){switch(n){case 1:return Bt(Vt.singleDigitSigned,t);case 2:return Bt(Vt.twoDigitsSigned,t);case 3:return Bt(Vt.threeDigitsSigned,t);case 4:return Bt(Vt.fourDigitsSigned,t);default:return Bt(new RegExp("^-?\\d{1,"+n+"}"),t)}}function As(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Xd(n,t){var e=t>0,i=e?t:1-t,r;if(i<=50)r=n||100;else{var a=i+50,s=Math.floor(a/100)*100,o=n>=a%100;r=n+s-(o?100:0)}return e?r:1-r}function Gd(n){return n%400===0||n%4===0&&n%100!==0}var yx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",130),V(G(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return ht(e,[{key:"parse",value:function(r,a,s){var o=function(c){return{year:c,isTwoDigitYear:a==="yy"}};switch(a){case"y":return qt(jt(4,r),o);case"yo":return qt(s.ordinalNumber(r,{unit:"year"}),o);default:return qt(jt(a.length,r),o)}}},{key:"validate",value:function(r,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(r,a,s){var o=r.getUTCFullYear();if(s.isTwoDigitYear){var l=Xd(s.year,o);return r.setUTCFullYear(l,0,1),r.setUTCHours(0,0,0,0),r}var c=!("era"in a)||a.era===1?s.year:1-s.year;return r.setUTCFullYear(c,0,1),r.setUTCHours(0,0,0,0),r}}]),e}(xt),vx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",130),V(G(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return ht(e,[{key:"parse",value:function(r,a,s){var o=function(c){return{year:c,isTwoDigitYear:a==="YY"}};switch(a){case"Y":return qt(jt(4,r),o);case"Yo":return qt(s.ordinalNumber(r,{unit:"year"}),o);default:return qt(jt(a.length,r),o)}}},{key:"validate",value:function(r,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(r,a,s,o){var l=Os(r,o);if(s.isTwoDigitYear){var c=Xd(s.year,l);return r.setUTCFullYear(c,0,o.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Fn(r,o)}var u=!("era"in a)||a.era===1?s.year:1-s.year;return r.setUTCFullYear(u,0,o.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Fn(r,o)}}]),e}(xt),bx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",130),V(G(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return ht(e,[{key:"parse",value:function(r,a){return Jr(a==="R"?4:a.length,r)}},{key:"set",value:function(r,a,s){var o=new Date(0);return o.setUTCFullYear(s,0,4),o.setUTCHours(0,0,0,0),ai(o)}}]),e}(xt),xx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",130),V(G(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return ht(e,[{key:"parse",value:function(r,a){return Jr(a==="u"?4:a.length,r)}},{key:"set",value:function(r,a,s){return r.setUTCFullYear(s,0,1),r.setUTCHours(0,0,0,0),r}}]),e}(xt),_x=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",120),V(G(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return ht(e,[{key:"parse",value:function(r,a,s){switch(a){case"Q":case"QQ":return jt(a.length,r);case"Qo":return s.ordinalNumber(r,{unit:"quarter"});case"QQQ":return s.quarter(r,{width:"abbreviated",context:"formatting"})||s.quarter(r,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(r,{width:"wide",context:"formatting"})||s.quarter(r,{width:"abbreviated",context:"formatting"})||s.quarter(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=1&&a<=4}},{key:"set",value:function(r,a,s){return r.setUTCMonth((s-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),e}(xt),wx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",120),V(G(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return ht(e,[{key:"parse",value:function(r,a,s){switch(a){case"q":case"qq":return jt(a.length,r);case"qo":return s.ordinalNumber(r,{unit:"quarter"});case"qqq":return s.quarter(r,{width:"abbreviated",context:"standalone"})||s.quarter(r,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(r,{width:"wide",context:"standalone"})||s.quarter(r,{width:"abbreviated",context:"standalone"})||s.quarter(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,a){return a>=1&&a<=4}},{key:"set",value:function(r,a,s){return r.setUTCMonth((s-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),e}(xt),Tx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),V(G(i),"priority",110),i}return ht(e,[{key:"parse",value:function(r,a,s){var o=function(c){return c-1};switch(a){case"M":return qt(Bt(Vt.month,r),o);case"MM":return qt(jt(2,r),o);case"Mo":return qt(s.ordinalNumber(r,{unit:"month"}),o);case"MMM":return s.month(r,{width:"abbreviated",context:"formatting"})||s.month(r,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(r,{width:"wide",context:"formatting"})||s.month(r,{width:"abbreviated",context:"formatting"})||s.month(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=11}},{key:"set",value:function(r,a,s){return r.setUTCMonth(s,1),r.setUTCHours(0,0,0,0),r}}]),e}(xt),Sx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",110),V(G(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return ht(e,[{key:"parse",value:function(r,a,s){var o=function(c){return c-1};switch(a){case"L":return qt(Bt(Vt.month,r),o);case"LL":return qt(jt(2,r),o);case"Lo":return qt(s.ordinalNumber(r,{unit:"month"}),o);case"LLL":return s.month(r,{width:"abbreviated",context:"standalone"})||s.month(r,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(r,{width:"wide",context:"standalone"})||s.month(r,{width:"abbreviated",context:"standalone"})||s.month(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=11}},{key:"set",value:function(r,a,s){return r.setUTCMonth(s,1),r.setUTCHours(0,0,0,0),r}}]),e}(xt);function Cx(n,t,e){J(2,arguments);var i=nt(n),r=At(t),a=Ld(i,e)-r;return i.setUTCDate(i.getUTCDate()-a*7),i}var Mx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",100),V(G(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return ht(e,[{key:"parse",value:function(r,a,s){switch(a){case"w":return Bt(Vt.week,r);case"wo":return s.ordinalNumber(r,{unit:"week"});default:return jt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=53}},{key:"set",value:function(r,a,s,o){return Fn(Cx(r,s,o),o)}}]),e}(xt);function Dx(n,t){J(2,arguments);var e=nt(n),i=At(t),r=Ad(e)-i;return e.setUTCDate(e.getUTCDate()-r*7),e}var kx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",100),V(G(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return ht(e,[{key:"parse",value:function(r,a,s){switch(a){case"I":return Bt(Vt.week,r);case"Io":return s.ordinalNumber(r,{unit:"week"});default:return jt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=53}},{key:"set",value:function(r,a,s){return ai(Dx(r,s))}}]),e}(xt),Ox=[31,28,31,30,31,30,31,31,30,31,30,31],Px=[31,29,31,30,31,30,31,31,30,31,30,31],Ex=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",90),V(G(i),"subPriority",1),V(G(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return ht(e,[{key:"parse",value:function(r,a,s){switch(a){case"d":return Bt(Vt.date,r);case"do":return s.ordinalNumber(r,{unit:"date"});default:return jt(a.length,r)}}},{key:"validate",value:function(r,a){var s=r.getUTCFullYear(),o=Gd(s),l=r.getUTCMonth();return o?a>=1&&a<=Px[l]:a>=1&&a<=Ox[l]}},{key:"set",value:function(r,a,s){return r.setUTCDate(s),r.setUTCHours(0,0,0,0),r}}]),e}(xt),Rx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",90),V(G(i),"subpriority",1),V(G(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return ht(e,[{key:"parse",value:function(r,a,s){switch(a){case"D":case"DD":return Bt(Vt.dayOfYear,r);case"Do":return s.ordinalNumber(r,{unit:"date"});default:return jt(a.length,r)}}},{key:"validate",value:function(r,a){var s=r.getUTCFullYear(),o=Gd(s);return o?a>=1&&a<=366:a>=1&&a<=365}},{key:"set",value:function(r,a,s){return r.setUTCMonth(0,s),r.setUTCHours(0,0,0,0),r}}]),e}(xt);function Ls(n,t,e){var i,r,a,s,o,l,c,u;J(2,arguments);var d=yn(),f=At((i=(r=(a=(s=e==null?void 0:e.weekStartsOn)!==null&&s!==void 0?s:e==null||(o=e.locale)===null||o===void 0||(l=o.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&a!==void 0?a:d.weekStartsOn)!==null&&r!==void 0?r:(c=d.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&i!==void 0?i:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=nt(n),y=At(t),x=p.getUTCDay(),g=y%7,m=(g+7)%7,v=(m<f?7:0)+y-x;return p.setUTCDate(p.getUTCDate()+v),p}var Ax=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",90),V(G(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return ht(e,[{key:"parse",value:function(r,a,s){switch(a){case"E":case"EE":case"EEE":return s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"EEEE":default:return s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=6}},{key:"set",value:function(r,a,s,o){return r=Ls(r,s,o),r.setUTCHours(0,0,0,0),r}}]),e}(xt),Lx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",90),V(G(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return ht(e,[{key:"parse",value:function(r,a,s,o){var l=function(u){var d=Math.floor((u-1)/7)*7;return(u+o.weekStartsOn+6)%7+d};switch(a){case"e":case"ee":return qt(jt(a.length,r),l);case"eo":return qt(s.ordinalNumber(r,{unit:"day"}),l);case"eee":return s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"eeeee":return s.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"eeee":default:return s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=6}},{key:"set",value:function(r,a,s,o){return r=Ls(r,s,o),r.setUTCHours(0,0,0,0),r}}]),e}(xt),Ix=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",90),V(G(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return ht(e,[{key:"parse",value:function(r,a,s,o){var l=function(u){var d=Math.floor((u-1)/7)*7;return(u+o.weekStartsOn+6)%7+d};switch(a){case"c":case"cc":return qt(jt(a.length,r),l);case"co":return qt(s.ordinalNumber(r,{unit:"day"}),l);case"ccc":return s.day(r,{width:"abbreviated",context:"standalone"})||s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"});case"ccccc":return s.day(r,{width:"narrow",context:"standalone"});case"cccccc":return s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"});case"cccc":default:return s.day(r,{width:"wide",context:"standalone"})||s.day(r,{width:"abbreviated",context:"standalone"})||s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=6}},{key:"set",value:function(r,a,s,o){return r=Ls(r,s,o),r.setUTCHours(0,0,0,0),r}}]),e}(xt);function Nx(n,t){J(2,arguments);var e=At(t);e%7===0&&(e=e-7);var i=1,r=nt(n),a=r.getUTCDay(),s=e%7,o=(s+7)%7,l=(o<i?7:0)+e-a;return r.setUTCDate(r.getUTCDate()+l),r}var Fx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",90),V(G(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return ht(e,[{key:"parse",value:function(r,a,s){var o=function(c){return c===0?7:c};switch(a){case"i":case"ii":return jt(a.length,r);case"io":return s.ordinalNumber(r,{unit:"day"});case"iii":return qt(s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o);case"iiiii":return qt(s.day(r,{width:"narrow",context:"formatting"}),o);case"iiiiii":return qt(s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o);case"iiii":default:return qt(s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o)}}},{key:"validate",value:function(r,a){return a>=1&&a<=7}},{key:"set",value:function(r,a,s){return r=Nx(r,s),r.setUTCHours(0,0,0,0),r}}]),e}(xt),Ux=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",80),V(G(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return ht(e,[{key:"parse",value:function(r,a,s){switch(a){case"a":case"aa":case"aaa":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,a,s){return r.setUTCHours(As(s),0,0,0),r}}]),e}(xt),Bx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",80),V(G(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return ht(e,[{key:"parse",value:function(r,a,s){switch(a){case"b":case"bb":case"bbb":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,a,s){return r.setUTCHours(As(s),0,0,0),r}}]),e}(xt),Wx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",80),V(G(i),"incompatibleTokens",["a","b","t","T"]),i}return ht(e,[{key:"parse",value:function(r,a,s){switch(a){case"B":case"BB":case"BBB":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,a,s){return r.setUTCHours(As(s),0,0,0),r}}]),e}(xt),zx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",70),V(G(i),"incompatibleTokens",["H","K","k","t","T"]),i}return ht(e,[{key:"parse",value:function(r,a,s){switch(a){case"h":return Bt(Vt.hour12h,r);case"ho":return s.ordinalNumber(r,{unit:"hour"});default:return jt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=12}},{key:"set",value:function(r,a,s){var o=r.getUTCHours()>=12;return o&&s<12?r.setUTCHours(s+12,0,0,0):!o&&s===12?r.setUTCHours(0,0,0,0):r.setUTCHours(s,0,0,0),r}}]),e}(xt),Yx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",70),V(G(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return ht(e,[{key:"parse",value:function(r,a,s){switch(a){case"H":return Bt(Vt.hour23h,r);case"Ho":return s.ordinalNumber(r,{unit:"hour"});default:return jt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=23}},{key:"set",value:function(r,a,s){return r.setUTCHours(s,0,0,0),r}}]),e}(xt),Hx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",70),V(G(i),"incompatibleTokens",["h","H","k","t","T"]),i}return ht(e,[{key:"parse",value:function(r,a,s){switch(a){case"K":return Bt(Vt.hour11h,r);case"Ko":return s.ordinalNumber(r,{unit:"hour"});default:return jt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=11}},{key:"set",value:function(r,a,s){var o=r.getUTCHours()>=12;return o&&s<12?r.setUTCHours(s+12,0,0,0):r.setUTCHours(s,0,0,0),r}}]),e}(xt),$x=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",70),V(G(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return ht(e,[{key:"parse",value:function(r,a,s){switch(a){case"k":return Bt(Vt.hour24h,r);case"ko":return s.ordinalNumber(r,{unit:"hour"});default:return jt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=24}},{key:"set",value:function(r,a,s){var o=s<=24?s%24:s;return r.setUTCHours(o,0,0,0),r}}]),e}(xt),jx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",60),V(G(i),"incompatibleTokens",["t","T"]),i}return ht(e,[{key:"parse",value:function(r,a,s){switch(a){case"m":return Bt(Vt.minute,r);case"mo":return s.ordinalNumber(r,{unit:"minute"});default:return jt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=59}},{key:"set",value:function(r,a,s){return r.setUTCMinutes(s,0,0),r}}]),e}(xt),Vx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",50),V(G(i),"incompatibleTokens",["t","T"]),i}return ht(e,[{key:"parse",value:function(r,a,s){switch(a){case"s":return Bt(Vt.second,r);case"so":return s.ordinalNumber(r,{unit:"second"});default:return jt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=59}},{key:"set",value:function(r,a,s){return r.setUTCSeconds(s,0),r}}]),e}(xt),qx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",30),V(G(i),"incompatibleTokens",["t","T"]),i}return ht(e,[{key:"parse",value:function(r,a){var s=function(l){return Math.floor(l*Math.pow(10,-a.length+3))};return qt(jt(a.length,r),s)}},{key:"set",value:function(r,a,s){return r.setUTCMilliseconds(s),r}}]),e}(xt),Xx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",10),V(G(i),"incompatibleTokens",["t","T","x"]),i}return ht(e,[{key:"parse",value:function(r,a){switch(a){case"X":return Ue(Fe.basicOptionalMinutes,r);case"XX":return Ue(Fe.basic,r);case"XXXX":return Ue(Fe.basicOptionalSeconds,r);case"XXXXX":return Ue(Fe.extendedOptionalSeconds,r);case"XXX":default:return Ue(Fe.extended,r)}}},{key:"set",value:function(r,a,s){return a.timestampIsSet?r:new Date(r.getTime()-s)}}]),e}(xt),Gx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",10),V(G(i),"incompatibleTokens",["t","T","X"]),i}return ht(e,[{key:"parse",value:function(r,a){switch(a){case"x":return Ue(Fe.basicOptionalMinutes,r);case"xx":return Ue(Fe.basic,r);case"xxxx":return Ue(Fe.basicOptionalSeconds,r);case"xxxxx":return Ue(Fe.extendedOptionalSeconds,r);case"xxx":default:return Ue(Fe.extended,r)}}},{key:"set",value:function(r,a,s){return a.timestampIsSet?r:new Date(r.getTime()-s)}}]),e}(xt),Kx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",40),V(G(i),"incompatibleTokens","*"),i}return ht(e,[{key:"parse",value:function(r){return qd(r)}},{key:"set",value:function(r,a,s){return[new Date(s*1e3),{timestampIsSet:!0}]}}]),e}(xt),Qx=function(n){pt(e,n);var t=gt(e);function e(){var i;ft(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),V(G(i),"priority",20),V(G(i),"incompatibleTokens","*"),i}return ht(e,[{key:"parse",value:function(r){return qd(r)}},{key:"set",value:function(r,a,s){return[new Date(s),{timestampIsSet:!0}]}}]),e}(xt),Zx={G:new mx,y:new yx,Y:new vx,R:new bx,u:new xx,Q:new _x,q:new wx,M:new Tx,L:new Sx,w:new Mx,I:new kx,d:new Ex,D:new Rx,E:new Ax,e:new Lx,c:new Ix,i:new Fx,a:new Ux,b:new Bx,B:new Wx,h:new zx,H:new Yx,K:new Hx,k:new $x,m:new jx,s:new Vx,S:new qx,X:new Xx,x:new Gx,t:new Kx,T:new Qx},Jx=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,t_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,e_=/^'([^]*?)'?$/,n_=/''/g,i_=/\S/,r_=/[a-zA-Z]/;function a_(n,t,e,i){var r,a,s,o,l,c,u,d,f,p,y,x,g,m,v,b,w,T;J(3,arguments);var M=String(n),k=String(t),S=yn(),C=(r=(a=i==null?void 0:i.locale)!==null&&a!==void 0?a:S.locale)!==null&&r!==void 0?r:zd;if(!C.match)throw new RangeError("locale must contain match property");var O=At((s=(o=(l=(c=i==null?void 0:i.firstWeekContainsDate)!==null&&c!==void 0?c:i==null||(u=i.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&l!==void 0?l:S.firstWeekContainsDate)!==null&&o!==void 0?o:(f=S.locale)===null||f===void 0||(p=f.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&s!==void 0?s:1);if(!(O>=1&&O<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var P=At((y=(x=(g=(m=i==null?void 0:i.weekStartsOn)!==null&&m!==void 0?m:i==null||(v=i.locale)===null||v===void 0||(b=v.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&g!==void 0?g:S.weekStartsOn)!==null&&x!==void 0?x:(w=S.locale)===null||w===void 0||(T=w.options)===null||T===void 0?void 0:T.weekStartsOn)!==null&&y!==void 0?y:0);if(!(P>=0&&P<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(k==="")return M===""?nt(e):new Date(NaN);var E={firstWeekContainsDate:O,weekStartsOn:P,locale:C},F=[new gx],q=k.match(t_).map(function(N){var A=N[0];if(A in Ps){var Q=Ps[A];return Q(N,C.formatLong)}return N}).join("").match(Jx),$=[],Y=Hd(q),I;try{var rt=function(){var A=I.value;!(i!=null&&i.useAdditionalWeekYearTokens)&&Wd(A)&&Qr(A,k,n),!(i!=null&&i.useAdditionalDayOfYearTokens)&&Bd(A)&&Qr(A,k,n);var Q=A[0],X=Zx[Q];if(X){var vt=X.incompatibleTokens;if(Array.isArray(vt)){var ct=$.find(function(_t){return vt.includes(_t.token)||_t.token===Q});if(ct)throw new RangeError("The format string mustn't contain `".concat(ct.fullToken,"` and `").concat(A,"` at the same time"))}else if(X.incompatibleTokens==="*"&&$.length>0)throw new RangeError("The format string mustn't contain `".concat(A,"` and any other token at the same time"));$.push({token:Q,fullToken:A});var Ot=X.run(M,A,C.match,E);if(!Ot)return{v:new Date(NaN)};F.push(Ot.setter),M=Ot.rest}else{if(Q.match(r_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Q+"`");if(A==="''"?A="'":Q==="'"&&(A=s_(A)),M.indexOf(A)===0)M=M.slice(A.length);else return{v:new Date(NaN)}}};for(Y.s();!(I=Y.n()).done;){var B=rt();if(Ke(B)==="object")return B.v}}catch(N){Y.e(N)}finally{Y.f()}if(M.length>0&&i_.test(M))return new Date(NaN);var yt=F.map(function(N){return N.priority}).sort(function(N,A){return A-N}).filter(function(N,A,Q){return Q.indexOf(N)===A}).map(function(N){return F.filter(function(A){return A.priority===N}).sort(function(A,Q){return Q.subPriority-A.subPriority})}).map(function(N){return N[0]}),ut=nt(e);if(isNaN(ut.getTime()))return new Date(NaN);var z=Ed(ut,Xr(ut)),L={},U=Hd(yt),j;try{for(U.s();!(j=U.n()).done;){var Z=j.value;if(!Z.validate(z,E))return new Date(NaN);var K=Z.set(z,L,E);Array.isArray(K)?(z=K[0],lx(L,K[1])):z=K}}catch(N){U.e(N)}finally{U.f()}return z}function s_(n){return n.match(e_)[1].replace(n_,"'")}function o_(n){J(1,arguments);var t=nt(n);return t.setMinutes(0,0,0),t}function l_(n){J(1,arguments);var t=nt(n);return t.setMilliseconds(0),t}function c_(n){J(1,arguments);var t=n/Qi;return Math.floor(t)}function Kd(n,t){var e;J(1,arguments);var i=At((e=t==null?void 0:t.additionalDigits)!==null&&e!==void 0?e:2);if(i!==2&&i!==1&&i!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof n=="string"||Object.prototype.toString.call(n)==="[object String]"))return new Date(NaN);var r=h_(n),a;if(r.date){var s=p_(r.date,i);a=g_(s.restDateString,s.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);var o=a.getTime(),l=0,c;if(r.time&&(l=m_(r.time),isNaN(l)))return new Date(NaN);if(r.timezone){if(c=y_(r.timezone),isNaN(c))return new Date(NaN)}else{var u=new Date(o+l),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return new Date(o+l+c)}var ta={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},u_=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,d_=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,f_=/^([+-])(\d{2})(?::?(\d{2}))?$/;function h_(n){var t={},e=n.split(ta.dateTimeDelimiter),i;if(e.length>2)return t;if(/:/.test(e[0])?i=e[0]:(t.date=e[0],i=e[1],ta.timeZoneDelimiter.test(t.date)&&(t.date=n.split(ta.timeZoneDelimiter)[0],i=n.substr(t.date.length,n.length))),i){var r=ta.timezone.exec(i);r?(t.time=i.replace(r[1],""),t.timezone=r[1]):t.time=i}return t}function p_(n,t){var e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),i=n.match(e);if(!i)return{year:NaN,restDateString:""};var r=i[1]?parseInt(i[1]):null,a=i[2]?parseInt(i[2]):null;return{year:a===null?r:a*100,restDateString:n.slice((i[1]||i[2]).length)}}function g_(n,t){if(t===null)return new Date(NaN);var e=n.match(u_);if(!e)return new Date(NaN);var i=!!e[4],r=er(e[1]),a=er(e[2])-1,s=er(e[3]),o=er(e[4]),l=er(e[5])-1;if(i)return w_(t,o,l)?v_(t,o,l):new Date(NaN);var c=new Date(0);return!x_(t,a,s)||!__(t,r)?new Date(NaN):(c.setUTCFullYear(t,a,Math.max(r,s)),c)}function er(n){return n?parseInt(n):1}function m_(n){var t=n.match(d_);if(!t)return NaN;var e=Is(t[1]),i=Is(t[2]),r=Is(t[3]);return T_(e,i,r)?e*Qi+i*Gr+r*1e3:NaN}function Is(n){return n&&parseFloat(n.replace(",","."))||0}function y_(n){if(n==="Z")return 0;var t=n.match(f_);if(!t)return 0;var e=t[1]==="+"?-1:1,i=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;return S_(i,r)?e*(i*Qi+r*Gr):NaN}function v_(n,t,e){var i=new Date(0);i.setUTCFullYear(n,0,4);var r=i.getUTCDay()||7,a=(t-1)*7+e+1-r;return i.setUTCDate(i.getUTCDate()+a),i}var b_=[31,null,31,30,31,30,31,31,30,31,30,31];function Qd(n){return n%400===0||n%4===0&&n%100!==0}function x_(n,t,e){return t>=0&&t<=11&&e>=1&&e<=(b_[t]||(Qd(n)?29:28))}function __(n,t){return t>=1&&t<=(Qd(n)?366:365)}function w_(n,t,e){return t>=1&&t<=53&&e>=0&&e<=6}function T_(n,t,e){return n===24?t===0&&e===0:e>=0&&e<60&&t>=0&&t<60&&n>=0&&n<25}function S_(n,t){return t>=0&&t<=59}var ee=(n=>(n.DOUGHNUT="Doughnut",n.HORIZONTAL_BAR="HorizontalBar",n.VERTICAL_BAR="VerticalBar",n.TIMESERIES_LINE="Line",n.TIMESERIES_BAR="TimeSeriesBar",n))(ee||{}),ea=(n=>(n.GAUGE="Gauge",n.TOPN="TopN",n))(ea||{}),Wt=(n=>(n.Hidden="hidden",n.Right="right",n.Bottom="bottom",n))(Wt||{}),oi=(n=>(n.Hidden="hidden",n.SingleMetric="single",n.Full="full",n))(oi||{});const Ns=(n,t)=>{var r,a;const{tooltip:e}=t;if(e.opacity===0&&!n.locked){n.showTooltip=!1;return}const i=n.chartTooltipSortFn||((s,o)=>o.rawValue-s.rawValue);if(e.body&&!n.locked){const s=e.labelColors,o=((a=(r=t.chart.config)==null?void 0:r.options)==null?void 0:a.indexAxis)==="y"?"x":"y",l=[ee.HORIZONTAL_BAR,ee.VERTICAL_BAR].includes(n.chartType),c=[ea.GAUGE,ee.DOUGHNUT].includes(n.chartType);n.tooltipContext=l?e.dataPoints.length>1?e.dataPoints[0].label:"":e.dataPoints[0].parsed.x,n.tooltipSeries=e.dataPoints.map((u,d)=>{const f=c?u.parsed:u.parsed[o];let p;if(n.units==="bytes")p=isNaN(f)?f:Cs(f);else{const x=n.translateUnit(n.units,f);p=`${n.units==="usd"?"$":""}${f%1===0?ia.format(f):ia.format(Number(f.toFixed(_f)))} ${x}`}const y=l&&u.dataset.label!==u.label?u.dataset.label:c?u.dataset.labels[u.dataIndex]:u.dataset.label;return{backgroundColor:s[d].backgroundColor,borderColor:s[d].borderColor,label:y,value:p,rawValue:f}}).sort(i),n.left=`${e.x}px`,n.top=`${e.y}px`,n.showTooltip=!0}},C_=n=>n&&n.datasets&&n.datasets.length,M_=n=>C_(n)&&n.datasets.some(t=>t.data.length),D_=n=>M_(n)&&n.datasets.some(t=>t.data.length>1),k_=n=>D_(n)&&n.datasets.some(t=>t.data[0]&&ks(t.data[0].x)),O_=n=>k_(n)&&n.datasets.some(t=>t.data[0]&&t.data[0].x.toString().length>=13),Fs=(n,t,e)=>{const r=Math.min(t/1150,1);return n.x<e?n.x+t*.15*(1-r):n.x-t*1.15*(1-r)},P_=(n,t,e)=>n.y<e?n.y+t*.15:n.y-t*.5;function Zd(n,t){let e;return(...i)=>{clearTimeout(e),e=window.setTimeout(()=>{n(...i)},t)}}var ge=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Us={exports:{}},Jd={exports:{}};(function(n){function t(e){return e&&e.__esModule?e:{default:e}}n.exports=t,n.exports.__esModule=!0,n.exports.default=n.exports})(Jd);var zt=Jd.exports,Bs={exports:{}},Ws={exports:{}},tf={exports:{}};(function(n){function t(e){"@babel/helpers - typeof";return n.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},n.exports.__esModule=!0,n.exports.default=n.exports,t(e)}n.exports=t,n.exports.__esModule=!0,n.exports.default=n.exports})(tf);var ef=tf.exports,zs={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i,r){if(r.length<i)throw new TypeError(i+" argument"+(i>1?"s":"")+" required, but only "+r.length+" present")}n.exports=t.default})(zs,zs.exports);var ae=zs.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=e(ef),r=e(ae);function a(s){return(0,r.default)(1,arguments),s instanceof Date||(0,i.default)(s)==="object"&&Object.prototype.toString.call(s)==="[object Date]"}n.exports=t.default})(Ws,Ws.exports);var E_=Ws.exports,Ys={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=e(ef),r=e(ae);function a(s){(0,r.default)(1,arguments);var o=Object.prototype.toString.call(s);return s instanceof Date||(0,i.default)(s)==="object"&&o==="[object Date]"?new Date(s.getTime()):typeof s=="number"||o==="[object Number]"?new Date(s):((typeof s=="string"||o==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}n.exports=t.default})(Ys,Ys.exports);var Be=Ys.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(E_),r=e(Be),a=e(ae);function s(o){if((0,a.default)(1,arguments),!(0,i.default)(o)&&typeof o!="number")return!1;var l=(0,r.default)(o);return!isNaN(Number(l))}n.exports=t.default})(Bs,Bs.exports);var R_=Bs.exports,Hs={exports:{}},$s={exports:{}},js={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i){if(i===null||i===!0||i===!1)return NaN;var r=Number(i);return isNaN(r)?r:r<0?Math.ceil(r):Math.floor(r)}n.exports=t.default})(js,js.exports);var Wn=js.exports;const A_=Bn(Wn);(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(Wn),r=e(Be),a=e(ae);function s(o,l){(0,a.default)(2,arguments);var c=(0,r.default)(o).getTime(),u=(0,i.default)(l);return new Date(c+u)}n.exports=t.default})($s,$s.exports);var L_=$s.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(L_),r=e(ae),a=e(Wn);function s(o,l){(0,r.default)(2,arguments);var c=(0,a.default)(l);return(0,i.default)(o,-c)}n.exports=t.default})(Hs,Hs.exports);var I_=Hs.exports,Vs={exports:{}},qs={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(Be),r=e(ae),a=864e5;function s(o){(0,r.default)(1,arguments);var l=(0,i.default)(o),c=l.getTime();l.setUTCMonth(0,1),l.setUTCHours(0,0,0,0);var u=l.getTime(),d=c-u;return Math.floor(d/a)+1}n.exports=t.default})(qs,qs.exports);var N_=qs.exports,Xs={exports:{}},Gs={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=e(Be),r=e(ae);function a(s){(0,r.default)(1,arguments);var o=1,l=(0,i.default)(s),c=l.getUTCDay(),u=(c<o?7:0)+c-o;return l.setUTCDate(l.getUTCDate()-u),l.setUTCHours(0,0,0,0),l}n.exports=t.default})(Gs,Gs.exports);var Ks=Gs.exports,Qs={exports:{}},Zs={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(Be),r=e(ae),a=e(Ks);function s(o){(0,r.default)(1,arguments);var l=(0,i.default)(o),c=l.getUTCFullYear(),u=new Date(0);u.setUTCFullYear(c+1,0,4),u.setUTCHours(0,0,0,0);var d=(0,a.default)(u),f=new Date(0);f.setUTCFullYear(c,0,4),f.setUTCHours(0,0,0,0);var p=(0,a.default)(f);return l.getTime()>=d.getTime()?c+1:l.getTime()>=p.getTime()?c:c-1}n.exports=t.default})(Zs,Zs.exports);var nf=Zs.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(nf),r=e(Ks),a=e(ae);function s(o){(0,a.default)(1,arguments);var l=(0,i.default)(o),c=new Date(0);c.setUTCFullYear(l,0,4),c.setUTCHours(0,0,0,0);var u=(0,r.default)(c);return u}n.exports=t.default})(Qs,Qs.exports);var F_=Qs.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(Be),r=e(Ks),a=e(F_),s=e(ae),o=6048e5;function l(c){(0,s.default)(1,arguments);var u=(0,i.default)(c),d=(0,r.default)(u).getTime()-(0,a.default)(u).getTime();return Math.round(d/o)+1}n.exports=t.default})(Xs,Xs.exports);var U_=Xs.exports,Js={exports:{}},to={exports:{}},zn={};Object.defineProperty(zn,"__esModule",{value:!0}),zn.getDefaultOptions=B_,zn.setDefaultOptions=W_;var rf={};function B_(){return rf}function W_(n){rf=n}(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=e(Be),r=e(ae),a=e(Wn),s=zn;function o(l,c){var u,d,f,p,y,x,g,m;(0,r.default)(1,arguments);var v=(0,s.getDefaultOptions)(),b=(0,a.default)((u=(d=(f=(p=c==null?void 0:c.weekStartsOn)!==null&&p!==void 0?p:c==null||(y=c.locale)===null||y===void 0||(x=y.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&f!==void 0?f:v.weekStartsOn)!==null&&d!==void 0?d:(g=v.locale)===null||g===void 0||(m=g.options)===null||m===void 0?void 0:m.weekStartsOn)!==null&&u!==void 0?u:0);if(!(b>=0&&b<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var w=(0,i.default)(l),T=w.getUTCDay(),M=(T<b?7:0)+T-b;return w.setUTCDate(w.getUTCDate()-M),w.setUTCHours(0,0,0,0),w}n.exports=t.default})(to,to.exports);var eo=to.exports,no={exports:{}},io={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(Be),r=e(ae),a=e(eo),s=e(Wn),o=zn;function l(c,u){var d,f,p,y,x,g,m,v;(0,r.default)(1,arguments);var b=(0,i.default)(c),w=b.getUTCFullYear(),T=(0,o.getDefaultOptions)(),M=(0,s.default)((d=(f=(p=(y=u==null?void 0:u.firstWeekContainsDate)!==null&&y!==void 0?y:u==null||(x=u.locale)===null||x===void 0||(g=x.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&p!==void 0?p:T.firstWeekContainsDate)!==null&&f!==void 0?f:(m=T.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:1);if(!(M>=1&&M<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var k=new Date(0);k.setUTCFullYear(w+1,0,M),k.setUTCHours(0,0,0,0);var S=(0,a.default)(k,u),C=new Date(0);C.setUTCFullYear(w,0,M),C.setUTCHours(0,0,0,0);var O=(0,a.default)(C,u);return b.getTime()>=S.getTime()?w+1:b.getTime()>=O.getTime()?w:w-1}n.exports=t.default})(io,io.exports);var af=io.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(af),r=e(ae),a=e(eo),s=e(Wn),o=zn;function l(c,u){var d,f,p,y,x,g,m,v;(0,r.default)(1,arguments);var b=(0,o.getDefaultOptions)(),w=(0,s.default)((d=(f=(p=(y=u==null?void 0:u.firstWeekContainsDate)!==null&&y!==void 0?y:u==null||(x=u.locale)===null||x===void 0||(g=x.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&p!==void 0?p:b.firstWeekContainsDate)!==null&&f!==void 0?f:(m=b.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:1),T=(0,i.default)(c,u),M=new Date(0);M.setUTCFullYear(T,0,w),M.setUTCHours(0,0,0,0);var k=(0,a.default)(M,u);return k}n.exports=t.default})(no,no.exports);var z_=no.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(Be),r=e(eo),a=e(z_),s=e(ae),o=6048e5;function l(c,u){(0,s.default)(1,arguments);var d=(0,i.default)(c),f=(0,r.default)(d,u).getTime()-(0,a.default)(d,u).getTime();return Math.round(f/o)+1}n.exports=t.default})(Js,Js.exports);var Y_=Js.exports,ro={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i,r){for(var a=i<0?"-":"",s=Math.abs(i).toString();s.length<r;)s="0"+s;return a+s}n.exports=t.default})(ro,ro.exports);var sf=ro.exports,ao={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(sf),r={y:function(o,l){var c=o.getUTCFullYear(),u=c>0?c:1-c;return(0,i.default)(l==="yy"?u%100:u,l.length)},M:function(o,l){var c=o.getUTCMonth();return l==="M"?String(c+1):(0,i.default)(c+1,2)},d:function(o,l){return(0,i.default)(o.getUTCDate(),l.length)},a:function(o,l){var c=o.getUTCHours()/12>=1?"pm":"am";switch(l){case"a":case"aa":return c.toUpperCase();case"aaa":return c;case"aaaaa":return c[0];case"aaaa":default:return c==="am"?"a.m.":"p.m."}},h:function(o,l){return(0,i.default)(o.getUTCHours()%12||12,l.length)},H:function(o,l){return(0,i.default)(o.getUTCHours(),l.length)},m:function(o,l){return(0,i.default)(o.getUTCMinutes(),l.length)},s:function(o,l){return(0,i.default)(o.getUTCSeconds(),l.length)},S:function(o,l){var c=l.length,u=o.getUTCMilliseconds(),d=Math.floor(u*Math.pow(10,c-3));return(0,i.default)(d,l.length)}},a=r;t.default=a,n.exports=t.default})(ao,ao.exports);var H_=ao.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(N_),r=e(U_),a=e(nf),s=e(Y_),o=e(af),l=e(sf),c=e(H_),u={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},d={G:function(m,v,b){var w=m.getUTCFullYear()>0?1:0;switch(v){case"G":case"GG":case"GGG":return b.era(w,{width:"abbreviated"});case"GGGGG":return b.era(w,{width:"narrow"});case"GGGG":default:return b.era(w,{width:"wide"})}},y:function(m,v,b){if(v==="yo"){var w=m.getUTCFullYear(),T=w>0?w:1-w;return b.ordinalNumber(T,{unit:"year"})}return c.default.y(m,v)},Y:function(m,v,b,w){var T=(0,o.default)(m,w),M=T>0?T:1-T;if(v==="YY"){var k=M%100;return(0,l.default)(k,2)}return v==="Yo"?b.ordinalNumber(M,{unit:"year"}):(0,l.default)(M,v.length)},R:function(m,v){var b=(0,a.default)(m);return(0,l.default)(b,v.length)},u:function(m,v){var b=m.getUTCFullYear();return(0,l.default)(b,v.length)},Q:function(m,v,b){var w=Math.ceil((m.getUTCMonth()+1)/3);switch(v){case"Q":return String(w);case"QQ":return(0,l.default)(w,2);case"Qo":return b.ordinalNumber(w,{unit:"quarter"});case"QQQ":return b.quarter(w,{width:"abbreviated",context:"formatting"});case"QQQQQ":return b.quarter(w,{width:"narrow",context:"formatting"});case"QQQQ":default:return b.quarter(w,{width:"wide",context:"formatting"})}},q:function(m,v,b){var w=Math.ceil((m.getUTCMonth()+1)/3);switch(v){case"q":return String(w);case"qq":return(0,l.default)(w,2);case"qo":return b.ordinalNumber(w,{unit:"quarter"});case"qqq":return b.quarter(w,{width:"abbreviated",context:"standalone"});case"qqqqq":return b.quarter(w,{width:"narrow",context:"standalone"});case"qqqq":default:return b.quarter(w,{width:"wide",context:"standalone"})}},M:function(m,v,b){var w=m.getUTCMonth();switch(v){case"M":case"MM":return c.default.M(m,v);case"Mo":return b.ordinalNumber(w+1,{unit:"month"});case"MMM":return b.month(w,{width:"abbreviated",context:"formatting"});case"MMMMM":return b.month(w,{width:"narrow",context:"formatting"});case"MMMM":default:return b.month(w,{width:"wide",context:"formatting"})}},L:function(m,v,b){var w=m.getUTCMonth();switch(v){case"L":return String(w+1);case"LL":return(0,l.default)(w+1,2);case"Lo":return b.ordinalNumber(w+1,{unit:"month"});case"LLL":return b.month(w,{width:"abbreviated",context:"standalone"});case"LLLLL":return b.month(w,{width:"narrow",context:"standalone"});case"LLLL":default:return b.month(w,{width:"wide",context:"standalone"})}},w:function(m,v,b,w){var T=(0,s.default)(m,w);return v==="wo"?b.ordinalNumber(T,{unit:"week"}):(0,l.default)(T,v.length)},I:function(m,v,b){var w=(0,r.default)(m);return v==="Io"?b.ordinalNumber(w,{unit:"week"}):(0,l.default)(w,v.length)},d:function(m,v,b){return v==="do"?b.ordinalNumber(m.getUTCDate(),{unit:"date"}):c.default.d(m,v)},D:function(m,v,b){var w=(0,i.default)(m);return v==="Do"?b.ordinalNumber(w,{unit:"dayOfYear"}):(0,l.default)(w,v.length)},E:function(m,v,b){var w=m.getUTCDay();switch(v){case"E":case"EE":case"EEE":return b.day(w,{width:"abbreviated",context:"formatting"});case"EEEEE":return b.day(w,{width:"narrow",context:"formatting"});case"EEEEEE":return b.day(w,{width:"short",context:"formatting"});case"EEEE":default:return b.day(w,{width:"wide",context:"formatting"})}},e:function(m,v,b,w){var T=m.getUTCDay(),M=(T-w.weekStartsOn+8)%7||7;switch(v){case"e":return String(M);case"ee":return(0,l.default)(M,2);case"eo":return b.ordinalNumber(M,{unit:"day"});case"eee":return b.day(T,{width:"abbreviated",context:"formatting"});case"eeeee":return b.day(T,{width:"narrow",context:"formatting"});case"eeeeee":return b.day(T,{width:"short",context:"formatting"});case"eeee":default:return b.day(T,{width:"wide",context:"formatting"})}},c:function(m,v,b,w){var T=m.getUTCDay(),M=(T-w.weekStartsOn+8)%7||7;switch(v){case"c":return String(M);case"cc":return(0,l.default)(M,v.length);case"co":return b.ordinalNumber(M,{unit:"day"});case"ccc":return b.day(T,{width:"abbreviated",context:"standalone"});case"ccccc":return b.day(T,{width:"narrow",context:"standalone"});case"cccccc":return b.day(T,{width:"short",context:"standalone"});case"cccc":default:return b.day(T,{width:"wide",context:"standalone"})}},i:function(m,v,b){var w=m.getUTCDay(),T=w===0?7:w;switch(v){case"i":return String(T);case"ii":return(0,l.default)(T,v.length);case"io":return b.ordinalNumber(T,{unit:"day"});case"iii":return b.day(w,{width:"abbreviated",context:"formatting"});case"iiiii":return b.day(w,{width:"narrow",context:"formatting"});case"iiiiii":return b.day(w,{width:"short",context:"formatting"});case"iiii":default:return b.day(w,{width:"wide",context:"formatting"})}},a:function(m,v,b){var w=m.getUTCHours(),T=w/12>=1?"pm":"am";switch(v){case"a":case"aa":return b.dayPeriod(T,{width:"abbreviated",context:"formatting"});case"aaa":return b.dayPeriod(T,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return b.dayPeriod(T,{width:"narrow",context:"formatting"});case"aaaa":default:return b.dayPeriod(T,{width:"wide",context:"formatting"})}},b:function(m,v,b){var w=m.getUTCHours(),T;switch(w===12?T=u.noon:w===0?T=u.midnight:T=w/12>=1?"pm":"am",v){case"b":case"bb":return b.dayPeriod(T,{width:"abbreviated",context:"formatting"});case"bbb":return b.dayPeriod(T,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return b.dayPeriod(T,{width:"narrow",context:"formatting"});case"bbbb":default:return b.dayPeriod(T,{width:"wide",context:"formatting"})}},B:function(m,v,b){var w=m.getUTCHours(),T;switch(w>=17?T=u.evening:w>=12?T=u.afternoon:w>=4?T=u.morning:T=u.night,v){case"B":case"BB":case"BBB":return b.dayPeriod(T,{width:"abbreviated",context:"formatting"});case"BBBBB":return b.dayPeriod(T,{width:"narrow",context:"formatting"});case"BBBB":default:return b.dayPeriod(T,{width:"wide",context:"formatting"})}},h:function(m,v,b){if(v==="ho"){var w=m.getUTCHours()%12;return w===0&&(w=12),b.ordinalNumber(w,{unit:"hour"})}return c.default.h(m,v)},H:function(m,v,b){return v==="Ho"?b.ordinalNumber(m.getUTCHours(),{unit:"hour"}):c.default.H(m,v)},K:function(m,v,b){var w=m.getUTCHours()%12;return v==="Ko"?b.ordinalNumber(w,{unit:"hour"}):(0,l.default)(w,v.length)},k:function(m,v,b){var w=m.getUTCHours();return w===0&&(w=24),v==="ko"?b.ordinalNumber(w,{unit:"hour"}):(0,l.default)(w,v.length)},m:function(m,v,b){return v==="mo"?b.ordinalNumber(m.getUTCMinutes(),{unit:"minute"}):c.default.m(m,v)},s:function(m,v,b){return v==="so"?b.ordinalNumber(m.getUTCSeconds(),{unit:"second"}):c.default.s(m,v)},S:function(m,v){return c.default.S(m,v)},X:function(m,v,b,w){var T=w._originalDate||m,M=T.getTimezoneOffset();if(M===0)return"Z";switch(v){case"X":return p(M);case"XXXX":case"XX":return y(M);case"XXXXX":case"XXX":default:return y(M,":")}},x:function(m,v,b,w){var T=w._originalDate||m,M=T.getTimezoneOffset();switch(v){case"x":return p(M);case"xxxx":case"xx":return y(M);case"xxxxx":case"xxx":default:return y(M,":")}},O:function(m,v,b,w){var T=w._originalDate||m,M=T.getTimezoneOffset();switch(v){case"O":case"OO":case"OOO":return"GMT"+f(M,":");case"OOOO":default:return"GMT"+y(M,":")}},z:function(m,v,b,w){var T=w._originalDate||m,M=T.getTimezoneOffset();switch(v){case"z":case"zz":case"zzz":return"GMT"+f(M,":");case"zzzz":default:return"GMT"+y(M,":")}},t:function(m,v,b,w){var T=w._originalDate||m,M=Math.floor(T.getTime()/1e3);return(0,l.default)(M,v.length)},T:function(m,v,b,w){var T=w._originalDate||m,M=T.getTime();return(0,l.default)(M,v.length)}};function f(g,m){var v=g>0?"-":"+",b=Math.abs(g),w=Math.floor(b/60),T=b%60;if(T===0)return v+String(w);var M=m||"";return v+String(w)+M+(0,l.default)(T,2)}function p(g,m){if(g%60===0){var v=g>0?"-":"+";return v+(0,l.default)(Math.abs(g)/60,2)}return y(g,m)}function y(g,m){var v=m||"",b=g>0?"-":"+",w=Math.abs(g),T=(0,l.default)(Math.floor(w/60),2),M=(0,l.default)(w%60,2);return b+T+v+M}var x=d;t.default=x,n.exports=t.default})(Vs,Vs.exports);var $_=Vs.exports,so={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=function(l,c){switch(l){case"P":return c.date({width:"short"});case"PP":return c.date({width:"medium"});case"PPP":return c.date({width:"long"});case"PPPP":default:return c.date({width:"full"})}},i=function(l,c){switch(l){case"p":return c.time({width:"short"});case"pp":return c.time({width:"medium"});case"ppp":return c.time({width:"long"});case"pppp":default:return c.time({width:"full"})}},r=function(l,c){var u=l.match(/(P+)(p+)?/)||[],d=u[1],f=u[2];if(!f)return e(l,c);var p;switch(d){case"P":p=c.dateTime({width:"short"});break;case"PP":p=c.dateTime({width:"medium"});break;case"PPP":p=c.dateTime({width:"long"});break;case"PPPP":default:p=c.dateTime({width:"full"});break}return p.replace("{{date}}",e(d,c)).replace("{{time}}",i(f,c))},a={p:i,P:r},s=a;t.default=s,n.exports=t.default})(so,so.exports);var j_=so.exports,oo={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i){var r=new Date(Date.UTC(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()));return r.setUTCFullYear(i.getFullYear()),i.getTime()-r.getTime()}n.exports=t.default})(oo,oo.exports);var of=oo.exports;const lf=Bn(of);var nr={};Object.defineProperty(nr,"__esModule",{value:!0}),nr.isProtectedDayOfYearToken=X_,nr.isProtectedWeekYearToken=G_,nr.throwProtectedError=K_;var V_=["D","DD"],q_=["YY","YYYY"];function X_(n){return V_.indexOf(n)!==-1}function G_(n){return q_.indexOf(n)!==-1}function K_(n,t,e){if(n==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var lo={exports:{}},co={exports:{}},uo={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},i=function(s,o,l){var c,u=e[s];return typeof u=="string"?c=u:o===1?c=u.one:c=u.other.replace("{{count}}",o.toString()),l!=null&&l.addSuffix?l.comparison&&l.comparison>0?"in "+c:c+" ago":c},r=i;t.default=r,n.exports=t.default})(uo,uo.exports);var Q_=uo.exports,fo={exports:{}},ho={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=r.width?String(r.width):i.defaultWidth,s=i.formats[a]||i.formats[i.defaultWidth];return s}}n.exports=t.default})(ho,ho.exports);var Z_=ho.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(Z_),r={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},a={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},s={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},o={date:(0,i.default)({formats:r,defaultWidth:"full"}),time:(0,i.default)({formats:a,defaultWidth:"full"}),dateTime:(0,i.default)({formats:s,defaultWidth:"full"})},l=o;t.default=l,n.exports=t.default})(fo,fo.exports);var J_=fo.exports,po={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},i=function(s,o,l,c){return e[s]},r=i;t.default=r,n.exports=t.default})(po,po.exports);var tw=po.exports,go={exports:{}},mo={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i){return function(r,a){var s=a!=null&&a.context?String(a.context):"standalone",o;if(s==="formatting"&&i.formattingValues){var l=i.defaultFormattingWidth||i.defaultWidth,c=a!=null&&a.width?String(a.width):l;o=i.formattingValues[c]||i.formattingValues[l]}else{var u=i.defaultWidth,d=a!=null&&a.width?String(a.width):i.defaultWidth;o=i.values[d]||i.values[u]}var f=i.argumentCallback?i.argumentCallback(r):r;return o[f]}}n.exports=t.default})(mo,mo.exports);var ew=mo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(ew),r={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},a={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},s={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},o={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},l={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},c={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},u=function(y,x){var g=Number(y),m=g%100;if(m>20||m<10)switch(m%10){case 1:return g+"st";case 2:return g+"nd";case 3:return g+"rd"}return g+"th"},d={ordinalNumber:u,era:(0,i.default)({values:r,defaultWidth:"wide"}),quarter:(0,i.default)({values:a,defaultWidth:"wide",argumentCallback:function(y){return y-1}}),month:(0,i.default)({values:s,defaultWidth:"wide"}),day:(0,i.default)({values:o,defaultWidth:"wide"}),dayPeriod:(0,i.default)({values:l,defaultWidth:"wide",formattingValues:c,defaultFormattingWidth:"wide"})},f=d;t.default=f,n.exports=t.default})(go,go.exports);var nw=go.exports,yo={exports:{}},vo={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(a){return function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=o.width,c=l&&a.matchPatterns[l]||a.matchPatterns[a.defaultMatchWidth],u=s.match(c);if(!u)return null;var d=u[0],f=l&&a.parsePatterns[l]||a.parsePatterns[a.defaultParseWidth],p=Array.isArray(f)?r(f,function(g){return g.test(d)}):i(f,function(g){return g.test(d)}),y;y=a.valueCallback?a.valueCallback(p):p,y=o.valueCallback?o.valueCallback(y):y;var x=s.slice(d.length);return{value:y,rest:x}}}function i(a,s){for(var o in a)if(a.hasOwnProperty(o)&&s(a[o]))return o}function r(a,s){for(var o=0;o<a.length;o++)if(s(a[o]))return o}n.exports=t.default})(vo,vo.exports);var iw=vo.exports,bo={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i){return function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=r.match(i.matchPattern);if(!s)return null;var o=s[0],l=r.match(i.parsePattern);if(!l)return null;var c=i.valueCallback?i.valueCallback(l[0]):l[0];c=a.valueCallback?a.valueCallback(c):c;var u=r.slice(o.length);return{value:c,rest:u}}}n.exports=t.default})(bo,bo.exports);var rw=bo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(iw),r=e(rw),a=/^(\d+)(th|st|nd|rd)?/i,s=/\d+/i,o={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},l={any:[/^b/i,/^(a|c)/i]},c={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},u={any:[/1/i,/2/i,/3/i,/4/i]},d={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},f={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},p={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},y={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},x={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},g={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},m={ordinalNumber:(0,r.default)({matchPattern:a,parsePattern:s,valueCallback:function(w){return parseInt(w,10)}}),era:(0,i.default)({matchPatterns:o,defaultMatchWidth:"wide",parsePatterns:l,defaultParseWidth:"any"}),quarter:(0,i.default)({matchPatterns:c,defaultMatchWidth:"wide",parsePatterns:u,defaultParseWidth:"any",valueCallback:function(w){return w+1}}),month:(0,i.default)({matchPatterns:d,defaultMatchWidth:"wide",parsePatterns:f,defaultParseWidth:"any"}),day:(0,i.default)({matchPatterns:p,defaultMatchWidth:"wide",parsePatterns:y,defaultParseWidth:"any"}),dayPeriod:(0,i.default)({matchPatterns:x,defaultMatchWidth:"any",parsePatterns:g,defaultParseWidth:"any"})},v=m;t.default=v,n.exports=t.default})(yo,yo.exports);var aw=yo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(Q_),r=e(J_),a=e(tw),s=e(nw),o=e(aw),l={code:"en-US",formatDistance:i.default,formatLong:r.default,formatRelative:a.default,localize:s.default,match:o.default,options:{weekStartsOn:0,firstWeekContainsDate:1}},c=l;t.default=c,n.exports=t.default})(co,co.exports);var sw=co.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(sw),r=i.default;t.default=r,n.exports=t.default})(lo,lo.exports);var ow=lo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=b;var i=e(R_),r=e(I_),a=e(Be),s=e($_),o=e(j_),l=e(of),c=nr,u=e(Wn),d=e(ae),f=zn,p=e(ow),y=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,x=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,g=/^'([^]*?)'?$/,m=/''/g,v=/[a-zA-Z]/;function b(T,M,k){var S,C,O,P,E,F,q,$,Y,I,rt,B,yt,ut,z,L,U,j;(0,d.default)(2,arguments);var Z=String(M),K=(0,f.getDefaultOptions)(),N=(S=(C=k==null?void 0:k.locale)!==null&&C!==void 0?C:K.locale)!==null&&S!==void 0?S:p.default,A=(0,u.default)((O=(P=(E=(F=k==null?void 0:k.firstWeekContainsDate)!==null&&F!==void 0?F:k==null||(q=k.locale)===null||q===void 0||($=q.options)===null||$===void 0?void 0:$.firstWeekContainsDate)!==null&&E!==void 0?E:K.firstWeekContainsDate)!==null&&P!==void 0?P:(Y=K.locale)===null||Y===void 0||(I=Y.options)===null||I===void 0?void 0:I.firstWeekContainsDate)!==null&&O!==void 0?O:1);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Q=(0,u.default)((rt=(B=(yt=(ut=k==null?void 0:k.weekStartsOn)!==null&&ut!==void 0?ut:k==null||(z=k.locale)===null||z===void 0||(L=z.options)===null||L===void 0?void 0:L.weekStartsOn)!==null&&yt!==void 0?yt:K.weekStartsOn)!==null&&B!==void 0?B:(U=K.locale)===null||U===void 0||(j=U.options)===null||j===void 0?void 0:j.weekStartsOn)!==null&&rt!==void 0?rt:0);if(!(Q>=0&&Q<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!N.localize)throw new RangeError("locale must contain localize property");if(!N.formatLong)throw new RangeError("locale must contain formatLong property");var X=(0,a.default)(T);if(!(0,i.default)(X))throw new RangeError("Invalid time value");var vt=(0,l.default)(X),ct=(0,r.default)(X,vt),Ot={firstWeekContainsDate:A,weekStartsOn:Q,locale:N,_originalDate:X},_t=Z.match(x).map(function(et){var bt=et[0];if(bt==="p"||bt==="P"){var Nt=o.default[bt];return Nt(et,N.formatLong)}return et}).join("").match(y).map(function(et){if(et==="''")return"'";var bt=et[0];if(bt==="'")return w(et);var Nt=s.default[bt];if(Nt)return!(k!=null&&k.useAdditionalWeekYearTokens)&&(0,c.isProtectedWeekYearToken)(et)&&(0,c.throwProtectedError)(et,M,String(T)),!(k!=null&&k.useAdditionalDayOfYearTokens)&&(0,c.isProtectedDayOfYearToken)(et)&&(0,c.throwProtectedError)(et,M,String(T)),Nt(ct,et,N.localize,Ot);if(bt.match(v))throw new RangeError("Format string contains an unescaped latin alphabet character `"+bt+"`");return et}).join("");return _t}function w(T){var M=T.match(g);return M?M[1].replace(m,"'"):T}n.exports=t.default})(Us,Us.exports);var lw=Us.exports;const cw=Bn(lw);function cf(n,t,e){var i=fw(n,e.timeZone,e.locale);return i.formatToParts?uw(i,t):dw(i,t)}function uw(n,t){for(var e=n.formatToParts(t),i=e.length-1;i>=0;--i)if(e[i].type==="timeZoneName")return e[i].value}function dw(n,t){var e=n.format(t).replace(/\u200E/g,""),i=/ [\w-+ ]+$/.exec(e);return i?i[0].substr(1):""}function fw(n,t,e){if(e&&!e.code)throw new Error("date-fns-tz error: Please set a language code on the locale object imported from date-fns, e.g. `locale.code = 'en-US'`");return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:t,timeZoneName:n})}function hw(n,t){var e=yw(t);return e.formatToParts?gw(e,n):mw(e,n)}var pw={year:0,month:1,day:2,hour:3,minute:4,second:5};function gw(n,t){try{for(var e=n.formatToParts(t),i=[],r=0;r<e.length;r++){var a=pw[e[r].type];a>=0&&(i[a]=parseInt(e[r].value,10))}return i}catch(s){if(s instanceof RangeError)return[NaN];throw s}}function mw(n,t){var e=n.format(t),i=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e);return[i[3],i[1],i[2],i[4],i[5],i[6]]}var xo={};function yw(n){if(!xo[n]){var t=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),e=t==="06/25/2014, 00:00:00"||t==="06/25/2014 00:00:00";xo[n]=e?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return xo[n]}function uf(n,t,e,i,r,a,s){var o=new Date(0);return o.setUTCFullYear(n,t,e),o.setUTCHours(i,r,a,s),o}var df=36e5,vw=6e4,_o={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function wo(n,t,e){var i,r;if(!n||(i=_o.timezoneZ.exec(n),i))return 0;var a;if(i=_o.timezoneHH.exec(n),i)return a=parseInt(i[1],10),ff(a)?-(a*df):NaN;if(i=_o.timezoneHHMM.exec(n),i){a=parseInt(i[2],10);var s=parseInt(i[3],10);return ff(a,s)?(r=Math.abs(a)*df+s*vw,i[1]==="+"?-r:r):NaN}if(_w(n)){t=new Date(t||Date.now());var o=e?t:bw(t),l=To(o,n),c=e?l:xw(t,l,n);return-c}return NaN}function bw(n){return uf(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function To(n,t){var e=hw(n,t),i=uf(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime(),r=n.getTime(),a=r%1e3;return r-=a>=0?a:1e3+a,i-r}function xw(n,t,e){var i=n.getTime(),r=i-t,a=To(new Date(r),e);if(t===a)return t;r-=a-t;var s=To(new Date(r),e);return a===s?a:Math.max(a,s)}function ff(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}var hf={};function _w(n){if(hf[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),hf[n]=!0,!0}catch{return!1}}var ww=60*1e3,Tw={X:function(n,t,e,i){var r=So(i.timeZone,n);if(r===0)return"Z";switch(t){case"X":return pf(r);case"XXXX":case"XX":return li(r);case"XXXXX":case"XXX":default:return li(r,":")}},x:function(n,t,e,i){var r=So(i.timeZone,n);switch(t){case"x":return pf(r);case"xxxx":case"xx":return li(r);case"xxxxx":case"xxx":default:return li(r,":")}},O:function(n,t,e,i){var r=So(i.timeZone,n);switch(t){case"O":case"OO":case"OOO":return"GMT"+Sw(r,":");case"OOOO":default:return"GMT"+li(r,":")}},z:function(n,t,e,i){switch(t){case"z":case"zz":case"zzz":return cf("short",n,i);case"zzzz":default:return cf("long",n,i)}}};function So(n,t){var e=n?wo(n,t,!0)/ww:t.getTimezoneOffset();if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+n);return e}function na(n,t){for(var e=n<0?"-":"",i=Math.abs(n).toString();i.length<t;)i="0"+i;return e+i}function li(n,t){var e=t||"",i=n>0?"-":"+",r=Math.abs(n),a=na(Math.floor(r/60),2),s=na(Math.floor(r%60),2);return i+a+e+s}function pf(n,t){if(n%60===0){var e=n>0?"-":"+";return e+na(Math.abs(n)/60,2)}return li(n,t)}function Sw(n,t){var e=n>0?"-":"+",i=Math.abs(n),r=Math.floor(i/60),a=i%60;if(a===0)return e+String(r);var s=t||"";return e+String(r)+s+na(a,2)}var Cw=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Co=36e5,gf=6e4,Mw=2,se={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:Cw};function mf(n,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(n===null)return new Date(NaN);var e=t||{},i=e.additionalDigits==null?Mw:A_(e.additionalDigits);if(i!==2&&i!==1&&i!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]")return new Date(n.getTime());if(typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]")return new Date(n);if(!(typeof n=="string"||Object.prototype.toString.call(n)==="[object String]"))return new Date(NaN);var r=Dw(n),a=kw(r.date,i),s=a.year,o=a.restDateString,l=Ow(o,s);if(isNaN(l))return new Date(NaN);if(l){var c=l.getTime(),u=0,d;if(r.time&&(u=Pw(r.time),isNaN(u)))return new Date(NaN);if(r.timeZone||e.timeZone){if(d=wo(r.timeZone||e.timeZone,new Date(c+u)),isNaN(d))return new Date(NaN)}else d=lf(new Date(c+u)),d=lf(new Date(c+u+d));return new Date(c+u+d)}else return new Date(NaN)}function Dw(n){var t={},e=se.dateTimePattern.exec(n),i;if(e?(t.date=e[1],i=e[3]):(e=se.datePattern.exec(n),e?(t.date=e[1],i=e[2]):(t.date=null,i=n)),i){var r=se.timeZone.exec(i);r?(t.time=i.replace(r[1],""),t.timeZone=r[1].trim()):t.time=i}return t}function kw(n,t){var e=se.YYY[t],i=se.YYYYY[t],r;if(r=se.YYYY.exec(n)||i.exec(n),r){var a=r[1];return{year:parseInt(a,10),restDateString:n.slice(a.length)}}if(r=se.YY.exec(n)||e.exec(n),r){var s=r[1];return{year:parseInt(s,10)*100,restDateString:n.slice(s.length)}}return{year:null}}function Ow(n,t){if(t===null)return null;var e,i,r,a;if(n.length===0)return i=new Date(0),i.setUTCFullYear(t),i;if(e=se.MM.exec(n),e)return i=new Date(0),r=parseInt(e[1],10)-1,bf(t,r)?(i.setUTCFullYear(t,r),i):new Date(NaN);if(e=se.DDD.exec(n),e){i=new Date(0);var s=parseInt(e[1],10);return Aw(t,s)?(i.setUTCFullYear(t,0,s),i):new Date(NaN)}if(e=se.MMDD.exec(n),e){i=new Date(0),r=parseInt(e[1],10)-1;var o=parseInt(e[2],10);return bf(t,r,o)?(i.setUTCFullYear(t,r,o),i):new Date(NaN)}if(e=se.Www.exec(n),e)return a=parseInt(e[1],10)-1,xf(t,a)?yf(t,a):new Date(NaN);if(e=se.WwwD.exec(n),e){a=parseInt(e[1],10)-1;var l=parseInt(e[2],10)-1;return xf(t,a,l)?yf(t,a,l):new Date(NaN)}return null}function Pw(n){var t,e,i;if(t=se.HH.exec(n),t)return e=parseFloat(t[1].replace(",",".")),Mo(e)?e%24*Co:NaN;if(t=se.HHMM.exec(n),t)return e=parseInt(t[1],10),i=parseFloat(t[2].replace(",",".")),Mo(e,i)?e%24*Co+i*gf:NaN;if(t=se.HHMMSS.exec(n),t){e=parseInt(t[1],10),i=parseInt(t[2],10);var r=parseFloat(t[3].replace(",","."));return Mo(e,i,r)?e%24*Co+i*gf+r*1e3:NaN}return null}function yf(n,t,e){t=t||0,e=e||0;var i=new Date(0);i.setUTCFullYear(n,0,4);var r=i.getUTCDay()||7,a=t*7+e+1-r;return i.setUTCDate(i.getUTCDate()+a),i}var Ew=[31,28,31,30,31,30,31,31,30,31,30,31],Rw=[31,29,31,30,31,30,31,31,30,31,30,31];function vf(n){return n%400===0||n%4===0&&n%100!==0}function bf(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;var i=vf(n);if(i&&e>Rw[t]||!i&&e>Ew[t])return!1}return!0}function Aw(n,t){if(t<1)return!1;var e=vf(n);return!(e&&t>366||!e&&t>365)}function xf(n,t,e){return!(t<0||t>52||e!=null&&(e<0||e>6))}function Mo(n,t,e){return!(n!=null&&(n<0||n>=25)||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}var Lw=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function Do(n,t,e){var i=String(t),r=e||{},a=i.match(Lw);if(a){var s=mf(r.originalDate||n,r);i=a.reduce(function(o,l){if(l[0]==="'")return o;var c=o.indexOf(l),u=o[c-1]==="'",d=o.replace(l,"'"+Tw[l[0]](s,l,null,r)+"'");return u?d.substring(0,c-1)+d.substring(c+1):d},i)}return cw(n,i,r)}var ko={exports:{}},Oo={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i,r){if(i==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(i[a]=r[a]);return i}n.exports=t.default})(Oo,Oo.exports);var Iw=Oo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=e(Iw);function r(a){return(0,i.default)({},a)}n.exports=t.default})(ko,ko.exports);var Nw=ko.exports;const Fw=Bn(Nw);function Uw(n,t,e){var i=mf(n,e),r=wo(t,i,!0),a=new Date(i.getTime()-r),s=new Date(0);return s.setFullYear(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()),s.setHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()),s}function Bw(n,t,e,i){var r=Fw(i);return r.timeZone=t,r.originalDate=n,Do(Uw(n,t),e,r)}const _f=2,wf=10,Tf=12,ia=new Intl.NumberFormat(((op=document==null?void 0:document.documentElement)==null?void 0:op.lang)||"en-US");function ra(n,t={}){if(!n)return n;const e=t.tz||Intl.DateTimeFormat().resolvedOptions().timeZone;try{let i="MMM dd, YYY hh:mm a";t.short&&(i="MMM dd, YYY"),t.includeTZ&&(i+=" (z)");const r=new Date(n);return Bw(r,e,i)}catch{return console.error("Invalid value passed to formatTime",n),"(invalid date)"}}const aa=10,Sf={"1XXCount|1XX|1[0-9][0-9]":{solid:"#0072E5",light:"#4DA6FF",description:"Informational"},"SuccessfulRequests|2XXCount|2XX|2[0-9][0-9]|SUCCESS":{solid:"#0BB652",light:"#6FCC83",description:"Success"},"3XXCount|3XX|3[0-9][0-9]":{solid:"#FDC53B",light:"#FFD982",description:"Redirection"},"4XXCount|4XX|4[0-9][0-9]":{solid:"#FE9439",light:"#FFBA81",description:"Client Errors"},"5XXCount|5XX|5[0-9][0-9]":{solid:"#FF4545",light:"#FF8484",description:"Server Errors"},"errorCount|FailedRequests|FAILURE":{solid:"#FF4545",light:"#FF8484",description:"Server Errors"},nonStandard:{solid:"#6f7787",light:"#e7e7ec"},standard:{solid:"#1155cb",light:"#8ab3fa"},p99:{solid:"#1356cb",light:"#1356cb"},p95:{solid:"#1fbecd",light:"#1fbecd"},p50:{solid:"#1df97d",light:"#1df97d"},LatencyP99:{solid:"#1356cb",light:"#1356cb"},LatencyP95:{solid:"#1fbecd",light:"#1fbecd"},LatencyP50:{solid:"#1df97d",light:"#1df97d"}},Qe=["#a86cd5","#6a86d2","#00bbf9","#00c4b0","#ffdf15"],ci=(n,t)=>(t||Qe)[n%Qe.length],Cf=(n,t)=>{n[0]==="#"&&(n=n.slice(1));let e=parseInt(n.substring(0,2),16),i=parseInt(n.substring(2,4),16),r=parseInt(n.substring(4,6),16);e=e-t,i=i-t,r=r-t,e>255?e=255:e<0&&(e=0),i>255?i=255:i<0&&(i=0),r>255?r=255:r<0&&(r=0);const a=e.toString(16).length===1?"0"+e.toString(16):e.toString(16),s=i.toString(16).length===1?"0"+i.toString(16):i.toString(16),o=r.toString(16).length===1?"0"+r.toString(16):r.toString(16);return`#${a}${s}${o}`},Mf="#6f7787",Df={100:{background:"#f0f5fd",text:"#10599e"},200:{background:"#e5f7f4",text:"#1b6955"},300:{background:"#fff1d5",text:"#a06027"},400:{background:"#fee3b6",text:"#944d19"},500:{background:"#fedada",text:"#852021"}},Ww=n=>{var e;const t=Math.floor(parseInt(n,10)/100)*100;return((e=Df[t])==null?void 0:e.background)||"#fafafa"},zw={SUCCESS:"#6FCC83",FAILURE:"#FF8484"},Yw={"4XX":"#FFBA81","5XX":"#FF8484"},Hw={LatencyP99:"#1356cb",LatencyP95:"#1fbecd",LatencyP50:"#1df97d"},$w="#dad4c7",jw=n=>{const t=Object.entries(Sf).find(([e])=>new RegExp(e).test(n));return t&&t[1]||Sf.standard},Vw={lineTension:0,pointBorderWidth:1.2,borderJoinStyle:"round",fill:!0},qw=2,Xw=0,Po=new Map,Eo=(n,t)=>t==="bytes"?Cs(n):t==="count/minute"?n.toFixed(2):ia.format(n),kf=n=>{const e=document.createElement("canvas").getContext("2d"),i=Rt({});return e.font=i.string,e.measureText(n).width},Gw=()=>{const n="label_height";if(!Po.has(n)){const t=Rt({});Po.set(n,t.lineHeight)}return Po.get(n)},Kw=n=>n.datasets.reduce((t,e)=>t+e.data.reduce((i,r)=>isNaN(r)?i:i+r,0),0),Of=(n,t)=>t.datasets.reduce((e,i,r)=>n.isDatasetVisible(r)?e+i.data.reduce((a,s)=>isNaN(s)?a:a+s,0):e,0),Pf=(n,t)=>t===0?" (0.0%)":` (${(n/t*100).toFixed(1)}%)`,Ro="#e0e4ea",Qw={100:["#c8e2fd","#80bfff","#4da6ff","#1a8cff","#0072e5","#0059b2"],200:["#ceedd2","#9edca6","#89d595","#6fcc83","#44c26b","#0bb652","#0ca84a","#169643","#196e33","#1b572a"],300:["#fff4db","#ffe9b8","#ffe2a1","#ffd982","#ffd062","#fdc53b","#f4bb1e","#e8b00b","#d9a30f","#c89407"],400:["#ffead8","#ffd5b1","#ffc899","#ffba81","#ffae6b","#fe9439","#f6871d","#eb7c0c","#da700c","#cc6100"],500:["#ffd5d5","#ffb6b6","#ff9d9d","#ff8484","#ff6a6a","#ff4545","#fb1f1f","#e90b0b","#d40202","#be0202"]},ir=(n,t)=>{let e=1;const i=Qw[n],r=new Map;for(const a of t)r.set(a,i[e]),e=e%(i.length-1)+1;return r.set(-1,i[0]),r},Ef=new Map([[100,ir("100",[100,101,102,103])],[200,ir("200",[200,201,202,203,204,205,206,207,208,226])],[300,ir("300",[300,301,302,303,304,305,307,308])],[400,ir("400",[400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,421,422,423,424,425,426,428,429,431,451])],[500,ir("500",[500,501,502,503,504,505,506,507,508,510,511])]]),Ao=n=>{const t=parseInt(n,10),e=Math.floor(t/100)*100,i=Ef.get(e);return i===void 0?Ro:i.get(t)??i.get(-1)??Ro},Zw=n=>{const t=Ao(n);return{solid:t,light:t}},sa={...Array.from({length:500},(n,t)=>100+t).reduce((n,t)=>(n[`${t}`]=Ao(`${t}`),n),{}),____OTHER____:"#DAD4C7","1XX":"#4DA6FF","2XX":"#6FCC83","3XX":"#FFD982","4XX":"#FFBA81","5XX":"#FF8484"};function Jw(n){const t={enabled:!1,position:"barChartTooltipPosition",callbacks:{label:r=>({label:r.dataset.label,value:r.label})}};$r.positioners.barChartTooltipPosition=function(r,a){if(!r.length)return!1;const s=this.chart.canvas.getBoundingClientRect(),o=n.tooltipState.width||this.width,l=s.width/2,c=Fs(a,o,l),u=a.y,d=a.x<l?"left":"center";return{x:c-n.tooltipState.offsetX,y:u-n.tooltipState.offsetY,xAlign:d}},os.modes.customInteractionMode=function(r,a){const s=hn(a,r),o=[];return os.evaluateInteractionItems(r,r.options.indexAxis||"x",s,(l,c,u)=>{r.options.indexAxis==="y"&&l.inYRange(s.y,!0)&&r.data.datasets[c].data[u]&&o.push({element:l,datasetIndex:c,index:u}),r.options.indexAxis==="x"&&l.inXRange(s.x,!0)&&r.data.datasets[c].data[u]&&o.push({element:l,datasetIndex:c,index:u})}),o};const e=n.numLabels.value>25?wf:Tf;return h.computed(()=>{var r,a,s,o,l,c,u,d;return{indexAxis:n.indexAxis,skipNull:!0,scales:{x:{border:{display:!1},stacked:n.stacked.value,grid:{display:!1,drawBorder:!1},ticks:{maxRotation:90,autoSkip:!1,font:e,callback:function(f,p){const y=this;if(y.chart.options.indexAxis===y.axis){f=y.getLabelForValue(p);const x=10;return f&&f.length>x?f.slice(0,x)+"...":f}return y.getLabelForValue(Number(f))}},title:{display:n.indexAxis==="y"?!st((r=n.metricAxesTitle)==null?void 0:r.value):!st((a=n.dimensionAxesTitle)==null?void 0:a.value),text:n.indexAxis==="y"?(s=n.metricAxesTitle)==null?void 0:s.value:(o=n.dimensionAxesTitle)==null?void 0:o.value,padding:{top:10},font:{weight:"bold"}}},y:{border:{display:!1},stacked:n.stacked.value,beginAtZero:!0,grid:{display:!1,drawBorder:!1},ticks:{font:e,callback:function(f,p){const y=this;return y.chart.options.indexAxis===y.axis?(f=y.getLabelForValue(p),f&&f.length>aa?f.slice(0,aa)+"...":f):y.getLabelForValue(Number(f))}},title:{display:n.indexAxis==="x"?!st((l=n.metricAxesTitle)==null?void 0:l.value):!st((c=n.dimensionAxesTitle)==null?void 0:c.value),text:n.indexAxis==="x"?(u=n.metricAxesTitle)==null?void 0:u.value:(d=n.dimensionAxesTitle)==null?void 0:d.value,padding:{bottom:20},font:{weight:"bold"}}}},plugins:{htmlLegend:{containerID:n.legendID},legend:{display:!1},tooltip:{...t,external:f=>{Ns(n.tooltipState,f)}}},interaction:{mode:"customInteractionMode",intersect:!0},maxBarThickness:60,maintainAspectRatio:!1}})}Se.register(...Tv);const t1=(n,t)=>{const e=t.datasets.map(r=>r.label),i=n.datasets.map(r=>r.label);return n.datasets.length===t.datasets.length&&e.every((r,a)=>r===i[a])};function e1(n,t,e,i,r){const a=h.shallowRef(null),s=(o,l)=>{if(t.value)return new Se(t.value,{type:n,data:o,plugins:i,options:l})};return h.onMounted(()=>{a.value=s(e.value,r.value)}),h.onBeforeUnmount(()=>{st(a.value)||a.value.destroy()}),h.watch(e,(o,l)=>{if(t1(l,o)&&!st(a.value)){for(const[c,u]of o.datasets.entries())Object.assign(a.value.data.datasets[c],u);a.value.data.labels=o.labels,a.value.update()}else st(a.value)||a.value.destroy(),a.value=s(o,r.value)}),h.watch(t,()=>{st(a.value)||a.value.destroy(),a.value=s(e.value,r.value)}),h.watch(r,(o,l)=>{(o.indexAxis!==l.indexAxis||JSON.stringify(o.scales.x.title)!==JSON.stringify(l.scales.x.title)||JSON.stringify(o.scales.y.title)!==JSON.stringify(l.scales.y.title))&&(st(a.value)||a.value.destroy(),a.value=s(e.value,o))}),a}var Rf={exports:{}};(function(n){(function(){function t(c,u){if(u.separator===!1||c<1e3)return c.toString();var d=typeof u.separator=="string"?u.separator:",",f=[],p=Math.round(c).toString().split("");return p.reverse().forEach(function(y,x){x&&x%3===0&&f.push(d),f.push(y)}),f.reverse().join("")}function e(c,u,d){var f=c/u,p=d.round?"round":"floor";return d.decimal===!1?(c=Math[p](f),c.toString()):(d.precision?c=f:c=f<10?Math[p](f*10)/10:Math[p](f),c=c.toString(),typeof d.decimal=="string"&&(c=c.replace(".",d.decimal)),c)}var i=1e3,r=1e4,a=1e6,s=1e9,o=1e12;function l(c,u){var d;u=u||{};var f=c<0;f&&(c=Math.abs(c)),u.precision&&(c=parseFloat(c.toPrecision(u.precision)));var p=u.min10k?r:i;return c<p||u.precision&&u.precision>Math.log10(c)?d=t(e(c,1,u),u):c<a?d=e(c,i,u)+"k":c<s?d=e(c,a,u)+"m":c<o?d=t(e(c,s,u),u)+"b":d=t(e(c,o,u),u)+"t",f&&(d="-"+d),u.capital&&(d=d.toUpperCase()),u.prefix&&(d=u.prefix+d),u.suffix&&(d=d+u.suffix),d}l.addCommas=t,n.exports=l})()})(Rf);var n1=Rf.exports;const rr=Bn(n1);function i1(n,t,e){const{i18n:i}=Mt.useI18n(),{translateUnit:r}=Mt.useTranslatedUnits();return{legendValues:h.computed(()=>n.value.datasets.reduce((s,o)=>{const l=o.total?o.total:o.data.reduce((u,d)=>u+(typeof d=="number"?Number(d)||0:Number(d&&d.y)||0),0);let c;if(e.value==="bytes")c=isNaN(l)?"0":Cs(l);else{const u=r(e.value,l);c=i&&i.t("legend.datapointValueDisplay",{value:rr(l,{capital:!0,...e.value==="usd"&&{prefix:"$"}}),unit:u})||`${rr(l,{capital:!0,...e.value==="usd"&&{prefix:"$"}})} ${e.value}`}return{...s,[o.label]:{raw:l,formatted:c}}},{}))}}function r1(n){return h.computed(()=>{var r;if(!((r=n.value)!=null&&r.meta))return"";const e=n.value.meta.start_ms,i=n.value.meta.end_ms;return e&&i?`${ra(e)} - ${ra(i,{includeTZ:!0})}`:""})}function a1(n){const t={enabled:!1,position:"doughnutChartTooltipPosition",callbacks:{label:i=>({label:i.dataset.label,value:i.label})}};return $r.positioners.doughnutChartTooltipPosition=function(i,r){if(!i.length)return!1;const a=this.chart.canvas.getBoundingClientRect(),s=n.tooltipState.width||this.width,o=a.width/2,l=Fs(r,s,o),c=r.y,u=r.x<o?"left":"center";return{x:l-n.tooltipState.offsetX,y:c,xAlign:u}},{options:h.computed(()=>({responsive:!0,maintainAspectRatio:!1,plugins:{htmlLegend:{containerID:n.legendID},legend:{display:!1},tooltip:{...t,external:i=>{Ns(n.tooltipState,i)}}}}))}}function s1(n){const t=h.computed(()=>{var l,c;return{type:"timeseries",display:!0,grid:{display:!0,drawOnChartArea:!1,drawTicks:!0,drawBorder:!1},ticks:{padding:10,autoSkipPadding:100,source:"auto",maxRotation:0},title:{display:!st((l=n.dimensionAxesTitle)==null?void 0:l.value),text:(c=n.dimensionAxesTitle)==null?void 0:c.value,padding:{top:2},font:{weight:"bold"}}}}),e=h.computed(()=>{var l,c;return{title:{display:!st((l=n.metricAxesTitle)==null?void 0:l.value),text:(c=n.metricAxesTitle)==null?void 0:c.value,padding:{bottom:10},font:{weight:"bold"}},ticks:{maxTicksLimit:5},grid:{drawBorder:!1},id:"main-y-axis",beginAtZero:!0}}),i={enabled:!1,position:"lineChartTooltipPosition"};$r.positioners.lineChartTooltipPosition=function(l,c){if(!l.length||n.tooltipState.locked)return!1;const u=this.chart.canvas.getBoundingClientRect(),d=n.tooltipState.width||this.width,f=n.tooltipState.height||this.height,p=u.width/2,y=u.height/2,x=Fs(c,d,p);let g=P_(c,f,y);const m=c.y<y?"top":"bottom",v=c.x<p?"left":"center";return f>u.height&&(g=0),{x,y:g,xAlign:v,yAlign:m}};const r=h.computed(()=>{switch(n.granularity.value){case"minutely":return"minute";case"hourly":return"hour";case"daily":return"day";default:return"day"}}),a=h.computed(()=>c_(Number(n.timeRangeMs.value))>=24?"yyyy-MM-dd h:mm":"h:mm"),s=h.computed(()=>["daily","weekly"].includes(n.granularity.value)?"yyyy-MM-dd":"yyyy-MM-dd h:mm");return{options:h.computed(()=>({hover:{mode:"index",intersect:!1},elements:{point:{radius:0,hitRadius:4,hoverRadius:4}},animation:{duration:250,easing:"linear"},scales:{x:{border:{display:!1},...t.value,stacked:n.stacked.value,time:{tooltipFormat:"h:mm:ss a",unit:r.value,displayFormats:{minute:"h:mm:ss a",hour:a.value,day:s.value}}},y:{border:{display:!1},...e.value,stacked:n.stacked.value}},responsive:!0,maintainAspectRatio:!1,plugins:{htmlLegend:{containerID:n.legendID},legend:{display:!1},streaming:!1,tooltip:{...i,external:l=>{Ns(n.tooltipState,l)}}},interaction:{mode:"index",intersect:!1}}))}}function o1(n){const{isMultiMetric:t,hasDimensions:e,metricNames:i,barSegmentLabels:r,pivotRecords:a,rowLabels:s,colorPalette:o}=n,{i18n:l}=Mt.useI18n();return t?i.map(u=>({label:l&&l.te(`chartLabels.${u}`)&&l.t(`chartLabels.${u}`)||u,backgroundColor:ci(i.indexOf(u),Qe),data:s.map((d,f)=>e?a[`${d.id},${u}`]||0:a[`${f},${u}`]||null)})):Array.from(r).flatMap((u,d)=>{if(!u)return[];const f={},p=Array.isArray(o)?ci(d,o):o[u.name]||ci(d);return f[u.name]=p,{label:l&&l.te(`chartLabels.${u.name}`)&&l.t(`chartLabels.${u.name}`)||u.name,backgroundColor:p,data:s.map(y=>a[`${y.id},${u.id}`]||null)}})}function l1(n,t){const{i18n:e}=Mt.useI18n();return h.computed(()=>{try{if(t.value&&"meta"in t.value&&"data"in t.value){const r=t.value.data,{display:a,metric_names:s}=t.value.meta,o=a&&Object.keys(a),l=s&&s.length>1,c=a&&o&&o.length>0;if(!r.length||!s)return{datasets:[],labels:[]};const u=c&&o||s,d=u[0],f=u.length>1?u[1]:u[0],p=Object.fromEntries(l?r.flatMap(M=>s.map((k,S)=>{const C=M.event[d],O=c?`${C},${k}`:`${S},${k}`,P=M.event[k];return[O,P]})):r.map(M=>{const k=c?`${M.event[d]},${M.event[f]}`:`${d},${f}`,S=M.event[s[0]];return[k,S]})),y=Object.entries(p).sort(([,M],[,k])=>Number(k)-Number(M)).map(([M])=>M.split(",")[0]),x=a[d],g=a[f],m=c&&x&&Object.entries(x).map(([M,k])=>({id:M,name:k.name}))||s.map(M=>({id:M,name:M})),v=c&&g&&Object.entries(g).map(([M,k])=>({id:M,name:k.name}))||s.map(M=>({id:M,name:M}));if(d!=="status_code"&&d!=="status_code_grouped"&&(m.sort((M,k)=>y.indexOf(M.id)-y.indexOf(k.id)),v.sort((M,k)=>y.indexOf(M.id)-y.indexOf(k.id))),!m||!v)return{labels:[],datasets:[]};const b=o1({isMultiMetric:l,hasDimensions:c,metricNames:s,dimensionFieldNames:u,barSegmentLabels:v,pivotRecords:p,rowLabels:m,colorPalette:n.colorPalette||Qe});return{labels:c?m.map(M=>e&&e.te(`chartLabels.${M.name}`)&&e.t(`chartLabels.${M.name}`)||M.name):s.map(M=>e&&e.te(`chartLabels.${M}`)&&e.t(`chartLabels.${M}`)||M),datasets:b}}}catch(r){return console.error(r),{datasets:[],labels:[]}}return{labels:[],datasets:[]}})}const c1=(n,t,e=1)=>Array(Math.ceil((t-n)/e)).fill(n).map((i,r)=>i+r*e),u1=n=>{if(typeof n=="string"){const t=+n;if(t)return t;try{return Kd(n).getTime()}catch(e){if(e instanceof RangeError)return 0;throw e}}return n},d1=(n,t,e,i,r)=>{const s=Math.max(t-6e4,Math.max(...(r||[]).map(c=>new Date(c.timestamp).valueOf()))),o=Math.floor((n-i)/e)*e+i,l=Math.floor((s-i)/e)*e+i+e;return c1(o,l,e)};function f1(n,t){const{i18n:e}=Mt.useI18n();return h.computed(()=>{try{if(t.value&&"meta"in t.value&&"data"in t.value){const r=t.value.data,{display:a,metric_names:s,start_ms:o,end_ms:l}=t.value.meta;if(!s)return console.error("Cannot build chart data from this explore result. Missing metric names."),{datasets:[]};const c=a&&Object.keys(a)||s,u=c&&c[0],d=a[u],f=a&&d&&Object.keys(d).map(T=>({id:T,name:d[T].name}))||s.map(T=>({id:T,name:T})),p=t.value.meta.granularity_ms;if(typeof p!="number"||isNaN(p)||!isFinite(p)||p===0)return console.error("Invalid step value:",p),{datasets:[],labels:[]};if(!r.length)return{datasets:[],labels:[]};const y=u1(o),x=d1(o,l,p,y,r),g=new Set,m=r!=null&&r.length?r.reduce((T,M)=>{const k=new Date(M.timestamp).valueOf(),S=M.event;for(const C of s)g.add(C),k in T||(T[k]={}),C in T[k]||(T[k][C]={});for(const C of s)f.forEach(O=>{S[u]===O.id||C===O.id?(T[k][C]||(T[k][C]={}),T[k][C][O.name]=Math.round(Number(S[C])*1e3)/1e3):c.length||(T[k][C]||(T[k][C]={}),T[k][C][O.name]=Math.round(Number(S[O.id])*1e3)/1e3)});return T},{}):{},v=s.length===1?s.flatMap(T=>f.map(M=>[T,M.name])):f.map(T=>[T.name,T.name]),b={},w=[...v].map(([T,M],k)=>{const S=x.map(E=>E in m&&T in m[E]?{x:E,y:m[E][T][M]||0}:{x:E,y:0});let{colorPalette:C,fill:O}=n;st(C)&&(C=Qe);const P=Array.isArray(C)?ci(k,C):C[M]||ci(k);return b[M]=P,{rawDimension:M,rawMetric:T,label:e&&e.te(`chartLabels.${M}`)&&e.t(`chartLabels.${M}`)||M,borderColor:P,backgroundColor:P,data:S,total:S.reduce((E,{y:F})=>E+Number(F),0),...Vw,fill:O,borderWidth:O?Xw:qw}});return w.sort((T,M)=>Number(T.total)<Number(M.total)?-1:1),{datasets:w,colorMap:b}}}catch(r){return console.error(r),{labels:[],datasets:[]}}return{labels:[],datasets:[]}})}const h1=(n,t)=>{h.watch([n,t],(e,i,r)=>{const[a,s]=e;!s||!window||(window._AnalyticsChartDataInternal||(window._AnalyticsChartDataInternal=new Map),window._AnalyticsChartDataInternal.set(s,a),r(()=>{var o;(o=window._AnalyticsChartDataInternal)==null||o.delete(s)}))},{immediate:!0})};function p1(){const{i18n:n}=Mt.useI18n();return{translateUnit:(e,i)=>{const r=i===1,a=`chartUnits.${e}`;return e==="usd"?"":n.te(a)?n.t(a,{plural:r?"":"s"}):e}}}const Mt={useBarChartOptions:Jw,useChartJSCommon:e1,useChartLegendValues:i1,useChartSelectedRange:r1,useExploreResultToDatasets:l1,useExploreResultToTimeDataset:f1,useDoughnutChartOptions:a1,useLinechartOptions:s1,useI18n:wp,useReportChartDataForSynthetics:h1,useTranslatedUnits:p1};/*!
|
|
18
|
+
`):n}function Xy(n,t){const{element:e,datasetIndex:r,index:i}=t,a=n.getDatasetMeta(r).controller,{label:s,value:o}=a.getLabelAndValue(i);return{chart:n,label:s,parsed:a.getParsed(i),raw:n.data.datasets[r].data[i],formattedValue:o,dataset:a.getDataset(),dataIndex:i,datasetIndex:r,element:e}}function sd(n,t){const e=n.chart.ctx,{body:r,footer:i,title:a}=n,{boxWidth:s,boxHeight:o}=t,l=Rt(t.bodyFont),c=Rt(t.titleFont),u=Rt(t.footerFont),d=a.length,f=i.length,p=r.length,y=Gt(t.padding);let x=y.height,g=0,m=r.reduce((w,T)=>w+T.before.length+T.lines.length+T.after.length,0);if(m+=n.beforeBody.length+n.afterBody.length,d&&(x+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),m){const w=t.displayColors?Math.max(o,l.lineHeight):l.lineHeight;x+=p*w+(m-p)*l.lineHeight+(m-1)*t.bodySpacing}f&&(x+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let v=0;const b=function(w){g=Math.max(g,e.measureText(w).width+v)};return e.save(),e.font=c.string,St(n.title,b),e.font=l.string,St(n.beforeBody.concat(n.afterBody),b),v=t.displayColors?s+2+t.boxPadding:0,St(r,w=>{St(w.before,b),St(w.lines,b),St(w.after,b)}),v=0,e.font=u.string,St(n.footer,b),e.restore(),g+=y.width,{width:g,height:x}}function Gy(n,t){const{y:e,height:r}=t;return e<r/2?"top":e>n.height-r/2?"bottom":"center"}function Ky(n,t,e,r){const{x:i,width:a}=r,s=e.caretSize+e.caretPadding;if(n==="left"&&i+a+s>t.width||n==="right"&&i-a-s<0)return!0}function Qy(n,t,e,r){const{x:i,width:a}=e,{width:s,chartArea:{left:o,right:l}}=n;let c="center";return r==="center"?c=i<=(o+l)/2?"left":"right":i<=a/2?c="left":i>=s-a/2&&(c="right"),Ky(c,n,t,e)&&(c="center"),c}function od(n,t,e){const r=e.yAlign||t.yAlign||Gy(n,e);return{xAlign:e.xAlign||t.xAlign||Qy(n,t,e,r),yAlign:r}}function Zy(n,t){let{x:e,width:r}=n;return t==="right"?e-=r:t==="center"&&(e-=r/2),e}function Jy(n,t,e){let{y:r,height:i}=n;return t==="top"?r+=e:t==="bottom"?r-=i+e:r-=i/2,r}function ld(n,t,e,r){const{caretSize:i,caretPadding:a,cornerRadius:s}=n,{xAlign:o,yAlign:l}=e,c=i+a,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=dn(s);let y=Zy(t,o);const x=Jy(t,l,c);return l==="center"?o==="left"?y+=c:o==="right"&&(y-=c):o==="left"?y-=Math.max(u,f)+i:o==="right"&&(y+=Math.max(d,p)+i),{x:Qt(y,0,r.width-t.width),y:Qt(x,0,r.height-t.height)}}function Hi(n,t,e){const r=Gt(e.padding);return t==="center"?n.x+n.width/2:t==="right"?n.x+n.width-r.right:n.x+r.left}function cd(n){return Ne([],Ge(n))}function tv(n,t,e){return fn(n,{tooltip:t,tooltipItems:e,type:"tooltip"})}function ud(n,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?n.override(e):n}const dd={beforeTitle:$e,title(n){if(n.length>0){const t=n[0],e=t.chart.data.labels,r=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return e[t.dataIndex]}return""},afterTitle:$e,beforeBody:$e,beforeLabel:$e,label(n){if(this&&this.options&&this.options.mode==="dataset")return n.label+": "+n.formattedValue||n.formattedValue;let t=n.dataset.label||"";t&&(t+=": ");const e=n.formattedValue;return st(e)||(t+=e),t},labelColor(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.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(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:$e,afterBody:$e,beforeFooter:$e,footer:$e,afterFooter:$e};function he(n,t,e,r){const i=n[t].call(e,r);return typeof i>"u"?dd[t].call(e,r):i}class bs extends te{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,r=this.options.setContext(this.getContext()),i=r.enabled&&e.options.animation&&r.animations,a=new Ja(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=tv(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:r}=e,i=he(r,"beforeTitle",this,t),a=he(r,"title",this,t),s=he(r,"afterTitle",this,t);let o=[];return o=Ne(o,Ge(i)),o=Ne(o,Ge(a)),o=Ne(o,Ge(s)),o}getBeforeBody(t,e){return cd(he(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:r}=e,i=[];return St(t,a=>{const s={before:[],lines:[],after:[]},o=ud(r,a);Ne(s.before,Ge(he(o,"beforeLabel",this,a))),Ne(s.lines,he(o,"label",this,a)),Ne(s.after,Ge(he(o,"afterLabel",this,a))),i.push(s)}),i}getAfterBody(t,e){return cd(he(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:r}=e,i=he(r,"beforeFooter",this,t),a=he(r,"footer",this,t),s=he(r,"afterFooter",this,t);let o=[];return o=Ne(o,Ge(i)),o=Ne(o,Ge(a)),o=Ne(o,Ge(s)),o}_createItems(t){const e=this._active,r=this.chart.data,i=[],a=[],s=[];let o=[],l,c;for(l=0,c=e.length;l<c;++l)o.push(Xy(this.chart,e[l]));return t.filter&&(o=o.filter((u,d,f)=>t.filter(u,d,f,r))),t.itemSort&&(o=o.sort((u,d)=>t.itemSort(u,d,r))),St(o,u=>{const d=ud(t.callbacks,u);i.push(he(d,"labelColor",this,u)),a.push(he(d,"labelPointStyle",this,u)),s.push(he(d,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=a,this.labelTextColors=s,this.dataPoints=o,o}update(t,e){const r=this.options.setContext(this.getContext()),i=this._active;let a,s=[];if(!i.length)this.opacity!==0&&(a={opacity:0});else{const o=jr[r.position].call(this,i,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);const l=this._size=sd(this,r),c=Object.assign({},o,l),u=od(this.chart,r,c),d=ld(r,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,a={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:o.x,caretY:o.y}}this._tooltipItems=s,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,r,i){const a=this.getCaretPosition(t,r,i);e.lineTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.lineTo(a.x3,a.y3)}getCaretPosition(t,e,r){const{xAlign:i,yAlign:a}=this,{caretSize:s,cornerRadius:o}=r,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=dn(o),{x:f,y:p}=t,{width:y,height:x}=e;let g,m,v,b,w,T;return a==="center"?(w=p+x/2,i==="left"?(g=f,m=g-s,b=w+s,T=w-s):(g=f+y,m=g+s,b=w-s,T=w+s),v=g):(i==="left"?m=f+Math.max(l,u)+s:i==="right"?m=f+y-Math.max(c,d)-s:m=this.caretX,a==="top"?(b=p,w=b-s,g=m-s,v=m+s):(b=p+x,w=b+s,g=m+s,v=m-s),T=b),{x1:g,x2:m,x3:v,y1:b,y2:w,y3:T}}drawTitle(t,e,r){const i=this.title,a=i.length;let s,o,l;if(a){const c=rr(r.rtl,this.x,this.width);for(t.x=Hi(this,r.titleAlign,r),e.textAlign=c.textAlign(r.titleAlign),e.textBaseline="middle",s=Rt(r.titleFont),o=r.titleSpacing,e.fillStyle=r.titleColor,e.font=s.string,l=0;l<a;++l)e.fillText(i[l],c.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+o,l+1===a&&(t.y+=r.titleMarginBottom-o)}}_drawColorBox(t,e,r,i,a){const s=this.labelColors[r],o=this.labelPointStyles[r],{boxHeight:l,boxWidth:c}=a,u=Rt(a.bodyFont),d=Hi(this,"left",a),f=i.x(d),p=l<u.lineHeight?(u.lineHeight-l)/2:0,y=e.y+p;if(a.usePointStyle){const x={radius:Math.min(c,l)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},g=i.leftForLtr(f,c)+c/2,m=y+l/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,Va(t,x,g,m),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,Va(t,x,g,m)}else{t.lineWidth=lt(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const x=i.leftForLtr(f,c),g=i.leftForLtr(i.xPlus(f,1),c-2),m=dn(s.borderRadius);Object.values(m).some(v=>v!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,tr(t,{x,y,w:c,h:l,radius:m}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),tr(t,{x:g,y:y+1,w:c-2,h:l-2,radius:m}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(x,y,c,l),t.strokeRect(x,y,c,l),t.fillStyle=s.backgroundColor,t.fillRect(g,y+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,e,r){const{body:i}=this,{bodySpacing:a,bodyAlign:s,displayColors:o,boxHeight:l,boxWidth:c,boxPadding:u}=r,d=Rt(r.bodyFont);let f=d.lineHeight,p=0;const y=rr(r.rtl,this.x,this.width),x=function(S){e.fillText(S,y.x(t.x+p),t.y+f/2),t.y+=f+a},g=y.textAlign(s);let m,v,b,w,T,M,k;for(e.textAlign=s,e.textBaseline="middle",e.font=d.string,t.x=Hi(this,g,r),e.fillStyle=r.bodyColor,St(this.beforeBody,x),p=o&&g!=="right"?s==="center"?c/2+u:c+2+u:0,w=0,M=i.length;w<M;++w){for(m=i[w],v=this.labelTextColors[w],e.fillStyle=v,St(m.before,x),b=m.lines,o&&b.length&&(this._drawColorBox(e,t,w,y,r),f=Math.max(d.lineHeight,l)),T=0,k=b.length;T<k;++T)x(b[T]),f=d.lineHeight;St(m.after,x)}p=0,f=d.lineHeight,St(this.afterBody,x),t.y-=a}drawFooter(t,e,r){const i=this.footer,a=i.length;let s,o;if(a){const l=rr(r.rtl,this.x,this.width);for(t.x=Hi(this,r.footerAlign,r),t.y+=r.footerMarginTop,e.textAlign=l.textAlign(r.footerAlign),e.textBaseline="middle",s=Rt(r.footerFont),e.fillStyle=r.footerColor,e.font=s.string,o=0;o<a;++o)e.fillText(i[o],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+r.footerSpacing}}drawBackground(t,e,r,i){const{xAlign:a,yAlign:s}=this,{x:o,y:l}=t,{width:c,height:u}=r,{topLeft:d,topRight:f,bottomLeft:p,bottomRight:y}=dn(i.cornerRadius);e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth,e.beginPath(),e.moveTo(o+d,l),s==="top"&&this.drawCaret(t,e,r,i),e.lineTo(o+c-f,l),e.quadraticCurveTo(o+c,l,o+c,l+f),s==="center"&&a==="right"&&this.drawCaret(t,e,r,i),e.lineTo(o+c,l+u-y),e.quadraticCurveTo(o+c,l+u,o+c-y,l+u),s==="bottom"&&this.drawCaret(t,e,r,i),e.lineTo(o+p,l+u),e.quadraticCurveTo(o,l+u,o,l+u-p),s==="center"&&a==="left"&&this.drawCaret(t,e,r,i),e.lineTo(o,l+d),e.quadraticCurveTo(o,l,o+d,l),e.closePath(),e.fill(),i.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,r=this.$animations,i=r&&r.x,a=r&&r.y;if(i||a){const s=jr[t.position].call(this,this._active,this._eventPosition);if(!s)return;const o=this._size=sd(this,t),l=Object.assign({},s,this._size),c=od(e,t,l),u=ld(t,l,c,e);(i._to!==u.x||a._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=o.width,this.height=o.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(e);const i={width:this.width,height:this.height},a={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const s=Gt(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=r,this.drawBackground(a,t,i,e),jc(t,e.textDirection),a.y+=s.top,this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),Vc(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const r=this._active,i=t.map(({datasetIndex:o,index:l})=>{const c=this.chart.getDatasetMeta(o);if(!c)throw new Error("Cannot find a dataset at index "+o);return{datasetIndex:o,element:c.data[l],index:l}}),a=!mi(r,i),s=this._positionChanged(i,e);(a||s)&&(this._active=i,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,r=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,a=this._active||[],s=this._getActiveElements(t,a,e,r),o=this._positionChanged(s,t),l=e||!mi(s,a)||o;return l&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,r,i){const a=this.options;if(t.type==="mouseout")return[];if(!i)return e.filter(o=>this.chart.data.datasets[o.datasetIndex]&&this.chart.getDatasetMeta(o.datasetIndex).controller.getParsed(o.index)!==void 0);const s=this.chart.getElementsAtEventForMode(t,a.mode,a,r);return a.reverse&&s.reverse(),s}_positionChanged(t,e){const{caretX:r,caretY:i,options:a}=this,s=jr[a.position].call(this,t,e);return s!==!1&&(r!==s.x||i!==s.y)}}H(bs,"positioners",jr);var $i={id:"tooltip",_element:bs,positioners:jr,afterInit(n,t,e){e&&(n.tooltip=new bs({chart:n,options:e}))},beforeUpdate(n,t,e){n.tooltip&&n.tooltip.initialize(e)},reset(n,t,e){n.tooltip&&n.tooltip.initialize(e)},afterDraw(n){const t=n.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(n.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",e)}},afterEvent(n,t){if(n.tooltip){const e=t.replay;n.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:(n,t)=>t.bodyFont.size,boxWidth:(n,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:dd},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:n=>n!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},ev=Object.freeze({__proto__:null,Colors:py,Decimation:vy,Filler:Uy,Legend:$y,SubTitle:qy,Title:Vy,Tooltip:$i});const nv=(n,t,e,r)=>(typeof t=="string"?(e=n.push(t)-1,r.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function rv(n,t,e,r){const i=n.indexOf(t);if(i===-1)return nv(n,t,e,r);const a=n.lastIndexOf(t);return i!==a?e:i}const iv=(n,t)=>n===null?null:Qt(Math.round(n),0,t);function fd(n){const t=this.getLabels();return n>=0&&n<t.length?t[n]:n}class xs extends In{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const r=this.getLabels();for(const{index:i,label:a}of e)r[i]===a&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(st(t))return null;const r=this.getLabels();return e=isFinite(e)&&r[e]===t?e:rv(r,t,rt(e,t),this._addedLabels),iv(e,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),e||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,e=this.max,r=this.options.offset,i=[];let a=this.getLabels();a=t===0&&e===a.length-1?a:a.slice(t,e+1),this._valueRange=Math.max(a.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let s=t;s<=e;s++)i.push({value:s});return i}getLabelForValue(t){return fd.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}}H(xs,"id","category"),H(xs,"defaults",{ticks:{callback:fd}});function av(n,t){const e=[],{bounds:i,step:a,min:s,max:o,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=n,p=a||1,y=u-1,{min:x,max:g}=t,m=!st(s),v=!st(o),b=!st(c),w=(g-x)/(d+1);let T=mc((g-x)/y/p)*p,M,k,S,C;if(T<1e-14&&!m&&!v)return[{value:x},{value:g}];C=Math.ceil(g/T)-Math.floor(x/T),C>y&&(T=mc(C*T/y/p)*p),st(l)||(M=Math.pow(10,l),T=Math.ceil(T*M)/M),i==="ticks"?(k=Math.floor(x/T)*T,S=Math.ceil(g/T)*T):(k=x,S=g),m&&v&&a&&ng((o-s)/a,T/1e3)?(C=Math.round(Math.min((o-s)/T,u)),T=(o-s)/C,k=s,S=o):b?(k=m?s:k,S=v?o:S,C=c-1,T=(S-k)/C):(C=(S-k)/T,Cr(C,Math.round(C),T/1e3)?C=Math.round(C):C=Math.ceil(C));const O=Math.max(vc(T),vc(k));M=Math.pow(10,st(l)?O:l),k=Math.round(k*M)/M,S=Math.round(S*M)/M;let P=0;for(m&&(f&&k!==s?(e.push({value:s}),k<s&&P++,Cr(Math.round((k+P*T)*M)/M,s,hd(s,w,n))&&P++):k<s&&P++);P<C;++P){const E=Math.round((k+P*T)*M)/M;if(v&&E>o)break;e.push({value:E})}return v&&f&&S!==o?e.length&&Cr(e[e.length-1].value,o,hd(o,w,n))?e[e.length-1].value=o:e.push({value:o}):(!v||S===o)&&e.push({value:S}),e}function hd(n,t,{horizontal:e,minRotation:r}){const i=Xt(r),a=(e?Math.sin(i):Math.cos(i))||.001,s=.75*t*(""+n).length;return Math.min(t/a,s)}class ji extends In{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 st(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:r}=this.getUserBounds();let{min:i,max:a}=this;const s=l=>i=e?i:l,o=l=>a=r?a:l;if(t){const l=Le(i),c=Le(a);l<0&&c<0?o(0):l>0&&c>0&&s(0)}if(i===a){let l=a===0?1:Math.abs(a*.05);o(a+l),t||s(i-l)}this.min=i,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),e=e||11),e&&(i=Math.min(e,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,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},a=this._range||this,s=av(i,a);return t.bounds==="ticks"&&yc(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let e=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-e)/Math.max(t.length-1,1)/2;e-=i,r+=i}this._startValue=e,this._endValue=r,this._valueRange=r-e}getLabelForValue(t){return kr(t,this.chart.options.locale,this.options.ticks.format)}}class _s extends ji{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=It(t)?t:0,this.max=It(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,r=Xt(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,a.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}H(_s,"id","linear"),H(_s,"defaults",{ticks:{callback:wi.formatters.numeric}});const Vr=n=>Math.floor(cn(n)),Nn=(n,t)=>Math.pow(10,Vr(n)+t);function pd(n){return n/Math.pow(10,Vr(n))===1}function gd(n,t,e){const r=Math.pow(10,e),i=Math.floor(n/r);return Math.ceil(t/r)-i}function sv(n,t){const e=t-n;let r=Vr(e);for(;gd(n,t,r)>10;)r++;for(;gd(n,t,r)<10;)r--;return Math.min(r,Vr(n))}function ov(n,{min:t,max:e}){t=be(n.min,t);const r=[],i=Vr(t);let a=sv(t,e),s=a<0?Math.pow(10,Math.abs(a)):1;const o=Math.pow(10,a),l=i>a?Math.pow(10,i):0,c=Math.round((t-l)*s)/s,u=Math.floor((t-l)/o/10)*o*10;let d=Math.floor((c-u)/Math.pow(10,a)),f=be(n.min,Math.round((l+u+d*Math.pow(10,a))*s)/s);for(;f<e;)r.push({value:f,major:pd(f),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(a++,d=2,s=a>=0?1:s),f=Math.round((l+u+d*Math.pow(10,a))*s)/s;const p=be(n.max,f);return r.push({value:p,major:pd(p),significand:d}),r}class ws extends In{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const r=ji.prototype.parse.apply(this,[t,e]);if(r===0){this._zero=!0;return}return It(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=It(t)?Math.max(0,t):null,this.max=It(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!It(this._userMin)&&(this.min=t===Nn(this.min,0)?Nn(this.min,-1):Nn(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let r=this.min,i=this.max;const a=o=>r=t?r:o,s=o=>i=e?i:o;r===i&&(r<=0?(a(1),s(10)):(a(Nn(r,-1)),s(Nn(i,1)))),r<=0&&a(Nn(i,-1)),i<=0&&s(Nn(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},r=ov(e,this);return t.bounds==="ticks"&&yc(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":kr(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=cn(t),this._valueRange=cn(this.max)-cn(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(cn(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}H(ws,"id","logarithmic"),H(ws,"defaults",{ticks:{callback:wi.formatters.logarithmic,major:{enabled:!0}}});function Ts(n){const t=n.ticks;if(t.display&&n.display){const e=Gt(t.backdropPadding);return rt(t.font&&t.font.size,Ut.font.size)+e.height}return 0}function lv(n,t,e){return e=mt(e)?e:[e],{w:bg(n,t.string,e),h:e.length*t.lineHeight}}function md(n,t,e,r,i){return n===r||n===i?{start:t-e/2,end:t+e/2}:n<r||n>i?{start:t-e,end:t}:{start:t,end:t+e}}function cv(n){const t={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},e=Object.assign({},t),r=[],i=[],a=n._pointLabels.length,s=n.options.pointLabels,o=s.centerPointLabels?dt/a:0;for(let l=0;l<a;l++){const c=s.setContext(n.getPointLabelContext(l));i[l]=c.padding;const u=n.getPointPosition(l,n.drawingArea+i[l],o),d=Rt(c.font),f=lv(n.ctx,d,n._pointLabels[l]);r[l]=f;const p=xe(n.getIndexAngle(l)+o),y=Math.round(xi(p)),x=md(y,u.x,f.w,0,180),g=md(y,u.y,f.h,90,270);uv(e,t,p,x,g)}n.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),n._pointLabelItems=hv(n,r,i)}function uv(n,t,e,r,i){const a=Math.abs(Math.sin(e)),s=Math.abs(Math.cos(e));let o=0,l=0;r.start<t.l?(o=(t.l-r.start)/a,n.l=Math.min(n.l,t.l-o)):r.end>t.r&&(o=(r.end-t.r)/a,n.r=Math.max(n.r,t.r+o)),i.start<t.t?(l=(t.t-i.start)/s,n.t=Math.min(n.t,t.t-l)):i.end>t.b&&(l=(i.end-t.b)/s,n.b=Math.max(n.b,t.b+l))}function dv(n,t,e){const r=n.drawingArea,{extra:i,additionalAngle:a,padding:s,size:o}=e,l=n.getPointPosition(t,r+i+s,a),c=Math.round(xi(xe(l.angle+Et))),u=mv(l.y,o.h,c),d=pv(c),f=gv(l.x,o.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:f,top:u,right:f+o.w,bottom:u+o.h}}function fv(n,t){if(!t)return!0;const{left:e,top:r,right:i,bottom:a}=n;return!(qe({x:e,y:r},t)||qe({x:e,y:a},t)||qe({x:i,y:r},t)||qe({x:i,y:a},t))}function hv(n,t,e){const r=[],i=n._pointLabels.length,a=n.options,{centerPointLabels:s,display:o}=a.pointLabels,l={extra:Ts(a)/2,additionalAngle:s?dt/i:0};let c;for(let u=0;u<i;u++){l.padding=e[u],l.size=t[u];const d=dv(n,u,l);r.push(d),o==="auto"&&(d.visible=fv(d,c),d.visible&&(c=d))}return r}function pv(n){return n===0||n===180?"center":n<180?"left":"right"}function gv(n,t,e){return e==="right"?n-=t:e==="center"&&(n-=t/2),n}function mv(n,t,e){return e===90||e===270?n-=t/2:(e>270||e<90)&&(n-=t),n}function yv(n,t,e){const{left:r,top:i,right:a,bottom:s}=e,{backdropColor:o}=t;if(!st(o)){const l=dn(t.borderRadius),c=Gt(t.backdropPadding);n.fillStyle=o;const u=r-c.left,d=i-c.top,f=a-r+c.width,p=s-i+c.height;Object.values(l).some(y=>y!==0)?(n.beginPath(),tr(n,{x:u,y:d,w:f,h:p,radius:l}),n.fill()):n.fillRect(u,d,f,p)}}function vv(n,t){const{ctx:e,options:{pointLabels:r}}=n;for(let i=t-1;i>=0;i--){const a=n._pointLabelItems[i];if(!a.visible)continue;const s=r.setContext(n.getPointLabelContext(i));yv(e,s,a);const o=Rt(s.font),{x:l,y:c,textAlign:u}=a;En(e,n._pointLabels[i],l,c+o.lineHeight/2,o,{color:s.color,textAlign:u,textBaseline:"middle"})}}function yd(n,t,e,r){const{ctx:i}=n;if(e)i.arc(n.xCenter,n.yCenter,t,0,kt);else{let a=n.getPointPosition(0,t);i.moveTo(a.x,a.y);for(let s=1;s<r;s++)a=n.getPointPosition(s,t),i.lineTo(a.x,a.y)}}function bv(n,t,e,r,i){const a=n.ctx,s=t.circular,{color:o,lineWidth:l}=t;!s&&!r||!o||!l||e<0||(a.save(),a.strokeStyle=o,a.lineWidth=l,a.setLineDash(i.dash),a.lineDashOffset=i.dashOffset,a.beginPath(),yd(n,e,s,r),a.closePath(),a.stroke(),a.restore())}function xv(n,t,e){return fn(n,{label:e,index:t,type:"pointLabel"})}class qr extends ji{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Gt(Ts(this.options)/2),e=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(e,r)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=It(t)&&!isNaN(t)?t:0,this.max=It(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ts(this.options))}generateTickLabels(t){ji.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,r)=>{const i=Tt(this.options.pointLabels.callback,[e,r],this);return i||i===0?i:""}).filter((e,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?cv(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,r,i){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,r,i))}getIndexAngle(t){const e=kt/(this._pointLabels.length||1),r=this.options.startAngle||0;return xe(t*e+Xt(r))}getDistanceFromCenterForValue(t){if(st(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(st(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const r=e[t];return xv(this.getContext(),t,r)}}getPointPosition(t,e,r=0){const i=this.getIndexAngle(t)-Et+r;return{x:Math.cos(i)*e+this.xCenter,y:Math.sin(i)*e+this.yCenter,angle:i}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:r,right:i,bottom:a}=this._pointLabelItems[t];return{left:e,top:r,right:i,bottom:a}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),yd(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:r,grid:i,border:a}=e,s=this._pointLabels.length;let o,l,c;if(e.pointLabels.display&&vv(this,s),i.display&&this.ticks.forEach((u,d)=>{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const f=this.getContext(d),p=i.setContext(f),y=a.setContext(f);bv(this,p,l,s,y)}}),r.display){for(t.save(),o=s-1;o>=0;o--){const u=r.setContext(this.getPointLabelContext(o)),{color:d,lineWidth:f}=u;!f||!d||(t.lineWidth=f,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),c=this.getPointPosition(o,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,r=e.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let a,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((o,l)=>{if(l===0&&this.min>=0&&!e.reverse)return;const c=r.setContext(this.getContext(l)),u=Rt(c.font);if(a=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,s=t.measureText(o.label).width,t.fillStyle=c.backdropColor;const d=Gt(c.backdropPadding);t.fillRect(-s/2-d.left,-a-u.size/2-d.top,s+d.width,u.size+d.height)}En(t,o.label,0,-a,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}H(qr,"id","radialLinear"),H(qr,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:wi.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),H(qr,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),H(qr,"descriptors",{angleLines:{_fallback:"grid"}});const Vi={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}},pe=Object.keys(Vi);function vd(n,t){return n-t}function bd(n,t){if(st(t))return null;const e=n._adapter,{parser:r,round:i,isoWeekday:a}=n._parseOpts;let s=t;return typeof r=="function"&&(s=r(s)),It(s)||(s=typeof r=="string"?e.parse(s,r):e.parse(s)),s===null?null:(i&&(s=i==="week"&&(un(a)||a===!0)?e.startOf(s,"isoWeek",a):e.startOf(s,i)),+s)}function xd(n,t,e,r){const i=pe.length;for(let a=pe.indexOf(n);a<i-1;++a){const s=Vi[pe[a]],o=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((e-t)/(o*s.size))<=r)return pe[a]}return pe[i-1]}function _v(n,t,e,r,i){for(let a=pe.length-1;a>=pe.indexOf(e);a--){const s=pe[a];if(Vi[s].common&&n._adapter.diff(i,r,s)>=t-1)return s}return pe[e?pe.indexOf(e):0]}function wv(n){for(let t=pe.indexOf(n)+1,e=pe.length;t<e;++t)if(Vi[pe[t]].common)return pe[t]}function _d(n,t,e){if(!e)n[t]=!0;else if(e.length){const{lo:r,hi:i}=Wa(e,t),a=e[r]>=t?e[r]:e[i];n[a]=!0}}function Tv(n,t,e,r){const i=n._adapter,a=+i.startOf(t[0].value,r),s=t[t.length-1].value;let o,l;for(o=a;o<=s;o=+i.add(o,1,r))l=e[o],l>=0&&(t[l].major=!0);return t}function wd(n,t,e){const r=[],i={},a=t.length;let s,o;for(s=0;s<a;++s)o=t[s],i[o]=s,r.push({value:o,major:!1});return a===0||!e?r:Tv(n,r,i,e)}class Xr extends In{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 r=t.time||(t.time={}),i=this._adapter=new du._date(t.adapters.date);i.init(e),Sr(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:bd(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,r=t.time.unit||"day";let{min:i,max:a,minDefined:s,maxDefined:o}=this.getUserBounds();function l(c){!s&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!o&&!isNaN(c.max)&&(a=Math.max(a,c.max))}(!s||!o)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=It(i)&&!isNaN(i)?i:+e.startOf(Date.now(),r),a=It(a)&&!isNaN(a)?a:+e.endOf(Date.now(),r)+1,this.min=Math.min(i,a-1),this.max=Math.max(i+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],r=t[t.length-1]),{min:e,max:r}}buildTicks(){const t=this.options,e=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const a=this.min,s=this.max,o=sg(i,a,s);return this._unit=e.unit||(r.autoSkip?xd(e.minUnit,this.min,this.max,this._getLabelCapacity(a)):_v(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:wv(this._unit),this.initOffsets(i),t.reverse&&o.reverse(),wd(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,r=0,i,a;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?e=1-i:e=(this.getDecimalForValue(t[1])-i)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?r=a:r=(a-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;e=Qt(e,0,s),r=Qt(r,0,s),this._offsets={start:e,end:r,factor:1/(e+1+r)}}_generate(){const t=this._adapter,e=this.min,r=this.max,i=this.options,a=i.time,s=a.unit||xd(a.minUnit,e,r,this._getLabelCapacity(e)),o=rt(i.ticks.stepSize,1),l=s==="week"?a.isoWeekday:!1,c=un(l)||l===!0,u={};let d=e,f,p;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":s),t.diff(r,e,s)>1e5*o)throw new Error(e+" and "+r+" are too far apart with stepSize of "+o+" "+s);const y=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,p=0;f<r;f=+t.add(f,o,s),p++)_d(u,f,y);return(f===r||i.bounds==="ticks"||p===1)&&_d(u,f,y),Object.keys(u).sort(vd).map(x=>+x)}getLabelForValue(t){const e=this._adapter,r=this.options.time;return r.tooltipFormat?e.format(t,r.tooltipFormat):e.format(t,r.displayFormats.datetime)}format(t,e){const i=this.options.time.displayFormats,a=this._unit,s=e||i[a];return this._adapter.format(t,s)}_tickFormatFunction(t,e,r,i){const a=this.options,s=a.ticks.callback;if(s)return Tt(s,[t,e,r],this);const o=a.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&o[l],d=c&&o[c],f=r[e],p=c&&d&&f&&f.major;return this._adapter.format(t,i||(p?d:u))}generateTickLabels(t){let e,r,i;for(e=0,r=t.length;e<r;++e)i=t[e],i.label=this._tickFormatFunction(i.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+r)*e.factor)}getValueForPixel(t){const e=this._offsets,r=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,r=this.ctx.measureText(t).width,i=Xt(this.isHorizontal()?e.maxRotation:e.minRotation),a=Math.cos(i),s=Math.sin(i),o=this._resolveTickFontOptions(0).size;return{w:r*a+o*s,h:r*s+o*a}}_getLabelCapacity(t){const e=this.options.time,r=e.displayFormats,i=r[e.unit]||r.millisecond,a=this._tickFormatFunction(t,0,wd(this,[t],this._majorUnit),i),s=this._getLabelSize(a),o=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return o>0?o:1}getDataTimestamps(){let t=this._cache.data||[],e,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(e=0,r=i.length;e<r;++e)t=t.concat(i[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,r;if(t.length)return t;const i=this.getLabels();for(e=0,r=i.length;e<r;++e)t.push(bd(this,i[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return wc(t.sort(vd))}}H(Xr,"id","time"),H(Xr,"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 qi(n,t,e){let r=0,i=n.length-1,a,s,o,l;e?(t>=n[r].pos&&t<=n[i].pos&&({lo:r,hi:i}=Ve(n,"pos",t)),{pos:a,time:o}=n[r],{pos:s,time:l}=n[i]):(t>=n[r].time&&t<=n[i].time&&({lo:r,hi:i}=Ve(n,"time",t)),{time:a,pos:o}=n[r],{time:s,pos:l}=n[i]);const c=s-a;return c?o+(l-o)*(t-a)/c:o}class Ss extends Xr{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=qi(e,this.min),this._tableRange=qi(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:r}=this,i=[],a=[];let s,o,l,c,u;for(s=0,o=t.length;s<o;++s)c=t[s],c>=e&&c<=r&&i.push(c);if(i.length<2)return[{time:e,pos:0},{time:r,pos:1}];for(s=0,o=i.length;s<o;++s)u=i[s+1],l=i[s-1],c=i[s],Math.round((u+l)/2)!==c&&a.push({time:c,pos:s/(o-1)});return a}_generate(){const t=this.min,e=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(e)||r.length===1)&&r.push(e),r.sort((i,a)=>i-a)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),r=this.getLabelTimestamps();return e.length&&r.length?t=this.normalize(e.concat(r)):t=e.length?e:r,t=this._cache.all=t,t}getDecimalForValue(t){return(qi(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,r=this.getDecimalForPixel(t)/e.factor-e.end;return qi(this._table,r*this._tableRange+this._minPos,!0)}}H(Ss,"id","timeseries"),H(Ss,"defaults",Xr.defaults);var Sv=Object.freeze({__proto__:null,CategoryScale:xs,LinearScale:_s,LogarithmicScale:ws,RadialLinearScale:qr,TimeScale:Xr,TimeSeriesScale:Ss});const Cv=[Lm,ly,ev,Sv],Mv=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Dv=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],kv=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Ov=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Td=(n,t,e)=>{let r=n;return typeof t=="string"||Array.isArray(t)?r=n.toLocaleString(t,e):(t===!0||e!==void 0)&&(r=n.toLocaleString(void 0,e)),r};function Cs(n,t){if(!Number.isFinite(n))throw new TypeError(`Expected a finite number, got ${typeof n}: ${n}`);t={bits:!1,binary:!1,space:!0,...t};const e=t.bits?t.binary?Ov:kv:t.binary?Dv:Mv,r=t.space?" ":"";if(t.signed&&n===0)return` 0${r}${e[0]}`;const i=n<0,a=i?"-":t.signed?"+":"";i&&(n=-n);let s;if(t.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:t.maximumFractionDigits,...s}),n<1){const u=Td(n,t.locale,s);return a+u+r+e[0]}const o=Math.min(Math.floor(t.binary?Math.log(n)/Math.log(1024):Math.log10(n)/3),e.length-1);n/=(t.binary?1024:1e3)**o,s||(n=n.toPrecision(3));const l=Td(Number(n),t.locale,s),c=e[o];return a+l+r+c}function Ke(n){"@babel/helpers - typeof";return Ke=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ke(n)}function At(n){if(n===null||n===!0||n===!1)return NaN;var t=Number(n);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function J(n,t){if(t.length<n)throw new TypeError(n+" argument"+(n>1?"s":"")+" required, but only "+t.length+" present")}function nt(n){J(1,arguments);var t=Object.prototype.toString.call(n);return n instanceof Date||Ke(n)==="object"&&t==="[object Date]"?new Date(n.getTime()):typeof n=="number"||t==="[object Number]"?new Date(n):((typeof n=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Sd(n,t){J(2,arguments);var e=nt(n),r=At(t);return isNaN(r)?new Date(NaN):(r&&e.setDate(e.getDate()+r),e)}function Ms(n,t){J(2,arguments);var e=nt(n),r=At(t);if(isNaN(r))return new Date(NaN);if(!r)return e;var i=e.getDate(),a=new Date(e.getTime());a.setMonth(e.getMonth()+r+1,0);var s=a.getDate();return i>=s?a:(e.setFullYear(a.getFullYear(),a.getMonth(),i),e)}function Gr(n,t){J(2,arguments);var e=nt(n).getTime(),r=At(t);return new Date(e+r)}var Pv=36e5;function Ev(n,t){J(2,arguments);var e=At(t);return Gr(n,e*Pv)}var Rv={};function yn(){return Rv}function Cd(n,t){var e,r,i,a,s,o,l,c;J(1,arguments);var u=yn(),d=At((e=(r=(i=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&i!==void 0?i:u.weekStartsOn)!==null&&r!==void 0?r:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&e!==void 0?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=nt(n),p=f.getDay(),y=(p<d?7:0)+p-d;return f.setDate(f.getDate()-y),f.setHours(0,0,0,0),f}function Xi(n){var t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),n.getTime()-t.getTime()}function Ds(n){J(1,arguments);var t=nt(n);return t.setHours(0,0,0,0),t}var Av=864e5;function Lv(n,t){J(2,arguments);var e=Ds(n),r=Ds(t),i=e.getTime()-Xi(e),a=r.getTime()-Xi(r);return Math.round((i-a)/Av)}var Iv=6e4;function Nv(n,t){J(2,arguments);var e=At(t);return Gr(n,e*Iv)}function Fv(n,t){J(2,arguments);var e=At(t),r=e*3;return Ms(n,r)}function Uv(n,t){J(2,arguments);var e=At(t);return Gr(n,e*1e3)}function Bv(n,t){J(2,arguments);var e=At(t),r=e*7;return Sd(n,r)}function Wv(n,t){J(2,arguments);var e=At(t);return Ms(n,e*12)}function Kr(n,t){J(2,arguments);var e=nt(n),r=nt(t),i=e.getTime()-r.getTime();return i<0?-1:i>0?1:i}var Gi=6e4,Qr=36e5,zv=1e3;function Yv(n){return J(1,arguments),n instanceof Date||Ke(n)==="object"&&Object.prototype.toString.call(n)==="[object Date]"}function ks(n){if(J(1,arguments),!Yv(n)&&typeof n!="number")return!1;var t=nt(n);return!isNaN(Number(t))}function Hv(n,t){J(2,arguments);var e=nt(n),r=nt(t),i=e.getFullYear()-r.getFullYear(),a=e.getMonth()-r.getMonth();return i*12+a}function $v(n,t){J(2,arguments);var e=nt(n),r=nt(t);return e.getFullYear()-r.getFullYear()}function Md(n,t){var e=n.getFullYear()-t.getFullYear()||n.getMonth()-t.getMonth()||n.getDate()-t.getDate()||n.getHours()-t.getHours()||n.getMinutes()-t.getMinutes()||n.getSeconds()-t.getSeconds()||n.getMilliseconds()-t.getMilliseconds();return e<0?-1:e>0?1:e}function Dd(n,t){J(2,arguments);var e=nt(n),r=nt(t),i=Md(e,r),a=Math.abs(Lv(e,r));e.setDate(e.getDate()-i*a);var s=+(Md(e,r)===-i),o=i*(a-s);return o===0?0:o}function Ki(n,t){return J(2,arguments),nt(n).getTime()-nt(t).getTime()}var kd={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},jv="trunc";function Zr(n){return n?kd[n]:kd[jv]}function Vv(n,t,e){J(2,arguments);var r=Ki(n,t)/Qr;return Zr(e==null?void 0:e.roundingMethod)(r)}function qv(n,t,e){J(2,arguments);var r=Ki(n,t)/Gi;return Zr(e==null?void 0:e.roundingMethod)(r)}function Od(n){J(1,arguments);var t=nt(n);return t.setHours(23,59,59,999),t}function Pd(n){J(1,arguments);var t=nt(n),e=t.getMonth();return t.setFullYear(t.getFullYear(),e+1,0),t.setHours(23,59,59,999),t}function Xv(n){J(1,arguments);var t=nt(n);return Od(t).getTime()===Pd(t).getTime()}function Ed(n,t){J(2,arguments);var e=nt(n),r=nt(t),i=Kr(e,r),a=Math.abs(Hv(e,r)),s;if(a<1)s=0;else{e.getMonth()===1&&e.getDate()>27&&e.setDate(30),e.setMonth(e.getMonth()-i*a);var o=Kr(e,r)===-i;Xv(nt(n))&&a===1&&Kr(n,r)===1&&(o=!1),s=i*(a-Number(o))}return s===0?0:s}function Gv(n,t,e){J(2,arguments);var r=Ed(n,t)/3;return Zr(e==null?void 0:e.roundingMethod)(r)}function Kv(n,t,e){J(2,arguments);var r=Ki(n,t)/1e3;return Zr(e==null?void 0:e.roundingMethod)(r)}function Qv(n,t,e){J(2,arguments);var r=Dd(n,t)/7;return Zr(e==null?void 0:e.roundingMethod)(r)}function Zv(n,t){J(2,arguments);var e=nt(n),r=nt(t),i=Kr(e,r),a=Math.abs($v(e,r));e.setFullYear(1584),r.setFullYear(1584);var s=Kr(e,r)===-i,o=i*(a-Number(s));return o===0?0:o}function Jv(n){J(1,arguments);var t=nt(n);return t.setSeconds(0,0),t}function tb(n){J(1,arguments);var t=nt(n),e=t.getMonth(),r=e-e%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function eb(n){J(1,arguments);var t=nt(n);return t.setDate(1),t.setHours(0,0,0,0),t}function nb(n){J(1,arguments);var t=nt(n),e=t.getFullYear();return t.setFullYear(e+1,0,0),t.setHours(23,59,59,999),t}function rb(n){J(1,arguments);var t=nt(n),e=new Date(0);return e.setFullYear(t.getFullYear(),0,1),e.setHours(0,0,0,0),e}function ib(n){J(1,arguments);var t=nt(n);return t.setMinutes(59,59,999),t}function ab(n,t){var e,r,i,a,s,o,l,c;J(1,arguments);var u=yn(),d=At((e=(r=(i=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&i!==void 0?i:u.weekStartsOn)!==null&&r!==void 0?r:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&e!==void 0?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=nt(n),p=f.getDay(),y=(p<d?-7:0)+6-(p-d);return f.setDate(f.getDate()+y),f.setHours(23,59,59,999),f}function sb(n){J(1,arguments);var t=nt(n);return t.setSeconds(59,999),t}function ob(n){J(1,arguments);var t=nt(n),e=t.getMonth(),r=e-e%3+3;return t.setMonth(r,0),t.setHours(23,59,59,999),t}function lb(n){J(1,arguments);var t=nt(n);return t.setMilliseconds(999),t}function Rd(n,t){J(2,arguments);var e=At(t);return Gr(n,-e)}var cb=864e5;function ub(n){J(1,arguments);var t=nt(n),e=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),i=e-r;return Math.floor(i/cb)+1}function ar(n){J(1,arguments);var t=1,e=nt(n),r=e.getUTCDay(),i=(r<t?7:0)+r-t;return e.setUTCDate(e.getUTCDate()-i),e.setUTCHours(0,0,0,0),e}function Ad(n){J(1,arguments);var t=nt(n),e=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(e+1,0,4),r.setUTCHours(0,0,0,0);var i=ar(r),a=new Date(0);a.setUTCFullYear(e,0,4),a.setUTCHours(0,0,0,0);var s=ar(a);return t.getTime()>=i.getTime()?e+1:t.getTime()>=s.getTime()?e:e-1}function db(n){J(1,arguments);var t=Ad(n),e=new Date(0);e.setUTCFullYear(t,0,4),e.setUTCHours(0,0,0,0);var r=ar(e);return r}var fb=6048e5;function Ld(n){J(1,arguments);var t=nt(n),e=ar(t).getTime()-db(t).getTime();return Math.round(e/fb)+1}function Fn(n,t){var e,r,i,a,s,o,l,c;J(1,arguments);var u=yn(),d=At((e=(r=(i=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&i!==void 0?i:u.weekStartsOn)!==null&&r!==void 0?r:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&e!==void 0?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=nt(n),p=f.getUTCDay(),y=(p<d?7:0)+p-d;return f.setUTCDate(f.getUTCDate()-y),f.setUTCHours(0,0,0,0),f}function Os(n,t){var e,r,i,a,s,o,l,c;J(1,arguments);var u=nt(n),d=u.getUTCFullYear(),f=yn(),p=At((e=(r=(i=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&e!==void 0?e:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(d+1,0,p),y.setUTCHours(0,0,0,0);var x=Fn(y,t),g=new Date(0);g.setUTCFullYear(d,0,p),g.setUTCHours(0,0,0,0);var m=Fn(g,t);return u.getTime()>=x.getTime()?d+1:u.getTime()>=m.getTime()?d:d-1}function hb(n,t){var e,r,i,a,s,o,l,c;J(1,arguments);var u=yn(),d=At((e=(r=(i=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&i!==void 0?i:u.firstWeekContainsDate)!==null&&r!==void 0?r:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&e!==void 0?e:1),f=Os(n,t),p=new Date(0);p.setUTCFullYear(f,0,d),p.setUTCHours(0,0,0,0);var y=Fn(p,t);return y}var pb=6048e5;function Id(n,t){J(1,arguments);var e=nt(n),r=Fn(e,t).getTime()-hb(e,t).getTime();return Math.round(r/pb)+1}function Ct(n,t){for(var e=n<0?"-":"",r=Math.abs(n).toString();r.length<t;)r="0"+r;return e+r}var gb={y:function(t,e){var r=t.getUTCFullYear(),i=r>0?r:1-r;return Ct(e==="yy"?i%100:i,e.length)},M:function(t,e){var r=t.getUTCMonth();return e==="M"?String(r+1):Ct(r+1,2)},d:function(t,e){return Ct(t.getUTCDate(),e.length)},a:function(t,e){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(t,e){return Ct(t.getUTCHours()%12||12,e.length)},H:function(t,e){return Ct(t.getUTCHours(),e.length)},m:function(t,e){return Ct(t.getUTCMinutes(),e.length)},s:function(t,e){return Ct(t.getUTCSeconds(),e.length)},S:function(t,e){var r=e.length,i=t.getUTCMilliseconds(),a=Math.floor(i*Math.pow(10,r-3));return Ct(a,e.length)}};const vn=gb;var sr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},mb={G:function(t,e,r){var i=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return r.era(i,{width:"abbreviated"});case"GGGGG":return r.era(i,{width:"narrow"});case"GGGG":default:return r.era(i,{width:"wide"})}},y:function(t,e,r){if(e==="yo"){var i=t.getUTCFullYear(),a=i>0?i:1-i;return r.ordinalNumber(a,{unit:"year"})}return vn.y(t,e)},Y:function(t,e,r,i){var a=Os(t,i),s=a>0?a:1-a;if(e==="YY"){var o=s%100;return Ct(o,2)}return e==="Yo"?r.ordinalNumber(s,{unit:"year"}):Ct(s,e.length)},R:function(t,e){var r=Ad(t);return Ct(r,e.length)},u:function(t,e){var r=t.getUTCFullYear();return Ct(r,e.length)},Q:function(t,e,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(i);case"QQ":return Ct(i,2);case"Qo":return r.ordinalNumber(i,{unit:"quarter"});case"QQQ":return r.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,e,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(i);case"qq":return Ct(i,2);case"qo":return r.ordinalNumber(i,{unit:"quarter"});case"qqq":return r.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,e,r){var i=t.getUTCMonth();switch(e){case"M":case"MM":return vn.M(t,e);case"Mo":return r.ordinalNumber(i+1,{unit:"month"});case"MMM":return r.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(i,{width:"wide",context:"formatting"})}},L:function(t,e,r){var i=t.getUTCMonth();switch(e){case"L":return String(i+1);case"LL":return Ct(i+1,2);case"Lo":return r.ordinalNumber(i+1,{unit:"month"});case"LLL":return r.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(i,{width:"wide",context:"standalone"})}},w:function(t,e,r,i){var a=Id(t,i);return e==="wo"?r.ordinalNumber(a,{unit:"week"}):Ct(a,e.length)},I:function(t,e,r){var i=Ld(t);return e==="Io"?r.ordinalNumber(i,{unit:"week"}):Ct(i,e.length)},d:function(t,e,r){return e==="do"?r.ordinalNumber(t.getUTCDate(),{unit:"date"}):vn.d(t,e)},D:function(t,e,r){var i=ub(t);return e==="Do"?r.ordinalNumber(i,{unit:"dayOfYear"}):Ct(i,e.length)},E:function(t,e,r){var i=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return r.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(i,{width:"short",context:"formatting"});case"EEEE":default:return r.day(i,{width:"wide",context:"formatting"})}},e:function(t,e,r,i){var a=t.getUTCDay(),s=(a-i.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Ct(s,2);case"eo":return r.ordinalNumber(s,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});case"eeee":default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,r,i){var a=t.getUTCDay(),s=(a-i.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Ct(s,e.length);case"co":return r.ordinalNumber(s,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});case"cccc":default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,r){var i=t.getUTCDay(),a=i===0?7:i;switch(e){case"i":return String(a);case"ii":return Ct(a,e.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(i,{width:"short",context:"formatting"});case"iiii":default:return r.day(i,{width:"wide",context:"formatting"})}},a:function(t,e,r){var i=t.getUTCHours(),a=i/12>=1?"pm":"am";switch(e){case"a":case"aa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,r){var i=t.getUTCHours(),a;switch(i===12?a=sr.noon:i===0?a=sr.midnight:a=i/12>=1?"pm":"am",e){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,r){var i=t.getUTCHours(),a;switch(i>=17?a=sr.evening:i>=12?a=sr.afternoon:i>=4?a=sr.morning:a=sr.night,e){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,r){if(e==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),r.ordinalNumber(i,{unit:"hour"})}return vn.h(t,e)},H:function(t,e,r){return e==="Ho"?r.ordinalNumber(t.getUTCHours(),{unit:"hour"}):vn.H(t,e)},K:function(t,e,r){var i=t.getUTCHours()%12;return e==="Ko"?r.ordinalNumber(i,{unit:"hour"}):Ct(i,e.length)},k:function(t,e,r){var i=t.getUTCHours();return i===0&&(i=24),e==="ko"?r.ordinalNumber(i,{unit:"hour"}):Ct(i,e.length)},m:function(t,e,r){return e==="mo"?r.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):vn.m(t,e)},s:function(t,e,r){return e==="so"?r.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):vn.s(t,e)},S:function(t,e){return vn.S(t,e)},X:function(t,e,r,i){var a=i._originalDate||t,s=a.getTimezoneOffset();if(s===0)return"Z";switch(e){case"X":return Fd(s);case"XXXX":case"XX":return Un(s);case"XXXXX":case"XXX":default:return Un(s,":")}},x:function(t,e,r,i){var a=i._originalDate||t,s=a.getTimezoneOffset();switch(e){case"x":return Fd(s);case"xxxx":case"xx":return Un(s);case"xxxxx":case"xxx":default:return Un(s,":")}},O:function(t,e,r,i){var a=i._originalDate||t,s=a.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Nd(s,":");case"OOOO":default:return"GMT"+Un(s,":")}},z:function(t,e,r,i){var a=i._originalDate||t,s=a.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Nd(s,":");case"zzzz":default:return"GMT"+Un(s,":")}},t:function(t,e,r,i){var a=i._originalDate||t,s=Math.floor(a.getTime()/1e3);return Ct(s,e.length)},T:function(t,e,r,i){var a=i._originalDate||t,s=a.getTime();return Ct(s,e.length)}};function Nd(n,t){var e=n>0?"-":"+",r=Math.abs(n),i=Math.floor(r/60),a=r%60;if(a===0)return e+String(i);var s=t||"";return e+String(i)+s+Ct(a,2)}function Fd(n,t){if(n%60===0){var e=n>0?"-":"+";return e+Ct(Math.abs(n)/60,2)}return Un(n,t)}function Un(n,t){var e=t||"",r=n>0?"-":"+",i=Math.abs(n),a=Ct(Math.floor(i/60),2),s=Ct(i%60,2);return r+a+e+s}var Ud=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},Bd=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},yb=function(t,e){var r=t.match(/(P+)(p+)?/)||[],i=r[1],a=r[2];if(!a)return Ud(t,e);var s;switch(i){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",Ud(i,e)).replace("{{time}}",Bd(a,e))},Ps={p:Bd,P:yb},vb=["D","DD"],bb=["YY","YYYY"];function Wd(n){return vb.indexOf(n)!==-1}function zd(n){return bb.indexOf(n)!==-1}function Qi(n,t,e){if(n==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var xb={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},_b=function(t,e,r){var i,a=xb[t];return typeof a=="string"?i=a:e===1?i=a.one:i=a.other.replace("{{count}}",e.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};const wb=_b;function Es(n){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.width?String(t.width):n.defaultWidth,r=n.formats[e]||n.formats[n.defaultWidth];return r}}var Tb={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Sb={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Cb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Mb={date:Es({formats:Tb,defaultWidth:"full"}),time:Es({formats:Sb,defaultWidth:"full"}),dateTime:Es({formats:Cb,defaultWidth:"full"})};const Db=Mb;var kb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ob=function(t,e,r,i){return kb[t]};const Pb=Ob;function Jr(n){return function(t,e){var r=e!=null&&e.context?String(e.context):"standalone",i;if(r==="formatting"&&n.formattingValues){var a=n.defaultFormattingWidth||n.defaultWidth,s=e!=null&&e.width?String(e.width):a;i=n.formattingValues[s]||n.formattingValues[a]}else{var o=n.defaultWidth,l=e!=null&&e.width?String(e.width):n.defaultWidth;i=n.values[l]||n.values[o]}var c=n.argumentCallback?n.argumentCallback(t):t;return i[c]}}var Eb={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Rb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ab={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Lb={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Ib={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Nb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Fb=function(t,e){var r=Number(t),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Ub={ordinalNumber:Fb,era:Jr({values:Eb,defaultWidth:"wide"}),quarter:Jr({values:Rb,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Jr({values:Ab,defaultWidth:"wide"}),day:Jr({values:Lb,defaultWidth:"wide"}),dayPeriod:Jr({values:Ib,defaultWidth:"wide",formattingValues:Nb,defaultFormattingWidth:"wide"})};const Bb=Ub;function ti(n){return function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.width,i=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],a=t.match(i);if(!a)return null;var s=a[0],o=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(o)?zb(o,function(d){return d.test(s)}):Wb(o,function(d){return d.test(s)}),c;c=n.valueCallback?n.valueCallback(l):l,c=e.valueCallback?e.valueCallback(c):c;var u=t.slice(s.length);return{value:c,rest:u}}}function Wb(n,t){for(var e in n)if(n.hasOwnProperty(e)&&t(n[e]))return e}function zb(n,t){for(var e=0;e<n.length;e++)if(t(n[e]))return e}function Yb(n){return function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(n.matchPattern);if(!r)return null;var i=r[0],a=t.match(n.parsePattern);if(!a)return null;var s=n.valueCallback?n.valueCallback(a[0]):a[0];s=e.valueCallback?e.valueCallback(s):s;var o=t.slice(i.length);return{value:s,rest:o}}}var Hb=/^(\d+)(th|st|nd|rd)?/i,$b=/\d+/i,jb={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Vb={any:[/^b/i,/^(a|c)/i]},qb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Xb={any:[/1/i,/2/i,/3/i,/4/i]},Gb={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Kb={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Qb={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Zb={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Jb={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},tx={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ex={ordinalNumber:Yb({matchPattern:Hb,parsePattern:$b,valueCallback:function(t){return parseInt(t,10)}}),era:ti({matchPatterns:jb,defaultMatchWidth:"wide",parsePatterns:Vb,defaultParseWidth:"any"}),quarter:ti({matchPatterns:qb,defaultMatchWidth:"wide",parsePatterns:Xb,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:ti({matchPatterns:Gb,defaultMatchWidth:"wide",parsePatterns:Kb,defaultParseWidth:"any"}),day:ti({matchPatterns:Qb,defaultMatchWidth:"wide",parsePatterns:Zb,defaultParseWidth:"any"}),dayPeriod:ti({matchPatterns:Jb,defaultMatchWidth:"any",parsePatterns:tx,defaultParseWidth:"any"})},nx={code:"en-US",formatDistance:wb,formatLong:Db,formatRelative:Pb,localize:Bb,match:ex,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Yd=nx;var rx=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ix=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ax=/^'([^]*?)'?$/,sx=/''/g,ox=/[a-zA-Z]/;function lx(n,t,e){var r,i,a,s,o,l,c,u,d,f,p,y,x,g,m,v,b,w;J(2,arguments);var T=String(t),M=yn(),k=(r=(i=e==null?void 0:e.locale)!==null&&i!==void 0?i:M.locale)!==null&&r!==void 0?r:Yd,S=At((a=(s=(o=(l=e==null?void 0:e.firstWeekContainsDate)!==null&&l!==void 0?l:e==null||(c=e.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&o!==void 0?o:M.firstWeekContainsDate)!==null&&s!==void 0?s:(d=M.locale)===null||d===void 0||(f=d.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var C=At((p=(y=(x=(g=e==null?void 0:e.weekStartsOn)!==null&&g!==void 0?g:e==null||(m=e.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&x!==void 0?x:M.weekStartsOn)!==null&&y!==void 0?y:(b=M.locale)===null||b===void 0||(w=b.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&p!==void 0?p:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw new RangeError("locale must contain localize property");if(!k.formatLong)throw new RangeError("locale must contain formatLong property");var O=nt(n);if(!ks(O))throw new RangeError("Invalid time value");var P=Xi(O),E=Rd(O,P),F={firstWeekContainsDate:S,weekStartsOn:C,locale:k,_originalDate:O},q=T.match(ix).map(function($){var Y=$[0];if(Y==="p"||Y==="P"){var I=Ps[Y];return I($,k.formatLong)}return $}).join("").match(rx).map(function($){if($==="''")return"'";var Y=$[0];if(Y==="'")return cx($);var I=mb[Y];if(I)return!(e!=null&&e.useAdditionalWeekYearTokens)&&zd($)&&Qi($,t,String(n)),!(e!=null&&e.useAdditionalDayOfYearTokens)&&Wd($)&&Qi($,t,String(n)),I(E,$,k.localize,F);if(Y.match(ox))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Y+"`");return $}).join("");return q}function cx(n){var t=n.match(ax);return t?t[1].replace(sx,"'"):n}function ux(n,t){if(n==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}function Hd(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=n[e];return r}function dx(n,t){if(n){if(typeof n=="string")return Hd(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Hd(n,t)}}function $d(n,t){var e=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!e){if(Array.isArray(n)||(e=dx(n))||t&&n&&typeof n.length=="number"){e&&(n=e);var r=0,i=function(){};return{s:i,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
19
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,s=!1,o;return{s:function(){e=e.call(n)},n:function(){var c=e.next();return a=c.done,c},e:function(c){s=!0,o=c},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(s)throw o}}}}function G(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Rs(n,t){return Rs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Rs(n,t)}function pt(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&Rs(n,t)}function Zi(n){return Zi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zi(n)}function fx(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function hx(n,t){if(t&&(Ke(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return G(n)}function gt(n){var t=fx();return function(){var r=Zi(n),i;if(t){var a=Zi(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return hx(this,i)}}function ft(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function px(n,t){if(Ke(n)!=="object"||n===null)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var r=e.call(n,t||"default");if(Ke(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(n)}function jd(n){var t=px(n,"string");return Ke(t)==="symbol"?t:String(t)}function Vd(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,jd(r.key),r)}}function ht(n,t,e){return t&&Vd(n.prototype,t),e&&Vd(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n}function V(n,t,e){return t=jd(t),t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var gx=10,qd=function(){function n(){ft(this,n),V(this,"priority",void 0),V(this,"subPriority",0)}return ht(n,[{key:"validate",value:function(e,r){return!0}}]),n}(),mx=function(n){pt(e,n);var t=gt(e);function e(r,i,a,s,o){var l;return ft(this,e),l=t.call(this),l.value=r,l.validateValue=i,l.setValue=a,l.priority=s,o&&(l.subPriority=o),l}return ht(e,[{key:"validate",value:function(i,a){return this.validateValue(i,this.value,a)}},{key:"set",value:function(i,a,s){return this.setValue(i,a,this.value,s)}}]),e}(qd),yx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",gx),V(G(r),"subPriority",-1),r}return ht(e,[{key:"set",value:function(i,a){if(a.timestampIsSet)return i;var s=new Date(0);return s.setFullYear(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),s.setHours(i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()),s}}]),e}(qd),xt=function(){function n(){ft(this,n),V(this,"incompatibleTokens",void 0),V(this,"priority",void 0),V(this,"subPriority",void 0)}return ht(n,[{key:"run",value:function(e,r,i,a){var s=this.parse(e,r,i,a);return s?{setter:new mx(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}},{key:"validate",value:function(e,r,i){return!0}}]),n}(),vx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",140),V(G(r),"incompatibleTokens",["R","u","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"G":case"GG":case"GGG":return s.era(i,{width:"abbreviated"})||s.era(i,{width:"narrow"});case"GGGGG":return s.era(i,{width:"narrow"});case"GGGG":default:return s.era(i,{width:"wide"})||s.era(i,{width:"abbreviated"})||s.era(i,{width:"narrow"})}}},{key:"set",value:function(i,a,s){return a.era=s,i.setUTCFullYear(s,0,1),i.setUTCHours(0,0,0,0),i}}]),e}(xt),Vt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Fe={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function qt(n,t){return n&&{value:t(n.value),rest:n.rest}}function Bt(n,t){var e=t.match(n);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function Ue(n,t){var e=t.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:t.slice(1)};var r=e[1]==="+"?1:-1,i=e[2]?parseInt(e[2],10):0,a=e[3]?parseInt(e[3],10):0,s=e[5]?parseInt(e[5],10):0;return{value:r*(i*Qr+a*Gi+s*zv),rest:t.slice(e[0].length)}}function Xd(n){return Bt(Vt.anyDigitsSigned,n)}function jt(n,t){switch(n){case 1:return Bt(Vt.singleDigit,t);case 2:return Bt(Vt.twoDigits,t);case 3:return Bt(Vt.threeDigits,t);case 4:return Bt(Vt.fourDigits,t);default:return Bt(new RegExp("^\\d{1,"+n+"}"),t)}}function Ji(n,t){switch(n){case 1:return Bt(Vt.singleDigitSigned,t);case 2:return Bt(Vt.twoDigitsSigned,t);case 3:return Bt(Vt.threeDigitsSigned,t);case 4:return Bt(Vt.fourDigitsSigned,t);default:return Bt(new RegExp("^-?\\d{1,"+n+"}"),t)}}function As(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Gd(n,t){var e=t>0,r=e?t:1-t,i;if(r<=50)i=n||100;else{var a=r+50,s=Math.floor(a/100)*100,o=n>=a%100;i=n+s-(o?100:0)}return e?i:1-i}function Kd(n){return n%400===0||n%4===0&&n%100!==0}var bx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",130),V(G(r),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){var o=function(c){return{year:c,isTwoDigitYear:a==="yy"}};switch(a){case"y":return qt(jt(4,i),o);case"yo":return qt(s.ordinalNumber(i,{unit:"year"}),o);default:return qt(jt(a.length,i),o)}}},{key:"validate",value:function(i,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(i,a,s){var o=i.getUTCFullYear();if(s.isTwoDigitYear){var l=Gd(s.year,o);return i.setUTCFullYear(l,0,1),i.setUTCHours(0,0,0,0),i}var c=!("era"in a)||a.era===1?s.year:1-s.year;return i.setUTCFullYear(c,0,1),i.setUTCHours(0,0,0,0),i}}]),e}(xt),xx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",130),V(G(r),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){var o=function(c){return{year:c,isTwoDigitYear:a==="YY"}};switch(a){case"Y":return qt(jt(4,i),o);case"Yo":return qt(s.ordinalNumber(i,{unit:"year"}),o);default:return qt(jt(a.length,i),o)}}},{key:"validate",value:function(i,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(i,a,s,o){var l=Os(i,o);if(s.isTwoDigitYear){var c=Gd(s.year,l);return i.setUTCFullYear(c,0,o.firstWeekContainsDate),i.setUTCHours(0,0,0,0),Fn(i,o)}var u=!("era"in a)||a.era===1?s.year:1-s.year;return i.setUTCFullYear(u,0,o.firstWeekContainsDate),i.setUTCHours(0,0,0,0),Fn(i,o)}}]),e}(xt),_x=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",130),V(G(r),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a){return Ji(a==="R"?4:a.length,i)}},{key:"set",value:function(i,a,s){var o=new Date(0);return o.setUTCFullYear(s,0,4),o.setUTCHours(0,0,0,0),ar(o)}}]),e}(xt),wx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",130),V(G(r),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a){return Ji(a==="u"?4:a.length,i)}},{key:"set",value:function(i,a,s){return i.setUTCFullYear(s,0,1),i.setUTCHours(0,0,0,0),i}}]),e}(xt),Tx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",120),V(G(r),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"Q":case"QQ":return jt(a.length,i);case"Qo":return s.ordinalNumber(i,{unit:"quarter"});case"QQQ":return s.quarter(i,{width:"abbreviated",context:"formatting"})||s.quarter(i,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(i,{width:"wide",context:"formatting"})||s.quarter(i,{width:"abbreviated",context:"formatting"})||s.quarter(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,a){return a>=1&&a<=4}},{key:"set",value:function(i,a,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),e}(xt),Sx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",120),V(G(r),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"q":case"qq":return jt(a.length,i);case"qo":return s.ordinalNumber(i,{unit:"quarter"});case"qqq":return s.quarter(i,{width:"abbreviated",context:"standalone"})||s.quarter(i,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(i,{width:"wide",context:"standalone"})||s.quarter(i,{width:"abbreviated",context:"standalone"})||s.quarter(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,a){return a>=1&&a<=4}},{key:"set",value:function(i,a,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),e}(xt),Cx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),V(G(r),"priority",110),r}return ht(e,[{key:"parse",value:function(i,a,s){var o=function(c){return c-1};switch(a){case"M":return qt(Bt(Vt.month,i),o);case"MM":return qt(jt(2,i),o);case"Mo":return qt(s.ordinalNumber(i,{unit:"month"}),o);case"MMM":return s.month(i,{width:"abbreviated",context:"formatting"})||s.month(i,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(i,{width:"wide",context:"formatting"})||s.month(i,{width:"abbreviated",context:"formatting"})||s.month(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,a){return a>=0&&a<=11}},{key:"set",value:function(i,a,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),e}(xt),Mx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",110),V(G(r),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){var o=function(c){return c-1};switch(a){case"L":return qt(Bt(Vt.month,i),o);case"LL":return qt(jt(2,i),o);case"Lo":return qt(s.ordinalNumber(i,{unit:"month"}),o);case"LLL":return s.month(i,{width:"abbreviated",context:"standalone"})||s.month(i,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(i,{width:"wide",context:"standalone"})||s.month(i,{width:"abbreviated",context:"standalone"})||s.month(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,a){return a>=0&&a<=11}},{key:"set",value:function(i,a,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),e}(xt);function Dx(n,t,e){J(2,arguments);var r=nt(n),i=At(t),a=Id(r,e)-i;return r.setUTCDate(r.getUTCDate()-a*7),r}var kx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",100),V(G(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"w":return Bt(Vt.week,i);case"wo":return s.ordinalNumber(i,{unit:"week"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){return a>=1&&a<=53}},{key:"set",value:function(i,a,s,o){return Fn(Dx(i,s,o),o)}}]),e}(xt);function Ox(n,t){J(2,arguments);var e=nt(n),r=At(t),i=Ld(e)-r;return e.setUTCDate(e.getUTCDate()-i*7),e}var Px=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",100),V(G(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"I":return Bt(Vt.week,i);case"Io":return s.ordinalNumber(i,{unit:"week"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){return a>=1&&a<=53}},{key:"set",value:function(i,a,s){return ar(Ox(i,s))}}]),e}(xt),Ex=[31,28,31,30,31,30,31,31,30,31,30,31],Rx=[31,29,31,30,31,30,31,31,30,31,30,31],Ax=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",90),V(G(r),"subPriority",1),V(G(r),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"d":return Bt(Vt.date,i);case"do":return s.ordinalNumber(i,{unit:"date"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){var s=i.getUTCFullYear(),o=Kd(s),l=i.getUTCMonth();return o?a>=1&&a<=Rx[l]:a>=1&&a<=Ex[l]}},{key:"set",value:function(i,a,s){return i.setUTCDate(s),i.setUTCHours(0,0,0,0),i}}]),e}(xt),Lx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",90),V(G(r),"subpriority",1),V(G(r),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"D":case"DD":return Bt(Vt.dayOfYear,i);case"Do":return s.ordinalNumber(i,{unit:"date"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){var s=i.getUTCFullYear(),o=Kd(s);return o?a>=1&&a<=366:a>=1&&a<=365}},{key:"set",value:function(i,a,s){return i.setUTCMonth(0,s),i.setUTCHours(0,0,0,0),i}}]),e}(xt);function Ls(n,t,e){var r,i,a,s,o,l,c,u;J(2,arguments);var d=yn(),f=At((r=(i=(a=(s=e==null?void 0:e.weekStartsOn)!==null&&s!==void 0?s:e==null||(o=e.locale)===null||o===void 0||(l=o.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&a!==void 0?a:d.weekStartsOn)!==null&&i!==void 0?i:(c=d.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=nt(n),y=At(t),x=p.getUTCDay(),g=y%7,m=(g+7)%7,v=(m<f?7:0)+y-x;return p.setUTCDate(p.getUTCDate()+v),p}var Ix=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",90),V(G(r),"incompatibleTokens",["D","i","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"E":case"EE":case"EEE":return s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"});case"EEEE":default:return s.day(i,{width:"wide",context:"formatting"})||s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,a){return a>=0&&a<=6}},{key:"set",value:function(i,a,s,o){return i=Ls(i,s,o),i.setUTCHours(0,0,0,0),i}}]),e}(xt),Nx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",90),V(G(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s,o){var l=function(u){var d=Math.floor((u-1)/7)*7;return(u+o.weekStartsOn+6)%7+d};switch(a){case"e":case"ee":return qt(jt(a.length,i),l);case"eo":return qt(s.ordinalNumber(i,{unit:"day"}),l);case"eee":return s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"});case"eeeee":return s.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"});case"eeee":default:return s.day(i,{width:"wide",context:"formatting"})||s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,a){return a>=0&&a<=6}},{key:"set",value:function(i,a,s,o){return i=Ls(i,s,o),i.setUTCHours(0,0,0,0),i}}]),e}(xt),Fx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",90),V(G(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s,o){var l=function(u){var d=Math.floor((u-1)/7)*7;return(u+o.weekStartsOn+6)%7+d};switch(a){case"c":case"cc":return qt(jt(a.length,i),l);case"co":return qt(s.ordinalNumber(i,{unit:"day"}),l);case"ccc":return s.day(i,{width:"abbreviated",context:"standalone"})||s.day(i,{width:"short",context:"standalone"})||s.day(i,{width:"narrow",context:"standalone"});case"ccccc":return s.day(i,{width:"narrow",context:"standalone"});case"cccccc":return s.day(i,{width:"short",context:"standalone"})||s.day(i,{width:"narrow",context:"standalone"});case"cccc":default:return s.day(i,{width:"wide",context:"standalone"})||s.day(i,{width:"abbreviated",context:"standalone"})||s.day(i,{width:"short",context:"standalone"})||s.day(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,a){return a>=0&&a<=6}},{key:"set",value:function(i,a,s,o){return i=Ls(i,s,o),i.setUTCHours(0,0,0,0),i}}]),e}(xt);function Ux(n,t){J(2,arguments);var e=At(t);e%7===0&&(e=e-7);var r=1,i=nt(n),a=i.getUTCDay(),s=e%7,o=(s+7)%7,l=(o<r?7:0)+e-a;return i.setUTCDate(i.getUTCDate()+l),i}var Bx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",90),V(G(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){var o=function(c){return c===0?7:c};switch(a){case"i":case"ii":return jt(a.length,i);case"io":return s.ordinalNumber(i,{unit:"day"});case"iii":return qt(s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"}),o);case"iiiii":return qt(s.day(i,{width:"narrow",context:"formatting"}),o);case"iiiiii":return qt(s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"}),o);case"iiii":default:return qt(s.day(i,{width:"wide",context:"formatting"})||s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"}),o)}}},{key:"validate",value:function(i,a){return a>=1&&a<=7}},{key:"set",value:function(i,a,s){return i=Ux(i,s),i.setUTCHours(0,0,0,0),i}}]),e}(xt),Wx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",80),V(G(r),"incompatibleTokens",["b","B","H","k","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"a":case"aa":case"aaa":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(i,{width:"wide",context:"formatting"})||s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,a,s){return i.setUTCHours(As(s),0,0,0),i}}]),e}(xt),zx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",80),V(G(r),"incompatibleTokens",["a","B","H","k","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"b":case"bb":case"bbb":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(i,{width:"wide",context:"formatting"})||s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,a,s){return i.setUTCHours(As(s),0,0,0),i}}]),e}(xt),Yx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",80),V(G(r),"incompatibleTokens",["a","b","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"B":case"BB":case"BBB":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(i,{width:"wide",context:"formatting"})||s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,a,s){return i.setUTCHours(As(s),0,0,0),i}}]),e}(xt),Hx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",70),V(G(r),"incompatibleTokens",["H","K","k","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"h":return Bt(Vt.hour12h,i);case"ho":return s.ordinalNumber(i,{unit:"hour"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){return a>=1&&a<=12}},{key:"set",value:function(i,a,s){var o=i.getUTCHours()>=12;return o&&s<12?i.setUTCHours(s+12,0,0,0):!o&&s===12?i.setUTCHours(0,0,0,0):i.setUTCHours(s,0,0,0),i}}]),e}(xt),$x=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",70),V(G(r),"incompatibleTokens",["a","b","h","K","k","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"H":return Bt(Vt.hour23h,i);case"Ho":return s.ordinalNumber(i,{unit:"hour"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){return a>=0&&a<=23}},{key:"set",value:function(i,a,s){return i.setUTCHours(s,0,0,0),i}}]),e}(xt),jx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",70),V(G(r),"incompatibleTokens",["h","H","k","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"K":return Bt(Vt.hour11h,i);case"Ko":return s.ordinalNumber(i,{unit:"hour"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){return a>=0&&a<=11}},{key:"set",value:function(i,a,s){var o=i.getUTCHours()>=12;return o&&s<12?i.setUTCHours(s+12,0,0,0):i.setUTCHours(s,0,0,0),i}}]),e}(xt),Vx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",70),V(G(r),"incompatibleTokens",["a","b","h","H","K","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"k":return Bt(Vt.hour24h,i);case"ko":return s.ordinalNumber(i,{unit:"hour"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){return a>=1&&a<=24}},{key:"set",value:function(i,a,s){var o=s<=24?s%24:s;return i.setUTCHours(o,0,0,0),i}}]),e}(xt),qx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",60),V(G(r),"incompatibleTokens",["t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"m":return Bt(Vt.minute,i);case"mo":return s.ordinalNumber(i,{unit:"minute"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){return a>=0&&a<=59}},{key:"set",value:function(i,a,s){return i.setUTCMinutes(s,0,0),i}}]),e}(xt),Xx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",50),V(G(r),"incompatibleTokens",["t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"s":return Bt(Vt.second,i);case"so":return s.ordinalNumber(i,{unit:"second"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){return a>=0&&a<=59}},{key:"set",value:function(i,a,s){return i.setUTCSeconds(s,0),i}}]),e}(xt),Gx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",30),V(G(r),"incompatibleTokens",["t","T"]),r}return ht(e,[{key:"parse",value:function(i,a){var s=function(l){return Math.floor(l*Math.pow(10,-a.length+3))};return qt(jt(a.length,i),s)}},{key:"set",value:function(i,a,s){return i.setUTCMilliseconds(s),i}}]),e}(xt),Kx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",10),V(G(r),"incompatibleTokens",["t","T","x"]),r}return ht(e,[{key:"parse",value:function(i,a){switch(a){case"X":return Ue(Fe.basicOptionalMinutes,i);case"XX":return Ue(Fe.basic,i);case"XXXX":return Ue(Fe.basicOptionalSeconds,i);case"XXXXX":return Ue(Fe.extendedOptionalSeconds,i);case"XXX":default:return Ue(Fe.extended,i)}}},{key:"set",value:function(i,a,s){return a.timestampIsSet?i:new Date(i.getTime()-s)}}]),e}(xt),Qx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",10),V(G(r),"incompatibleTokens",["t","T","X"]),r}return ht(e,[{key:"parse",value:function(i,a){switch(a){case"x":return Ue(Fe.basicOptionalMinutes,i);case"xx":return Ue(Fe.basic,i);case"xxxx":return Ue(Fe.basicOptionalSeconds,i);case"xxxxx":return Ue(Fe.extendedOptionalSeconds,i);case"xxx":default:return Ue(Fe.extended,i)}}},{key:"set",value:function(i,a,s){return a.timestampIsSet?i:new Date(i.getTime()-s)}}]),e}(xt),Zx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",40),V(G(r),"incompatibleTokens","*"),r}return ht(e,[{key:"parse",value:function(i){return Xd(i)}},{key:"set",value:function(i,a,s){return[new Date(s*1e3),{timestampIsSet:!0}]}}]),e}(xt),Jx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",20),V(G(r),"incompatibleTokens","*"),r}return ht(e,[{key:"parse",value:function(i){return Xd(i)}},{key:"set",value:function(i,a,s){return[new Date(s),{timestampIsSet:!0}]}}]),e}(xt),t_={G:new vx,y:new bx,Y:new xx,R:new _x,u:new wx,Q:new Tx,q:new Sx,M:new Cx,L:new Mx,w:new kx,I:new Px,d:new Ax,D:new Lx,E:new Ix,e:new Nx,c:new Fx,i:new Bx,a:new Wx,b:new zx,B:new Yx,h:new Hx,H:new $x,K:new jx,k:new Vx,m:new qx,s:new Xx,S:new Gx,X:new Kx,x:new Qx,t:new Zx,T:new Jx},e_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,n_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,r_=/^'([^]*?)'?$/,i_=/''/g,a_=/\S/,s_=/[a-zA-Z]/;function o_(n,t,e,r){var i,a,s,o,l,c,u,d,f,p,y,x,g,m,v,b,w,T;J(3,arguments);var M=String(n),k=String(t),S=yn(),C=(i=(a=r==null?void 0:r.locale)!==null&&a!==void 0?a:S.locale)!==null&&i!==void 0?i:Yd;if(!C.match)throw new RangeError("locale must contain match property");var O=At((s=(o=(l=(c=r==null?void 0:r.firstWeekContainsDate)!==null&&c!==void 0?c:r==null||(u=r.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&l!==void 0?l:S.firstWeekContainsDate)!==null&&o!==void 0?o:(f=S.locale)===null||f===void 0||(p=f.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&s!==void 0?s:1);if(!(O>=1&&O<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var P=At((y=(x=(g=(m=r==null?void 0:r.weekStartsOn)!==null&&m!==void 0?m:r==null||(v=r.locale)===null||v===void 0||(b=v.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&g!==void 0?g:S.weekStartsOn)!==null&&x!==void 0?x:(w=S.locale)===null||w===void 0||(T=w.options)===null||T===void 0?void 0:T.weekStartsOn)!==null&&y!==void 0?y:0);if(!(P>=0&&P<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(k==="")return M===""?nt(e):new Date(NaN);var E={firstWeekContainsDate:O,weekStartsOn:P,locale:C},F=[new yx],q=k.match(n_).map(function(N){var A=N[0];if(A in Ps){var Q=Ps[A];return Q(N,C.formatLong)}return N}).join("").match(e_),$=[],Y=$d(q),I;try{var it=function(){var A=I.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&zd(A)&&Qi(A,k,n),!(r!=null&&r.useAdditionalDayOfYearTokens)&&Wd(A)&&Qi(A,k,n);var Q=A[0],X=t_[Q];if(X){var vt=X.incompatibleTokens;if(Array.isArray(vt)){var ct=$.find(function(_t){return vt.includes(_t.token)||_t.token===Q});if(ct)throw new RangeError("The format string mustn't contain `".concat(ct.fullToken,"` and `").concat(A,"` at the same time"))}else if(X.incompatibleTokens==="*"&&$.length>0)throw new RangeError("The format string mustn't contain `".concat(A,"` and any other token at the same time"));$.push({token:Q,fullToken:A});var Ot=X.run(M,A,C.match,E);if(!Ot)return{v:new Date(NaN)};F.push(Ot.setter),M=Ot.rest}else{if(Q.match(s_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Q+"`");if(A==="''"?A="'":Q==="'"&&(A=l_(A)),M.indexOf(A)===0)M=M.slice(A.length);else return{v:new Date(NaN)}}};for(Y.s();!(I=Y.n()).done;){var B=it();if(Ke(B)==="object")return B.v}}catch(N){Y.e(N)}finally{Y.f()}if(M.length>0&&a_.test(M))return new Date(NaN);var yt=F.map(function(N){return N.priority}).sort(function(N,A){return A-N}).filter(function(N,A,Q){return Q.indexOf(N)===A}).map(function(N){return F.filter(function(A){return A.priority===N}).sort(function(A,Q){return Q.subPriority-A.subPriority})}).map(function(N){return N[0]}),ut=nt(e);if(isNaN(ut.getTime()))return new Date(NaN);var z=Rd(ut,Xi(ut)),L={},U=$d(yt),j;try{for(U.s();!(j=U.n()).done;){var Z=j.value;if(!Z.validate(z,E))return new Date(NaN);var K=Z.set(z,L,E);Array.isArray(K)?(z=K[0],ux(L,K[1])):z=K}}catch(N){U.e(N)}finally{U.f()}return z}function l_(n){return n.match(r_)[1].replace(i_,"'")}function c_(n){J(1,arguments);var t=nt(n);return t.setMinutes(0,0,0),t}function u_(n){J(1,arguments);var t=nt(n);return t.setMilliseconds(0),t}function d_(n){J(1,arguments);var t=n/Qr;return Math.floor(t)}function Qd(n,t){var e;J(1,arguments);var r=At((e=t==null?void 0:t.additionalDigits)!==null&&e!==void 0?e:2);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof n=="string"||Object.prototype.toString.call(n)==="[object String]"))return new Date(NaN);var i=g_(n),a;if(i.date){var s=m_(i.date,r);a=y_(s.restDateString,s.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);var o=a.getTime(),l=0,c;if(i.time&&(l=v_(i.time),isNaN(l)))return new Date(NaN);if(i.timezone){if(c=b_(i.timezone),isNaN(c))return new Date(NaN)}else{var u=new Date(o+l),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return new Date(o+l+c)}var ta={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},f_=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,h_=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,p_=/^([+-])(\d{2})(?::?(\d{2}))?$/;function g_(n){var t={},e=n.split(ta.dateTimeDelimiter),r;if(e.length>2)return t;if(/:/.test(e[0])?r=e[0]:(t.date=e[0],r=e[1],ta.timeZoneDelimiter.test(t.date)&&(t.date=n.split(ta.timeZoneDelimiter)[0],r=n.substr(t.date.length,n.length))),r){var i=ta.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function m_(n,t){var e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=n.match(e);if(!r)return{year:NaN,restDateString:""};var i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:a===null?i:a*100,restDateString:n.slice((r[1]||r[2]).length)}}function y_(n,t){if(t===null)return new Date(NaN);var e=n.match(f_);if(!e)return new Date(NaN);var r=!!e[4],i=ei(e[1]),a=ei(e[2])-1,s=ei(e[3]),o=ei(e[4]),l=ei(e[5])-1;if(r)return S_(t,o,l)?x_(t,o,l):new Date(NaN);var c=new Date(0);return!w_(t,a,s)||!T_(t,i)?new Date(NaN):(c.setUTCFullYear(t,a,Math.max(i,s)),c)}function ei(n){return n?parseInt(n):1}function v_(n){var t=n.match(h_);if(!t)return NaN;var e=Is(t[1]),r=Is(t[2]),i=Is(t[3]);return C_(e,r,i)?e*Qr+r*Gi+i*1e3:NaN}function Is(n){return n&&parseFloat(n.replace(",","."))||0}function b_(n){if(n==="Z")return 0;var t=n.match(p_);if(!t)return 0;var e=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return M_(r,i)?e*(r*Qr+i*Gi):NaN}function x_(n,t,e){var r=new Date(0);r.setUTCFullYear(n,0,4);var i=r.getUTCDay()||7,a=(t-1)*7+e+1-i;return r.setUTCDate(r.getUTCDate()+a),r}var __=[31,null,31,30,31,30,31,31,30,31,30,31];function Zd(n){return n%400===0||n%4===0&&n%100!==0}function w_(n,t,e){return t>=0&&t<=11&&e>=1&&e<=(__[t]||(Zd(n)?29:28))}function T_(n,t){return t>=1&&t<=(Zd(n)?366:365)}function S_(n,t,e){return t>=1&&t<=53&&e>=0&&e<=6}function C_(n,t,e){return n===24?t===0&&e===0:e>=0&&e<60&&t>=0&&t<60&&n>=0&&n<25}function M_(n,t){return t>=0&&t<=59}var ee=(n=>(n.DOUGHNUT="Doughnut",n.HORIZONTAL_BAR="HorizontalBar",n.VERTICAL_BAR="VerticalBar",n.TIMESERIES_LINE="Line",n.TIMESERIES_BAR="TimeSeriesBar",n))(ee||{}),ea=(n=>(n.GAUGE="Gauge",n.TOPN="TopN",n))(ea||{}),Wt=(n=>(n.Hidden="hidden",n.Right="right",n.Bottom="bottom",n))(Wt||{}),or=(n=>(n.Hidden="hidden",n.SingleMetric="single",n.Full="full",n))(or||{});const Ns=(n,t)=>{var i,a;const{tooltip:e}=t;if(e.opacity===0&&!n.locked){n.showTooltip=!1;return}const r=n.chartTooltipSortFn||((s,o)=>o.rawValue-s.rawValue);if(e.body&&!n.locked){const s=e.labelColors,o=((a=(i=t.chart.config)==null?void 0:i.options)==null?void 0:a.indexAxis)==="y"?"x":"y",l=[ee.HORIZONTAL_BAR,ee.VERTICAL_BAR].includes(n.chartType),c=[ea.GAUGE,ee.DOUGHNUT].includes(n.chartType);n.tooltipContext=l?e.dataPoints.length>1?e.dataPoints[0].label:"":e.dataPoints[0].parsed.x,n.tooltipSeries=e.dataPoints.map((u,d)=>{const f=c?u.parsed:u.parsed[o];let p;if(n.units==="bytes")p=isNaN(f)?f:Cs(f);else{const x=n.translateUnit(n.units,f);p=`${n.units==="usd"?"$":""}${f%1===0?ra.format(f):ra.format(Number(f.toFixed(wf)))} ${x}`}const y=l&&u.dataset.label!==u.label?u.dataset.label:c?u.dataset.labels[u.dataIndex]:u.dataset.label;return{backgroundColor:s[d].backgroundColor,borderColor:s[d].borderColor,label:y,value:p,rawValue:f}}).sort(r),n.left=`${e.x}px`,n.top=`${e.y}px`,n.showTooltip=!0}},D_=n=>n&&n.datasets&&n.datasets.length,k_=n=>D_(n)&&n.datasets.some(t=>t.data.length),O_=n=>k_(n)&&n.datasets.some(t=>t.data.length>1),P_=n=>O_(n)&&n.datasets.some(t=>t.data[0]&&ks(t.data[0].x)),E_=n=>P_(n)&&n.datasets.some(t=>t.data[0]&&t.data[0].x.toString().length>=13),Fs=(n,t,e)=>{const i=Math.min(t/1150,1);return n.x<e?n.x+t*.15*(1-i):n.x-t*1.15*(1-i)},R_=(n,t,e)=>n.y<e?n.y+t*.15:n.y-t*.5;function Jd(n,t){let e;return(...r)=>{clearTimeout(e),e=window.setTimeout(()=>{n(...r)},t)}}var ge=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Us={exports:{}},tf={exports:{}};(function(n){function t(e){return e&&e.__esModule?e:{default:e}}n.exports=t,n.exports.__esModule=!0,n.exports.default=n.exports})(tf);var zt=tf.exports,Bs={exports:{}},Ws={exports:{}},ef={exports:{}};(function(n){function t(e){"@babel/helpers - typeof";return n.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},n.exports.__esModule=!0,n.exports.default=n.exports,t(e)}n.exports=t,n.exports.__esModule=!0,n.exports.default=n.exports})(ef);var nf=ef.exports,zs={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r,i){if(i.length<r)throw new TypeError(r+" argument"+(r>1?"s":"")+" required, but only "+i.length+" present")}n.exports=t.default})(zs,zs.exports);var ae=zs.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=e(nf),i=e(ae);function a(s){return(0,i.default)(1,arguments),s instanceof Date||(0,r.default)(s)==="object"&&Object.prototype.toString.call(s)==="[object Date]"}n.exports=t.default})(Ws,Ws.exports);var A_=Ws.exports,Ys={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=e(nf),i=e(ae);function a(s){(0,i.default)(1,arguments);var o=Object.prototype.toString.call(s);return s instanceof Date||(0,r.default)(s)==="object"&&o==="[object Date]"?new Date(s.getTime()):typeof s=="number"||o==="[object Number]"?new Date(s):((typeof s=="string"||o==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}n.exports=t.default})(Ys,Ys.exports);var Be=Ys.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(A_),i=e(Be),a=e(ae);function s(o){if((0,a.default)(1,arguments),!(0,r.default)(o)&&typeof o!="number")return!1;var l=(0,i.default)(o);return!isNaN(Number(l))}n.exports=t.default})(Bs,Bs.exports);var L_=Bs.exports,Hs={exports:{}},$s={exports:{}},js={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){if(r===null||r===!0||r===!1)return NaN;var i=Number(r);return isNaN(i)?i:i<0?Math.ceil(i):Math.floor(i)}n.exports=t.default})(js,js.exports);var Wn=js.exports;const I_=Bn(Wn);(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(Wn),i=e(Be),a=e(ae);function s(o,l){(0,a.default)(2,arguments);var c=(0,i.default)(o).getTime(),u=(0,r.default)(l);return new Date(c+u)}n.exports=t.default})($s,$s.exports);var N_=$s.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(N_),i=e(ae),a=e(Wn);function s(o,l){(0,i.default)(2,arguments);var c=(0,a.default)(l);return(0,r.default)(o,-c)}n.exports=t.default})(Hs,Hs.exports);var F_=Hs.exports,Vs={exports:{}},qs={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(Be),i=e(ae),a=864e5;function s(o){(0,i.default)(1,arguments);var l=(0,r.default)(o),c=l.getTime();l.setUTCMonth(0,1),l.setUTCHours(0,0,0,0);var u=l.getTime(),d=c-u;return Math.floor(d/a)+1}n.exports=t.default})(qs,qs.exports);var U_=qs.exports,Xs={exports:{}},Gs={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=e(Be),i=e(ae);function a(s){(0,i.default)(1,arguments);var o=1,l=(0,r.default)(s),c=l.getUTCDay(),u=(c<o?7:0)+c-o;return l.setUTCDate(l.getUTCDate()-u),l.setUTCHours(0,0,0,0),l}n.exports=t.default})(Gs,Gs.exports);var Ks=Gs.exports,Qs={exports:{}},Zs={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(Be),i=e(ae),a=e(Ks);function s(o){(0,i.default)(1,arguments);var l=(0,r.default)(o),c=l.getUTCFullYear(),u=new Date(0);u.setUTCFullYear(c+1,0,4),u.setUTCHours(0,0,0,0);var d=(0,a.default)(u),f=new Date(0);f.setUTCFullYear(c,0,4),f.setUTCHours(0,0,0,0);var p=(0,a.default)(f);return l.getTime()>=d.getTime()?c+1:l.getTime()>=p.getTime()?c:c-1}n.exports=t.default})(Zs,Zs.exports);var rf=Zs.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(rf),i=e(Ks),a=e(ae);function s(o){(0,a.default)(1,arguments);var l=(0,r.default)(o),c=new Date(0);c.setUTCFullYear(l,0,4),c.setUTCHours(0,0,0,0);var u=(0,i.default)(c);return u}n.exports=t.default})(Qs,Qs.exports);var B_=Qs.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=e(Be),i=e(Ks),a=e(B_),s=e(ae),o=6048e5;function l(c){(0,s.default)(1,arguments);var u=(0,r.default)(c),d=(0,i.default)(u).getTime()-(0,a.default)(u).getTime();return Math.round(d/o)+1}n.exports=t.default})(Xs,Xs.exports);var W_=Xs.exports,Js={exports:{}},to={exports:{}},zn={};Object.defineProperty(zn,"__esModule",{value:!0}),zn.getDefaultOptions=z_,zn.setDefaultOptions=Y_;var af={};function z_(){return af}function Y_(n){af=n}(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var r=e(Be),i=e(ae),a=e(Wn),s=zn;function o(l,c){var u,d,f,p,y,x,g,m;(0,i.default)(1,arguments);var v=(0,s.getDefaultOptions)(),b=(0,a.default)((u=(d=(f=(p=c==null?void 0:c.weekStartsOn)!==null&&p!==void 0?p:c==null||(y=c.locale)===null||y===void 0||(x=y.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&f!==void 0?f:v.weekStartsOn)!==null&&d!==void 0?d:(g=v.locale)===null||g===void 0||(m=g.options)===null||m===void 0?void 0:m.weekStartsOn)!==null&&u!==void 0?u:0);if(!(b>=0&&b<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var w=(0,r.default)(l),T=w.getUTCDay(),M=(T<b?7:0)+T-b;return w.setUTCDate(w.getUTCDate()-M),w.setUTCHours(0,0,0,0),w}n.exports=t.default})(to,to.exports);var eo=to.exports,no={exports:{}},ro={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=e(Be),i=e(ae),a=e(eo),s=e(Wn),o=zn;function l(c,u){var d,f,p,y,x,g,m,v;(0,i.default)(1,arguments);var b=(0,r.default)(c),w=b.getUTCFullYear(),T=(0,o.getDefaultOptions)(),M=(0,s.default)((d=(f=(p=(y=u==null?void 0:u.firstWeekContainsDate)!==null&&y!==void 0?y:u==null||(x=u.locale)===null||x===void 0||(g=x.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&p!==void 0?p:T.firstWeekContainsDate)!==null&&f!==void 0?f:(m=T.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:1);if(!(M>=1&&M<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var k=new Date(0);k.setUTCFullYear(w+1,0,M),k.setUTCHours(0,0,0,0);var S=(0,a.default)(k,u),C=new Date(0);C.setUTCFullYear(w,0,M),C.setUTCHours(0,0,0,0);var O=(0,a.default)(C,u);return b.getTime()>=S.getTime()?w+1:b.getTime()>=O.getTime()?w:w-1}n.exports=t.default})(ro,ro.exports);var sf=ro.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=e(sf),i=e(ae),a=e(eo),s=e(Wn),o=zn;function l(c,u){var d,f,p,y,x,g,m,v;(0,i.default)(1,arguments);var b=(0,o.getDefaultOptions)(),w=(0,s.default)((d=(f=(p=(y=u==null?void 0:u.firstWeekContainsDate)!==null&&y!==void 0?y:u==null||(x=u.locale)===null||x===void 0||(g=x.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&p!==void 0?p:b.firstWeekContainsDate)!==null&&f!==void 0?f:(m=b.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:1),T=(0,r.default)(c,u),M=new Date(0);M.setUTCFullYear(T,0,w),M.setUTCHours(0,0,0,0);var k=(0,a.default)(M,u);return k}n.exports=t.default})(no,no.exports);var H_=no.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=e(Be),i=e(eo),a=e(H_),s=e(ae),o=6048e5;function l(c,u){(0,s.default)(1,arguments);var d=(0,r.default)(c),f=(0,i.default)(d,u).getTime()-(0,a.default)(d,u).getTime();return Math.round(f/o)+1}n.exports=t.default})(Js,Js.exports);var $_=Js.exports,io={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r,i){for(var a=r<0?"-":"",s=Math.abs(r).toString();s.length<i;)s="0"+s;return a+s}n.exports=t.default})(io,io.exports);var of=io.exports,ao={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(of),i={y:function(o,l){var c=o.getUTCFullYear(),u=c>0?c:1-c;return(0,r.default)(l==="yy"?u%100:u,l.length)},M:function(o,l){var c=o.getUTCMonth();return l==="M"?String(c+1):(0,r.default)(c+1,2)},d:function(o,l){return(0,r.default)(o.getUTCDate(),l.length)},a:function(o,l){var c=o.getUTCHours()/12>=1?"pm":"am";switch(l){case"a":case"aa":return c.toUpperCase();case"aaa":return c;case"aaaaa":return c[0];case"aaaa":default:return c==="am"?"a.m.":"p.m."}},h:function(o,l){return(0,r.default)(o.getUTCHours()%12||12,l.length)},H:function(o,l){return(0,r.default)(o.getUTCHours(),l.length)},m:function(o,l){return(0,r.default)(o.getUTCMinutes(),l.length)},s:function(o,l){return(0,r.default)(o.getUTCSeconds(),l.length)},S:function(o,l){var c=l.length,u=o.getUTCMilliseconds(),d=Math.floor(u*Math.pow(10,c-3));return(0,r.default)(d,l.length)}},a=i;t.default=a,n.exports=t.default})(ao,ao.exports);var j_=ao.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(U_),i=e(W_),a=e(rf),s=e($_),o=e(sf),l=e(of),c=e(j_),u={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},d={G:function(m,v,b){var w=m.getUTCFullYear()>0?1:0;switch(v){case"G":case"GG":case"GGG":return b.era(w,{width:"abbreviated"});case"GGGGG":return b.era(w,{width:"narrow"});case"GGGG":default:return b.era(w,{width:"wide"})}},y:function(m,v,b){if(v==="yo"){var w=m.getUTCFullYear(),T=w>0?w:1-w;return b.ordinalNumber(T,{unit:"year"})}return c.default.y(m,v)},Y:function(m,v,b,w){var T=(0,o.default)(m,w),M=T>0?T:1-T;if(v==="YY"){var k=M%100;return(0,l.default)(k,2)}return v==="Yo"?b.ordinalNumber(M,{unit:"year"}):(0,l.default)(M,v.length)},R:function(m,v){var b=(0,a.default)(m);return(0,l.default)(b,v.length)},u:function(m,v){var b=m.getUTCFullYear();return(0,l.default)(b,v.length)},Q:function(m,v,b){var w=Math.ceil((m.getUTCMonth()+1)/3);switch(v){case"Q":return String(w);case"QQ":return(0,l.default)(w,2);case"Qo":return b.ordinalNumber(w,{unit:"quarter"});case"QQQ":return b.quarter(w,{width:"abbreviated",context:"formatting"});case"QQQQQ":return b.quarter(w,{width:"narrow",context:"formatting"});case"QQQQ":default:return b.quarter(w,{width:"wide",context:"formatting"})}},q:function(m,v,b){var w=Math.ceil((m.getUTCMonth()+1)/3);switch(v){case"q":return String(w);case"qq":return(0,l.default)(w,2);case"qo":return b.ordinalNumber(w,{unit:"quarter"});case"qqq":return b.quarter(w,{width:"abbreviated",context:"standalone"});case"qqqqq":return b.quarter(w,{width:"narrow",context:"standalone"});case"qqqq":default:return b.quarter(w,{width:"wide",context:"standalone"})}},M:function(m,v,b){var w=m.getUTCMonth();switch(v){case"M":case"MM":return c.default.M(m,v);case"Mo":return b.ordinalNumber(w+1,{unit:"month"});case"MMM":return b.month(w,{width:"abbreviated",context:"formatting"});case"MMMMM":return b.month(w,{width:"narrow",context:"formatting"});case"MMMM":default:return b.month(w,{width:"wide",context:"formatting"})}},L:function(m,v,b){var w=m.getUTCMonth();switch(v){case"L":return String(w+1);case"LL":return(0,l.default)(w+1,2);case"Lo":return b.ordinalNumber(w+1,{unit:"month"});case"LLL":return b.month(w,{width:"abbreviated",context:"standalone"});case"LLLLL":return b.month(w,{width:"narrow",context:"standalone"});case"LLLL":default:return b.month(w,{width:"wide",context:"standalone"})}},w:function(m,v,b,w){var T=(0,s.default)(m,w);return v==="wo"?b.ordinalNumber(T,{unit:"week"}):(0,l.default)(T,v.length)},I:function(m,v,b){var w=(0,i.default)(m);return v==="Io"?b.ordinalNumber(w,{unit:"week"}):(0,l.default)(w,v.length)},d:function(m,v,b){return v==="do"?b.ordinalNumber(m.getUTCDate(),{unit:"date"}):c.default.d(m,v)},D:function(m,v,b){var w=(0,r.default)(m);return v==="Do"?b.ordinalNumber(w,{unit:"dayOfYear"}):(0,l.default)(w,v.length)},E:function(m,v,b){var w=m.getUTCDay();switch(v){case"E":case"EE":case"EEE":return b.day(w,{width:"abbreviated",context:"formatting"});case"EEEEE":return b.day(w,{width:"narrow",context:"formatting"});case"EEEEEE":return b.day(w,{width:"short",context:"formatting"});case"EEEE":default:return b.day(w,{width:"wide",context:"formatting"})}},e:function(m,v,b,w){var T=m.getUTCDay(),M=(T-w.weekStartsOn+8)%7||7;switch(v){case"e":return String(M);case"ee":return(0,l.default)(M,2);case"eo":return b.ordinalNumber(M,{unit:"day"});case"eee":return b.day(T,{width:"abbreviated",context:"formatting"});case"eeeee":return b.day(T,{width:"narrow",context:"formatting"});case"eeeeee":return b.day(T,{width:"short",context:"formatting"});case"eeee":default:return b.day(T,{width:"wide",context:"formatting"})}},c:function(m,v,b,w){var T=m.getUTCDay(),M=(T-w.weekStartsOn+8)%7||7;switch(v){case"c":return String(M);case"cc":return(0,l.default)(M,v.length);case"co":return b.ordinalNumber(M,{unit:"day"});case"ccc":return b.day(T,{width:"abbreviated",context:"standalone"});case"ccccc":return b.day(T,{width:"narrow",context:"standalone"});case"cccccc":return b.day(T,{width:"short",context:"standalone"});case"cccc":default:return b.day(T,{width:"wide",context:"standalone"})}},i:function(m,v,b){var w=m.getUTCDay(),T=w===0?7:w;switch(v){case"i":return String(T);case"ii":return(0,l.default)(T,v.length);case"io":return b.ordinalNumber(T,{unit:"day"});case"iii":return b.day(w,{width:"abbreviated",context:"formatting"});case"iiiii":return b.day(w,{width:"narrow",context:"formatting"});case"iiiiii":return b.day(w,{width:"short",context:"formatting"});case"iiii":default:return b.day(w,{width:"wide",context:"formatting"})}},a:function(m,v,b){var w=m.getUTCHours(),T=w/12>=1?"pm":"am";switch(v){case"a":case"aa":return b.dayPeriod(T,{width:"abbreviated",context:"formatting"});case"aaa":return b.dayPeriod(T,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return b.dayPeriod(T,{width:"narrow",context:"formatting"});case"aaaa":default:return b.dayPeriod(T,{width:"wide",context:"formatting"})}},b:function(m,v,b){var w=m.getUTCHours(),T;switch(w===12?T=u.noon:w===0?T=u.midnight:T=w/12>=1?"pm":"am",v){case"b":case"bb":return b.dayPeriod(T,{width:"abbreviated",context:"formatting"});case"bbb":return b.dayPeriod(T,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return b.dayPeriod(T,{width:"narrow",context:"formatting"});case"bbbb":default:return b.dayPeriod(T,{width:"wide",context:"formatting"})}},B:function(m,v,b){var w=m.getUTCHours(),T;switch(w>=17?T=u.evening:w>=12?T=u.afternoon:w>=4?T=u.morning:T=u.night,v){case"B":case"BB":case"BBB":return b.dayPeriod(T,{width:"abbreviated",context:"formatting"});case"BBBBB":return b.dayPeriod(T,{width:"narrow",context:"formatting"});case"BBBB":default:return b.dayPeriod(T,{width:"wide",context:"formatting"})}},h:function(m,v,b){if(v==="ho"){var w=m.getUTCHours()%12;return w===0&&(w=12),b.ordinalNumber(w,{unit:"hour"})}return c.default.h(m,v)},H:function(m,v,b){return v==="Ho"?b.ordinalNumber(m.getUTCHours(),{unit:"hour"}):c.default.H(m,v)},K:function(m,v,b){var w=m.getUTCHours()%12;return v==="Ko"?b.ordinalNumber(w,{unit:"hour"}):(0,l.default)(w,v.length)},k:function(m,v,b){var w=m.getUTCHours();return w===0&&(w=24),v==="ko"?b.ordinalNumber(w,{unit:"hour"}):(0,l.default)(w,v.length)},m:function(m,v,b){return v==="mo"?b.ordinalNumber(m.getUTCMinutes(),{unit:"minute"}):c.default.m(m,v)},s:function(m,v,b){return v==="so"?b.ordinalNumber(m.getUTCSeconds(),{unit:"second"}):c.default.s(m,v)},S:function(m,v){return c.default.S(m,v)},X:function(m,v,b,w){var T=w._originalDate||m,M=T.getTimezoneOffset();if(M===0)return"Z";switch(v){case"X":return p(M);case"XXXX":case"XX":return y(M);case"XXXXX":case"XXX":default:return y(M,":")}},x:function(m,v,b,w){var T=w._originalDate||m,M=T.getTimezoneOffset();switch(v){case"x":return p(M);case"xxxx":case"xx":return y(M);case"xxxxx":case"xxx":default:return y(M,":")}},O:function(m,v,b,w){var T=w._originalDate||m,M=T.getTimezoneOffset();switch(v){case"O":case"OO":case"OOO":return"GMT"+f(M,":");case"OOOO":default:return"GMT"+y(M,":")}},z:function(m,v,b,w){var T=w._originalDate||m,M=T.getTimezoneOffset();switch(v){case"z":case"zz":case"zzz":return"GMT"+f(M,":");case"zzzz":default:return"GMT"+y(M,":")}},t:function(m,v,b,w){var T=w._originalDate||m,M=Math.floor(T.getTime()/1e3);return(0,l.default)(M,v.length)},T:function(m,v,b,w){var T=w._originalDate||m,M=T.getTime();return(0,l.default)(M,v.length)}};function f(g,m){var v=g>0?"-":"+",b=Math.abs(g),w=Math.floor(b/60),T=b%60;if(T===0)return v+String(w);var M=m||"";return v+String(w)+M+(0,l.default)(T,2)}function p(g,m){if(g%60===0){var v=g>0?"-":"+";return v+(0,l.default)(Math.abs(g)/60,2)}return y(g,m)}function y(g,m){var v=m||"",b=g>0?"-":"+",w=Math.abs(g),T=(0,l.default)(Math.floor(w/60),2),M=(0,l.default)(w%60,2);return b+T+v+M}var x=d;t.default=x,n.exports=t.default})(Vs,Vs.exports);var V_=Vs.exports,so={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=function(l,c){switch(l){case"P":return c.date({width:"short"});case"PP":return c.date({width:"medium"});case"PPP":return c.date({width:"long"});case"PPPP":default:return c.date({width:"full"})}},r=function(l,c){switch(l){case"p":return c.time({width:"short"});case"pp":return c.time({width:"medium"});case"ppp":return c.time({width:"long"});case"pppp":default:return c.time({width:"full"})}},i=function(l,c){var u=l.match(/(P+)(p+)?/)||[],d=u[1],f=u[2];if(!f)return e(l,c);var p;switch(d){case"P":p=c.dateTime({width:"short"});break;case"PP":p=c.dateTime({width:"medium"});break;case"PPP":p=c.dateTime({width:"long"});break;case"PPPP":default:p=c.dateTime({width:"full"});break}return p.replace("{{date}}",e(d,c)).replace("{{time}}",r(f,c))},a={p:r,P:i},s=a;t.default=s,n.exports=t.default})(so,so.exports);var q_=so.exports,oo={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){var i=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return i.setUTCFullYear(r.getFullYear()),r.getTime()-i.getTime()}n.exports=t.default})(oo,oo.exports);var lf=oo.exports;const cf=Bn(lf);var ni={};Object.defineProperty(ni,"__esModule",{value:!0}),ni.isProtectedDayOfYearToken=K_,ni.isProtectedWeekYearToken=Q_,ni.throwProtectedError=Z_;var X_=["D","DD"],G_=["YY","YYYY"];function K_(n){return X_.indexOf(n)!==-1}function Q_(n){return G_.indexOf(n)!==-1}function Z_(n,t,e){if(n==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var lo={exports:{}},co={exports:{}},uo={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},r=function(s,o,l){var c,u=e[s];return typeof u=="string"?c=u:o===1?c=u.one:c=u.other.replace("{{count}}",o.toString()),l!=null&&l.addSuffix?l.comparison&&l.comparison>0?"in "+c:c+" ago":c},i=r;t.default=i,n.exports=t.default})(uo,uo.exports);var J_=uo.exports,fo={exports:{}},ho={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){return function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=i.width?String(i.width):r.defaultWidth,s=r.formats[a]||r.formats[r.defaultWidth];return s}}n.exports=t.default})(ho,ho.exports);var tw=ho.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(tw),i={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},a={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},s={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},o={date:(0,r.default)({formats:i,defaultWidth:"full"}),time:(0,r.default)({formats:a,defaultWidth:"full"}),dateTime:(0,r.default)({formats:s,defaultWidth:"full"})},l=o;t.default=l,n.exports=t.default})(fo,fo.exports);var ew=fo.exports,po={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},r=function(s,o,l,c){return e[s]},i=r;t.default=i,n.exports=t.default})(po,po.exports);var nw=po.exports,go={exports:{}},mo={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){return function(i,a){var s=a!=null&&a.context?String(a.context):"standalone",o;if(s==="formatting"&&r.formattingValues){var l=r.defaultFormattingWidth||r.defaultWidth,c=a!=null&&a.width?String(a.width):l;o=r.formattingValues[c]||r.formattingValues[l]}else{var u=r.defaultWidth,d=a!=null&&a.width?String(a.width):r.defaultWidth;o=r.values[d]||r.values[u]}var f=r.argumentCallback?r.argumentCallback(i):i;return o[f]}}n.exports=t.default})(mo,mo.exports);var rw=mo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(rw),i={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},a={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},s={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},o={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},l={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},c={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},u=function(y,x){var g=Number(y),m=g%100;if(m>20||m<10)switch(m%10){case 1:return g+"st";case 2:return g+"nd";case 3:return g+"rd"}return g+"th"},d={ordinalNumber:u,era:(0,r.default)({values:i,defaultWidth:"wide"}),quarter:(0,r.default)({values:a,defaultWidth:"wide",argumentCallback:function(y){return y-1}}),month:(0,r.default)({values:s,defaultWidth:"wide"}),day:(0,r.default)({values:o,defaultWidth:"wide"}),dayPeriod:(0,r.default)({values:l,defaultWidth:"wide",formattingValues:c,defaultFormattingWidth:"wide"})},f=d;t.default=f,n.exports=t.default})(go,go.exports);var iw=go.exports,yo={exports:{}},vo={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(a){return function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=o.width,c=l&&a.matchPatterns[l]||a.matchPatterns[a.defaultMatchWidth],u=s.match(c);if(!u)return null;var d=u[0],f=l&&a.parsePatterns[l]||a.parsePatterns[a.defaultParseWidth],p=Array.isArray(f)?i(f,function(g){return g.test(d)}):r(f,function(g){return g.test(d)}),y;y=a.valueCallback?a.valueCallback(p):p,y=o.valueCallback?o.valueCallback(y):y;var x=s.slice(d.length);return{value:y,rest:x}}}function r(a,s){for(var o in a)if(a.hasOwnProperty(o)&&s(a[o]))return o}function i(a,s){for(var o=0;o<a.length;o++)if(s(a[o]))return o}n.exports=t.default})(vo,vo.exports);var aw=vo.exports,bo={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){return function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=i.match(r.matchPattern);if(!s)return null;var o=s[0],l=i.match(r.parsePattern);if(!l)return null;var c=r.valueCallback?r.valueCallback(l[0]):l[0];c=a.valueCallback?a.valueCallback(c):c;var u=i.slice(o.length);return{value:c,rest:u}}}n.exports=t.default})(bo,bo.exports);var sw=bo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(aw),i=e(sw),a=/^(\d+)(th|st|nd|rd)?/i,s=/\d+/i,o={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},l={any:[/^b/i,/^(a|c)/i]},c={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},u={any:[/1/i,/2/i,/3/i,/4/i]},d={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},f={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},p={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},y={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},x={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},g={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},m={ordinalNumber:(0,i.default)({matchPattern:a,parsePattern:s,valueCallback:function(w){return parseInt(w,10)}}),era:(0,r.default)({matchPatterns:o,defaultMatchWidth:"wide",parsePatterns:l,defaultParseWidth:"any"}),quarter:(0,r.default)({matchPatterns:c,defaultMatchWidth:"wide",parsePatterns:u,defaultParseWidth:"any",valueCallback:function(w){return w+1}}),month:(0,r.default)({matchPatterns:d,defaultMatchWidth:"wide",parsePatterns:f,defaultParseWidth:"any"}),day:(0,r.default)({matchPatterns:p,defaultMatchWidth:"wide",parsePatterns:y,defaultParseWidth:"any"}),dayPeriod:(0,r.default)({matchPatterns:x,defaultMatchWidth:"any",parsePatterns:g,defaultParseWidth:"any"})},v=m;t.default=v,n.exports=t.default})(yo,yo.exports);var ow=yo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(J_),i=e(ew),a=e(nw),s=e(iw),o=e(ow),l={code:"en-US",formatDistance:r.default,formatLong:i.default,formatRelative:a.default,localize:s.default,match:o.default,options:{weekStartsOn:0,firstWeekContainsDate:1}},c=l;t.default=c,n.exports=t.default})(co,co.exports);var lw=co.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(lw),i=r.default;t.default=i,n.exports=t.default})(lo,lo.exports);var cw=lo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=b;var r=e(L_),i=e(F_),a=e(Be),s=e(V_),o=e(q_),l=e(lf),c=ni,u=e(Wn),d=e(ae),f=zn,p=e(cw),y=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,x=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,g=/^'([^]*?)'?$/,m=/''/g,v=/[a-zA-Z]/;function b(T,M,k){var S,C,O,P,E,F,q,$,Y,I,it,B,yt,ut,z,L,U,j;(0,d.default)(2,arguments);var Z=String(M),K=(0,f.getDefaultOptions)(),N=(S=(C=k==null?void 0:k.locale)!==null&&C!==void 0?C:K.locale)!==null&&S!==void 0?S:p.default,A=(0,u.default)((O=(P=(E=(F=k==null?void 0:k.firstWeekContainsDate)!==null&&F!==void 0?F:k==null||(q=k.locale)===null||q===void 0||($=q.options)===null||$===void 0?void 0:$.firstWeekContainsDate)!==null&&E!==void 0?E:K.firstWeekContainsDate)!==null&&P!==void 0?P:(Y=K.locale)===null||Y===void 0||(I=Y.options)===null||I===void 0?void 0:I.firstWeekContainsDate)!==null&&O!==void 0?O:1);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Q=(0,u.default)((it=(B=(yt=(ut=k==null?void 0:k.weekStartsOn)!==null&&ut!==void 0?ut:k==null||(z=k.locale)===null||z===void 0||(L=z.options)===null||L===void 0?void 0:L.weekStartsOn)!==null&&yt!==void 0?yt:K.weekStartsOn)!==null&&B!==void 0?B:(U=K.locale)===null||U===void 0||(j=U.options)===null||j===void 0?void 0:j.weekStartsOn)!==null&&it!==void 0?it:0);if(!(Q>=0&&Q<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!N.localize)throw new RangeError("locale must contain localize property");if(!N.formatLong)throw new RangeError("locale must contain formatLong property");var X=(0,a.default)(T);if(!(0,r.default)(X))throw new RangeError("Invalid time value");var vt=(0,l.default)(X),ct=(0,i.default)(X,vt),Ot={firstWeekContainsDate:A,weekStartsOn:Q,locale:N,_originalDate:X},_t=Z.match(x).map(function(et){var bt=et[0];if(bt==="p"||bt==="P"){var Nt=o.default[bt];return Nt(et,N.formatLong)}return et}).join("").match(y).map(function(et){if(et==="''")return"'";var bt=et[0];if(bt==="'")return w(et);var Nt=s.default[bt];if(Nt)return!(k!=null&&k.useAdditionalWeekYearTokens)&&(0,c.isProtectedWeekYearToken)(et)&&(0,c.throwProtectedError)(et,M,String(T)),!(k!=null&&k.useAdditionalDayOfYearTokens)&&(0,c.isProtectedDayOfYearToken)(et)&&(0,c.throwProtectedError)(et,M,String(T)),Nt(ct,et,N.localize,Ot);if(bt.match(v))throw new RangeError("Format string contains an unescaped latin alphabet character `"+bt+"`");return et}).join("");return _t}function w(T){var M=T.match(g);return M?M[1].replace(m,"'"):T}n.exports=t.default})(Us,Us.exports);var uw=Us.exports;const dw=Bn(uw);function uf(n,t,e){var r=pw(n,e.timeZone,e.locale);return r.formatToParts?fw(r,t):hw(r,t)}function fw(n,t){for(var e=n.formatToParts(t),r=e.length-1;r>=0;--r)if(e[r].type==="timeZoneName")return e[r].value}function hw(n,t){var e=n.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(e);return r?r[0].substr(1):""}function pw(n,t,e){if(e&&!e.code)throw new Error("date-fns-tz error: Please set a language code on the locale object imported from date-fns, e.g. `locale.code = 'en-US'`");return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:t,timeZoneName:n})}function gw(n,t){var e=bw(t);return e.formatToParts?yw(e,n):vw(e,n)}var mw={year:0,month:1,day:2,hour:3,minute:4,second:5};function yw(n,t){try{for(var e=n.formatToParts(t),r=[],i=0;i<e.length;i++){var a=mw[e[i].type];a>=0&&(r[a]=parseInt(e[i].value,10))}return r}catch(s){if(s instanceof RangeError)return[NaN];throw s}}function vw(n,t){var e=n.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e);return[r[3],r[1],r[2],r[4],r[5],r[6]]}var xo={};function bw(n){if(!xo[n]){var t=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),e=t==="06/25/2014, 00:00:00"||t==="06/25/2014 00:00:00";xo[n]=e?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return xo[n]}function df(n,t,e,r,i,a,s){var o=new Date(0);return o.setUTCFullYear(n,t,e),o.setUTCHours(r,i,a,s),o}var ff=36e5,xw=6e4,_o={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function wo(n,t,e){var r,i;if(!n||(r=_o.timezoneZ.exec(n),r))return 0;var a;if(r=_o.timezoneHH.exec(n),r)return a=parseInt(r[1],10),hf(a)?-(a*ff):NaN;if(r=_o.timezoneHHMM.exec(n),r){a=parseInt(r[2],10);var s=parseInt(r[3],10);return hf(a,s)?(i=Math.abs(a)*ff+s*xw,r[1]==="+"?-i:i):NaN}if(Tw(n)){t=new Date(t||Date.now());var o=e?t:_w(t),l=To(o,n),c=e?l:ww(t,l,n);return-c}return NaN}function _w(n){return df(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function To(n,t){var e=gw(n,t),r=df(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime(),i=n.getTime(),a=i%1e3;return i-=a>=0?a:1e3+a,r-i}function ww(n,t,e){var r=n.getTime(),i=r-t,a=To(new Date(i),e);if(t===a)return t;i-=a-t;var s=To(new Date(i),e);return a===s?a:Math.max(a,s)}function hf(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}var pf={};function Tw(n){if(pf[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),pf[n]=!0,!0}catch{return!1}}var Sw=60*1e3,Cw={X:function(n,t,e,r){var i=So(r.timeZone,n);if(i===0)return"Z";switch(t){case"X":return gf(i);case"XXXX":case"XX":return lr(i);case"XXXXX":case"XXX":default:return lr(i,":")}},x:function(n,t,e,r){var i=So(r.timeZone,n);switch(t){case"x":return gf(i);case"xxxx":case"xx":return lr(i);case"xxxxx":case"xxx":default:return lr(i,":")}},O:function(n,t,e,r){var i=So(r.timeZone,n);switch(t){case"O":case"OO":case"OOO":return"GMT"+Mw(i,":");case"OOOO":default:return"GMT"+lr(i,":")}},z:function(n,t,e,r){switch(t){case"z":case"zz":case"zzz":return uf("short",n,r);case"zzzz":default:return uf("long",n,r)}}};function So(n,t){var e=n?wo(n,t,!0)/Sw:t.getTimezoneOffset();if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+n);return e}function na(n,t){for(var e=n<0?"-":"",r=Math.abs(n).toString();r.length<t;)r="0"+r;return e+r}function lr(n,t){var e=t||"",r=n>0?"-":"+",i=Math.abs(n),a=na(Math.floor(i/60),2),s=na(Math.floor(i%60),2);return r+a+e+s}function gf(n,t){if(n%60===0){var e=n>0?"-":"+";return e+na(Math.abs(n)/60,2)}return lr(n,t)}function Mw(n,t){var e=n>0?"-":"+",r=Math.abs(n),i=Math.floor(r/60),a=r%60;if(a===0)return e+String(i);var s=t||"";return e+String(i)+s+na(a,2)}var Dw=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Co=36e5,mf=6e4,kw=2,se={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:Dw};function yf(n,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(n===null)return new Date(NaN);var e=t||{},r=e.additionalDigits==null?kw:I_(e.additionalDigits);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]")return new Date(n.getTime());if(typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]")return new Date(n);if(!(typeof n=="string"||Object.prototype.toString.call(n)==="[object String]"))return new Date(NaN);var i=Ow(n),a=Pw(i.date,r),s=a.year,o=a.restDateString,l=Ew(o,s);if(isNaN(l))return new Date(NaN);if(l){var c=l.getTime(),u=0,d;if(i.time&&(u=Rw(i.time),isNaN(u)))return new Date(NaN);if(i.timeZone||e.timeZone){if(d=wo(i.timeZone||e.timeZone,new Date(c+u)),isNaN(d))return new Date(NaN)}else d=cf(new Date(c+u)),d=cf(new Date(c+u+d));return new Date(c+u+d)}else return new Date(NaN)}function Ow(n){var t={},e=se.dateTimePattern.exec(n),r;if(e?(t.date=e[1],r=e[3]):(e=se.datePattern.exec(n),e?(t.date=e[1],r=e[2]):(t.date=null,r=n)),r){var i=se.timeZone.exec(r);i?(t.time=r.replace(i[1],""),t.timeZone=i[1].trim()):t.time=r}return t}function Pw(n,t){var e=se.YYY[t],r=se.YYYYY[t],i;if(i=se.YYYY.exec(n)||r.exec(n),i){var a=i[1];return{year:parseInt(a,10),restDateString:n.slice(a.length)}}if(i=se.YY.exec(n)||e.exec(n),i){var s=i[1];return{year:parseInt(s,10)*100,restDateString:n.slice(s.length)}}return{year:null}}function Ew(n,t){if(t===null)return null;var e,r,i,a;if(n.length===0)return r=new Date(0),r.setUTCFullYear(t),r;if(e=se.MM.exec(n),e)return r=new Date(0),i=parseInt(e[1],10)-1,xf(t,i)?(r.setUTCFullYear(t,i),r):new Date(NaN);if(e=se.DDD.exec(n),e){r=new Date(0);var s=parseInt(e[1],10);return Iw(t,s)?(r.setUTCFullYear(t,0,s),r):new Date(NaN)}if(e=se.MMDD.exec(n),e){r=new Date(0),i=parseInt(e[1],10)-1;var o=parseInt(e[2],10);return xf(t,i,o)?(r.setUTCFullYear(t,i,o),r):new Date(NaN)}if(e=se.Www.exec(n),e)return a=parseInt(e[1],10)-1,_f(t,a)?vf(t,a):new Date(NaN);if(e=se.WwwD.exec(n),e){a=parseInt(e[1],10)-1;var l=parseInt(e[2],10)-1;return _f(t,a,l)?vf(t,a,l):new Date(NaN)}return null}function Rw(n){var t,e,r;if(t=se.HH.exec(n),t)return e=parseFloat(t[1].replace(",",".")),Mo(e)?e%24*Co:NaN;if(t=se.HHMM.exec(n),t)return e=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")),Mo(e,r)?e%24*Co+r*mf:NaN;if(t=se.HHMMSS.exec(n),t){e=parseInt(t[1],10),r=parseInt(t[2],10);var i=parseFloat(t[3].replace(",","."));return Mo(e,r,i)?e%24*Co+r*mf+i*1e3:NaN}return null}function vf(n,t,e){t=t||0,e=e||0;var r=new Date(0);r.setUTCFullYear(n,0,4);var i=r.getUTCDay()||7,a=t*7+e+1-i;return r.setUTCDate(r.getUTCDate()+a),r}var Aw=[31,28,31,30,31,30,31,31,30,31,30,31],Lw=[31,29,31,30,31,30,31,31,30,31,30,31];function bf(n){return n%400===0||n%4===0&&n%100!==0}function xf(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;var r=bf(n);if(r&&e>Lw[t]||!r&&e>Aw[t])return!1}return!0}function Iw(n,t){if(t<1)return!1;var e=bf(n);return!(e&&t>366||!e&&t>365)}function _f(n,t,e){return!(t<0||t>52||e!=null&&(e<0||e>6))}function Mo(n,t,e){return!(n!=null&&(n<0||n>=25)||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}var Nw=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function Do(n,t,e){var r=String(t),i=e||{},a=r.match(Nw);if(a){var s=yf(i.originalDate||n,i);r=a.reduce(function(o,l){if(l[0]==="'")return o;var c=o.indexOf(l),u=o[c-1]==="'",d=o.replace(l,"'"+Cw[l[0]](s,l,null,i)+"'");return u?d.substring(0,c-1)+d.substring(c+1):d},r)}return dw(n,r,i)}var ko={exports:{}},Oo={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r,i){if(r==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a]);return r}n.exports=t.default})(Oo,Oo.exports);var Fw=Oo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=e(Fw);function i(a){return(0,r.default)({},a)}n.exports=t.default})(ko,ko.exports);var Uw=ko.exports;const Bw=Bn(Uw);function Ww(n,t,e){var r=yf(n,e),i=wo(t,r,!0),a=new Date(r.getTime()-i),s=new Date(0);return s.setFullYear(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()),s.setHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()),s}function zw(n,t,e,r){var i=Bw(r);return i.timeZone=t,i.originalDate=n,Do(Ww(n,t),e,i)}const wf=2,Tf=10,Sf=12,ra=new Intl.NumberFormat(((cp=document==null?void 0:document.documentElement)==null?void 0:cp.lang)||"en-US");function ia(n,t={}){if(!n)return n;const e=t.tz||Intl.DateTimeFormat().resolvedOptions().timeZone;try{let r="MMM dd, YYY hh:mm a";t.short&&(r="MMM dd, YYY"),t.includeTZ&&(r+=" (z)");const i=new Date(n);return zw(i,e,r)}catch{return console.error("Invalid value passed to formatTime",n),"(invalid date)"}}const aa=10,Cf={"1XXCount|1XX|1[0-9][0-9]":{solid:"#0072E5",light:"#4DA6FF",description:"Informational"},"SuccessfulRequests|2XXCount|2XX|2[0-9][0-9]|SUCCESS":{solid:"#0BB652",light:"#6FCC83",description:"Success"},"3XXCount|3XX|3[0-9][0-9]":{solid:"#FDC53B",light:"#FFD982",description:"Redirection"},"4XXCount|4XX|4[0-9][0-9]":{solid:"#FE9439",light:"#FFBA81",description:"Client Errors"},"5XXCount|5XX|5[0-9][0-9]":{solid:"#FF4545",light:"#FF8484",description:"Server Errors"},"errorCount|FailedRequests|FAILURE":{solid:"#FF4545",light:"#FF8484",description:"Server Errors"},nonStandard:{solid:"#6f7787",light:"#e7e7ec"},standard:{solid:"#1155cb",light:"#8ab3fa"},p99:{solid:"#1356cb",light:"#1356cb"},p95:{solid:"#1fbecd",light:"#1fbecd"},p50:{solid:"#1df97d",light:"#1df97d"},LatencyP99:{solid:"#1356cb",light:"#1356cb"},LatencyP95:{solid:"#1fbecd",light:"#1fbecd"},LatencyP50:{solid:"#1df97d",light:"#1df97d"}},Qe=["#a86cd5","#6a86d2","#00bbf9","#00c4b0","#ffdf15"],cr=(n,t)=>(t||Qe)[n%Qe.length],Mf=(n,t)=>{n[0]==="#"&&(n=n.slice(1));let e=parseInt(n.substring(0,2),16),r=parseInt(n.substring(2,4),16),i=parseInt(n.substring(4,6),16);e=e-t,r=r-t,i=i-t,e>255?e=255:e<0&&(e=0),r>255?r=255:r<0&&(r=0),i>255?i=255:i<0&&(i=0);const a=e.toString(16).length===1?"0"+e.toString(16):e.toString(16),s=r.toString(16).length===1?"0"+r.toString(16):r.toString(16),o=i.toString(16).length===1?"0"+i.toString(16):i.toString(16);return`#${a}${s}${o}`},Df="#6f7787",kf={100:{background:"#f0f5fd",text:"#10599e"},200:{background:"#e5f7f4",text:"#1b6955"},300:{background:"#fff1d5",text:"#a06027"},400:{background:"#fee3b6",text:"#944d19"},500:{background:"#fedada",text:"#852021"}},Yw=n=>{var e;const t=Math.floor(parseInt(n,10)/100)*100;return((e=kf[t])==null?void 0:e.background)||"#fafafa"},Hw={SUCCESS:"#6FCC83",FAILURE:"#FF8484"},$w={"4XX":"#FFBA81","5XX":"#FF8484"},jw={LatencyP99:"#1356cb",LatencyP95:"#1fbecd",LatencyP50:"#1df97d"},Vw="#dad4c7",qw=n=>{const t=Object.entries(Cf).find(([e])=>new RegExp(e).test(n));return t&&t[1]||Cf.standard},Xw={lineTension:0,pointBorderWidth:1.2,borderJoinStyle:"round",fill:!0},Gw=2,Kw=0,Po=new Map,Eo=(n,t)=>t==="bytes"?Cs(n):t==="count/minute"?n.toFixed(2):ra.format(n),Of=n=>{const e=document.createElement("canvas").getContext("2d"),r=Rt({});return e.font=r.string,e.measureText(n).width},Qw=()=>{const n="label_height";if(!Po.has(n)){const t=Rt({});Po.set(n,t.lineHeight)}return Po.get(n)},Zw=n=>n.datasets.reduce((t,e)=>t+e.data.reduce((r,i)=>isNaN(i)?r:r+i,0),0),Pf=(n,t)=>t.datasets.reduce((e,r,i)=>n.isDatasetVisible(i)?e+r.data.reduce((a,s)=>isNaN(s)?a:a+s,0):e,0),Ef=(n,t)=>t===0?" (0.0%)":` (${(n/t*100).toFixed(1)}%)`,Ro="#e0e4ea",Jw={100:["#c8e2fd","#80bfff","#4da6ff","#1a8cff","#0072e5","#0059b2"],200:["#ceedd2","#9edca6","#89d595","#6fcc83","#44c26b","#0bb652","#0ca84a","#169643","#196e33","#1b572a"],300:["#fff4db","#ffe9b8","#ffe2a1","#ffd982","#ffd062","#fdc53b","#f4bb1e","#e8b00b","#d9a30f","#c89407"],400:["#ffead8","#ffd5b1","#ffc899","#ffba81","#ffae6b","#fe9439","#f6871d","#eb7c0c","#da700c","#cc6100"],500:["#ffd5d5","#ffb6b6","#ff9d9d","#ff8484","#ff6a6a","#ff4545","#fb1f1f","#e90b0b","#d40202","#be0202"]},ri=(n,t)=>{let e=1;const r=Jw[n],i=new Map;for(const a of t)i.set(a,r[e]),e=e%(r.length-1)+1;return i.set(-1,r[0]),i},Rf=new Map([[100,ri("100",[100,101,102,103])],[200,ri("200",[200,201,202,203,204,205,206,207,208,226])],[300,ri("300",[300,301,302,303,304,305,307,308])],[400,ri("400",[400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,421,422,423,424,425,426,428,429,431,451])],[500,ri("500",[500,501,502,503,504,505,506,507,508,510,511])]]),Ao=n=>{const t=parseInt(n,10),e=Math.floor(t/100)*100,r=Rf.get(e);return r===void 0?Ro:r.get(t)??r.get(-1)??Ro},t1=n=>{const t=Ao(n);return{solid:t,light:t}},sa={...Array.from({length:500},(n,t)=>100+t).reduce((n,t)=>(n[`${t}`]=Ao(`${t}`),n),{}),____OTHER____:"#DAD4C7","1XX":"#4DA6FF","2XX":"#6FCC83","3XX":"#FFD982","4XX":"#FFBA81","5XX":"#FF8484"};function e1(n){const t={enabled:!1,position:"barChartTooltipPosition",callbacks:{label:i=>({label:i.dataset.label,value:i.label})}};$i.positioners.barChartTooltipPosition=function(i,a){if(!i.length)return!1;const s=this.chart.canvas.getBoundingClientRect(),o=n.tooltipState.width||this.width,l=s.width/2,c=Fs(a,o,l),u=a.y,d=a.x<l?"left":"center";return{x:c-n.tooltipState.offsetX,y:u-n.tooltipState.offsetY,xAlign:d}},os.modes.customInteractionMode=function(i,a){const s=hn(a,i),o=[];return os.evaluateInteractionItems(i,i.options.indexAxis||"x",s,(l,c,u)=>{i.options.indexAxis==="y"&&l.inYRange(s.y,!0)&&i.data.datasets[c].data[u]&&o.push({element:l,datasetIndex:c,index:u}),i.options.indexAxis==="x"&&l.inXRange(s.x,!0)&&i.data.datasets[c].data[u]&&o.push({element:l,datasetIndex:c,index:u})}),o};const e=n.numLabels.value>25?Tf:Sf;return h.computed(()=>{var i,a,s,o,l,c,u,d;return{indexAxis:n.indexAxis,skipNull:!0,scales:{x:{border:{display:!1},stacked:n.stacked.value,grid:{display:!1,drawBorder:!1},ticks:{maxRotation:90,autoSkip:!1,font:e,callback:function(f,p){const y=this;if(y.chart.options.indexAxis===y.axis){f=y.getLabelForValue(p);const x=10;return f&&f.length>x?f.slice(0,x)+"...":f}return y.getLabelForValue(Number(f))}},title:{display:n.indexAxis==="y"?!st((i=n.metricAxesTitle)==null?void 0:i.value):!st((a=n.dimensionAxesTitle)==null?void 0:a.value),text:n.indexAxis==="y"?(s=n.metricAxesTitle)==null?void 0:s.value:(o=n.dimensionAxesTitle)==null?void 0:o.value,padding:{top:10},font:{weight:"bold"}}},y:{border:{display:!1},stacked:n.stacked.value,beginAtZero:!0,grid:{display:!1,drawBorder:!1},ticks:{font:e,callback:function(f,p){const y=this;return y.chart.options.indexAxis===y.axis?(f=y.getLabelForValue(p),f&&f.length>aa?f.slice(0,aa)+"...":f):y.getLabelForValue(Number(f))}},title:{display:n.indexAxis==="x"?!st((l=n.metricAxesTitle)==null?void 0:l.value):!st((c=n.dimensionAxesTitle)==null?void 0:c.value),text:n.indexAxis==="x"?(u=n.metricAxesTitle)==null?void 0:u.value:(d=n.dimensionAxesTitle)==null?void 0:d.value,padding:{bottom:20},font:{weight:"bold"}}}},plugins:{htmlLegend:{containerID:n.legendID},legend:{display:!1},tooltip:{...t,external:f=>{Ns(n.tooltipState,f)}}},interaction:{mode:"customInteractionMode",intersect:!0},maxBarThickness:60,maintainAspectRatio:!1}})}Se.register(...Cv);const n1=(n,t)=>{const e=t.datasets.map(i=>i.label),r=n.datasets.map(i=>i.label);return n.datasets.length===t.datasets.length&&e.every((i,a)=>i===r[a])};function r1(n,t,e,r,i){const a=h.shallowRef(null),s=(o,l)=>{if(t.value)return new Se(t.value,{type:n,data:o,plugins:r,options:l})};return h.onMounted(()=>{a.value=s(e.value,i.value)}),h.onBeforeUnmount(()=>{st(a.value)||a.value.destroy()}),h.watch(e,(o,l)=>{if(n1(l,o)&&!st(a.value)){for(const[c,u]of o.datasets.entries())Object.assign(a.value.data.datasets[c],u);a.value.data.labels=o.labels,a.value.update()}else st(a.value)||a.value.destroy(),a.value=s(o,i.value)}),h.watch(t,()=>{st(a.value)||a.value.destroy(),a.value=s(e.value,i.value)}),h.watch(i,(o,l)=>{(o.indexAxis!==l.indexAxis||JSON.stringify(o.scales.x.title)!==JSON.stringify(l.scales.x.title)||JSON.stringify(o.scales.y.title)!==JSON.stringify(l.scales.y.title))&&(st(a.value)||a.value.destroy(),a.value=s(e.value,o))}),a}var Af={exports:{}};(function(n){(function(){function t(c,u){if(u.separator===!1||c<1e3)return c.toString();var d=typeof u.separator=="string"?u.separator:",",f=[],p=Math.round(c).toString().split("");return p.reverse().forEach(function(y,x){x&&x%3===0&&f.push(d),f.push(y)}),f.reverse().join("")}function e(c,u,d){var f=c/u,p=d.round?"round":"floor";return d.decimal===!1?(c=Math[p](f),c.toString()):(d.precision?c=f:c=f<10?Math[p](f*10)/10:Math[p](f),c=c.toString(),typeof d.decimal=="string"&&(c=c.replace(".",d.decimal)),c)}var r=1e3,i=1e4,a=1e6,s=1e9,o=1e12;function l(c,u){var d;u=u||{};var f=c<0;f&&(c=Math.abs(c)),u.precision&&(c=parseFloat(c.toPrecision(u.precision)));var p=u.min10k?i:r;return c<p||u.precision&&u.precision>Math.log10(c)?d=t(e(c,1,u),u):c<a?d=e(c,r,u)+"k":c<s?d=e(c,a,u)+"m":c<o?d=t(e(c,s,u),u)+"b":d=t(e(c,o,u),u)+"t",f&&(d="-"+d),u.capital&&(d=d.toUpperCase()),u.prefix&&(d=u.prefix+d),u.suffix&&(d=d+u.suffix),d}l.addCommas=t,n.exports=l})()})(Af);var i1=Af.exports;const ii=Bn(i1);function a1(n,t,e){const{i18n:r}=Mt.useI18n(),{translateUnit:i}=Mt.useTranslatedUnits();return{legendValues:h.computed(()=>n.value.datasets.reduce((s,o)=>{const l=o.total?o.total:o.data.reduce((u,d)=>u+(typeof d=="number"?Number(d)||0:Number(d&&d.y)||0),0);let c;if(e.value==="bytes")c=isNaN(l)?"0":Cs(l);else{const u=i(e.value,l);c=r&&r.t("legend.datapointValueDisplay",{value:ii(l,{capital:!0,...e.value==="usd"&&{prefix:"$"}}),unit:u})||`${ii(l,{capital:!0,...e.value==="usd"&&{prefix:"$"}})} ${e.value}`}return{...s,[o.label]:{raw:l,formatted:c}}},{}))}}function s1(n){return h.computed(()=>{var i;if(!((i=n.value)!=null&&i.meta))return"";const e=n.value.meta.start_ms,r=n.value.meta.end_ms;return e&&r?`${ia(e)} - ${ia(r,{includeTZ:!0})}`:""})}function o1(n){const t={enabled:!1,position:"doughnutChartTooltipPosition",callbacks:{label:r=>({label:r.dataset.label,value:r.label})}};return $i.positioners.doughnutChartTooltipPosition=function(r,i){if(!r.length)return!1;const a=this.chart.canvas.getBoundingClientRect(),s=n.tooltipState.width||this.width,o=a.width/2,l=Fs(i,s,o),c=i.y,u=i.x<o?"left":"center";return{x:l-n.tooltipState.offsetX,y:c,xAlign:u}},{options:h.computed(()=>({responsive:!0,maintainAspectRatio:!1,plugins:{htmlLegend:{containerID:n.legendID},legend:{display:!1},tooltip:{...t,external:r=>{Ns(n.tooltipState,r)}}}}))}}function l1(n){const t=h.computed(()=>{var l,c;return{type:"timeseries",display:!0,grid:{display:!0,drawOnChartArea:!1,drawTicks:!0,drawBorder:!1},ticks:{padding:10,autoSkipPadding:100,source:"auto",maxRotation:0},title:{display:!st((l=n.dimensionAxesTitle)==null?void 0:l.value),text:(c=n.dimensionAxesTitle)==null?void 0:c.value,padding:{top:2},font:{weight:"bold"}}}}),e=h.computed(()=>{var l,c;return{title:{display:!st((l=n.metricAxesTitle)==null?void 0:l.value),text:(c=n.metricAxesTitle)==null?void 0:c.value,padding:{bottom:10},font:{weight:"bold"}},ticks:{maxTicksLimit:5},grid:{drawBorder:!1},id:"main-y-axis",beginAtZero:!0}}),r={enabled:!1,position:"lineChartTooltipPosition"};$i.positioners.lineChartTooltipPosition=function(l,c){if(!l.length||n.tooltipState.locked)return!1;const u=this.chart.canvas.getBoundingClientRect(),d=n.tooltipState.width||this.width,f=n.tooltipState.height||this.height,p=u.width/2,y=u.height/2,x=Fs(c,d,p);let g=R_(c,f,y);const m=c.y<y?"top":"bottom",v=c.x<p?"left":"center";return f>u.height&&(g=0),{x,y:g,xAlign:v,yAlign:m}};const i=h.computed(()=>{switch(n.granularity.value){case"minutely":return"minute";case"hourly":return"hour";case"daily":return"day";default:return"day"}}),a=h.computed(()=>d_(Number(n.timeRangeMs.value))>=24?"yyyy-MM-dd h:mm":"h:mm"),s=h.computed(()=>["daily","weekly"].includes(n.granularity.value)?"yyyy-MM-dd":"yyyy-MM-dd h:mm");return{options:h.computed(()=>({hover:{mode:"index",intersect:!1},elements:{point:{radius:0,hitRadius:4,hoverRadius:4}},animation:{duration:250,easing:"linear"},scales:{x:{border:{display:!1},...t.value,stacked:n.stacked.value,time:{tooltipFormat:"h:mm:ss a",unit:i.value,displayFormats:{minute:"h:mm:ss a",hour:a.value,day:s.value}}},y:{border:{display:!1},...e.value,stacked:n.stacked.value}},responsive:!0,maintainAspectRatio:!1,plugins:{htmlLegend:{containerID:n.legendID},legend:{display:!1},streaming:!1,tooltip:{...r,external:l=>{Ns(n.tooltipState,l)}}},interaction:{mode:"index",intersect:!1}}))}}function c1(n){const{isMultiMetric:t,hasDimensions:e,metricNames:r,barSegmentLabels:i,pivotRecords:a,rowLabels:s,colorPalette:o}=n,{i18n:l}=Mt.useI18n();return t?r.map(u=>({label:l&&l.te(`chartLabels.${u}`)&&l.t(`chartLabels.${u}`)||u,backgroundColor:cr(r.indexOf(u),Qe),data:s.map((d,f)=>e?a[`${d.id},${u}`]||0:a[`${f},${u}`]||null)})):Array.from(i).flatMap((u,d)=>{if(!u)return[];const f={},p=Array.isArray(o)?cr(d,o):o[u.name]||cr(d);return f[u.name]=p,{label:l&&l.te(`chartLabels.${u.name}`)&&l.t(`chartLabels.${u.name}`)||u.name,backgroundColor:p,data:s.map(y=>a[`${y.id},${u.id}`]||null)}})}function u1(n,t){const{i18n:e}=Mt.useI18n();return h.computed(()=>{try{if(t.value&&"meta"in t.value&&"data"in t.value){const i=t.value.data,{display:a,metric_names:s}=t.value.meta,o=a&&Object.keys(a),l=s&&s.length>1,c=a&&o&&o.length>0;if(!i.length||!s)return{datasets:[],labels:[]};const u=c&&o||s,d=u[0],f=u.length>1?u[1]:u[0],p=Object.fromEntries(l?i.flatMap(M=>s.map((k,S)=>{const C=M.event[d],O=c?`${C},${k}`:`${S},${k}`,P=M.event[k];return[O,P]})):i.map(M=>{const k=c?`${M.event[d]},${M.event[f]}`:`${d},${f}`,S=M.event[s[0]];return[k,S]})),y=Object.entries(p).sort(([,M],[,k])=>Number(k)-Number(M)).map(([M])=>M.split(",")[0]),x=a[d],g=a[f],m=c&&x&&Object.entries(x).map(([M,k])=>({id:M,name:k.name}))||s.map(M=>({id:M,name:M})),v=c&&g&&Object.entries(g).map(([M,k])=>({id:M,name:k.name}))||s.map(M=>({id:M,name:M}));if(d!=="status_code"&&d!=="status_code_grouped"&&(m.sort((M,k)=>y.indexOf(M.id)-y.indexOf(k.id)),v.sort((M,k)=>y.indexOf(M.id)-y.indexOf(k.id))),!m||!v)return{labels:[],datasets:[]};const b=c1({isMultiMetric:l,hasDimensions:c,metricNames:s,dimensionFieldNames:u,barSegmentLabels:v,pivotRecords:p,rowLabels:m,colorPalette:n.colorPalette||Qe});return{labels:c?m.map(M=>e&&e.te(`chartLabels.${M.name}`)&&e.t(`chartLabels.${M.name}`)||M.name):s.map(M=>e&&e.te(`chartLabels.${M}`)&&e.t(`chartLabels.${M}`)||M),datasets:b}}}catch(i){return console.error(i),{datasets:[],labels:[]}}return{labels:[],datasets:[]}})}const d1=(n,t,e=1)=>Array(Math.ceil((t-n)/e)).fill(n).map((r,i)=>r+i*e),f1=n=>{if(typeof n=="string"){const t=+n;if(t)return t;try{return Qd(n).getTime()}catch(e){if(e instanceof RangeError)return 0;throw e}}return n},h1=(n,t,e,r,i)=>{const s=Math.max(t-6e4,Math.max(...(i||[]).map(c=>new Date(c.timestamp).valueOf()))),o=Math.floor((n-r)/e)*e+r,l=Math.floor((s-r)/e)*e+r+e;return d1(o,l,e)};function p1(n,t){const{i18n:e}=Mt.useI18n();return h.computed(()=>{try{if(t.value&&"meta"in t.value&&"data"in t.value){const i=t.value.data,{display:a,metric_names:s,start_ms:o,end_ms:l}=t.value.meta;if(!s)return console.error("Cannot build chart data from this explore result. Missing metric names."),{datasets:[]};const c=a&&Object.keys(a)||s,u=c&&c[0],d=a[u],f=a&&d&&Object.keys(d).map(T=>({id:T,name:d[T].name}))||s.map(T=>({id:T,name:T})),p=t.value.meta.granularity_ms;if(typeof p!="number"||isNaN(p)||!isFinite(p)||p===0)return console.error("Invalid step value:",p),{datasets:[],labels:[]};if(!i.length)return{datasets:[],labels:[]};const y=f1(o),x=h1(o,l,p,y,i),g=new Set,m=i!=null&&i.length?i.reduce((T,M)=>{const k=new Date(M.timestamp).valueOf(),S=M.event;for(const C of s)g.add(C),k in T||(T[k]={}),C in T[k]||(T[k][C]={});for(const C of s)f.forEach(O=>{S[u]===O.id||C===O.id?(T[k][C]||(T[k][C]={}),T[k][C][O.name]=Math.round(Number(S[C])*1e3)/1e3):c.length||(T[k][C]||(T[k][C]={}),T[k][C][O.name]=Math.round(Number(S[O.id])*1e3)/1e3)});return T},{}):{},v=s.length===1?s.flatMap(T=>f.map(M=>[T,M.name])):f.map(T=>[T.name,T.name]),b={},w=[...v].map(([T,M],k)=>{const S=x.map(E=>E in m&&T in m[E]?{x:E,y:m[E][T][M]||0}:{x:E,y:0});let{colorPalette:C,fill:O}=n;st(C)&&(C=Qe);const P=Array.isArray(C)?cr(k,C):C[M]||cr(k);return b[M]=P,{rawDimension:M,rawMetric:T,label:e&&e.te(`chartLabels.${M}`)&&e.t(`chartLabels.${M}`)||M,borderColor:P,backgroundColor:P,data:S,total:S.reduce((E,{y:F})=>E+Number(F),0),...Xw,fill:O,borderWidth:O?Kw:Gw}});return w.sort((T,M)=>Number(T.total)<Number(M.total)?-1:1),{datasets:w,colorMap:b}}}catch(i){return console.error(i),{labels:[],datasets:[]}}return{labels:[],datasets:[]}})}const g1=(n,t)=>{h.watch([n,t],(e,r,i)=>{const[a,s]=e;!s||!window||(window._AnalyticsChartDataInternal||(window._AnalyticsChartDataInternal=new Map),window._AnalyticsChartDataInternal.set(s,a),i(()=>{var o;(o=window._AnalyticsChartDataInternal)==null||o.delete(s)}))},{immediate:!0})};function m1(){const{i18n:n}=Mt.useI18n();return{translateUnit:(e,r)=>{const i=r===1,a=`chartUnits.${e}`;return e==="usd"?"":n.te(a)?n.t(a,{plural:i?"":"s"}):e}}}const Mt={useBarChartOptions:e1,useChartJSCommon:r1,useChartLegendValues:a1,useChartSelectedRange:s1,useExploreResultToDatasets:u1,useExploreResultToTimeDataset:p1,useDoughnutChartOptions:o1,useLinechartOptions:l1,useI18n:Sp,useReportChartDataForSynthetics:g1,useTranslatedUnits:m1};/*!
|
|
20
20
|
* chartjs-plugin-annotation v3.0.1
|
|
21
21
|
* https://www.chartjs.org/chartjs-plugin-annotation/index
|
|
22
22
|
* (c) 2023 chartjs-plugin-annotation Contributors
|
|
23
23
|
* Released under the MIT License
|
|
24
|
-
*/const Af={modes:{point(n,t){return oa(n,t,{intersect:!0})},nearest(n,t,e){return y1(n,t,e)},x(n,t,e){return oa(n,t,{intersect:e.intersect,axis:"x"})},y(n,t,e){return oa(n,t,{intersect:e.intersect,axis:"y"})}}};function Lo(n,t,e){return(Af.modes[e.mode]||Af.modes.nearest)(n,t,e)}function g1(n,t,e){return e!=="x"&&e!=="y"?n.inRange(t.x,t.y,"x",!0)||n.inRange(t.x,t.y,"y",!0):n.inRange(t.x,t.y,e,!0)}function m1(n,t,e){return e==="x"?{x:n.x,y:t.y}:e==="y"?{x:t.x,y:n.y}:t}function oa(n,t,e){return n.visibleElements.filter(i=>e.intersect?i.inRange(t.x,t.y):g1(i,t,e.axis))}function y1(n,t,e){let i=Number.POSITIVE_INFINITY;return oa(n,t,e).reduce((r,a)=>{const s=a.getCenterPoint(),o=m1(t,s,e.axis),l=Jn(t,o);return l<i?(r=[a],i=l):l===i&&r.push(a),r},[]).sort((r,a)=>r._index-a._index).slice(0,1)}const v1=(n,t)=>t>n||n.length>t.length&&n.slice(0,t.length)===t,Yn=.001,la=(n,t,e)=>Math.min(e,Math.max(t,n));function b1(n,t,e){for(const i of Object.keys(n))n[i]=la(n[i],t,e);return n}function x1(n,t,e,i){if(!n||!t||e<=0)return!1;const r=i/2;return Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2)<=Math.pow(e+r,2)}function Lf(n,{x:t,y:e,x2:i,y2:r},a,s){const o=s/2,l=n.x>=t-o-Yn&&n.x<=i+o+Yn,c=n.y>=e-o-Yn&&n.y<=r+o+Yn;return a==="x"?l:(a==="y"||l)&&c}function ui(n,t){const{centerX:e,centerY:i}=n.getProps(["centerX","centerY"],t);return{x:e,y:i}}function _1(n,t,e,i=!0){const r=e.split(".");let a=0;for(const s of t.split(".")){const o=r[a++];if(parseInt(s,10)<parseInt(o,10))break;if(v1(o,s)){if(i)throw new Error(`${n} v${e} is not supported. v${t} or newer is required.`);return!1}}return!0}const If=n=>typeof n=="string"&&n.endsWith("%"),Nf=n=>parseFloat(n)/100,Ff=n=>la(Nf(n),0,1),ca=(n,t)=>({x:n,y:t,x2:n,y2:t,width:0,height:0}),w1={box:n=>ca(n.centerX,n.centerY),ellipse:n=>({centerX:n.centerX,centerY:n.centerX,radius:0,width:0,height:0}),label:n=>ca(n.centerX,n.centerY),line:n=>ca(n.x,n.y),point:n=>({centerX:n.centerX,centerY:n.centerY,radius:0,width:0,height:0}),polygon:n=>ca(n.centerX,n.centerY)};function Io(n,t){return t==="start"?0:t==="end"?n:If(t)?Ff(t)*n:n/2}function bn(n,t,e=!0){return typeof t=="number"?t:If(t)?(e?Ff(t):Nf(t))*n:n}function T1(n,t){const{x:e,width:i}=n,r=t.textAlign;return r==="center"?e+i/2:r==="end"||r==="right"?e+i:e}function No(n,t="center"){return lt(n)?{x:it(n.x,t),y:it(n.y,t)}:(n=it(n,t),{x:n,y:n})}function Uf(n){return n&&(de(n.xValue)||de(n.yValue))}function ar(n,t,e){const i=e.init;if(i){if(i===!0)return Wf(t,e)}else return;return S1(n,t,e)}function Bf(n,t,e){let i=!1;return t.forEach(r=>{fe(n[r])?(i=!0,e[r]=n[r]):de(e[r])&&delete e[r]}),i}function Wf(n,t){const e=t.type||"line";return w1[e](n)}function S1(n,t,e){const i=Tt(e.init,[{chart:n,properties:t,options:e}]);if(i===!0)return Wf(t,e);if(lt(i))return i}const Fo=new Map,C1=n=>isNaN(n)||n<=0,M1=n=>n.reduce(function(t,e){return t+=e.string,t},"");function ua(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object HTMLImageElement]"||t==="[object HTMLCanvasElement]"}}function Uo(n,{x:t,y:e},i){i&&(n.translate(t,e),n.rotate(Xt(i)),n.translate(-t,-e))}function xn(n,t){if(t&&t.borderWidth)return n.lineCap=t.borderCapStyle,n.setLineDash(t.borderDash),n.lineDashOffset=t.borderDashOffset,n.lineJoin=t.borderJoinStyle,n.lineWidth=t.borderWidth,n.strokeStyle=t.borderColor,!0}function di(n,t){n.shadowColor=t.backgroundShadowColor,n.shadowBlur=t.shadowBlur,n.shadowOffsetX=t.shadowOffsetX,n.shadowOffsetY=t.shadowOffsetY}function Bo(n,t){const e=t.content;if(ua(e))return{width:bn(e.width,t.width),height:bn(e.height,t.height)};const i=t.font,r=mt(i)?i.map(l=>Rt(l)):[Rt(i)],a=t.textStrokeWidth,s=mt(e)?e:[e],o=s.join()+M1(r)+a+(n._measureText?"-spriting":"");return Fo.has(o)||Fo.set(o,E1(n,s,r,a)),Fo.get(o)}function zf(n,t,e){const{x:i,y:r,width:a,height:s}=t;n.save(),di(n,e);const o=xn(n,e);n.fillStyle=e.backgroundColor,n.beginPath(),ti(n,{x:i,y:r,w:a,h:s,radius:b1(dn(e.borderRadius),0,Math.min(a,s)/2)}),n.closePath(),n.fill(),o&&(n.shadowColor=e.borderShadowColor,n.stroke()),n.restore()}function D1(n,t,e){const i=e.content;if(ua(i)){n.save(),n.globalAlpha=L1(e.opacity,i.style.opacity),n.drawImage(i,t.x,t.y,t.width,t.height),n.restore();return}const r=mt(i)?i:[i],a=e.font,s=mt(a)?a.map(d=>Rt(d)):[Rt(a)],o=e.color,l=mt(o)?o:[o],c=T1(t,e),u=t.y+e.textStrokeWidth/2;n.save(),n.textBaseline="middle",n.textAlign=e.textAlign,k1(n,e)&&R1(n,{x:c,y:u},r,s),A1(n,{x:c,y:u},r,{fonts:s,colors:l}),n.restore()}function k1(n,t){if(t.textStrokeWidth>0)return n.lineJoin="round",n.miterLimit=2,n.lineWidth=t.textStrokeWidth,n.strokeStyle=t.textStrokeColor,!0}function O1(n,t,e,i){const{radius:r,options:a}=t,s=a.pointStyle,o=a.rotation;let l=(o||0)*Ba;if(ua(s)){n.save(),n.translate(e,i),n.rotate(l),n.drawImage(s,-s.width/2,-s.height/2,s.width,s.height),n.restore();return}C1(r)||P1(n,{x:e,y:i,radius:r,rotation:o,style:s,rad:l})}function P1(n,{x:t,y:e,radius:i,rotation:r,style:a,rad:s}){let o,l,c,u;switch(n.beginPath(),a){default:n.arc(t,e,i,0,kt),n.closePath();break;case"triangle":n.moveTo(t+Math.sin(s)*i,e-Math.cos(s)*i),s+=br,n.lineTo(t+Math.sin(s)*i,e-Math.cos(s)*i),s+=br,n.lineTo(t+Math.sin(s)*i,e-Math.cos(s)*i),n.closePath();break;case"rectRounded":u=i*.516,c=i-u,o=Math.cos(s+Te)*c,l=Math.sin(s+Te)*c,n.arc(t-o,e-l,u,s-dt,s-Et),n.arc(t+l,e-o,u,s-Et,s),n.arc(t+o,e+l,u,s,s+Et),n.arc(t-l,e+o,u,s+Et,s+dt),n.closePath();break;case"rect":if(!r){c=Math.SQRT1_2*i,n.rect(t-c,e-c,2*c,2*c);break}s+=Te;case"rectRot":o=Math.cos(s)*i,l=Math.sin(s)*i,n.moveTo(t-o,e-l),n.lineTo(t+l,e-o),n.lineTo(t+o,e+l),n.lineTo(t-l,e+o),n.closePath();break;case"crossRot":s+=Te;case"cross":o=Math.cos(s)*i,l=Math.sin(s)*i,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l),n.moveTo(t+l,e-o),n.lineTo(t-l,e+o);break;case"star":o=Math.cos(s)*i,l=Math.sin(s)*i,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l),n.moveTo(t+l,e-o),n.lineTo(t-l,e+o),s+=Te,o=Math.cos(s)*i,l=Math.sin(s)*i,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l),n.moveTo(t+l,e-o),n.lineTo(t-l,e+o);break;case"line":o=Math.cos(s)*i,l=Math.sin(s)*i,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l);break;case"dash":n.moveTo(t,e),n.lineTo(t+Math.cos(s)*i,e+Math.sin(s)*i);break}n.fill()}function E1(n,t,e,i){n.save();const r=t.length;let a=0,s=i;for(let o=0;o<r;o++){const l=e[Math.min(o,e.length-1)];n.font=l.string;const c=t[o];a=Math.max(a,n.measureText(c).width+i),s+=l.lineHeight}return n.restore(),{width:a,height:s}}function R1(n,{x:t,y:e},i,r){n.beginPath();let a=0;i.forEach(function(s,o){const l=r[Math.min(o,r.length-1)],c=l.lineHeight;n.font=l.string,n.strokeText(s,t,e+c/2+a),a+=c}),n.stroke()}function A1(n,{x:t,y:e},i,{fonts:r,colors:a}){let s=0;i.forEach(function(o,l){const c=a[Math.min(l,a.length-1)],u=r[Math.min(l,r.length-1)],d=u.lineHeight;n.beginPath(),n.font=u.string,n.fillStyle=c,n.fillText(o,t,e+d/2+s),s+=d,n.fill()})}function L1(n,t){const e=un(n)?n:t;return un(e)?la(e,0,1):1}const Yf={xScaleID:{min:"xMin",max:"xMax",start:"left",end:"right",startProp:"x",endProp:"x2"},yScaleID:{min:"yMin",max:"yMax",start:"bottom",end:"top",startProp:"y",endProp:"y2"}};function fi(n,t,e){return t=typeof t=="number"?t:n.parse(t),It(t)?n.getPixelForValue(t):e}function Hn(n,t,e){const i=t[e];if(i||e==="scaleID")return i;const r=e.charAt(0),a=Object.values(n).filter(s=>s.axis&&s.axis===r);return a.length?a[0].id:r}function Hf(n,t){if(n){const e=n.options.reverse,i=fi(n,t.min,e?t.end:t.start),r=fi(n,t.max,e?t.start:t.end);return{start:i,end:r}}}function $f(n,t){const{chartArea:e,scales:i}=n,r=i[Hn(i,t,"xScaleID")],a=i[Hn(i,t,"yScaleID")];let s=e.width/2,o=e.height/2;return r&&(s=fi(r,t.xValue,r.left+r.width/2)),a&&(o=fi(a,t.yValue,a.top+a.height/2)),{x:s,y:o}}function Wo(n,t){const e=n.scales,i=e[Hn(e,t,"xScaleID")],r=e[Hn(e,t,"yScaleID")];if(!i&&!r)return{};let{left:a,right:s}=i||n.chartArea,{top:o,bottom:l}=r||n.chartArea;const c=qf(i,{min:t.xMin,max:t.xMax,start:a,end:s});a=c.start,s=c.end;const u=qf(r,{min:t.yMin,max:t.yMax,start:l,end:o});return o=u.start,l=u.end,{x:a,y:o,x2:s,y2:l,width:s-a,height:l-o,centerX:a+(s-a)/2,centerY:o+(l-o)/2}}function jf(n,t){if(!Uf(t)){const e=Wo(n,t);let i=t.radius;(!i||isNaN(i))&&(i=Math.min(e.width,e.height)/2,t.radius=i);const r=i*2,a=e.centerX+t.xAdjust,s=e.centerY+t.yAdjust;return{x:a-i,y:s-i,x2:a+i,y2:s+i,centerX:a,centerY:s,width:r,height:r,radius:i}}return N1(n,t)}function I1(n,t){const{scales:e,chartArea:i}=n,r=e[t.scaleID],a={x:i.left,y:i.top,x2:i.right,y2:i.bottom};return r?F1(r,a,t):U1(e,a,t),a}function Vf(n,t){const e=Wo(n,t);return e.initProperties=ar(n,e,t),e.elements=[{type:"label",optionScope:"label",properties:z1(n,e,t),initProperties:e.initProperties}],e}function N1(n,t){const e=$f(n,t),i=t.radius*2;return{x:e.x-t.radius+t.xAdjust,y:e.y-t.radius+t.yAdjust,x2:e.x+t.radius+t.xAdjust,y2:e.y+t.radius+t.yAdjust,centerX:e.x+t.xAdjust,centerY:e.y+t.yAdjust,radius:t.radius,width:i,height:i}}function qf(n,t){const e=Hf(n,t)||t;return{start:Math.min(e.start,e.end),end:Math.max(e.start,e.end)}}function F1(n,t,e){const i=fi(n,e.value,NaN),r=fi(n,e.endValue,i);n.isHorizontal()?(t.x=i,t.x2=r):(t.y=i,t.y2=r)}function U1(n,t,e){for(const i of Object.keys(Yf)){const r=n[Hn(n,e,i)];if(r){const{min:a,max:s,start:o,end:l,startProp:c,endProp:u}=Yf[i],d=Hf(r,{min:e[a],max:e[s],start:r[o],end:r[l]});t[c]=d.start,t[u]=d.end}}}function B1({properties:n,options:t},e,i,r){const{x:a,x2:s,width:o}=n;return Xf({start:a,end:s,size:o,borderWidth:t.borderWidth},{position:i.x,padding:{start:r.left,end:r.right},adjust:t.label.xAdjust,size:e.width})}function W1({properties:n,options:t},e,i,r){const{y:a,y2:s,height:o}=n;return Xf({start:a,end:s,size:o,borderWidth:t.borderWidth},{position:i.y,padding:{start:r.top,end:r.bottom},adjust:t.label.yAdjust,size:e.height})}function Xf(n,t){const{start:e,end:i,borderWidth:r}=n,{position:a,padding:{start:s,end:o},adjust:l}=t,c=i-r-e-s-o-t.size;return e+r/2+l+Io(c,a)}function z1(n,t,e){const i=e.label;i.backgroundColor="transparent",i.callout.display=!1;const r=No(i.position),a=Gt(i.padding),s=Bo(n.ctx,i),o=B1({properties:t,options:e},s,r,a),l=W1({properties:t,options:e},s,r,a),c=s.width+a.width,u=s.height+a.height;return{x:o,y:l,x2:o+c,y2:l+u,width:c,height:u,centerX:o+c/2,centerY:l+u/2,rotation:i.rotation}}function $n(n,t,e){const i=Math.cos(e),r=Math.sin(e),a=t.x,s=t.y;return{x:a+i*(n.x-a)-r*(n.y-s),y:s+r*(n.x-a)+i*(n.y-s)}}const zo=["enter","leave"],Yo=zo.concat("click");function Y1(n,t,e){t.listened=Bf(e,Yo,t.listeners),t.moveListened=!1,t._getElements=Lo,zo.forEach(i=>{fe(e[i])&&(t.moveListened=!0)}),(!t.listened||!t.moveListened)&&t.annotations.forEach(i=>{!t.listened&&fe(i.click)&&(t.listened=!0),t.moveListened||zo.forEach(r=>{fe(i[r])&&(t.listened=!0,t.moveListened=!0)})})}function H1(n,t,e){if(n.listened)switch(t.type){case"mousemove":case"mouseout":return $1(n,t,e);case"click":return j1(n,t,e)}}function $1(n,t,e){if(!n.moveListened)return;let i;t.type==="mousemove"?i=Lo(n,t,e.interaction):i=[];const r=n.hovered;n.hovered=i;const a={state:n,event:t};let s=Gf(a,"leave",r,i);return Gf(a,"enter",i,r)||s}function Gf({state:n,event:t},e,i,r){let a;for(const s of i)r.indexOf(s)<0&&(a=Kf(s.options[e]||n.listeners[e],s,t)||a);return a}function j1(n,t,e){const i=n.listeners,r=Lo(n,t,e.interaction);let a;for(const s of r)a=Kf(s.options.click||i.click,s,t)||a;return a}function Kf(n,t,e){return Tt(n,[t.$context,e])===!0}const da=["afterDraw","beforeDraw"];function V1(n,t,e){const i=t.visibleElements;t.hooked=Bf(e,da,t.hooks),t.hooked||i.forEach(r=>{t.hooked||da.forEach(a=>{fe(r.options[a])&&(t.hooked=!0)})})}function Qf(n,t,e){if(n.hooked){const i=t.options[e]||n.hooks[e];return Tt(i,[t.$context])}}function q1(n,t,e){const i=Z1(n.scales,t,e);let r=Zf(t,i,"min","suggestedMin");r=Zf(t,i,"max","suggestedMax")||r,r&&fe(t.handleTickRangeOptions)&&t.handleTickRangeOptions()}function X1(n,t){for(const e of n)K1(e,t)}function Zf(n,t,e,i){if(It(t[e])&&!G1(n.options,e,i)){const r=n[e]!==t[e];return n[e]=t[e],r}}function G1(n,t,e){return de(n[t])||de(n[e])}function K1(n,t){for(const e of["scaleID","xScaleID","yScaleID"]){const i=Hn(t,n,e);i&&!t[i]&&Q1(n,e)&&console.warn(`No scale found with id '${i}' for annotation '${n.id}'`)}}function Q1(n,t){if(t==="scaleID")return!0;const e=t.charAt(0);for(const i of["Min","Max","Value"])if(de(n[e+i]))return!0;return!1}function Z1(n,t,e){const i=t.axis,r=t.id,a=i+"ScaleID",s={min:it(t.min,Number.NEGATIVE_INFINITY),max:it(t.max,Number.POSITIVE_INFINITY)};for(const o of e)o.scaleID===r?Jf(o,t,["value","endValue"],s):Hn(n,o,a)===r&&Jf(o,t,[i+"Min",i+"Max",i+"Value"],s);return s}function Jf(n,t,e,i){for(const r of e){const a=n[r];if(de(a)){const s=t.parse(a);i.min=Math.min(i.min,s),i.max=Math.max(i.max,s)}}}class hi extends te{inRange(t,e,i,r){const{x:a,y:s}=$n({x:t,y:e},this.getCenterPoint(r),Xt(-this.options.rotation));return Lf({x:a,y:s},this.getProps(["x","y","x2","y2"],r),i,this.options.borderWidth)}getCenterPoint(t){return ui(this,t)}draw(t){t.save(),Uo(t,this.getCenterPoint(),this.options.rotation),zf(t,this,this.options),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return Vf(t,e)}}hi.id="boxAnnotation",hi.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:{backgroundColor:"transparent",borderWidth:0,callout:{display:!1},color:"black",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:void 0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},hi.defaultRoutes={borderColor:"color",backgroundColor:"color"},hi.descriptors={label:{_fallback:!0}};const th=["left","bottom","top","right"];class sr extends te{inRange(t,e,i,r){const{x:a,y:s}=$n({x:t,y:e},this.getCenterPoint(r),Xt(-this.rotation));return Lf({x:a,y:s},this.getProps(["x","y","x2","y2"],r),i,this.options.borderWidth)}getCenterPoint(t){return ui(this,t)}draw(t){const e=this.options,i=!de(this._visible)||this._visible;!e.display||!e.content||!i||(t.save(),Uo(t,this.getCenterPoint(),this.rotation),tT(t,this),zf(t,this,e),D1(t,oT(this),e),t.restore())}resolveElementProperties(t,e){let i;if(Uf(e))i=$f(t,e);else{const{centerX:o,centerY:l}=Wo(t,e);i={x:o,y:l}}const r=Gt(e.padding),a=Bo(t.ctx,e),s=J1(i,a,e,r);return{initProperties:ar(t,s,e),pointX:i.x,pointY:i.y,...s,rotation:e.rotation}}}sr.id="labelAnnotation",sr.defaults={adjustScaleRange:!0,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:0,callout:{borderCapStyle:"butt",borderColor:void 0,borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:1,display:!1,margin:5,position:"auto",side:5,start:"50%"},color:"black",content:null,display:!0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,init:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},sr.defaultRoutes={borderColor:"color"};function J1(n,t,e,i){const r=t.width+i.width+e.borderWidth,a=t.height+i.height+e.borderWidth,s=No(e.position,"center"),o=eh(n.x,r,e.xAdjust,s.x),l=eh(n.y,a,e.yAdjust,s.y);return{x:o,y:l,x2:o+r,y2:l+a,width:r,height:a,centerX:o+r/2,centerY:l+a/2}}function eh(n,t,e=0,i){return n-Io(t,i)+e}function tT(n,t){const{pointX:e,pointY:i,options:r}=t,a=r.callout,s=a&&a.display&&aT(t,a);if(!s||lT(t,a,s))return;if(n.save(),n.beginPath(),!xn(n,a))return n.restore();const{separatorStart:l,separatorEnd:c}=eT(t,s),{sideStart:u,sideEnd:d}=iT(t,s,l);(a.margin>0||r.borderWidth===0)&&(n.moveTo(l.x,l.y),n.lineTo(c.x,c.y)),n.moveTo(u.x,u.y),n.lineTo(d.x,d.y);const f=$n({x:e,y:i},t.getCenterPoint(),Xt(-t.rotation));n.lineTo(f.x,f.y),n.stroke(),n.restore()}function eT(n,t){const{x:e,y:i,x2:r,y2:a}=n,s=nT(n,t);let o,l;return t==="left"||t==="right"?(o={x:e+s,y:i},l={x:o.x,y:a}):(o={x:e,y:i+s},l={x:r,y:o.y}),{separatorStart:o,separatorEnd:l}}function nT(n,t){const{width:e,height:i,options:r}=n,a=r.callout.margin+r.borderWidth/2;return t==="right"?e+a:t==="bottom"?i+a:-a}function iT(n,t,e){const{y:i,width:r,height:a,options:s}=n,o=s.callout.start,l=rT(t,s.callout);let c,u;return t==="left"||t==="right"?(c={x:e.x,y:i+bn(a,o)},u={x:c.x+l,y:c.y}):(c={x:e.x+bn(r,o),y:e.y},u={x:c.x,y:c.y+l}),{sideStart:c,sideEnd:u}}function rT(n,t){const e=t.side;return n==="left"||n==="top"?-e:e}function aT(n,t){const e=t.position;return th.includes(e)?e:sT(n,t)}function sT(n,t){const{x:e,y:i,x2:r,y2:a,width:s,height:o,pointX:l,pointY:c,centerX:u,centerY:d,rotation:f}=n,p={x:u,y:d},y=t.start,x=bn(s,y),g=bn(o,y),m=[e,e+x,e+x,r],v=[i+g,a,i,a],b=[];for(let w=0;w<4;w++){const T=$n({x:m[w],y:v[w]},p,Xt(f));b.push({position:th[w],distance:Jn(T,{x:l,y:c})})}return b.sort((w,T)=>w.distance-T.distance)[0].position}function oT({x:n,y:t,width:e,height:i,options:r}){const a=r.borderWidth/2,s=Gt(r.padding);return{x:n+s.left+a,y:t+s.top+a,width:e-s.left-s.right-r.borderWidth,height:i-s.top-s.bottom-r.borderWidth}}function lT(n,t,e){const{pointX:i,pointY:r}=n,a=t.margin;let s=i,o=r;return e==="left"?s+=a:e==="right"?s-=a:e==="top"?o+=a:e==="bottom"&&(o-=a),n.inRange(s,o)}const Ho=(n,t,e)=>({x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}),$o=(n,t,e)=>Ho(t,e,Math.abs((n-t.y)/(e.y-t.y))).x,nh=(n,t,e)=>Ho(t,e,Math.abs((n-t.x)/(e.x-t.x))).y,or=n=>n*n,cT=(n,t,{x:e,y:i,x2:r,y2:a},s)=>s==="y"?{start:Math.min(i,a),end:Math.max(i,a),value:t}:{start:Math.min(e,r),end:Math.max(e,r),value:n},ih=(n,t,e,i)=>(1-i)*(1-i)*n+2*(1-i)*i*t+i*i*e,jo=(n,t,e,i)=>({x:ih(n.x,t.x,e.x,i),y:ih(n.y,t.y,e.y,i)}),rh=(n,t,e,i)=>2*(1-i)*(t-n)+2*i*(e-t),ah=(n,t,e,i)=>-Math.atan2(rh(n.x,t.x,e.x,i),rh(n.y,t.y,e.y,i))+.5*dt;class lr extends te{inRange(t,e,i,r){const a=this.options.borderWidth/2;if(i!=="x"&&i!=="y"){const s={mouseX:t,mouseY:e},{path:o,ctx:l}=this;if(o){xn(l,this.options);const{chart:u}=this.$context,d=t*u.currentDevicePixelRatio,f=e*u.currentDevicePixelRatio,p=l.isPointInStroke(o,d,f)||Vo(this,s,r);return l.restore(),p}const c=or(a);return hT(this,s,c,r)||Vo(this,s,r)}return uT(this,{mouseX:t,mouseY:e},i,{hBorderWidth:a,useFinalPosition:r})}getCenterPoint(t){return ui(this,t)}draw(t){const{x:e,y:i,x2:r,y2:a,cp:s,options:o}=this;if(t.save(),!xn(t,o))return t.restore();di(t,o);const l=Math.sqrt(Math.pow(r-e,2)+Math.pow(a-i,2));if(o.curve&&s)return _T(t,this,s,l),t.restore();const{startOpts:c,endOpts:u,startAdjust:d,endAdjust:f}=uh(this),p=Math.atan2(a-i,r-e);t.translate(e,i),t.rotate(p),t.beginPath(),t.moveTo(0+d,0),t.lineTo(l-f,0),t.shadowColor=o.borderShadowColor,t.stroke(),qo(t,0,d,c),qo(t,l,-f,u),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){const i=I1(t,e),{x:r,y:a,x2:s,y2:o}=i,l=dT(i,t.chartArea),c=l?fT({x:r,y:a},{x:s,y:o},t.chartArea):{x:r,y:a,x2:s,y2:o,width:Math.abs(s-r),height:Math.abs(o-a)};if(c.centerX=(s+r)/2,c.centerY=(o+a)/2,c.initProperties=ar(t,c,e),e.curve){const d={x:c.x,y:c.y},f={x:c.x2,y:c.y2};c.cp=xT(c,e,Jn(d,f))}const u=pT(t,c,e.label);return u._visible=l,c.elements=[{type:"label",optionScope:"label",properties:u,initProperties:c.initProperties}],c}}lr.id="lineAnnotation";const sh={backgroundColor:void 0,backgroundShadowColor:void 0,borderColor:void 0,borderDash:void 0,borderDashOffset:void 0,borderShadowColor:void 0,borderWidth:void 0,display:void 0,fill:void 0,length:void 0,shadowBlur:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,width:void 0};lr.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},sh),fill:!1,length:12,start:Object.assign({},sh),width:6},borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:2,curve:!1,controlPoint:{y:"-50%"},display:!0,endValue:void 0,init:void 0,label:{backgroundColor:"rgba(0,0,0,0.8)",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderColor:"black",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:6,borderShadowColor:"transparent",borderWidth:0,callout:Object.assign({},sr.defaults.callout),color:"#fff",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},scaleID:void 0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,value:void 0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},lr.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}},lr.defaultRoutes={borderColor:"color"};function uT(n,{mouseX:t,mouseY:e},i,{hBorderWidth:r,useFinalPosition:a}){const s=cT(t,e,n.getProps(["x","y","x2","y2"],a),i);return s.value>=s.start-r&&s.value<=s.end+r||Vo(n,{mouseX:t,mouseY:e},a,i)}function dT({x:n,y:t,x2:e,y2:i},{top:r,right:a,bottom:s,left:o}){return!(n<o&&e<o||n>a&&e>a||t<r&&i<r||t>s&&i>s)}function oh({x:n,y:t},e,{top:i,right:r,bottom:a,left:s}){return n<s&&(t=nh(s,{x:n,y:t},e),n=s),n>r&&(t=nh(r,{x:n,y:t},e),n=r),t<i&&(n=$o(i,{x:n,y:t},e),t=i),t>a&&(n=$o(a,{x:n,y:t},e),t=a),{x:n,y:t}}function fT(n,t,e){const{x:i,y:r}=oh(n,t,e),{x:a,y:s}=oh(t,n,e);return{x:i,y:r,x2:a,y2:s,width:Math.abs(a-i),height:Math.abs(s-r)}}function hT(n,{mouseX:t,mouseY:e},i=Yn,r){const{x:a,y:s,x2:o,y2:l}=n.getProps(["x","y","x2","y2"],r),c=o-a,u=l-s,d=or(c)+or(u),f=d===0?-1:((t-a)*c+(e-s)*u)/d;let p,y;return f<0?(p=a,y=s):f>1?(p=o,y=l):(p=a+f*c,y=s+f*u),or(t-p)+or(e-y)<=i}function Vo(n,{mouseX:t,mouseY:e},i,r){const a=n.label;return a.options.display&&a.inRange(t,e,r,i)}function pT(n,t,e){const i=e.borderWidth,r=Gt(e.padding),a=Bo(n.ctx,e),s=a.width+r.width+i,o=a.height+r.height+i;return mT(t,e,{width:s,height:o,padding:r},n.chartArea)}function gT(n){const{x:t,y:e,x2:i,y2:r}=n,a=Math.atan2(r-e,i-t);return a>dt/2?a-dt:a<dt/-2?a+dt:a}function mT(n,t,e,i){const{width:r,height:a,padding:s}=e,{xAdjust:o,yAdjust:l}=t,c={x:n.x,y:n.y},u={x:n.x2,y:n.y2},d=t.rotation==="auto"?gT(n):Xt(t.rotation),f=yT(r,a,d),p=vT(n,t,{labelSize:f,padding:s},i),y=n.cp?jo(c,n.cp,u,p):Ho(c,u,p),x={size:f.w,min:i.left,max:i.right,padding:s.left},g={size:f.h,min:i.top,max:i.bottom,padding:s.top},m=ch(y.x,x)+o,v=ch(y.y,g)+l;return{x:m-r/2,y:v-a/2,x2:m+r/2,y2:v+a/2,centerX:m,centerY:v,pointX:y.x,pointY:y.y,width:r,height:a,rotation:xr(d)}}function yT(n,t,e){const i=Math.cos(e),r=Math.sin(e);return{w:Math.abs(n*i)+Math.abs(t*r),h:Math.abs(n*r)+Math.abs(t*i)}}function vT(n,t,e,i){let r;const a=bT(n,i);return t.position==="start"?r=lh({w:n.x2-n.x,h:n.y2-n.y},e,t,a):t.position==="end"?r=1-lh({w:n.x-n.x2,h:n.y-n.y2},e,t,a):r=Io(1,t.position),r}function lh(n,t,e,i){const{labelSize:r,padding:a}=t,s=n.w*i.dx,o=n.h*i.dy,l=s>0&&(r.w/2+a.left-i.x)/s,c=o>0&&(r.h/2+a.top-i.y)/o;return la(Math.max(l,c),0,.25)}function bT(n,t){const{x:e,x2:i,y:r,y2:a}=n,s=Math.min(r,a)-t.top,o=Math.min(e,i)-t.left,l=t.bottom-Math.max(r,a),c=t.right-Math.max(e,i);return{x:Math.min(o,c),y:Math.min(s,l),dx:o<=c?1:-1,dy:s<=l?1:-1}}function ch(n,t){const{size:e,min:i,max:r,padding:a}=t,s=e/2;return e>r-i?(r+i)/2:(i>=n-a-s&&(n=i+a+s),r<=n+a+s&&(n=r-a-s),n)}function uh(n){const t=n.options,e=t.arrowHeads&&t.arrowHeads.start,i=t.arrowHeads&&t.arrowHeads.end;return{startOpts:e,endOpts:i,startAdjust:dh(n,e),endAdjust:dh(n,i)}}function dh(n,t){if(!t||!t.display)return 0;const{length:e,width:i}=t,r=n.options.borderWidth/2,a={x:e,y:i+r};return Math.abs($o(0,a,{x:0,y:r}))}function qo(n,t,e,i){if(!i||!i.display)return;const{length:r,width:a,fill:s,backgroundColor:o,borderColor:l}=i,c=Math.abs(t-r)+e;n.beginPath(),di(n,i),xn(n,i),n.moveTo(c,-a),n.lineTo(t+e,0),n.lineTo(c,a),s===!0?(n.fillStyle=o||l,n.closePath(),n.fill(),n.shadowColor="transparent"):n.shadowColor=i.borderShadowColor,n.stroke()}function xT(n,t,e){const{x:i,y:r,x2:a,y2:s,centerX:o,centerY:l}=n,c=Math.atan2(s-r,a-i),u=No(t.controlPoint,0),d={x:o+bn(e,u.x,!1),y:l+bn(e,u.y,!1)};return $n(d,{x:o,y:l},c)}function fh(n,{x:t,y:e},{angle:i,adjust:r},a){!a||!a.display||(n.save(),n.translate(t,e),n.rotate(i),qo(n,0,-r,a),n.restore())}function _T(n,t,e,i){const{x:r,y:a,x2:s,y2:o,options:l}=t,{startOpts:c,endOpts:u,startAdjust:d,endAdjust:f}=uh(t),p={x:r,y:a},y={x:s,y:o},x=ah(p,e,y,0),g=ah(p,e,y,1)-dt,m=jo(p,e,y,d/i),v=jo(p,e,y,1-f/i),b=new Path2D;n.beginPath(),b.moveTo(m.x,m.y),b.quadraticCurveTo(e.x,e.y,v.x,v.y),n.shadowColor=l.borderShadowColor,n.stroke(b),t.path=b,t.ctx=n,fh(n,m,{angle:x,adjust:d},c),fh(n,v,{angle:g,adjust:f},u)}class cr extends te{inRange(t,e,i,r){const a=this.options.rotation,s=this.options.borderWidth;if(i!=="x"&&i!=="y")return wT({x:t,y:e},this.getProps(["width","height","centerX","centerY"],r),a,s);const{x:o,y:l,x2:c,y2:u}=this.getProps(["x","y","x2","y2"],r),d=s/2,f=i==="y"?{start:l,end:u}:{start:o,end:c},p=$n({x:t,y:e},this.getCenterPoint(r),Xt(-a));return p[i]>=f.start-d-Yn&&p[i]<=f.end+d+Yn}getCenterPoint(t){return ui(this,t)}draw(t){const{width:e,height:i,centerX:r,centerY:a,options:s}=this;t.save(),Uo(t,this.getCenterPoint(),s.rotation),di(t,this.options),t.beginPath(),t.fillStyle=s.backgroundColor;const o=xn(t,s);t.ellipse(r,a,i/2,e/2,dt/2,0,2*dt),t.fill(),o&&(t.shadowColor=s.borderShadowColor,t.stroke()),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return Vf(t,e)}}cr.id="ellipseAnnotation",cr.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:Object.assign({},hi.defaults.label),rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},cr.defaultRoutes={borderColor:"color",backgroundColor:"color"},cr.descriptors={label:{_fallback:!0}};function wT(n,t,e,i){const{width:r,height:a,centerX:s,centerY:o}=t,l=r/2,c=a/2;if(l<=0||c<=0)return!1;const u=Xt(e||0),d=i/2||0,f=Math.cos(u),p=Math.sin(u),y=Math.pow(f*(n.x-s)+p*(n.y-o),2),x=Math.pow(p*(n.x-s)-f*(n.y-o),2);return y/Math.pow(l+d,2)+x/Math.pow(c+d,2)<=1.0001}class fa extends te{inRange(t,e,i,r){const{x:a,y:s,x2:o,y2:l,width:c}=this.getProps(["x","y","x2","y2","width"],r),u=this.options.borderWidth;if(i!=="x"&&i!=="y")return x1({x:t,y:e},this.getCenterPoint(r),c/2,u);const d=u/2,f=i==="y"?{start:s,end:l,value:e}:{start:a,end:o,value:t};return f.value>=f.start-d&&f.value<=f.end+d}getCenterPoint(t){return ui(this,t)}draw(t){const e=this.options,i=e.borderWidth;if(e.radius<.1)return;t.save(),t.fillStyle=e.backgroundColor,di(t,e);const r=xn(t,e);O1(t,this,this.centerX,this.centerY),r&&!ua(e.pointStyle)&&(t.shadowColor=e.borderShadowColor,t.stroke()),t.restore(),e.borderWidth=i}resolveElementProperties(t,e){const i=jf(t,e);return i.initProperties=ar(t,i,e),i}}fa.id="pointAnnotation",fa.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,pointStyle:"circle",radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},fa.defaultRoutes={borderColor:"color",backgroundColor:"color"};class ha extends te{inRange(t,e,i,r){if(i!=="x"&&i!=="y")return this.options.radius>=.1&&this.elements.length>1&&ST(this.elements,t,e,r);const a=$n({x:t,y:e},this.getCenterPoint(r),Xt(-this.options.rotation)),s=this.elements.map(c=>i==="y"?c.bY:c.bX),o=Math.min(...s),l=Math.max(...s);return a[i]>=o&&a[i]<=l}getCenterPoint(t){return ui(this,t)}draw(t){const{elements:e,options:i}=this;t.save(),t.beginPath(),t.fillStyle=i.backgroundColor,di(t,i);const r=xn(t,i);let a=!0;for(const s of e)a?(t.moveTo(s.x,s.y),a=!1):t.lineTo(s.x,s.y);t.closePath(),t.fill(),r&&(t.shadowColor=i.borderShadowColor,t.stroke()),t.restore()}resolveElementProperties(t,e){const i=jf(t,e),{sides:r,rotation:a}=e,s=[],o=2*dt/r;let l=a*Ba;for(let c=0;c<r;c++,l+=o){const u=TT(i,e,l);u.initProperties=ar(t,i,e),s.push(u)}return i.elements=s,i}}ha.id="polygonAnnotation",ha.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,point:{radius:0},radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,sides:3,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},ha.defaultRoutes={borderColor:"color",backgroundColor:"color"};function TT({centerX:n,centerY:t},{radius:e,borderWidth:i},r){const a=i/2,s=Math.sin(r),o=Math.cos(r),l={x:n+s*e,y:t-o*e};return{type:"point",optionScope:"point",properties:{x:l.x,y:l.y,centerX:l.x,centerY:l.y,bX:n+s*(e+a),bY:t-o*(e+a)}}}function ST(n,t,e,i){let r=!1,a=n[n.length-1].getProps(["bX","bY"],i);for(const s of n){const o=s.getProps(["bX","bY"],i);o.bY>e!=a.bY>e&&t<(a.bX-o.bX)*(e-o.bY)/(a.bY-o.bY)+o.bX&&(r=!r),a=o}return r}const _n={box:hi,ellipse:cr,label:sr,line:lr,point:fa,polygon:ha};Object.keys(_n).forEach(n=>{Ut.describe(`elements.${_n[n].id}`,{_fallback:"plugins.annotation.common"})});const CT={update:Object.assign},MT=Yo.concat(da),hh=(n,t)=>lt(t)?Ko(n,t):n,Xo=n=>n==="color"||n==="font";function Go(n="line"){return _n[n]?n:(console.warn(`Unknown annotation type: '${n}', defaulting to 'line'`),"line")}function DT(n,t,e,i){const r=OT(n,e.animations,i),a=t.annotations,s=RT(t.elements,a);for(let o=0;o<a.length;o++){const l=a[o],c=ph(s,o,l.type),u=l.setContext(ET(n,c,l)),d=c.resolveElementProperties(n,u);d.skip=kT(d),"elements"in d&&(PT(c,d.elements,u,r),delete d.elements),de(c.x)||Object.assign(c,d),Object.assign(c,d.initProperties),d.options=gh(u),r.update(c,d)}}function kT(n){return isNaN(n.x)||isNaN(n.y)}function OT(n,t,e){return e==="reset"||e==="none"||e==="resize"?CT:new Ja(n,t)}function PT(n,t,e,i){const r=n.elements||(n.elements=[]);r.length=t.length;for(let a=0;a<t.length;a++){const s=t[a],o=s.properties,l=ph(r,a,s.type,s.initProperties),c=e[s.optionScope].override(s);o.options=gh(c),i.update(l,o)}}function ph(n,t,e,i){const r=_n[Go(e)];let a=n[t];return(!a||!(a instanceof r))&&(a=n[t]=new r,Object.assign(a,i)),a}function gh(n){const t=_n[Go(n.type)],e={};e.id=n.id,e.type=n.type,e.drawTime=n.drawTime,Object.assign(e,Ko(n,t.defaults),Ko(n,t.defaultRoutes));for(const i of MT)e[i]=n[i];return e}function Ko(n,t){const e={};for(const i of Object.keys(t)){const r=t[i],a=n[i];Xo(i)&&mt(a)?e[i]=a.map(s=>hh(s,r)):e[i]=hh(a,r)}return e}function ET(n,t,e){return t.$context||(t.$context=Object.assign(Object.create(n.getContext()),{element:t,id:e.id,type:"annotation"}))}function RT(n,t){const e=t.length,i=n.length;if(i<e){const r=e-i;n.splice(i,0,...new Array(r))}else i>e&&n.splice(e,i-e);return n}var AT="3.0.1";const wn=new Map,LT=Yo.concat(da);var mh={id:"annotation",version:AT,beforeRegister(){_1("chart.js","4.0",Se.version)},afterRegister(){Se.register(_n)},afterUnregister(){Se.unregister(_n)},beforeInit(n){wn.set(n,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:!1,moveListened:!1,hooks:{},hooked:!1,hovered:[]})},beforeUpdate(n,t,e){const i=wn.get(n),r=i.annotations=[];let a=e.annotations;lt(a)?Object.keys(a).forEach(s=>{const o=a[s];lt(o)&&(o.id=s,r.push(o))}):mt(a)&&r.push(...a),X1(r,n.scales)},afterDataLimits(n,t){const e=wn.get(n);q1(n,t.scale,e.annotations.filter(i=>i.display&&i.adjustScaleRange))},afterUpdate(n,t,e){const i=wn.get(n);Y1(n,i,e),DT(n,i,e,t.mode),i.visibleElements=i.elements.filter(r=>!r.skip&&r.options.display),V1(n,i,e)},beforeDatasetsDraw(n,t,e){pa(n,"beforeDatasetsDraw",e.clip)},afterDatasetsDraw(n,t,e){pa(n,"afterDatasetsDraw",e.clip)},beforeDraw(n,t,e){pa(n,"beforeDraw",e.clip)},afterDraw(n,t,e){pa(n,"afterDraw",e.clip)},beforeEvent(n,t,e){const i=wn.get(n);H1(i,t.event,e)&&(t.changed=!0)},afterDestroy(n){wn.delete(n)},_getState(n){return wn.get(n)},defaults:{animations:{numbers:{properties:["x","y","x2","y2","width","height","centerX","centerY","pointX","pointY","radius"],type:"number"}},clip:!0,interaction:{mode:void 0,axis:void 0,intersect:void 0},common:{drawTime:"afterDatasetsDraw",init:!1,label:{}}},descriptors:{_indexable:!1,_scriptable:n=>!LT.includes(n)&&n!=="init",annotations:{_allKeys:!1,_fallback:(n,t)=>`elements.${_n[Go(t.type)].id}`},interaction:{_fallback:!0},common:{label:{_indexable:Xo,_fallback:!0},_indexable:Xo}},additionalOptionScopes:[""]};function pa(n,t,e){const{ctx:i,chartArea:r}=n,a=wn.get(n);e&&Pi(i,r);const s=IT(a.visibleElements,t).sort((o,l)=>o.element.options.z-l.element.options.z);for(const o of s)NT(i,r,a,o);e&&Ei(i)}function IT(n,t){const e=[];for(const i of n)if(i.options.drawTime===t&&e.push({element:i,main:!0}),i.elements&&i.elements.length)for(const r of i.elements)r.options.display&&r.options.drawTime===t&&e.push({element:r});return e}function NT(n,t,e,i){const r=i.element;i.main?(Qf(e,r,"beforeDraw"),r.draw(n,t),Qf(e,r,"afterDraw")):r.draw(n,t)}const ga="24px",yh=(n,t)=>{const e=n.__vccOpts||n;for(const[i,r]of t)e[i]=r;return e},FT=n=>(h.pushScopeId("data-v-41995a30"),n=n(),h.popScopeId(),n),UT=["aria-hidden"],BT={key:0,"data-testid":"kui-icon-svg-title"},WT=FT(()=>h.createElementVNode("path",{d:"M9 20C8.45 20 7.97917 19.8042 7.5875 19.4125C7.19583 19.0208 7 18.55 7 18C7 17.45 7.19583 16.9792 7.5875 16.5875C7.97917 16.1958 8.45 16 9 16C9.55 16 10.0208 16.1958 10.4125 16.5875C10.8042 16.9792 11 17.45 11 18C11 18.55 10.8042 19.0208 10.4125 19.4125C10.0208 19.8042 9.55 20 9 20ZM15 20C14.45 20 13.9792 19.8042 13.5875 19.4125C13.1958 19.0208 13 18.55 13 18C13 17.45 13.1958 16.9792 13.5875 16.5875C13.9792 16.1958 14.45 16 15 16C15.55 16 16.0208 16.1958 16.4125 16.5875C16.8042 16.9792 17 17.45 17 18C17 18.55 16.8042 19.0208 16.4125 19.4125C16.0208 19.8042 15.55 20 15 20ZM9 14C8.45 14 7.97917 13.8042 7.5875 13.4125C7.19583 13.0208 7 12.55 7 12C7 11.45 7.19583 10.9792 7.5875 10.5875C7.97917 10.1958 8.45 10 9 10C9.55 10 10.0208 10.1958 10.4125 10.5875C10.8042 10.9792 11 11.45 11 12C11 12.55 10.8042 13.0208 10.4125 13.4125C10.0208 13.8042 9.55 14 9 14ZM15 14C14.45 14 13.9792 13.8042 13.5875 13.4125C13.1958 13.0208 13 12.55 13 12C13 11.45 13.1958 10.9792 13.5875 10.5875C13.9792 10.1958 14.45 10 15 10C15.55 10 16.0208 10.1958 16.4125 10.5875C16.8042 10.9792 17 11.45 17 12C17 12.55 16.8042 13.0208 16.4125 13.4125C16.0208 13.8042 15.55 14 15 14ZM9 8C8.45 8 7.97917 7.80417 7.5875 7.4125C7.19583 7.02083 7 6.55 7 6C7 5.45 7.19583 4.97917 7.5875 4.5875C7.97917 4.19583 8.45 4 9 4C9.55 4 10.0208 4.19583 10.4125 4.5875C10.8042 4.97917 11 5.45 11 6C11 6.55 10.8042 7.02083 10.4125 7.4125C10.0208 7.80417 9.55 8 9 8ZM15 8C14.45 8 13.9792 7.80417 13.5875 7.4125C13.1958 7.02083 13 6.55 13 6C13 5.45 13.1958 4.97917 13.5875 4.5875C13.9792 4.19583 14.45 4 15 4C15.55 4 16.0208 4.19583 16.4125 4.5875C16.8042 4.97917 17 5.45 17 6C17 6.55 16.8042 7.02083 16.4125 7.4125C16.0208 7.80417 15.55 8 15 8Z",fill:"currentColor"},null,-1)),zT=yh(h.defineComponent({__name:"DragIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:ga,validator:n=>{if(typeof n=="number"&&n>0)return!0;if(typeof n=="string"){const t=String(n).replace(/px/gi,""),e=Number(t);if(e&&!isNaN(e)&&Number.isInteger(e)&&e>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(n){const t=n,e=h.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const r=String(t.size).replace(/px/gi,""),a=Number(r);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return ga}),i=h.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,flexShrink:"0",height:e.value,lineHeight:"0",width:e.value}));return(r,a)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(n.as),{"aria-hidden":n.decorative?"true":void 0,class:"kui-icon drag-icon","data-testid":"kui-icon-wrapper-drag-icon",style:h.normalizeStyle(i.value)},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock("svg",{"aria-hidden":n.decorative?"true":void 0,"data-testid":"kui-icon-svg-drag-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[n.title?(h.openBlock(),h.createElementBlock("title",BT,h.toDisplayString(n.title),1)):h.createCommentVNode("",!0),WT],8,UT))]),_:1},8,["aria-hidden","style"]))}}),[["__scopeId","data-v-41995a30"]]),YT=n=>(h.pushScopeId("data-v-1a0beec9"),n=n(),h.popScopeId(),n),HT=["aria-hidden"],$T={key:0,"data-testid":"kui-icon-svg-title"},jT=YT(()=>h.createElementVNode("path",{d:"M12.025 22.05C11.7583 22.05 11.5042 22 11.2625 21.9C11.0208 21.8 10.8 21.6583 10.6 21.475L2.575 13.45C2.39167 13.25 2.25 13.0292 2.15 12.7875C2.05 12.5458 2 12.2917 2 12.025C2 11.7583 2.05 11.5 2.15 11.25C2.25 11 2.39167 10.7833 2.575 10.6L10.6 2.575C10.8 2.375 11.0208 2.22917 11.2625 2.1375C11.5042 2.04583 11.7583 2 12.025 2C12.2917 2 12.55 2.04583 12.8 2.1375C13.05 2.22917 13.2667 2.375 13.45 2.575L21.475 10.6C21.675 10.7833 21.8208 11 21.9125 11.25C22.0042 11.5 22.05 11.7583 22.05 12.025C22.05 12.2917 22.0042 12.5458 21.9125 12.7875C21.8208 13.0292 21.675 13.25 21.475 13.45L13.45 21.475C13.2667 21.6583 13.05 21.8 12.8 21.9C12.55 22 12.2917 22.05 12.025 22.05ZM11.025 13.025H13.025V7.025H11.025V13.025ZM12.025 16.025C12.3083 16.025 12.5458 15.9292 12.7375 15.7375C12.9292 15.5458 13.025 15.3083 13.025 15.025C13.025 14.7417 12.9292 14.5042 12.7375 14.3125C12.5458 14.1208 12.3083 14.025 12.025 14.025C11.7417 14.025 11.5042 14.1208 11.3125 14.3125C11.1208 14.5042 11.025 14.7417 11.025 15.025C11.025 15.3083 11.1208 15.5458 11.3125 15.7375C11.5042 15.9292 11.7417 16.025 12.025 16.025Z",fill:"currentColor"},null,-1)),VT=yh(h.defineComponent({__name:"WarningIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:ga,validator:n=>{if(typeof n=="number"&&n>0)return!0;if(typeof n=="string"){const t=String(n).replace(/px/gi,""),e=Number(t);if(e&&!isNaN(e)&&Number.isInteger(e)&&e>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(n){const t=n,e=h.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const r=String(t.size).replace(/px/gi,""),a=Number(r);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return ga}),i=h.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,flexShrink:"0",height:e.value,lineHeight:"0",width:e.value}));return(r,a)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(n.as),{"aria-hidden":n.decorative?"true":void 0,class:"kui-icon warning-icon","data-testid":"kui-icon-wrapper-warning-icon",style:h.normalizeStyle(i.value)},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock("svg",{"aria-hidden":n.decorative?"true":void 0,"data-testid":"kui-icon-svg-warning-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[n.title?(h.openBlock(),h.createElementBlock("title",$T,h.toDisplayString(n.title),1)):h.createCommentVNode("",!0),jT],8,HT))]),_:1},8,["aria-hidden","style"]))}}),[["__scopeId","data-v-1a0beec9"]]),qT="#6c7489",XT="#995c00",GT="20px",vh="24px",KT="40px",QT="48px",ZT={class:"tooltip-title"},JT={class:"title font-bold"},tS={key:1,class:"subtitle"},eS={class:"tooltip"},nS={key:0},iS={class:"display-label"},rS={class:"display-value"},aS=h.defineComponent({__name:"ChartTooltip",props:{showTooltip:{type:Boolean,required:!0,default:!1},left:{type:String,required:!1,default:null},top:{type:String,required:!1,default:null},tooltipTitle:{type:String,required:!1,default:""},context:{type:[String,Number],required:!1,default:""},series:{type:Array,required:!0,default:()=>[]},locked:{type:Boolean,required:!1,default:!1}},emits:["dimensions","top","left"],setup(n,{emit:t}){const e=t,i=n,r=h.ref(null),a=h.ref(!1),s=h.ref({x:0,y:0}),o=h.ref({x:0,y:0}),l=h.ref({left:i.left,top:i.top});h.watch(r,p=>{if(p){const{width:y,height:x}=p.getBoundingClientRect();e("dimensions",{width:y,height:x})}}),h.watch(()=>i.locked,p=>{p?(l.value.left=i.left,l.value.top=i.top):p===!1&&(e("top",l.value.top),e("left",l.value.left))});function c(p){if(r.value){a.value=!0;const y=window.getComputedStyle(r.value),x=y.transform||y.webkitTransform||y.mozTransform,g=new DOMMatrix(x),m=g.m41,v=g.m42;s.value={x:m,y:v},o.value={x:p.clientX,y:p.clientY},window.addEventListener("mousemove",d),window.addEventListener("mouseup",f)}}let u=null;function d(p){p.preventDefault(),p.stopPropagation(),a.value&&(u!==null&&window.cancelAnimationFrame(u),u=window.requestAnimationFrame(()=>{const y=p.clientX-o.value.x,x=p.clientY-o.value.y;l.value.left=`${s.value.x+y}px`,l.value.top=`${s.value.y+x}px`}))}function f(){a.value=!1,u!==null&&window.cancelAnimationFrame(u),window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",f)}return(p,y)=>n.showTooltip?(h.openBlock(),h.createElementBlock("div",{key:0,ref_key:"tooltipEl",ref:r,class:h.normalizeClass(["tooltip-container",{locked:n.locked}]),style:h.normalizeStyle({transform:n.locked?`translate(${l.value.left}, ${l.value.top})`:`translate(${n.left}, ${n.top})`,left:"0",top:"0",pointerEvents:n.locked?"all":"none"}),onMousedown:c},[h.createElementVNode("div",ZT,[h.createElementVNode("span",JT,h.toDisplayString(n.tooltipTitle),1),n.locked?(h.openBlock(),h.createBlock(h.unref(zT),{key:0,class:"drag-icon",color:h.unref(qT)},null,8,["color"])):h.createCommentVNode("",!0),n.context?(h.openBlock(),h.createElementBlock("span",tS,h.toDisplayString(n.context),1)):h.createCommentVNode("",!0)]),h.createElementVNode("ul",eS,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.series,({backgroundColor:x,borderColor:g,label:m,value:v})=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:m},[n.series.length?(h.openBlock(),h.createElementBlock("li",nS,[h.createElementVNode("div",{class:"square-marker",style:h.normalizeStyle({background:x,"border-color":g})},null,4),h.createElementVNode("span",iS,h.toDisplayString(m),1),h.createElementVNode("span",rS,h.toDisplayString(v),1)])):h.createCommentVNode("",!0)],64))),128))])],38)):h.createCommentVNode("",!0)}}),Ze=(n,t)=>{const e=n.__vccOpts||n;for(const[i,r]of t)e[i]=r;return e},Qo=Ze(aS,[["__scopeId","data-v-b0247af7"]]),sS=["onClick"],oS=["title"],lS={key:0,class:"sub-label"},Zo=Ze(h.defineComponent({__name:"ChartLegend",props:{id:{type:String,required:!0},items:{type:Object,required:!0},chartInstance:{type:Object,required:!1,default:()=>null}},setup(n){h.useCssVars(b=>({"143d7c82":o.value}));const t=n,e=h.ref(),i=h.ref([]),r=h.inject("showLegendValues",!0),a=h.inject("legendPosition",h.ref(Wt.Right)),s=h.ref([]),o=h.ref(vh),l=()=>{const b=e.value;if(!b||!i.value||b.children.length===0)return 0;const w=b.children[0].getBoundingClientRect().top;for(const T of i.value)if(T.getBoundingClientRect().top>w)return!0;return!1},c=h.computed(()=>t.items.length>2||a.value===Wt.Right),u=()=>{e.value&&a.value===Wt.Bottom&&(l()?o.value=QT:o.value=vh)},d=()=>{if(e.value&&a.value===Wt.Bottom){let b=0;i.value.forEach(T=>{const M=Array.from(T.children).reduce((k,S)=>k+S.offsetWidth,0);M>b&&(b=M)});const w=parseInt(KT,10);e.value.style.gridTemplateColumns=`repeat(auto-fit, ${b+w}px)`}u()},f=()=>{if(t.items.length!==s.value.length)return s.value=t.items,!0;for(let b=0;b<t.items.length;b++)if(t.items[b].text!==s.value[b].text)return s.value=t.items,!0;return!1};h.watch(()=>t.items,()=>{f()&&d()},{immediate:!0,flush:"post"});const p=h.ref(0),y=h.ref(0),x=new ResizeObserver(Zd(b=>{const w=b[0],T=w.contentRect.width,M=w.contentRect.height;T!==p.value&&M===y.value&&d(),p.value=T,y.value=M},100));h.watch(()=>a.value,()=>{d()}),h.onMounted(()=>{s.value=t.items,e.value&&x.observe(e.value),window.requestAnimationFrame(()=>{d()})}),h.onBeforeUnmount(()=>{e.value&&x.unobserve(e.value)});const g=(b=0,w)=>{if(t.chartInstance===null)return;const T=t.chartInstance instanceof Se?t.chartInstance:t.chartInstance.chart;m(b,w)?T.hide(b,w):T.show(b,w),T.update()},m=(b=0,w)=>{if(t.chartInstance===null||t.chartInstance.chart===null)return!0;const T=t.chartInstance instanceof Se?t.chartInstance:t.chartInstance.chart,M=T.getDatasetMeta(b);return M.dataset||w===void 0?T.isDatasetVisible(b):!(M.data.length&&M.data[w].hidden)},v=b=>({[Wt.Right]:"vertical",[Wt.Bottom]:"horizontal",[Wt.Hidden]:"hidden"})[b];return(b,w)=>h.unref(a)!==h.unref(Wt).Hidden?(h.openBlock(),h.createElementBlock("ul",{key:0,ref_key:"legendContainerRef",ref:e,class:h.normalizeClass(["legend-container",v(h.unref(a))]),"data-testid":"legend"},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.items,({fillStyle:T,strokeStyle:M,text:k,datasetIndex:S,index:C,value:O})=>(h.openBlock(),h.createElementBlock("li",{key:k,ref_for:!0,ref_key:"legendItemsRef",ref:i,onClick:P=>g(S,C)},[h.createElementVNode("div",{class:"square-marker",style:h.normalizeStyle({background:T,"border-color":M})},null,4),h.createElementVNode("div",{class:h.normalizeClass(["label-container",{"strike-through":!m(S,C)}])},[h.createElementVNode("div",{class:h.normalizeClass(["label",{"truncate-label":c.value}]),title:k},h.toDisplayString(k),11,oS),O&&h.unref(r)?(h.openBlock(),h.createElementBlock("div",lS,h.toDisplayString(O.formatted),1)):h.createCommentVNode("",!0)],2)],8,sS))),128))],2)):h.createCommentVNode("",!0)}}),[["__scopeId","data-v-bf35eae8"]]);let ma;const cS=new Uint8Array(16);function uS(){if(!ma&&(ma=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ma))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ma(cS)}const ne=[];for(let n=0;n<256;++n)ne.push((n+256).toString(16).slice(1));function dS(n,t=0){return ne[n[t+0]]+ne[n[t+1]]+ne[n[t+2]]+ne[n[t+3]]+"-"+ne[n[t+4]]+ne[n[t+5]]+"-"+ne[n[t+6]]+ne[n[t+7]]+"-"+ne[n[t+8]]+ne[n[t+9]]+"-"+ne[n[t+10]]+ne[n[t+11]]+ne[n[t+12]]+ne[n[t+13]]+ne[n[t+14]]+ne[n[t+15]]}const bh={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Tn(n,t,e){if(bh.randomUUID&&!t&&!n)return bh.randomUUID();n=n||{};const i=n.random||(n.rng||uS)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){e=e||0;for(let r=0;r<16;++r)t[e+r]=i[r];return t}return dS(i)}const xh=(n,t)=>{const e=n.ctx,i=n.scales.y,r=n.scales.x,a=t[t.length-1].element;e.save(),e.strokeStyle="rgba(100, 100, 100, 1)",e.lineWidth=3,n.options.indexAxis==="x"?e.strokeRect(a.x-a.width/2,a.y,a.width,i.bottom-a.y):e.strokeRect(r.left,a.y-a.height/2,a.x-r.left,a.height),e.restore()},_h={id:"highlightPlugin",clicked:!1,afterDatasetsDraw:function(n){this.clickedElements&&this.clickedElements.length&&xh(n,this.clickedElements)},afterEvent:function(n,{event:t}){var r;if(t.type!=="click"||!t.native)return;this.clicked=!this.clicked;const e=((r=n.options.interaction)==null?void 0:r.mode)||"index",i=n.getElementsAtEventForMode(t.native,e,{intersect:!1},!0);i.length&&this.clicked?(this.clickedElements=i,xh(n,this.clickedElements),this.previousHoverOption=n.options.hover,n.options.hover={mode:null}):(delete this.clickedElements,n.options.hover=this.previousHoverOption||n.options.hover,this.clicked=!1)},beforeDestroy(n){delete this.clickedElements,n.options.hover=this.previousHoverOption||n.options.hover,this.clicked=!1}},wh=6,fS="100%",hS="100%",pS=20,gS=20,Th=6,mS=0,yS=10,vS=10,bS=1,xS=Ze(h.defineComponent({__name:"StackedBarChart",props:{chartData:{type:Object,required:!1,default:()=>({labels:[],datasets:[]})},tooltipTitle:{type:String,required:!1,default:""},legendValues:{type:Object,required:!1,default:null},metricUnit:{type:String,required:!1,default:""},orientation:{type:String,required:!1,default:"horizontal",validator:n=>["horizontal","vertical"].includes(n)},annotations:{type:Boolean,required:!1,default:!0},metricAxesTitle:{type:String,required:!1,default:null},dimensionAxesTitle:{type:String,required:!1,default:null},stacked:{type:Boolean,required:!1,default:!0},syntheticsDataKey:{type:String,required:!1,default:""},chartLegendSortFn:{type:Function,required:!1,default:(n,t)=>n.value&&t.value&&t.value.raw-n.value.raw},chartTooltipSortFn:{type:Function,required:!1,default:(n,t)=>t.rawValue-n.rawValue}},setup(n){const t=n,{i18n:e}=Mt.useI18n(),{translateUnit:i}=Mt.useTranslatedUnits(),r=h.ref(null),a=({chart:L},U)=>{var K;const j=L.data,Z=(K=j.labels)==null?void 0:K.indexOf(U);return j.datasets.reduce((N,A,Q)=>{if(L.isDatasetVisible(Q)){const X=A.data[Z];return isNaN(X)?N:N+X}else return N},0)},s=(L,U,j,Z)=>{const K=Z==="horizontal";U===null&&(U=e.t("entityNoName"));const N={type:"label",yValue:X=>K?U:a(X,U),xValue:X=>K?a(X,U):U},A={...N,position:K?{x:"start",y:"center"}:{x:"center",y:"end"},yAdjust:()=>K?0:-Math.abs(Gw()),content:X=>Eo(a(X,U),j)},Q={...N,content:X=>Pf(a(X,U),Of(X.chart,L)),position:K?{x:"start",y:"center"}:{x:"center",y:"end"},xAdjust:X=>K?kf(Eo(a(X,U),j)):0,color:Mf};return{[`${U}-value`]:A,[`${U}-percent`]:Q}},o=h.ref(null),l=h.ref(),c=h.ref(Tn()),u=Tn(),d=Tn(),f=h.ref([]),p=h.ref(h.inject("legendPosition",Wt.Right)),y=h.ref({show:!1,top:"0px",left:"0px",text:"",offset:-50}),x=h.toRef(t,"metricUnit"),g=h.computed(()=>h.toRef(t,"orientation").value==="horizontal"),m=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:x,translateUnit:i,offsetX:0,offsetY:0,width:0,height:0,locked:!1,chartType:g.value?ee.HORIZONTAL_BAR:ee.VERTICAL_BAR,chartTooltipSortFn:t.chartTooltipSortFn}),v=h.ref(0),b=()=>{var L;return t.annotations&&((L=t.chartData.labels)==null?void 0:L.reduce((U,j)=>Object.assign(U,s(t.chartData,j,x.value,t.orientation)),{}))},w={id:c.value,afterUpdate(L){v.value+=1,f.value=L.options.plugins.legend.labels.generateLabels(L).map(U=>({...U,value:t.legendValues&&t.legendValues[U.text]})).sort(t.chartLegendSortFn)}},T={id:u,afterUpdate(L){L.options.plugins.annotation.annotations=t.annotations?b():{}}},S=[w,{id:"axisHover",afterEvent(L,U){if(y.value.show=!1,U.event.type==="mousemove"){const j=U.event,Z=L.options.indexAxis,K=L.scales,N=L.scales[Z].getLabelForValue(Number(L.scales[Z].getValueForPixel(j[Z])));if((Q=>Q==="x"?j.y>K.x.top:j.x<K.y.right)(Z))if(m.locked||(m.showTooltip=!1),N.length>aa){const X=L.canvas.getContext("2d").measureText(N).width,vt=Math.abs(Math.round(j.x-X*.5)),ct=Math.round(j.x+X*.5);y.value.left=Z==="x"?`${(vt>0?vt:ct)-y.value.offset}px`:`${j.x-X*.5-y.value.offset}px`,y.value.top=`${j.y-50}px`,y.value.show=!0,y.value.text=N}else y.value.show=!1;else y.value.show=!1}}},{id:d,afterUpdate(L){L.options.layout.padding.right=g.value?I.value:0}},_h,...t.annotations?[T]:[]],C=h.computed(()=>t.chartData.labels&&t.chartData.labels.length||0),O=h.ref(0),P=h.ref(0),E=new ResizeObserver(Zd(L=>{O.value=L[0].contentRect.width,P.value=L[0].contentRect.height},100)),F=h.computed(()=>{var U,j;const L=(j=(U=t.chartData)==null?void 0:U.labels)==null?void 0:j.length;return o.value&&L&&!g.value?`${Math.max(L*(pS+Th),O.value)}px`:fS}),q=h.computed(()=>{var U,j;const L=(j=(U=t.chartData)==null?void 0:U.labels)==null?void 0:j.length;return o.value&&L&&g.value?`${Math.max(L*(gS+Th),P.value)}px`:hS});Mt.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey")),h.onMounted(()=>{t.annotations&&Se.register(mh),r.value&&(O.value=r.value.offsetWidth,P.value=r.value.offsetHeight,E.observe(r.value))}),h.onUnmounted(()=>{r.value&&E.unobserve(r.value)});const $=h.computed(()=>{const L=Mt.useBarChartOptions({tooltipState:m,legendID:c.value,stacked:h.toRef(t,"stacked"),metricAxesTitle:h.toRef(t,"metricAxesTitle"),dimensionAxesTitle:h.toRef(t,"dimensionAxesTitle"),indexAxis:g.value?"y":"x",numLabels:C});return{...L.value,plugins:{...L.value.plugins,annotation:{annotations:b(),clip:!1}},layout:{autoPadding:!1,padding:{right:0,top:6*wh}}}}),Y=Mt.useChartJSCommon("bar",o,h.toRef(t,"chartData"),S,$),I=h.computed(()=>{v.value;const L=t.chartData.labels,U=t.chartData.datasets,j=L.map((N,A)=>U.reduce((Q,X)=>isNaN(Number(X.data[A]))?Q:Q+Number(X.data[A]),0)),Z=Y.value?Of(Y.value,t.chartData):Kw(t.chartData);return j.map(N=>kf(Eo(N,x.value)+Pf(N,Z))).reduce((N,A)=>Math.max(N,A),0)+wh});h.onBeforeUnmount(()=>{Se.unregister(mh)});const rt={[Wt.Right]:"legend-row",[Wt.Bottom]:"column"},B=h.computed(()=>{if(l.value&&Y.value){const L=window.devicePixelRatio,U=Y.value,j=U.scales.y.width*L+bS,Z=(U.scales.y.height+U.scales.y.top+U.scales.x.height)*L,K=l.value.getContext("2d");return K.scale(L,L),K.canvas.width=j,K.canvas.height=Z,K.canvas.style.width=`${j/L}px`,K.canvas.style.height=`${Z/L}px`,{scale:L,width:j*L,height:Z*L,targetCtx:K}}return null}),yt=L=>{const U=L.target;if(B.value&&Y.value&&!g.value){const j=B.value.scale,Z=B.value.targetCtx,K=B.value.width,N=B.value.height,A=Y.value,Q=A.canvas;Z.fillStyle="white",U.scrollLeft>=mS&&U.scrollLeft<=yS?(Z.globalCompositeOperation="source-over",Z.clearRect(0,0,K,N),Z.drawImage(Q,0,0,K,N,0,0,K,N),Z.globalCompositeOperation="destination-over",Z.fillRect(0,0,K,N)):(Z.globalCompositeOperation="source-over",Z.fillRect(0,(A.scales.y.height+A.scales.y.top+vS)*j,K,A.scales.x.height*j))}m.offsetY=U.scrollTop,m.offsetX=U.scrollLeft,y.value.offset=U.scrollLeft},ut=({width:L,height:U})=>{m.width=L,m.height=U};h.watch(()=>t.orientation,()=>{var L;if(l.value&&B.value){const U=B.value.width,j=B.value.height;((L=l.value)==null?void 0:L.getContext("2d")).clearRect(0,0,U,j)}m.showTooltip=!1,m.locked=!1}),h.watch(()=>t.annotations,L=>{Y.value&&(L?Y.value.options.plugins.annotation.annotations=b(t.chartData):delete Y.value.options.plugins.annotation.annotations)});const z=()=>{m.showTooltip&&(m.locked=!m.locked)};return(L,U)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",rt[p.value]])},[h.createElementVNode("canvas",{ref_key:"axis",ref:l,class:"axis"},null,512),h.createElementVNode("div",{ref_key:"chartContainerRef",ref:r,class:"chart-container","on:scroll":yt,onClick:U[0]||(U[0]=j=>z())},[h.createElementVNode("div",{class:"chart-body",style:h.normalizeStyle({width:F.value,height:q.value})},[h.createElementVNode("canvas",{ref_key:"canvas",ref:o},null,512)],4)],544),y.value.show?(h.openBlock(),h.createElementBlock("div",{key:0,class:"axis-tooltip",style:h.normalizeStyle({top:y.value.top,left:y.value.left})},h.toDisplayString(y.value.text),5)):h.createCommentVNode("",!0),h.createVNode(Qo,{context:m.tooltipContext,left:m.left,locked:m.locked,series:m.tooltipSeries,"show-tooltip":m.showTooltip,"tooltip-title":n.tooltipTitle,top:m.top,onDimensions:ut},null,8,["context","left","locked","series","show-tooltip","tooltip-title","top"]),h.createVNode(Zo,{id:c.value,"chart-instance":h.unref(Y),items:f.value},null,8,["id","chart-instance","items"])],2))}}),[["__scopeId","data-v-cf52e4a2"]]);/*!
|
|
24
|
+
*/const Lf={modes:{point(n,t){return oa(n,t,{intersect:!0})},nearest(n,t,e){return b1(n,t,e)},x(n,t,e){return oa(n,t,{intersect:e.intersect,axis:"x"})},y(n,t,e){return oa(n,t,{intersect:e.intersect,axis:"y"})}}};function Lo(n,t,e){return(Lf.modes[e.mode]||Lf.modes.nearest)(n,t,e)}function y1(n,t,e){return e!=="x"&&e!=="y"?n.inRange(t.x,t.y,"x",!0)||n.inRange(t.x,t.y,"y",!0):n.inRange(t.x,t.y,e,!0)}function v1(n,t,e){return e==="x"?{x:n.x,y:t.y}:e==="y"?{x:t.x,y:n.y}:t}function oa(n,t,e){return n.visibleElements.filter(r=>e.intersect?r.inRange(t.x,t.y):y1(r,t,e.axis))}function b1(n,t,e){let r=Number.POSITIVE_INFINITY;return oa(n,t,e).reduce((i,a)=>{const s=a.getCenterPoint(),o=v1(t,s,e.axis),l=Jn(t,o);return l<r?(i=[a],r=l):l===r&&i.push(a),i},[]).sort((i,a)=>i._index-a._index).slice(0,1)}const x1=(n,t)=>t>n||n.length>t.length&&n.slice(0,t.length)===t,Yn=.001,la=(n,t,e)=>Math.min(e,Math.max(t,n));function _1(n,t,e){for(const r of Object.keys(n))n[r]=la(n[r],t,e);return n}function w1(n,t,e,r){if(!n||!t||e<=0)return!1;const i=r/2;return Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2)<=Math.pow(e+i,2)}function If(n,{x:t,y:e,x2:r,y2:i},a,s){const o=s/2,l=n.x>=t-o-Yn&&n.x<=r+o+Yn,c=n.y>=e-o-Yn&&n.y<=i+o+Yn;return a==="x"?l:(a==="y"||l)&&c}function ur(n,t){const{centerX:e,centerY:r}=n.getProps(["centerX","centerY"],t);return{x:e,y:r}}function T1(n,t,e,r=!0){const i=e.split(".");let a=0;for(const s of t.split(".")){const o=i[a++];if(parseInt(s,10)<parseInt(o,10))break;if(x1(o,s)){if(r)throw new Error(`${n} v${e} is not supported. v${t} or newer is required.`);return!1}}return!0}const Nf=n=>typeof n=="string"&&n.endsWith("%"),Ff=n=>parseFloat(n)/100,Uf=n=>la(Ff(n),0,1),ca=(n,t)=>({x:n,y:t,x2:n,y2:t,width:0,height:0}),S1={box:n=>ca(n.centerX,n.centerY),ellipse:n=>({centerX:n.centerX,centerY:n.centerX,radius:0,width:0,height:0}),label:n=>ca(n.centerX,n.centerY),line:n=>ca(n.x,n.y),point:n=>({centerX:n.centerX,centerY:n.centerY,radius:0,width:0,height:0}),polygon:n=>ca(n.centerX,n.centerY)};function Io(n,t){return t==="start"?0:t==="end"?n:Nf(t)?Uf(t)*n:n/2}function bn(n,t,e=!0){return typeof t=="number"?t:Nf(t)?(e?Uf(t):Ff(t))*n:n}function C1(n,t){const{x:e,width:r}=n,i=t.textAlign;return i==="center"?e+r/2:i==="end"||i==="right"?e+r:e}function No(n,t="center"){return lt(n)?{x:rt(n.x,t),y:rt(n.y,t)}:(n=rt(n,t),{x:n,y:n})}function Bf(n){return n&&(de(n.xValue)||de(n.yValue))}function ai(n,t,e){const r=e.init;if(r){if(r===!0)return zf(t,e)}else return;return M1(n,t,e)}function Wf(n,t,e){let r=!1;return t.forEach(i=>{fe(n[i])?(r=!0,e[i]=n[i]):de(e[i])&&delete e[i]}),r}function zf(n,t){const e=t.type||"line";return S1[e](n)}function M1(n,t,e){const r=Tt(e.init,[{chart:n,properties:t,options:e}]);if(r===!0)return zf(t,e);if(lt(r))return r}const Fo=new Map,D1=n=>isNaN(n)||n<=0,k1=n=>n.reduce(function(t,e){return t+=e.string,t},"");function ua(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object HTMLImageElement]"||t==="[object HTMLCanvasElement]"}}function Uo(n,{x:t,y:e},r){r&&(n.translate(t,e),n.rotate(Xt(r)),n.translate(-t,-e))}function xn(n,t){if(t&&t.borderWidth)return n.lineCap=t.borderCapStyle,n.setLineDash(t.borderDash),n.lineDashOffset=t.borderDashOffset,n.lineJoin=t.borderJoinStyle,n.lineWidth=t.borderWidth,n.strokeStyle=t.borderColor,!0}function dr(n,t){n.shadowColor=t.backgroundShadowColor,n.shadowBlur=t.shadowBlur,n.shadowOffsetX=t.shadowOffsetX,n.shadowOffsetY=t.shadowOffsetY}function Bo(n,t){const e=t.content;if(ua(e))return{width:bn(e.width,t.width),height:bn(e.height,t.height)};const r=t.font,i=mt(r)?r.map(l=>Rt(l)):[Rt(r)],a=t.textStrokeWidth,s=mt(e)?e:[e],o=s.join()+k1(i)+a+(n._measureText?"-spriting":"");return Fo.has(o)||Fo.set(o,A1(n,s,i,a)),Fo.get(o)}function Yf(n,t,e){const{x:r,y:i,width:a,height:s}=t;n.save(),dr(n,e);const o=xn(n,e);n.fillStyle=e.backgroundColor,n.beginPath(),tr(n,{x:r,y:i,w:a,h:s,radius:_1(dn(e.borderRadius),0,Math.min(a,s)/2)}),n.closePath(),n.fill(),o&&(n.shadowColor=e.borderShadowColor,n.stroke()),n.restore()}function O1(n,t,e){const r=e.content;if(ua(r)){n.save(),n.globalAlpha=N1(e.opacity,r.style.opacity),n.drawImage(r,t.x,t.y,t.width,t.height),n.restore();return}const i=mt(r)?r:[r],a=e.font,s=mt(a)?a.map(d=>Rt(d)):[Rt(a)],o=e.color,l=mt(o)?o:[o],c=C1(t,e),u=t.y+e.textStrokeWidth/2;n.save(),n.textBaseline="middle",n.textAlign=e.textAlign,P1(n,e)&&L1(n,{x:c,y:u},i,s),I1(n,{x:c,y:u},i,{fonts:s,colors:l}),n.restore()}function P1(n,t){if(t.textStrokeWidth>0)return n.lineJoin="round",n.miterLimit=2,n.lineWidth=t.textStrokeWidth,n.strokeStyle=t.textStrokeColor,!0}function E1(n,t,e,r){const{radius:i,options:a}=t,s=a.pointStyle,o=a.rotation;let l=(o||0)*Ba;if(ua(s)){n.save(),n.translate(e,r),n.rotate(l),n.drawImage(s,-s.width/2,-s.height/2,s.width,s.height),n.restore();return}D1(i)||R1(n,{x:e,y:r,radius:i,rotation:o,style:s,rad:l})}function R1(n,{x:t,y:e,radius:r,rotation:i,style:a,rad:s}){let o,l,c,u;switch(n.beginPath(),a){default:n.arc(t,e,r,0,kt),n.closePath();break;case"triangle":n.moveTo(t+Math.sin(s)*r,e-Math.cos(s)*r),s+=bi,n.lineTo(t+Math.sin(s)*r,e-Math.cos(s)*r),s+=bi,n.lineTo(t+Math.sin(s)*r,e-Math.cos(s)*r),n.closePath();break;case"rectRounded":u=r*.516,c=r-u,o=Math.cos(s+Te)*c,l=Math.sin(s+Te)*c,n.arc(t-o,e-l,u,s-dt,s-Et),n.arc(t+l,e-o,u,s-Et,s),n.arc(t+o,e+l,u,s,s+Et),n.arc(t-l,e+o,u,s+Et,s+dt),n.closePath();break;case"rect":if(!i){c=Math.SQRT1_2*r,n.rect(t-c,e-c,2*c,2*c);break}s+=Te;case"rectRot":o=Math.cos(s)*r,l=Math.sin(s)*r,n.moveTo(t-o,e-l),n.lineTo(t+l,e-o),n.lineTo(t+o,e+l),n.lineTo(t-l,e+o),n.closePath();break;case"crossRot":s+=Te;case"cross":o=Math.cos(s)*r,l=Math.sin(s)*r,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l),n.moveTo(t+l,e-o),n.lineTo(t-l,e+o);break;case"star":o=Math.cos(s)*r,l=Math.sin(s)*r,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l),n.moveTo(t+l,e-o),n.lineTo(t-l,e+o),s+=Te,o=Math.cos(s)*r,l=Math.sin(s)*r,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l),n.moveTo(t+l,e-o),n.lineTo(t-l,e+o);break;case"line":o=Math.cos(s)*r,l=Math.sin(s)*r,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l);break;case"dash":n.moveTo(t,e),n.lineTo(t+Math.cos(s)*r,e+Math.sin(s)*r);break}n.fill()}function A1(n,t,e,r){n.save();const i=t.length;let a=0,s=r;for(let o=0;o<i;o++){const l=e[Math.min(o,e.length-1)];n.font=l.string;const c=t[o];a=Math.max(a,n.measureText(c).width+r),s+=l.lineHeight}return n.restore(),{width:a,height:s}}function L1(n,{x:t,y:e},r,i){n.beginPath();let a=0;r.forEach(function(s,o){const l=i[Math.min(o,i.length-1)],c=l.lineHeight;n.font=l.string,n.strokeText(s,t,e+c/2+a),a+=c}),n.stroke()}function I1(n,{x:t,y:e},r,{fonts:i,colors:a}){let s=0;r.forEach(function(o,l){const c=a[Math.min(l,a.length-1)],u=i[Math.min(l,i.length-1)],d=u.lineHeight;n.beginPath(),n.font=u.string,n.fillStyle=c,n.fillText(o,t,e+d/2+s),s+=d,n.fill()})}function N1(n,t){const e=un(n)?n:t;return un(e)?la(e,0,1):1}const Hf={xScaleID:{min:"xMin",max:"xMax",start:"left",end:"right",startProp:"x",endProp:"x2"},yScaleID:{min:"yMin",max:"yMax",start:"bottom",end:"top",startProp:"y",endProp:"y2"}};function fr(n,t,e){return t=typeof t=="number"?t:n.parse(t),It(t)?n.getPixelForValue(t):e}function Hn(n,t,e){const r=t[e];if(r||e==="scaleID")return r;const i=e.charAt(0),a=Object.values(n).filter(s=>s.axis&&s.axis===i);return a.length?a[0].id:i}function $f(n,t){if(n){const e=n.options.reverse,r=fr(n,t.min,e?t.end:t.start),i=fr(n,t.max,e?t.start:t.end);return{start:r,end:i}}}function jf(n,t){const{chartArea:e,scales:r}=n,i=r[Hn(r,t,"xScaleID")],a=r[Hn(r,t,"yScaleID")];let s=e.width/2,o=e.height/2;return i&&(s=fr(i,t.xValue,i.left+i.width/2)),a&&(o=fr(a,t.yValue,a.top+a.height/2)),{x:s,y:o}}function Wo(n,t){const e=n.scales,r=e[Hn(e,t,"xScaleID")],i=e[Hn(e,t,"yScaleID")];if(!r&&!i)return{};let{left:a,right:s}=r||n.chartArea,{top:o,bottom:l}=i||n.chartArea;const c=Xf(r,{min:t.xMin,max:t.xMax,start:a,end:s});a=c.start,s=c.end;const u=Xf(i,{min:t.yMin,max:t.yMax,start:l,end:o});return o=u.start,l=u.end,{x:a,y:o,x2:s,y2:l,width:s-a,height:l-o,centerX:a+(s-a)/2,centerY:o+(l-o)/2}}function Vf(n,t){if(!Bf(t)){const e=Wo(n,t);let r=t.radius;(!r||isNaN(r))&&(r=Math.min(e.width,e.height)/2,t.radius=r);const i=r*2,a=e.centerX+t.xAdjust,s=e.centerY+t.yAdjust;return{x:a-r,y:s-r,x2:a+r,y2:s+r,centerX:a,centerY:s,width:i,height:i,radius:r}}return U1(n,t)}function F1(n,t){const{scales:e,chartArea:r}=n,i=e[t.scaleID],a={x:r.left,y:r.top,x2:r.right,y2:r.bottom};return i?B1(i,a,t):W1(e,a,t),a}function qf(n,t){const e=Wo(n,t);return e.initProperties=ai(n,e,t),e.elements=[{type:"label",optionScope:"label",properties:H1(n,e,t),initProperties:e.initProperties}],e}function U1(n,t){const e=jf(n,t),r=t.radius*2;return{x:e.x-t.radius+t.xAdjust,y:e.y-t.radius+t.yAdjust,x2:e.x+t.radius+t.xAdjust,y2:e.y+t.radius+t.yAdjust,centerX:e.x+t.xAdjust,centerY:e.y+t.yAdjust,radius:t.radius,width:r,height:r}}function Xf(n,t){const e=$f(n,t)||t;return{start:Math.min(e.start,e.end),end:Math.max(e.start,e.end)}}function B1(n,t,e){const r=fr(n,e.value,NaN),i=fr(n,e.endValue,r);n.isHorizontal()?(t.x=r,t.x2=i):(t.y=r,t.y2=i)}function W1(n,t,e){for(const r of Object.keys(Hf)){const i=n[Hn(n,e,r)];if(i){const{min:a,max:s,start:o,end:l,startProp:c,endProp:u}=Hf[r],d=$f(i,{min:e[a],max:e[s],start:i[o],end:i[l]});t[c]=d.start,t[u]=d.end}}}function z1({properties:n,options:t},e,r,i){const{x:a,x2:s,width:o}=n;return Gf({start:a,end:s,size:o,borderWidth:t.borderWidth},{position:r.x,padding:{start:i.left,end:i.right},adjust:t.label.xAdjust,size:e.width})}function Y1({properties:n,options:t},e,r,i){const{y:a,y2:s,height:o}=n;return Gf({start:a,end:s,size:o,borderWidth:t.borderWidth},{position:r.y,padding:{start:i.top,end:i.bottom},adjust:t.label.yAdjust,size:e.height})}function Gf(n,t){const{start:e,end:r,borderWidth:i}=n,{position:a,padding:{start:s,end:o},adjust:l}=t,c=r-i-e-s-o-t.size;return e+i/2+l+Io(c,a)}function H1(n,t,e){const r=e.label;r.backgroundColor="transparent",r.callout.display=!1;const i=No(r.position),a=Gt(r.padding),s=Bo(n.ctx,r),o=z1({properties:t,options:e},s,i,a),l=Y1({properties:t,options:e},s,i,a),c=s.width+a.width,u=s.height+a.height;return{x:o,y:l,x2:o+c,y2:l+u,width:c,height:u,centerX:o+c/2,centerY:l+u/2,rotation:r.rotation}}function $n(n,t,e){const r=Math.cos(e),i=Math.sin(e),a=t.x,s=t.y;return{x:a+r*(n.x-a)-i*(n.y-s),y:s+i*(n.x-a)+r*(n.y-s)}}const zo=["enter","leave"],Yo=zo.concat("click");function $1(n,t,e){t.listened=Wf(e,Yo,t.listeners),t.moveListened=!1,t._getElements=Lo,zo.forEach(r=>{fe(e[r])&&(t.moveListened=!0)}),(!t.listened||!t.moveListened)&&t.annotations.forEach(r=>{!t.listened&&fe(r.click)&&(t.listened=!0),t.moveListened||zo.forEach(i=>{fe(r[i])&&(t.listened=!0,t.moveListened=!0)})})}function j1(n,t,e){if(n.listened)switch(t.type){case"mousemove":case"mouseout":return V1(n,t,e);case"click":return q1(n,t,e)}}function V1(n,t,e){if(!n.moveListened)return;let r;t.type==="mousemove"?r=Lo(n,t,e.interaction):r=[];const i=n.hovered;n.hovered=r;const a={state:n,event:t};let s=Kf(a,"leave",i,r);return Kf(a,"enter",r,i)||s}function Kf({state:n,event:t},e,r,i){let a;for(const s of r)i.indexOf(s)<0&&(a=Qf(s.options[e]||n.listeners[e],s,t)||a);return a}function q1(n,t,e){const r=n.listeners,i=Lo(n,t,e.interaction);let a;for(const s of i)a=Qf(s.options.click||r.click,s,t)||a;return a}function Qf(n,t,e){return Tt(n,[t.$context,e])===!0}const da=["afterDraw","beforeDraw"];function X1(n,t,e){const r=t.visibleElements;t.hooked=Wf(e,da,t.hooks),t.hooked||r.forEach(i=>{t.hooked||da.forEach(a=>{fe(i.options[a])&&(t.hooked=!0)})})}function Zf(n,t,e){if(n.hooked){const r=t.options[e]||n.hooks[e];return Tt(r,[t.$context])}}function G1(n,t,e){const r=tT(n.scales,t,e);let i=Jf(t,r,"min","suggestedMin");i=Jf(t,r,"max","suggestedMax")||i,i&&fe(t.handleTickRangeOptions)&&t.handleTickRangeOptions()}function K1(n,t){for(const e of n)Z1(e,t)}function Jf(n,t,e,r){if(It(t[e])&&!Q1(n.options,e,r)){const i=n[e]!==t[e];return n[e]=t[e],i}}function Q1(n,t,e){return de(n[t])||de(n[e])}function Z1(n,t){for(const e of["scaleID","xScaleID","yScaleID"]){const r=Hn(t,n,e);r&&!t[r]&&J1(n,e)&&console.warn(`No scale found with id '${r}' for annotation '${n.id}'`)}}function J1(n,t){if(t==="scaleID")return!0;const e=t.charAt(0);for(const r of["Min","Max","Value"])if(de(n[e+r]))return!0;return!1}function tT(n,t,e){const r=t.axis,i=t.id,a=r+"ScaleID",s={min:rt(t.min,Number.NEGATIVE_INFINITY),max:rt(t.max,Number.POSITIVE_INFINITY)};for(const o of e)o.scaleID===i?th(o,t,["value","endValue"],s):Hn(n,o,a)===i&&th(o,t,[r+"Min",r+"Max",r+"Value"],s);return s}function th(n,t,e,r){for(const i of e){const a=n[i];if(de(a)){const s=t.parse(a);r.min=Math.min(r.min,s),r.max=Math.max(r.max,s)}}}class hr extends te{inRange(t,e,r,i){const{x:a,y:s}=$n({x:t,y:e},this.getCenterPoint(i),Xt(-this.options.rotation));return If({x:a,y:s},this.getProps(["x","y","x2","y2"],i),r,this.options.borderWidth)}getCenterPoint(t){return ur(this,t)}draw(t){t.save(),Uo(t,this.getCenterPoint(),this.options.rotation),Yf(t,this,this.options),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return qf(t,e)}}hr.id="boxAnnotation",hr.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:{backgroundColor:"transparent",borderWidth:0,callout:{display:!1},color:"black",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:void 0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},hr.defaultRoutes={borderColor:"color",backgroundColor:"color"},hr.descriptors={label:{_fallback:!0}};const eh=["left","bottom","top","right"];class si extends te{inRange(t,e,r,i){const{x:a,y:s}=$n({x:t,y:e},this.getCenterPoint(i),Xt(-this.rotation));return If({x:a,y:s},this.getProps(["x","y","x2","y2"],i),r,this.options.borderWidth)}getCenterPoint(t){return ur(this,t)}draw(t){const e=this.options,r=!de(this._visible)||this._visible;!e.display||!e.content||!r||(t.save(),Uo(t,this.getCenterPoint(),this.rotation),nT(t,this),Yf(t,this,e),O1(t,cT(this),e),t.restore())}resolveElementProperties(t,e){let r;if(Bf(e))r=jf(t,e);else{const{centerX:o,centerY:l}=Wo(t,e);r={x:o,y:l}}const i=Gt(e.padding),a=Bo(t.ctx,e),s=eT(r,a,e,i);return{initProperties:ai(t,s,e),pointX:r.x,pointY:r.y,...s,rotation:e.rotation}}}si.id="labelAnnotation",si.defaults={adjustScaleRange:!0,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:0,callout:{borderCapStyle:"butt",borderColor:void 0,borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:1,display:!1,margin:5,position:"auto",side:5,start:"50%"},color:"black",content:null,display:!0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,init:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},si.defaultRoutes={borderColor:"color"};function eT(n,t,e,r){const i=t.width+r.width+e.borderWidth,a=t.height+r.height+e.borderWidth,s=No(e.position,"center"),o=nh(n.x,i,e.xAdjust,s.x),l=nh(n.y,a,e.yAdjust,s.y);return{x:o,y:l,x2:o+i,y2:l+a,width:i,height:a,centerX:o+i/2,centerY:l+a/2}}function nh(n,t,e=0,r){return n-Io(t,r)+e}function nT(n,t){const{pointX:e,pointY:r,options:i}=t,a=i.callout,s=a&&a.display&&oT(t,a);if(!s||uT(t,a,s))return;if(n.save(),n.beginPath(),!xn(n,a))return n.restore();const{separatorStart:l,separatorEnd:c}=rT(t,s),{sideStart:u,sideEnd:d}=aT(t,s,l);(a.margin>0||i.borderWidth===0)&&(n.moveTo(l.x,l.y),n.lineTo(c.x,c.y)),n.moveTo(u.x,u.y),n.lineTo(d.x,d.y);const f=$n({x:e,y:r},t.getCenterPoint(),Xt(-t.rotation));n.lineTo(f.x,f.y),n.stroke(),n.restore()}function rT(n,t){const{x:e,y:r,x2:i,y2:a}=n,s=iT(n,t);let o,l;return t==="left"||t==="right"?(o={x:e+s,y:r},l={x:o.x,y:a}):(o={x:e,y:r+s},l={x:i,y:o.y}),{separatorStart:o,separatorEnd:l}}function iT(n,t){const{width:e,height:r,options:i}=n,a=i.callout.margin+i.borderWidth/2;return t==="right"?e+a:t==="bottom"?r+a:-a}function aT(n,t,e){const{y:r,width:i,height:a,options:s}=n,o=s.callout.start,l=sT(t,s.callout);let c,u;return t==="left"||t==="right"?(c={x:e.x,y:r+bn(a,o)},u={x:c.x+l,y:c.y}):(c={x:e.x+bn(i,o),y:e.y},u={x:c.x,y:c.y+l}),{sideStart:c,sideEnd:u}}function sT(n,t){const e=t.side;return n==="left"||n==="top"?-e:e}function oT(n,t){const e=t.position;return eh.includes(e)?e:lT(n,t)}function lT(n,t){const{x:e,y:r,x2:i,y2:a,width:s,height:o,pointX:l,pointY:c,centerX:u,centerY:d,rotation:f}=n,p={x:u,y:d},y=t.start,x=bn(s,y),g=bn(o,y),m=[e,e+x,e+x,i],v=[r+g,a,r,a],b=[];for(let w=0;w<4;w++){const T=$n({x:m[w],y:v[w]},p,Xt(f));b.push({position:eh[w],distance:Jn(T,{x:l,y:c})})}return b.sort((w,T)=>w.distance-T.distance)[0].position}function cT({x:n,y:t,width:e,height:r,options:i}){const a=i.borderWidth/2,s=Gt(i.padding);return{x:n+s.left+a,y:t+s.top+a,width:e-s.left-s.right-i.borderWidth,height:r-s.top-s.bottom-i.borderWidth}}function uT(n,t,e){const{pointX:r,pointY:i}=n,a=t.margin;let s=r,o=i;return e==="left"?s+=a:e==="right"?s-=a:e==="top"?o+=a:e==="bottom"&&(o-=a),n.inRange(s,o)}const Ho=(n,t,e)=>({x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}),$o=(n,t,e)=>Ho(t,e,Math.abs((n-t.y)/(e.y-t.y))).x,rh=(n,t,e)=>Ho(t,e,Math.abs((n-t.x)/(e.x-t.x))).y,oi=n=>n*n,dT=(n,t,{x:e,y:r,x2:i,y2:a},s)=>s==="y"?{start:Math.min(r,a),end:Math.max(r,a),value:t}:{start:Math.min(e,i),end:Math.max(e,i),value:n},ih=(n,t,e,r)=>(1-r)*(1-r)*n+2*(1-r)*r*t+r*r*e,jo=(n,t,e,r)=>({x:ih(n.x,t.x,e.x,r),y:ih(n.y,t.y,e.y,r)}),ah=(n,t,e,r)=>2*(1-r)*(t-n)+2*r*(e-t),sh=(n,t,e,r)=>-Math.atan2(ah(n.x,t.x,e.x,r),ah(n.y,t.y,e.y,r))+.5*dt;class li extends te{inRange(t,e,r,i){const a=this.options.borderWidth/2;if(r!=="x"&&r!=="y"){const s={mouseX:t,mouseY:e},{path:o,ctx:l}=this;if(o){xn(l,this.options);const{chart:u}=this.$context,d=t*u.currentDevicePixelRatio,f=e*u.currentDevicePixelRatio,p=l.isPointInStroke(o,d,f)||Vo(this,s,i);return l.restore(),p}const c=oi(a);return gT(this,s,c,i)||Vo(this,s,i)}return fT(this,{mouseX:t,mouseY:e},r,{hBorderWidth:a,useFinalPosition:i})}getCenterPoint(t){return ur(this,t)}draw(t){const{x:e,y:r,x2:i,y2:a,cp:s,options:o}=this;if(t.save(),!xn(t,o))return t.restore();dr(t,o);const l=Math.sqrt(Math.pow(i-e,2)+Math.pow(a-r,2));if(o.curve&&s)return TT(t,this,s,l),t.restore();const{startOpts:c,endOpts:u,startAdjust:d,endAdjust:f}=dh(this),p=Math.atan2(a-r,i-e);t.translate(e,r),t.rotate(p),t.beginPath(),t.moveTo(0+d,0),t.lineTo(l-f,0),t.shadowColor=o.borderShadowColor,t.stroke(),qo(t,0,d,c),qo(t,l,-f,u),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){const r=F1(t,e),{x:i,y:a,x2:s,y2:o}=r,l=hT(r,t.chartArea),c=l?pT({x:i,y:a},{x:s,y:o},t.chartArea):{x:i,y:a,x2:s,y2:o,width:Math.abs(s-i),height:Math.abs(o-a)};if(c.centerX=(s+i)/2,c.centerY=(o+a)/2,c.initProperties=ai(t,c,e),e.curve){const d={x:c.x,y:c.y},f={x:c.x2,y:c.y2};c.cp=wT(c,e,Jn(d,f))}const u=mT(t,c,e.label);return u._visible=l,c.elements=[{type:"label",optionScope:"label",properties:u,initProperties:c.initProperties}],c}}li.id="lineAnnotation";const oh={backgroundColor:void 0,backgroundShadowColor:void 0,borderColor:void 0,borderDash:void 0,borderDashOffset:void 0,borderShadowColor:void 0,borderWidth:void 0,display:void 0,fill:void 0,length:void 0,shadowBlur:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,width:void 0};li.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},oh),fill:!1,length:12,start:Object.assign({},oh),width:6},borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:2,curve:!1,controlPoint:{y:"-50%"},display:!0,endValue:void 0,init:void 0,label:{backgroundColor:"rgba(0,0,0,0.8)",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderColor:"black",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:6,borderShadowColor:"transparent",borderWidth:0,callout:Object.assign({},si.defaults.callout),color:"#fff",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},scaleID:void 0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,value:void 0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},li.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}},li.defaultRoutes={borderColor:"color"};function fT(n,{mouseX:t,mouseY:e},r,{hBorderWidth:i,useFinalPosition:a}){const s=dT(t,e,n.getProps(["x","y","x2","y2"],a),r);return s.value>=s.start-i&&s.value<=s.end+i||Vo(n,{mouseX:t,mouseY:e},a,r)}function hT({x:n,y:t,x2:e,y2:r},{top:i,right:a,bottom:s,left:o}){return!(n<o&&e<o||n>a&&e>a||t<i&&r<i||t>s&&r>s)}function lh({x:n,y:t},e,{top:r,right:i,bottom:a,left:s}){return n<s&&(t=rh(s,{x:n,y:t},e),n=s),n>i&&(t=rh(i,{x:n,y:t},e),n=i),t<r&&(n=$o(r,{x:n,y:t},e),t=r),t>a&&(n=$o(a,{x:n,y:t},e),t=a),{x:n,y:t}}function pT(n,t,e){const{x:r,y:i}=lh(n,t,e),{x:a,y:s}=lh(t,n,e);return{x:r,y:i,x2:a,y2:s,width:Math.abs(a-r),height:Math.abs(s-i)}}function gT(n,{mouseX:t,mouseY:e},r=Yn,i){const{x:a,y:s,x2:o,y2:l}=n.getProps(["x","y","x2","y2"],i),c=o-a,u=l-s,d=oi(c)+oi(u),f=d===0?-1:((t-a)*c+(e-s)*u)/d;let p,y;return f<0?(p=a,y=s):f>1?(p=o,y=l):(p=a+f*c,y=s+f*u),oi(t-p)+oi(e-y)<=r}function Vo(n,{mouseX:t,mouseY:e},r,i){const a=n.label;return a.options.display&&a.inRange(t,e,i,r)}function mT(n,t,e){const r=e.borderWidth,i=Gt(e.padding),a=Bo(n.ctx,e),s=a.width+i.width+r,o=a.height+i.height+r;return vT(t,e,{width:s,height:o,padding:i},n.chartArea)}function yT(n){const{x:t,y:e,x2:r,y2:i}=n,a=Math.atan2(i-e,r-t);return a>dt/2?a-dt:a<dt/-2?a+dt:a}function vT(n,t,e,r){const{width:i,height:a,padding:s}=e,{xAdjust:o,yAdjust:l}=t,c={x:n.x,y:n.y},u={x:n.x2,y:n.y2},d=t.rotation==="auto"?yT(n):Xt(t.rotation),f=bT(i,a,d),p=xT(n,t,{labelSize:f,padding:s},r),y=n.cp?jo(c,n.cp,u,p):Ho(c,u,p),x={size:f.w,min:r.left,max:r.right,padding:s.left},g={size:f.h,min:r.top,max:r.bottom,padding:s.top},m=uh(y.x,x)+o,v=uh(y.y,g)+l;return{x:m-i/2,y:v-a/2,x2:m+i/2,y2:v+a/2,centerX:m,centerY:v,pointX:y.x,pointY:y.y,width:i,height:a,rotation:xi(d)}}function bT(n,t,e){const r=Math.cos(e),i=Math.sin(e);return{w:Math.abs(n*r)+Math.abs(t*i),h:Math.abs(n*i)+Math.abs(t*r)}}function xT(n,t,e,r){let i;const a=_T(n,r);return t.position==="start"?i=ch({w:n.x2-n.x,h:n.y2-n.y},e,t,a):t.position==="end"?i=1-ch({w:n.x-n.x2,h:n.y-n.y2},e,t,a):i=Io(1,t.position),i}function ch(n,t,e,r){const{labelSize:i,padding:a}=t,s=n.w*r.dx,o=n.h*r.dy,l=s>0&&(i.w/2+a.left-r.x)/s,c=o>0&&(i.h/2+a.top-r.y)/o;return la(Math.max(l,c),0,.25)}function _T(n,t){const{x:e,x2:r,y:i,y2:a}=n,s=Math.min(i,a)-t.top,o=Math.min(e,r)-t.left,l=t.bottom-Math.max(i,a),c=t.right-Math.max(e,r);return{x:Math.min(o,c),y:Math.min(s,l),dx:o<=c?1:-1,dy:s<=l?1:-1}}function uh(n,t){const{size:e,min:r,max:i,padding:a}=t,s=e/2;return e>i-r?(i+r)/2:(r>=n-a-s&&(n=r+a+s),i<=n+a+s&&(n=i-a-s),n)}function dh(n){const t=n.options,e=t.arrowHeads&&t.arrowHeads.start,r=t.arrowHeads&&t.arrowHeads.end;return{startOpts:e,endOpts:r,startAdjust:fh(n,e),endAdjust:fh(n,r)}}function fh(n,t){if(!t||!t.display)return 0;const{length:e,width:r}=t,i=n.options.borderWidth/2,a={x:e,y:r+i};return Math.abs($o(0,a,{x:0,y:i}))}function qo(n,t,e,r){if(!r||!r.display)return;const{length:i,width:a,fill:s,backgroundColor:o,borderColor:l}=r,c=Math.abs(t-i)+e;n.beginPath(),dr(n,r),xn(n,r),n.moveTo(c,-a),n.lineTo(t+e,0),n.lineTo(c,a),s===!0?(n.fillStyle=o||l,n.closePath(),n.fill(),n.shadowColor="transparent"):n.shadowColor=r.borderShadowColor,n.stroke()}function wT(n,t,e){const{x:r,y:i,x2:a,y2:s,centerX:o,centerY:l}=n,c=Math.atan2(s-i,a-r),u=No(t.controlPoint,0),d={x:o+bn(e,u.x,!1),y:l+bn(e,u.y,!1)};return $n(d,{x:o,y:l},c)}function hh(n,{x:t,y:e},{angle:r,adjust:i},a){!a||!a.display||(n.save(),n.translate(t,e),n.rotate(r),qo(n,0,-i,a),n.restore())}function TT(n,t,e,r){const{x:i,y:a,x2:s,y2:o,options:l}=t,{startOpts:c,endOpts:u,startAdjust:d,endAdjust:f}=dh(t),p={x:i,y:a},y={x:s,y:o},x=sh(p,e,y,0),g=sh(p,e,y,1)-dt,m=jo(p,e,y,d/r),v=jo(p,e,y,1-f/r),b=new Path2D;n.beginPath(),b.moveTo(m.x,m.y),b.quadraticCurveTo(e.x,e.y,v.x,v.y),n.shadowColor=l.borderShadowColor,n.stroke(b),t.path=b,t.ctx=n,hh(n,m,{angle:x,adjust:d},c),hh(n,v,{angle:g,adjust:f},u)}class ci extends te{inRange(t,e,r,i){const a=this.options.rotation,s=this.options.borderWidth;if(r!=="x"&&r!=="y")return ST({x:t,y:e},this.getProps(["width","height","centerX","centerY"],i),a,s);const{x:o,y:l,x2:c,y2:u}=this.getProps(["x","y","x2","y2"],i),d=s/2,f=r==="y"?{start:l,end:u}:{start:o,end:c},p=$n({x:t,y:e},this.getCenterPoint(i),Xt(-a));return p[r]>=f.start-d-Yn&&p[r]<=f.end+d+Yn}getCenterPoint(t){return ur(this,t)}draw(t){const{width:e,height:r,centerX:i,centerY:a,options:s}=this;t.save(),Uo(t,this.getCenterPoint(),s.rotation),dr(t,this.options),t.beginPath(),t.fillStyle=s.backgroundColor;const o=xn(t,s);t.ellipse(i,a,r/2,e/2,dt/2,0,2*dt),t.fill(),o&&(t.shadowColor=s.borderShadowColor,t.stroke()),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return qf(t,e)}}ci.id="ellipseAnnotation",ci.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:Object.assign({},hr.defaults.label),rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},ci.defaultRoutes={borderColor:"color",backgroundColor:"color"},ci.descriptors={label:{_fallback:!0}};function ST(n,t,e,r){const{width:i,height:a,centerX:s,centerY:o}=t,l=i/2,c=a/2;if(l<=0||c<=0)return!1;const u=Xt(e||0),d=r/2||0,f=Math.cos(u),p=Math.sin(u),y=Math.pow(f*(n.x-s)+p*(n.y-o),2),x=Math.pow(p*(n.x-s)-f*(n.y-o),2);return y/Math.pow(l+d,2)+x/Math.pow(c+d,2)<=1.0001}class fa extends te{inRange(t,e,r,i){const{x:a,y:s,x2:o,y2:l,width:c}=this.getProps(["x","y","x2","y2","width"],i),u=this.options.borderWidth;if(r!=="x"&&r!=="y")return w1({x:t,y:e},this.getCenterPoint(i),c/2,u);const d=u/2,f=r==="y"?{start:s,end:l,value:e}:{start:a,end:o,value:t};return f.value>=f.start-d&&f.value<=f.end+d}getCenterPoint(t){return ur(this,t)}draw(t){const e=this.options,r=e.borderWidth;if(e.radius<.1)return;t.save(),t.fillStyle=e.backgroundColor,dr(t,e);const i=xn(t,e);E1(t,this,this.centerX,this.centerY),i&&!ua(e.pointStyle)&&(t.shadowColor=e.borderShadowColor,t.stroke()),t.restore(),e.borderWidth=r}resolveElementProperties(t,e){const r=Vf(t,e);return r.initProperties=ai(t,r,e),r}}fa.id="pointAnnotation",fa.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,pointStyle:"circle",radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},fa.defaultRoutes={borderColor:"color",backgroundColor:"color"};class ha extends te{inRange(t,e,r,i){if(r!=="x"&&r!=="y")return this.options.radius>=.1&&this.elements.length>1&&MT(this.elements,t,e,i);const a=$n({x:t,y:e},this.getCenterPoint(i),Xt(-this.options.rotation)),s=this.elements.map(c=>r==="y"?c.bY:c.bX),o=Math.min(...s),l=Math.max(...s);return a[r]>=o&&a[r]<=l}getCenterPoint(t){return ur(this,t)}draw(t){const{elements:e,options:r}=this;t.save(),t.beginPath(),t.fillStyle=r.backgroundColor,dr(t,r);const i=xn(t,r);let a=!0;for(const s of e)a?(t.moveTo(s.x,s.y),a=!1):t.lineTo(s.x,s.y);t.closePath(),t.fill(),i&&(t.shadowColor=r.borderShadowColor,t.stroke()),t.restore()}resolveElementProperties(t,e){const r=Vf(t,e),{sides:i,rotation:a}=e,s=[],o=2*dt/i;let l=a*Ba;for(let c=0;c<i;c++,l+=o){const u=CT(r,e,l);u.initProperties=ai(t,r,e),s.push(u)}return r.elements=s,r}}ha.id="polygonAnnotation",ha.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,point:{radius:0},radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,sides:3,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},ha.defaultRoutes={borderColor:"color",backgroundColor:"color"};function CT({centerX:n,centerY:t},{radius:e,borderWidth:r},i){const a=r/2,s=Math.sin(i),o=Math.cos(i),l={x:n+s*e,y:t-o*e};return{type:"point",optionScope:"point",properties:{x:l.x,y:l.y,centerX:l.x,centerY:l.y,bX:n+s*(e+a),bY:t-o*(e+a)}}}function MT(n,t,e,r){let i=!1,a=n[n.length-1].getProps(["bX","bY"],r);for(const s of n){const o=s.getProps(["bX","bY"],r);o.bY>e!=a.bY>e&&t<(a.bX-o.bX)*(e-o.bY)/(a.bY-o.bY)+o.bX&&(i=!i),a=o}return i}const _n={box:hr,ellipse:ci,label:si,line:li,point:fa,polygon:ha};Object.keys(_n).forEach(n=>{Ut.describe(`elements.${_n[n].id}`,{_fallback:"plugins.annotation.common"})});const DT={update:Object.assign},kT=Yo.concat(da),ph=(n,t)=>lt(t)?Ko(n,t):n,Xo=n=>n==="color"||n==="font";function Go(n="line"){return _n[n]?n:(console.warn(`Unknown annotation type: '${n}', defaulting to 'line'`),"line")}function OT(n,t,e,r){const i=ET(n,e.animations,r),a=t.annotations,s=LT(t.elements,a);for(let o=0;o<a.length;o++){const l=a[o],c=gh(s,o,l.type),u=l.setContext(AT(n,c,l)),d=c.resolveElementProperties(n,u);d.skip=PT(d),"elements"in d&&(RT(c,d.elements,u,i),delete d.elements),de(c.x)||Object.assign(c,d),Object.assign(c,d.initProperties),d.options=mh(u),i.update(c,d)}}function PT(n){return isNaN(n.x)||isNaN(n.y)}function ET(n,t,e){return e==="reset"||e==="none"||e==="resize"?DT:new Ja(n,t)}function RT(n,t,e,r){const i=n.elements||(n.elements=[]);i.length=t.length;for(let a=0;a<t.length;a++){const s=t[a],o=s.properties,l=gh(i,a,s.type,s.initProperties),c=e[s.optionScope].override(s);o.options=mh(c),r.update(l,o)}}function gh(n,t,e,r){const i=_n[Go(e)];let a=n[t];return(!a||!(a instanceof i))&&(a=n[t]=new i,Object.assign(a,r)),a}function mh(n){const t=_n[Go(n.type)],e={};e.id=n.id,e.type=n.type,e.drawTime=n.drawTime,Object.assign(e,Ko(n,t.defaults),Ko(n,t.defaultRoutes));for(const r of kT)e[r]=n[r];return e}function Ko(n,t){const e={};for(const r of Object.keys(t)){const i=t[r],a=n[r];Xo(r)&&mt(a)?e[r]=a.map(s=>ph(s,i)):e[r]=ph(a,i)}return e}function AT(n,t,e){return t.$context||(t.$context=Object.assign(Object.create(n.getContext()),{element:t,id:e.id,type:"annotation"}))}function LT(n,t){const e=t.length,r=n.length;if(r<e){const i=e-r;n.splice(r,0,...new Array(i))}else r>e&&n.splice(e,r-e);return n}var IT="3.0.1";const wn=new Map,NT=Yo.concat(da);var yh={id:"annotation",version:IT,beforeRegister(){T1("chart.js","4.0",Se.version)},afterRegister(){Se.register(_n)},afterUnregister(){Se.unregister(_n)},beforeInit(n){wn.set(n,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:!1,moveListened:!1,hooks:{},hooked:!1,hovered:[]})},beforeUpdate(n,t,e){const r=wn.get(n),i=r.annotations=[];let a=e.annotations;lt(a)?Object.keys(a).forEach(s=>{const o=a[s];lt(o)&&(o.id=s,i.push(o))}):mt(a)&&i.push(...a),K1(i,n.scales)},afterDataLimits(n,t){const e=wn.get(n);G1(n,t.scale,e.annotations.filter(r=>r.display&&r.adjustScaleRange))},afterUpdate(n,t,e){const r=wn.get(n);$1(n,r,e),OT(n,r,e,t.mode),r.visibleElements=r.elements.filter(i=>!i.skip&&i.options.display),X1(n,r,e)},beforeDatasetsDraw(n,t,e){pa(n,"beforeDatasetsDraw",e.clip)},afterDatasetsDraw(n,t,e){pa(n,"afterDatasetsDraw",e.clip)},beforeDraw(n,t,e){pa(n,"beforeDraw",e.clip)},afterDraw(n,t,e){pa(n,"afterDraw",e.clip)},beforeEvent(n,t,e){const r=wn.get(n);j1(r,t.event,e)&&(t.changed=!0)},afterDestroy(n){wn.delete(n)},_getState(n){return wn.get(n)},defaults:{animations:{numbers:{properties:["x","y","x2","y2","width","height","centerX","centerY","pointX","pointY","radius"],type:"number"}},clip:!0,interaction:{mode:void 0,axis:void 0,intersect:void 0},common:{drawTime:"afterDatasetsDraw",init:!1,label:{}}},descriptors:{_indexable:!1,_scriptable:n=>!NT.includes(n)&&n!=="init",annotations:{_allKeys:!1,_fallback:(n,t)=>`elements.${_n[Go(t.type)].id}`},interaction:{_fallback:!0},common:{label:{_indexable:Xo,_fallback:!0},_indexable:Xo}},additionalOptionScopes:[""]};function pa(n,t,e){const{ctx:r,chartArea:i}=n,a=wn.get(n);e&&Pr(r,i);const s=FT(a.visibleElements,t).sort((o,l)=>o.element.options.z-l.element.options.z);for(const o of s)UT(r,i,a,o);e&&Er(r)}function FT(n,t){const e=[];for(const r of n)if(r.options.drawTime===t&&e.push({element:r,main:!0}),r.elements&&r.elements.length)for(const i of r.elements)i.options.display&&i.options.drawTime===t&&e.push({element:i});return e}function UT(n,t,e,r){const i=r.element;r.main?(Zf(e,i,"beforeDraw"),i.draw(n,t),Zf(e,i,"afterDraw")):i.draw(n,t)}const ga="24px",vh=(n,t)=>{const e=n.__vccOpts||n;for(const[r,i]of t)e[r]=i;return e},BT=n=>(h.pushScopeId("data-v-41995a30"),n=n(),h.popScopeId(),n),WT=["aria-hidden"],zT={key:0,"data-testid":"kui-icon-svg-title"},YT=BT(()=>h.createElementVNode("path",{d:"M9 20C8.45 20 7.97917 19.8042 7.5875 19.4125C7.19583 19.0208 7 18.55 7 18C7 17.45 7.19583 16.9792 7.5875 16.5875C7.97917 16.1958 8.45 16 9 16C9.55 16 10.0208 16.1958 10.4125 16.5875C10.8042 16.9792 11 17.45 11 18C11 18.55 10.8042 19.0208 10.4125 19.4125C10.0208 19.8042 9.55 20 9 20ZM15 20C14.45 20 13.9792 19.8042 13.5875 19.4125C13.1958 19.0208 13 18.55 13 18C13 17.45 13.1958 16.9792 13.5875 16.5875C13.9792 16.1958 14.45 16 15 16C15.55 16 16.0208 16.1958 16.4125 16.5875C16.8042 16.9792 17 17.45 17 18C17 18.55 16.8042 19.0208 16.4125 19.4125C16.0208 19.8042 15.55 20 15 20ZM9 14C8.45 14 7.97917 13.8042 7.5875 13.4125C7.19583 13.0208 7 12.55 7 12C7 11.45 7.19583 10.9792 7.5875 10.5875C7.97917 10.1958 8.45 10 9 10C9.55 10 10.0208 10.1958 10.4125 10.5875C10.8042 10.9792 11 11.45 11 12C11 12.55 10.8042 13.0208 10.4125 13.4125C10.0208 13.8042 9.55 14 9 14ZM15 14C14.45 14 13.9792 13.8042 13.5875 13.4125C13.1958 13.0208 13 12.55 13 12C13 11.45 13.1958 10.9792 13.5875 10.5875C13.9792 10.1958 14.45 10 15 10C15.55 10 16.0208 10.1958 16.4125 10.5875C16.8042 10.9792 17 11.45 17 12C17 12.55 16.8042 13.0208 16.4125 13.4125C16.0208 13.8042 15.55 14 15 14ZM9 8C8.45 8 7.97917 7.80417 7.5875 7.4125C7.19583 7.02083 7 6.55 7 6C7 5.45 7.19583 4.97917 7.5875 4.5875C7.97917 4.19583 8.45 4 9 4C9.55 4 10.0208 4.19583 10.4125 4.5875C10.8042 4.97917 11 5.45 11 6C11 6.55 10.8042 7.02083 10.4125 7.4125C10.0208 7.80417 9.55 8 9 8ZM15 8C14.45 8 13.9792 7.80417 13.5875 7.4125C13.1958 7.02083 13 6.55 13 6C13 5.45 13.1958 4.97917 13.5875 4.5875C13.9792 4.19583 14.45 4 15 4C15.55 4 16.0208 4.19583 16.4125 4.5875C16.8042 4.97917 17 5.45 17 6C17 6.55 16.8042 7.02083 16.4125 7.4125C16.0208 7.80417 15.55 8 15 8Z",fill:"currentColor"},null,-1)),HT=vh(h.defineComponent({__name:"DragIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:ga,validator:n=>{if(typeof n=="number"&&n>0)return!0;if(typeof n=="string"){const t=String(n).replace(/px/gi,""),e=Number(t);if(e&&!isNaN(e)&&Number.isInteger(e)&&e>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(n){const t=n,e=h.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const i=String(t.size).replace(/px/gi,""),a=Number(i);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return ga}),r=h.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,flexShrink:"0",height:e.value,lineHeight:"0",width:e.value}));return(i,a)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(n.as),{"aria-hidden":n.decorative?"true":void 0,class:"kui-icon drag-icon","data-testid":"kui-icon-wrapper-drag-icon",style:h.normalizeStyle(r.value)},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock("svg",{"aria-hidden":n.decorative?"true":void 0,"data-testid":"kui-icon-svg-drag-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[n.title?(h.openBlock(),h.createElementBlock("title",zT,h.toDisplayString(n.title),1)):h.createCommentVNode("",!0),YT],8,WT))]),_:1},8,["aria-hidden","style"]))}}),[["__scopeId","data-v-41995a30"]]),$T=n=>(h.pushScopeId("data-v-1a0beec9"),n=n(),h.popScopeId(),n),jT=["aria-hidden"],VT={key:0,"data-testid":"kui-icon-svg-title"},qT=$T(()=>h.createElementVNode("path",{d:"M12.025 22.05C11.7583 22.05 11.5042 22 11.2625 21.9C11.0208 21.8 10.8 21.6583 10.6 21.475L2.575 13.45C2.39167 13.25 2.25 13.0292 2.15 12.7875C2.05 12.5458 2 12.2917 2 12.025C2 11.7583 2.05 11.5 2.15 11.25C2.25 11 2.39167 10.7833 2.575 10.6L10.6 2.575C10.8 2.375 11.0208 2.22917 11.2625 2.1375C11.5042 2.04583 11.7583 2 12.025 2C12.2917 2 12.55 2.04583 12.8 2.1375C13.05 2.22917 13.2667 2.375 13.45 2.575L21.475 10.6C21.675 10.7833 21.8208 11 21.9125 11.25C22.0042 11.5 22.05 11.7583 22.05 12.025C22.05 12.2917 22.0042 12.5458 21.9125 12.7875C21.8208 13.0292 21.675 13.25 21.475 13.45L13.45 21.475C13.2667 21.6583 13.05 21.8 12.8 21.9C12.55 22 12.2917 22.05 12.025 22.05ZM11.025 13.025H13.025V7.025H11.025V13.025ZM12.025 16.025C12.3083 16.025 12.5458 15.9292 12.7375 15.7375C12.9292 15.5458 13.025 15.3083 13.025 15.025C13.025 14.7417 12.9292 14.5042 12.7375 14.3125C12.5458 14.1208 12.3083 14.025 12.025 14.025C11.7417 14.025 11.5042 14.1208 11.3125 14.3125C11.1208 14.5042 11.025 14.7417 11.025 15.025C11.025 15.3083 11.1208 15.5458 11.3125 15.7375C11.5042 15.9292 11.7417 16.025 12.025 16.025Z",fill:"currentColor"},null,-1)),XT=vh(h.defineComponent({__name:"WarningIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:ga,validator:n=>{if(typeof n=="number"&&n>0)return!0;if(typeof n=="string"){const t=String(n).replace(/px/gi,""),e=Number(t);if(e&&!isNaN(e)&&Number.isInteger(e)&&e>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(n){const t=n,e=h.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const i=String(t.size).replace(/px/gi,""),a=Number(i);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return ga}),r=h.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,flexShrink:"0",height:e.value,lineHeight:"0",width:e.value}));return(i,a)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(n.as),{"aria-hidden":n.decorative?"true":void 0,class:"kui-icon warning-icon","data-testid":"kui-icon-wrapper-warning-icon",style:h.normalizeStyle(r.value)},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock("svg",{"aria-hidden":n.decorative?"true":void 0,"data-testid":"kui-icon-svg-warning-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[n.title?(h.openBlock(),h.createElementBlock("title",VT,h.toDisplayString(n.title),1)):h.createCommentVNode("",!0),qT],8,jT))]),_:1},8,["aria-hidden","style"]))}}),[["__scopeId","data-v-1a0beec9"]]),GT="#6c7489",KT="#995c00",QT="20px",bh="24px",ZT="40px",JT="48px",tS={class:"tooltip-title"},eS={class:"title font-bold"},nS={key:1,class:"subtitle"},rS={class:"tooltip"},iS={key:0},aS={class:"display-label"},sS={class:"display-value"},oS=h.defineComponent({__name:"ChartTooltip",props:{showTooltip:{type:Boolean,required:!0,default:!1},left:{type:String,required:!1,default:null},top:{type:String,required:!1,default:null},tooltipTitle:{type:String,required:!1,default:""},context:{type:[String,Number],required:!1,default:""},series:{type:Array,required:!0,default:()=>[]},locked:{type:Boolean,required:!1,default:!1}},emits:["dimensions","top","left"],setup(n,{emit:t}){const e=t,r=n,i=h.ref(null),a=h.ref(!1),s=h.ref({x:0,y:0}),o=h.ref({x:0,y:0}),l=h.ref({left:r.left,top:r.top});h.watch(i,p=>{if(p){const{width:y,height:x}=p.getBoundingClientRect();e("dimensions",{width:y,height:x})}}),h.watch(()=>r.locked,p=>{p?(l.value.left=r.left,l.value.top=r.top):p===!1&&(e("top",l.value.top),e("left",l.value.left))});function c(p){if(i.value){a.value=!0;const y=window.getComputedStyle(i.value),x=y.transform||y.webkitTransform||y.mozTransform,g=new DOMMatrix(x),m=g.m41,v=g.m42;s.value={x:m,y:v},o.value={x:p.clientX,y:p.clientY},window.addEventListener("mousemove",d),window.addEventListener("mouseup",f)}}let u=null;function d(p){p.preventDefault(),p.stopPropagation(),a.value&&(u!==null&&window.cancelAnimationFrame(u),u=window.requestAnimationFrame(()=>{const y=p.clientX-o.value.x,x=p.clientY-o.value.y;l.value.left=`${s.value.x+y}px`,l.value.top=`${s.value.y+x}px`}))}function f(){a.value=!1,u!==null&&window.cancelAnimationFrame(u),window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",f)}return(p,y)=>n.showTooltip?(h.openBlock(),h.createElementBlock("div",{key:0,ref_key:"tooltipEl",ref:i,class:h.normalizeClass(["tooltip-container",{locked:n.locked}]),style:h.normalizeStyle({transform:n.locked?`translate(${l.value.left}, ${l.value.top})`:`translate(${n.left}, ${n.top})`,left:"0",top:"0",pointerEvents:n.locked?"all":"none"}),onMousedown:c},[h.createElementVNode("div",tS,[h.createElementVNode("span",eS,h.toDisplayString(n.tooltipTitle),1),n.locked?(h.openBlock(),h.createBlock(h.unref(HT),{key:0,class:"drag-icon",color:h.unref(GT)},null,8,["color"])):h.createCommentVNode("",!0),n.context?(h.openBlock(),h.createElementBlock("span",nS,h.toDisplayString(n.context),1)):h.createCommentVNode("",!0)]),h.createElementVNode("ul",rS,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.series,({backgroundColor:x,borderColor:g,label:m,value:v})=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:m},[n.series.length?(h.openBlock(),h.createElementBlock("li",iS,[h.createElementVNode("div",{class:"square-marker",style:h.normalizeStyle({background:x,"border-color":g})},null,4),h.createElementVNode("span",aS,h.toDisplayString(m),1),h.createElementVNode("span",sS,h.toDisplayString(v),1)])):h.createCommentVNode("",!0)],64))),128))])],38)):h.createCommentVNode("",!0)}}),Ze=(n,t)=>{const e=n.__vccOpts||n;for(const[r,i]of t)e[r]=i;return e},Qo=Ze(oS,[["__scopeId","data-v-b0247af7"]]),lS=["onClick"],cS=["title"],uS={key:0,class:"sub-label"},Zo=Ze(h.defineComponent({__name:"ChartLegend",props:{id:{type:String,required:!0},items:{type:Object,required:!0},chartInstance:{type:Object,required:!1,default:()=>null}},setup(n){h.useCssVars(b=>({"143d7c82":o.value}));const t=n,e=h.ref(),r=h.ref([]),i=h.inject("showLegendValues",!0),a=h.inject("legendPosition",h.ref(Wt.Right)),s=h.ref([]),o=h.ref(bh),l=()=>{const b=e.value;if(!b||!r.value||b.children.length===0)return 0;const w=b.children[0].getBoundingClientRect().top;for(const T of r.value)if(T.getBoundingClientRect().top>w)return!0;return!1},c=h.computed(()=>t.items.length>2||a.value===Wt.Right),u=()=>{e.value&&a.value===Wt.Bottom&&(l()?o.value=JT:o.value=bh)},d=()=>{if(e.value&&a.value===Wt.Bottom){let b=0;r.value.forEach(T=>{const M=Array.from(T.children).reduce((k,S)=>k+S.offsetWidth,0);M>b&&(b=M)});const w=parseInt(ZT,10);e.value.style.gridTemplateColumns=`repeat(auto-fit, ${b+w}px)`}u()},f=()=>{if(t.items.length!==s.value.length)return s.value=t.items,!0;for(let b=0;b<t.items.length;b++)if(t.items[b].text!==s.value[b].text)return s.value=t.items,!0;return!1};h.watch(()=>t.items,()=>{f()&&d()},{immediate:!0,flush:"post"});const p=h.ref(0),y=h.ref(0),x=new ResizeObserver(Jd(b=>{const w=b[0],T=w.contentRect.width,M=w.contentRect.height;T!==p.value&&M===y.value&&d(),p.value=T,y.value=M},100));h.watch(()=>a.value,()=>{d()}),h.onMounted(()=>{s.value=t.items,e.value&&x.observe(e.value),window.requestAnimationFrame(()=>{d()})}),h.onBeforeUnmount(()=>{e.value&&x.unobserve(e.value)});const g=(b=0,w)=>{if(t.chartInstance===null)return;const T=t.chartInstance instanceof Se?t.chartInstance:t.chartInstance.chart;m(b,w)?T.hide(b,w):T.show(b,w),T.update()},m=(b=0,w)=>{if(t.chartInstance===null||t.chartInstance.chart===null)return!0;const T=t.chartInstance instanceof Se?t.chartInstance:t.chartInstance.chart,M=T.getDatasetMeta(b);return M.dataset||w===void 0?T.isDatasetVisible(b):!(M.data.length&&M.data[w].hidden)},v=b=>({[Wt.Right]:"vertical",[Wt.Bottom]:"horizontal",[Wt.Hidden]:"hidden"})[b];return(b,w)=>h.unref(a)!==h.unref(Wt).Hidden?(h.openBlock(),h.createElementBlock("ul",{key:0,ref_key:"legendContainerRef",ref:e,class:h.normalizeClass(["legend-container",v(h.unref(a))]),"data-testid":"legend"},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.items,({fillStyle:T,strokeStyle:M,text:k,datasetIndex:S,index:C,value:O})=>(h.openBlock(),h.createElementBlock("li",{key:k,ref_for:!0,ref_key:"legendItemsRef",ref:r,onClick:P=>g(S,C)},[h.createElementVNode("div",{class:"square-marker",style:h.normalizeStyle({background:T,"border-color":M})},null,4),h.createElementVNode("div",{class:h.normalizeClass(["label-container",{"strike-through":!m(S,C)}])},[h.createElementVNode("div",{class:h.normalizeClass(["label",{"truncate-label":c.value}]),title:k},h.toDisplayString(k),11,cS),O&&h.unref(i)?(h.openBlock(),h.createElementBlock("div",uS,h.toDisplayString(O.formatted),1)):h.createCommentVNode("",!0)],2)],8,lS))),128))],2)):h.createCommentVNode("",!0)}}),[["__scopeId","data-v-bf35eae8"]]);let ma;const dS=new Uint8Array(16);function fS(){if(!ma&&(ma=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ma))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ma(dS)}const ne=[];for(let n=0;n<256;++n)ne.push((n+256).toString(16).slice(1));function hS(n,t=0){return ne[n[t+0]]+ne[n[t+1]]+ne[n[t+2]]+ne[n[t+3]]+"-"+ne[n[t+4]]+ne[n[t+5]]+"-"+ne[n[t+6]]+ne[n[t+7]]+"-"+ne[n[t+8]]+ne[n[t+9]]+"-"+ne[n[t+10]]+ne[n[t+11]]+ne[n[t+12]]+ne[n[t+13]]+ne[n[t+14]]+ne[n[t+15]]}const xh={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Tn(n,t,e){if(xh.randomUUID&&!t&&!n)return xh.randomUUID();n=n||{};const r=n.random||(n.rng||fS)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){e=e||0;for(let i=0;i<16;++i)t[e+i]=r[i];return t}return hS(r)}const _h=(n,t)=>{const e=n.ctx,r=n.scales.y,i=n.scales.x,a=t[t.length-1].element;e.save(),e.strokeStyle="rgba(100, 100, 100, 1)",e.lineWidth=3,n.options.indexAxis==="x"?e.strokeRect(a.x-a.width/2,a.y,a.width,r.bottom-a.y):e.strokeRect(i.left,a.y-a.height/2,a.x-i.left,a.height),e.restore()},wh={id:"highlightPlugin",clicked:!1,afterDatasetsDraw:function(n){this.clickedElements&&this.clickedElements.length&&_h(n,this.clickedElements)},afterEvent:function(n,{event:t}){var i;if(t.type!=="click"||!t.native)return;this.clicked=!this.clicked;const e=((i=n.options.interaction)==null?void 0:i.mode)||"index",r=n.getElementsAtEventForMode(t.native,e,{intersect:!1},!0);r.length&&this.clicked?(this.clickedElements=r,_h(n,this.clickedElements),this.previousHoverOption=n.options.hover,n.options.hover={mode:null}):(delete this.clickedElements,n.options.hover=this.previousHoverOption||n.options.hover,this.clicked=!1)},beforeDestroy(n){delete this.clickedElements,n.options.hover=this.previousHoverOption||n.options.hover,this.clicked=!1}},Th=6,pS="100%",gS="100%",mS=20,yS=20,Sh=6,vS=0,bS=10,xS=10,_S=1,wS=Ze(h.defineComponent({__name:"StackedBarChart",props:{chartData:{type:Object,required:!1,default:()=>({labels:[],datasets:[]})},tooltipTitle:{type:String,required:!1,default:""},legendValues:{type:Object,required:!1,default:null},metricUnit:{type:String,required:!1,default:""},orientation:{type:String,required:!1,default:"horizontal",validator:n=>["horizontal","vertical"].includes(n)},annotations:{type:Boolean,required:!1,default:!0},metricAxesTitle:{type:String,required:!1,default:null},dimensionAxesTitle:{type:String,required:!1,default:null},stacked:{type:Boolean,required:!1,default:!0},syntheticsDataKey:{type:String,required:!1,default:""},chartLegendSortFn:{type:Function,required:!1,default:(n,t)=>n.value&&t.value&&t.value.raw-n.value.raw},chartTooltipSortFn:{type:Function,required:!1,default:(n,t)=>t.rawValue-n.rawValue}},setup(n){const t=n,{i18n:e}=Mt.useI18n(),{translateUnit:r}=Mt.useTranslatedUnits(),i=h.ref(null),a=({chart:L},U)=>{var K;const j=L.data,Z=(K=j.labels)==null?void 0:K.indexOf(U);return j.datasets.reduce((N,A,Q)=>{if(L.isDatasetVisible(Q)){const X=A.data[Z];return isNaN(X)?N:N+X}else return N},0)},s=(L,U,j,Z)=>{const K=Z==="horizontal";U===null&&(U=e.t("entityNoName"));const N={type:"label",yValue:X=>K?U:a(X,U),xValue:X=>K?a(X,U):U},A={...N,position:K?{x:"start",y:"center"}:{x:"center",y:"end"},yAdjust:()=>K?0:-Math.abs(Qw()),content:X=>Eo(a(X,U),j)},Q={...N,content:X=>Ef(a(X,U),Pf(X.chart,L)),position:K?{x:"start",y:"center"}:{x:"center",y:"end"},xAdjust:X=>K?Of(Eo(a(X,U),j)):0,color:Df};return{[`${U}-value`]:A,[`${U}-percent`]:Q}},o=h.ref(null),l=h.ref(),c=h.ref(Tn()),u=Tn(),d=Tn(),f=h.ref([]),p=h.ref(h.inject("legendPosition",Wt.Right)),y=h.ref({show:!1,top:"0px",left:"0px",text:"",offset:-50}),x=h.toRef(t,"metricUnit"),g=h.computed(()=>h.toRef(t,"orientation").value==="horizontal"),m=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:x,translateUnit:r,offsetX:0,offsetY:0,width:0,height:0,locked:!1,chartType:g.value?ee.HORIZONTAL_BAR:ee.VERTICAL_BAR,chartTooltipSortFn:t.chartTooltipSortFn}),v=h.ref(0),b=()=>{var L;return t.annotations&&((L=t.chartData.labels)==null?void 0:L.reduce((U,j)=>Object.assign(U,s(t.chartData,j,x.value,t.orientation)),{}))},w={id:c.value,afterUpdate(L){v.value+=1,f.value=L.options.plugins.legend.labels.generateLabels(L).map(U=>({...U,value:t.legendValues&&t.legendValues[U.text]})).sort(t.chartLegendSortFn)}},T={id:u,afterUpdate(L){L.options.plugins.annotation.annotations=t.annotations?b():{}}},S=[w,{id:"axisHover",afterEvent(L,U){if(y.value.show=!1,U.event.type==="mousemove"){const j=U.event,Z=L.options.indexAxis,K=L.scales,N=L.scales[Z].getLabelForValue(Number(L.scales[Z].getValueForPixel(j[Z])));if((Q=>Q==="x"?j.y>K.x.top:j.x<K.y.right)(Z))if(m.locked||(m.showTooltip=!1),N.length>aa){const X=L.canvas.getContext("2d").measureText(N).width,vt=Math.abs(Math.round(j.x-X*.5)),ct=Math.round(j.x+X*.5);y.value.left=Z==="x"?`${(vt>0?vt:ct)-y.value.offset}px`:`${j.x-X*.5-y.value.offset}px`,y.value.top=`${j.y-50}px`,y.value.show=!0,y.value.text=N}else y.value.show=!1;else y.value.show=!1}}},{id:d,afterUpdate(L){L.options.layout.padding.right=g.value?I.value:0}},wh,...t.annotations?[T]:[]],C=h.computed(()=>t.chartData.labels&&t.chartData.labels.length||0),O=h.ref(0),P=h.ref(0),E=new ResizeObserver(Jd(L=>{O.value=L[0].contentRect.width,P.value=L[0].contentRect.height},100)),F=h.computed(()=>{var U,j;const L=(j=(U=t.chartData)==null?void 0:U.labels)==null?void 0:j.length;return o.value&&L&&!g.value?`${Math.max(L*(mS+Sh),O.value)}px`:pS}),q=h.computed(()=>{var U,j;const L=(j=(U=t.chartData)==null?void 0:U.labels)==null?void 0:j.length;return o.value&&L&&g.value?`${Math.max(L*(yS+Sh),P.value)}px`:gS});Mt.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey")),h.onMounted(()=>{t.annotations&&Se.register(yh),i.value&&(O.value=i.value.offsetWidth,P.value=i.value.offsetHeight,E.observe(i.value))}),h.onUnmounted(()=>{i.value&&E.unobserve(i.value)});const $=h.computed(()=>{const L=Mt.useBarChartOptions({tooltipState:m,legendID:c.value,stacked:h.toRef(t,"stacked"),metricAxesTitle:h.toRef(t,"metricAxesTitle"),dimensionAxesTitle:h.toRef(t,"dimensionAxesTitle"),indexAxis:g.value?"y":"x",numLabels:C});return{...L.value,plugins:{...L.value.plugins,annotation:{annotations:b(),clip:!1}},layout:{autoPadding:!1,padding:{right:0,top:6*Th}}}}),Y=Mt.useChartJSCommon("bar",o,h.toRef(t,"chartData"),S,$),I=h.computed(()=>{v.value;const L=t.chartData.labels,U=t.chartData.datasets,j=L.map((N,A)=>U.reduce((Q,X)=>isNaN(Number(X.data[A]))?Q:Q+Number(X.data[A]),0)),Z=Y.value?Pf(Y.value,t.chartData):Zw(t.chartData);return j.map(N=>Of(Eo(N,x.value)+Ef(N,Z))).reduce((N,A)=>Math.max(N,A),0)+Th});h.onBeforeUnmount(()=>{Se.unregister(yh)});const it={[Wt.Right]:"legend-row",[Wt.Bottom]:"column"},B=h.computed(()=>{if(l.value&&Y.value){const L=window.devicePixelRatio,U=Y.value,j=U.scales.y.width*L+_S,Z=(U.scales.y.height+U.scales.y.top+U.scales.x.height)*L,K=l.value.getContext("2d");return K.scale(L,L),K.canvas.width=j,K.canvas.height=Z,K.canvas.style.width=`${j/L}px`,K.canvas.style.height=`${Z/L}px`,{scale:L,width:j*L,height:Z*L,targetCtx:K}}return null}),yt=L=>{const U=L.target;if(B.value&&Y.value&&!g.value){const j=B.value.scale,Z=B.value.targetCtx,K=B.value.width,N=B.value.height,A=Y.value,Q=A.canvas;Z.fillStyle="white",U.scrollLeft>=vS&&U.scrollLeft<=bS?(Z.globalCompositeOperation="source-over",Z.clearRect(0,0,K,N),Z.drawImage(Q,0,0,K,N,0,0,K,N),Z.globalCompositeOperation="destination-over",Z.fillRect(0,0,K,N)):(Z.globalCompositeOperation="source-over",Z.fillRect(0,(A.scales.y.height+A.scales.y.top+xS)*j,K,A.scales.x.height*j))}m.offsetY=U.scrollTop,m.offsetX=U.scrollLeft,y.value.offset=U.scrollLeft},ut=({width:L,height:U})=>{m.width=L,m.height=U};h.watch(()=>t.orientation,()=>{var L;if(l.value&&B.value){const U=B.value.width,j=B.value.height;((L=l.value)==null?void 0:L.getContext("2d")).clearRect(0,0,U,j)}m.showTooltip=!1,m.locked=!1}),h.watch(()=>t.annotations,L=>{Y.value&&(L?Y.value.options.plugins.annotation.annotations=b(t.chartData):delete Y.value.options.plugins.annotation.annotations)});const z=()=>{m.showTooltip&&(m.locked=!m.locked)};return(L,U)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",it[p.value]])},[h.createElementVNode("canvas",{ref_key:"axis",ref:l,class:"axis"},null,512),h.createElementVNode("div",{ref_key:"chartContainerRef",ref:i,class:"chart-container","on:scroll":yt,onClick:U[0]||(U[0]=j=>z())},[h.createElementVNode("div",{class:"chart-body",style:h.normalizeStyle({width:F.value,height:q.value})},[h.createElementVNode("canvas",{ref_key:"canvas",ref:o},null,512)],4)],544),y.value.show?(h.openBlock(),h.createElementBlock("div",{key:0,class:"axis-tooltip",style:h.normalizeStyle({top:y.value.top,left:y.value.left})},h.toDisplayString(y.value.text),5)):h.createCommentVNode("",!0),h.createVNode(Qo,{context:m.tooltipContext,left:m.left,locked:m.locked,series:m.tooltipSeries,"show-tooltip":m.showTooltip,"tooltip-title":n.tooltipTitle,top:m.top,onDimensions:ut},null,8,["context","left","locked","series","show-tooltip","tooltip-title","top"]),h.createVNode(Zo,{id:c.value,"chart-instance":h.unref(Y),items:f.value},null,8,["id","chart-instance","items"])],2))}}),[["__scopeId","data-v-cf52e4a2"]]);/*!
|
|
25
25
|
* chartjs-adapter-date-fns v3.0.0
|
|
26
26
|
* https://www.chartjs.org
|
|
27
27
|
* (c) 2022 chartjs-adapter-date-fns Contributors
|
|
28
28
|
* Released under the MIT license
|
|
29
|
-
*/const _S={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};uu._date.override({_id:"date-fns",formats:function(){return _S},parse:function(n,t){if(n===null||typeof n>"u")return null;const e=typeof n;return e==="number"||n instanceof Date?n=nt(n):e==="string"&&(typeof t=="string"?n=a_(n,t,new Date,this.options):n=Kd(n,this.options)),ks(n)?n.getTime():null},format:function(n,t){return sx(n,t,this.options)},add:function(n,t,e){switch(e){case"millisecond":return Gi(n,t);case"second":return Nv(n,t);case"minute":return Lv(n,t);case"hour":return Ov(n,t);case"day":return Td(n,t);case"week":return Fv(n,t);case"month":return Ms(n,t);case"quarter":return Iv(n,t);case"year":return Uv(n,t);default:return n}},diff:function(n,t,e){switch(e){case"millisecond":return Kr(n,t);case"second":return Xv(n,t);case"minute":return jv(n,t);case"hour":return $v(n,t);case"day":return Md(n,t);case"week":return Gv(n,t);case"month":return Pd(n,t);case"quarter":return qv(n,t);case"year":return Kv(n,t);default:return 0}},startOf:function(n,t,e){switch(t){case"second":return l_(n);case"minute":return Qv(n);case"hour":return o_(n);case"day":return Ds(n);case"week":return Sd(n);case"isoWeek":return Sd(n,{weekStartsOn:+e});case"month":return Jv(n);case"quarter":return Zv(n);case"year":return eb(n);default:return n}},endOf:function(n,t){switch(t){case"second":return sb(n);case"minute":return rb(n);case"hour":return nb(n);case"day":return kd(n);case"week":return ib(n);case"month":return Od(n);case"quarter":return ab(n);case"year":return tb(n);default:return n}}});const Sh={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},wS={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...Sh,...{ariaLabel:{type:String},ariaDescribedby:{type:String}}},TS=h.version[0]==="2"?(n,t)=>Object.assign(n,{attrs:t}):(n,t)=>Object.assign(n,t);function pi(n){return h.isProxy(n)?h.toRaw(n):n}function SS(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n;return h.isProxy(t)?new Proxy(n,{}):n}function CS(n,t){const e=n.options;e&&t&&Object.assign(e,t)}function Ch(n,t){n.labels=t}function Mh(n,t,e){const i=[];n.datasets=t.map(r=>{const a=n.datasets.find(s=>s[e]===r[e]);return!a||!r.data||i.includes(a)?{...r}:(i.push(a),Object.assign(a,r),a)})}function MS(n,t){const e={labels:[],datasets:[]};return Ch(e,n.labels),Mh(e,n.datasets,t),e}const DS=h.defineComponent({props:wS,setup(n,t){let{expose:e,slots:i}=t;const r=h.ref(null),a=h.shallowRef(null);e({chart:a});const s=()=>{if(!r.value)return;const{type:c,data:u,options:d,plugins:f,datasetIdKey:p}=n,y=MS(u,p),x=SS(y,u);a.value=new Se(r.value,{type:c,data:x,options:{...d},plugins:f})},o=()=>{const c=h.toRaw(a.value);c&&(n.destroyDelay>0?setTimeout(()=>{c.destroy(),a.value=null},n.destroyDelay):(c.destroy(),a.value=null))},l=c=>{c.update(n.updateMode)};return h.onMounted(s),h.onUnmounted(o),h.watch([()=>n.options,()=>n.data],(c,u)=>{let[d,f]=c,[p,y]=u;const x=h.toRaw(a.value);if(!x)return;let g=!1;if(d){const m=pi(d),v=pi(p);m&&m!==v&&(CS(x,m),g=!0)}if(f){const m=pi(f.labels),v=pi(y.labels),b=pi(f.datasets),w=pi(y.datasets);m!==v&&(Ch(x.config.data,m),g=!0),b&&b!==w&&(Mh(x.config.data,b,n.datasetIdKey),g=!0)}g&&h.nextTick(()=>{l(x)})},{deep:!0}),()=>h.h("canvas",{role:"img",ariaLabel:n.ariaLabel,ariaDescribedby:n.ariaDescribedby,ref:r},[h.h("p",{},[i.default?i.default():""])])}});function Jo(n,t){return Se.register(t),h.defineComponent({props:Sh,setup(e,i){let{expose:r}=i;const a=h.shallowRef(null),s=o=>{a.value=o==null?void 0:o.chart};return r({chart:a}),()=>h.h(DS,TS({ref:s},{type:n,...e}))}})}const kS=Jo("bar",Li),Dh=Jo("doughnut",pn),OS=Jo("line",Ii),PS={class:"chart-container"},ES=h.defineComponent({__name:"DoughnutChart",props:{chartData:{type:Object,required:!1,default:null},tooltipTitle:{type:String,required:!0},metricUnit:{type:String,required:!1,default:""},legendPosition:{type:String,required:!1,default:Wt.Right},legendValues:{type:Object,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Qe}},setup(n){const t=n,{translateUnit:e}=Mt.useTranslatedUnits(),i=h.ref(Tn()),r=h.ref(Tn()),a=h.ref([]),s=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:t.metricUnit,translateUnit:e,offsetX:0,offsetY:0,width:0,height:0,chartType:ee.DOUGHNUT}),o={id:i.value,afterUpdate(x){a.value=x.options.plugins.legend.labels.generateLabels(x).map(g=>({...g,value:t.legendValues&&t.legendValues[g.text],hidden:!1}))}},l=h.computed(()=>[o]),c=h.computed(()=>[t.chartData.datasets.reduce((g,m)=>(g.labels.push(m.label),g.backgroundColor.push(m.backgroundColor),g.borderColor.push(Cf(m.backgroundColor,50)),g.data.push(m.data.reduce((v,b)=>v+b,0)),g),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),u=h.computed(()=>({...t.chartData,datasets:c.value}));Mt.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const{options:d}=Mt.useDoughnutChartOptions({tooltipState:s,legendID:i.value}),f=h.ref(),p=x=>({[Wt.Right]:"legend-row",[Wt.Bottom]:"column",[Wt.Hidden]:"hidden"})[x],y=({width:x,height:g})=>{s.width=x,s.height=g};return(x,g)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",p(n.legendPosition)]),"data-testid":"doughnut-chart-parent"},[h.createElementVNode("div",PS,[h.createVNode(h.unref(Dh),{ref_key:"chartInstance",ref:f,"chart-id":r.value,data:u.value,options:h.unref(d),plugins:l.value},null,8,["chart-id","data","options","plugins"]),h.createVNode(Qo,{left:s.left,series:s.tooltipSeries,"show-tooltip":s.showTooltip,"tooltip-title":n.tooltipTitle,top:s.top,unit:n.metricUnit,onDimensions:y},null,8,["left","series","show-tooltip","tooltip-title","top","unit"])]),h.createVNode(Zo,{id:i.value,"chart-instance":f.value,items:a.value,position:n.legendPosition},null,8,["id","chart-instance","items","position"])],2))}}),RS=Ze(ES,[["__scopeId","data-v-07ea8b82"]]);var AS=Object.defineProperty,LS=(n,t,e)=>t in n?AS(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,We=(n,t,e)=>LS(n,typeof t!="symbol"?t+"":t,e),Yt=(n=>(n.FIFTEEN_MIN="15m",n.ONE_HOUR="1h",n.SIX_HOUR="6h",n.TWELVE_HOUR="12h",n.ONE_DAY="24h",n.SEVEN_DAY="7d",n.THIRTY_DAY="30d",n.CURRENT_WEEK="current_week",n.CURRENT_MONTH="current_month",n.CURRENT_QUARTER="current_quarter",n.PREVIOUS_WEEK="previous_week",n.PREVIOUS_MONTH="previous_month",n.PREVIOUS_QUARTER="previous_quarter",n))(Yt||{});const IS=["secondly","minutely","hourly","daily","weekly","trend"];function tl(n){"@babel/helpers - typeof";return tl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tl(n)}function ya(n){if(n===null||n===!0||n===!1)return NaN;var t=Number(n);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function ze(n,t){if(t.length<n)throw new TypeError(n+" argument"+(n>1?"s":"")+" required, but only "+t.length+" present")}function gi(n){ze(1,arguments);var t=Object.prototype.toString.call(n);return n instanceof Date||tl(n)==="object"&&t==="[object Date]"?new Date(n.getTime()):typeof n=="number"||t==="[object Number]"?new Date(n):((typeof n=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function kh(n,t){ze(2,arguments);var e=gi(n),i=ya(t);return isNaN(i)?new Date(NaN):(i&&e.setDate(e.getDate()+i),e)}function NS(n,t){ze(2,arguments);var e=gi(n),i=ya(t);if(isNaN(i))return new Date(NaN);if(!i)return e;var r=e.getDate(),a=new Date(e.getTime());a.setMonth(e.getMonth()+i+1,0);var s=a.getDate();return r>=s?a:(e.setFullYear(a.getFullYear(),a.getMonth(),r),e)}var FS={};function US(){return FS}function va(n,t){var e,i,r,a,s,o,l,c;ze(1,arguments);var u=US(),d=ya((e=(i=(r=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&e!==void 0?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=gi(n),p=f.getDay(),y=(p<d?7:0)+p-d;return f.setDate(f.getDate()-y),f.setHours(0,0,0,0),f}function Oh(n){ze(1,arguments);var t=gi(n);return t.setHours(0,0,0,0),t}var BS=60,WS=3600;function mi(n){ze(1,arguments);var t=gi(n);return t.setDate(1),t.setHours(0,0,0,0),t}function zS(n){ze(1,arguments);var t=gi(n),e=t.getFullYear(),i=t.getMonth(),r=new Date(0);return r.setFullYear(e,i+1,0),r.setHours(0,0,0,0),r.getDate()}function YS(n){return ze(1,arguments),Math.floor(n*WS)}function HS(n){ze(1,arguments);var t=n/BS;return Math.floor(t)}function Ph(n,t){ze(2,arguments);var e=ya(t);return NS(n,-e)}function el(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Eh={exports:{}},Rh={exports:{}};(function(n){function t(e){return e&&e.__esModule?e:{default:e}}n.exports=t,n.exports.__esModule=!0,n.exports.default=n.exports})(Rh);var Ht=Rh.exports,nl={exports:{}},il={exports:{}},Ah={exports:{}};(function(n){function t(e){"@babel/helpers - typeof";return n.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},n.exports.__esModule=!0,n.exports.default=n.exports,t(e)}n.exports=t,n.exports.__esModule=!0,n.exports.default=n.exports})(Ah);var Lh=Ah.exports,rl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i,r){if(r.length<i)throw new TypeError(i+" argument"+(i>1?"s":"")+" required, but only "+r.length+" present")}n.exports=t.default})(rl,rl.exports);var oe=rl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=e(Lh),r=e(oe);function a(s){return(0,r.default)(1,arguments),s instanceof Date||(0,i.default)(s)==="object"&&Object.prototype.toString.call(s)==="[object Date]"}n.exports=t.default})(il,il.exports);var $S=il.exports,al={exports:{}};(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=e(Lh),r=e(oe);function a(s){(0,r.default)(1,arguments);var o=Object.prototype.toString.call(s);return s instanceof Date||(0,i.default)(s)==="object"&&o==="[object Date]"?new Date(s.getTime()):typeof s=="number"||o==="[object Number]"?new Date(s):((typeof s=="string"||o==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}n.exports=t.default})(al,al.exports);var Ye=al.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e($S),r=e(Ye),a=e(oe);function s(o){if((0,a.default)(1,arguments),!(0,i.default)(o)&&typeof o!="number")return!1;var l=(0,r.default)(o);return!isNaN(Number(l))}n.exports=t.default})(nl,nl.exports);var jS=nl.exports,sl={exports:{}},ol={exports:{}},ll={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i){if(i===null||i===!0||i===!1)return NaN;var r=Number(i);return isNaN(r)?r:r<0?Math.ceil(r):Math.floor(r)}n.exports=t.default})(ll,ll.exports);var jn=ll.exports;const VS=el(jn);(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(jn),r=e(Ye),a=e(oe);function s(o,l){(0,a.default)(2,arguments);var c=(0,r.default)(o).getTime(),u=(0,i.default)(l);return new Date(c+u)}n.exports=t.default})(ol,ol.exports);var qS=ol.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(qS),r=e(oe),a=e(jn);function s(o,l){(0,r.default)(2,arguments);var c=(0,a.default)(l);return(0,i.default)(o,-c)}n.exports=t.default})(sl,sl.exports);var XS=sl.exports,cl={exports:{}},ul={exports:{}};(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(Ye),r=e(oe),a=864e5;function s(o){(0,r.default)(1,arguments);var l=(0,i.default)(o),c=l.getTime();l.setUTCMonth(0,1),l.setUTCHours(0,0,0,0);var u=l.getTime(),d=c-u;return Math.floor(d/a)+1}n.exports=t.default})(ul,ul.exports);var GS=ul.exports,dl={exports:{}},fl={exports:{}};(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=e(Ye),r=e(oe);function a(s){(0,r.default)(1,arguments);var o=1,l=(0,i.default)(s),c=l.getUTCDay(),u=(c<o?7:0)+c-o;return l.setUTCDate(l.getUTCDate()-u),l.setUTCHours(0,0,0,0),l}n.exports=t.default})(fl,fl.exports);var hl=fl.exports,pl={exports:{}},gl={exports:{}};(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(Ye),r=e(oe),a=e(hl);function s(o){(0,r.default)(1,arguments);var l=(0,i.default)(o),c=l.getUTCFullYear(),u=new Date(0);u.setUTCFullYear(c+1,0,4),u.setUTCHours(0,0,0,0);var d=(0,a.default)(u),f=new Date(0);f.setUTCFullYear(c,0,4),f.setUTCHours(0,0,0,0);var p=(0,a.default)(f);return l.getTime()>=d.getTime()?c+1:l.getTime()>=p.getTime()?c:c-1}n.exports=t.default})(gl,gl.exports);var Ih=gl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(Ih),r=e(hl),a=e(oe);function s(o){(0,a.default)(1,arguments);var l=(0,i.default)(o),c=new Date(0);c.setUTCFullYear(l,0,4),c.setUTCHours(0,0,0,0);var u=(0,r.default)(c);return u}n.exports=t.default})(pl,pl.exports);var KS=pl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(Ye),r=e(hl),a=e(KS),s=e(oe),o=6048e5;function l(c){(0,s.default)(1,arguments);var u=(0,i.default)(c),d=(0,r.default)(u).getTime()-(0,a.default)(u).getTime();return Math.round(d/o)+1}n.exports=t.default})(dl,dl.exports);var QS=dl.exports,ml={exports:{}},yl={exports:{}},Vn={};Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.getDefaultOptions=ZS,Vn.setDefaultOptions=JS;var Nh={};function ZS(){return Nh}function JS(n){Nh=n}(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=e(Ye),r=e(oe),a=e(jn),s=Vn;function o(l,c){var u,d,f,p,y,x,g,m;(0,r.default)(1,arguments);var v=(0,s.getDefaultOptions)(),b=(0,a.default)((u=(d=(f=(p=c==null?void 0:c.weekStartsOn)!==null&&p!==void 0?p:c==null||(y=c.locale)===null||y===void 0||(x=y.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&f!==void 0?f:v.weekStartsOn)!==null&&d!==void 0?d:(g=v.locale)===null||g===void 0||(m=g.options)===null||m===void 0?void 0:m.weekStartsOn)!==null&&u!==void 0?u:0);if(!(b>=0&&b<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var w=(0,i.default)(l),T=w.getUTCDay(),M=(T<b?7:0)+T-b;return w.setUTCDate(w.getUTCDate()-M),w.setUTCHours(0,0,0,0),w}n.exports=t.default})(yl,yl.exports);var vl=yl.exports,bl={exports:{}},xl={exports:{}};(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(Ye),r=e(oe),a=e(vl),s=e(jn),o=Vn;function l(c,u){var d,f,p,y,x,g,m,v;(0,r.default)(1,arguments);var b=(0,i.default)(c),w=b.getUTCFullYear(),T=(0,o.getDefaultOptions)(),M=(0,s.default)((d=(f=(p=(y=u==null?void 0:u.firstWeekContainsDate)!==null&&y!==void 0?y:u==null||(x=u.locale)===null||x===void 0||(g=x.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&p!==void 0?p:T.firstWeekContainsDate)!==null&&f!==void 0?f:(m=T.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:1);if(!(M>=1&&M<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var k=new Date(0);k.setUTCFullYear(w+1,0,M),k.setUTCHours(0,0,0,0);var S=(0,a.default)(k,u),C=new Date(0);C.setUTCFullYear(w,0,M),C.setUTCHours(0,0,0,0);var O=(0,a.default)(C,u);return b.getTime()>=S.getTime()?w+1:b.getTime()>=O.getTime()?w:w-1}n.exports=t.default})(xl,xl.exports);var Fh=xl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(Fh),r=e(oe),a=e(vl),s=e(jn),o=Vn;function l(c,u){var d,f,p,y,x,g,m,v;(0,r.default)(1,arguments);var b=(0,o.getDefaultOptions)(),w=(0,s.default)((d=(f=(p=(y=u==null?void 0:u.firstWeekContainsDate)!==null&&y!==void 0?y:u==null||(x=u.locale)===null||x===void 0||(g=x.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&p!==void 0?p:b.firstWeekContainsDate)!==null&&f!==void 0?f:(m=b.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:1),T=(0,i.default)(c,u),M=new Date(0);M.setUTCFullYear(T,0,w),M.setUTCHours(0,0,0,0);var k=(0,a.default)(M,u);return k}n.exports=t.default})(bl,bl.exports);var tC=bl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(Ye),r=e(vl),a=e(tC),s=e(oe),o=6048e5;function l(c,u){(0,s.default)(1,arguments);var d=(0,i.default)(c),f=(0,r.default)(d,u).getTime()-(0,a.default)(d,u).getTime();return Math.round(f/o)+1}n.exports=t.default})(ml,ml.exports);var eC=ml.exports,_l={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i,r){for(var a=i<0?"-":"",s=Math.abs(i).toString();s.length<r;)s="0"+s;return a+s}n.exports=t.default})(_l,_l.exports);var Uh=_l.exports,wl={exports:{}};(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(Uh),r={y:function(s,o){var l=s.getUTCFullYear(),c=l>0?l:1-l;return(0,i.default)(o==="yy"?c%100:c,o.length)},M:function(s,o){var l=s.getUTCMonth();return o==="M"?String(l+1):(0,i.default)(l+1,2)},d:function(s,o){return(0,i.default)(s.getUTCDate(),o.length)},a:function(s,o){var l=s.getUTCHours()/12>=1?"pm":"am";switch(o){case"a":case"aa":return l.toUpperCase();case"aaa":return l;case"aaaaa":return l[0];case"aaaa":default:return l==="am"?"a.m.":"p.m."}},h:function(s,o){return(0,i.default)(s.getUTCHours()%12||12,o.length)},H:function(s,o){return(0,i.default)(s.getUTCHours(),o.length)},m:function(s,o){return(0,i.default)(s.getUTCMinutes(),o.length)},s:function(s,o){return(0,i.default)(s.getUTCSeconds(),o.length)},S:function(s,o){var l=o.length,c=s.getUTCMilliseconds(),u=Math.floor(c*Math.pow(10,l-3));return(0,i.default)(u,o.length)}},a=r;t.default=a,n.exports=t.default})(wl,wl.exports);var nC=wl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(GS),r=e(QS),a=e(Ih),s=e(eC),o=e(Fh),l=e(Uh),c=e(nC),u={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},d={G:function(g,m,v){var b=g.getUTCFullYear()>0?1:0;switch(m){case"G":case"GG":case"GGG":return v.era(b,{width:"abbreviated"});case"GGGGG":return v.era(b,{width:"narrow"});case"GGGG":default:return v.era(b,{width:"wide"})}},y:function(g,m,v){if(m==="yo"){var b=g.getUTCFullYear(),w=b>0?b:1-b;return v.ordinalNumber(w,{unit:"year"})}return c.default.y(g,m)},Y:function(g,m,v,b){var w=(0,o.default)(g,b),T=w>0?w:1-w;if(m==="YY"){var M=T%100;return(0,l.default)(M,2)}return m==="Yo"?v.ordinalNumber(T,{unit:"year"}):(0,l.default)(T,m.length)},R:function(g,m){var v=(0,a.default)(g);return(0,l.default)(v,m.length)},u:function(g,m){var v=g.getUTCFullYear();return(0,l.default)(v,m.length)},Q:function(g,m,v){var b=Math.ceil((g.getUTCMonth()+1)/3);switch(m){case"Q":return String(b);case"QQ":return(0,l.default)(b,2);case"Qo":return v.ordinalNumber(b,{unit:"quarter"});case"QQQ":return v.quarter(b,{width:"abbreviated",context:"formatting"});case"QQQQQ":return v.quarter(b,{width:"narrow",context:"formatting"});case"QQQQ":default:return v.quarter(b,{width:"wide",context:"formatting"})}},q:function(g,m,v){var b=Math.ceil((g.getUTCMonth()+1)/3);switch(m){case"q":return String(b);case"qq":return(0,l.default)(b,2);case"qo":return v.ordinalNumber(b,{unit:"quarter"});case"qqq":return v.quarter(b,{width:"abbreviated",context:"standalone"});case"qqqqq":return v.quarter(b,{width:"narrow",context:"standalone"});case"qqqq":default:return v.quarter(b,{width:"wide",context:"standalone"})}},M:function(g,m,v){var b=g.getUTCMonth();switch(m){case"M":case"MM":return c.default.M(g,m);case"Mo":return v.ordinalNumber(b+1,{unit:"month"});case"MMM":return v.month(b,{width:"abbreviated",context:"formatting"});case"MMMMM":return v.month(b,{width:"narrow",context:"formatting"});case"MMMM":default:return v.month(b,{width:"wide",context:"formatting"})}},L:function(g,m,v){var b=g.getUTCMonth();switch(m){case"L":return String(b+1);case"LL":return(0,l.default)(b+1,2);case"Lo":return v.ordinalNumber(b+1,{unit:"month"});case"LLL":return v.month(b,{width:"abbreviated",context:"standalone"});case"LLLLL":return v.month(b,{width:"narrow",context:"standalone"});case"LLLL":default:return v.month(b,{width:"wide",context:"standalone"})}},w:function(g,m,v,b){var w=(0,s.default)(g,b);return m==="wo"?v.ordinalNumber(w,{unit:"week"}):(0,l.default)(w,m.length)},I:function(g,m,v){var b=(0,r.default)(g);return m==="Io"?v.ordinalNumber(b,{unit:"week"}):(0,l.default)(b,m.length)},d:function(g,m,v){return m==="do"?v.ordinalNumber(g.getUTCDate(),{unit:"date"}):c.default.d(g,m)},D:function(g,m,v){var b=(0,i.default)(g);return m==="Do"?v.ordinalNumber(b,{unit:"dayOfYear"}):(0,l.default)(b,m.length)},E:function(g,m,v){var b=g.getUTCDay();switch(m){case"E":case"EE":case"EEE":return v.day(b,{width:"abbreviated",context:"formatting"});case"EEEEE":return v.day(b,{width:"narrow",context:"formatting"});case"EEEEEE":return v.day(b,{width:"short",context:"formatting"});case"EEEE":default:return v.day(b,{width:"wide",context:"formatting"})}},e:function(g,m,v,b){var w=g.getUTCDay(),T=(w-b.weekStartsOn+8)%7||7;switch(m){case"e":return String(T);case"ee":return(0,l.default)(T,2);case"eo":return v.ordinalNumber(T,{unit:"day"});case"eee":return v.day(w,{width:"abbreviated",context:"formatting"});case"eeeee":return v.day(w,{width:"narrow",context:"formatting"});case"eeeeee":return v.day(w,{width:"short",context:"formatting"});case"eeee":default:return v.day(w,{width:"wide",context:"formatting"})}},c:function(g,m,v,b){var w=g.getUTCDay(),T=(w-b.weekStartsOn+8)%7||7;switch(m){case"c":return String(T);case"cc":return(0,l.default)(T,m.length);case"co":return v.ordinalNumber(T,{unit:"day"});case"ccc":return v.day(w,{width:"abbreviated",context:"standalone"});case"ccccc":return v.day(w,{width:"narrow",context:"standalone"});case"cccccc":return v.day(w,{width:"short",context:"standalone"});case"cccc":default:return v.day(w,{width:"wide",context:"standalone"})}},i:function(g,m,v){var b=g.getUTCDay(),w=b===0?7:b;switch(m){case"i":return String(w);case"ii":return(0,l.default)(w,m.length);case"io":return v.ordinalNumber(w,{unit:"day"});case"iii":return v.day(b,{width:"abbreviated",context:"formatting"});case"iiiii":return v.day(b,{width:"narrow",context:"formatting"});case"iiiiii":return v.day(b,{width:"short",context:"formatting"});case"iiii":default:return v.day(b,{width:"wide",context:"formatting"})}},a:function(g,m,v){var b=g.getUTCHours(),w=b/12>=1?"pm":"am";switch(m){case"a":case"aa":return v.dayPeriod(w,{width:"abbreviated",context:"formatting"});case"aaa":return v.dayPeriod(w,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return v.dayPeriod(w,{width:"narrow",context:"formatting"});case"aaaa":default:return v.dayPeriod(w,{width:"wide",context:"formatting"})}},b:function(g,m,v){var b=g.getUTCHours(),w;switch(b===12?w=u.noon:b===0?w=u.midnight:w=b/12>=1?"pm":"am",m){case"b":case"bb":return v.dayPeriod(w,{width:"abbreviated",context:"formatting"});case"bbb":return v.dayPeriod(w,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return v.dayPeriod(w,{width:"narrow",context:"formatting"});case"bbbb":default:return v.dayPeriod(w,{width:"wide",context:"formatting"})}},B:function(g,m,v){var b=g.getUTCHours(),w;switch(b>=17?w=u.evening:b>=12?w=u.afternoon:b>=4?w=u.morning:w=u.night,m){case"B":case"BB":case"BBB":return v.dayPeriod(w,{width:"abbreviated",context:"formatting"});case"BBBBB":return v.dayPeriod(w,{width:"narrow",context:"formatting"});case"BBBB":default:return v.dayPeriod(w,{width:"wide",context:"formatting"})}},h:function(g,m,v){if(m==="ho"){var b=g.getUTCHours()%12;return b===0&&(b=12),v.ordinalNumber(b,{unit:"hour"})}return c.default.h(g,m)},H:function(g,m,v){return m==="Ho"?v.ordinalNumber(g.getUTCHours(),{unit:"hour"}):c.default.H(g,m)},K:function(g,m,v){var b=g.getUTCHours()%12;return m==="Ko"?v.ordinalNumber(b,{unit:"hour"}):(0,l.default)(b,m.length)},k:function(g,m,v){var b=g.getUTCHours();return b===0&&(b=24),m==="ko"?v.ordinalNumber(b,{unit:"hour"}):(0,l.default)(b,m.length)},m:function(g,m,v){return m==="mo"?v.ordinalNumber(g.getUTCMinutes(),{unit:"minute"}):c.default.m(g,m)},s:function(g,m,v){return m==="so"?v.ordinalNumber(g.getUTCSeconds(),{unit:"second"}):c.default.s(g,m)},S:function(g,m){return c.default.S(g,m)},X:function(g,m,v,b){var w=b._originalDate||g,T=w.getTimezoneOffset();if(T===0)return"Z";switch(m){case"X":return p(T);case"XXXX":case"XX":return y(T);case"XXXXX":case"XXX":default:return y(T,":")}},x:function(g,m,v,b){var w=b._originalDate||g,T=w.getTimezoneOffset();switch(m){case"x":return p(T);case"xxxx":case"xx":return y(T);case"xxxxx":case"xxx":default:return y(T,":")}},O:function(g,m,v,b){var w=b._originalDate||g,T=w.getTimezoneOffset();switch(m){case"O":case"OO":case"OOO":return"GMT"+f(T,":");case"OOOO":default:return"GMT"+y(T,":")}},z:function(g,m,v,b){var w=b._originalDate||g,T=w.getTimezoneOffset();switch(m){case"z":case"zz":case"zzz":return"GMT"+f(T,":");case"zzzz":default:return"GMT"+y(T,":")}},t:function(g,m,v,b){var w=b._originalDate||g,T=Math.floor(w.getTime()/1e3);return(0,l.default)(T,m.length)},T:function(g,m,v,b){var w=b._originalDate||g,T=w.getTime();return(0,l.default)(T,m.length)}};function f(g,m){var v=g>0?"-":"+",b=Math.abs(g),w=Math.floor(b/60),T=b%60;if(T===0)return v+String(w);var M=m||"";return v+String(w)+M+(0,l.default)(T,2)}function p(g,m){if(g%60===0){var v=g>0?"-":"+";return v+(0,l.default)(Math.abs(g)/60,2)}return y(g,m)}function y(g,m){var v=m||"",b=g>0?"-":"+",w=Math.abs(g),T=(0,l.default)(Math.floor(w/60),2),M=(0,l.default)(w%60,2);return b+T+v+M}var x=d;t.default=x,n.exports=t.default})(cl,cl.exports);var iC=cl.exports,Tl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=function(o,l){switch(o){case"P":return l.date({width:"short"});case"PP":return l.date({width:"medium"});case"PPP":return l.date({width:"long"});case"PPPP":default:return l.date({width:"full"})}},i=function(o,l){switch(o){case"p":return l.time({width:"short"});case"pp":return l.time({width:"medium"});case"ppp":return l.time({width:"long"});case"pppp":default:return l.time({width:"full"})}},r=function(o,l){var c=o.match(/(P+)(p+)?/)||[],u=c[1],d=c[2];if(!d)return e(o,l);var f;switch(u){case"P":f=l.dateTime({width:"short"});break;case"PP":f=l.dateTime({width:"medium"});break;case"PPP":f=l.dateTime({width:"long"});break;case"PPPP":default:f=l.dateTime({width:"full"});break}return f.replace("{{date}}",e(u,l)).replace("{{time}}",i(d,l))},a={p:i,P:r},s=a;t.default=s,n.exports=t.default})(Tl,Tl.exports);var rC=Tl.exports,Sl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i){var r=new Date(Date.UTC(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()));return r.setUTCFullYear(i.getFullYear()),i.getTime()-r.getTime()}n.exports=t.default})(Sl,Sl.exports);var Bh=Sl.exports;const Wh=el(Bh);var ur={};Object.defineProperty(ur,"__esModule",{value:!0}),ur.isProtectedDayOfYearToken=oC,ur.isProtectedWeekYearToken=lC,ur.throwProtectedError=cC;var aC=["D","DD"],sC=["YY","YYYY"];function oC(n){return aC.indexOf(n)!==-1}function lC(n){return sC.indexOf(n)!==-1}function cC(n,t,e){if(n==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Cl={exports:{}},Ml={exports:{}},Dl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},i=function(a,s,o){var l,c=e[a];return typeof c=="string"?l=c:s===1?l=c.one:l=c.other.replace("{{count}}",s.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+l:l+" ago":l},r=i;t.default=r,n.exports=t.default})(Dl,Dl.exports);var uC=Dl.exports,kl={exports:{}},Ol={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=r.width?String(r.width):i.defaultWidth,s=i.formats[a]||i.formats[i.defaultWidth];return s}}n.exports=t.default})(Ol,Ol.exports);var dC=Ol.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(dC),r={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},a={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},s={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},o={date:(0,i.default)({formats:r,defaultWidth:"full"}),time:(0,i.default)({formats:a,defaultWidth:"full"}),dateTime:(0,i.default)({formats:s,defaultWidth:"full"})},l=o;t.default=l,n.exports=t.default})(kl,kl.exports);var fC=kl.exports,Pl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},i=function(a,s,o,l){return e[a]},r=i;t.default=r,n.exports=t.default})(Pl,Pl.exports);var hC=Pl.exports,El={exports:{}},Rl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i){return function(r,a){var s=a!=null&&a.context?String(a.context):"standalone",o;if(s==="formatting"&&i.formattingValues){var l=i.defaultFormattingWidth||i.defaultWidth,c=a!=null&&a.width?String(a.width):l;o=i.formattingValues[c]||i.formattingValues[l]}else{var u=i.defaultWidth,d=a!=null&&a.width?String(a.width):i.defaultWidth;o=i.values[d]||i.values[u]}var f=i.argumentCallback?i.argumentCallback(r):r;return o[f]}}n.exports=t.default})(Rl,Rl.exports);var pC=Rl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(pC),r={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},a={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},s={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},o={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},l={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},c={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},u=function(p,y){var x=Number(p),g=x%100;if(g>20||g<10)switch(g%10){case 1:return x+"st";case 2:return x+"nd";case 3:return x+"rd"}return x+"th"},d={ordinalNumber:u,era:(0,i.default)({values:r,defaultWidth:"wide"}),quarter:(0,i.default)({values:a,defaultWidth:"wide",argumentCallback:function(p){return p-1}}),month:(0,i.default)({values:s,defaultWidth:"wide"}),day:(0,i.default)({values:o,defaultWidth:"wide"}),dayPeriod:(0,i.default)({values:l,defaultWidth:"wide",formattingValues:c,defaultFormattingWidth:"wide"})},f=d;t.default=f,n.exports=t.default})(El,El.exports);var gC=El.exports,Al={exports:{}},Ll={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(a){return function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=o.width,c=l&&a.matchPatterns[l]||a.matchPatterns[a.defaultMatchWidth],u=s.match(c);if(!u)return null;var d=u[0],f=l&&a.parsePatterns[l]||a.parsePatterns[a.defaultParseWidth],p=Array.isArray(f)?r(f,function(g){return g.test(d)}):i(f,function(g){return g.test(d)}),y;y=a.valueCallback?a.valueCallback(p):p,y=o.valueCallback?o.valueCallback(y):y;var x=s.slice(d.length);return{value:y,rest:x}}}function i(a,s){for(var o in a)if(a.hasOwnProperty(o)&&s(a[o]))return o}function r(a,s){for(var o=0;o<a.length;o++)if(s(a[o]))return o}n.exports=t.default})(Ll,Ll.exports);var mC=Ll.exports,Il={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i){return function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=r.match(i.matchPattern);if(!s)return null;var o=s[0],l=r.match(i.parsePattern);if(!l)return null;var c=i.valueCallback?i.valueCallback(l[0]):l[0];c=a.valueCallback?a.valueCallback(c):c;var u=r.slice(o.length);return{value:c,rest:u}}}n.exports=t.default})(Il,Il.exports);var yC=Il.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(mC),r=e(yC),a=/^(\d+)(th|st|nd|rd)?/i,s=/\d+/i,o={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},l={any:[/^b/i,/^(a|c)/i]},c={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},u={any:[/1/i,/2/i,/3/i,/4/i]},d={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},f={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},p={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},y={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},x={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},g={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},m={ordinalNumber:(0,r.default)({matchPattern:a,parsePattern:s,valueCallback:function(b){return parseInt(b,10)}}),era:(0,i.default)({matchPatterns:o,defaultMatchWidth:"wide",parsePatterns:l,defaultParseWidth:"any"}),quarter:(0,i.default)({matchPatterns:c,defaultMatchWidth:"wide",parsePatterns:u,defaultParseWidth:"any",valueCallback:function(b){return b+1}}),month:(0,i.default)({matchPatterns:d,defaultMatchWidth:"wide",parsePatterns:f,defaultParseWidth:"any"}),day:(0,i.default)({matchPatterns:p,defaultMatchWidth:"wide",parsePatterns:y,defaultParseWidth:"any"}),dayPeriod:(0,i.default)({matchPatterns:x,defaultMatchWidth:"any",parsePatterns:g,defaultParseWidth:"any"})},v=m;t.default=v,n.exports=t.default})(Al,Al.exports);var vC=Al.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(uC),r=e(fC),a=e(hC),s=e(gC),o=e(vC),l={code:"en-US",formatDistance:i.default,formatLong:r.default,formatRelative:a.default,localize:s.default,match:o.default,options:{weekStartsOn:0,firstWeekContainsDate:1}},c=l;t.default=c,n.exports=t.default})(Ml,Ml.exports);var bC=Ml.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(bC),r=i.default;t.default=r,n.exports=t.default})(Cl,Cl.exports);var xC=Cl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=b;var i=e(jS),r=e(XS),a=e(Ye),s=e(iC),o=e(rC),l=e(Bh),c=ur,u=e(jn),d=e(oe),f=Vn,p=e(xC),y=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,x=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,g=/^'([^]*?)'?$/,m=/''/g,v=/[a-zA-Z]/;function b(T,M,k){var S,C,O,P,E,F,q,$,Y,I,rt,B,yt,ut,z,L,U,j;(0,d.default)(2,arguments);var Z=String(M),K=(0,f.getDefaultOptions)(),N=(S=(C=k==null?void 0:k.locale)!==null&&C!==void 0?C:K.locale)!==null&&S!==void 0?S:p.default,A=(0,u.default)((O=(P=(E=(F=k==null?void 0:k.firstWeekContainsDate)!==null&&F!==void 0?F:k==null||(q=k.locale)===null||q===void 0||($=q.options)===null||$===void 0?void 0:$.firstWeekContainsDate)!==null&&E!==void 0?E:K.firstWeekContainsDate)!==null&&P!==void 0?P:(Y=K.locale)===null||Y===void 0||(I=Y.options)===null||I===void 0?void 0:I.firstWeekContainsDate)!==null&&O!==void 0?O:1);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Q=(0,u.default)((rt=(B=(yt=(ut=k==null?void 0:k.weekStartsOn)!==null&&ut!==void 0?ut:k==null||(z=k.locale)===null||z===void 0||(L=z.options)===null||L===void 0?void 0:L.weekStartsOn)!==null&&yt!==void 0?yt:K.weekStartsOn)!==null&&B!==void 0?B:(U=K.locale)===null||U===void 0||(j=U.options)===null||j===void 0?void 0:j.weekStartsOn)!==null&&rt!==void 0?rt:0);if(!(Q>=0&&Q<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!N.localize)throw new RangeError("locale must contain localize property");if(!N.formatLong)throw new RangeError("locale must contain formatLong property");var X=(0,a.default)(T);if(!(0,i.default)(X))throw new RangeError("Invalid time value");var vt=(0,l.default)(X),ct=(0,r.default)(X,vt),Ot={firstWeekContainsDate:A,weekStartsOn:Q,locale:N,_originalDate:X},_t=Z.match(x).map(function(et){var bt=et[0];if(bt==="p"||bt==="P"){var Nt=o.default[bt];return Nt(et,N.formatLong)}return et}).join("").match(y).map(function(et){if(et==="''")return"'";var bt=et[0];if(bt==="'")return w(et);var Nt=s.default[bt];if(Nt)return!(k!=null&&k.useAdditionalWeekYearTokens)&&(0,c.isProtectedWeekYearToken)(et)&&(0,c.throwProtectedError)(et,M,String(T)),!(k!=null&&k.useAdditionalDayOfYearTokens)&&(0,c.isProtectedDayOfYearToken)(et)&&(0,c.throwProtectedError)(et,M,String(T)),Nt(ct,et,N.localize,Ot);if(bt.match(v))throw new RangeError("Format string contains an unescaped latin alphabet character `"+bt+"`");return et}).join("");return _t}function w(T){var M=T.match(g);return M?M[1].replace(m,"'"):T}n.exports=t.default})(Eh,Eh.exports);function _C(n,t){var e=CC(t);return e.formatToParts?TC(e,n):SC(e,n)}var wC={year:0,month:1,day:2,hour:3,minute:4,second:5};function TC(n,t){try{for(var e=n.formatToParts(t),i=[],r=0;r<e.length;r++){var a=wC[e[r].type];a>=0&&(i[a]=parseInt(e[r].value,10))}return i}catch(s){if(s instanceof RangeError)return[NaN];throw s}}function SC(n,t){var e=n.format(t),i=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e);return[i[3],i[1],i[2],i[4],i[5],i[6]]}var Nl={};function CC(n){if(!Nl[n]){var t=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),e=t==="06/25/2014, 00:00:00"||t==="06/25/2014 00:00:00";Nl[n]=e?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return Nl[n]}function Fl(n,t,e,i,r,a,s){var o=new Date(0);return o.setUTCFullYear(n,t,e),o.setUTCHours(i,r,a,s),o}var zh=36e5,MC=6e4,Ul={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function ba(n,t,e){var i,r;if(!n||(i=Ul.timezoneZ.exec(n),i))return 0;var a;if(i=Ul.timezoneHH.exec(n),i)return a=parseInt(i[1],10),Yh(a)?-(a*zh):NaN;if(i=Ul.timezoneHHMM.exec(n),i){a=parseInt(i[2],10);var s=parseInt(i[3],10);return Yh(a,s)?(r=Math.abs(a)*zh+s*MC,i[1]==="+"?-r:r):NaN}if(OC(n)){t=new Date(t||Date.now());var o=e?t:DC(t),l=Bl(o,n),c=e?l:kC(t,l,n);return-c}return NaN}function DC(n){return Fl(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function Bl(n,t){var e=_C(n,t),i=Fl(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime(),r=n.getTime(),a=r%1e3;return r-=a>=0?a:1e3+a,i-r}function kC(n,t,e){var i=n.getTime(),r=i-t,a=Bl(new Date(r),e);if(t===a)return t;r-=a-t;var s=Bl(new Date(r),e);return a===s?a:Math.max(a,s)}function Yh(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}var Hh={};function OC(n){if(Hh[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),Hh[n]=!0,!0}catch{return!1}}var PC=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/;const $h=PC;var Wl=36e5,jh=6e4,EC=2,le={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:$h};function zl(n,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(n===null)return new Date(NaN);var e=t||{},i=e.additionalDigits==null?EC:VS(e.additionalDigits);if(i!==2&&i!==1&&i!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]")return new Date(n.getTime());if(typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]")return new Date(n);if(!(typeof n=="string"||Object.prototype.toString.call(n)==="[object String]"))return new Date(NaN);var r=RC(n),a=AC(r.date,i),s=a.year,o=a.restDateString,l=LC(o,s);if(isNaN(l))return new Date(NaN);if(l){var c=l.getTime(),u=0,d;if(r.time&&(u=IC(r.time),isNaN(u)))return new Date(NaN);if(r.timeZone||e.timeZone){if(d=ba(r.timeZone||e.timeZone,new Date(c+u)),isNaN(d))return new Date(NaN)}else d=Wh(new Date(c+u)),d=Wh(new Date(c+u+d));return new Date(c+u+d)}else return new Date(NaN)}function RC(n){var t={},e=le.dateTimePattern.exec(n),i;if(e?(t.date=e[1],i=e[3]):(e=le.datePattern.exec(n),e?(t.date=e[1],i=e[2]):(t.date=null,i=n)),i){var r=le.timeZone.exec(i);r?(t.time=i.replace(r[1],""),t.timeZone=r[1].trim()):t.time=i}return t}function AC(n,t){var e=le.YYY[t],i=le.YYYYY[t],r;if(r=le.YYYY.exec(n)||i.exec(n),r){var a=r[1];return{year:parseInt(a,10),restDateString:n.slice(a.length)}}if(r=le.YY.exec(n)||e.exec(n),r){var s=r[1];return{year:parseInt(s,10)*100,restDateString:n.slice(s.length)}}return{year:null}}function LC(n,t){if(t===null)return null;var e,i,r,a;if(n.length===0)return i=new Date(0),i.setUTCFullYear(t),i;if(e=le.MM.exec(n),e)return i=new Date(0),r=parseInt(e[1],10)-1,Xh(t,r)?(i.setUTCFullYear(t,r),i):new Date(NaN);if(e=le.DDD.exec(n),e){i=new Date(0);var s=parseInt(e[1],10);return UC(t,s)?(i.setUTCFullYear(t,0,s),i):new Date(NaN)}if(e=le.MMDD.exec(n),e){i=new Date(0),r=parseInt(e[1],10)-1;var o=parseInt(e[2],10);return Xh(t,r,o)?(i.setUTCFullYear(t,r,o),i):new Date(NaN)}if(e=le.Www.exec(n),e)return a=parseInt(e[1],10)-1,Gh(t,a)?Vh(t,a):new Date(NaN);if(e=le.WwwD.exec(n),e){a=parseInt(e[1],10)-1;var l=parseInt(e[2],10)-1;return Gh(t,a,l)?Vh(t,a,l):new Date(NaN)}return null}function IC(n){var t,e,i;if(t=le.HH.exec(n),t)return e=parseFloat(t[1].replace(",",".")),Yl(e)?e%24*Wl:NaN;if(t=le.HHMM.exec(n),t)return e=parseInt(t[1],10),i=parseFloat(t[2].replace(",",".")),Yl(e,i)?e%24*Wl+i*jh:NaN;if(t=le.HHMMSS.exec(n),t){e=parseInt(t[1],10),i=parseInt(t[2],10);var r=parseFloat(t[3].replace(",","."));return Yl(e,i,r)?e%24*Wl+i*jh+r*1e3:NaN}return null}function Vh(n,t,e){t=t||0,e=e||0;var i=new Date(0);i.setUTCFullYear(n,0,4);var r=i.getUTCDay()||7,a=t*7+e+1-r;return i.setUTCDate(i.getUTCDate()+a),i}var NC=[31,28,31,30,31,30,31,31,30,31,30,31],FC=[31,29,31,30,31,30,31,31,30,31,30,31];function qh(n){return n%400===0||n%4===0&&n%100!==0}function Xh(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;var i=qh(n);if(i&&e>FC[t]||!i&&e>NC[t])return!1}return!0}function UC(n,t){if(t<1)return!1;var e=qh(n);return!(e&&t>366||!e&&t>365)}function Gh(n,t,e){return!(t<0||t>52||e!=null&&(e<0||e>6))}function Yl(n,t,e){return!(n!=null&&(n<0||n>=25)||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}var Hl={exports:{}},$l={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i,r){if(i==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(i[a]=r[a]);return i}n.exports=t.default})($l,$l.exports);var BC=$l.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=e(BC);function r(a){return(0,i.default)({},a)}n.exports=t.default})(Hl,Hl.exports);var WC=Hl.exports;const zC=el(WC);function YC(n,t,e){var i=zl(n,e),r=ba(t,i,!0),a=new Date(i.getTime()-r),s=new Date(0);return s.setFullYear(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()),s.setHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()),s}function HC(n,t){return-ba(n,t)}function $C(n,t,e){if(typeof n=="string"&&!n.match($h)){var i=zC(e);return i.timeZone=t,zl(n,i)}var r=zl(n,e),a=Fl(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()).getTime(),s=ba(t,new Date(a));return new Date(a+s)}const jC={secondly:1e3,minutely:60*1e3,hourly:60*60*1e3,daily:60*60*24*1e3,weekly:60*60*24*7*1e3,trend:0};function jl(n){return n&&IS.find(t=>n<=jC[t])||null}const yi=(n,t)=>new Date(n.getTime()-HC(t,n));class Pe{constructor(t){We(this,"timeframeText"),We(this,"key"),We(this,"display"),We(this,"timeframeLength"),We(this,"allowedTiers"),We(this,"defaultResponseGranularity"),We(this,"dataGranularity"),We(this,"isRelative"),We(this,"_startCustom"),We(this,"_endCustom"),this.display=t.display,this.timeframeText=t.timeframeText,this.key=t.key,this.timeframeLength=t.timeframeLength,this.allowedTiers=t.allowedTiers,this.defaultResponseGranularity=t.defaultResponseGranularity,this.dataGranularity=t.dataGranularity,this.isRelative=t.isRelative,this._startCustom=t.startCustom,this._endCustom=t.endCustom}rawEnd(t){return this._endCustom||new Date}rawStart(t){return this._startCustom||new Date(this.rawEnd().getTime()-this.timeframeLengthMs())}timeframeLengthMs(){return this.timeframeLength()*1e3}maximumTimeframeLength(){return this.timeframeLength()}allowedGranularities(){const t=new Set,e=this.maximumTimeframeLength()/3600;return e<=6&&t.add("minutely"),e>=2&&e<=7*24&&t.add("hourly"),e>=2*24&&t.add("daily"),e>=2*24*14&&t.add("weekly"),t}cacheKey(){return this.key!=="custom"?this.key:`${this.rawStart().toISOString()}-${this.rawEnd().toISOString()}`}v4Query(t){return this.key==="custom"?{type:"absolute",start:this.rawStart(),end:this.rawEnd(),tz:t}:{type:"relative",time_range:this.key,tz:t}}tzAdjustedDate(t){if(!t)return new Date;const e=$C(new Date,new Intl.DateTimeFormat().resolvedOptions().timeZone);return YC(e,t)}}class VC extends Pe{rawStart(t){let e=va(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(e=yi(e,t)),e}maximumTimeframeLength(){return 60*60*24*7}}class qC extends Pe{rawStart(t){let e=mi(this.tzAdjustedDate(t));return t&&(e=yi(e,t)),e}maximumTimeframeLength(){return 60*60*24*31}}class XC extends Pe{rawEnd(t){let e=va(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(e=yi(e,t)),e}rawStart(t){const e=this.tzAdjustedDate(t);let i=va(e.setDate(e.getDate()-7),{weekStartsOn:1});return t&&(i=yi(i,t)),i}}class GC extends Pe{rawEnd(t){let e=mi(this.tzAdjustedDate(t));return t&&(e=yi(e,t)),e}rawStart(t){let e=mi(Ph(this.tzAdjustedDate(t),1));return t&&(e=yi(e,t)),e}}Yt.FIFTEEN_MIN,new Pe({key:Yt.FIFTEEN_MIN,display:"Last 15 minutes",timeframeText:"15 minutes",timeframeLength:()=>60*15,defaultResponseGranularity:"minutely",dataGranularity:"minutely",isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Yt.ONE_HOUR,new Pe({key:Yt.ONE_HOUR,display:"Last hour",timeframeText:"One hour",timeframeLength:()=>60*60*1,defaultResponseGranularity:"minutely",dataGranularity:"minutely",isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Yt.SIX_HOUR,new Pe({key:Yt.SIX_HOUR,display:"Last 6 hours",timeframeText:"6 hours",timeframeLength:()=>60*60*6,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Yt.TWELVE_HOUR,new Pe({key:Yt.TWELVE_HOUR,display:"Last 12 hours",timeframeText:"12 hours",timeframeLength:()=>60*60*12,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Yt.ONE_DAY,new Pe({key:Yt.ONE_DAY,display:"Last 24 hours",timeframeText:"24 hours",timeframeLength:()=>60*60*24,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Yt.SEVEN_DAY,new Pe({key:Yt.SEVEN_DAY,display:"Last 7 days",timeframeText:"7 days",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,allowedTiers:["trial","plus","enterprise"]}),Yt.THIRTY_DAY,new Pe({key:Yt.THIRTY_DAY,display:"Last 30 days",timeframeText:"30 days",timeframeLength:()=>60*60*24*30,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,allowedTiers:["trial","plus","enterprise"]}),Yt.CURRENT_WEEK,new VC({key:Yt.CURRENT_WEEK,display:"This week",timeframeText:"Week",timeframeLength:()=>{const n=va(new Date,{weekStartsOn:1});return(Oh(kh(new Date,1)).getTime()-n.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]}),Yt.CURRENT_MONTH,new qC({key:Yt.CURRENT_MONTH,display:"This month",timeframeText:"Month",timeframeLength:()=>{const n=mi(new Date);return(Oh(kh(new Date,1)).getTime()-n.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]}),Yt.PREVIOUS_WEEK,new XC({key:Yt.PREVIOUS_WEEK,display:"Previous week",timeframeText:"Week",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]}),Yt.PREVIOUS_MONTH,new GC({key:Yt.PREVIOUS_MONTH,display:"Previous month",timeframeText:"Month",timeframeLength:()=>{let n=0;const t=mi(new Date),e=mi(Ph(new Date,1));return t.getTimezoneOffset()!==e.getTimezoneOffset()&&(n=KC(t,e)),60*60*24*zS(new Date().setMonth(new Date().getMonth()-1))+YS(n)},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]});function KC(n,t){return HS(n.getTimezoneOffset()-t.getTimezoneOffset())}const Kh=(n,t,e,i)=>{n.save(),n.beginPath(),n.moveTo(t,e),n.lineTo(t,i),n.lineWidth=1,n.strokeStyle="#0275d8",n.stroke(),n.restore()},Vl={id:"linePlugin",afterDatasetsDraw:function(n){if(n.tooltip&&n.tooltip.getActiveElements()&&n.tooltip.getActiveElements().length&&!this.clickedSegment){const{x:t}=n.tooltip.dataPoints[0].element,e=n.ctx;Kh(e,t,n.scales.y.top,n.scales.y.bottom)}if(this.clickedSegment){const{x:t}=this.clickedSegment.element,e=n.ctx;Kh(e,t,n.scales.y.top,n.scales.y.bottom)}},beforeDestroy(){delete this.clickedSegment}},QC=h.defineComponent({__name:"TimeSeriesChart",props:{chartData:{type:Object,required:!1,default:null},type:{type:String,required:!1,default:ee.TIMESERIES_LINE},fill:{type:Boolean,required:!1,default:!1},tooltipTitle:{type:String,required:!0},metricUnit:{type:String,required:!1,default:""},timeRangeMs:{type:Number,required:!1,default:void 0},granularity:{type:String,required:!0},stacked:{type:Boolean,required:!1,default:!0},legendValues:{type:Object,required:!1,default:null},metricAxesTitle:{type:String,required:!1,default:null},dimensionAxesTitle:{type:String,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},chartLegendSortFn:{type:Function,required:!1,default:(n,t)=>n.value&&t.value&&t.value.raw-n.value.raw},chartTooltipSortFn:{type:Function,required:!1,default:(n,t)=>t.rawValue-n.rawValue}},setup(n){const t=n,{translateUnit:e}=Mt.useTranslatedUnits(),i=h.ref(),r=h.ref(Tn()),a=h.ref(Tn()),s=h.ref([]),o=h.ref(),l=h.ref(h.inject("legendPosition",Wt.Right)),c=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:h.toRef(t,"metricUnit"),translateUnit:e,offsetX:0,offsetY:0,width:0,height:0,chartType:t.type,locked:!1,chartTooltipSortFn:t.chartTooltipSortFn}),u={id:r.value,afterUpdate(m){s.value=m.options.plugins.legend.labels.generateLabels(m).map(v=>({...v,value:t.legendValues&&t.legendValues[v.text]})).sort(t.chartLegendSortFn)}},d=h.computed(()=>[u,_h,...t.type===ee.TIMESERIES_LINE?[Vl]:[]]),{options:f}=Mt.useLinechartOptions({tooltipState:c,timeRangeMs:h.toRef(t,"timeRangeMs"),granularity:h.toRef(t,"granularity"),legendID:r.value,stacked:h.toRef(t,"stacked"),metricAxesTitle:h.toRef(t,"metricAxesTitle"),dimensionAxesTitle:h.toRef(t,"dimensionAxesTitle")});Mt.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const p=m=>ra(m,{short:["daily","weekly"].includes(t.granularity)}),y=m=>({[Wt.Right]:"legend-row",[Wt.Bottom]:"column",[Wt.Hidden]:"hidden"})[m],x=({width:m,height:v})=>{c.width=m,c.height=v},g=()=>{var m,v,b;c.locked=!c.locked,i.value&&((v=(m=i.value.chart.tooltip)==null?void 0:m.dataPoints)!=null&&v.length)&&(Vl.clickedSegment=c.locked?(b=i.value.chart.tooltip)==null?void 0:b.dataPoints[0]:void 0)};return h.watch(()=>t.type,()=>{c.locked=!1,c.showTooltip=!1,delete Vl.clickedSegment}),(m,v)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",y(l.value)]),"data-testid":"line-chart-parent"},[h.createElementVNode("div",{class:"chart-container",onClick:v[0]||(v[0]=b=>g())},[n.type===h.unref(ee).TIMESERIES_LINE?(h.openBlock(),h.createBlock(h.unref(OS),{key:0,ref_key:"chartInstance",ref:i,"chart-id":a.value,data:n.chartData,"data-testid":"time-series-line-chart",options:h.unref(f),plugins:d.value},null,8,["chart-id","data","options","plugins"])):n.type===h.unref(ee).TIMESERIES_BAR?(h.openBlock(),h.createBlock(h.unref(kS),{key:1,ref_key:"chartInstance",ref:i,"chart-id":a.value,data:n.chartData,"data-testid":"time-series-bar-chart",options:h.unref(f),plugins:d.value},null,8,["chart-id","data","options","plugins"])):h.createCommentVNode("",!0)]),h.createVNode(Qo,{ref_key:"tooltipElement",ref:o,context:p(c.tooltipContext),"data-testid":"tooltip",left:c.left,locked:c.locked,series:c.tooltipSeries,"show-tooltip":c.showTooltip,"tooltip-title":n.tooltipTitle,top:c.top,unit:n.metricUnit,onDimensions:x,onLeft:v[1]||(v[1]=b=>c.left=b),onTop:v[2]||(v[2]=b=>c.top=b)},null,8,["context","left","locked","series","show-tooltip","tooltip-title","top","unit"]),h.createVNode(Zo,{id:r.value,"chart-instance":i.value,"data-testid":"legend",items:s.value},null,8,["id","chart-instance","items"])],2))}}),ZC=Ze(QC,[["__scopeId","data-v-206a4c39"]]);var qn=(n=>(n.String="string",n.Number="number",n.Boolean="boolean",n.Object="object",n.Undefined="undefined",n))(qn||{}),xa={exports:{}};xa.exports,function(n,t){var e=200,i="Expected a function",r="__lodash_hash_undefined__",a=1,s=2,o=1/0,l=9007199254740991,c="[object Arguments]",u="[object Array]",d="[object Boolean]",f="[object Date]",p="[object Error]",y="[object Function]",x="[object GeneratorFunction]",g="[object Map]",m="[object Number]",v="[object Object]",b="[object Promise]",w="[object RegExp]",T="[object Set]",M="[object String]",k="[object Symbol]",S="[object WeakMap]",C="[object ArrayBuffer]",O="[object DataView]",P="[object Float32Array]",E="[object Float64Array]",F="[object Int8Array]",q="[object Int16Array]",$="[object Int32Array]",Y="[object Uint8Array]",I="[object Uint8ClampedArray]",rt="[object Uint16Array]",B="[object Uint32Array]",yt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ut=/^\w*$/,z=/^\./,L=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,U=/[\\^$.*+?()[\]{}|]/g,j=/\\(\\)?/g,Z=/^\[object .+?Constructor\]$/,K=/^(?:0|[1-9]\d*)$/,N={};N[P]=N[E]=N[F]=N[q]=N[$]=N[Y]=N[I]=N[rt]=N[B]=!0,N[c]=N[u]=N[C]=N[d]=N[O]=N[f]=N[p]=N[y]=N[g]=N[m]=N[v]=N[w]=N[T]=N[M]=N[S]=!1;var A=typeof ge=="object"&&ge&&ge.Object===Object&&ge,Q=typeof self=="object"&&self&&self.Object===Object&&self,X=A||Q||Function("return this")(),vt=t&&!t.nodeType&&t,ct=vt&&!0&&n&&!n.nodeType&&n,Ot=ct&&ct.exports===vt,_t=Ot&&A.process,et=function(){try{return _t&&_t.binding("util")}catch{}}(),bt=et&&et.isTypedArray;function Nt(_,D){for(var R=-1,W=_?_.length:0;++R<W;)if(D(_[R],R,_))return!0;return!1}function Ce(_){return function(D){return D==null?void 0:D[_]}}function Ee(_,D){for(var R=-1,W=Array(_);++R<_;)W[R]=D(R);return W}function me(_){return function(D){return _(D)}}function Lt(_,D){return _==null?void 0:_[D]}function Ft(_){var D=!1;if(_!=null&&typeof _.toString!="function")try{D=!!(_+"")}catch{}return D}function Je(_){var D=-1,R=Array(_.size);return _.forEach(function(W,ot){R[++D]=[ot,W]}),R}function Dt(_,D){return function(R){return _(D(R))}}function Cn(_){var D=-1,R=Array(_.size);return _.forEach(function(W){R[++D]=W}),R}var Re=Array.prototype,tn=Function.prototype,_e=Object.prototype,Me=X["__core-js_shared__"],Ae=function(){var _=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||"");return _?"Symbol(src)_1."+_:""}(),ce=tn.toString,ye=_e.hasOwnProperty,Kt=_e.toString,_a=RegExp("^"+ce.call(ye).replace(U,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vi=X.Symbol,lp=X.Uint8Array,hD=_e.propertyIsEnumerable,pD=Re.splice,gD=Dt(Object.keys,Object),Gl=bi(X,"DataView"),dr=bi(X,"Map"),Kl=bi(X,"Promise"),Ql=bi(X,"Set"),Zl=bi(X,"WeakMap"),fr=bi(Object,"create"),mD=Gn(Gl),yD=Gn(dr),vD=Gn(Kl),bD=Gn(Ql),xD=Gn(Zl),wa=vi?vi.prototype:void 0,Jl=wa?wa.valueOf:void 0,cp=wa?wa.toString:void 0;function Xn(_){var D=-1,R=_?_.length:0;for(this.clear();++D<R;){var W=_[D];this.set(W[0],W[1])}}function _D(){this.__data__=fr?fr(null):{}}function wD(_){return this.has(_)&&delete this.__data__[_]}function TD(_){var D=this.__data__;if(fr){var R=D[_];return R===r?void 0:R}return ye.call(D,_)?D[_]:void 0}function SD(_){var D=this.__data__;return fr?D[_]!==void 0:ye.call(D,_)}function CD(_,D){var R=this.__data__;return R[_]=fr&&D===void 0?r:D,this}Xn.prototype.clear=_D,Xn.prototype.delete=wD,Xn.prototype.get=TD,Xn.prototype.has=SD,Xn.prototype.set=CD;function en(_){var D=-1,R=_?_.length:0;for(this.clear();++D<R;){var W=_[D];this.set(W[0],W[1])}}function MD(){this.__data__=[]}function DD(_){var D=this.__data__,R=Sa(D,_);if(R<0)return!1;var W=D.length-1;return R==W?D.pop():pD.call(D,R,1),!0}function kD(_){var D=this.__data__,R=Sa(D,_);return R<0?void 0:D[R][1]}function OD(_){return Sa(this.__data__,_)>-1}function PD(_,D){var R=this.__data__,W=Sa(R,_);return W<0?R.push([_,D]):R[W][1]=D,this}en.prototype.clear=MD,en.prototype.delete=DD,en.prototype.get=kD,en.prototype.has=OD,en.prototype.set=PD;function nn(_){var D=-1,R=_?_.length:0;for(this.clear();++D<R;){var W=_[D];this.set(W[0],W[1])}}function ED(){this.__data__={hash:new Xn,map:new(dr||en),string:new Xn}}function RD(_){return Ca(this,_).delete(_)}function AD(_){return Ca(this,_).get(_)}function LD(_){return Ca(this,_).has(_)}function ID(_,D){return Ca(this,_).set(_,D),this}nn.prototype.clear=ED,nn.prototype.delete=RD,nn.prototype.get=AD,nn.prototype.has=LD,nn.prototype.set=ID;function Ta(_){var D=-1,R=_?_.length:0;for(this.__data__=new nn;++D<R;)this.add(_[D])}function ND(_){return this.__data__.set(_,r),this}function FD(_){return this.__data__.has(_)}Ta.prototype.add=Ta.prototype.push=ND,Ta.prototype.has=FD;function rn(_){this.__data__=new en(_)}function UD(){this.__data__=new en}function BD(_){return this.__data__.delete(_)}function WD(_){return this.__data__.get(_)}function zD(_){return this.__data__.has(_)}function YD(_,D){var R=this.__data__;if(R instanceof en){var W=R.__data__;if(!dr||W.length<e-1)return W.push([_,D]),this;R=this.__data__=new nn(W)}return R.set(_,D),this}rn.prototype.clear=UD,rn.prototype.delete=BD,rn.prototype.get=WD,rn.prototype.has=zD,rn.prototype.set=YD;function HD(_,D){var R=Kn(_)||yp(_)?Ee(_.length,String):[],W=R.length,ot=!!W;for(var tt in _)(D||ye.call(_,tt))&&!(ot&&(tt=="length"||hp(tt,W)))&&R.push(tt);return R}function Sa(_,D){for(var R=_.length;R--;)if(mp(_[R][0],D))return R;return-1}var $D=rk();function jD(_,D){return _&&$D(_,D,Pa)}function up(_,D){D=Ma(D,_)?[D]:dp(D);for(var R=0,W=D.length;_!=null&&R<W;)_=_[Da(D[R++])];return R&&R==W?_:void 0}function VD(_){return Kt.call(_)}function qD(_,D){return _!=null&&D in Object(_)}function tc(_,D,R,W,ot){return _===D?!0:_==null||D==null||!ka(_)&&!Oa(D)?_!==_&&D!==D:XD(_,D,tc,R,W,ot)}function XD(_,D,R,W,ot,tt){var wt=Kn(_),Pt=Kn(D),$t=u,Zt=u;wt||($t=Mn(_),$t=$t==c?v:$t),Pt||(Zt=Mn(D),Zt=Zt==c?v:Zt);var ue=$t==v&&!Ft(_),ve=Zt==v&&!Ft(D),Jt=$t==Zt;if(Jt&&!ue)return tt||(tt=new rn),wt||pk(_)?fp(_,D,R,W,ot,tt):ak(_,D,$t,R,W,ot,tt);if(!(ot&s)){var De=ue&&ye.call(_,"__wrapped__"),ke=ve&&ye.call(D,"__wrapped__");if(De||ke){var Dn=De?_.value():_,an=ke?D.value():D;return tt||(tt=new rn),R(Dn,an,W,ot,tt)}}return Jt?(tt||(tt=new rn),sk(_,D,R,W,ot,tt)):!1}function GD(_,D,R,W){var ot=R.length,tt=ot,wt=!W;if(_==null)return!tt;for(_=Object(_);ot--;){var Pt=R[ot];if(wt&&Pt[2]?Pt[1]!==_[Pt[0]]:!(Pt[0]in _))return!1}for(;++ot<tt;){Pt=R[ot];var $t=Pt[0],Zt=_[$t],ue=Pt[1];if(wt&&Pt[2]){if(Zt===void 0&&!($t in _))return!1}else{var ve=new rn;if(W)var Jt=W(Zt,ue,$t,_,D,ve);if(!(Jt===void 0?tc(ue,Zt,W,a|s,ve):Jt))return!1}}return!0}function KD(_){if(!ka(_)||uk(_))return!1;var D=bp(_)||Ft(_)?_a:Z;return D.test(Gn(_))}function QD(_){return Oa(_)&&nc(_.length)&&!!N[Kt.call(_)]}function ZD(_){return typeof _=="function"?_:_==null?bk:typeof _=="object"?Kn(_)?ek(_[0],_[1]):tk(_):xk(_)}function JD(_){if(!dk(_))return gD(_);var D=[];for(var R in Object(_))ye.call(_,R)&&R!="constructor"&&D.push(R);return D}function tk(_){var D=ok(_);return D.length==1&&D[0][2]?gp(D[0][0],D[0][1]):function(R){return R===_||GD(R,_,D)}}function ek(_,D){return Ma(_)&&pp(D)?gp(Da(_),D):function(R){var W=mk(R,_);return W===void 0&&W===D?yk(R,_):tc(D,W,void 0,a|s)}}function nk(_){return function(D){return up(D,_)}}function ik(_){if(typeof _=="string")return _;if(ic(_))return cp?cp.call(_):"";var D=_+"";return D=="0"&&1/_==-o?"-0":D}function dp(_){return Kn(_)?_:fk(_)}function rk(_){return function(D,R,W){for(var ot=-1,tt=Object(D),wt=W(D),Pt=wt.length;Pt--;){var $t=wt[_?Pt:++ot];if(R(tt[$t],$t,tt)===!1)break}return D}}function fp(_,D,R,W,ot,tt){var wt=ot&s,Pt=_.length,$t=D.length;if(Pt!=$t&&!(wt&&$t>Pt))return!1;var Zt=tt.get(_);if(Zt&&tt.get(D))return Zt==D;var ue=-1,ve=!0,Jt=ot&a?new Ta:void 0;for(tt.set(_,D),tt.set(D,_);++ue<Pt;){var De=_[ue],ke=D[ue];if(W)var Dn=wt?W(ke,De,ue,D,_,tt):W(De,ke,ue,_,D,tt);if(Dn!==void 0){if(Dn)continue;ve=!1;break}if(Jt){if(!Nt(D,function(an,Qn){if(!Jt.has(Qn)&&(De===an||R(De,an,W,ot,tt)))return Jt.add(Qn)})){ve=!1;break}}else if(!(De===ke||R(De,ke,W,ot,tt))){ve=!1;break}}return tt.delete(_),tt.delete(D),ve}function ak(_,D,R,W,ot,tt,wt){switch(R){case O:if(_.byteLength!=D.byteLength||_.byteOffset!=D.byteOffset)return!1;_=_.buffer,D=D.buffer;case C:return!(_.byteLength!=D.byteLength||!W(new lp(_),new lp(D)));case d:case f:case m:return mp(+_,+D);case p:return _.name==D.name&&_.message==D.message;case w:case M:return _==D+"";case g:var Pt=Je;case T:var $t=tt&s;if(Pt||(Pt=Cn),_.size!=D.size&&!$t)return!1;var Zt=wt.get(_);if(Zt)return Zt==D;tt|=a,wt.set(_,D);var ue=fp(Pt(_),Pt(D),W,ot,tt,wt);return wt.delete(_),ue;case k:if(Jl)return Jl.call(_)==Jl.call(D)}return!1}function sk(_,D,R,W,ot,tt){var wt=ot&s,Pt=Pa(_),$t=Pt.length,Zt=Pa(D),ue=Zt.length;if($t!=ue&&!wt)return!1;for(var ve=$t;ve--;){var Jt=Pt[ve];if(!(wt?Jt in D:ye.call(D,Jt)))return!1}var De=tt.get(_);if(De&&tt.get(D))return De==D;var ke=!0;tt.set(_,D),tt.set(D,_);for(var Dn=wt;++ve<$t;){Jt=Pt[ve];var an=_[Jt],Qn=D[Jt];if(W)var xp=wt?W(Qn,an,Jt,D,_,tt):W(an,Qn,Jt,_,D,tt);if(!(xp===void 0?an===Qn||R(an,Qn,W,ot,tt):xp)){ke=!1;break}Dn||(Dn=Jt=="constructor")}if(ke&&!Dn){var Ea=_.constructor,Ra=D.constructor;Ea!=Ra&&"constructor"in _&&"constructor"in D&&!(typeof Ea=="function"&&Ea instanceof Ea&&typeof Ra=="function"&&Ra instanceof Ra)&&(ke=!1)}return tt.delete(_),tt.delete(D),ke}function Ca(_,D){var R=_.__data__;return ck(D)?R[typeof D=="string"?"string":"hash"]:R.map}function ok(_){for(var D=Pa(_),R=D.length;R--;){var W=D[R],ot=_[W];D[R]=[W,ot,pp(ot)]}return D}function bi(_,D){var R=Lt(_,D);return KD(R)?R:void 0}var Mn=VD;(Gl&&Mn(new Gl(new ArrayBuffer(1)))!=O||dr&&Mn(new dr)!=g||Kl&&Mn(Kl.resolve())!=b||Ql&&Mn(new Ql)!=T||Zl&&Mn(new Zl)!=S)&&(Mn=function(_){var D=Kt.call(_),R=D==v?_.constructor:void 0,W=R?Gn(R):void 0;if(W)switch(W){case mD:return O;case yD:return g;case vD:return b;case bD:return T;case xD:return S}return D});function lk(_,D,R){D=Ma(D,_)?[D]:dp(D);for(var W,ot=-1,wt=D.length;++ot<wt;){var tt=Da(D[ot]);if(!(W=_!=null&&R(_,tt)))break;_=_[tt]}if(W)return W;var wt=_?_.length:0;return!!wt&&nc(wt)&&hp(tt,wt)&&(Kn(_)||yp(_))}function hp(_,D){return D=D??l,!!D&&(typeof _=="number"||K.test(_))&&_>-1&&_%1==0&&_<D}function Ma(_,D){if(Kn(_))return!1;var R=typeof _;return R=="number"||R=="symbol"||R=="boolean"||_==null||ic(_)?!0:ut.test(_)||!yt.test(_)||D!=null&&_ in Object(D)}function ck(_){var D=typeof _;return D=="string"||D=="number"||D=="symbol"||D=="boolean"?_!=="__proto__":_===null}function uk(_){return!!Ae&&Ae in _}function dk(_){var D=_&&_.constructor,R=typeof D=="function"&&D.prototype||_e;return _===R}function pp(_){return _===_&&!ka(_)}function gp(_,D){return function(R){return R==null?!1:R[_]===D&&(D!==void 0||_ in Object(R))}}var fk=ec(function(_){_=gk(_);var D=[];return z.test(_)&&D.push(""),_.replace(L,function(R,W,ot,tt){D.push(ot?tt.replace(j,"$1"):W||R)}),D});function Da(_){if(typeof _=="string"||ic(_))return _;var D=_+"";return D=="0"&&1/_==-o?"-0":D}function Gn(_){if(_!=null){try{return ce.call(_)}catch{}try{return _+""}catch{}}return""}function ec(_,D){if(typeof _!="function"||D&&typeof D!="function")throw new TypeError(i);var R=function(){var W=arguments,ot=D?D.apply(this,W):W[0],tt=R.cache;if(tt.has(ot))return tt.get(ot);var wt=_.apply(this,W);return R.cache=tt.set(ot,wt),wt};return R.cache=new(ec.Cache||nn),R}ec.Cache=nn;function mp(_,D){return _===D||_!==_&&D!==D}function yp(_){return hk(_)&&ye.call(_,"callee")&&(!hD.call(_,"callee")||Kt.call(_)==c)}var Kn=Array.isArray;function vp(_){return _!=null&&nc(_.length)&&!bp(_)}function hk(_){return Oa(_)&&vp(_)}function bp(_){var D=ka(_)?Kt.call(_):"";return D==y||D==x}function nc(_){return typeof _=="number"&&_>-1&&_%1==0&&_<=l}function ka(_){var D=typeof _;return!!_&&(D=="object"||D=="function")}function Oa(_){return!!_&&typeof _=="object"}function ic(_){return typeof _=="symbol"||Oa(_)&&Kt.call(_)==k}var pk=bt?me(bt):QD;function gk(_){return _==null?"":ik(_)}function mk(_,D,R){var W=_==null?void 0:up(_,D);return W===void 0?R:W}function yk(_,D){return _!=null&&lk(_,D,qD)}function Pa(_){return vp(_)?HD(_):JD(_)}function vk(_,D){var R={};return D=ZD(D),jD(_,function(W,ot,tt){R[D(W,ot,tt)]=W}),R}function bk(_){return _}function xk(_){return Ma(_)?Ce(Da(_)):nk(_)}n.exports=vk}(xa,xa.exports);var JC=xa.exports;const tM=Bn(JC);var eM=1/0,nM=9007199254740991,iM="[object Arguments]",rM="[object Function]",aM="[object GeneratorFunction]",sM="[object Symbol]",oM=typeof ge=="object"&&ge&&ge.Object===Object&&ge,lM=typeof self=="object"&&self&&self.Object===Object&&self,cM=oM||lM||Function("return this")();function uM(n,t,e){switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2])}return n.apply(t,e)}function dM(n,t){for(var e=-1,i=n?n.length:0,r=Array(i);++e<i;)r[e]=t(n[e],e,n);return r}function fM(n,t){for(var e=-1,i=t.length,r=n.length;++e<i;)n[r+e]=t[e];return n}var ql=Object.prototype,hM=ql.hasOwnProperty,Xl=ql.toString,Qh=cM.Symbol,pM=ql.propertyIsEnumerable,Zh=Qh?Qh.isConcatSpreadable:void 0,Jh=Math.max;function tp(n,t,e,i,r){var a=-1,s=n.length;for(e||(e=vM),r||(r=[]);++a<s;){var o=n[a];t>0&&e(o)?t>1?tp(o,t-1,e,i,r):fM(r,o):i||(r[r.length]=o)}return r}function gM(n,t){return n=Object(n),mM(n,t,function(e,i){return i in n})}function mM(n,t,e){for(var i=-1,r=t.length,a={};++i<r;){var s=t[i],o=n[s];e(o,s)&&(a[s]=o)}return a}function yM(n,t){return t=Jh(t===void 0?n.length-1:t,0),function(){for(var e=arguments,i=-1,r=Jh(e.length-t,0),a=Array(r);++i<r;)a[i]=e[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=e[i];return s[t]=a,uM(n,this,s)}}function vM(n){return _M(n)||xM(n)||!!(Zh&&n&&n[Zh])}function bM(n){if(typeof n=="string"||DM(n))return n;var t=n+"";return t=="0"&&1/n==-eM?"-0":t}function xM(n){return TM(n)&&hM.call(n,"callee")&&(!pM.call(n,"callee")||Xl.call(n)==iM)}var _M=Array.isArray;function wM(n){return n!=null&&CM(n.length)&&!SM(n)}function TM(n){return ep(n)&&wM(n)}function SM(n){var t=MM(n)?Xl.call(n):"";return t==rM||t==aM}function CM(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=nM}function MM(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function ep(n){return!!n&&typeof n=="object"}function DM(n){return typeof n=="symbol"||ep(n)&&Xl.call(n)==sM}var kM=yM(function(n,t){return n==null?{}:gM(n,dM(tp(t,1),bM))}),OM=kM;const PM=Bn(OM);var np={exports:{}};(function(n,t){(function(e,i){i()})(ge,function(){function e(c,u){return typeof u>"u"?u={autoBom:!1}:typeof u!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}function i(c,u,d){var f=new XMLHttpRequest;f.open("GET",c),f.responseType="blob",f.onload=function(){l(f.response,u,d)},f.onerror=function(){console.error("could not download file")},f.send()}function r(c){var u=new XMLHttpRequest;u.open("HEAD",c,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function a(c){try{c.dispatchEvent(new MouseEvent("click"))}catch{var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),c.dispatchEvent(u)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof ge=="object"&&ge.global===ge?ge:void 0,o=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(c,u,d){var f=s.URL||s.webkitURL,p=document.createElement("a");u=u||c.name||"download",p.download=u,p.rel="noopener",typeof c=="string"?(p.href=c,p.origin===location.origin?a(p):r(p.href)?i(c,u,d):a(p,p.target="_blank")):(p.href=f.createObjectURL(c),setTimeout(function(){f.revokeObjectURL(p.href)},4e4),setTimeout(function(){a(p)},0))}:"msSaveOrOpenBlob"in navigator?function(c,u,d){if(u=u||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(e(c,d),u);else if(r(c))i(c,u,d);else{var f=document.createElement("a");f.href=c,f.target="_blank",setTimeout(function(){a(f)})}}:function(c,u,d,f){if(f=f||open("","_blank"),f&&(f.document.title=f.document.body.innerText="downloading..."),typeof c=="string")return i(c,u,d);var p=c.type==="application/octet-stream",y=/constructor/i.test(s.HTMLElement)||s.safari,x=/CriOS\/[\d]+/.test(navigator.userAgent);if((x||p&&y||o)&&typeof FileReader<"u"){var g=new FileReader;g.onloadend=function(){var b=g.result;b=x?b:b.replace(/^data:[^;]*;/,"data:attachment/file;"),f?f.location.href=b:location=b,f=null},g.readAsDataURL(c)}else{var m=s.URL||s.webkitURL,v=m.createObjectURL(c);f?f.location=v:location.href=v,f=null,setTimeout(function(){m.revokeObjectURL(v)},4e4)}});s.saveAs=l.saveAs=l,n.exports=l})})(np);var EM=np.exports,ip={exports:{}};/* @license
|
|
29
|
+
*/const TS={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};du._date.override({_id:"date-fns",formats:function(){return TS},parse:function(n,t){if(n===null||typeof n>"u")return null;const e=typeof n;return e==="number"||n instanceof Date?n=nt(n):e==="string"&&(typeof t=="string"?n=o_(n,t,new Date,this.options):n=Qd(n,this.options)),ks(n)?n.getTime():null},format:function(n,t){return lx(n,t,this.options)},add:function(n,t,e){switch(e){case"millisecond":return Gr(n,t);case"second":return Uv(n,t);case"minute":return Nv(n,t);case"hour":return Ev(n,t);case"day":return Sd(n,t);case"week":return Bv(n,t);case"month":return Ms(n,t);case"quarter":return Fv(n,t);case"year":return Wv(n,t);default:return n}},diff:function(n,t,e){switch(e){case"millisecond":return Ki(n,t);case"second":return Kv(n,t);case"minute":return qv(n,t);case"hour":return Vv(n,t);case"day":return Dd(n,t);case"week":return Qv(n,t);case"month":return Ed(n,t);case"quarter":return Gv(n,t);case"year":return Zv(n,t);default:return 0}},startOf:function(n,t,e){switch(t){case"second":return u_(n);case"minute":return Jv(n);case"hour":return c_(n);case"day":return Ds(n);case"week":return Cd(n);case"isoWeek":return Cd(n,{weekStartsOn:+e});case"month":return eb(n);case"quarter":return tb(n);case"year":return rb(n);default:return n}},endOf:function(n,t){switch(t){case"second":return lb(n);case"minute":return sb(n);case"hour":return ib(n);case"day":return Od(n);case"week":return ab(n);case"month":return Pd(n);case"quarter":return ob(n);case"year":return nb(n);default:return n}}});const Ch={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},SS={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...Ch,...{ariaLabel:{type:String},ariaDescribedby:{type:String}}},CS=h.version[0]==="2"?(n,t)=>Object.assign(n,{attrs:t}):(n,t)=>Object.assign(n,t);function pr(n){return h.isProxy(n)?h.toRaw(n):n}function MS(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n;return h.isProxy(t)?new Proxy(n,{}):n}function DS(n,t){const e=n.options;e&&t&&Object.assign(e,t)}function Mh(n,t){n.labels=t}function Dh(n,t,e){const r=[];n.datasets=t.map(i=>{const a=n.datasets.find(s=>s[e]===i[e]);return!a||!i.data||r.includes(a)?{...i}:(r.push(a),Object.assign(a,i),a)})}function kS(n,t){const e={labels:[],datasets:[]};return Mh(e,n.labels),Dh(e,n.datasets,t),e}const OS=h.defineComponent({props:SS,setup(n,t){let{expose:e,slots:r}=t;const i=h.ref(null),a=h.shallowRef(null);e({chart:a});const s=()=>{if(!i.value)return;const{type:c,data:u,options:d,plugins:f,datasetIdKey:p}=n,y=kS(u,p),x=MS(y,u);a.value=new Se(i.value,{type:c,data:x,options:{...d},plugins:f})},o=()=>{const c=h.toRaw(a.value);c&&(n.destroyDelay>0?setTimeout(()=>{c.destroy(),a.value=null},n.destroyDelay):(c.destroy(),a.value=null))},l=c=>{c.update(n.updateMode)};return h.onMounted(s),h.onUnmounted(o),h.watch([()=>n.options,()=>n.data],(c,u)=>{let[d,f]=c,[p,y]=u;const x=h.toRaw(a.value);if(!x)return;let g=!1;if(d){const m=pr(d),v=pr(p);m&&m!==v&&(DS(x,m),g=!0)}if(f){const m=pr(f.labels),v=pr(y.labels),b=pr(f.datasets),w=pr(y.datasets);m!==v&&(Mh(x.config.data,m),g=!0),b&&b!==w&&(Dh(x.config.data,b,n.datasetIdKey),g=!0)}g&&h.nextTick(()=>{l(x)})},{deep:!0}),()=>h.h("canvas",{role:"img",ariaLabel:n.ariaLabel,ariaDescribedby:n.ariaDescribedby,ref:i},[h.h("p",{},[r.default?r.default():""])])}});function Jo(n,t){return Se.register(t),h.defineComponent({props:Ch,setup(e,r){let{expose:i}=r;const a=h.shallowRef(null),s=o=>{a.value=o==null?void 0:o.chart};return i({chart:a}),()=>h.h(OS,CS({ref:s},{type:n,...e}))}})}const PS=Jo("bar",Lr),kh=Jo("doughnut",pn),ES=Jo("line",Ir),RS={class:"chart-container"},AS=h.defineComponent({__name:"DoughnutChart",props:{chartData:{type:Object,required:!1,default:null},tooltipTitle:{type:String,required:!0},metricUnit:{type:String,required:!1,default:""},legendPosition:{type:String,required:!1,default:Wt.Right},legendValues:{type:Object,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Qe}},setup(n){const t=n,{translateUnit:e}=Mt.useTranslatedUnits(),r=h.ref(Tn()),i=h.ref(Tn()),a=h.ref([]),s=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:t.metricUnit,translateUnit:e,offsetX:0,offsetY:0,width:0,height:0,chartType:ee.DOUGHNUT}),o={id:r.value,afterUpdate(x){a.value=x.options.plugins.legend.labels.generateLabels(x).map(g=>({...g,value:t.legendValues&&t.legendValues[g.text],hidden:!1}))}},l=h.computed(()=>[o]),c=h.computed(()=>[t.chartData.datasets.reduce((g,m)=>(g.labels.push(m.label),g.backgroundColor.push(m.backgroundColor),g.borderColor.push(Mf(m.backgroundColor,50)),g.data.push(m.data.reduce((v,b)=>v+b,0)),g),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),u=h.computed(()=>({...t.chartData,datasets:c.value}));Mt.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const{options:d}=Mt.useDoughnutChartOptions({tooltipState:s,legendID:r.value}),f=h.ref(),p=x=>({[Wt.Right]:"legend-row",[Wt.Bottom]:"column",[Wt.Hidden]:"hidden"})[x],y=({width:x,height:g})=>{s.width=x,s.height=g};return(x,g)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",p(n.legendPosition)]),"data-testid":"doughnut-chart-parent"},[h.createElementVNode("div",RS,[h.createVNode(h.unref(kh),{ref_key:"chartInstance",ref:f,"chart-id":i.value,data:u.value,options:h.unref(d),plugins:l.value},null,8,["chart-id","data","options","plugins"]),h.createVNode(Qo,{left:s.left,series:s.tooltipSeries,"show-tooltip":s.showTooltip,"tooltip-title":n.tooltipTitle,top:s.top,unit:n.metricUnit,onDimensions:y},null,8,["left","series","show-tooltip","tooltip-title","top","unit"])]),h.createVNode(Zo,{id:r.value,"chart-instance":f.value,items:a.value,position:n.legendPosition},null,8,["id","chart-instance","items","position"])],2))}}),LS=Ze(AS,[["__scopeId","data-v-07ea8b82"]]);var IS=Object.defineProperty,NS=(n,t,e)=>t in n?IS(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,We=(n,t,e)=>NS(n,typeof t!="symbol"?t+"":t,e),Yt=(n=>(n.FIFTEEN_MIN="15m",n.ONE_HOUR="1h",n.SIX_HOUR="6h",n.TWELVE_HOUR="12h",n.ONE_DAY="24h",n.SEVEN_DAY="7d",n.THIRTY_DAY="30d",n.CURRENT_WEEK="current_week",n.CURRENT_MONTH="current_month",n.CURRENT_QUARTER="current_quarter",n.PREVIOUS_WEEK="previous_week",n.PREVIOUS_MONTH="previous_month",n.PREVIOUS_QUARTER="previous_quarter",n))(Yt||{});const FS=["secondly","minutely","hourly","daily","weekly","trend"],tl=n=>n.filter(t=>t!=="time"),Oh=["api_product","api_product_version","control_plane","control_plane_group","data_plane_node","gateway_service","route","status_code","status_code_grouped","time"],US=tl(Oh),BS=[...Oh,"application","consumer","iso_code"],WS=tl(BS),zS=["control_plane","control_plane_group","gateway_service","consumer","application","route","ai_provider","ai_response_model","ai_request_model","llm_cache_status","llm_embeddings_provider","llm_embeddings_model","time"],YS=tl(zS);new Set(US),new Set(WS),new Set(YS);function el(n){"@babel/helpers - typeof";return el=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},el(n)}function ya(n){if(n===null||n===!0||n===!1)return NaN;var t=Number(n);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function ze(n,t){if(t.length<n)throw new TypeError(n+" argument"+(n>1?"s":"")+" required, but only "+t.length+" present")}function gr(n){ze(1,arguments);var t=Object.prototype.toString.call(n);return n instanceof Date||el(n)==="object"&&t==="[object Date]"?new Date(n.getTime()):typeof n=="number"||t==="[object Number]"?new Date(n):((typeof n=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Ph(n,t){ze(2,arguments);var e=gr(n),r=ya(t);return isNaN(r)?new Date(NaN):(r&&e.setDate(e.getDate()+r),e)}function HS(n,t){ze(2,arguments);var e=gr(n),r=ya(t);if(isNaN(r))return new Date(NaN);if(!r)return e;var i=e.getDate(),a=new Date(e.getTime());a.setMonth(e.getMonth()+r+1,0);var s=a.getDate();return i>=s?a:(e.setFullYear(a.getFullYear(),a.getMonth(),i),e)}var $S={};function jS(){return $S}function va(n,t){var e,r,i,a,s,o,l,c;ze(1,arguments);var u=jS(),d=ya((e=(r=(i=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&i!==void 0?i:u.weekStartsOn)!==null&&r!==void 0?r:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&e!==void 0?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=gr(n),p=f.getDay(),y=(p<d?7:0)+p-d;return f.setDate(f.getDate()-y),f.setHours(0,0,0,0),f}function Eh(n){ze(1,arguments);var t=gr(n);return t.setHours(0,0,0,0),t}var VS=60,qS=3600;function mr(n){ze(1,arguments);var t=gr(n);return t.setDate(1),t.setHours(0,0,0,0),t}function XS(n){ze(1,arguments);var t=gr(n),e=t.getFullYear(),r=t.getMonth(),i=new Date(0);return i.setFullYear(e,r+1,0),i.setHours(0,0,0,0),i.getDate()}function GS(n){return ze(1,arguments),Math.floor(n*qS)}function KS(n){ze(1,arguments);var t=n/VS;return Math.floor(t)}function Rh(n,t){ze(2,arguments);var e=ya(t);return HS(n,-e)}function nl(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ah={exports:{}},Lh={exports:{}};(function(n){function t(e){return e&&e.__esModule?e:{default:e}}n.exports=t,n.exports.__esModule=!0,n.exports.default=n.exports})(Lh);var Ht=Lh.exports,rl={exports:{}},il={exports:{}},Ih={exports:{}};(function(n){function t(e){"@babel/helpers - typeof";return n.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},n.exports.__esModule=!0,n.exports.default=n.exports,t(e)}n.exports=t,n.exports.__esModule=!0,n.exports.default=n.exports})(Ih);var Nh=Ih.exports,al={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r,i){if(i.length<r)throw new TypeError(r+" argument"+(r>1?"s":"")+" required, but only "+i.length+" present")}n.exports=t.default})(al,al.exports);var oe=al.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=e(Nh),i=e(oe);function a(s){return(0,i.default)(1,arguments),s instanceof Date||(0,r.default)(s)==="object"&&Object.prototype.toString.call(s)==="[object Date]"}n.exports=t.default})(il,il.exports);var QS=il.exports,sl={exports:{}};(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=e(Nh),i=e(oe);function a(s){(0,i.default)(1,arguments);var o=Object.prototype.toString.call(s);return s instanceof Date||(0,r.default)(s)==="object"&&o==="[object Date]"?new Date(s.getTime()):typeof s=="number"||o==="[object Number]"?new Date(s):((typeof s=="string"||o==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}n.exports=t.default})(sl,sl.exports);var Ye=sl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(QS),i=e(Ye),a=e(oe);function s(o){if((0,a.default)(1,arguments),!(0,r.default)(o)&&typeof o!="number")return!1;var l=(0,i.default)(o);return!isNaN(Number(l))}n.exports=t.default})(rl,rl.exports);var ZS=rl.exports,ol={exports:{}},ll={exports:{}},cl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){if(r===null||r===!0||r===!1)return NaN;var i=Number(r);return isNaN(i)?i:i<0?Math.ceil(i):Math.floor(i)}n.exports=t.default})(cl,cl.exports);var jn=cl.exports;const JS=nl(jn);(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(jn),i=e(Ye),a=e(oe);function s(o,l){(0,a.default)(2,arguments);var c=(0,i.default)(o).getTime(),u=(0,r.default)(l);return new Date(c+u)}n.exports=t.default})(ll,ll.exports);var tC=ll.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(tC),i=e(oe),a=e(jn);function s(o,l){(0,i.default)(2,arguments);var c=(0,a.default)(l);return(0,r.default)(o,-c)}n.exports=t.default})(ol,ol.exports);var eC=ol.exports,ul={exports:{}},dl={exports:{}};(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(Ye),i=e(oe),a=864e5;function s(o){(0,i.default)(1,arguments);var l=(0,r.default)(o),c=l.getTime();l.setUTCMonth(0,1),l.setUTCHours(0,0,0,0);var u=l.getTime(),d=c-u;return Math.floor(d/a)+1}n.exports=t.default})(dl,dl.exports);var nC=dl.exports,fl={exports:{}},hl={exports:{}};(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=e(Ye),i=e(oe);function a(s){(0,i.default)(1,arguments);var o=1,l=(0,r.default)(s),c=l.getUTCDay(),u=(c<o?7:0)+c-o;return l.setUTCDate(l.getUTCDate()-u),l.setUTCHours(0,0,0,0),l}n.exports=t.default})(hl,hl.exports);var pl=hl.exports,gl={exports:{}},ml={exports:{}};(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(Ye),i=e(oe),a=e(pl);function s(o){(0,i.default)(1,arguments);var l=(0,r.default)(o),c=l.getUTCFullYear(),u=new Date(0);u.setUTCFullYear(c+1,0,4),u.setUTCHours(0,0,0,0);var d=(0,a.default)(u),f=new Date(0);f.setUTCFullYear(c,0,4),f.setUTCHours(0,0,0,0);var p=(0,a.default)(f);return l.getTime()>=d.getTime()?c+1:l.getTime()>=p.getTime()?c:c-1}n.exports=t.default})(ml,ml.exports);var Fh=ml.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(Fh),i=e(pl),a=e(oe);function s(o){(0,a.default)(1,arguments);var l=(0,r.default)(o),c=new Date(0);c.setUTCFullYear(l,0,4),c.setUTCHours(0,0,0,0);var u=(0,i.default)(c);return u}n.exports=t.default})(gl,gl.exports);var rC=gl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=e(Ye),i=e(pl),a=e(rC),s=e(oe),o=6048e5;function l(c){(0,s.default)(1,arguments);var u=(0,r.default)(c),d=(0,i.default)(u).getTime()-(0,a.default)(u).getTime();return Math.round(d/o)+1}n.exports=t.default})(fl,fl.exports);var iC=fl.exports,yl={exports:{}},vl={exports:{}},Vn={};Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.getDefaultOptions=aC,Vn.setDefaultOptions=sC;var Uh={};function aC(){return Uh}function sC(n){Uh=n}(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var r=e(Ye),i=e(oe),a=e(jn),s=Vn;function o(l,c){var u,d,f,p,y,x,g,m;(0,i.default)(1,arguments);var v=(0,s.getDefaultOptions)(),b=(0,a.default)((u=(d=(f=(p=c==null?void 0:c.weekStartsOn)!==null&&p!==void 0?p:c==null||(y=c.locale)===null||y===void 0||(x=y.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&f!==void 0?f:v.weekStartsOn)!==null&&d!==void 0?d:(g=v.locale)===null||g===void 0||(m=g.options)===null||m===void 0?void 0:m.weekStartsOn)!==null&&u!==void 0?u:0);if(!(b>=0&&b<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var w=(0,r.default)(l),T=w.getUTCDay(),M=(T<b?7:0)+T-b;return w.setUTCDate(w.getUTCDate()-M),w.setUTCHours(0,0,0,0),w}n.exports=t.default})(vl,vl.exports);var bl=vl.exports,xl={exports:{}},_l={exports:{}};(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=e(Ye),i=e(oe),a=e(bl),s=e(jn),o=Vn;function l(c,u){var d,f,p,y,x,g,m,v;(0,i.default)(1,arguments);var b=(0,r.default)(c),w=b.getUTCFullYear(),T=(0,o.getDefaultOptions)(),M=(0,s.default)((d=(f=(p=(y=u==null?void 0:u.firstWeekContainsDate)!==null&&y!==void 0?y:u==null||(x=u.locale)===null||x===void 0||(g=x.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&p!==void 0?p:T.firstWeekContainsDate)!==null&&f!==void 0?f:(m=T.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:1);if(!(M>=1&&M<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var k=new Date(0);k.setUTCFullYear(w+1,0,M),k.setUTCHours(0,0,0,0);var S=(0,a.default)(k,u),C=new Date(0);C.setUTCFullYear(w,0,M),C.setUTCHours(0,0,0,0);var O=(0,a.default)(C,u);return b.getTime()>=S.getTime()?w+1:b.getTime()>=O.getTime()?w:w-1}n.exports=t.default})(_l,_l.exports);var Bh=_l.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=e(Bh),i=e(oe),a=e(bl),s=e(jn),o=Vn;function l(c,u){var d,f,p,y,x,g,m,v;(0,i.default)(1,arguments);var b=(0,o.getDefaultOptions)(),w=(0,s.default)((d=(f=(p=(y=u==null?void 0:u.firstWeekContainsDate)!==null&&y!==void 0?y:u==null||(x=u.locale)===null||x===void 0||(g=x.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&p!==void 0?p:b.firstWeekContainsDate)!==null&&f!==void 0?f:(m=b.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:1),T=(0,r.default)(c,u),M=new Date(0);M.setUTCFullYear(T,0,w),M.setUTCHours(0,0,0,0);var k=(0,a.default)(M,u);return k}n.exports=t.default})(xl,xl.exports);var oC=xl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=e(Ye),i=e(bl),a=e(oC),s=e(oe),o=6048e5;function l(c,u){(0,s.default)(1,arguments);var d=(0,r.default)(c),f=(0,i.default)(d,u).getTime()-(0,a.default)(d,u).getTime();return Math.round(f/o)+1}n.exports=t.default})(yl,yl.exports);var lC=yl.exports,wl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r,i){for(var a=r<0?"-":"",s=Math.abs(r).toString();s.length<i;)s="0"+s;return a+s}n.exports=t.default})(wl,wl.exports);var Wh=wl.exports,Tl={exports:{}};(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(Wh),i={y:function(s,o){var l=s.getUTCFullYear(),c=l>0?l:1-l;return(0,r.default)(o==="yy"?c%100:c,o.length)},M:function(s,o){var l=s.getUTCMonth();return o==="M"?String(l+1):(0,r.default)(l+1,2)},d:function(s,o){return(0,r.default)(s.getUTCDate(),o.length)},a:function(s,o){var l=s.getUTCHours()/12>=1?"pm":"am";switch(o){case"a":case"aa":return l.toUpperCase();case"aaa":return l;case"aaaaa":return l[0];case"aaaa":default:return l==="am"?"a.m.":"p.m."}},h:function(s,o){return(0,r.default)(s.getUTCHours()%12||12,o.length)},H:function(s,o){return(0,r.default)(s.getUTCHours(),o.length)},m:function(s,o){return(0,r.default)(s.getUTCMinutes(),o.length)},s:function(s,o){return(0,r.default)(s.getUTCSeconds(),o.length)},S:function(s,o){var l=o.length,c=s.getUTCMilliseconds(),u=Math.floor(c*Math.pow(10,l-3));return(0,r.default)(u,o.length)}},a=i;t.default=a,n.exports=t.default})(Tl,Tl.exports);var cC=Tl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(nC),i=e(iC),a=e(Fh),s=e(lC),o=e(Bh),l=e(Wh),c=e(cC),u={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},d={G:function(g,m,v){var b=g.getUTCFullYear()>0?1:0;switch(m){case"G":case"GG":case"GGG":return v.era(b,{width:"abbreviated"});case"GGGGG":return v.era(b,{width:"narrow"});case"GGGG":default:return v.era(b,{width:"wide"})}},y:function(g,m,v){if(m==="yo"){var b=g.getUTCFullYear(),w=b>0?b:1-b;return v.ordinalNumber(w,{unit:"year"})}return c.default.y(g,m)},Y:function(g,m,v,b){var w=(0,o.default)(g,b),T=w>0?w:1-w;if(m==="YY"){var M=T%100;return(0,l.default)(M,2)}return m==="Yo"?v.ordinalNumber(T,{unit:"year"}):(0,l.default)(T,m.length)},R:function(g,m){var v=(0,a.default)(g);return(0,l.default)(v,m.length)},u:function(g,m){var v=g.getUTCFullYear();return(0,l.default)(v,m.length)},Q:function(g,m,v){var b=Math.ceil((g.getUTCMonth()+1)/3);switch(m){case"Q":return String(b);case"QQ":return(0,l.default)(b,2);case"Qo":return v.ordinalNumber(b,{unit:"quarter"});case"QQQ":return v.quarter(b,{width:"abbreviated",context:"formatting"});case"QQQQQ":return v.quarter(b,{width:"narrow",context:"formatting"});case"QQQQ":default:return v.quarter(b,{width:"wide",context:"formatting"})}},q:function(g,m,v){var b=Math.ceil((g.getUTCMonth()+1)/3);switch(m){case"q":return String(b);case"qq":return(0,l.default)(b,2);case"qo":return v.ordinalNumber(b,{unit:"quarter"});case"qqq":return v.quarter(b,{width:"abbreviated",context:"standalone"});case"qqqqq":return v.quarter(b,{width:"narrow",context:"standalone"});case"qqqq":default:return v.quarter(b,{width:"wide",context:"standalone"})}},M:function(g,m,v){var b=g.getUTCMonth();switch(m){case"M":case"MM":return c.default.M(g,m);case"Mo":return v.ordinalNumber(b+1,{unit:"month"});case"MMM":return v.month(b,{width:"abbreviated",context:"formatting"});case"MMMMM":return v.month(b,{width:"narrow",context:"formatting"});case"MMMM":default:return v.month(b,{width:"wide",context:"formatting"})}},L:function(g,m,v){var b=g.getUTCMonth();switch(m){case"L":return String(b+1);case"LL":return(0,l.default)(b+1,2);case"Lo":return v.ordinalNumber(b+1,{unit:"month"});case"LLL":return v.month(b,{width:"abbreviated",context:"standalone"});case"LLLLL":return v.month(b,{width:"narrow",context:"standalone"});case"LLLL":default:return v.month(b,{width:"wide",context:"standalone"})}},w:function(g,m,v,b){var w=(0,s.default)(g,b);return m==="wo"?v.ordinalNumber(w,{unit:"week"}):(0,l.default)(w,m.length)},I:function(g,m,v){var b=(0,i.default)(g);return m==="Io"?v.ordinalNumber(b,{unit:"week"}):(0,l.default)(b,m.length)},d:function(g,m,v){return m==="do"?v.ordinalNumber(g.getUTCDate(),{unit:"date"}):c.default.d(g,m)},D:function(g,m,v){var b=(0,r.default)(g);return m==="Do"?v.ordinalNumber(b,{unit:"dayOfYear"}):(0,l.default)(b,m.length)},E:function(g,m,v){var b=g.getUTCDay();switch(m){case"E":case"EE":case"EEE":return v.day(b,{width:"abbreviated",context:"formatting"});case"EEEEE":return v.day(b,{width:"narrow",context:"formatting"});case"EEEEEE":return v.day(b,{width:"short",context:"formatting"});case"EEEE":default:return v.day(b,{width:"wide",context:"formatting"})}},e:function(g,m,v,b){var w=g.getUTCDay(),T=(w-b.weekStartsOn+8)%7||7;switch(m){case"e":return String(T);case"ee":return(0,l.default)(T,2);case"eo":return v.ordinalNumber(T,{unit:"day"});case"eee":return v.day(w,{width:"abbreviated",context:"formatting"});case"eeeee":return v.day(w,{width:"narrow",context:"formatting"});case"eeeeee":return v.day(w,{width:"short",context:"formatting"});case"eeee":default:return v.day(w,{width:"wide",context:"formatting"})}},c:function(g,m,v,b){var w=g.getUTCDay(),T=(w-b.weekStartsOn+8)%7||7;switch(m){case"c":return String(T);case"cc":return(0,l.default)(T,m.length);case"co":return v.ordinalNumber(T,{unit:"day"});case"ccc":return v.day(w,{width:"abbreviated",context:"standalone"});case"ccccc":return v.day(w,{width:"narrow",context:"standalone"});case"cccccc":return v.day(w,{width:"short",context:"standalone"});case"cccc":default:return v.day(w,{width:"wide",context:"standalone"})}},i:function(g,m,v){var b=g.getUTCDay(),w=b===0?7:b;switch(m){case"i":return String(w);case"ii":return(0,l.default)(w,m.length);case"io":return v.ordinalNumber(w,{unit:"day"});case"iii":return v.day(b,{width:"abbreviated",context:"formatting"});case"iiiii":return v.day(b,{width:"narrow",context:"formatting"});case"iiiiii":return v.day(b,{width:"short",context:"formatting"});case"iiii":default:return v.day(b,{width:"wide",context:"formatting"})}},a:function(g,m,v){var b=g.getUTCHours(),w=b/12>=1?"pm":"am";switch(m){case"a":case"aa":return v.dayPeriod(w,{width:"abbreviated",context:"formatting"});case"aaa":return v.dayPeriod(w,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return v.dayPeriod(w,{width:"narrow",context:"formatting"});case"aaaa":default:return v.dayPeriod(w,{width:"wide",context:"formatting"})}},b:function(g,m,v){var b=g.getUTCHours(),w;switch(b===12?w=u.noon:b===0?w=u.midnight:w=b/12>=1?"pm":"am",m){case"b":case"bb":return v.dayPeriod(w,{width:"abbreviated",context:"formatting"});case"bbb":return v.dayPeriod(w,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return v.dayPeriod(w,{width:"narrow",context:"formatting"});case"bbbb":default:return v.dayPeriod(w,{width:"wide",context:"formatting"})}},B:function(g,m,v){var b=g.getUTCHours(),w;switch(b>=17?w=u.evening:b>=12?w=u.afternoon:b>=4?w=u.morning:w=u.night,m){case"B":case"BB":case"BBB":return v.dayPeriod(w,{width:"abbreviated",context:"formatting"});case"BBBBB":return v.dayPeriod(w,{width:"narrow",context:"formatting"});case"BBBB":default:return v.dayPeriod(w,{width:"wide",context:"formatting"})}},h:function(g,m,v){if(m==="ho"){var b=g.getUTCHours()%12;return b===0&&(b=12),v.ordinalNumber(b,{unit:"hour"})}return c.default.h(g,m)},H:function(g,m,v){return m==="Ho"?v.ordinalNumber(g.getUTCHours(),{unit:"hour"}):c.default.H(g,m)},K:function(g,m,v){var b=g.getUTCHours()%12;return m==="Ko"?v.ordinalNumber(b,{unit:"hour"}):(0,l.default)(b,m.length)},k:function(g,m,v){var b=g.getUTCHours();return b===0&&(b=24),m==="ko"?v.ordinalNumber(b,{unit:"hour"}):(0,l.default)(b,m.length)},m:function(g,m,v){return m==="mo"?v.ordinalNumber(g.getUTCMinutes(),{unit:"minute"}):c.default.m(g,m)},s:function(g,m,v){return m==="so"?v.ordinalNumber(g.getUTCSeconds(),{unit:"second"}):c.default.s(g,m)},S:function(g,m){return c.default.S(g,m)},X:function(g,m,v,b){var w=b._originalDate||g,T=w.getTimezoneOffset();if(T===0)return"Z";switch(m){case"X":return p(T);case"XXXX":case"XX":return y(T);case"XXXXX":case"XXX":default:return y(T,":")}},x:function(g,m,v,b){var w=b._originalDate||g,T=w.getTimezoneOffset();switch(m){case"x":return p(T);case"xxxx":case"xx":return y(T);case"xxxxx":case"xxx":default:return y(T,":")}},O:function(g,m,v,b){var w=b._originalDate||g,T=w.getTimezoneOffset();switch(m){case"O":case"OO":case"OOO":return"GMT"+f(T,":");case"OOOO":default:return"GMT"+y(T,":")}},z:function(g,m,v,b){var w=b._originalDate||g,T=w.getTimezoneOffset();switch(m){case"z":case"zz":case"zzz":return"GMT"+f(T,":");case"zzzz":default:return"GMT"+y(T,":")}},t:function(g,m,v,b){var w=b._originalDate||g,T=Math.floor(w.getTime()/1e3);return(0,l.default)(T,m.length)},T:function(g,m,v,b){var w=b._originalDate||g,T=w.getTime();return(0,l.default)(T,m.length)}};function f(g,m){var v=g>0?"-":"+",b=Math.abs(g),w=Math.floor(b/60),T=b%60;if(T===0)return v+String(w);var M=m||"";return v+String(w)+M+(0,l.default)(T,2)}function p(g,m){if(g%60===0){var v=g>0?"-":"+";return v+(0,l.default)(Math.abs(g)/60,2)}return y(g,m)}function y(g,m){var v=m||"",b=g>0?"-":"+",w=Math.abs(g),T=(0,l.default)(Math.floor(w/60),2),M=(0,l.default)(w%60,2);return b+T+v+M}var x=d;t.default=x,n.exports=t.default})(ul,ul.exports);var uC=ul.exports,Sl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=function(o,l){switch(o){case"P":return l.date({width:"short"});case"PP":return l.date({width:"medium"});case"PPP":return l.date({width:"long"});case"PPPP":default:return l.date({width:"full"})}},r=function(o,l){switch(o){case"p":return l.time({width:"short"});case"pp":return l.time({width:"medium"});case"ppp":return l.time({width:"long"});case"pppp":default:return l.time({width:"full"})}},i=function(o,l){var c=o.match(/(P+)(p+)?/)||[],u=c[1],d=c[2];if(!d)return e(o,l);var f;switch(u){case"P":f=l.dateTime({width:"short"});break;case"PP":f=l.dateTime({width:"medium"});break;case"PPP":f=l.dateTime({width:"long"});break;case"PPPP":default:f=l.dateTime({width:"full"});break}return f.replace("{{date}}",e(u,l)).replace("{{time}}",r(d,l))},a={p:r,P:i},s=a;t.default=s,n.exports=t.default})(Sl,Sl.exports);var dC=Sl.exports,Cl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){var i=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return i.setUTCFullYear(r.getFullYear()),r.getTime()-i.getTime()}n.exports=t.default})(Cl,Cl.exports);var zh=Cl.exports;const Yh=nl(zh);var ui={};Object.defineProperty(ui,"__esModule",{value:!0}),ui.isProtectedDayOfYearToken=pC,ui.isProtectedWeekYearToken=gC,ui.throwProtectedError=mC;var fC=["D","DD"],hC=["YY","YYYY"];function pC(n){return fC.indexOf(n)!==-1}function gC(n){return hC.indexOf(n)!==-1}function mC(n,t,e){if(n==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Ml={exports:{}},Dl={exports:{}},kl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},r=function(a,s,o){var l,c=e[a];return typeof c=="string"?l=c:s===1?l=c.one:l=c.other.replace("{{count}}",s.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+l:l+" ago":l},i=r;t.default=i,n.exports=t.default})(kl,kl.exports);var yC=kl.exports,Ol={exports:{}},Pl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){return function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=i.width?String(i.width):r.defaultWidth,s=r.formats[a]||r.formats[r.defaultWidth];return s}}n.exports=t.default})(Pl,Pl.exports);var vC=Pl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(vC),i={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},a={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},s={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},o={date:(0,r.default)({formats:i,defaultWidth:"full"}),time:(0,r.default)({formats:a,defaultWidth:"full"}),dateTime:(0,r.default)({formats:s,defaultWidth:"full"})},l=o;t.default=l,n.exports=t.default})(Ol,Ol.exports);var bC=Ol.exports,El={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},r=function(a,s,o,l){return e[a]},i=r;t.default=i,n.exports=t.default})(El,El.exports);var xC=El.exports,Rl={exports:{}},Al={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){return function(i,a){var s=a!=null&&a.context?String(a.context):"standalone",o;if(s==="formatting"&&r.formattingValues){var l=r.defaultFormattingWidth||r.defaultWidth,c=a!=null&&a.width?String(a.width):l;o=r.formattingValues[c]||r.formattingValues[l]}else{var u=r.defaultWidth,d=a!=null&&a.width?String(a.width):r.defaultWidth;o=r.values[d]||r.values[u]}var f=r.argumentCallback?r.argumentCallback(i):i;return o[f]}}n.exports=t.default})(Al,Al.exports);var _C=Al.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(_C),i={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},a={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},s={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},o={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},l={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},c={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},u=function(p,y){var x=Number(p),g=x%100;if(g>20||g<10)switch(g%10){case 1:return x+"st";case 2:return x+"nd";case 3:return x+"rd"}return x+"th"},d={ordinalNumber:u,era:(0,r.default)({values:i,defaultWidth:"wide"}),quarter:(0,r.default)({values:a,defaultWidth:"wide",argumentCallback:function(p){return p-1}}),month:(0,r.default)({values:s,defaultWidth:"wide"}),day:(0,r.default)({values:o,defaultWidth:"wide"}),dayPeriod:(0,r.default)({values:l,defaultWidth:"wide",formattingValues:c,defaultFormattingWidth:"wide"})},f=d;t.default=f,n.exports=t.default})(Rl,Rl.exports);var wC=Rl.exports,Ll={exports:{}},Il={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(a){return function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=o.width,c=l&&a.matchPatterns[l]||a.matchPatterns[a.defaultMatchWidth],u=s.match(c);if(!u)return null;var d=u[0],f=l&&a.parsePatterns[l]||a.parsePatterns[a.defaultParseWidth],p=Array.isArray(f)?i(f,function(g){return g.test(d)}):r(f,function(g){return g.test(d)}),y;y=a.valueCallback?a.valueCallback(p):p,y=o.valueCallback?o.valueCallback(y):y;var x=s.slice(d.length);return{value:y,rest:x}}}function r(a,s){for(var o in a)if(a.hasOwnProperty(o)&&s(a[o]))return o}function i(a,s){for(var o=0;o<a.length;o++)if(s(a[o]))return o}n.exports=t.default})(Il,Il.exports);var TC=Il.exports,Nl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){return function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=i.match(r.matchPattern);if(!s)return null;var o=s[0],l=i.match(r.parsePattern);if(!l)return null;var c=r.valueCallback?r.valueCallback(l[0]):l[0];c=a.valueCallback?a.valueCallback(c):c;var u=i.slice(o.length);return{value:c,rest:u}}}n.exports=t.default})(Nl,Nl.exports);var SC=Nl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(TC),i=e(SC),a=/^(\d+)(th|st|nd|rd)?/i,s=/\d+/i,o={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},l={any:[/^b/i,/^(a|c)/i]},c={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},u={any:[/1/i,/2/i,/3/i,/4/i]},d={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},f={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},p={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},y={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},x={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},g={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},m={ordinalNumber:(0,i.default)({matchPattern:a,parsePattern:s,valueCallback:function(b){return parseInt(b,10)}}),era:(0,r.default)({matchPatterns:o,defaultMatchWidth:"wide",parsePatterns:l,defaultParseWidth:"any"}),quarter:(0,r.default)({matchPatterns:c,defaultMatchWidth:"wide",parsePatterns:u,defaultParseWidth:"any",valueCallback:function(b){return b+1}}),month:(0,r.default)({matchPatterns:d,defaultMatchWidth:"wide",parsePatterns:f,defaultParseWidth:"any"}),day:(0,r.default)({matchPatterns:p,defaultMatchWidth:"wide",parsePatterns:y,defaultParseWidth:"any"}),dayPeriod:(0,r.default)({matchPatterns:x,defaultMatchWidth:"any",parsePatterns:g,defaultParseWidth:"any"})},v=m;t.default=v,n.exports=t.default})(Ll,Ll.exports);var CC=Ll.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(yC),i=e(bC),a=e(xC),s=e(wC),o=e(CC),l={code:"en-US",formatDistance:r.default,formatLong:i.default,formatRelative:a.default,localize:s.default,match:o.default,options:{weekStartsOn:0,firstWeekContainsDate:1}},c=l;t.default=c,n.exports=t.default})(Dl,Dl.exports);var MC=Dl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(MC),i=r.default;t.default=i,n.exports=t.default})(Ml,Ml.exports);var DC=Ml.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=b;var r=e(ZS),i=e(eC),a=e(Ye),s=e(uC),o=e(dC),l=e(zh),c=ui,u=e(jn),d=e(oe),f=Vn,p=e(DC),y=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,x=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,g=/^'([^]*?)'?$/,m=/''/g,v=/[a-zA-Z]/;function b(T,M,k){var S,C,O,P,E,F,q,$,Y,I,it,B,yt,ut,z,L,U,j;(0,d.default)(2,arguments);var Z=String(M),K=(0,f.getDefaultOptions)(),N=(S=(C=k==null?void 0:k.locale)!==null&&C!==void 0?C:K.locale)!==null&&S!==void 0?S:p.default,A=(0,u.default)((O=(P=(E=(F=k==null?void 0:k.firstWeekContainsDate)!==null&&F!==void 0?F:k==null||(q=k.locale)===null||q===void 0||($=q.options)===null||$===void 0?void 0:$.firstWeekContainsDate)!==null&&E!==void 0?E:K.firstWeekContainsDate)!==null&&P!==void 0?P:(Y=K.locale)===null||Y===void 0||(I=Y.options)===null||I===void 0?void 0:I.firstWeekContainsDate)!==null&&O!==void 0?O:1);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Q=(0,u.default)((it=(B=(yt=(ut=k==null?void 0:k.weekStartsOn)!==null&&ut!==void 0?ut:k==null||(z=k.locale)===null||z===void 0||(L=z.options)===null||L===void 0?void 0:L.weekStartsOn)!==null&&yt!==void 0?yt:K.weekStartsOn)!==null&&B!==void 0?B:(U=K.locale)===null||U===void 0||(j=U.options)===null||j===void 0?void 0:j.weekStartsOn)!==null&&it!==void 0?it:0);if(!(Q>=0&&Q<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!N.localize)throw new RangeError("locale must contain localize property");if(!N.formatLong)throw new RangeError("locale must contain formatLong property");var X=(0,a.default)(T);if(!(0,r.default)(X))throw new RangeError("Invalid time value");var vt=(0,l.default)(X),ct=(0,i.default)(X,vt),Ot={firstWeekContainsDate:A,weekStartsOn:Q,locale:N,_originalDate:X},_t=Z.match(x).map(function(et){var bt=et[0];if(bt==="p"||bt==="P"){var Nt=o.default[bt];return Nt(et,N.formatLong)}return et}).join("").match(y).map(function(et){if(et==="''")return"'";var bt=et[0];if(bt==="'")return w(et);var Nt=s.default[bt];if(Nt)return!(k!=null&&k.useAdditionalWeekYearTokens)&&(0,c.isProtectedWeekYearToken)(et)&&(0,c.throwProtectedError)(et,M,String(T)),!(k!=null&&k.useAdditionalDayOfYearTokens)&&(0,c.isProtectedDayOfYearToken)(et)&&(0,c.throwProtectedError)(et,M,String(T)),Nt(ct,et,N.localize,Ot);if(bt.match(v))throw new RangeError("Format string contains an unescaped latin alphabet character `"+bt+"`");return et}).join("");return _t}function w(T){var M=T.match(g);return M?M[1].replace(m,"'"):T}n.exports=t.default})(Ah,Ah.exports);function kC(n,t){var e=RC(t);return e.formatToParts?PC(e,n):EC(e,n)}var OC={year:0,month:1,day:2,hour:3,minute:4,second:5};function PC(n,t){try{for(var e=n.formatToParts(t),r=[],i=0;i<e.length;i++){var a=OC[e[i].type];a>=0&&(r[a]=parseInt(e[i].value,10))}return r}catch(s){if(s instanceof RangeError)return[NaN];throw s}}function EC(n,t){var e=n.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e);return[r[3],r[1],r[2],r[4],r[5],r[6]]}var Fl={};function RC(n){if(!Fl[n]){var t=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),e=t==="06/25/2014, 00:00:00"||t==="06/25/2014 00:00:00";Fl[n]=e?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return Fl[n]}function Ul(n,t,e,r,i,a,s){var o=new Date(0);return o.setUTCFullYear(n,t,e),o.setUTCHours(r,i,a,s),o}var Hh=36e5,AC=6e4,Bl={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function ba(n,t,e){var r,i;if(!n||(r=Bl.timezoneZ.exec(n),r))return 0;var a;if(r=Bl.timezoneHH.exec(n),r)return a=parseInt(r[1],10),$h(a)?-(a*Hh):NaN;if(r=Bl.timezoneHHMM.exec(n),r){a=parseInt(r[2],10);var s=parseInt(r[3],10);return $h(a,s)?(i=Math.abs(a)*Hh+s*AC,r[1]==="+"?-i:i):NaN}if(NC(n)){t=new Date(t||Date.now());var o=e?t:LC(t),l=Wl(o,n),c=e?l:IC(t,l,n);return-c}return NaN}function LC(n){return Ul(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function Wl(n,t){var e=kC(n,t),r=Ul(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime(),i=n.getTime(),a=i%1e3;return i-=a>=0?a:1e3+a,r-i}function IC(n,t,e){var r=n.getTime(),i=r-t,a=Wl(new Date(i),e);if(t===a)return t;i-=a-t;var s=Wl(new Date(i),e);return a===s?a:Math.max(a,s)}function $h(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}var jh={};function NC(n){if(jh[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),jh[n]=!0,!0}catch{return!1}}var FC=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/;const Vh=FC;var zl=36e5,qh=6e4,UC=2,le={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:Vh};function Yl(n,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(n===null)return new Date(NaN);var e=t||{},r=e.additionalDigits==null?UC:JS(e.additionalDigits);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]")return new Date(n.getTime());if(typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]")return new Date(n);if(!(typeof n=="string"||Object.prototype.toString.call(n)==="[object String]"))return new Date(NaN);var i=BC(n),a=WC(i.date,r),s=a.year,o=a.restDateString,l=zC(o,s);if(isNaN(l))return new Date(NaN);if(l){var c=l.getTime(),u=0,d;if(i.time&&(u=YC(i.time),isNaN(u)))return new Date(NaN);if(i.timeZone||e.timeZone){if(d=ba(i.timeZone||e.timeZone,new Date(c+u)),isNaN(d))return new Date(NaN)}else d=Yh(new Date(c+u)),d=Yh(new Date(c+u+d));return new Date(c+u+d)}else return new Date(NaN)}function BC(n){var t={},e=le.dateTimePattern.exec(n),r;if(e?(t.date=e[1],r=e[3]):(e=le.datePattern.exec(n),e?(t.date=e[1],r=e[2]):(t.date=null,r=n)),r){var i=le.timeZone.exec(r);i?(t.time=r.replace(i[1],""),t.timeZone=i[1].trim()):t.time=r}return t}function WC(n,t){var e=le.YYY[t],r=le.YYYYY[t],i;if(i=le.YYYY.exec(n)||r.exec(n),i){var a=i[1];return{year:parseInt(a,10),restDateString:n.slice(a.length)}}if(i=le.YY.exec(n)||e.exec(n),i){var s=i[1];return{year:parseInt(s,10)*100,restDateString:n.slice(s.length)}}return{year:null}}function zC(n,t){if(t===null)return null;var e,r,i,a;if(n.length===0)return r=new Date(0),r.setUTCFullYear(t),r;if(e=le.MM.exec(n),e)return r=new Date(0),i=parseInt(e[1],10)-1,Kh(t,i)?(r.setUTCFullYear(t,i),r):new Date(NaN);if(e=le.DDD.exec(n),e){r=new Date(0);var s=parseInt(e[1],10);return jC(t,s)?(r.setUTCFullYear(t,0,s),r):new Date(NaN)}if(e=le.MMDD.exec(n),e){r=new Date(0),i=parseInt(e[1],10)-1;var o=parseInt(e[2],10);return Kh(t,i,o)?(r.setUTCFullYear(t,i,o),r):new Date(NaN)}if(e=le.Www.exec(n),e)return a=parseInt(e[1],10)-1,Qh(t,a)?Xh(t,a):new Date(NaN);if(e=le.WwwD.exec(n),e){a=parseInt(e[1],10)-1;var l=parseInt(e[2],10)-1;return Qh(t,a,l)?Xh(t,a,l):new Date(NaN)}return null}function YC(n){var t,e,r;if(t=le.HH.exec(n),t)return e=parseFloat(t[1].replace(",",".")),Hl(e)?e%24*zl:NaN;if(t=le.HHMM.exec(n),t)return e=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")),Hl(e,r)?e%24*zl+r*qh:NaN;if(t=le.HHMMSS.exec(n),t){e=parseInt(t[1],10),r=parseInt(t[2],10);var i=parseFloat(t[3].replace(",","."));return Hl(e,r,i)?e%24*zl+r*qh+i*1e3:NaN}return null}function Xh(n,t,e){t=t||0,e=e||0;var r=new Date(0);r.setUTCFullYear(n,0,4);var i=r.getUTCDay()||7,a=t*7+e+1-i;return r.setUTCDate(r.getUTCDate()+a),r}var HC=[31,28,31,30,31,30,31,31,30,31,30,31],$C=[31,29,31,30,31,30,31,31,30,31,30,31];function Gh(n){return n%400===0||n%4===0&&n%100!==0}function Kh(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;var r=Gh(n);if(r&&e>$C[t]||!r&&e>HC[t])return!1}return!0}function jC(n,t){if(t<1)return!1;var e=Gh(n);return!(e&&t>366||!e&&t>365)}function Qh(n,t,e){return!(t<0||t>52||e!=null&&(e<0||e>6))}function Hl(n,t,e){return!(n!=null&&(n<0||n>=25)||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}var $l={exports:{}},jl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r,i){if(r==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a]);return r}n.exports=t.default})(jl,jl.exports);var VC=jl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=e(VC);function i(a){return(0,r.default)({},a)}n.exports=t.default})($l,$l.exports);var qC=$l.exports;const XC=nl(qC);function GC(n,t,e){var r=Yl(n,e),i=ba(t,r,!0),a=new Date(r.getTime()-i),s=new Date(0);return s.setFullYear(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()),s.setHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()),s}function KC(n,t){return-ba(n,t)}function QC(n,t,e){if(typeof n=="string"&&!n.match(Vh)){var r=XC(e);return r.timeZone=t,Yl(n,r)}var i=Yl(n,e),a=Ul(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()).getTime(),s=ba(t,new Date(a));return new Date(a+s)}const ZC={secondly:1e3,minutely:60*1e3,hourly:60*60*1e3,daily:60*60*24*1e3,weekly:60*60*24*7*1e3,trend:0};function Vl(n){return n&&FS.find(t=>n<=ZC[t])||null}const yr=(n,t)=>new Date(n.getTime()-KC(t,n));class Pe{constructor(t){We(this,"timeframeText"),We(this,"key"),We(this,"display"),We(this,"timeframeLength"),We(this,"allowedTiers"),We(this,"defaultResponseGranularity"),We(this,"dataGranularity"),We(this,"isRelative"),We(this,"_startCustom"),We(this,"_endCustom"),this.display=t.display,this.timeframeText=t.timeframeText,this.key=t.key,this.timeframeLength=t.timeframeLength,this.allowedTiers=t.allowedTiers,this.defaultResponseGranularity=t.defaultResponseGranularity,this.dataGranularity=t.dataGranularity,this.isRelative=t.isRelative,this._startCustom=t.startCustom,this._endCustom=t.endCustom}rawEnd(t){return this._endCustom||new Date}rawStart(t){return this._startCustom||new Date(this.rawEnd().getTime()-this.timeframeLengthMs())}timeframeLengthMs(){return this.timeframeLength()*1e3}maximumTimeframeLength(){return this.timeframeLength()}allowedGranularities(){const t=new Set,e=this.maximumTimeframeLength()/3600;return e<=6&&t.add("minutely"),e>=2&&e<=7*24&&t.add("hourly"),e>=2*24&&t.add("daily"),e>=2*24*14&&t.add("weekly"),t}cacheKey(){return this.key!=="custom"?this.key:`${this.rawStart().toISOString()}-${this.rawEnd().toISOString()}`}v4Query(t){return this.key==="custom"?{type:"absolute",start:this.rawStart(),end:this.rawEnd(),tz:t}:{type:"relative",time_range:this.key,tz:t}}tzAdjustedDate(t){if(!t)return new Date;const e=QC(new Date,new Intl.DateTimeFormat().resolvedOptions().timeZone);return GC(e,t)}}class JC extends Pe{rawStart(t){let e=va(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(e=yr(e,t)),e}maximumTimeframeLength(){return 60*60*24*7}}class tM extends Pe{rawStart(t){let e=mr(this.tzAdjustedDate(t));return t&&(e=yr(e,t)),e}maximumTimeframeLength(){return 60*60*24*31}}class eM extends Pe{rawEnd(t){let e=va(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(e=yr(e,t)),e}rawStart(t){const e=this.tzAdjustedDate(t);let r=va(e.setDate(e.getDate()-7),{weekStartsOn:1});return t&&(r=yr(r,t)),r}}class nM extends Pe{rawEnd(t){let e=mr(this.tzAdjustedDate(t));return t&&(e=yr(e,t)),e}rawStart(t){let e=mr(Rh(this.tzAdjustedDate(t),1));return t&&(e=yr(e,t)),e}}Yt.FIFTEEN_MIN,new Pe({key:Yt.FIFTEEN_MIN,display:"Last 15 minutes",timeframeText:"15 minutes",timeframeLength:()=>60*15,defaultResponseGranularity:"minutely",dataGranularity:"minutely",isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Yt.ONE_HOUR,new Pe({key:Yt.ONE_HOUR,display:"Last hour",timeframeText:"One hour",timeframeLength:()=>60*60*1,defaultResponseGranularity:"minutely",dataGranularity:"minutely",isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Yt.SIX_HOUR,new Pe({key:Yt.SIX_HOUR,display:"Last 6 hours",timeframeText:"6 hours",timeframeLength:()=>60*60*6,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Yt.TWELVE_HOUR,new Pe({key:Yt.TWELVE_HOUR,display:"Last 12 hours",timeframeText:"12 hours",timeframeLength:()=>60*60*12,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Yt.ONE_DAY,new Pe({key:Yt.ONE_DAY,display:"Last 24 hours",timeframeText:"24 hours",timeframeLength:()=>60*60*24,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Yt.SEVEN_DAY,new Pe({key:Yt.SEVEN_DAY,display:"Last 7 days",timeframeText:"7 days",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,allowedTiers:["trial","plus","enterprise"]}),Yt.THIRTY_DAY,new Pe({key:Yt.THIRTY_DAY,display:"Last 30 days",timeframeText:"30 days",timeframeLength:()=>60*60*24*30,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,allowedTiers:["trial","plus","enterprise"]}),Yt.CURRENT_WEEK,new JC({key:Yt.CURRENT_WEEK,display:"This week",timeframeText:"Week",timeframeLength:()=>{const n=va(new Date,{weekStartsOn:1});return(Eh(Ph(new Date,1)).getTime()-n.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]}),Yt.CURRENT_MONTH,new tM({key:Yt.CURRENT_MONTH,display:"This month",timeframeText:"Month",timeframeLength:()=>{const n=mr(new Date);return(Eh(Ph(new Date,1)).getTime()-n.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]}),Yt.PREVIOUS_WEEK,new eM({key:Yt.PREVIOUS_WEEK,display:"Previous week",timeframeText:"Week",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]}),Yt.PREVIOUS_MONTH,new nM({key:Yt.PREVIOUS_MONTH,display:"Previous month",timeframeText:"Month",timeframeLength:()=>{let n=0;const t=mr(new Date),e=mr(Rh(new Date,1));return t.getTimezoneOffset()!==e.getTimezoneOffset()&&(n=rM(t,e)),60*60*24*XS(new Date().setMonth(new Date().getMonth()-1))+GS(n)},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]});function rM(n,t){return KS(n.getTimezoneOffset()-t.getTimezoneOffset())}const Zh=(n,t,e,r)=>{n.save(),n.beginPath(),n.moveTo(t,e),n.lineTo(t,r),n.lineWidth=1,n.strokeStyle="#0275d8",n.stroke(),n.restore()},ql={id:"linePlugin",afterDatasetsDraw:function(n){if(n.tooltip&&n.tooltip.getActiveElements()&&n.tooltip.getActiveElements().length&&!this.clickedSegment){const{x:t}=n.tooltip.dataPoints[0].element,e=n.ctx;Zh(e,t,n.scales.y.top,n.scales.y.bottom)}if(this.clickedSegment){const{x:t}=this.clickedSegment.element,e=n.ctx;Zh(e,t,n.scales.y.top,n.scales.y.bottom)}},beforeDestroy(){delete this.clickedSegment}},iM=h.defineComponent({__name:"TimeSeriesChart",props:{chartData:{type:Object,required:!1,default:null},type:{type:String,required:!1,default:ee.TIMESERIES_LINE},fill:{type:Boolean,required:!1,default:!1},tooltipTitle:{type:String,required:!0},metricUnit:{type:String,required:!1,default:""},timeRangeMs:{type:Number,required:!1,default:void 0},granularity:{type:String,required:!0},stacked:{type:Boolean,required:!1,default:!0},legendValues:{type:Object,required:!1,default:null},metricAxesTitle:{type:String,required:!1,default:null},dimensionAxesTitle:{type:String,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},chartLegendSortFn:{type:Function,required:!1,default:(n,t)=>n.value&&t.value&&t.value.raw-n.value.raw},chartTooltipSortFn:{type:Function,required:!1,default:(n,t)=>t.rawValue-n.rawValue}},setup(n){const t=n,{translateUnit:e}=Mt.useTranslatedUnits(),r=h.ref(),i=h.ref(Tn()),a=h.ref(Tn()),s=h.ref([]),o=h.ref(),l=h.ref(h.inject("legendPosition",Wt.Right)),c=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:h.toRef(t,"metricUnit"),translateUnit:e,offsetX:0,offsetY:0,width:0,height:0,chartType:t.type,locked:!1,chartTooltipSortFn:t.chartTooltipSortFn}),u={id:i.value,afterUpdate(m){s.value=m.options.plugins.legend.labels.generateLabels(m).map(v=>({...v,value:t.legendValues&&t.legendValues[v.text]})).sort(t.chartLegendSortFn)}},d=h.computed(()=>[u,wh,...t.type===ee.TIMESERIES_LINE?[ql]:[]]),{options:f}=Mt.useLinechartOptions({tooltipState:c,timeRangeMs:h.toRef(t,"timeRangeMs"),granularity:h.toRef(t,"granularity"),legendID:i.value,stacked:h.toRef(t,"stacked"),metricAxesTitle:h.toRef(t,"metricAxesTitle"),dimensionAxesTitle:h.toRef(t,"dimensionAxesTitle")});Mt.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const p=m=>ia(m,{short:["daily","weekly"].includes(t.granularity)}),y=m=>({[Wt.Right]:"legend-row",[Wt.Bottom]:"column",[Wt.Hidden]:"hidden"})[m],x=({width:m,height:v})=>{c.width=m,c.height=v},g=()=>{var m,v,b;c.locked=!c.locked,r.value&&((v=(m=r.value.chart.tooltip)==null?void 0:m.dataPoints)!=null&&v.length)&&(ql.clickedSegment=c.locked?(b=r.value.chart.tooltip)==null?void 0:b.dataPoints[0]:void 0)};return h.watch(()=>t.type,()=>{c.locked=!1,c.showTooltip=!1,delete ql.clickedSegment}),(m,v)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",y(l.value)]),"data-testid":"line-chart-parent"},[h.createElementVNode("div",{class:"chart-container",onClick:v[0]||(v[0]=b=>g())},[n.type===h.unref(ee).TIMESERIES_LINE?(h.openBlock(),h.createBlock(h.unref(ES),{key:0,ref_key:"chartInstance",ref:r,"chart-id":a.value,data:n.chartData,"data-testid":"time-series-line-chart",options:h.unref(f),plugins:d.value},null,8,["chart-id","data","options","plugins"])):n.type===h.unref(ee).TIMESERIES_BAR?(h.openBlock(),h.createBlock(h.unref(PS),{key:1,ref_key:"chartInstance",ref:r,"chart-id":a.value,data:n.chartData,"data-testid":"time-series-bar-chart",options:h.unref(f),plugins:d.value},null,8,["chart-id","data","options","plugins"])):h.createCommentVNode("",!0)]),h.createVNode(Qo,{ref_key:"tooltipElement",ref:o,context:p(c.tooltipContext),"data-testid":"tooltip",left:c.left,locked:c.locked,series:c.tooltipSeries,"show-tooltip":c.showTooltip,"tooltip-title":n.tooltipTitle,top:c.top,unit:n.metricUnit,onDimensions:x,onLeft:v[1]||(v[1]=b=>c.left=b),onTop:v[2]||(v[2]=b=>c.top=b)},null,8,["context","left","locked","series","show-tooltip","tooltip-title","top","unit"]),h.createVNode(Zo,{id:i.value,"chart-instance":r.value,"data-testid":"legend",items:s.value},null,8,["id","chart-instance","items"])],2))}}),aM=Ze(iM,[["__scopeId","data-v-206a4c39"]]);var qn=(n=>(n.String="string",n.Number="number",n.Boolean="boolean",n.Object="object",n.Undefined="undefined",n))(qn||{}),xa={exports:{}};xa.exports,function(n,t){var e=200,r="Expected a function",i="__lodash_hash_undefined__",a=1,s=2,o=1/0,l=9007199254740991,c="[object Arguments]",u="[object Array]",d="[object Boolean]",f="[object Date]",p="[object Error]",y="[object Function]",x="[object GeneratorFunction]",g="[object Map]",m="[object Number]",v="[object Object]",b="[object Promise]",w="[object RegExp]",T="[object Set]",M="[object String]",k="[object Symbol]",S="[object WeakMap]",C="[object ArrayBuffer]",O="[object DataView]",P="[object Float32Array]",E="[object Float64Array]",F="[object Int8Array]",q="[object Int16Array]",$="[object Int32Array]",Y="[object Uint8Array]",I="[object Uint8ClampedArray]",it="[object Uint16Array]",B="[object Uint32Array]",yt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ut=/^\w*$/,z=/^\./,L=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,U=/[\\^$.*+?()[\]{}|]/g,j=/\\(\\)?/g,Z=/^\[object .+?Constructor\]$/,K=/^(?:0|[1-9]\d*)$/,N={};N[P]=N[E]=N[F]=N[q]=N[$]=N[Y]=N[I]=N[it]=N[B]=!0,N[c]=N[u]=N[C]=N[d]=N[O]=N[f]=N[p]=N[y]=N[g]=N[m]=N[v]=N[w]=N[T]=N[M]=N[S]=!1;var A=typeof ge=="object"&&ge&&ge.Object===Object&&ge,Q=typeof self=="object"&&self&&self.Object===Object&&self,X=A||Q||Function("return this")(),vt=t&&!t.nodeType&&t,ct=vt&&!0&&n&&!n.nodeType&&n,Ot=ct&&ct.exports===vt,_t=Ot&&A.process,et=function(){try{return _t&&_t.binding("util")}catch{}}(),bt=et&&et.isTypedArray;function Nt(_,D){for(var R=-1,W=_?_.length:0;++R<W;)if(D(_[R],R,_))return!0;return!1}function Ce(_){return function(D){return D==null?void 0:D[_]}}function Ee(_,D){for(var R=-1,W=Array(_);++R<_;)W[R]=D(R);return W}function me(_){return function(D){return _(D)}}function Lt(_,D){return _==null?void 0:_[D]}function Ft(_){var D=!1;if(_!=null&&typeof _.toString!="function")try{D=!!(_+"")}catch{}return D}function Je(_){var D=-1,R=Array(_.size);return _.forEach(function(W,ot){R[++D]=[ot,W]}),R}function Dt(_,D){return function(R){return _(D(R))}}function Cn(_){var D=-1,R=Array(_.size);return _.forEach(function(W){R[++D]=W}),R}var Re=Array.prototype,tn=Function.prototype,_e=Object.prototype,Me=X["__core-js_shared__"],Ae=function(){var _=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||"");return _?"Symbol(src)_1."+_:""}(),ce=tn.toString,ye=_e.hasOwnProperty,Kt=_e.toString,_a=RegExp("^"+ce.call(ye).replace(U,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vr=X.Symbol,up=X.Uint8Array,xD=_e.propertyIsEnumerable,_D=Re.splice,wD=Dt(Object.keys,Object),Kl=br(X,"DataView"),di=br(X,"Map"),Ql=br(X,"Promise"),Zl=br(X,"Set"),Jl=br(X,"WeakMap"),fi=br(Object,"create"),TD=Gn(Kl),SD=Gn(di),CD=Gn(Ql),MD=Gn(Zl),DD=Gn(Jl),wa=vr?vr.prototype:void 0,tc=wa?wa.valueOf:void 0,dp=wa?wa.toString:void 0;function Xn(_){var D=-1,R=_?_.length:0;for(this.clear();++D<R;){var W=_[D];this.set(W[0],W[1])}}function kD(){this.__data__=fi?fi(null):{}}function OD(_){return this.has(_)&&delete this.__data__[_]}function PD(_){var D=this.__data__;if(fi){var R=D[_];return R===i?void 0:R}return ye.call(D,_)?D[_]:void 0}function ED(_){var D=this.__data__;return fi?D[_]!==void 0:ye.call(D,_)}function RD(_,D){var R=this.__data__;return R[_]=fi&&D===void 0?i:D,this}Xn.prototype.clear=kD,Xn.prototype.delete=OD,Xn.prototype.get=PD,Xn.prototype.has=ED,Xn.prototype.set=RD;function en(_){var D=-1,R=_?_.length:0;for(this.clear();++D<R;){var W=_[D];this.set(W[0],W[1])}}function AD(){this.__data__=[]}function LD(_){var D=this.__data__,R=Sa(D,_);if(R<0)return!1;var W=D.length-1;return R==W?D.pop():_D.call(D,R,1),!0}function ID(_){var D=this.__data__,R=Sa(D,_);return R<0?void 0:D[R][1]}function ND(_){return Sa(this.__data__,_)>-1}function FD(_,D){var R=this.__data__,W=Sa(R,_);return W<0?R.push([_,D]):R[W][1]=D,this}en.prototype.clear=AD,en.prototype.delete=LD,en.prototype.get=ID,en.prototype.has=ND,en.prototype.set=FD;function nn(_){var D=-1,R=_?_.length:0;for(this.clear();++D<R;){var W=_[D];this.set(W[0],W[1])}}function UD(){this.__data__={hash:new Xn,map:new(di||en),string:new Xn}}function BD(_){return Ca(this,_).delete(_)}function WD(_){return Ca(this,_).get(_)}function zD(_){return Ca(this,_).has(_)}function YD(_,D){return Ca(this,_).set(_,D),this}nn.prototype.clear=UD,nn.prototype.delete=BD,nn.prototype.get=WD,nn.prototype.has=zD,nn.prototype.set=YD;function Ta(_){var D=-1,R=_?_.length:0;for(this.__data__=new nn;++D<R;)this.add(_[D])}function HD(_){return this.__data__.set(_,i),this}function $D(_){return this.__data__.has(_)}Ta.prototype.add=Ta.prototype.push=HD,Ta.prototype.has=$D;function rn(_){this.__data__=new en(_)}function jD(){this.__data__=new en}function VD(_){return this.__data__.delete(_)}function qD(_){return this.__data__.get(_)}function XD(_){return this.__data__.has(_)}function GD(_,D){var R=this.__data__;if(R instanceof en){var W=R.__data__;if(!di||W.length<e-1)return W.push([_,D]),this;R=this.__data__=new nn(W)}return R.set(_,D),this}rn.prototype.clear=jD,rn.prototype.delete=VD,rn.prototype.get=qD,rn.prototype.has=XD,rn.prototype.set=GD;function KD(_,D){var R=Kn(_)||bp(_)?Ee(_.length,String):[],W=R.length,ot=!!W;for(var tt in _)(D||ye.call(_,tt))&&!(ot&&(tt=="length"||gp(tt,W)))&&R.push(tt);return R}function Sa(_,D){for(var R=_.length;R--;)if(vp(_[R][0],D))return R;return-1}var QD=dk();function ZD(_,D){return _&&QD(_,D,Pa)}function fp(_,D){D=Ma(D,_)?[D]:hp(D);for(var R=0,W=D.length;_!=null&&R<W;)_=_[Da(D[R++])];return R&&R==W?_:void 0}function JD(_){return Kt.call(_)}function tk(_,D){return _!=null&&D in Object(_)}function ec(_,D,R,W,ot){return _===D?!0:_==null||D==null||!ka(_)&&!Oa(D)?_!==_&&D!==D:ek(_,D,ec,R,W,ot)}function ek(_,D,R,W,ot,tt){var wt=Kn(_),Pt=Kn(D),$t=u,Zt=u;wt||($t=Mn(_),$t=$t==c?v:$t),Pt||(Zt=Mn(D),Zt=Zt==c?v:Zt);var ue=$t==v&&!Ft(_),ve=Zt==v&&!Ft(D),Jt=$t==Zt;if(Jt&&!ue)return tt||(tt=new rn),wt||_k(_)?pp(_,D,R,W,ot,tt):fk(_,D,$t,R,W,ot,tt);if(!(ot&s)){var De=ue&&ye.call(_,"__wrapped__"),ke=ve&&ye.call(D,"__wrapped__");if(De||ke){var Dn=De?_.value():_,an=ke?D.value():D;return tt||(tt=new rn),R(Dn,an,W,ot,tt)}}return Jt?(tt||(tt=new rn),hk(_,D,R,W,ot,tt)):!1}function nk(_,D,R,W){var ot=R.length,tt=ot,wt=!W;if(_==null)return!tt;for(_=Object(_);ot--;){var Pt=R[ot];if(wt&&Pt[2]?Pt[1]!==_[Pt[0]]:!(Pt[0]in _))return!1}for(;++ot<tt;){Pt=R[ot];var $t=Pt[0],Zt=_[$t],ue=Pt[1];if(wt&&Pt[2]){if(Zt===void 0&&!($t in _))return!1}else{var ve=new rn;if(W)var Jt=W(Zt,ue,$t,_,D,ve);if(!(Jt===void 0?ec(ue,Zt,W,a|s,ve):Jt))return!1}}return!0}function rk(_){if(!ka(_)||yk(_))return!1;var D=_p(_)||Ft(_)?_a:Z;return D.test(Gn(_))}function ik(_){return Oa(_)&&rc(_.length)&&!!N[Kt.call(_)]}function ak(_){return typeof _=="function"?_:_==null?Mk:typeof _=="object"?Kn(_)?lk(_[0],_[1]):ok(_):Dk(_)}function sk(_){if(!vk(_))return wD(_);var D=[];for(var R in Object(_))ye.call(_,R)&&R!="constructor"&&D.push(R);return D}function ok(_){var D=pk(_);return D.length==1&&D[0][2]?yp(D[0][0],D[0][1]):function(R){return R===_||nk(R,_,D)}}function lk(_,D){return Ma(_)&&mp(D)?yp(Da(_),D):function(R){var W=Tk(R,_);return W===void 0&&W===D?Sk(R,_):ec(D,W,void 0,a|s)}}function ck(_){return function(D){return fp(D,_)}}function uk(_){if(typeof _=="string")return _;if(ic(_))return dp?dp.call(_):"";var D=_+"";return D=="0"&&1/_==-o?"-0":D}function hp(_){return Kn(_)?_:bk(_)}function dk(_){return function(D,R,W){for(var ot=-1,tt=Object(D),wt=W(D),Pt=wt.length;Pt--;){var $t=wt[_?Pt:++ot];if(R(tt[$t],$t,tt)===!1)break}return D}}function pp(_,D,R,W,ot,tt){var wt=ot&s,Pt=_.length,$t=D.length;if(Pt!=$t&&!(wt&&$t>Pt))return!1;var Zt=tt.get(_);if(Zt&&tt.get(D))return Zt==D;var ue=-1,ve=!0,Jt=ot&a?new Ta:void 0;for(tt.set(_,D),tt.set(D,_);++ue<Pt;){var De=_[ue],ke=D[ue];if(W)var Dn=wt?W(ke,De,ue,D,_,tt):W(De,ke,ue,_,D,tt);if(Dn!==void 0){if(Dn)continue;ve=!1;break}if(Jt){if(!Nt(D,function(an,Qn){if(!Jt.has(Qn)&&(De===an||R(De,an,W,ot,tt)))return Jt.add(Qn)})){ve=!1;break}}else if(!(De===ke||R(De,ke,W,ot,tt))){ve=!1;break}}return tt.delete(_),tt.delete(D),ve}function fk(_,D,R,W,ot,tt,wt){switch(R){case O:if(_.byteLength!=D.byteLength||_.byteOffset!=D.byteOffset)return!1;_=_.buffer,D=D.buffer;case C:return!(_.byteLength!=D.byteLength||!W(new up(_),new up(D)));case d:case f:case m:return vp(+_,+D);case p:return _.name==D.name&&_.message==D.message;case w:case M:return _==D+"";case g:var Pt=Je;case T:var $t=tt&s;if(Pt||(Pt=Cn),_.size!=D.size&&!$t)return!1;var Zt=wt.get(_);if(Zt)return Zt==D;tt|=a,wt.set(_,D);var ue=pp(Pt(_),Pt(D),W,ot,tt,wt);return wt.delete(_),ue;case k:if(tc)return tc.call(_)==tc.call(D)}return!1}function hk(_,D,R,W,ot,tt){var wt=ot&s,Pt=Pa(_),$t=Pt.length,Zt=Pa(D),ue=Zt.length;if($t!=ue&&!wt)return!1;for(var ve=$t;ve--;){var Jt=Pt[ve];if(!(wt?Jt in D:ye.call(D,Jt)))return!1}var De=tt.get(_);if(De&&tt.get(D))return De==D;var ke=!0;tt.set(_,D),tt.set(D,_);for(var Dn=wt;++ve<$t;){Jt=Pt[ve];var an=_[Jt],Qn=D[Jt];if(W)var wp=wt?W(Qn,an,Jt,D,_,tt):W(an,Qn,Jt,_,D,tt);if(!(wp===void 0?an===Qn||R(an,Qn,W,ot,tt):wp)){ke=!1;break}Dn||(Dn=Jt=="constructor")}if(ke&&!Dn){var Ea=_.constructor,Ra=D.constructor;Ea!=Ra&&"constructor"in _&&"constructor"in D&&!(typeof Ea=="function"&&Ea instanceof Ea&&typeof Ra=="function"&&Ra instanceof Ra)&&(ke=!1)}return tt.delete(_),tt.delete(D),ke}function Ca(_,D){var R=_.__data__;return mk(D)?R[typeof D=="string"?"string":"hash"]:R.map}function pk(_){for(var D=Pa(_),R=D.length;R--;){var W=D[R],ot=_[W];D[R]=[W,ot,mp(ot)]}return D}function br(_,D){var R=Lt(_,D);return rk(R)?R:void 0}var Mn=JD;(Kl&&Mn(new Kl(new ArrayBuffer(1)))!=O||di&&Mn(new di)!=g||Ql&&Mn(Ql.resolve())!=b||Zl&&Mn(new Zl)!=T||Jl&&Mn(new Jl)!=S)&&(Mn=function(_){var D=Kt.call(_),R=D==v?_.constructor:void 0,W=R?Gn(R):void 0;if(W)switch(W){case TD:return O;case SD:return g;case CD:return b;case MD:return T;case DD:return S}return D});function gk(_,D,R){D=Ma(D,_)?[D]:hp(D);for(var W,ot=-1,wt=D.length;++ot<wt;){var tt=Da(D[ot]);if(!(W=_!=null&&R(_,tt)))break;_=_[tt]}if(W)return W;var wt=_?_.length:0;return!!wt&&rc(wt)&&gp(tt,wt)&&(Kn(_)||bp(_))}function gp(_,D){return D=D??l,!!D&&(typeof _=="number"||K.test(_))&&_>-1&&_%1==0&&_<D}function Ma(_,D){if(Kn(_))return!1;var R=typeof _;return R=="number"||R=="symbol"||R=="boolean"||_==null||ic(_)?!0:ut.test(_)||!yt.test(_)||D!=null&&_ in Object(D)}function mk(_){var D=typeof _;return D=="string"||D=="number"||D=="symbol"||D=="boolean"?_!=="__proto__":_===null}function yk(_){return!!Ae&&Ae in _}function vk(_){var D=_&&_.constructor,R=typeof D=="function"&&D.prototype||_e;return _===R}function mp(_){return _===_&&!ka(_)}function yp(_,D){return function(R){return R==null?!1:R[_]===D&&(D!==void 0||_ in Object(R))}}var bk=nc(function(_){_=wk(_);var D=[];return z.test(_)&&D.push(""),_.replace(L,function(R,W,ot,tt){D.push(ot?tt.replace(j,"$1"):W||R)}),D});function Da(_){if(typeof _=="string"||ic(_))return _;var D=_+"";return D=="0"&&1/_==-o?"-0":D}function Gn(_){if(_!=null){try{return ce.call(_)}catch{}try{return _+""}catch{}}return""}function nc(_,D){if(typeof _!="function"||D&&typeof D!="function")throw new TypeError(r);var R=function(){var W=arguments,ot=D?D.apply(this,W):W[0],tt=R.cache;if(tt.has(ot))return tt.get(ot);var wt=_.apply(this,W);return R.cache=tt.set(ot,wt),wt};return R.cache=new(nc.Cache||nn),R}nc.Cache=nn;function vp(_,D){return _===D||_!==_&&D!==D}function bp(_){return xk(_)&&ye.call(_,"callee")&&(!xD.call(_,"callee")||Kt.call(_)==c)}var Kn=Array.isArray;function xp(_){return _!=null&&rc(_.length)&&!_p(_)}function xk(_){return Oa(_)&&xp(_)}function _p(_){var D=ka(_)?Kt.call(_):"";return D==y||D==x}function rc(_){return typeof _=="number"&&_>-1&&_%1==0&&_<=l}function ka(_){var D=typeof _;return!!_&&(D=="object"||D=="function")}function Oa(_){return!!_&&typeof _=="object"}function ic(_){return typeof _=="symbol"||Oa(_)&&Kt.call(_)==k}var _k=bt?me(bt):ik;function wk(_){return _==null?"":uk(_)}function Tk(_,D,R){var W=_==null?void 0:fp(_,D);return W===void 0?R:W}function Sk(_,D){return _!=null&&gk(_,D,tk)}function Pa(_){return xp(_)?KD(_):sk(_)}function Ck(_,D){var R={};return D=ak(D),ZD(_,function(W,ot,tt){R[D(W,ot,tt)]=W}),R}function Mk(_){return _}function Dk(_){return Ma(_)?Ce(Da(_)):ck(_)}n.exports=Ck}(xa,xa.exports);var sM=xa.exports;const oM=Bn(sM);var lM=1/0,cM=9007199254740991,uM="[object Arguments]",dM="[object Function]",fM="[object GeneratorFunction]",hM="[object Symbol]",pM=typeof ge=="object"&&ge&&ge.Object===Object&&ge,gM=typeof self=="object"&&self&&self.Object===Object&&self,mM=pM||gM||Function("return this")();function yM(n,t,e){switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2])}return n.apply(t,e)}function vM(n,t){for(var e=-1,r=n?n.length:0,i=Array(r);++e<r;)i[e]=t(n[e],e,n);return i}function bM(n,t){for(var e=-1,r=t.length,i=n.length;++e<r;)n[i+e]=t[e];return n}var Xl=Object.prototype,xM=Xl.hasOwnProperty,Gl=Xl.toString,Jh=mM.Symbol,_M=Xl.propertyIsEnumerable,tp=Jh?Jh.isConcatSpreadable:void 0,ep=Math.max;function np(n,t,e,r,i){var a=-1,s=n.length;for(e||(e=CM),i||(i=[]);++a<s;){var o=n[a];t>0&&e(o)?t>1?np(o,t-1,e,r,i):bM(i,o):r||(i[i.length]=o)}return i}function wM(n,t){return n=Object(n),TM(n,t,function(e,r){return r in n})}function TM(n,t,e){for(var r=-1,i=t.length,a={};++r<i;){var s=t[r],o=n[s];e(o,s)&&(a[s]=o)}return a}function SM(n,t){return t=ep(t===void 0?n.length-1:t,0),function(){for(var e=arguments,r=-1,i=ep(e.length-t,0),a=Array(i);++r<i;)a[r]=e[t+r];r=-1;for(var s=Array(t+1);++r<t;)s[r]=e[r];return s[t]=a,yM(n,this,s)}}function CM(n){return kM(n)||DM(n)||!!(tp&&n&&n[tp])}function MM(n){if(typeof n=="string"||LM(n))return n;var t=n+"";return t=="0"&&1/n==-lM?"-0":t}function DM(n){return PM(n)&&xM.call(n,"callee")&&(!_M.call(n,"callee")||Gl.call(n)==uM)}var kM=Array.isArray;function OM(n){return n!=null&&RM(n.length)&&!EM(n)}function PM(n){return rp(n)&&OM(n)}function EM(n){var t=AM(n)?Gl.call(n):"";return t==dM||t==fM}function RM(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=cM}function AM(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function rp(n){return!!n&&typeof n=="object"}function LM(n){return typeof n=="symbol"||rp(n)&&Gl.call(n)==hM}var IM=SM(function(n,t){return n==null?{}:wM(n,vM(np(t,1),MM))}),NM=IM;const FM=Bn(NM);var ip={exports:{}};(function(n,t){(function(e,r){r()})(ge,function(){function e(c,u){return typeof u>"u"?u={autoBom:!1}:typeof u!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}function r(c,u,d){var f=new XMLHttpRequest;f.open("GET",c),f.responseType="blob",f.onload=function(){l(f.response,u,d)},f.onerror=function(){console.error("could not download file")},f.send()}function i(c){var u=new XMLHttpRequest;u.open("HEAD",c,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function a(c){try{c.dispatchEvent(new MouseEvent("click"))}catch{var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),c.dispatchEvent(u)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof ge=="object"&&ge.global===ge?ge:void 0,o=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(c,u,d){var f=s.URL||s.webkitURL,p=document.createElement("a");u=u||c.name||"download",p.download=u,p.rel="noopener",typeof c=="string"?(p.href=c,p.origin===location.origin?a(p):i(p.href)?r(c,u,d):a(p,p.target="_blank")):(p.href=f.createObjectURL(c),setTimeout(function(){f.revokeObjectURL(p.href)},4e4),setTimeout(function(){a(p)},0))}:"msSaveOrOpenBlob"in navigator?function(c,u,d){if(u=u||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(e(c,d),u);else if(i(c))r(c,u,d);else{var f=document.createElement("a");f.href=c,f.target="_blank",setTimeout(function(){a(f)})}}:function(c,u,d,f){if(f=f||open("","_blank"),f&&(f.document.title=f.document.body.innerText="downloading..."),typeof c=="string")return r(c,u,d);var p=c.type==="application/octet-stream",y=/constructor/i.test(s.HTMLElement)||s.safari,x=/CriOS\/[\d]+/.test(navigator.userAgent);if((x||p&&y||o)&&typeof FileReader<"u"){var g=new FileReader;g.onloadend=function(){var b=g.result;b=x?b:b.replace(/^data:[^;]*;/,"data:attachment/file;"),f?f.location.href=b:location=b,f=null},g.readAsDataURL(c)}else{var m=s.URL||s.webkitURL,v=m.createObjectURL(c);f?f.location=v:location.href=v,f=null,setTimeout(function(){m.revokeObjectURL(v)},4e4)}});s.saveAs=l.saveAs=l,n.exports=l})})(ip);var UM=ip.exports,ap={exports:{}};/* @license
|
|
30
30
|
Papa Parse
|
|
31
31
|
v5.4.1
|
|
32
32
|
https://github.com/mholt/PapaParse
|
|
33
33
|
License: MIT
|
|
34
|
-
*/(function(n,t){(function(e,
|
|
35
|
-
`,q='"',$=q+q,Y=!1,I=null,
|
|
36
|
-
`,'"',l.BYTE_ORDER_MARK],l.WORKERS_SUPPORTED=!r
|
|
34
|
+
*/(function(n,t){(function(e,r){n.exports=r()})(ge,function e(){var r=typeof self<"u"?self:typeof window<"u"?window:r!==void 0?r:{},i=!r.document&&!!r.postMessage,a=r.IS_PAPA_WORKER||!1,s={},o=0,l={parse:function(S,C){var O=(C=C||{}).dynamicTyping||!1;if(k(O)&&(C.dynamicTypingFunction=O,O={}),C.dynamicTyping=O,C.transform=!!k(C.transform)&&C.transform,C.worker&&l.WORKERS_SUPPORTED){var P=function(){if(!l.WORKERS_SUPPORTED)return!1;var F=($=r.URL||r.webkitURL||null,Y=e.toString(),l.BLOB_URL||(l.BLOB_URL=$.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",Y,")();"],{type:"text/javascript"})))),q=new r.Worker(F),$,Y;return q.onmessage=v,q.id=o++,s[q.id]=q}();return P.userStep=C.step,P.userChunk=C.chunk,P.userComplete=C.complete,P.userError=C.error,C.step=k(C.step),C.chunk=k(C.chunk),C.complete=k(C.complete),C.error=k(C.error),delete C.worker,void P.postMessage({input:S,config:C,workerId:P.id})}var E=null;return l.NODE_STREAM_INPUT,typeof S=="string"?(S=function(F){return F.charCodeAt(0)===65279?F.slice(1):F}(S),E=C.download?new d(C):new p(C)):S.readable===!0&&k(S.read)&&k(S.on)?E=new y(C):(r.File&&S instanceof File||S instanceof Object)&&(E=new f(C)),E.stream(S)},unparse:function(S,C){var O=!1,P=!0,E=",",F=`\r
|
|
35
|
+
`,q='"',$=q+q,Y=!1,I=null,it=!1;(function(){if(typeof C=="object"){if(typeof C.delimiter!="string"||l.BAD_DELIMITERS.filter(function(z){return C.delimiter.indexOf(z)!==-1}).length||(E=C.delimiter),(typeof C.quotes=="boolean"||typeof C.quotes=="function"||Array.isArray(C.quotes))&&(O=C.quotes),typeof C.skipEmptyLines!="boolean"&&typeof C.skipEmptyLines!="string"||(Y=C.skipEmptyLines),typeof C.newline=="string"&&(F=C.newline),typeof C.quoteChar=="string"&&(q=C.quoteChar),typeof C.header=="boolean"&&(P=C.header),Array.isArray(C.columns)){if(C.columns.length===0)throw new Error("Option columns is empty");I=C.columns}C.escapeChar!==void 0&&($=C.escapeChar+q),(typeof C.escapeFormulae=="boolean"||C.escapeFormulae instanceof RegExp)&&(it=C.escapeFormulae instanceof RegExp?C.escapeFormulae:/^[=+\-@\t\r].*$/)}})();var B=new RegExp(g(q),"g");if(typeof S=="string"&&(S=JSON.parse(S)),Array.isArray(S)){if(!S.length||Array.isArray(S[0]))return yt(null,S,Y);if(typeof S[0]=="object")return yt(I||Object.keys(S[0]),S,Y)}else if(typeof S=="object")return typeof S.data=="string"&&(S.data=JSON.parse(S.data)),Array.isArray(S.data)&&(S.fields||(S.fields=S.meta&&S.meta.fields||I),S.fields||(S.fields=Array.isArray(S.data[0])?S.fields:typeof S.data[0]=="object"?Object.keys(S.data[0]):[]),Array.isArray(S.data[0])||typeof S.data[0]=="object"||(S.data=[S.data])),yt(S.fields||[],S.data||[],Y);throw new Error("Unable to serialize unrecognized input");function yt(z,L,U){var j="";typeof z=="string"&&(z=JSON.parse(z)),typeof L=="string"&&(L=JSON.parse(L));var Z=Array.isArray(z)&&0<z.length,K=!Array.isArray(L[0]);if(Z&&P){for(var N=0;N<z.length;N++)0<N&&(j+=E),j+=ut(z[N],N);0<L.length&&(j+=F)}for(var A=0;A<L.length;A++){var Q=Z?z.length:L[A].length,X=!1,vt=Z?Object.keys(L[A]).length===0:L[A].length===0;if(U&&!Z&&(X=U==="greedy"?L[A].join("").trim()==="":L[A].length===1&&L[A][0].length===0),U==="greedy"&&Z){for(var ct=[],Ot=0;Ot<Q;Ot++){var _t=K?z[Ot]:Ot;ct.push(L[A][_t])}X=ct.join("").trim()===""}if(!X){for(var et=0;et<Q;et++){0<et&&!vt&&(j+=E);var bt=Z&&K?z[et]:et;j+=ut(L[A][bt],et)}A<L.length-1&&(!U||0<Q&&!vt)&&(j+=F)}}return j}function ut(z,L){if(z==null)return"";if(z.constructor===Date)return JSON.stringify(z).slice(1,25);var U=!1;it&&typeof z=="string"&&it.test(z)&&(z="'"+z,U=!0);var j=z.toString().replace(B,$);return(U=U||O===!0||typeof O=="function"&&O(z,L)||Array.isArray(O)&&O[L]||function(Z,K){for(var N=0;N<K.length;N++)if(-1<Z.indexOf(K[N]))return!0;return!1}(j,l.BAD_DELIMITERS)||-1<j.indexOf(E)||j.charAt(0)===" "||j.charAt(j.length-1)===" ")?q+j+q:j}}};if(l.RECORD_SEP="",l.UNIT_SEP="",l.BYTE_ORDER_MARK="\uFEFF",l.BAD_DELIMITERS=["\r",`
|
|
36
|
+
`,'"',l.BYTE_ORDER_MARK],l.WORKERS_SUPPORTED=!i&&!!r.Worker,l.NODE_STREAM_INPUT=1,l.LocalChunkSize=10485760,l.RemoteChunkSize=5242880,l.DefaultDelimiter=",",l.Parser=m,l.ParserHandle=x,l.NetworkStreamer=d,l.FileStreamer=f,l.StringStreamer=p,l.ReadableStreamStreamer=y,r.jQuery){var c=r.jQuery;c.fn.parse=function(S){var C=S.config||{},O=[];return this.each(function(F){if(!(c(this).prop("tagName").toUpperCase()==="INPUT"&&c(this).attr("type").toLowerCase()==="file"&&r.FileReader)||!this.files||this.files.length===0)return!0;for(var q=0;q<this.files.length;q++)O.push({file:this.files[q],inputElem:this,instanceConfig:c.extend({},C)})}),P(),this;function P(){if(O.length!==0){var F,q,$,Y,I=O[0];if(k(S.before)){var it=S.before(I.file,I.inputElem);if(typeof it=="object"){if(it.action==="abort")return F="AbortError",q=I.file,$=I.inputElem,Y=it.reason,void(k(S.error)&&S.error({name:F},q,$,Y));if(it.action==="skip")return void E();typeof it.config=="object"&&(I.instanceConfig=c.extend(I.instanceConfig,it.config))}else if(it==="skip")return void E()}var B=I.instanceConfig.complete;I.instanceConfig.complete=function(yt){k(B)&&B(yt,I.file,I.inputElem),E()},l.parse(I.file,I.instanceConfig)}else k(S.complete)&&S.complete()}function E(){O.splice(0,1),P()}}}function u(S){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(C){var O=T(C);O.chunkSize=parseInt(O.chunkSize),C.step||C.chunk||(O.chunkSize=null),this._handle=new x(O),(this._handle.streamer=this)._config=O}).call(this,S),this.parseChunk=function(C,O){if(this.isFirstChunk&&k(this._config.beforeFirstChunk)){var P=this._config.beforeFirstChunk(C);P!==void 0&&(C=P)}this.isFirstChunk=!1,this._halted=!1;var E=this._partialLine+C;this._partialLine="";var F=this._handle.parse(E,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var q=F.meta.cursor;this._finished||(this._partialLine=E.substring(q-this._baseIndex),this._baseIndex=q),F&&F.data&&(this._rowCount+=F.data.length);var $=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(a)r.postMessage({results:F,workerId:l.WORKER_ID,finished:$});else if(k(this._config.chunk)&&!O){if(this._config.chunk(F,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);F=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(F.data),this._completeResults.errors=this._completeResults.errors.concat(F.errors),this._completeResults.meta=F.meta),this._completed||!$||!k(this._config.complete)||F&&F.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),$||F&&F.meta.paused||this._nextChunk(),F}this._halted=!0},this._sendError=function(C){k(this._config.error)?this._config.error(C):a&&this._config.error&&r.postMessage({workerId:l.WORKER_ID,error:C,finished:!1})}}function d(S){var C;(S=S||{}).chunkSize||(S.chunkSize=l.RemoteChunkSize),u.call(this,S),this._nextChunk=i?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(O){this._input=O,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(C=new XMLHttpRequest,this._config.withCredentials&&(C.withCredentials=this._config.withCredentials),i||(C.onload=M(this._chunkLoaded,this),C.onerror=M(this._chunkError,this)),C.open(this._config.downloadRequestBody?"POST":"GET",this._input,!i),this._config.downloadRequestHeaders){var O=this._config.downloadRequestHeaders;for(var P in O)C.setRequestHeader(P,O[P])}if(this._config.chunkSize){var E=this._start+this._config.chunkSize-1;C.setRequestHeader("Range","bytes="+this._start+"-"+E)}try{C.send(this._config.downloadRequestBody)}catch(F){this._chunkError(F.message)}i&&C.status===0&&this._chunkError()}},this._chunkLoaded=function(){C.readyState===4&&(C.status<200||400<=C.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:C.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(O){var P=O.getResponseHeader("Content-Range");return P===null?-1:parseInt(P.substring(P.lastIndexOf("/")+1))}(C),this.parseChunk(C.responseText)))},this._chunkError=function(O){var P=C.statusText||O;this._sendError(new Error(P))}}function f(S){var C,O;(S=S||{}).chunkSize||(S.chunkSize=l.LocalChunkSize),u.call(this,S);var P=typeof FileReader<"u";this.stream=function(E){this._input=E,O=E.slice||E.webkitSlice||E.mozSlice,P?((C=new FileReader).onload=M(this._chunkLoaded,this),C.onerror=M(this._chunkError,this)):C=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var E=this._input;if(this._config.chunkSize){var F=Math.min(this._start+this._config.chunkSize,this._input.size);E=O.call(E,this._start,F)}var q=C.readAsText(E,this._config.encoding);P||this._chunkLoaded({target:{result:q}})},this._chunkLoaded=function(E){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(E.target.result)},this._chunkError=function(){this._sendError(C.error)}}function p(S){var C;u.call(this,S=S||{}),this.stream=function(O){return C=O,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var O,P=this._config.chunkSize;return P?(O=C.substring(0,P),C=C.substring(P)):(O=C,C=""),this._finished=!C,this.parseChunk(O)}}}function y(S){u.call(this,S=S||{});var C=[],O=!0,P=!1;this.pause=function(){u.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){u.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(E){this._input=E,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){P&&C.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),C.length?this.parseChunk(C.shift()):O=!0},this._streamData=M(function(E){try{C.push(typeof E=="string"?E:E.toString(this._config.encoding)),O&&(O=!1,this._checkIsFinished(),this.parseChunk(C.shift()))}catch(F){this._streamError(F)}},this),this._streamError=M(function(E){this._streamCleanUp(),this._sendError(E)},this),this._streamEnd=M(function(){this._streamCleanUp(),P=!0,this._streamData("")},this),this._streamCleanUp=M(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function x(S){var C,O,P,E=Math.pow(2,53),F=-E,q=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,$=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,Y=this,I=0,it=0,B=!1,yt=!1,ut=[],z={data:[],errors:[],meta:{}};if(k(S.step)){var L=S.step;S.step=function(A){if(z=A,Z())j();else{if(j(),z.data.length===0)return;I+=A.data.length,S.preview&&I>S.preview?O.abort():(z.data=z.data[0],L(z,Y))}}}function U(A){return S.skipEmptyLines==="greedy"?A.join("").trim()==="":A.length===1&&A[0].length===0}function j(){return z&&P&&(N("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+l.DefaultDelimiter+"'"),P=!1),S.skipEmptyLines&&(z.data=z.data.filter(function(A){return!U(A)})),Z()&&function(){if(!z)return;function A(X,vt){k(S.transformHeader)&&(X=S.transformHeader(X,vt)),ut.push(X)}if(Array.isArray(z.data[0])){for(var Q=0;Z()&&Q<z.data.length;Q++)z.data[Q].forEach(A);z.data.splice(0,1)}else z.data.forEach(A)}(),function(){if(!z||!S.header&&!S.dynamicTyping&&!S.transform)return z;function A(X,vt){var ct,Ot=S.header?{}:[];for(ct=0;ct<X.length;ct++){var _t=ct,et=X[ct];S.header&&(_t=ct>=ut.length?"__parsed_extra":ut[ct]),S.transform&&(et=S.transform(et,_t)),et=K(_t,et),_t==="__parsed_extra"?(Ot[_t]=Ot[_t]||[],Ot[_t].push(et)):Ot[_t]=et}return S.header&&(ct>ut.length?N("FieldMismatch","TooManyFields","Too many fields: expected "+ut.length+" fields but parsed "+ct,it+vt):ct<ut.length&&N("FieldMismatch","TooFewFields","Too few fields: expected "+ut.length+" fields but parsed "+ct,it+vt)),Ot}var Q=1;return!z.data.length||Array.isArray(z.data[0])?(z.data=z.data.map(A),Q=z.data.length):z.data=A(z.data,0),S.header&&z.meta&&(z.meta.fields=ut),it+=Q,z}()}function Z(){return S.header&&ut.length===0}function K(A,Q){return X=A,S.dynamicTypingFunction&&S.dynamicTyping[X]===void 0&&(S.dynamicTyping[X]=S.dynamicTypingFunction(X)),(S.dynamicTyping[X]||S.dynamicTyping)===!0?Q==="true"||Q==="TRUE"||Q!=="false"&&Q!=="FALSE"&&(function(vt){if(q.test(vt)){var ct=parseFloat(vt);if(F<ct&&ct<E)return!0}return!1}(Q)?parseFloat(Q):$.test(Q)?new Date(Q):Q===""?null:Q):Q;var X}function N(A,Q,X,vt){var ct={type:A,code:Q,message:X};vt!==void 0&&(ct.row=vt),z.errors.push(ct)}this.parse=function(A,Q,X){var vt=S.quoteChar||'"';if(S.newline||(S.newline=function(_t,et){_t=_t.substring(0,1048576);var bt=new RegExp(g(et)+"([^]*?)"+g(et),"gm"),Nt=(_t=_t.replace(bt,"")).split("\r"),Ce=_t.split(`
|
|
37
37
|
`),Ee=1<Ce.length&&Ce[0].length<Nt[0].length;if(Nt.length===1||Ee)return`
|
|
38
38
|
`;for(var me=0,Lt=0;Lt<Nt.length;Lt++)Nt[Lt][0]===`
|
|
39
39
|
`&&me++;return me>=Nt.length/2?`\r
|
|
40
40
|
`:"\r"}(A,vt)),P=!1,S.delimiter)k(S.delimiter)&&(S.delimiter=S.delimiter(A),z.meta.delimiter=S.delimiter);else{var ct=function(_t,et,bt,Nt,Ce){var Ee,me,Lt,Ft;Ce=Ce||[","," ","|",";",l.RECORD_SEP,l.UNIT_SEP];for(var Je=0;Je<Ce.length;Je++){var Dt=Ce[Je],Cn=0,Re=0,tn=0;Lt=void 0;for(var _e=new m({comments:Nt,delimiter:Dt,newline:et,preview:10}).parse(_t),Me=0;Me<_e.data.length;Me++)if(bt&&U(_e.data[Me]))tn++;else{var Ae=_e.data[Me].length;Re+=Ae,Lt!==void 0?0<Ae&&(Cn+=Math.abs(Ae-Lt),Lt=Ae):Lt=Ae}0<_e.data.length&&(Re/=_e.data.length-tn),(me===void 0||Cn<=me)&&(Ft===void 0||Ft<Re)&&1.99<Re&&(me=Cn,Ee=Dt,Ft=Re)}return{successful:!!(S.delimiter=Ee),bestDelimiter:Ee}}(A,S.newline,S.skipEmptyLines,S.comments,S.delimitersToGuess);ct.successful?S.delimiter=ct.bestDelimiter:(P=!0,S.delimiter=l.DefaultDelimiter),z.meta.delimiter=S.delimiter}var Ot=T(S);return S.preview&&S.header&&Ot.preview++,C=A,O=new m(Ot),z=O.parse(C,Q,X),j(),B?{meta:{paused:!0}}:z||{meta:{paused:!1}}},this.paused=function(){return B},this.pause=function(){B=!0,O.abort(),C=k(S.chunk)?"":C.substring(O.getCharIndex())},this.resume=function(){Y.streamer._halted?(B=!1,Y.streamer.parseChunk(C,!0)):setTimeout(Y.resume,3)},this.aborted=function(){return yt},this.abort=function(){yt=!0,O.abort(),z.meta.aborted=!0,k(S.complete)&&S.complete(z),C=""}}function g(S){return S.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m(S){var C,O=(S=S||{}).delimiter,P=S.newline,E=S.comments,F=S.step,q=S.preview,$=S.fastMode,Y=C=S.quoteChar===void 0||S.quoteChar===null?'"':S.quoteChar;if(S.escapeChar!==void 0&&(Y=S.escapeChar),(typeof O!="string"||-1<l.BAD_DELIMITERS.indexOf(O))&&(O=","),E===O)throw new Error("Comment character same as delimiter");E===!0?E="#":(typeof E!="string"||-1<l.BAD_DELIMITERS.indexOf(E))&&(E=!1),P!==`
|
|
41
41
|
`&&P!=="\r"&&P!==`\r
|
|
42
42
|
`&&(P=`
|
|
43
|
-
`);var I=0,
|
|
44
|
-
`+u),i.encoding==="utf-8"&&(u="\uFEFF"+u),e("export-finished",i.filename),!i.testing){const d=new Blob([u],{type:"text/csv;charset="+i.encoding});EM.saveAs(d,i.filename)}};return(u,d)=>(h.openBlock(),h.createElementBlock("div",{id:r.value,"data-testid":"export-csv",onClick:c},[h.renderSlot(u.$slots,"default",{},()=>[h.createTextVNode("Download "+h.toDisplayString(n.filename),1)])],8,AM))}}),IM=h.defineComponent({__name:"DownloadCsv",props:{rows:{},headers:{},filename:{}},setup(n){const t=n,e=h.computed(()=>Object.keys(t.headers));return(i,r)=>(h.openBlock(),h.createElementBlock("div",null,[h.createVNode(LM,{data:i.rows,fields:e.value,filename:i.filename,labels:i.headers},{default:h.withCtx(()=>[h.renderSlot(i.$slots,"default")]),_:3},8,["data","fields","filename","labels"])]))}}),NM={class:"kong-ui-public-csv-export-modal"},FM={key:0,class:"selected-range"},UM={key:1,class:"text-muted",tag:"span"},rp=3,ap=h.defineComponent({__name:"CsvExportModal",props:{filename:{},modalDescription:{default:void 0},chartData:{}},emits:["toggleModal"],setup(n,{emit:t}){const{i18n:e}=Mt.useI18n(),i=n,r=t,a=`${i.filename.replace(/\s+/g,"-").toLowerCase()}-${new Date().toISOString().slice(0,10)}.csv`,s=h.ref(!0),o=h.computed(()=>{var x,g;return!!((g=(x=i.chartData)==null?void 0:x.data)!=null&&g.length)}),l=h.ref(1),c=h.computed(()=>p.value.rows.length),u=Mt.useChartSelectedRange(h.toRef(i,"chartData")),d=h.computed(()=>e.t("csvExport.previewRows",{rowsMax:Math.min(rp,c.value),rowsTotal:c.value,plural:c.value===1?"":"s"})),f=()=>{r("toggleModal",!1)},p=h.computed(()=>{var T,M,k;if(!o.value||!((T=i.chartData)!=null&&T.meta.metric_names))return{headers:[],rows:[],csvHeaders:{}};const x=i.chartData.data.some(S=>S.timestamp!==i.chartData.data[0].timestamp),g=i.chartData.data.map(S=>{const C=new Date(S.timestamp);return{...Object.keys(S.event).reduce((P,E)=>{if(E in i.chartData.meta.display){const F=S.event[E],q=i.chartData.meta.display[E];P[E]=F&&q&&q[F].name||S.event[E]}else P[E]=S.event[E];return P},{}),...x?{timestamp:Do(C,"yyyy-MM-dd HH:mm:ss"),tzOffset:Do(C,"XXX")}:{}}});let m=[];x&&(m=[{label:e.t("csvExport.Timestamp"),key:"timestamp"},{label:e.t("csvExport.UtcOffset"),key:"tzOffset"}]);const v="display"in i.chartData.meta&&((M=i.chartData.meta)!=null&&M.display)?(k=i.chartData.meta)==null?void 0:k.display:{},b=[...m,...Object.keys(v).map(S=>({label:e.t(`chartLabels.${S}`),key:S})),...i.chartData.meta.metric_names.map(S=>({label:e.t(`chartLabels.${S}`),key:S}))],w=b.reduce((S,C)=>(S[C.key]=C.label,S),{});return{headers:b,csvHeaders:w,rows:g}}),y=()=>{const{rows:x}=p.value;return s.value=!1,{total:Number(x.length)||0,data:x.slice(0,rp)}};return h.watch(p,()=>{l.value++}),(x,g)=>{const m=h.resolveComponent("KEmptyState"),v=h.resolveComponent("KTable"),b=h.resolveComponent("KButton"),w=h.resolveComponent("KModal");return h.openBlock(),h.createElementBlock("div",NM,[h.createVNode(w,{class:"vitals-report","data-testid":"csv-export-modal","show-dismiss-icon":"",title:h.unref(e).t("csvExport.exportPreview"),visible:"",onCancel:f,onKeyup:h.withKeys(f,["esc"])},{default:h.withCtx(()=>{var T;return[h.createElementVNode("div",null,[o.value?(h.openBlock(),h.createElementBlock("div",FM,[h.createElementVNode("p",null,h.toDisplayString(x.modalDescription?x.modalDescription:h.unref(e).t("csvExport.exportDescription")),1),h.createElementVNode("p",null,h.toDisplayString(h.unref(e).t("csvExport.exportTimeRange"))+": "+h.toDisplayString(h.unref(u)),1)])):h.createCommentVNode("",!0),h.createVNode(v,{class:"vitals-table","disable-pagination":"",fetcher:y,"fetcher-cache-key":String(l.value),headers:((T=p.value)==null?void 0:T.headers)||[],"row-hover":!1,sortable:!1},{"empty-state":h.withCtx(()=>[h.createVNode(m,{"action-button-visible":!1},{title:h.withCtx(()=>[h.createElementVNode("h5",null,h.toDisplayString(h.unref(e).t("csvExport.noDataRange")),1)]),default:h.withCtx(()=>[h.createElementVNode("p",null,h.toDisplayString(h.unref(e).t("csvExport.noDataRetry")),1)]),_:1})]),_:1},8,["fetcher-cache-key","headers"]),!s.value&&o.value?(h.openBlock(),h.createElementBlock("div",UM,h.toDisplayString(d.value),1)):h.createCommentVNode("",!0)])]}),"footer-actions":h.withCtx(()=>[h.createVNode(b,{appearance:"tertiary",class:"cancel-btn",onClick:f},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("csvExport.cancelButton")),1)]),_:1}),h.createVNode(IM,{class:"vitals-report-export-button",filename:a,headers:p.value.csvHeaders,rows:p.value.rows},{default:h.withCtx(()=>[h.createVNode(b,{appearance:"primary","data-testid":"csv-download-button",disabled:s.value||!o.value},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("csvExport.downloadButton")),1)]),_:1},8,["disabled"])]),_:1},8,["headers","rows"])]),_:1},8,["title"])])}}}),sp=h.defineComponent({__name:"CsvExportButton",props:{data:{type:Object,required:!0},text:{type:String,required:!1,default:void 0},buttonAppearance:{type:String,required:!1,default:()=>"tertiary"},filenamePrefix:{type:String,required:!1,default:void 0}},setup(n){const t=n,{i18n:e}=Mt.useI18n(),i=h.computed(()=>t.filenamePrefix||e.t("csvExport.defaultFilename")),r=h.ref(!1),a=o=>{r.value=o},s=()=>{a(!0)};return(o,l)=>{const c=h.resolveComponent("KButton");return h.openBlock(),h.createElementBlock(h.Fragment,null,[h.createVNode(c,{appearance:n.buttonAppearance,class:"chart-export-button-display","data-testid":"csv-export-button",onClick:h.withModifiers(s,["prevent"])},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(n.text||h.unref(e).t("csvExport.exportButton")),1)]),_:1},8,["appearance"]),r.value?(h.openBlock(),h.createBlock(ap,{key:0,"chart-data":n.data,filename:i.value,onToggleModal:a},null,8,["chart-data","filename"])):h.createCommentVNode("",!0)],64)}}}),BM={class:"analytics-chart-shell"},WM={key:0,class:"chart-header"},zM={key:0,class:"chart-title"},YM={class:"chart-header-icons-wrapper"},HM={key:1,class:"chart-export-button"},$M={key:2,class:"analytics-chart-parent"},jM=h.defineComponent({__name:"AnalyticsChart",props:{allowCsvExport:{type:Boolean,required:!1,default:!1},chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},tooltipTitle:{type:String,required:!1,default:""},emptyStateTitle:{type:String,required:!1,default:""},emptyStateDescription:{type:String,required:!1,default:""},chartTitle:{type:String,required:!1,default:""},filenamePrefix:{type:String,required:!1,default:""},legendPosition:{type:String,required:!1,default:Wt.Right},syntheticsDataKey:{type:String,required:!1,default:""},showLegendValues:{type:Boolean,required:!1,default:!0},showAnnotations:{type:Boolean,required:!1,default:!0}},setup(n){const t=n,{i18n:e}=Mt.useI18n(),i=h.toRef(t,"chartData"),r=h.computed(()=>p.value?Mt.useExploreResultToTimeDataset({fill:t.chartOptions.stacked,colorPalette:t.chartOptions.chartDatasetColors||sa},h.toRef(t,"chartData")).value:Mt.useExploreResultToDatasets({fill:t.chartOptions.stacked,colorPalette:t.chartOptions.chartDatasetColors||sa},h.toRef(t,"chartData")).value),a=h.computed(()=>{var O;return(O=t.chartData)!=null&&O.meta?"start_ms"in t.chartData.meta?t.chartData.meta.end_ms-t.chartData.meta.start_ms:void 0:0}),s=h.computed(()=>{var O;return(O=t.chartData.meta)!=null&&O.metric_units?Object.values(t.chartData.meta.metric_units)[0]:""}),o=h.computed(()=>t.showLegendValues&&t.legendPosition!==Wt.Bottom),{legendValues:l}=Mt.useChartLegendValues(r,t.chartOptions.type,s),c=h.computed(()=>{var O,P,E;return((E=(P=(O=t.chartData)==null?void 0:O.meta)==null?void 0:P.limit)==null?void 0:E.toString())||null}),u=h.computed(()=>{var O,P;return((P=(O=t.chartData)==null?void 0:O.meta)==null?void 0:P.truncated)||!1}),d=e.t("limitedResultsShown",{maxReturned:c.value}),f=h.computed(()=>[ee.VERTICAL_BAR.toString(),ee.HORIZONTAL_BAR.toString()].includes(t.chartOptions.type)),p=h.computed(()=>[ee.TIMESERIES_BAR,ee.TIMESERIES_LINE].some(O=>O===t.chartOptions.type)),y=h.computed(()=>t.chartOptions.type===ee.DOUGHNUT),x=h.computed(()=>t.chartOptions.type.includes("Vertical")?"vertical":"horizontal"),g=h.computed(()=>{var E,F,q;if(!((E=t.chartData)!=null&&E.meta.metric_names)||!((F=t.chartData)!=null&&F.meta.metric_units))return;const O=t.chartData.meta.metric_names[0],P=t.chartData.meta.metric_units[O];return((q=t.chartOptions)==null?void 0:q.metricAxesTitle)||e.te(`metricAxisTitles.${O}`)&&e.te(`chartUnits.${P}`)&&e.t(`metricAxisTitles.${O}`,{unit:e.t(`chartUnits.${P}`,{plural:"s"})})||void 0}),m=h.computed(()=>{const O=p.value?"Time":Object.keys(t.chartData.meta.display||t.chartData.meta.metric_names)[0];return t.chartOptions.dimensionAxesTitle||e.te(`chartLabels.${O}`)&&e.t(`chartLabels.${O}`)||void 0}),v=h.computed(()=>{const O=jl(Number(t.chartData.meta.granularity_ms));return e.t(`granularityAxisTitles.${O}`)}),b=h.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),w=h.computed(()=>t.emptyStateDescription||e.t("noDataAvailableDescription")),T=h.computed(()=>p.value?O_(r.value):t.chartData&&t.chartData.meta&&t.chartData.data.length),M=h.computed(()=>T.value&&u.value&&c.value||t.chartTitle||t.allowCsvExport&&T.value),k=h.computed(()=>t.chartData.meta.granularity_ms?jl(t.chartData.meta.granularity_ms)||"hourly":jl(new Date(t.chartData.data[1].timestamp).getTime()-new Date(t.chartData.data[0].timestamp).getTime())||"hourly"),S=h.computed(()=>t.chartOptions.chartLegendSortFn?t.chartOptions.chartLegendSortFn:(O,P)=>O.text===e.t("chartLabels.____OTHER____")?1:P.text===e.t("chartLabels.____OTHER____")?-1:!isNaN(parseInt(O.text,10))&&!isNaN(parseInt(P.text,10))?O.text<P.text?-1:1:O.value&&P.value?P.value.raw-O.value.raw:0),C=h.computed(()=>t.chartOptions.chartTooltipSortFn?t.chartOptions.chartTooltipSortFn:(O,P)=>O.label===e.t("chartLabels.____OTHER____")?1:P.label===e.t("chartLabels.____OTHER____")?-1:!isNaN(parseInt(O.label,10))&&!isNaN(parseInt(P.label,10))?O.label<P.label?-1:1:O.value&&P.value?P.rawValue-O.rawValue:0);return h.provide("showLegendValues",o),h.provide("legendPosition",h.toRef(t,"legendPosition")),(O,P)=>{const E=h.resolveComponent("KTooltip"),F=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",BM,[M.value?(h.openBlock(),h.createElementBlock("div",WM,[n.chartTitle?(h.openBlock(),h.createElementBlock("div",zM,h.toDisplayString(n.chartTitle),1)):h.createCommentVNode("",!0),h.createElementVNode("div",YM,[T.value&&u.value&&c.value?(h.openBlock(),h.createBlock(E,{key:0,class:"tooltip","max-width":"500",placement:"right"},{content:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(d)),1)]),default:h.withCtx(()=>[h.createVNode(h.unref(VT),{color:h.unref(XT),decorative:"",size:h.unref(GT)},null,8,["color","size"])]),_:1})):h.createCommentVNode("",!0)]),n.allowCsvExport&&T.value?(h.openBlock(),h.createElementBlock("div",HM,[h.createVNode(sp,{data:i.value,"filename-prefix":n.filenamePrefix},null,8,["data","filename-prefix"])])):h.createCommentVNode("",!0)])):h.createCommentVNode("",!0),T.value?(h.openBlock(),h.createElementBlock("div",$M,[p.value?(h.openBlock(),h.createBlock(ZC,{key:0,"chart-data":r.value,"chart-legend-sort-fn":S.value,"chart-tooltip-sort-fn":C.value,"dimension-axes-title":v.value,fill:n.chartOptions.stacked,granularity:k.value,"legend-values":h.unref(l),"metric-axes-title":g.value,"metric-unit":s.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,"time-range-ms":a.value,"tooltip-title":n.tooltipTitle,type:n.chartOptions.type},null,8,["chart-data","chart-legend-sort-fn","chart-tooltip-sort-fn","dimension-axes-title","fill","granularity","legend-values","metric-axes-title","metric-unit","stacked","synthetics-data-key","time-range-ms","tooltip-title","type"])):f.value?(h.openBlock(),h.createBlock(xS,{key:1,annotations:n.showAnnotations,"chart-data":r.value,"chart-legend-sort-fn":S.value,"chart-tooltip-sort-fn":C.value,"data-testid":"bar-chart-container","dimension-axes-title":m.value,"legend-values":h.unref(l),"metric-axes-title":g.value,"metric-unit":s.value,orientation:x.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle},null,8,["annotations","chart-data","chart-legend-sort-fn","chart-tooltip-sort-fn","dimension-axes-title","legend-values","metric-axes-title","metric-unit","orientation","stacked","synthetics-data-key","tooltip-title"])):y.value?(h.openBlock(),h.createBlock(RS,{key:2,"chart-data":r.value,"dataset-colors":n.chartOptions.chartDatasetColors||h.unref(sa),"legend-position":n.legendPosition,"legend-values":h.unref(l),"metric-unit":s.value,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle},null,8,["chart-data","dataset-colors","legend-position","legend-values","metric-unit","synthetics-data-key","tooltip-title"])):h.createCommentVNode("",!0)])):(h.openBlock(),h.createBlock(F,{key:1,"action-button-visible":!1,class:"chart-empty-state","data-testid":"no-data-in-report"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(b.value),1)]),default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(w.value),1)]),_:1}))])}}}),VM=Ze(jM,[["__scopeId","data-v-824df029"]]),qM={class:"chart-parent","data-testid":"doughnut-chart-parent"},XM={class:"chart-totals-flex"},GM={key:1,class:"metric-small","data-testid":"doughnut-chart-total"},KM=h.defineComponent({__name:"GaugeChart",props:{chartData:{type:Object,required:!1,default:null},metricDisplay:{type:String,required:!1,default:oi.Hidden},numerator:{type:Number,required:!1,default:0},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Qe},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)}},setup(n){const t=n,{i18n:e}=Mt.useI18n(),i=h.ref(Tn()),r=h.computed(()=>[t.chartData.datasets.reduce((y,x)=>(y.labels.push(x.label),y.borderColor.push(x.backgroundColor),y.backgroundColor.push(x.backgroundColor),y.data.push(x.data.reduce((g,m)=>g+m,0)),y),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),a=h.computed(()=>({...t.chartData,datasets:r.value}));Mt.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const s={responsive:!0,maintainAspectRatio:!0,cutout:"78%",circumference:"200",rotation:"260",plugins:{legend:{display:!1}}},o=h.ref(),l=h.computed(()=>{var p;return rr((p=r==null?void 0:r.value[0])==null?void 0:p.data[t.numerator],{capital:!0})}),c=h.computed(()=>{var p,y;return rr(((p=r==null?void 0:r.value[0])==null?void 0:p.data[0])+((y=r==null?void 0:r.value[0])==null?void 0:y.data[1]),{capital:!0})}),u=h.computed(()=>{var p;return`color: ${(p=r==null?void 0:r.value[0])==null?void 0:p.backgroundColor[t.numerator]}`}),d=h.computed(()=>[oi.Full,oi.SingleMetric].includes(t.metricDisplay)),f=h.computed(()=>t.metricDisplay===oi.Full);return(p,y)=>(h.openBlock(),h.createElementBlock("div",qM,[h.createElementVNode("div",XM,[d.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:"metric-large","data-testid":"doughnut-chart-metric",style:h.normalizeStyle(u.value)},h.toDisplayString(l.value),5)):h.createCommentVNode("",!0),f.value?(h.openBlock(),h.createElementBlock("div",GM,h.toDisplayString(h.unref(e).t("total"))+": "+h.toDisplayString(c.value),1)):h.createCommentVNode("",!0)]),h.createElementVNode("div",{class:"chart-container",style:h.normalizeStyle({height:n.height,width:n.width})},[h.createVNode(h.unref(Dh),{ref_key:"chartInstance",ref:o,"chart-id":i.value,data:a.value,options:s},null,8,["chart-id","data","options"])],4)]))}}),QM=Ze(KM,[["__scopeId","data-v-5871cb7a"]]),ZM={class:"simple-chart-shell"},JM={key:1,class:"analytics-chart-parent"},tD=Ze(h.defineComponent({__name:"SimpleChart",props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},emptyStateTitle:{type:String,required:!1,default:""},syntheticsDataKey:{type:String,required:!1,default:""},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)}},setup(n){const t=n,{i18n:e}=Mt.useI18n(),i=h.computed(()=>{var c;const l=Mt.useExploreResultToDatasets({colorPalette:t.chartOptions.chartDatasetColors||Qe},h.toRef(t,"chartData")).value;return(c=t.chartOptions)!=null&&c.reverseDataset&&(l==null||l.datasets.reverse()),l}),r=h.computed(()=>{var l;return(l=t.chartData.meta)!=null&&l.metric_units?Object.values(t.chartData.meta.metric_units)[0]:""}),a=h.computed(()=>t.chartOptions.type===ea.GAUGE),s=h.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),o=h.computed(()=>t.chartData&&t.chartData.meta&&t.chartData.data.length);return(l,c)=>{const u=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",ZM,[o.value?(h.openBlock(),h.createElementBlock("div",JM,[a.value?(h.openBlock(),h.createBlock(QM,{key:0,"chart-data":i.value,"dataset-colors":n.chartOptions.chartDatasetColors,"is-simple":"","metric-display":n.chartOptions.metricDisplay,"metric-unit":r.value,numerator:n.chartOptions.numerator,"synthetics-data-key":n.syntheticsDataKey,width:n.width},null,8,["chart-data","dataset-colors","metric-display","metric-unit","numerator","synthetics-data-key","width"])):h.createCommentVNode("",!0)])):(h.openBlock(),h.createBlock(u,{key:0,"action-button-visible":!0,class:"chart-empty-state","data-testid":"no-data-in-report"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(s.value),1)]),_:1}))])}}}),[["__scopeId","data-v-cb92de46"]]),eD={class:"top-n-card-title","data-testid":"top-n-card-title"},nD={class:"top-n-card-description","data-testid":"top-n-card-description"},iD={key:3,class:"top-n-table","data-testid":"top-n-table"},rD={class:"table-headings"},aD={class:"table-row"},sD={class:"column-1"},oD={class:"column-2"},lD={class:"table-body","data-testid":"top-n-data"},cD=["data-testid"],uD={class:"column-1"},dD={class:"column-2"},fD=Ze(h.defineComponent({__name:"TopNTable",props:{title:{type:String,required:!0},description:{type:String,default:""},data:{type:Object,required:!0},emptyStateTitle:{type:String,default:""},isLoading:{type:Boolean,default:!1},titleTag:{type:String,default:"h2"}},setup(n){const t=n,{i18n:e}=Mt.useI18n(),i=h.computed(()=>t.data.data),r=h.computed(()=>{var y;return!!((y=i.value)!=null&&y.length)}),a=h.computed(()=>{var y,x;return(y=t.data.meta)!=null&&y.display&&((x=Object.keys(t.data.meta.display))==null?void 0:x[0])||""}),s=h.computed(()=>a.value?t.data.meta.display[a.value]:{}),o=h.computed(()=>{var y,x;return(x=(y=t.data.meta)==null?void 0:y.metric_names)!=null&&x.length?t.data.meta.metric_names[0]:""}),l=h.computed(()=>o.value?e.t(`chartLabels.${o.value}`)||o.value:""),c=h.computed(()=>{if(!r.value)return"";if(t.data.meta){if(s.value&&!Object.keys(s.value).length)return e.t("topNTable.errors.display");if(!o.value)return e.t("topNTable.errors.metricNames")}else return e.t("topNTable.errors.meta");return""}),u=y=>{const x=y.event;return String(x[a.value])},d=y=>{const x=u(y),g=s.value&&s.value[x];return g?g.name:"-"},f=y=>{const x=u(y),g=s.value&&s.value[x];return g?!!g.deleted:!1},p=y=>{if(!o.value)return"–";const g=y.event[o.value];return g?rr(g,{capital:!0,round:!0}):"–"};return(y,x)=>{const g=h.resolveComponent("KEmptyState"),m=h.resolveComponent("KSkeleton"),v=h.resolveComponent("KCard");return h.openBlock(),h.createBlock(v,{class:"kong-ui-public-top-n-table","title-tag":n.titleTag},h.createSlots({default:h.withCtx(()=>[c.value?(h.openBlock(),h.createBlock(g,{key:0,"action-button-visible":!1,"data-testid":"top-n-error-state","icon-variant":"error"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("topNTable.defaultErrorStateTitle")),1)]),default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(c.value),1)]),_:1})):n.isLoading?(h.openBlock(),h.createBlock(m,{key:1,"table-columns":2,type:"table"})):r.value?(h.openBlock(),h.createElementBlock("div",iD,[h.createElementVNode("div",rD,[h.createElementVNode("div",aD,[h.createElementVNode("div",sD,h.toDisplayString(h.unref(e).t("topNTable.nameLabel")),1),h.createElementVNode("div",oD,h.toDisplayString(l.value),1)])]),h.createElementVNode("div",lD,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(i.value,(b,w)=>(h.openBlock(),h.createElementBlock("div",{key:`entry-${w}`,class:"table-row","data-testid":`row-${u(b)}`},[h.createElementVNode("div",uD,[h.renderSlot(y.$slots,"name",{record:{id:u(b),name:d(b),deleted:f(b),dimension:a.value}},()=>[h.createTextVNode(h.toDisplayString(d(b)),1)],!0)]),h.createElementVNode("div",dD," "+h.toDisplayString(p(b)),1)],8,cD))),128))])])):(h.openBlock(),h.createBlock(g,{key:2,"action-button-visible":!1,"data-testid":"top-n-empty-state"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(n.emptyStateTitle||h.unref(e).t("topNTable.defaultEmptyStateTitle")),1)]),_:1}))]),_:2},[n.title?{name:"title",fn:h.withCtx(()=>[h.createElementVNode("span",eD,h.toDisplayString(n.title),1)]),key:"0"}:void 0,n.description?{name:"actions",fn:h.withCtx(()=>[h.createElementVNode("div",nD,h.toDisplayString(n.description),1)]),key:"1"}:void 0]),1032,["title-tag"])}}}),[["__scopeId","data-v-50809fdb"]]);at.AnalyticsChart=VM,at.ChartLegendPosition=Wt,at.ChartMetricDisplay=oi,at.ChartTypes=ee,at.ChartTypesSimple=ea,at.CsvExportButton=sp,at.CsvExportModal=ap,at.DECIMAL_DISPLAY=_f,at.FONT_SIZE_REGULAR=Tf,at.FONT_SIZE_SMALL=wf,at.MAX_LABEL_LENGTH=aa,at.OTHERS_COLOR=$w,at.SimpleChart=tD,at.TopNTable=fD,at.ValidType=qn,at.accessibleGrey=Mf,at.apiRequestStatusCodeColors=Df,at.codesInSpec=Ef,at.darkenColor=Cf,at.datavisPalette=Qe,at.defaultStatusCodeColors=sa,at.errorRateColors=Yw,at.formatTime=ra,at.latencyColors=Hw,at.lightGrey=Ro,at.lookupColor=jw,at.lookupDatavisColor=ci,at.lookupStatusCodeCategoryColor=Zw,at.lookupStatusCodeColor=Ao,at.numberFormatter=ia,at.statusCodeBadgeBackgroundColor=Ww,at.trafficColors=zw,Object.defineProperty(at,Symbol.toStringTag,{value:"Module"})});
|
|
43
|
+
`);var I=0,it=!1;this.parse=function(B,yt,ut){if(typeof B!="string")throw new Error("Input must be a string");var z=B.length,L=O.length,U=P.length,j=E.length,Z=k(F),K=[],N=[],A=[],Q=I=0;if(!B)return ce();if(S.header&&!yt){var X=B.split(P)[0].split(O),vt=[],ct={},Ot=!1;for(var _t in X){var et=X[_t];k(S.transformHeader)&&(et=S.transformHeader(et,_t));var bt=et,Nt=ct[et]||0;for(0<Nt&&(Ot=!0,bt=et+"_"+Nt),ct[et]=Nt+1;vt.includes(bt);)bt=bt+"_"+Nt;vt.push(bt)}if(Ot){var Ce=B.split(P);Ce[0]=vt.join(O),B=Ce.join(P)}}if($||$!==!1&&B.indexOf(C)===-1){for(var Ee=B.split(P),me=0;me<Ee.length;me++){if(A=Ee[me],I+=A.length,me!==Ee.length-1)I+=P.length;else if(ut)return ce();if(!E||A.substring(0,j)!==E){if(Z){if(K=[],tn(A.split(O)),ye(),it)return ce()}else tn(A.split(O));if(q&&q<=me)return K=K.slice(0,q),ce(!0)}}return ce()}for(var Lt=B.indexOf(O,I),Ft=B.indexOf(P,I),Je=new RegExp(g(Y)+g(C),"g"),Dt=B.indexOf(C,I);;)if(B[I]!==C)if(E&&A.length===0&&B.substring(I,I+j)===E){if(Ft===-1)return ce();I=Ft+U,Ft=B.indexOf(P,I),Lt=B.indexOf(O,I)}else if(Lt!==-1&&(Lt<Ft||Ft===-1))A.push(B.substring(I,Lt)),I=Lt+L,Lt=B.indexOf(O,I);else{if(Ft===-1)break;if(A.push(B.substring(I,Ft)),Ae(Ft+U),Z&&(ye(),it))return ce();if(q&&K.length>=q)return ce(!0)}else for(Dt=I,I++;;){if((Dt=B.indexOf(C,Dt+1))===-1)return ut||N.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:K.length,index:I}),Me();if(Dt===z-1)return Me(B.substring(I,Dt).replace(Je,C));if(C!==Y||B[Dt+1]!==Y){if(C===Y||Dt===0||B[Dt-1]!==Y){Lt!==-1&&Lt<Dt+1&&(Lt=B.indexOf(O,Dt+1)),Ft!==-1&&Ft<Dt+1&&(Ft=B.indexOf(P,Dt+1));var Cn=_e(Ft===-1?Lt:Math.min(Lt,Ft));if(B.substr(Dt+1+Cn,L)===O){A.push(B.substring(I,Dt).replace(Je,C)),B[I=Dt+1+Cn+L]!==C&&(Dt=B.indexOf(C,I)),Lt=B.indexOf(O,I),Ft=B.indexOf(P,I);break}var Re=_e(Ft);if(B.substring(Dt+1+Re,Dt+1+Re+U)===P){if(A.push(B.substring(I,Dt).replace(Je,C)),Ae(Dt+1+Re+U),Lt=B.indexOf(O,I),Dt=B.indexOf(C,I),Z&&(ye(),it))return ce();if(q&&K.length>=q)return ce(!0);break}N.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:K.length,index:I}),Dt++}}else Dt++}return Me();function tn(Kt){K.push(Kt),Q=I}function _e(Kt){var _a=0;if(Kt!==-1){var vr=B.substring(Dt+1,Kt);vr&&vr.trim()===""&&(_a=vr.length)}return _a}function Me(Kt){return ut||(Kt===void 0&&(Kt=B.substring(I)),A.push(Kt),I=z,tn(A),Z&&ye()),ce()}function Ae(Kt){I=Kt,tn(A),A=[],Ft=B.indexOf(P,I)}function ce(Kt){return{data:K,errors:N,meta:{delimiter:O,linebreak:P,aborted:it,truncated:!!Kt,cursor:Q+(yt||0)}}}function ye(){F(ce()),K=[],N=[]}},this.abort=function(){it=!0},this.getCharIndex=function(){return I}}function v(S){var C=S.data,O=s[C.workerId],P=!1;if(C.error)O.userError(C.error,C.file);else if(C.results&&C.results.data){var E={abort:function(){P=!0,b(C.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:w,resume:w};if(k(O.userStep)){for(var F=0;F<C.results.data.length&&(O.userStep({data:C.results.data[F],errors:C.results.errors,meta:C.results.meta},E),!P);F++);delete C.results}else k(O.userChunk)&&(O.userChunk(C.results,E,C.file),delete C.results)}C.finished&&!P&&b(C.workerId,C.results)}function b(S,C){var O=s[S];k(O.userComplete)&&O.userComplete(C),O.terminate(),delete s[S]}function w(){throw new Error("Not implemented.")}function T(S){if(typeof S!="object"||S===null)return S;var C=Array.isArray(S)?[]:{};for(var O in S)C[O]=T(S[O]);return C}function M(S,C){return function(){S.apply(C,arguments)}}function k(S){return typeof S=="function"}return a&&(r.onmessage=function(S){var C=S.data;if(l.WORKER_ID===void 0&&C&&(l.WORKER_ID=C.workerId),typeof C.input=="string")r.postMessage({workerId:l.WORKER_ID,results:l.parse(C.input,C.config),finished:!0});else if(r.File&&C.input instanceof File||C.input instanceof Object){var O=l.parse(C.input,C.config);O&&r.postMessage({workerId:l.WORKER_ID,results:O,finished:!0})}}),(d.prototype=Object.create(u.prototype)).constructor=d,(f.prototype=Object.create(u.prototype)).constructor=f,(p.prototype=Object.create(p.prototype)).constructor=p,(y.prototype=Object.create(u.prototype)).constructor=y,l})})(ap);var BM=ap.exports;const WM=["id"],zM=h.defineComponent({__name:"VueJsonCsv",props:{data:{type:Array,required:!0},fields:{type:Array,required:!1,default:null},labels:{type:Object,required:!1,default:null},filename:{type:String,default:"report-data.csv"},delimiter:{type:String,default:",",required:!1},separatorExcel:{type:Boolean,default:!1},encoding:{type:String,default:"utf-8"},testing:{type:Boolean,required:!1,default:!1}},emits:["export-started","export-finished"],setup(n,{emit:t}){const e=t,r=n,i=h.computed(()=>`export_${new Date().getTime()}`),a=h.computed(()=>{const u=l();return u.length?u:null}),s=()=>{const u=r.labels;if(typeof r.fields!==qn.Object)throw new Error("Labels needs to be a object containing key / value pairs.");return typeof u===qn.Object?d=>oM(d,(f,p)=>u[p]||p):d=>d},o=()=>{const u=r.fields;if(typeof r.fields!==qn.Object&&!Array.isArray(u))throw new Error("Fields needs to be an array of strings.");return Array.isArray(u)?d=>FM(d,u):d=>d},l=()=>{if(typeof r.fields===qn.Undefined&&typeof r.labels===qn.Undefined)return r.data;const u=s(),d=o();return r.data.map(f=>u(d(f)))},c=()=>{if(!(a!=null&&a.value)){console.warn("No data to export");return}e("export-started",a.value);let u=BM.unparse(a.value,Object.assign({delimiter:r.delimiter,encoding:r.encoding}));if(r.separatorExcel&&(u="SEP="+r.delimiter+`\r
|
|
44
|
+
`+u),r.encoding==="utf-8"&&(u="\uFEFF"+u),e("export-finished",r.filename),!r.testing){const d=new Blob([u],{type:"text/csv;charset="+r.encoding});UM.saveAs(d,r.filename)}};return(u,d)=>(h.openBlock(),h.createElementBlock("div",{id:i.value,"data-testid":"export-csv",onClick:c},[h.renderSlot(u.$slots,"default",{},()=>[h.createTextVNode("Download "+h.toDisplayString(n.filename),1)])],8,WM))}}),YM=h.defineComponent({__name:"DownloadCsv",props:{rows:{},headers:{},filename:{}},setup(n){const t=n,e=h.computed(()=>Object.keys(t.headers));return(r,i)=>(h.openBlock(),h.createElementBlock("div",null,[h.createVNode(zM,{data:r.rows,fields:e.value,filename:r.filename,labels:r.headers},{default:h.withCtx(()=>[h.renderSlot(r.$slots,"default")]),_:3},8,["data","fields","filename","labels"])]))}}),HM={class:"kong-ui-public-csv-export-modal"},$M={key:0,class:"selected-range"},jM={key:1,class:"text-muted",tag:"span"},sp=3,op=h.defineComponent({__name:"CsvExportModal",props:{filename:{},modalDescription:{default:void 0},chartData:{}},emits:["toggleModal"],setup(n,{emit:t}){const{i18n:e}=Mt.useI18n(),r=n,i=t,a=`${r.filename.replace(/\s+/g,"-").toLowerCase()}-${new Date().toISOString().slice(0,10)}.csv`,s=h.ref(!0),o=h.computed(()=>{var x,g;return!!((g=(x=r.chartData)==null?void 0:x.data)!=null&&g.length)}),l=h.ref(1),c=h.computed(()=>p.value.rows.length),u=Mt.useChartSelectedRange(h.toRef(r,"chartData")),d=h.computed(()=>e.t("csvExport.previewRows",{rowsMax:Math.min(sp,c.value),rowsTotal:c.value,plural:c.value===1?"":"s"})),f=()=>{i("toggleModal",!1)},p=h.computed(()=>{var T,M,k;if(!o.value||!((T=r.chartData)!=null&&T.meta.metric_names))return{headers:[],rows:[],csvHeaders:{}};const x=r.chartData.data.some(S=>S.timestamp!==r.chartData.data[0].timestamp),g=r.chartData.data.map(S=>{const C=new Date(S.timestamp);return{...Object.keys(S.event).reduce((P,E)=>{if(E in r.chartData.meta.display){const F=S.event[E],q=r.chartData.meta.display[E];P[E]=F&&q&&q[F].name||S.event[E]}else P[E]=S.event[E];return P},{}),...x?{timestamp:Do(C,"yyyy-MM-dd HH:mm:ss"),tzOffset:Do(C,"XXX")}:{}}});let m=[];x&&(m=[{label:e.t("csvExport.Timestamp"),key:"timestamp"},{label:e.t("csvExport.UtcOffset"),key:"tzOffset"}]);const v="display"in r.chartData.meta&&((M=r.chartData.meta)!=null&&M.display)?(k=r.chartData.meta)==null?void 0:k.display:{},b=[...m,...Object.keys(v).map(S=>({label:e.t(`chartLabels.${S}`),key:S})),...r.chartData.meta.metric_names.map(S=>({label:e.t(`chartLabels.${S}`),key:S}))],w=b.reduce((S,C)=>(S[C.key]=C.label,S),{});return{headers:b,csvHeaders:w,rows:g}}),y=()=>{const{rows:x}=p.value;return s.value=!1,{total:Number(x.length)||0,data:x.slice(0,sp)}};return h.watch(p,()=>{l.value++}),(x,g)=>{const m=h.resolveComponent("KEmptyState"),v=h.resolveComponent("KTable"),b=h.resolveComponent("KButton"),w=h.resolveComponent("KModal");return h.openBlock(),h.createElementBlock("div",HM,[h.createVNode(w,{class:"vitals-report","data-testid":"csv-export-modal","show-dismiss-icon":"",title:h.unref(e).t("csvExport.exportPreview"),visible:"",onCancel:f,onKeyup:h.withKeys(f,["esc"])},{default:h.withCtx(()=>{var T;return[h.createElementVNode("div",null,[o.value?(h.openBlock(),h.createElementBlock("div",$M,[h.createElementVNode("p",null,h.toDisplayString(x.modalDescription?x.modalDescription:h.unref(e).t("csvExport.exportDescription")),1),h.createElementVNode("p",null,h.toDisplayString(h.unref(e).t("csvExport.exportTimeRange"))+": "+h.toDisplayString(h.unref(u)),1)])):h.createCommentVNode("",!0),h.createVNode(v,{class:"vitals-table","disable-pagination":"",fetcher:y,"fetcher-cache-key":String(l.value),headers:((T=p.value)==null?void 0:T.headers)||[],"row-hover":!1,sortable:!1},{"empty-state":h.withCtx(()=>[h.createVNode(m,{"action-button-visible":!1},{title:h.withCtx(()=>[h.createElementVNode("h5",null,h.toDisplayString(h.unref(e).t("csvExport.noDataRange")),1)]),default:h.withCtx(()=>[h.createElementVNode("p",null,h.toDisplayString(h.unref(e).t("csvExport.noDataRetry")),1)]),_:1})]),_:1},8,["fetcher-cache-key","headers"]),!s.value&&o.value?(h.openBlock(),h.createElementBlock("div",jM,h.toDisplayString(d.value),1)):h.createCommentVNode("",!0)])]}),"footer-actions":h.withCtx(()=>[h.createVNode(b,{appearance:"tertiary",class:"cancel-btn",onClick:f},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("csvExport.cancelButton")),1)]),_:1}),h.createVNode(YM,{class:"vitals-report-export-button",filename:a,headers:p.value.csvHeaders,rows:p.value.rows},{default:h.withCtx(()=>[h.createVNode(b,{appearance:"primary","data-testid":"csv-download-button",disabled:s.value||!o.value},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("csvExport.downloadButton")),1)]),_:1},8,["disabled"])]),_:1},8,["headers","rows"])]),_:1},8,["title"])])}}}),lp=h.defineComponent({__name:"CsvExportButton",props:{data:{type:Object,required:!0},text:{type:String,required:!1,default:void 0},buttonAppearance:{type:String,required:!1,default:()=>"tertiary"},filenamePrefix:{type:String,required:!1,default:void 0}},setup(n){const t=n,{i18n:e}=Mt.useI18n(),r=h.computed(()=>t.filenamePrefix||e.t("csvExport.defaultFilename")),i=h.ref(!1),a=o=>{i.value=o},s=()=>{a(!0)};return(o,l)=>{const c=h.resolveComponent("KButton");return h.openBlock(),h.createElementBlock(h.Fragment,null,[h.createVNode(c,{appearance:n.buttonAppearance,class:"chart-export-button-display","data-testid":"csv-export-button",onClick:h.withModifiers(s,["prevent"])},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(n.text||h.unref(e).t("csvExport.exportButton")),1)]),_:1},8,["appearance"]),i.value?(h.openBlock(),h.createBlock(op,{key:0,"chart-data":n.data,filename:r.value,onToggleModal:a},null,8,["chart-data","filename"])):h.createCommentVNode("",!0)],64)}}}),VM={class:"analytics-chart-shell"},qM={key:0,class:"chart-header"},XM={key:0,class:"chart-title"},GM={class:"chart-header-icons-wrapper"},KM={key:1,class:"chart-export-button"},QM={key:2,class:"analytics-chart-parent"},ZM=h.defineComponent({__name:"AnalyticsChart",props:{allowCsvExport:{type:Boolean,required:!1,default:!1},chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},tooltipTitle:{type:String,required:!1,default:""},emptyStateTitle:{type:String,required:!1,default:""},emptyStateDescription:{type:String,required:!1,default:""},chartTitle:{type:String,required:!1,default:""},filenamePrefix:{type:String,required:!1,default:""},legendPosition:{type:String,required:!1,default:Wt.Right},syntheticsDataKey:{type:String,required:!1,default:""},showLegendValues:{type:Boolean,required:!1,default:!0},showAnnotations:{type:Boolean,required:!1,default:!0}},setup(n){const t=n,{i18n:e}=Mt.useI18n(),r=h.toRef(t,"chartData"),i=h.computed(()=>p.value?Mt.useExploreResultToTimeDataset({fill:t.chartOptions.stacked,colorPalette:t.chartOptions.chartDatasetColors||sa},h.toRef(t,"chartData")).value:Mt.useExploreResultToDatasets({fill:t.chartOptions.stacked,colorPalette:t.chartOptions.chartDatasetColors||sa},h.toRef(t,"chartData")).value),a=h.computed(()=>{var O;return(O=t.chartData)!=null&&O.meta?"start_ms"in t.chartData.meta?t.chartData.meta.end_ms-t.chartData.meta.start_ms:void 0:0}),s=h.computed(()=>{var O;return(O=t.chartData.meta)!=null&&O.metric_units?Object.values(t.chartData.meta.metric_units)[0]:""}),o=h.computed(()=>t.showLegendValues&&t.legendPosition!==Wt.Bottom),{legendValues:l}=Mt.useChartLegendValues(i,t.chartOptions.type,s),c=h.computed(()=>{var O,P,E;return((E=(P=(O=t.chartData)==null?void 0:O.meta)==null?void 0:P.limit)==null?void 0:E.toString())||null}),u=h.computed(()=>{var O,P;return((P=(O=t.chartData)==null?void 0:O.meta)==null?void 0:P.truncated)||!1}),d=e.t("limitedResultsShown",{maxReturned:c.value}),f=h.computed(()=>[ee.VERTICAL_BAR.toString(),ee.HORIZONTAL_BAR.toString()].includes(t.chartOptions.type)),p=h.computed(()=>[ee.TIMESERIES_BAR,ee.TIMESERIES_LINE].some(O=>O===t.chartOptions.type)),y=h.computed(()=>t.chartOptions.type===ee.DOUGHNUT),x=h.computed(()=>t.chartOptions.type.includes("Vertical")?"vertical":"horizontal"),g=h.computed(()=>{var E,F,q;if(!((E=t.chartData)!=null&&E.meta.metric_names)||!((F=t.chartData)!=null&&F.meta.metric_units))return;const O=t.chartData.meta.metric_names[0],P=t.chartData.meta.metric_units[O];return((q=t.chartOptions)==null?void 0:q.metricAxesTitle)||e.te(`metricAxisTitles.${O}`)&&e.te(`chartUnits.${P}`)&&e.t(`metricAxisTitles.${O}`,{unit:e.t(`chartUnits.${P}`,{plural:"s"})})||void 0}),m=h.computed(()=>{const O=p.value?"Time":Object.keys(t.chartData.meta.display||t.chartData.meta.metric_names)[0];return t.chartOptions.dimensionAxesTitle||e.te(`chartLabels.${O}`)&&e.t(`chartLabels.${O}`)||void 0}),v=h.computed(()=>{const O=Vl(Number(t.chartData.meta.granularity_ms));return e.t(`granularityAxisTitles.${O}`)}),b=h.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),w=h.computed(()=>t.emptyStateDescription||e.t("noDataAvailableDescription")),T=h.computed(()=>p.value?E_(i.value):t.chartData&&t.chartData.meta&&t.chartData.data.length),M=h.computed(()=>T.value&&u.value&&c.value||t.chartTitle||t.allowCsvExport&&T.value),k=h.computed(()=>t.chartData.meta.granularity_ms?Vl(t.chartData.meta.granularity_ms)||"hourly":Vl(new Date(t.chartData.data[1].timestamp).getTime()-new Date(t.chartData.data[0].timestamp).getTime())||"hourly"),S=h.computed(()=>t.chartOptions.chartLegendSortFn?t.chartOptions.chartLegendSortFn:(O,P)=>O.text===e.t("chartLabels.____OTHER____")?1:P.text===e.t("chartLabels.____OTHER____")?-1:!isNaN(parseInt(O.text,10))&&!isNaN(parseInt(P.text,10))?O.text<P.text?-1:1:O.value&&P.value?P.value.raw-O.value.raw:0),C=h.computed(()=>t.chartOptions.chartTooltipSortFn?t.chartOptions.chartTooltipSortFn:(O,P)=>O.label===e.t("chartLabels.____OTHER____")?1:P.label===e.t("chartLabels.____OTHER____")?-1:!isNaN(parseInt(O.label,10))&&!isNaN(parseInt(P.label,10))?O.label<P.label?-1:1:O.value&&P.value?P.rawValue-O.rawValue:0);return h.provide("showLegendValues",o),h.provide("legendPosition",h.toRef(t,"legendPosition")),(O,P)=>{const E=h.resolveComponent("KTooltip"),F=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",VM,[M.value?(h.openBlock(),h.createElementBlock("div",qM,[n.chartTitle?(h.openBlock(),h.createElementBlock("div",XM,h.toDisplayString(n.chartTitle),1)):h.createCommentVNode("",!0),h.createElementVNode("div",GM,[T.value&&u.value&&c.value?(h.openBlock(),h.createBlock(E,{key:0,class:"tooltip","max-width":"500",placement:"right"},{content:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(d)),1)]),default:h.withCtx(()=>[h.createVNode(h.unref(XT),{color:h.unref(KT),decorative:"",size:h.unref(QT)},null,8,["color","size"])]),_:1})):h.createCommentVNode("",!0)]),n.allowCsvExport&&T.value?(h.openBlock(),h.createElementBlock("div",KM,[h.createVNode(lp,{data:r.value,"filename-prefix":n.filenamePrefix},null,8,["data","filename-prefix"])])):h.createCommentVNode("",!0)])):h.createCommentVNode("",!0),T.value?(h.openBlock(),h.createElementBlock("div",QM,[p.value?(h.openBlock(),h.createBlock(aM,{key:0,"chart-data":i.value,"chart-legend-sort-fn":S.value,"chart-tooltip-sort-fn":C.value,"dimension-axes-title":v.value,fill:n.chartOptions.stacked,granularity:k.value,"legend-values":h.unref(l),"metric-axes-title":g.value,"metric-unit":s.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,"time-range-ms":a.value,"tooltip-title":n.tooltipTitle,type:n.chartOptions.type},null,8,["chart-data","chart-legend-sort-fn","chart-tooltip-sort-fn","dimension-axes-title","fill","granularity","legend-values","metric-axes-title","metric-unit","stacked","synthetics-data-key","time-range-ms","tooltip-title","type"])):f.value?(h.openBlock(),h.createBlock(wS,{key:1,annotations:n.showAnnotations,"chart-data":i.value,"chart-legend-sort-fn":S.value,"chart-tooltip-sort-fn":C.value,"data-testid":"bar-chart-container","dimension-axes-title":m.value,"legend-values":h.unref(l),"metric-axes-title":g.value,"metric-unit":s.value,orientation:x.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle},null,8,["annotations","chart-data","chart-legend-sort-fn","chart-tooltip-sort-fn","dimension-axes-title","legend-values","metric-axes-title","metric-unit","orientation","stacked","synthetics-data-key","tooltip-title"])):y.value?(h.openBlock(),h.createBlock(LS,{key:2,"chart-data":i.value,"dataset-colors":n.chartOptions.chartDatasetColors||h.unref(sa),"legend-position":n.legendPosition,"legend-values":h.unref(l),"metric-unit":s.value,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle},null,8,["chart-data","dataset-colors","legend-position","legend-values","metric-unit","synthetics-data-key","tooltip-title"])):h.createCommentVNode("",!0)])):(h.openBlock(),h.createBlock(F,{key:1,"action-button-visible":!1,class:"chart-empty-state","data-testid":"no-data-in-report"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(b.value),1)]),default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(w.value),1)]),_:1}))])}}}),JM=Ze(ZM,[["__scopeId","data-v-824df029"]]),tD={class:"chart-parent","data-testid":"doughnut-chart-parent"},eD={class:"chart-totals-flex"},nD={key:1,class:"metric-small","data-testid":"doughnut-chart-total"},rD=h.defineComponent({__name:"GaugeChart",props:{chartData:{type:Object,required:!1,default:null},metricDisplay:{type:String,required:!1,default:or.Hidden},numerator:{type:Number,required:!1,default:0},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Qe},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)}},setup(n){const t=n,{i18n:e}=Mt.useI18n(),r=h.ref(Tn()),i=h.computed(()=>[t.chartData.datasets.reduce((y,x)=>(y.labels.push(x.label),y.borderColor.push(x.backgroundColor),y.backgroundColor.push(x.backgroundColor),y.data.push(x.data.reduce((g,m)=>g+m,0)),y),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),a=h.computed(()=>({...t.chartData,datasets:i.value}));Mt.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const s={responsive:!0,maintainAspectRatio:!0,cutout:"78%",circumference:"200",rotation:"260",plugins:{legend:{display:!1}}},o=h.ref(),l=h.computed(()=>{var p;return ii((p=i==null?void 0:i.value[0])==null?void 0:p.data[t.numerator],{capital:!0})}),c=h.computed(()=>{var p,y;return ii(((p=i==null?void 0:i.value[0])==null?void 0:p.data[0])+((y=i==null?void 0:i.value[0])==null?void 0:y.data[1]),{capital:!0})}),u=h.computed(()=>{var p;return`color: ${(p=i==null?void 0:i.value[0])==null?void 0:p.backgroundColor[t.numerator]}`}),d=h.computed(()=>[or.Full,or.SingleMetric].includes(t.metricDisplay)),f=h.computed(()=>t.metricDisplay===or.Full);return(p,y)=>(h.openBlock(),h.createElementBlock("div",tD,[h.createElementVNode("div",eD,[d.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:"metric-large","data-testid":"doughnut-chart-metric",style:h.normalizeStyle(u.value)},h.toDisplayString(l.value),5)):h.createCommentVNode("",!0),f.value?(h.openBlock(),h.createElementBlock("div",nD,h.toDisplayString(h.unref(e).t("total"))+": "+h.toDisplayString(c.value),1)):h.createCommentVNode("",!0)]),h.createElementVNode("div",{class:"chart-container",style:h.normalizeStyle({height:n.height,width:n.width})},[h.createVNode(h.unref(kh),{ref_key:"chartInstance",ref:o,"chart-id":r.value,data:a.value,options:s},null,8,["chart-id","data","options"])],4)]))}}),iD=Ze(rD,[["__scopeId","data-v-5871cb7a"]]),aD={class:"simple-chart-shell"},sD={key:1,class:"analytics-chart-parent"},oD=Ze(h.defineComponent({__name:"SimpleChart",props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},emptyStateTitle:{type:String,required:!1,default:""},syntheticsDataKey:{type:String,required:!1,default:""},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)}},setup(n){const t=n,{i18n:e}=Mt.useI18n(),r=h.computed(()=>{var c;const l=Mt.useExploreResultToDatasets({colorPalette:t.chartOptions.chartDatasetColors||Qe},h.toRef(t,"chartData")).value;return(c=t.chartOptions)!=null&&c.reverseDataset&&(l==null||l.datasets.reverse()),l}),i=h.computed(()=>{var l;return(l=t.chartData.meta)!=null&&l.metric_units?Object.values(t.chartData.meta.metric_units)[0]:""}),a=h.computed(()=>t.chartOptions.type===ea.GAUGE),s=h.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),o=h.computed(()=>t.chartData&&t.chartData.meta&&t.chartData.data.length);return(l,c)=>{const u=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",aD,[o.value?(h.openBlock(),h.createElementBlock("div",sD,[a.value?(h.openBlock(),h.createBlock(iD,{key:0,"chart-data":r.value,"dataset-colors":n.chartOptions.chartDatasetColors,"is-simple":"","metric-display":n.chartOptions.metricDisplay,"metric-unit":i.value,numerator:n.chartOptions.numerator,"synthetics-data-key":n.syntheticsDataKey,width:n.width},null,8,["chart-data","dataset-colors","metric-display","metric-unit","numerator","synthetics-data-key","width"])):h.createCommentVNode("",!0)])):(h.openBlock(),h.createBlock(u,{key:0,"action-button-visible":!0,class:"chart-empty-state","data-testid":"no-data-in-report"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(s.value),1)]),_:1}))])}}}),[["__scopeId","data-v-cb92de46"]]),lD={class:"top-n-card-title","data-testid":"top-n-card-title"},cD={class:"top-n-card-description","data-testid":"top-n-card-description"},uD={key:3,class:"top-n-table","data-testid":"top-n-table"},dD={class:"table-headings"},fD={class:"table-row"},hD={class:"column-1"},pD={class:"column-2"},gD={class:"table-body","data-testid":"top-n-data"},mD=["data-testid"],yD={class:"column-1"},vD={class:"column-2"},bD=Ze(h.defineComponent({__name:"TopNTable",props:{title:{type:String,required:!0},description:{type:String,default:""},data:{type:Object,required:!0},emptyStateTitle:{type:String,default:""},isLoading:{type:Boolean,default:!1},titleTag:{type:String,default:"h2"}},setup(n){const t=n,{i18n:e}=Mt.useI18n(),r=h.computed(()=>t.data.data),i=h.computed(()=>{var y;return!!((y=r.value)!=null&&y.length)}),a=h.computed(()=>{var y,x;return(y=t.data.meta)!=null&&y.display&&((x=Object.keys(t.data.meta.display))==null?void 0:x[0])||""}),s=h.computed(()=>a.value?t.data.meta.display[a.value]:{}),o=h.computed(()=>{var y,x;return(x=(y=t.data.meta)==null?void 0:y.metric_names)!=null&&x.length?t.data.meta.metric_names[0]:""}),l=h.computed(()=>o.value?e.t(`chartLabels.${o.value}`)||o.value:""),c=h.computed(()=>{if(!i.value)return"";if(t.data.meta){if(s.value&&!Object.keys(s.value).length)return e.t("topNTable.errors.display");if(!o.value)return e.t("topNTable.errors.metricNames")}else return e.t("topNTable.errors.meta");return""}),u=y=>{const x=y.event;return String(x[a.value])},d=y=>{const x=u(y),g=s.value&&s.value[x];return g?g.name:"-"},f=y=>{const x=u(y),g=s.value&&s.value[x];return g?!!g.deleted:!1},p=y=>{if(!o.value)return"–";const g=y.event[o.value];return g?ii(g,{capital:!0,round:!0}):"–"};return(y,x)=>{const g=h.resolveComponent("KEmptyState"),m=h.resolveComponent("KSkeleton"),v=h.resolveComponent("KCard");return h.openBlock(),h.createBlock(v,{class:"kong-ui-public-top-n-table","title-tag":n.titleTag},h.createSlots({default:h.withCtx(()=>[c.value?(h.openBlock(),h.createBlock(g,{key:0,"action-button-visible":!1,"data-testid":"top-n-error-state","icon-variant":"error"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("topNTable.defaultErrorStateTitle")),1)]),default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(c.value),1)]),_:1})):n.isLoading?(h.openBlock(),h.createBlock(m,{key:1,"table-columns":2,type:"table"})):i.value?(h.openBlock(),h.createElementBlock("div",uD,[h.createElementVNode("div",dD,[h.createElementVNode("div",fD,[h.createElementVNode("div",hD,h.toDisplayString(h.unref(e).t("topNTable.nameLabel")),1),h.createElementVNode("div",pD,h.toDisplayString(l.value),1)])]),h.createElementVNode("div",gD,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(r.value,(b,w)=>(h.openBlock(),h.createElementBlock("div",{key:`entry-${w}`,class:"table-row","data-testid":`row-${u(b)}`},[h.createElementVNode("div",yD,[h.renderSlot(y.$slots,"name",{record:{id:u(b),name:d(b),deleted:f(b),dimension:a.value}},()=>[h.createTextVNode(h.toDisplayString(d(b)),1)],!0)]),h.createElementVNode("div",vD," "+h.toDisplayString(p(b)),1)],8,mD))),128))])])):(h.openBlock(),h.createBlock(g,{key:2,"action-button-visible":!1,"data-testid":"top-n-empty-state"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(n.emptyStateTitle||h.unref(e).t("topNTable.defaultEmptyStateTitle")),1)]),_:1}))]),_:2},[n.title?{name:"title",fn:h.withCtx(()=>[h.createElementVNode("span",lD,h.toDisplayString(n.title),1)]),key:"0"}:void 0,n.description?{name:"actions",fn:h.withCtx(()=>[h.createElementVNode("div",cD,h.toDisplayString(n.description),1)]),key:"1"}:void 0]),1032,["title-tag"])}}}),[["__scopeId","data-v-50809fdb"]]);at.AnalyticsChart=JM,at.ChartLegendPosition=Wt,at.ChartMetricDisplay=or,at.ChartTypes=ee,at.ChartTypesSimple=ea,at.CsvExportButton=lp,at.CsvExportModal=op,at.DECIMAL_DISPLAY=wf,at.FONT_SIZE_REGULAR=Sf,at.FONT_SIZE_SMALL=Tf,at.MAX_LABEL_LENGTH=aa,at.OTHERS_COLOR=Vw,at.SimpleChart=oD,at.TopNTable=bD,at.ValidType=qn,at.accessibleGrey=Df,at.apiRequestStatusCodeColors=kf,at.codesInSpec=Rf,at.darkenColor=Mf,at.datavisPalette=Qe,at.defaultStatusCodeColors=sa,at.errorRateColors=$w,at.formatTime=ia,at.latencyColors=jw,at.lightGrey=Ro,at.lookupColor=qw,at.lookupDatavisColor=cr,at.lookupStatusCodeCategoryColor=t1,at.lookupStatusCodeColor=Ao,at.numberFormatter=ra,at.statusCodeBadgeBackgroundColor=Yw,at.trafficColors=Hw,Object.defineProperty(at,Symbol.toStringTag,{value:"Module"})});
|